1 #ifdef E_TYPEDEFS 2 3 #define E_MODULE_API_VERSION 25 4 5 typedef struct _E_Module E_Module; 6 typedef struct _E_Module_Api E_Module_Api; 7 8 typedef struct _E_Event_Module_Update E_Event_Module_Update; 9 10 typedef struct E_Module_Desktop E_Module_Desktop; 11 12 #else 13 #ifndef E_MODULE_H 14 #define E_MODULE_H 15 16 #define E_MODULE_TYPE 0xE0b0100b 17 18 extern E_API int E_EVENT_MODULE_UPDATE; 19 extern E_API int E_EVENT_MODULE_INIT_END; 20 21 struct _E_Event_Module_Update 22 { 23 const char *name; 24 Eina_Bool enabled E_BITFIELD; 25 }; 26 27 struct _E_Module 28 { 29 E_Object e_obj_inherit; 30 31 E_Module_Api *api; 32 33 Eina_Stringshare *name; 34 Eina_Stringshare *file; 35 Eina_Stringshare *dir; 36 void *handle; 37 38 struct { 39 void * (*init) (E_Module *m); 40 int (*shutdown) (E_Module *m); 41 int (*save) (E_Module *m); 42 } func; 43 44 Eina_Bool enabled E_BITFIELD; 45 Eina_Bool error E_BITFIELD; 46 47 /* the module is allowed to modify these */ 48 void *data; 49 }; 50 51 struct E_Module_Desktop 52 { 53 Eina_Stringshare *dir; 54 Efreet_Desktop *desktop; 55 }; 56 57 struct _E_Module_Api 58 { 59 int version; 60 const char *name; 61 }; 62 63 EINTERN int e_module_init(void); 64 EINTERN int e_module_shutdown(void); 65 66 E_API void e_module_all_load(void); 67 E_API E_Module *e_module_new(const char *name); 68 E_API int e_module_save(E_Module *m); 69 E_API const char *e_module_dir_get(E_Module *m); 70 E_API int e_module_enable(E_Module *m); 71 E_API int e_module_disable(E_Module *m); 72 E_API int e_module_enabled_get(E_Module *m); 73 E_API int e_module_save_all(void); 74 E_API E_Module *e_module_find(const char *name); 75 E_API Eina_List *e_module_list(void); 76 E_API Eina_List *e_module_desktop_list(void); 77 E_API void e_module_desktop_free(E_Module_Desktop *md); 78 E_API void e_module_dialog_show(E_Module *m, const char *title, const char *body); 79 E_API Eina_Bool e_module_loading_get(void); 80 #endif 81 #endif 82