Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_config.c e_config.h e_ipc_handlers.h e_ipc_handlers_list.h
Log Message:
get/set default engine and list.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -3 -r1.112 -r1.113
--- e_config.c 8 Oct 2005 15:06:53 -0000 1.112
+++ e_config.c 9 Oct 2005 19:42:24 -0000 1.113
@@ -1567,6 +1567,16 @@
E_FREE(homedir);
}
+Evas_List *
+e_config_engine_list(void)
+{
+ Evas_List *l = NULL;
+ l = evas_list_append(l, strdup("SOFTWARE"));
+ l = evas_list_append(l, strdup("GL"));
+ l = evas_list_append(l, strdup("XRENDER"));
+ return l;
+}
+
void
e_config_save_block_set(int block)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- e_config.h 3 Oct 2005 07:36:23 -0000 1.57
+++ e_config.h 9 Oct 2005 19:42:24 -0000 1.58
@@ -256,6 +256,8 @@
EAPI void e_config_profile_add(char *prof);
EAPI void e_config_profile_del(char *prof);
+EAPI Evas_List *e_config_engine_list(void);
+
EAPI void e_config_save_block_set(int block);
EAPI int e_config_save_block_get(void);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- e_ipc_handlers.h 9 Oct 2005 19:10:00 -0000 1.93
+++ e_ipc_handlers.h 9 Oct 2005 19:42:24 -0000 1.94
@@ -6380,3 +6380,97 @@
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_DEFAULT_ENGINE_SET
+#if (TYPE == E_REMOTE_OPTIONS)
+ OP("-default-engine-set", 1, "Set the default rendering engine to OPT1
(SOFTWARE, GLor XRENDER)", 0, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+ REQ_INT_START(HDL)
+ int value = 0;
+ if (!strcmp(params[0], "SOFTWARE")) value = E_EVAS_ENGINE_SOFTWARE_X11;
+ else if (!strcmp(params[0], "GL")) value = E_EVAS_ENGINE_GL_X11;
+ else if (!strcmp(params[0], "XRENDER")) value = E_EVAS_ENGINE_XRENDER_X11;
+ else
+ {
+ printf("engine must be SOFTWARE, GL or XRENDER\n");
+ exit(-1);
+ }
+ REQ_INT_END(value, HDL);
+#elif (TYPE == E_WM_IN)
+ START_INT(value, HDL);
+ e_config->evas_engine_default = value;
+ E_CONFIG_LIMIT(e_config->evas_engine_default, E_EVAS_ENGINE_SOFTWARE_X11,
E_EVAS_ENGINE_XRENDER_X11);
+ SAVE;
+ END_INT
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_DEFAULT_ENGINE_GET
+#if (TYPE == E_REMOTE_OPTIONS)
+ OP("-default-engine-get", 0, "Get the default rendering engine", 1, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+ REQ_NULL(HDL);
+#elif (TYPE == E_WM_IN)
+ SEND_INT(e_config->evas_engine_default, E_IPC_OP_DEFAULT_ENGINE_GET_REPLY,
HDL);
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_DEFAULT_ENGINE_GET_REPLY
+#if (TYPE == E_REMOTE_OPTIONS)
+#elif (TYPE == E_REMOTE_OUT)
+#elif (TYPE == E_WM_IN)
+#elif (TYPE == E_REMOTE_IN)
+ START_INT(engine, HDL);
+ if (engine == E_EVAS_ENGINE_SOFTWARE_X11)
+ printf("REPLY: SOFTWARE\n");
+ else if (engine == E_EVAS_ENGINE_GL_X11)
+ printf("REPLY: GL\n");
+ else if (engine == E_EVAS_ENGINE_XRENDER_X11)
+ printf("REPLY: XRENDER\n");
+ else
+ printf("REPLY: UNKNOWN ENGINE: %d\n", engine);
+ END_INT
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_ENGINE_LIST
+#if (TYPE == E_REMOTE_OPTIONS)
+ OP("-engine-list", 0, "List all existing rendering engines", 1, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+ REQ_NULL(HDL);
+#elif (TYPE == E_WM_IN)
+ GENERIC(HDL);
+ LIST_DATA();
+ Evas_List *engines;
+ engines = e_config_engine_list();
+ ENCODE(engines, e_ipc_codec_str_list_enc);
+ SEND_DATA(E_IPC_OP_ENGINE_LIST_REPLY);
+ FREE_LIST(engines);
+ END_GENERIC();
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_ENGINE_LIST_REPLY
+#if (TYPE == E_REMOTE_OPTIONS)
+#elif (TYPE == E_REMOTE_OUT)
+#elif (TYPE == E_WM_IN)
+#elif (TYPE == E_REMOTE_IN)
+ GENERIC(HDL);
+ LIST();
+ DECODE(e_ipc_codec_str_list_dec) {
+ FOR(dat) {
+ printf("REPLY: \"%s\"\n", (char *)(l->data));
+ }
+ FREE_LIST(dat);
+ }
+ END_GENERIC();
+#endif
+#undef HDL
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers_list.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- e_ipc_handlers_list.h 9 Oct 2005 19:10:00 -0000 1.32
+++ e_ipc_handlers_list.h 9 Oct 2005 19:42:24 -0000 1.33
@@ -309,3 +309,9 @@
#define E_IPC_OP_PROFILE_ADD 296
#define E_IPC_OP_PROFILE_DEL 297
+
+#define E_IPC_OP_DEFAULT_ENGINE_SET 298
+#define E_IPC_OP_DEFAULT_ENGINE_GET 299
+#define E_IPC_OP_DEFAULT_ENGINE_GET_REPLY 300
+#define E_IPC_OP_ENGINE_LIST 301
+#define E_IPC_OP_ENGINE_LIST_REPLY 302
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs