|
From: <enl...@li...> - 2005-09-28 22:47:12
|
Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_actions.h e_actions.c e_ipc_handlers.h e_ipc_handlers_list.h
Log Message:
List for known actions.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_actions.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- e_actions.h 22 Sep 2005 16:36:59 -0000 1.6
+++ e_actions.h 28 Sep 2005 22:47:07 -0000 1.7
@@ -31,6 +31,7 @@
EAPI int e_actions_init(void);
EAPI int e_actions_shutdown(void);
+EAPI Evas_List *e_action_name_list(void);
EAPI E_Action *e_action_add(char *name);
EAPI E_Action *e_action_find(char *name);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- e_actions.c 27 Sep 2005 11:26:41 -0000 1.32
+++ e_actions.c 28 Sep 2005 22:47:07 -0000 1.33
@@ -1143,8 +1143,37 @@
ecore_main_loop_quit();
}
+/***************************************************************************/
+ACT_FN_GO_SIGNAL(cursor)
+{
+ E_Manager *man = NULL;
+ E_Border *bd = NULL;
+
+ if (!obj) obj = E_OBJECT(e_border_focused_get());
+ if (!obj) return;
+ if (obj->type != E_BORDER_TYPE) return;
+
+ bd = (E_Border *)obj;
+ if ((!bd->zone) || (!bd->zone->container)) return;
+ man = bd->zone->container->manager;
+ if (!man) return;
+
+ if (params)
+ {
+ if (!strcmp(params, "end"))
+ e_pointer_window_default_set(man->pointer, man->root);
+ else
+ e_pointer_window_set(man->pointer, man->root, params);
+ }
+ else
+ {
+ e_pointer_window_default_set(man->pointer, man->root);
+ }
+}
+
/* local subsystem globals */
static Evas_Hash *actions = NULL;
+static Evas_List *action_names = NULL;
/* externally accessible functions */
@@ -1228,6 +1257,8 @@
ACT_GO(restart);
ACT_GO(exit);
+
+ ACT_GO_SIGNAL(cursor);
return 1;
}
@@ -1235,6 +1266,7 @@
int
e_actions_shutdown(void)
{
+ action_names = evas_list_free(action_names);
if (actions)
{
evas_hash_foreach(actions, _e_actions_cb_free, NULL);
@@ -1244,6 +1276,12 @@
return 1;
}
+Evas_List *
+e_action_name_list(void)
+{
+ return action_names;
+}
+
E_Action *
e_action_add(char *name)
{
@@ -1256,6 +1294,7 @@
if (!act) return NULL;
act->name = strdup(name);
actions = evas_hash_add(actions, name, act);
+ action_names = evas_list_append(action_names, name);
}
return act;
}
@@ -1275,6 +1314,7 @@
_e_action_free(E_Action *act)
{
actions = evas_hash_del(actions, act->name, act);
+ action_names = evas_list_remove(action_names, act->name);
E_FREE(act->name);
free(act);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- e_ipc_handlers.h 28 Sep 2005 20:06:49 -0000 1.91
+++ e_ipc_handlers.h 28 Sep 2005 22:47:07 -0000 1.92
@@ -6282,7 +6282,6 @@
#endif
#undef HDL
-
/****************************************************************************/
#define HDL E_IPC_OP_TRANSITION_LIST
#if (TYPE == E_REMOTE_OPTIONS)
@@ -6317,3 +6316,37 @@
#endif
#undef HDL
+/****************************************************************************/
+#define HDL E_IPC_OP_ACTION_LIST
+#if (TYPE == E_REMOTE_OPTIONS)
+ OP("-action-list", 0, "List all available actions", 1, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+ REQ_NULL(HDL);
+#elif (TYPE == E_WM_IN)
+ GENERIC(HDL);
+ LIST_DATA();
+ ENCODE(e_action_name_list(), e_ipc_codec_str_list_enc);
+ SEND_DATA(E_IPC_OP_ACTION_LIST_REPLY);
+ END_GENERIC();
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_ACTION_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.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- e_ipc_handlers_list.h 28 Sep 2005 18:57:56 -0000 1.30
+++ e_ipc_handlers_list.h 28 Sep 2005 22:47:07 -0000 1.31
@@ -303,3 +303,6 @@
#define E_IPC_OP_TRANSITION_LIST 292
#define E_IPC_OP_TRANSITION_LIST_REPLY 293
+
+#define E_IPC_OP_ACTION_LIST 294
+#define E_IPC_OP_ACTION_LIST_REPLY 295
|