Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        Ewl.h ewl_attach.h ewl_cursor.c ewl_dnd.c ewl_embed.c 
        ewl_enums.h 


Log Message:
Custom cursors can now be set on a widget and can be built from other widgets.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/Ewl.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- Ewl.h       8 Nov 2006 02:24:53 -0000       1.17
+++ Ewl.h       8 Nov 2006 06:38:55 -0000       1.18
@@ -296,6 +296,7 @@
 #include <ewl_overlay.h>
 #include <ewl_embed.h>
 #include <ewl_window.h>
+#include <ewl_cursor.h>
 #include <ewl_dialog.h>
 #include <ewl_popup.h>
 #include <ewl_filelist.h>
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_attach.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_attach.h        18 Oct 2006 16:28:08 -0000      1.15
+++ ewl_attach.h        8 Nov 2006 06:38:55 -0000       1.16
@@ -61,6 +61,14 @@
                        (int *)data)
 
 /**
+ * @def ewl_attach_mouse_argb_cursor_set(w, cursor)
+ * Convenience method to attach data to a notebook item
+ */
+#define ewl_attach_mouse_argb_cursor_set(w, cursor) \
+       ewl_attach_other_set(EWL_WIDGET(w), \
+                       EWL_ATTACH_TYPE_MOUSE_ARGB_CURSOR, cursor)
+
+/**
  * @def ewl_attach_color_set(w, data)
  * Convenience method to set a colour widget attachment
  */
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_cursor.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_cursor.c        5 Nov 2006 22:08:22 -0000       1.2
+++ ewl_cursor.c        8 Nov 2006 06:38:55 -0000       1.3
@@ -43,15 +43,15 @@
 
        DENTER_FUNCTION(DLEVEL_UNSTABLE);
        DCHECK_PARAM_PTR_RET("cursor", cursor, FALSE);
-       DCHECK_TYPE_RET("cursor", cursor, EWL_CURSOR_TYPE, FALSE);
 
        if (!ewl_window_init(EWL_WINDOW(cursor)))
                DRETURN_INT(FALSE, DLEVEL_UNSTABLE);
 
        ewl_widget_appearance_set(w, EWL_CURSOR_TYPE);
+       ewl_widget_inherit(w, EWL_CURSOR_TYPE);
 
        ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_ALL);
-       ewl_object_size_request(EWL_OBJECT(w), 64, 64);
+       ewl_object_size_request(EWL_OBJECT(w), 32, 32);
        ewl_embed_engine_name_set(EWL_EMBED(cursor), "evas_buffer");
        ewl_callback_append(w, EWL_CALLBACK_VALUE_CHANGED,
                        ewl_cursor_cb_render, NULL);
@@ -84,20 +84,16 @@
        if (parent)
                parent = EWL_WIDGET(ewl_embed_widget_find(parent));
 
-       if (parent)
-               old = EWL_EMBED(parent)->cursor;
+       if (!parent)
+               DRETURN(DLEVEL_UNSTABLE);
+
+       old = EWL_EMBED(parent)->cursor;
 
        if (cursor->handle)
                ewl_engine_pointer_free(EWL_EMBED(parent), cursor->handle);
 
        handle = ewl_engine_pointer_data_new(EWL_EMBED(parent),
                        EWL_EMBED(cursor)->evas_window, width, height);
-
-       /* FIXME: Needs to be done for all widgets with this cursor
-       ewl_attach_mouse_cursor_set(parent, handle);
-       if (EWL_EMBED(parent)->cursor == old)
-               ewl_embed_mouse_cursor_set(entry);
-       */
 
        cursor->handle = handle;
 
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_dnd.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_dnd.c   27 Oct 2006 04:26:56 -0000      1.31
+++ ewl_dnd.c   8 Nov 2006 06:38:55 -0000       1.32
@@ -2,10 +2,6 @@
 #include "ewl_debug.h"
 #include "ewl_macros.h"
 #include "ewl_private.h"
-#if 0
-#include <Ecore_Evas.h>
-#include <Ecore_X.h>
-#endif
 
 #define EWL_DND_WINDOW_ROOT 0
 
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- ewl_embed.c 6 Nov 2006 16:12:20 -0000       1.93
+++ ewl_embed.c 8 Nov 2006 06:38:55 -0000       1.94
@@ -1584,6 +1584,7 @@
 ewl_embed_mouse_cursor_set(Ewl_Widget *w)
 {
        int pointer;
+       Ewl_Cursor *argb;
        Ewl_Embed *embed;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -1592,6 +1593,10 @@
 
        embed = ewl_embed_widget_find(w);
        if (!embed) DRETURN(DLEVEL_STABLE);
+       if ((argb = ewl_attach_get(w, EWL_ATTACH_TYPE_MOUSE_ARGB_CURSOR))) {
+               pointer = argb->handle;
+               ewl_attach_mouse_cursor_set(w, pointer);
+       }
 
        if (!(pointer = (int)ewl_attach_get(w, EWL_ATTACH_TYPE_MOUSE_CURSOR)))
                pointer = EWL_MOUSE_CURSOR_LEFT_PTR;
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- ewl_enums.h 5 Nov 2006 22:08:22 -0000       1.64
+++ ewl_enums.h 8 Nov 2006 06:38:55 -0000       1.65
@@ -470,6 +470,7 @@
        EWL_ATTACH_TYPE_COLOR,
        EWL_ATTACH_TYPE_NAME,
        EWL_ATTACH_TYPE_MOUSE_CURSOR,
+       EWL_ATTACH_TYPE_MOUSE_ARGB_CURSOR,
        EWL_ATTACH_TYPE_WIDGET_ASSOCIATION
 };
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to