Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e.h e_config.c e_config.h e_container.c e_init.c 
        e_ipc_handlers.h e_ipc_handlers_list.h 


Log Message:
use default x cursor optionally. doesn't have an immediate effect when changed 
with enlightenment_remote. need to support cursors for hotspots like resize 
handles etc
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- e.h 15 Sep 2005 03:11:08 -0000      1.30
+++ e.h 26 Sep 2005 16:14:31 -0000      1.31
@@ -29,6 +29,7 @@
 #include <Ecore_Config.h>
 #include <Ecore_File.h>
 #include <Ecore_X_Atoms.h>
+#include <Ecore_X_Cursor.h>
 #include <Eet.h>
 #include <Edje.h>
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- e_config.c  22 Sep 2005 20:20:33 -0000      1.102
+++ e_config.c  26 Sep 2005 16:14:31 -0000      1.103
@@ -329,6 +329,7 @@
    E_CONFIG_VAL(D, T, resize_info_follows, INT); /**/
    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, use_e_cursor, 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); /**/
@@ -446,6 +447,7 @@
        e_config->resize_info_follows = 1;
        e_config->focus_last_focused_per_desktop = 1;
        e_config->focus_revert_on_hide_or_close = 1;
+       e_config->use_e_cursor = 1;
        e_config->cursor_size = 32;
        e_config->menu_autoscroll_margin = 0;
        e_config->menu_autoscroll_cursor_margin = 1;
@@ -1393,6 +1395,7 @@
    E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1);
    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->use_e_cursor, 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);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- e_config.h  22 Sep 2005 20:20:33 -0000      1.52
+++ e_config.h  26 Sep 2005 16:14:31 -0000      1.53
@@ -147,6 +147,7 @@
    int         resize_info_follows;
    int         focus_last_focused_per_desktop;
    int         focus_revert_on_hide_or_close;
+   int         use_e_cursor;
    int         cursor_size;
    int         menu_autoscroll_margin;
    int         menu_autoscroll_cursor_margin;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- e_container.c       24 Sep 2005 09:04:39 -0000      1.84
+++ e_container.c       26 Sep 2005 16:14:31 -0000      1.85
@@ -122,7 +122,13 @@
    evas_object_data_set(o, "e_container", con);
    evas_object_show(o);
    
-   con->pointer.root = e_pointer_window_set(con->manager->root);
+   if (e_config->use_e_cursor)
+     con->pointer.root = e_pointer_window_set(con->manager->root);
+   else
+     {
+       ecore_x_window_cursor_set (con->manager->root,
+               ecore_x_cursor_shape_get (ECORE_X_CURSOR_LEFT_PTR));
+     }
 
    con->num = container_num;
    container_num++;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_init.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- e_init.c    5 Sep 2005 15:24:07 -0000       1.25
+++ e_init.c    26 Sep 2005 16:14:31 -0000      1.26
@@ -61,7 +61,16 @@
    _e_init_evas = ecore_evas_get(_e_init_ecore_evas);
    ecore_evas_name_class_set(_e_init_ecore_evas, "E", "Init_Window");
    ecore_evas_title_set(_e_init_ecore_evas, "Enlightenment Init");
-   _e_init_pointer = e_pointer_window_set(_e_init_win);
+
+   if (e_config->use_e_cursor)
+     _e_init_pointer = e_pointer_window_set(_e_init_win);
+   else
+     {
+       _e_init_pointer = NULL;
+       ecore_x_window_cursor_set (_e_init_win,
+               ecore_x_cursor_shape_get (ECORE_X_CURSOR_LEFT_PTR));
+     }
+
    ecore_evas_raise(_e_init_ecore_evas);
    ecore_evas_show(_e_init_ecore_evas);
 
@@ -145,12 +154,17 @@
    evas_object_del(_e_init_object);
    e_canvas_del(_e_init_ecore_evas);
    ecore_evas_free(_e_init_ecore_evas);
-   e_object_del(E_OBJECT(_e_init_pointer));
+
+   if (_e_init_pointer)
+     {
+       e_object_del(E_OBJECT(_e_init_pointer));
+       _e_init_pointer = NULL;
+     }
+
    _e_init_ecore_evas = NULL;
    _e_init_evas = NULL;
    _e_init_win = 0;
    _e_init_object = NULL;
-   _e_init_pointer = NULL;
    e_canvas_cache_flush();
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- e_ipc_handlers.h    26 Sep 2005 09:28:29 -0000      1.79
+++ e_ipc_handlers.h    26 Sep 2005 16:14:31 -0000      1.80
@@ -4818,6 +4818,48 @@
 #undef HDL
 
 /****************************************************************************/
+
+#define HDL E_IPC_OP_USE_E_CURSOR_SET
+#if (TYPE == E_REMOTE_OPTIONS)
+   OP("-use-e-cursor-set", 1, "Set whether E's cursor should be used", 0, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+   REQ_INT(atoi(params[0]), HDL);
+#elif (TYPE == E_WM_IN)
+   START_INT(val, HDL);
+   e_config->use_e_cursor = val;
+   E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1);
+   SAVE;
+   END_INT;
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_USE_E_CURSOR_GET
+#if (TYPE == E_REMOTE_OPTIONS)
+   OP("-use-e-cursor-get", 0, "Get whether E's cursor should be used", 1, HDL)
+#elif (TYPE == E_REMOTE_OUT)
+   REQ_NULL(HDL);
+#elif (TYPE == E_WM_IN)
+   SEND_INT(e_config->use_e_cursor, E_IPC_OP_CURSOR_SIZE_GET_REPLY, HDL);
+#elif (TYPE == E_REMOTE_IN)
+#endif
+#undef HDL
+
+/****************************************************************************/
+#define HDL E_IPC_OP_USE_E_CURSOR_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: %d\n", val);
+   END_INT;
+#endif
+#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)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers_list.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- e_ipc_handlers_list.h       22 Sep 2005 20:20:34 -0000      1.23
+++ e_ipc_handlers_list.h       26 Sep 2005 16:14:31 -0000      1.24
@@ -272,3 +272,7 @@
 #define E_IPC_OP_BINDING_WHEEL_LIST_REPLY 267
 #define E_IPC_OP_BINDING_WHEEL_ADD 268
 #define E_IPC_OP_BINDING_WHEEL_DEL 269
+
+#define E_IPC_OP_USE_E_CURSOR_SET 270
+#define E_IPC_OP_USE_E_CURSOR_GET 271
+#define E_IPC_OP_USE_E_CURSOR_GET_REPLY 272




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to