Enlightenment CVS committal Author : raster 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 e_menu.c Log Message: auto scroll menu controls =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -3 -r1.90 -r1.91 --- e_config.c 21 Aug 2005 23:37:28 -0000 1.90 +++ e_config.c 22 Aug 2005 05:50:49 -0000 1.91 @@ -299,6 +299,8 @@ E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/ E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/ E_CONFIG_VAL(D, T, cursor_size, INT); /**/ + E_CONFIG_VAL(D, T, menu_autoscroll_margin, INT); /**/ + E_CONFIG_VAL(D, T, menu_autoscroll_cursor_margin, INT); /**/ e_config = e_config_domain_load("e", _e_config_edd); if (e_config) @@ -405,6 +407,8 @@ e_config->focus_last_focused_per_desktop = 1; e_config->focus_revert_on_hide_or_close = 1; e_config->cursor_size = 32; + e_config->menu_autoscroll_margin = 0; + e_config->menu_autoscroll_cursor_margin = 1; { E_Config_Module *em; @@ -962,7 +966,9 @@ E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1); E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1); E_CONFIG_LIMIT(e_config->cursor_size, 0, 1024); - + E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50); + E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50); + /* apply lang config - exception because config is loaded after intl setup */ if ((e_config->language) && (strlen(e_config->language) > 0)) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- e_config.h 21 Aug 2005 23:37:28 -0000 1.47 +++ e_config.h 22 Aug 2005 05:50:49 -0000 1.48 @@ -48,7 +48,7 @@ * defaults for e to work - started at 100 when we introduced this config * versioning feature */ -#define E_CONFIG_FILE_VERSION 122 +#define E_CONFIG_FILE_VERSION 123 #define E_EVAS_ENGINE_DEFAULT 0 #define E_EVAS_ENGINE_SOFTWARE_X11 1 @@ -143,6 +143,8 @@ int focus_last_focused_per_desktop; int focus_revert_on_hide_or_close; int cursor_size; + int menu_autoscroll_margin; + int menu_autoscroll_cursor_margin; }; struct _E_Config_Module =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v retrieving revision 1.64 retrieving revision 1.65 diff -u -3 -r1.64 -r1.65 --- e_ipc_handlers.h 21 Aug 2005 23:37:28 -0000 1.64 +++ e_ipc_handlers.h 22 Aug 2005 05:50:49 -0000 1.65 @@ -636,14 +636,6 @@ * E_LIB_IN * ... */ - -#if 0 -{ -#endif - - - - /****************************************************************************/ #define HDL E_IPC_OP_MODULE_LOAD @@ -4632,8 +4624,82 @@ #undef HDL /****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_MARGIN_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-menu-autoscroll-margin-set", 1, "Set the distance from the edge of the screen the menu will autoscroll to", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(value, HDL); + e_config->menu_autoscroll_margin = value; + E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_MARGIN_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-menu-autoscroll-margin-get", 0, "Get the distance from the edge of the screen the menu will autoscroll to", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->menu_autoscroll_margin, E_IPC_OP_MENU_AUTOSCROLL_MARGIN_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL -#if 0 -} +/****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_MARGIN_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL) + printf("REPLY: %i\n", val); + END_INT; #endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-menu-autoscroll-cursor-margin-set", 1, "Set the distance from the edge of the screen the cursor needs to be to start menu autoscrolling", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(value, HDL); + e_config->menu_autoscroll_cursor_margin = value; + E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50); + // e_zone_update_flip_all(); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-menu-autoscroll-cursor-margin-get", 0, "Get the distance from the edge of the screen the cursor needs to be to start menu autoscrolling", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->menu_autoscroll_cursor_margin, E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL) + printf("REPLY: %i\n", val); + END_INT; +#endif +#undef HDL =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers_list.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- e_ipc_handlers_list.h 21 Aug 2005 23:37:28 -0000 1.16 +++ e_ipc_handlers_list.h 22 Aug 2005 05:50:49 -0000 1.17 @@ -225,3 +225,9 @@ #define E_IPC_OP_CURSOR_SIZE_SET 225 #define E_IPC_OP_CURSOR_SIZE_GET 226 #define E_IPC_OP_CURSOR_SIZE_GET_REPLY 227 +#define E_IPC_OP_MENU_AUTOSCROLL_MARGIN_SET 228 +#define E_IPC_OP_MENU_AUTOSCROLL_MARGIN_GET 229 +#define E_IPC_OP_MENU_AUTOSCROLL_MARGIN_GET_REPLY 230 +#define E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_SET 231 +#define E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_GET 232 +#define E_IPC_OP_MENU_AUTOSCROLL_CURSOR_MARGIN_GET_REPLY 233 =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_menu.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- e_menu.c 25 Jul 2005 09:55:44 -0000 1.38 +++ e_menu.c 22 Aug 2005 05:50:49 -0000 1.39 @@ -1968,24 +1968,24 @@ E_Menu *m; m = l->data; - if (m->cur.x < m->zone->x) + if (m->cur.x < m->zone->x + e_config->menu_autoscroll_margin) { - i = m->zone->x - m->cur.x; + i = m->zone->x - m->cur.x + e_config->menu_autoscroll_margin; if (i > outl) outl = i; } - if (m->cur.y < m->zone->y) + if (m->cur.y < m->zone->y + e_config->menu_autoscroll_margin) { - i = m->zone->y - m->cur.y; + i = m->zone->y - m->cur.y + e_config->menu_autoscroll_margin; if (i > outt) outt = i; } - if ((m->cur.x + m->cur.w) > (m->zone->w)) + if ((m->cur.x + m->cur.w) > (m->zone->w - e_config->menu_autoscroll_margin)) { - i = m->cur.x + m->cur.w - (m->zone->x + m->zone->w); + i = m->cur.x + m->cur.w - (m->zone->x + m->zone->w - e_config->menu_autoscroll_margin); if (i > outr) outr = i; } - if ((m->cur.y + m->cur.h) > (m->zone->h)) + if ((m->cur.y + m->cur.h) > (m->zone->h - e_config->menu_autoscroll_margin)) { - i = m->cur.y + m->cur.h - (m->zone->y + m->zone->h); + i = m->cur.y + m->cur.h - (m->zone->y + m->zone->h - e_config->menu_autoscroll_margin); if (i > outb) outb = i; } } @@ -2029,11 +2029,11 @@ int autoscroll_x = 0; int autoscroll_y = 0; - if (_e_menu_x == 0) + if (_e_menu_x - e_config->menu_autoscroll_cursor_margin <= 0) { if (_e_menu_outside_bounds_get(-1, 0)) autoscroll_x = -1; } - if (_e_menu_y == 0) + if (_e_menu_y - e_config->menu_autoscroll_cursor_margin <= 0) { if (_e_menu_outside_bounds_get(0, -1)) autoscroll_y = -1; } @@ -2044,11 +2044,11 @@ E_Menu *m; m = _e_active_menus->data; - if (_e_menu_x == (m->zone->w - 1)) + if (_e_menu_x + e_config->menu_autoscroll_cursor_margin >= (m->zone->w - 1)) { if (_e_menu_outside_bounds_get(1, 0)) autoscroll_x = 1; } - if (_e_menu_y == (m->zone->h - 1)) + if (_e_menu_y + e_config->menu_autoscroll_cursor_margin >= (m->zone->h - 1)) { if (_e_menu_outside_bounds_get(0, 1)) autoscroll_y = 1; } ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs