Flesh out rest of dir_list API

SVN revision: 15099
This commit is contained in:
handyande 2005-06-03 18:26:35 +00:00 committed by handyande
parent bb21b7c1e8
commit 00680f802d
3 changed files with 80 additions and 20 deletions

View File

@ -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"))

View File

@ -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
}

View File

@ -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)
{