-
Notifications
You must be signed in to change notification settings - Fork 4
npp_app_init
Jurek Muszyński edited this page Dec 19, 2021
·
2 revisions
Called when application starts. Good place to call init functions.
true if everything is OK. false will stop booting process, npp_app_done() will be called and application will be terminated.
bool npp_app_init(int argc, char *argv[])
{
/* generated statics */
prepare_css();
/* authorization levels */
npp_require_auth("show", AUTH_LEVEL_NONE);
npp_require_auth("dashboard", AUTH_LEVEL_LOGGEDIN);
/* admin */
npp_require_auth("logs", AUTH_LEVEL_ADMIN);
/* messages */
npp_add_message(ERR_PAGE_MAX_SIZE, "EN-US", "You can't add any more elements to this page");
return true;
}