void init(const char* title, struct image imageData) { int argc = 0; char *argv[] = { "" }; gtk_init(&argc, (char***)&argv); menu_title = title; icon = imageData.bytes; iconSize = imageData.length; menu = gtk_menu_new(); void *handle; // check if system has libappindicator1 package handle = dlopen("libappindicator.so.1", RTLD_LAZY); if(!handle) { create_status_icon(); } else { create_indicator(handle); } }
int init_gtk() { create_status_icon(); return 0; }