Here's the same patch again with the (redundant) desk_flip_complete E_Action removed.
This patch adds E_Action execution support to enlightenment_remote. I've tested it against CVS from this morning and it appears to apply cleanly. --Marc On 7/6/05, Marc McGarry <[EMAIL PROTECTED]> wrote: > All, > > Raster suggested that I use the E_Action system to change desks > instead of my current method of 5 parameters which I thought was > clunky. > > So I've added a generic IPC call to execute a named action, as well as > a new action which flips to a desk given the manager, container, zone, > row and column. > This IPC call executes E-Action.func.go exclusively, so it cannot be > used for mouse and keyboard actions I believe. > > The number of parameters is variable, but is interpreted as follows: > > 5 params: manager container zone row column > 4 params: container zone row column > 3 params: zone row column > 2 params: row column > 1 param: column > > I imagine this works correctly for parameters higher than 2, but I > don't have multihead or xinerama to test it here at work... > > I also don't know what would cause there to be more than one manager > in the managers_list (multiple X servers running Enlightenment?), so I > don't know how to tell if 5 params even works : ) > > Please let me know what you think, > Marc > > -- > http://www.diadems.com/ > 1 3 5 > 2 4 6 R > > > -- http://www.diadems.com/ 1 3 5 2 4 6 R
diff -u -r e/src/bin/e_ipc_handlers.h /home/mcgmar0u/source/e/src/bin/e_ipc_handlers.h --- e/src/bin/e_ipc_handlers.h 2005-07-06 13:17:03.000000000 -0500 +++ /home/mcgmar0u/source/e/src/bin/e_ipc_handlers.h 2005-07-06 14:05:30.000000000 -0500 @@ -4019,6 +4019,41 @@ #endif #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_EXEC_ACTION +#if (TYPE == E_REMOTE_OPTIONS) + OP("-exec-action", 2, "Executes an action given the name (OPT1) and a string of parameters (OPT2).", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_2STRING(params[0], params[1], HDL); +#elif (TYPE == E_WM_IN) + STRING2(actionName, paramList, e_2str, HDL); + { + Evas_List *m; + E_Manager *man; + E_Action + *act + ; + + man = NULL; + + m = e_manager_list(); + if (m) { + man = m->data; + + if (man) { + act = e_action_find(actionName); + + if (act && act->func.go) { + act->func.go(E_OBJECT(man), paramList); + } + } + } + } + END_STRING2(e_2str) +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + #if 0 } #endif diff -u -r e/src/bin/e_ipc_handlers_list.h /home/mcgmar0u/source/e/src/bin/e_ipc_handlers_list.h --- e/src/bin/e_ipc_handlers_list.h 2005-07-06 13:17:03.000000000 -0500 +++ /home/mcgmar0u/source/e/src/bin/e_ipc_handlers_list.h 2005-07-06 13:49:54.000000000 -0500 @@ -196,3 +196,4 @@ #define E_IPC_OP_FOCUS_SETTING_SET 196 #define E_IPC_OP_FOCUS_SETTING_GET 197 #define E_IPC_OP_FOCUS_SETTING_GET_REPLY 198 +#define E_IPC_OP_EXEC_ACTION 199