Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_callback.h ewl_cell.h ewl_entry.c ewl_scrollbar.c 


Log Message:
More widget docs. Catch Enter and Return keys for the entry and signal value
change when they occur.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_callback.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_callback.h      3 Sep 2003 19:52:06 -0000       1.25
+++ ewl_callback.h      3 Sep 2003 21:33:35 -0000       1.26
@@ -32,39 +32,55 @@
                                          void *user_data);
 struct Ewl_Callback
 {
-       Ewl_Callback_Function func; /**< Function to be executed when the event 
occurs. */
-
-       /*
-        * The user specified data to pass to func when executed.
-        */
-       void           *user_data;
-
-       /*
-        * Reference counting to determine when this should be freed.
-        */
-       int             references;
-
-       /*
-        * The id of this callback which can be used for identifying it later.
-        */
-       int             id;
+       Ewl_Callback_Function func; /**< Function executed */
+       void           *user_data; /**< user specified data to pass to func */
+       int             references; /**< Reference counting */
+       int             id; /**< id number of this callback */
 };
 
+/**
+ * @def EWL_CALLBACK_NOTIFY_MASK
+ * The value to binary AND with the callback pointer to check the notifiers.
+ */
 #define EWL_CALLBACK_NOTIFY_MASK (0x3)
+
+/**
+ * @def EWL_CALLBACK_LIST_POINTER(w, t)
+ * Retrives the callback list from a widget for a certain event type.
+ */
 #define EWL_CALLBACK_LIST_POINTER(w, t) \
                (void *)((unsigned int)(w->callbacks[t]) & \
                                        ~EWL_CALLBACK_NOTIFY_MASK)
+
+/**
+ * @def EWL_CALLBACK_FLAGS(w, t)
+ * Retrives the callback flags from a widget for a certain event type.
+ */
 #define EWL_CALLBACK_FLAGS(w, t) \
                ((unsigned int)(w->callbacks[t]) & \
                                        EWL_CALLBACK_NOTIFY_MASK)
+/**
+ * @def EWL_CALLBACK_FLAG_INTERCEPT(w, t)
+ * Sets the callback intercept flag from a widget for a certain event type.
+ */
 #define EWL_CALLBACK_FLAG_INTERCEPT(w, t) \
                ((unsigned int)w->callbacks[t] = \
                         (unsigned int)EWL_CALLBACK_LIST_POINTER(w, t) | \
                         EWL_CALLBACK_NOTIFY_INTERCEPT)
+
+/**
+ * @def EWL_CALLBACK_FLAG_NOTIFY(w, t)
+ * Sets the callback notify flag from a widget for a certain event type.
+ */
 #define EWL_CALLBACK_FLAG_NOTIFY(w, t) \
                ((unsigned int)w->callbacks[t] = \
                         (unsigned int)EWL_CALLBACK_LIST_POINTER(w, t) | \
                         EWL_CALLBACK_NOTIFY_NOTIFY)
+
+/**
+ * @def EWL_CALLBACK_LIST_ASSIGN(w, t, l)
+ * Sets the callback list for a widget for a certain event type.
+ */
 #define EWL_CALLBACK_LIST_ASSIGN(w, t, l) \
                (unsigned int)w->callbacks[t] = (unsigned int)l | \
                        ((unsigned int)w->callbacks[t] & \
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cell.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_cell.h  2 Sep 2003 01:52:45 -0000       1.3
+++ ewl_cell.h  3 Sep 2003 21:33:35 -0000       1.4
@@ -19,8 +19,7 @@
  */
 struct Ewl_Cell
 {
-       Ewl_Container container;
-       int col, row;
+       Ewl_Container container; /**< Inherit from the Ewl_Container */
 };
 
 Ewl_Widget *ewl_cell_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ewl_entry.c 28 Aug 2003 06:20:54 -0000      1.65
+++ ewl_entry.c 3 Sep 2003 21:33:35 -0000       1.66
@@ -285,8 +285,18 @@
                __ewl_entry_delete_to_left(w);
        else if (!strcmp(ev->keyname, "Delete"))
                __ewl_entry_delete_to_right(w);
-       else if (ev->key_compose)
+       else if (!strcmp(ev->keyname, "Return") || !strcmp(ev->keyname,
+                               "KP_Return"))
+               ewl_callback_call_with_event_data(w, EWL_CALLBACK_VALUE_CHANGED,
+                               EWL_TEXT(w)->text);
+       else if (!strcmp(ev->keyname, "Enter") || !strcmp(ev->keyname,
+                               "KP_Enter"))
+               ewl_callback_call_with_event_data(w, EWL_CALLBACK_VALUE_CHANGED,
+                               EWL_TEXT(w)->text);
+       else if (ev->key_compose) {
+               printf("Received %s\n", ev->keyname);
                __ewl_entry_insert_text(w, ev->key_compose);
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- ewl_scrollbar.c     2 Sep 2003 21:57:13 -0000       1.22
+++ ewl_scrollbar.c     3 Sep 2003 21:33:35 -0000       1.23
@@ -34,12 +34,10 @@
 }
 
 /**
- * ewl_scrollbar_init - initialize a scrollbar to default values
- *
- * @s: the scrollbar to initialize
- * @orientation: the orientation for the scrollbar
- *
- * Returns no value.
+ * @param s: the scrollbar to initialize
+ * @param orientation: the orientation for the scrollbar
+ * @return Returns no value.
+ * @brief Initialize a scrollbar to default values
  */
 void ewl_scrollbar_init(Ewl_Scrollbar * s, Ewl_Orientation orientation)
 {
@@ -236,10 +234,9 @@
 }
 
 /**
- * ewl_scrollbar_get_value - get the current value of the dragbar
- * @s: the scrollbar to get the current value
- *
- * Returns the current value of the scrollbar @s.
+ * @param s: the scrollbar to get the current value
+ * @return Returns the current value of the scrollbar @a s.
+ * @brief Get the current value of the dragbar
  */
 double ewl_scrollbar_get_value(Ewl_Scrollbar * s)
 {
@@ -259,10 +256,12 @@
 }
 
 /**
- * ewl_scrollbar_set_value - set the current value of the dragbar
- * @s: the scrollbar to set the current value
+ * @param s: the scrollbar to set the current value
+ * @param v: the new value for the scrollbar
+ * @return Returns no value.
+ * @brief Set the current value of the dragbar
  *
- * Returns no value. Sets the current value of the scrollbar @s.
+ * Sets the current value of the scrollbar @a s.
  */
 void ewl_scrollbar_set_value(Ewl_Scrollbar * s, double v)
 {
@@ -280,10 +279,9 @@
 }
 
 /**
- * ewl_scrollbar_get_step - get the current step size of the scrollbar
- * @s: the scrollbar to retrieve step size
- *
- * Returns the current step size of the scrollbar.
+ * @param s: the scrollbar to retrieve step size
+ * @return Returns the current step size of the scrollbar.
+ * @brief Get the current step size of the scrollbar
  */
 double
 ewl_scrollbar_get_step(Ewl_Scrollbar *s)
@@ -296,11 +294,12 @@
 }
 
 /**
- * ewl_scrollbar_set_step - change the step size of a scrollbar
- * @s: the scrollbar to change step size
- * @v: the new step size of the scrollbar
+ * @param s: the scrollbar to change step size
+ * @param v: the new step size of the scrollbar
+ * @return Returns no value.
+ * @brief Change the step size of a scrollbar
  *
- * Returns no value. Changes the step size of the scrollbar @s to @v.
+ * Changes the step size of the scrollbar @a s to @a v.
  */
 void ewl_scrollbar_set_step(Ewl_Scrollbar *s, double v)
 {
@@ -314,11 +313,12 @@
 }
 
 /**
- * ewl_scrollbar_set_flag - set the flag mask for a scrollbar
- * @s: the scrollbar to set the flags
- * @f: the flags to set for the scrollbar
+ * @param s: the scrollbar to set the flags
+ * @param f: the flags to set for the scrollbar
+ * @return Returns no value.
+ * @brief Set the flag mask for a scrollbar
  *
- * Returns no value. Sets the flags @f for the scrollbar @s.
+ * Sets the flags @a f for the scrollbar @a s.
  */
 void ewl_scrollbar_set_flag(Ewl_Scrollbar * s, Ewl_ScrollBar_Flags f)
 {
@@ -332,10 +332,9 @@
 }
 
 /**
- * ewl_scrollbar_get_flag - retrieve the current flags of a scrollbar
- * @s: the scrollbar to retrieve the flags
- *
- * Returns the flags from the scrollbars @s.
+ * @param s: the scrollbar to retrieve the flags
+ * @return Returns the flags from the scrollbars @a s.
+ * @brief Retrieve the current flags of a scrollbar
  */
 Ewl_ScrollBar_Flags ewl_scrollbar_get_flag(Ewl_Scrollbar * s)
 {




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to