Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_check.c ewl_enums.h ewl_widget.c 


Log Message:
Use the standard edje signal names for mouse events.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_check.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_check.c 19 Nov 2003 20:18:34 -0000      1.11
+++ ewl_check.c 28 Jan 2004 05:09:30 -0000      1.12
@@ -119,7 +119,7 @@
        if (cb->checked)
                ewl_widget_set_state(w, "checked");
        else
-               ewl_widget_set_state(w, "normal");
+               ewl_widget_set_state(w, "default");
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_enums.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ewl_enums.h 22 Nov 2003 20:01:02 -0000      1.42
+++ ewl_enums.h 28 Jan 2004 05:09:30 -0000      1.43
@@ -12,8 +12,6 @@
  * This defines the various types of callbacks that can be hooked up for each
  * widget.
  */
-typedef enum Ewl_Callback_Type Ewl_Callback_Type;
-
 enum Ewl_Callback_Type
 {
        EWL_CALLBACK_NONE, /**< A placeholder FIXME: Is this necessary still? */
@@ -46,12 +44,12 @@
        EWL_CALLBACK_MAX /**< Flag to indicate last value */
 };
 
+typedef enum Ewl_Callback_Type Ewl_Callback_Type;
+
 /**
  * Flags for the callbacks to indicate interception or notification of the
  * parent.
  */
-typedef enum Ewl_Event_Notify Ewl_Event_Notify;
-
 enum Ewl_Event_Notify
 {
        EWL_CALLBACK_NOTIFY_NONE = 0,
@@ -59,43 +57,49 @@
        EWL_CALLBACK_NOTIFY_INTERCEPT = 2
 };
 
+typedef enum Ewl_Event_Notify Ewl_Event_Notify;
+
 /**
  * The orientation enum is used in a few widgets to specify whether the widget
  * should be laid out in a horizontal or vertical fashion.
  */
-typedef enum Ewl_Orientation Ewl_Orientation;
-
 enum Ewl_Orientation
 {
        EWL_ORIENTATION_HORIZONTAL,
        EWL_ORIENTATION_VERTICAL
 };
 
+typedef enum Ewl_Orientation Ewl_Orientation;
+
+/**
+ * A variety of flags that affect layout, visibility, scheduling and
+ * properties of objects.
+ */
 enum Ewl_Flags
 {
        /*
         * The alignment enumeration allows for specifying how an element is
         * aligned within it's container.
         */
-       EWL_FLAG_ALIGN_CENTER = ETOX_ALIGN_CENTER,
-       EWL_FLAG_ALIGN_LEFT = ETOX_ALIGN_LEFT,
-       EWL_FLAG_ALIGN_RIGHT = ETOX_ALIGN_RIGHT,
-       EWL_FLAG_ALIGN_TOP = ETOX_ALIGN_TOP,
-       EWL_FLAG_ALIGN_BOTTOM = ETOX_ALIGN_BOTTOM,
+       EWL_FLAG_ALIGN_CENTER = ETOX_ALIGN_CENTER, /**< Center align bit */
+       EWL_FLAG_ALIGN_LEFT = ETOX_ALIGN_LEFT, /**< Left align bit */
+       EWL_FLAG_ALIGN_RIGHT = ETOX_ALIGN_RIGHT, /**< Right align bit */
+       EWL_FLAG_ALIGN_TOP = ETOX_ALIGN_TOP, /**< Top align bit */
+       EWL_FLAG_ALIGN_BOTTOM = ETOX_ALIGN_BOTTOM, /**< Bottom align bit */
 
        /*
         * Fill policy identifies to containers whether child widgets should be
         * stretched to fill available space or keep their current size.
         */
-       EWL_FLAG_FILL_NONE = 0,
-       EWL_FLAG_FILL_HSHRINK = 0x1000,
-       EWL_FLAG_FILL_VSHRINK = 0x2000,
+       EWL_FLAG_FILL_NONE = 0, /**< Do not fill or shrink in any direction */
+       EWL_FLAG_FILL_HSHRINK = 0x1000, /**< Horizontally shrink bit */
+       EWL_FLAG_FILL_VSHRINK = 0x2000, /**< Horizontally shrink bit */
        EWL_FLAG_FILL_SHRINK =
-           EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VSHRINK,
-       EWL_FLAG_FILL_HFILL = 0x4000,
-       EWL_FLAG_FILL_VFILL = 0x8000,
-       EWL_FLAG_FILL_FILL = EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VFILL,
-       EWL_FLAG_FILL_ALL = EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK,
+           EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VSHRINK, /**< Shrink bit */
+       EWL_FLAG_FILL_HFILL = 0x4000, /**< Horizontal fill bit */
+       EWL_FLAG_FILL_VFILL = 0x8000, /**< Vertical fill bit */
+       EWL_FLAG_FILL_FILL = EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VFILL, /**< Fill bit 
*/
+       EWL_FLAG_FILL_ALL = EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK, /**< Shrunk and 
fill bit */
 
        /*
         * Flags identifying the visibility status of the widget
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- ewl_widget.c        27 Jan 2004 06:08:35 -0000      1.97
+++ ewl_widget.c        28 Jan 2004 05:09:30 -0000      1.98
@@ -1223,7 +1223,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
 
-       ewl_widget_set_state(w, "normal");
+       ewl_widget_set_state(w, "default");
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -1245,9 +1245,9 @@
                DRETURN(DLEVEL_STABLE);
 
        if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_PRESSED))
-               ewl_widget_set_state(w, "clicked");
+               ewl_widget_set_state(w, "mouse,down,0");
        else
-               ewl_widget_set_state(w, "hilited");
+               ewl_widget_set_state(w, "mouse,in");
 }
 
 void
@@ -1256,16 +1256,21 @@
        if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_DISABLED))
                DRETURN(DLEVEL_STABLE);
 
-       ewl_widget_set_state(w, "normal");
+       ewl_widget_set_state(w, "mouse,out");
+       ewl_widget_set_state(w, "default");
 }
 
 void
 ewl_widget_mouse_down_cb(Ewl_Widget *w, void *ev_data, void *user_data)
 {
+       Ecore_X_Event_Mouse_Button_Down *e = ev_data;
+       char state[14];
+
        if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_DISABLED))
                DRETURN(DLEVEL_STABLE);
 
-       ewl_widget_set_state(w, "clicked");
+       snprintf(state, 14, "mouse,down,%i", e->button);
+       ewl_widget_set_state(w, state);
 }
 
 void
@@ -1275,11 +1280,11 @@
                DRETURN(DLEVEL_STABLE);
 
        if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_HILITED)) {
-               ewl_widget_set_state(w, "hilited");
+               ewl_widget_set_state(w, "mouse,in");
                ewl_callback_call_with_event_data(w, EWL_CALLBACK_CLICKED,
                                                  ev_data);
        } else
-               ewl_widget_set_state(w, "normal");
+               ewl_widget_set_state(w, "default");
 }
 
 void




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to