- add -focus-policy-set/get back into e_remote. CLICK dosen't seem to be

working correctly. It changes the focus policy, but clicking dosen't
  change focus.
- removed finished ops from the old op list of e_remote to make it easer to
  keep track of what still has to be implemented


SVN revision: 15121
This commit is contained in:
Dan Sinclair 2005-06-04 18:57:14 +00:00 committed by Dan Sinclair
parent 6c248ea656
commit 0eecbfd981
2 changed files with 100 additions and 35 deletions

View File

@ -34,7 +34,17 @@ case HDL: \
if (e->data) { \
double __dbl = 0.0; \
if (e_ipc_codec_double_dec(e->data, e->size, &(__dbl))) {
# define END_DOUBLE() \
# define END_DOUBLE \
} \
} \
break;
# define START_INT(__int, HDL) \
case HDL: \
if (e->data) { \
int __int = 0; \
if (e_ipc_codec_int_dec(e->data, e->size, &(__int))) {
# define END_INT \
} \
} \
break;
@ -58,7 +68,7 @@ case HDL: { void *data; int bytes; \
} \
break;
#define REQ_DOUBLE(__dbl, HDL) \
# define REQ_DOUBLE(__dbl, HDL) \
case HDL: { void *data; int bytes; \
data = e_ipc_codec_double_enc(__dbl, &bytes); \
if (data) { \
@ -68,6 +78,22 @@ case HDL: { void *data; int bytes; \
} \
break;
# define REQ_INT_START(HDL) \
case HDL: { void *data; int bytes;
# define REQ_INT_END(__int, HDL) \
data = e_ipc_codec_int_enc(__int, &bytes); \
if (data) { \
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, data, bytes); \
free(data); \
} \
} \
break;
# define REQ_INT(__int, HDL) \
REQ_INT_START(__int, HDL) \
REQ_INT_END(HDL)
# define REQ_NULL(HDL) \
case HDL: \
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, NULL, 0); \
@ -138,6 +164,16 @@ case HDL: { void *data; int bytes; \
} \
break;
# define SEND_INT(__int, __op, HDL) \
case HDL: { void *data; int bytes; \
data = e_ipc_codec_int_enc(__int, &bytes); \
if (data) { \
ecore_ipc_client_send(e->client, E_IPC_DOMAIN_REPLY, __op, 0, 0, 0, data, bytes); \
free(data); \
} \
} \
break;
#define LIST_DATA() \
Evas_List *dat = NULL, *l; \
void *data; int bytes;
@ -608,8 +644,8 @@ break;
#elif (TYPE == E_WM_IN)
START_DOUBLE(dbl, HDL);
e_config->framerate = dbl;
e_config_save_queue();
END_DOUBLE();
SAVE;
END_DOUBLE;
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
@ -634,7 +670,7 @@ break;
#elif (TYPE == E_REMOTE_IN)
START_DOUBLE(fps, HDL);
printf("REPLY: %3.3f\n", fps);
END_DOUBLE();
END_DOUBLE;
#endif
#undef HDL
@ -648,8 +684,8 @@ break;
#elif (TYPE == E_WM_IN)
START_DOUBLE(dbl, HDL);
e_config->menus_scroll_speed = dbl;
e_config_save_queue();
END_DOUBLE();
SAVE;
END_DOUBLE;
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
@ -661,7 +697,7 @@ break;
#elif (TYPE == E_REMOTE_OUT)
REQ_NULL(HDL);
#elif (TYPE == E_WM_IN)
SEND_DOUBLE(e_config->menus_scroll_speed, E_IPC_OP_MENUS_SCROLL_SPEED_GET_REPLY, HDL);
SEND_DOUBLE(e_config->menus_scroll_speed, E_IPC_OP_MENUS_SCROLL_SPEED_GET_REPLY, HDL)
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
@ -674,7 +710,62 @@ break;
#elif (TYPE == E_REMOTE_IN)
START_DOUBLE(speed, HDL);
printf("REPLY: %3.3f\n", speed);
END_DOUBLE();
END_DOUBLE;
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_FOCUS_POLICY_SET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-focus-policy-set", 1, "Set the focus policy. OPT1 = CLICK or MOUSE or SLOPPY", 0, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_INT_START(HDL)
int value = 0;
if (!strcmp(params[0], "MOUSE")) value = E_FOCUS_MOUSE;
else if (!strcmp(params[0], "CLICK")) value = E_FOCUS_CLICK;
else if (!strcmp(params[0], "SLOPPY")) value = E_FOCUS_SLOPPY;
else
{
printf("focus must be MOUSE, CLICK or SLOPPY\n");
exit(-1);
}
REQ_INT_END(value, HDL);
#elif (TYPE == E_WM_IN)
START_INT(value, HDL);
e_config->focus_policy = value;
SAVE;
END_INT
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_FOCUS_POLICY_GET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-focus-policy-get", 0, "Get focus policy", 1, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_NULL(HDL);
#elif (TYPE == E_WM_IN)
SEND_INT(e_config->focus_policy, E_IPC_OP_FOCUS_POLICY_GET_REPLY, HDL);
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_FOCUS_POLICY_GET_REPLY
#if (TYPE == E_REMOTE_OPTIONS)
#elif (TYPE == E_REMOTE_OUT)
#elif (TYPE == E_WM_IN)
#elif (TYPE == E_REMOTE_IN)
START_INT(policy, HDL);
if (policy == E_FOCUS_MOUSE)
printf("REPLY: MOUSE\n");
else if (policy == E_FOCUS_CLICK)
printf("REPLY: CLICK\n");
else if (policy == E_FOCUS_SLOPPY)
printf("REPLY: SLOPPY\n");
END_INT
#endif
#undef HDL

View File

@ -565,26 +565,14 @@ _e_opt_focus_policy_set(char **params)
E_IPC_Opt_Handler handlers[] =
{
OSTR("-module-load", "Load module OPT1 into memory", E_IPC_OP_MODULE_LOAD, 0),
OSTR("-module-unload", "Unload (and disable) module OPT1 from memory", E_IPC_OP_MODULE_UNLOAD, 0),
OSTR("-module-enable", "Enable module OPT1 if not enabled", E_IPC_OP_MODULE_ENABLE, 0),
OSTR("-module-disable", "Disable module OPT1 if not disabled", E_IPC_OP_MODULE_DISABLE, 0),
OREQ("-module-list", "List all loaded modules and their states", E_IPC_OP_MODULE_LIST, 1),
OSTR("-bg-set", "Set the background edje file to be OPT1", E_IPC_OP_BG_SET, 0),
OREQ("-bg-get", "Get the background edje file", E_IPC_OP_BG_GET, 1),
OSTR("-font-fallback-remove", "Remove OPT1 from the fontset", E_IPC_OP_FONT_FALLBACK_REMOVE, 0),
OSTR("-font-fallback-prepend", "Prepend OPT1 to the fontset", E_IPC_OP_FONT_FALLBACK_PREPEND, 0),
OSTR("-font-fallback-append", "Append OPT1 to the fontset", E_IPC_OP_FONT_FALLBACK_APPEND, 0),
OREQ("-font-apply", "Apply changes made to the font system", E_IPC_OP_FONT_APPLY, 0),
OREQ("-font-fallback-list", "List the fallback fonts in order", E_IPC_OP_FONT_FALLBACK_LIST, 1),
OREQ("-font-available-list", "List available fonts", E_IPC_OP_FONT_AVAILABLE_LIST, 1),
OREQ("-font-fallback-clear", "Clear font fallback list", E_IPC_OP_FONT_FALLBACK_CLEAR, 0),
OSTR("-font-default-get", "List the default font associated with OPT1", E_IPC_OP_FONT_DEFAULT_GET, 1),
OSTR("-font-default-remove", "Remove the default text class OPT1", E_IPC_OP_FONT_DEFAULT_REMOVE, 0),
OREQ("-font-default-list", "List all configured text classes", E_IPC_OP_FONT_DEFAULT_LIST, 1),
OMUL("-font-default-set", "Set textclass (OPT1) font (OPT2) and size (OPT3)", E_IPC_OP_FONT_DEFAULT_SET, 0, 3),
OREQ("-restart", "Restart E17", E_IPC_OP_RESTART, 0),
OREQ("-shutdown", "Shutdown E17", E_IPC_OP_SHUTDOWN, 0),
OREQ("-lang-get", "Get the current language", E_IPC_OP_LANG_GET, 1),
OREQ("-lang-list", "List all available languages", E_IPC_OP_LANG_LIST, 1),
OSTR("-lang-set", "Set the current language", E_IPC_OP_LANG_SET, 0),
@ -594,40 +582,30 @@ E_IPC_Opt_Handler handlers[] =
OREQ("-binding-key-list", "List all key bindings", E_IPC_OP_BINDING_KEY_LIST, 1),
OFNC("-binding-key-add", "Add an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_add, 0),
OFNC("-binding-key-del", "Delete an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_del, 0),
OREQ("-module-dirs-list", "List all module directories", E_IPC_OP_MODULE_DIRS_LIST, 1),
OSTR("-module-dirs-append", "Append OPT1 to the user module path", E_IPC_OP_MODULE_DIRS_APPEND, 0),
OSTR("-module-dirs-prepend", "Prepend OPT1 to the user module path", E_IPC_OP_MODULE_DIRS_PREPEND, 0),
OSTR("-module-dirs-remove", "Remove OPT1 from the user module path", E_IPC_OP_MODULE_DIRS_REMOVE, 0),
OREQ("-data-dirs-list", "List all data directories", E_IPC_OP_DATA_DIRS_LIST, 1),
OSTR("-data-dirs-append", "Append OPT1 to the user data path", E_IPC_OP_DATA_DIRS_APPEND, 0),
OSTR("-data-dirs-prepend", "Prepend OPT1 to the user data path", E_IPC_OP_DATA_DIRS_PREPEND, 0),
OSTR("-data-dirs-remove", "Remove OPT1 from the user data path", E_IPC_OP_DATA_DIRS_REMOVE, 0),
OREQ("-font-dirs-list", "List all font directories", E_IPC_OP_FONT_DIRS_LIST, 1),
OSTR("-font-dirs-append", "Append OPT1 to the user font path", E_IPC_OP_FONT_DIRS_APPEND, 0),
OSTR("-font-dirs-prepend", "Prepend OPT1 to the user font path", E_IPC_OP_FONT_DIRS_PREPEND, 0),
OSTR("-font-dirs-remove", "Remove OPT1 from the user font path", E_IPC_OP_FONT_DIRS_REMOVE, 0),
OREQ("-theme-dirs-list", "List all theme directories", E_IPC_OP_THEME_DIRS_LIST, 1),
OSTR("-theme-dirs-append", "Append OPT1 to the user theme path", E_IPC_OP_THEME_DIRS_APPEND, 0),
OSTR("-theme-dirs-prepend", "Prepend OPT1 to the user theme path", E_IPC_OP_THEME_DIRS_PREPEND, 0),
OSTR("-theme-dirs-remove", "Remove OPT1 from the user theme path", E_IPC_OP_THEME_DIRS_REMOVE, 0),
OREQ("-init-dirs-list", "List all init directories", E_IPC_OP_INIT_DIRS_LIST, 1),
OSTR("-init-dirs-append", "Append OPT1 to the user init path", E_IPC_OP_INIT_DIRS_APPEND, 0),
OSTR("-init-dirs-prepend", "Prepend OPT1 to the user init path", E_IPC_OP_INIT_DIRS_PREPEND, 0),
OSTR("-init-dirs-remove", "Remove OPT1 from the user init path", E_IPC_OP_INIT_DIRS_REMOVE, 0),
OREQ("-icon-dirs-list", "List all icon directories", E_IPC_OP_ICON_DIRS_LIST, 1),
OSTR("-icon-dirs-append", "Append OPT1 to the user icon path", E_IPC_OP_ICON_DIRS_APPEND, 0),
OSTR("-icon-dirs-prepend", "Prepend OPT1 to the user icon path", E_IPC_OP_ICON_DIRS_PREPEND, 0),
OSTR("-icon-dirs-remove", "Remove OPT1 from the user icon path", E_IPC_OP_ICON_DIRS_REMOVE, 0),
OREQ("-image-dirs-list", "List all image directories", E_IPC_OP_IMAGE_DIRS_LIST, 1),
OSTR("-image-dirs-append", "Append OPT1 to the user image path", E_IPC_OP_IMAGE_DIRS_APPEND, 0),
OSTR("-image-dirs-prepend", "Prepend OPT1 to the user image path", E_IPC_OP_IMAGE_DIRS_PREPEND, 0),
OSTR("-image-dirs-remove", "Remove OPT1 from the user image path", E_IPC_OP_IMAGE_DIRS_REMOVE, 0),
OREQ("-bg-dirs-list", "List all background directories", E_IPC_OP_BG_DIRS_LIST, 1),
OSTR("-bg-dirs-append", "Append OPT1 to the user background path", E_IPC_OP_BG_DIRS_APPEND, 0),
OSTR("-bg-dirs-prepend", "Prepend OPT1 to the user background path", E_IPC_OP_BG_DIRS_PREPEND, 0),
OSTR("-bg-dirs-remove", "Remove OPT1 from the user background path", E_IPC_OP_BG_DIRS_REMOVE, 0),
ODBL("-menus-scroll-speed-set", "Set the scroll speed of menus (pixels/sec)", E_IPC_OP_MENUS_SCROLL_SPEED_SET, 0),
OREQ("-menus-scroll-speed-get", "Get the scroll speed of menus (pixels/sec)", E_IPC_OP_MENUS_SCROLL_SPEED_GET, 1),
ODBL("-menus-fast-move-threshhold-set", "Set the mouse speed in pixels per second that is considered a 'fast move'", E_IPC_OP_MENUS_FAST_MOVE_THRESHHOLD_SET, 0),
OREQ("-menus-fast-move-threshhold-get", "Get the mouse speed (pixels/sec) that is considered a fast move", E_IPC_OP_MENUS_FAST_MOVE_THRESHHOLD_GET, 1),
ODBL("-menus-click-drag-timeout-set", "Set the time (in seconds) between a mouse press and release that will keep the menu up anyway", E_IPC_OP_MENUS_CLICK_DRAG_TIMEOUT_SET, 0),
@ -638,8 +616,6 @@ E_IPC_Opt_Handler handlers[] =
OREQ("-border-shade-transition-get", "Get the above value", E_IPC_OP_BORDER_SHADE_TRANSITION_GET, 1),
ODBL("-border-shade-speed-set", "Set the shading speed (pixels/sec)", E_IPC_OP_BORDER_SHADE_SPEED_SET, 0),
OREQ("-border-shade-speed-get", "Get the shading speed", E_IPC_OP_BORDER_SHADE_SPEED_GET, 1),
ODBL("-framerate-set", "Set the animation framerate (fps)", E_IPC_OP_FRAMERATE_SET, 0),
OREQ("-framerate-get", "Get the animation framerate", E_IPC_OP_FRAMERATE_GET, 1),
OINT("-image-cache-set", "Set the speculative image cache size (Kb)", E_IPC_OP_IMAGE_CACHE_SET, 0),
OREQ("-image-cache-get", "Get the image cache size", E_IPC_OP_IMAGE_CACHE_GET, 1),
OINT("-font-cache-set", "Get the speculative font cache size (Kb)", E_IPC_OP_FONT_CACHE_SET, 0),
@ -650,8 +626,6 @@ E_IPC_Opt_Handler handlers[] =
OREQ("-edge-flip_timeout-get", "Get the edge flip timeout", E_IPC_OP_EDGE_FLIP_TIMEOUT_GET, 1),
O2INT("-desks-set", "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", E_IPC_OP_DESKS_SET, 0),
OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_GET, 1),
OFNC("-focus-policy-set", "Set focus policy. OPT1 = CLICK or MOUSE", 1, _e_opt_focus_policy_set, 0),
OREQ("-focus-policy-get", "Get focus policy.", E_IPC_OP_FOCUS_POLICY_GET, 1)
};
/* externally accessible functions */