Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_border.h e_config.c e_config.h e_focus.c e_focus.h e_ipc.c e_ipc.h e_remote_main.c Log Message: some virtualisation of focus =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.216 retrieving revision 1.217 diff -u -3 -r1.216 -r1.217 --- e_border.c 20 May 2005 05:13:45 -0000 1.216 +++ e_border.c 20 May 2005 07:32:42 -0000 1.217 @@ -1399,6 +1399,11 @@ if (move == bd) _e_border_move_end(bd); + if (bd->raise_timer) + { + ecore_timer_del(bd->raise_timer); + bd->raise_timer = NULL; + } while (bd->pending_move_resize) { free(bd->pending_move_resize->data); @@ -2329,7 +2334,9 @@ { /* FIXME: this would normally put focus on the client on pointer */ /* focus - but click to focus it wouldnt */ - e_border_focus_set(bd, 1, 1); + e_focus_event_mouse_in(bd); +// e_border_focus_set(bd, 1, 1); +// e_border_raise(bd); } if (ev->win != bd->event_win) return 1; bd->mouse.current.mx = ev->root.x; @@ -2395,7 +2402,8 @@ if ((ev->mode == ECORE_X_EVENT_MODE_NORMAL) && (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR)) return 1; - e_border_focus_set(bd, 0, 1); + e_focus_event_mouse_out(bd); + //e_border_focus_set(bd, 0, 1); } if (ev->win != bd->event_win) return 1; bd->mouse.current.mx = ev->root.x; @@ -2415,22 +2423,25 @@ bd = data; if (ev->event_win == bd->win) { - if ((ev->button >= 1) && (ev->button <= 3)) + if(!e_focus_event_mouse_down(bd)) { - bd->mouse.last_down[ev->button - 1].mx = ev->root.x; - bd->mouse.last_down[ev->button - 1].my = ev->root.y; - bd->mouse.last_down[ev->button - 1].x = bd->x; - bd->mouse.last_down[ev->button - 1].y = bd->y; - bd->mouse.last_down[ev->button - 1].w = bd->w; - bd->mouse.last_down[ev->button - 1].h = bd->h; - } - bd->mouse.current.mx = ev->root.x; - bd->mouse.current.my = ev->root.y; - if (!bd->cur_mouse_action) - { - bd->cur_mouse_action = - e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_BORDER, - E_OBJECT(bd), ev); + if ((ev->button >= 1) && (ev->button <= 3)) + { + bd->mouse.last_down[ev->button - 1].mx = ev->root.x; + bd->mouse.last_down[ev->button - 1].my = ev->root.y; + bd->mouse.last_down[ev->button - 1].x = bd->x; + bd->mouse.last_down[ev->button - 1].y = bd->y; + bd->mouse.last_down[ev->button - 1].w = bd->w; + bd->mouse.last_down[ev->button - 1].h = bd->h; + } + bd->mouse.current.mx = ev->root.x; + bd->mouse.current.my = ev->root.y; + if (!bd->cur_mouse_action) + { + bd->cur_mouse_action = + e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_BORDER, + E_OBJECT(bd), ev); + } } } if (ev->win != bd->event_win) return 1; @@ -2473,29 +2484,32 @@ bd = data; if (ev->event_win == bd->win) { - if ((ev->button >= 1) && (ev->button <= 3)) + if(!e_focus_event_mouse_up(bd)) { - bd->mouse.last_up[ev->button - 1].mx = ev->root.x; - bd->mouse.last_up[ev->button - 1].my = ev->root.y; - bd->mouse.last_up[ev->button - 1].x = bd->x; - bd->mouse.last_up[ev->button - 1].y = bd->y; - } - bd->mouse.current.mx = ev->root.x; - bd->mouse.current.my = ev->root.y; - /* bug/problem. this action COULD be deleted during a move */ - /* ... VERY unlikely though... VERY */ - /* also we dont pass the same params that went in - then again that */ - /* should be ok as we are just ending the action if it has an end */ - if (bd->cur_mouse_action) - { - if (bd->cur_mouse_action->func.end_mouse) - bd->cur_mouse_action->func.end_mouse(E_OBJECT(bd), "", ev); - else if (bd->cur_mouse_action->func.end) - bd->cur_mouse_action->func.end(E_OBJECT(bd), ""); - bd->cur_mouse_action = NULL; + if ((ev->button >= 1) && (ev->button <= 3)) + { + bd->mouse.last_up[ev->button - 1].mx = ev->root.x; + bd->mouse.last_up[ev->button - 1].my = ev->root.y; + bd->mouse.last_up[ev->button - 1].x = bd->x; + bd->mouse.last_up[ev->button - 1].y = bd->y; + } + bd->mouse.current.mx = ev->root.x; + bd->mouse.current.my = ev->root.y; + /* bug/problem. this action COULD be deleted during a move */ + /* ... VERY unlikely though... VERY */ + /* also we dont pass the same params that went in - then again that */ + /* should be ok as we are just ending the action if it has an end */ + if (bd->cur_mouse_action) + { + if (bd->cur_mouse_action->func.end_mouse) + bd->cur_mouse_action->func.end_mouse(E_OBJECT(bd), "", ev); + else if (bd->cur_mouse_action->func.end) + bd->cur_mouse_action->func.end(E_OBJECT(bd), ""); + bd->cur_mouse_action = NULL; + } + else + e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), ev); } - else - e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), ev); } if (ev->win != bd->event_win) return 1; if ((ev->button >= 1) && (ev->button <= 3)) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -3 -r1.56 -r1.57 --- e_border.h 20 May 2005 05:13:45 -0000 1.56 +++ e_border.h 20 May 2005 07:32:42 -0000 1.57 @@ -26,6 +26,13 @@ E_STACKING_BELOW } E_Stacking; +typedef enum _E_Focus_Policy +{ + E_FOCUS_FOLLOW_MOUSE = 1 << 0, + E_FOCUS_AUTORAISE = 1 << 1 +} E_Focus_Policy; + + typedef struct _E_Border E_Border; typedef struct _E_Border_Pending_Move_Resize E_Border_Pending_Move_Resize; typedef struct _E_Event_Border_Resize E_Event_Border_Resize; @@ -229,6 +236,7 @@ unsigned int layer; E_Action *cur_mouse_action; + Ecore_Timer *raise_timer; }; struct _E_Border_Pending_Move_Resize =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -3 -r1.50 -r1.51 --- e_config.c 20 May 2005 03:09:43 -0000 1.50 +++ e_config.c 20 May 2005 07:32:42 -0000 1.51 @@ -200,6 +200,8 @@ e_config->evas_engine_popups = E_EVAS_ENGINE_DEFAULT; e_config->evas_engine_drag = E_EVAS_ENGINE_DEFAULT; e_config->language = strdup(""); + e_config->focus_policy = E_FOCUS_FOLLOW_MOUSE; + e_config->raise_timer = 0; { E_Config_Module *em; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- e_config.h 20 May 2005 03:09:44 -0000 1.23 +++ e_config.h 20 May 2005 07:32:42 -0000 1.24 @@ -36,6 +36,7 @@ typedef struct _E_Config_Theme E_Config_Theme; typedef struct _E_Config_Binding_Mouse E_Config_Binding_Mouse; typedef struct _E_Config_Binding_Key E_Config_Binding_Key; +typedef struct _E_Config_Focus_Policy E_Config_Focus_Policy; typedef Eet_Data_Descriptor E_Config_DD; #else @@ -93,7 +94,9 @@ Evas_List *path_append_icons; Evas_List *path_append_modules; Evas_List *path_append_backgrounds; - + E_Focus_Policy focus_policy; + int raise_timer; + }; struct _E_Config_Module @@ -128,6 +131,14 @@ unsigned char any_mod; }; +struct _E_Config_Focus_Policy +{ + E_Focus_Policy focus_policy; + int raise_timer; +}; + + + EAPI int e_config_init(void); EAPI int e_config_shutdown(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_focus.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- e_focus.c 12 May 2005 13:55:13 -0000 1.7 +++ e_focus.c 20 May 2005 07:32:42 -0000 1.8 @@ -6,10 +6,13 @@ /* local subsystem functions */ static int _e_focus_cb_window_focus_in(void *data, int ev_type, void *ev); static int _e_focus_cb_window_focus_out(void *data, int ev_type, void *ev); +static int _e_focus_cb_mouse_button_down(void *data, int ev_type, void *ev); +static int _e_focus_raise_timer(void* data); /* local subsystem globals */ static Ecore_Event_Handler *_e_focus_focus_in_handler = NULL; static Ecore_Event_Handler *_e_focus_focus_out_handler = NULL; +static Ecore_Event_Handler *_e_focus_mouse_down_handler = NULL; /* externally accessible functions */ int @@ -17,6 +20,10 @@ { _e_focus_focus_in_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, _e_focus_cb_window_focus_in, NULL); _e_focus_focus_out_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, _e_focus_cb_window_focus_out, NULL); +// _e_focus_mouse_down_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, +// _e_focus_cb_mouse_button_down, NULL); + + return 1; } @@ -25,6 +32,7 @@ { E_FN_DEL(ecore_event_handler_del, _e_focus_focus_in_handler); E_FN_DEL(ecore_event_handler_del, _e_focus_focus_out_handler); + E_FN_DEL(ecore_event_handler_del, _e_focus_mouse_down_handler); return 1; } @@ -34,6 +42,56 @@ return; } +int +e_focus_event_mouse_in(E_Border* bd) +{ + /* If focus follows mouse */ + if( e_config->focus_policy & E_FOCUS_FOLLOW_MOUSE) + e_border_focus_set(bd, 1, 1); + + bd->raise_timer = NULL; + if (e_config->focus_policy & E_FOCUS_AUTORAISE) + { + if (e_config->raise_timer == 0) + e_border_raise(bd); + else + bd->raise_timer = ecore_timer_add((double)e_config->raise_timer / 10.0, + _e_focus_raise_timer, bd); + } + return 0; +} + +int +e_focus_event_mouse_out(E_Border* bd) +{ + /* If focus follows mouse */ + if (e_config->focus_policy & E_FOCUS_FOLLOW_MOUSE) + e_border_focus_set(bd, 0, 1); + + if (bd->raise_timer != NULL) + { + ecore_timer_del(bd->raise_timer); + bd->raise_timer = NULL; + } + return 0; +} + +int +e_focus_event_mouse_down(E_Border* bd) +{ + if (!(e_config->focus_policy & E_FOCUS_FOLLOW_MOUSE)) + { + e_border_focus_set(bd, 1, 1); + e_border_raise(bd); + } + return 0; +} + +int +e_focus_event_mouse_up(E_Border* bd) +{ + return 0; +} /* local subsystem functions */ @@ -120,3 +178,44 @@ #endif return 1; } + + +static int +_e_focus_cb_mouse_button_down(void *data, int ev_type, void *ev) +{ + Ecore_X_Event_Mouse_Button_Down* e; + E_Border* bd = NULL; + + e = ev; + + fprintf(stderr,"%s, %p\n",__FUNCTION__, e->win); + + bd = e_border_find_by_client_window(e->win); + if (!bd) + bd = e_border_find_by_window(e->win); + if (!bd) + bd = e_border_find_by_frame_window(e->win); + + if (!bd) + bd = e_border_find_by_client_window(e->event_win); + if (!bd) + bd = e_border_find_by_window(e->event_win); + if (!bd) + bd = e_border_find_by_frame_window(e->event_win); + + fprintf(stderr,"bd = %p\n", bd); + + if (bd) + e_focus_event_mouse_down(bd); + + return 1; +} + +static int +_e_focus_raise_timer(void* data) +{ + e_border_raise((E_Border*)data); + ((E_Border*)data)->raise_timer = NULL; + return 0; +} + =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_focus.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_focus.h 7 Feb 2005 13:51:09 -0000 1.4 +++ e_focus.h 20 May 2005 07:32:42 -0000 1.5 @@ -9,6 +9,11 @@ EAPI int e_focus_init(void); EAPI int e_focus_shutdown(void); EAPI void e_focus_idler_before(void); + +EAPI int e_focus_event_mouse_in(E_Border* bd); +EAPI int e_focus_event_mouse_out(E_Border* bd); +EAPI int e_focus_event_mouse_down(E_Border* bd); +EAPI int e_focus_event_mouse_up(E_Border* bd); #endif #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- e_ipc.c 20 May 2005 03:09:44 -0000 1.27 +++ e_ipc.c 20 May 2005 07:32:42 -0000 1.28 @@ -27,6 +27,8 @@ ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_key_binding_enc); ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_key_binding_dec); ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_path_list_enc); +ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_focus_policy_enc); +ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_focus_policy_dec); /* local subsystem globals */ static Ecore_Ipc_Server *_e_ipc_server = NULL; @@ -735,8 +737,37 @@ e_config->zone_desks_y_count, E_IPC_OP_DESKS_GET_REPLY); break; - - /* Module PATH IPC */ + case E_IPC_OP_FOCUS_POLICY_SET: + { + E_Config_Focus_Policy policy; + + _e_ipc_focus_policy_dec(e->data, e->size, &policy); + e_config->focus_policy = policy.focus_policy; + e_config->raise_timer = policy.raise_timer; + + } + break; + case E_IPC_OP_FOCUS_POLICY_GET: + { + int bytes; + E_Config_Focus_Policy policy; + char *data; + + policy.focus_policy = e_config->focus_policy; + policy.raise_timer = e_config->raise_timer; + + data = _e_ipc_focus_policy_enc(&policy, &bytes); + + ecore_ipc_client_send(e->client, + E_IPC_DOMAIN_REPLY, + E_IPC_OP_FOCUS_POLICY_GET_REPLY, + 0, 0, 0, + data, bytes); + + free(data); + + } + break; case E_IPC_OP_MODULE_DIRS_LIST: { Evas_List *dir_list; @@ -1488,3 +1519,22 @@ ECORE_IPC_PUTS(dir, l1); ECORE_IPC_ENC_EVAS_LIST_FOOT(); } + +ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_focus_policy_enc) +{ + ECORE_IPC_ENC_STRUCT_HEAD(E_Config_Focus_Policy, + 1 + 4); + ECORE_IPC_PUT8(focus_policy); + ECORE_IPC_PUT32(raise_timer); + ECORE_IPC_ENC_STRUCT_FOOT(); +} + +ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_focus_policy_dec) +{ + ECORE_IPC_DEC_STRUCT_HEAD_MIN(E_Config_Focus_Policy, + 1 + 4); + ECORE_IPC_CHEKS(); + ECORE_IPC_GET8(focus_policy); + ECORE_IPC_GET32(raise_timer); + ECORE_IPC_DEC_STRUCT_FOOT(); +} =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- e_ipc.h 20 May 2005 03:09:44 -0000 1.17 +++ e_ipc.h 20 May 2005 07:32:42 -0000 1.18 @@ -149,6 +149,11 @@ E_IPC_OP_DESKS_SET, E_IPC_OP_DESKS_GET, E_IPC_OP_DESKS_GET_REPLY, + + E_IPC_OP_FOCUS_POLICY_SET, + E_IPC_OP_FOCUS_POLICY_GET, + E_IPC_OP_FOCUS_POLICY_GET_REPLY, + E_IPC_OP_LAST /* FIXME: add ipc: */ /* get list of actions */ =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_remote_main.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- e_remote_main.c 20 May 2005 03:09:44 -0000 1.27 +++ e_remote_main.c 20 May 2005 07:32:42 -0000 1.28 @@ -43,6 +43,8 @@ ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_key_binding_enc); ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_key_binding_dec); ECORE_IPC_DEC_EVAS_LIST_PROTO(_e_ipc_path_list_dec); +ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_focus_policy_enc); +ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_focus_policy_dec); /* local subsystem globals */ static Ecore_Ipc_Server *_e_ipc_server = NULL; @@ -240,6 +242,82 @@ free(data); } +static void _e_opt_focus_policy_parse(E_Config_Focus_Policy* policy, char **params) +{ + /* M1[|M2...] */ + { + char *p, *pp; + + policy->focus_policy = 0; + pp = params[0]; + for (;;) + { + p = strchr(pp, '|'); + if (p) + { + if (!strncmp(pp, "FOLLOW|", 7)) + policy->focus_policy |= E_FOCUS_FOLLOW_MOUSE; + else if (!strncmp(pp, "CLICK|", 6)) + policy->focus_policy &= + ~(E_FOCUS_FOLLOW_MOUSE | E_FOCUS_AUTORAISE); + else if (!strncmp(pp, "AUTORAISE|", 10)) + policy->focus_policy |= E_FOCUS_AUTORAISE; + else if (strlen(pp) > 0) + { + printf("OPT1 option. Must be or mask of:\n" + " FOLLOW CLICK AUTORAISE\n"); + exit(-1); + } + pp = p + 1; + } + else + { + if (!strcmp(pp, "FOLLOW")) + policy->focus_policy |= E_FOCUS_FOLLOW_MOUSE; + else if (!strcmp(pp, "CLICK")) + policy->focus_policy &= + ~(E_FOCUS_FOLLOW_MOUSE | E_FOCUS_AUTORAISE); + else if (!strcmp(pp, "AUTORAISE")) + policy->focus_policy |= E_FOCUS_AUTORAISE; + else if (strlen(pp) > 0) + { + printf("OPT1 option. Must be or mask of:\n" + " FOLLOW CLICK AUTORAISE\n"); + exit(-1); + } + break; + } + } + } + + if(params[1][0] != 0) + policy->raise_timer = atoi(params[1]); + else if(policy->focus_policy & E_FOCUS_AUTORAISE) + { + printf("OPT2 option is should be seted, if you use AUTORAISE.\n"); + } + +} + + +static void +_e_opt_focus_policy_set(char** params) +{ + E_Config_Focus_Policy policy; + int bytes; + char *data; + + _e_opt_focus_policy_parse(&policy, params); + data = _e_ipc_focus_policy_enc(&policy, &bytes); + ecore_ipc_server_send(_e_ipc_server, + E_IPC_DOMAIN_REQUEST, + E_IPC_OP_FOCUS_POLICY_SET, + 0, 0, 0, + data, bytes); + + free(data); +} + #define SIMPLE_REQ 0 #define SIMPLE_STR_REQ 1 #define FULL_FUNC 2 @@ -263,7 +341,7 @@ 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), + 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), @@ -293,19 +371,19 @@ 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-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-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-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-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), @@ -315,7 +393,7 @@ 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), + 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), @@ -343,7 +421,11 @@ ODBL("-edge-flip_timeout-set", "Set the edge flip timeout (sec)", E_IPC_OP_EDGE_FLIP_TIMEOUT_SET, 0), 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) + OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_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 = Policy. OPT2 = Raise Time.", 2, _e_opt_focus_policy_set, 0), + OREQ("-focus-policy-get", "Get focus policy.", E_IPC_OP_FOCUS_POLICY_GET, 1) }; /* externally accessible functions */ @@ -1027,6 +1109,16 @@ printf("REPLY: %i %i\n", val1, val2); } break; + case E_IPC_OP_FOCUS_POLICY_GET_REPLY: + if(e->data) + { + E_Config_Focus_Policy policy; + + if(_e_ipc_focus_policy_dec(e->data, e->size, &policy)) + printf("REPLY: %i %i\n", policy.focus_policy, policy.raise_timer); + } + break; + default: break; } @@ -1283,3 +1375,22 @@ ECORE_IPC_GETS(dir); ECORE_IPC_DEC_EVAS_LIST_FOOT(); } + +ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_focus_policy_enc) +{ + ECORE_IPC_ENC_STRUCT_HEAD(E_Config_Focus_Policy, + 1 + 4); + ECORE_IPC_PUT8(focus_policy); + ECORE_IPC_PUT32(raise_timer); + ECORE_IPC_ENC_STRUCT_FOOT(); +} + +ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_focus_policy_dec) +{ + ECORE_IPC_DEC_STRUCT_HEAD_MIN(E_Config_Focus_Policy, + 1 + 4); + ECORE_IPC_CHEKS(); + ECORE_IPC_GET8(focus_policy); + ECORE_IPC_GET32(raise_timer); + ECORE_IPC_DEC_STRUCT_FOOT(); +} ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs