00001 #include "dEvian.h"
00002
00003
00004
00005
00006 E_Module_Api e_modapi =
00007 {
00008 E_MODULE_API_VERSION,
00009 "dEvian"
00010 };
00011
00012 void *
00013 e_modapi_init(E_Module *m)
00014 {
00015
00016 if (!devian_devian_main_init(m))
00017 return NULL;
00018 dEvianM->module = m;
00019
00020
00021 return dEvianM;
00022 }
00023
00024 int
00025 e_modapi_shutdown(E_Module *m)
00026 {
00027 dEvianM = m->data;
00028
00029 if (dEvianM)
00030 devian_devian_main_shutdown();
00031
00032 printf ("---END---\n");
00033
00034 return 1;
00035 }
00036
00037 int
00038 e_modapi_save(E_Module *m)
00039 {
00040 if (dEvianM->conf)
00041 devian_config_save();
00042
00043 e_config_domain_save("module.devian", dEvianM->conf_edd, dEvianM->conf);
00044 return 1;
00045 }
00046
00047 int
00048 e_modapi_info(E_Module *m)
00049 {
00050 char buf [DEVIAN_MAX_PATH];
00051
00052 snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
00053 m->icon_file = strdup(buf);
00054 return 1;
00055 }
00056
00057 int
00058 e_modapi_about(E_Module *m)
00059 {
00060 e_module_dialog_show(_("Enlightenment dEvian Module"),
00061 _("Module to display some informations / pictures on your desktop<br>"
00062 "with eye-candy effects<br><br>"
00063 "http://gouloum.zapto.org"));
00064 return 1;
00065 }
00066
00067 int
00068 e_modapi_config(E_Module *m)
00069 {
00070 if (!m) return 0;
00071 if (!m->data) return 0;
00072 if (!dEvianM) return 0;
00073 devian_config_dialog_main(e_container_current_get(e_manager_current_get()));
00074 return 1;
00075 }
00076
00077
00078