From 00680f802d679f7a03e5f31d81ca587ea4b85766 Mon Sep 17 00:00:00 2001 From: handyande Date: Fri, 3 Jun 2005 18:26:35 +0000 Subject: [PATCH] Flesh out rest of dir_list API SVN revision: 15099 --- src/bin/e_ipc_handlers.h | 10 +++--- src/lib/E.h | 15 ++++++-- src/lib/e_main.c | 75 +++++++++++++++++++++++++++++++++------- 3 files changed, 80 insertions(+), 20 deletions(-) diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 7519b497a..caa3997e1 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -576,17 +576,17 @@ break; } if (!strcmp(type, "data")) - res = 0; + res = E_RESPONSE_DATA_DIRS_LIST; else if (!strcmp(type, "images")) - res = 0; + res = E_RESPONSE_IMAGE_DIRS_LIST; else if (!strcmp(type, "fonts")) - res = 0; + res = E_RESPONSE_FONT_DIRS_LIST; else if (!strcmp(type, "themes")) res = E_RESPONSE_THEME_DIRS_LIST; else if (!strcmp(type, "init")) - res = 0; + res = E_RESPONSE_INIT_DIRS_LIST; else if (!strcmp(type, "icons")) - res = 0; + res = E_RESPONSE_ICON_DIRS_LIST; else if (!strcmp(type, "modules")) res = E_RESPONSE_MODULE_DIRS_LIST; else if (!strcmp(type, "backgrounds")) diff --git a/src/lib/E.h b/src/lib/E.h index 2c8406346..52a35db23 100644 --- a/src/lib/E.h +++ b/src/lib/E.h @@ -50,9 +50,15 @@ struct _E_Response_Background_Get extern EAPI int E_RESPONSE_MODULE_LIST; extern EAPI int E_RESPONSE_BACKGROUND_GET; + +extern EAPI int E_RESPONSE_DATA_DIRS_LIST; +extern EAPI int E_RESPONSE_IMAGE_DIRS_LIST; +extern EAPI int E_RESPONSE_FONT_DIRS_LIST; +extern EAPI int E_RESPONSE_THEME_DIRS_LIST; +extern EAPI int E_RESPONSE_INIT_DIRS_LIST; +extern EAPI int E_RESPONSE_ICON_DIRS_LIST; extern EAPI int E_RESPONSE_MODULE_DIRS_LIST; extern EAPI int E_RESPONSE_BACKGROUND_DIRS_LIST; -extern EAPI int E_RESPONSE_THEME_DIRS_LIST; #ifdef __cplusplus extern "C" { @@ -76,9 +82,14 @@ extern "C" { EAPI void e_background_get (void); /* E path information */ + EAPI void e_data_dirs_list (void); + EAPI void e_image_dirs_list (void); + EAPI void e_font_dirs_list (void); + EAPI void e_theme_dirs_list (void); + EAPI void e_init_dirs_list (void); + EAPI void e_icon_dirs_list (void); EAPI void e_module_dirs_list (void); EAPI void e_background_dirs_list (void); - EAPI void e_theme_dirs_list (void); #ifdef __cplusplus } diff --git a/src/lib/e_main.c b/src/lib/e_main.c index 0d9e6ed9b..db40a65d1 100644 --- a/src/lib/e_main.c +++ b/src/lib/e_main.c @@ -63,10 +63,17 @@ static void _e_cb_theme_dir_list_free(void *data __UNUSED__, void *ev); static Ecore_Ipc_Server *_e_ipc_server = NULL; int E_RESPONSE_MODULE_LIST = 0; -int E_RESPONSE_MODULE_DIRS_LIST = 0; int E_RESPONSE_BACKGROUND_GET = 0; -int E_RESPONSE_BACKGROUND_DIRS_LIST = 0; + +int E_RESPONSE_DATA_DIRS_LIST = 0; +int E_RESPONSE_IMAGE_DIRS_LIST = 0; +int E_RESPONSE_FONT_DIRS_LIST = 0; int E_RESPONSE_THEME_DIRS_LIST = 0; +int E_RESPONSE_INIT_DIRS_LIST = 0; +int E_RESPONSE_ICON_DIRS_LIST = 0; +int E_RESPONSE_MODULE_DIRS_LIST = 0; +int E_RESPONSE_BACKGROUND_DIRS_LIST = 0; + /* * initialise connection to the current E running on "display". @@ -140,10 +147,17 @@ e_init(const char* display) if (!E_RESPONSE_MODULE_LIST) { E_RESPONSE_MODULE_LIST = ecore_event_type_new(); - E_RESPONSE_MODULE_DIRS_LIST = ecore_event_type_new(); E_RESPONSE_BACKGROUND_GET = ecore_event_type_new(); - E_RESPONSE_BACKGROUND_DIRS_LIST = ecore_event_type_new(); + + E_RESPONSE_DATA_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_IMAGE_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_FONT_DIRS_LIST = ecore_event_type_new(); E_RESPONSE_THEME_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_INIT_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_ICON_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_MODULE_DIRS_LIST = ecore_event_type_new(); + E_RESPONSE_BACKGROUND_DIRS_LIST = ecore_event_type_new(); + } if (free_disp) @@ -208,13 +222,6 @@ e_module_list(void) _e_ipc_call(E_IPC_OP_MODULE_LIST, NULL); } -void -e_module_dirs_list(void) -{ - char *type = "modules"; - _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); -} - void e_background_set(const char *bgfile) { @@ -231,9 +238,23 @@ e_background_get(void) } void -e_background_dirs_list(void) +e_data_dirs_list(void) { - char *type = "backgrounds"; + char *type = "data"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + +void +e_image_dirs_list(void) +{ + char *type = "images"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + +void +e_font_dirs_list(void) +{ + char *type = "fonts"; _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); } @@ -244,6 +265,34 @@ e_theme_dirs_list(void) _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); } +void +e_init_dirs_list(void) +{ + char *type = "inits"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + +void +e_icon_dirs_list(void) +{ + char *type = "icons"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + +void +e_module_dirs_list(void) +{ + char *type = "modules"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + +void +e_background_dirs_list(void) +{ + char *type = "backgrounds"; + _e_ipc_call(E_IPC_OP_DIRS_LIST, &type); +} + static int _e_ipc_init(const char *display) {