Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_cursor.c ewl_cursor.h ewl_enums.h ewl_menu.h ewl_misc.h 
        ewl_notebook.h ewl_popup.c ewl_popup.h 


Log Message:
- remove items from ewl_misc.h that shouldn't be there
- add ewl_cursor_new()
- fix doxy warnings
- fix code warnings
- formatting

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_cursor.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_cursor.c        4 Nov 2006 16:26:05 -0000       1.1
+++ ewl_cursor.c        5 Nov 2006 22:08:22 -0000       1.2
@@ -7,6 +7,35 @@
 static void ewl_cursor_cb_render(Ewl_Widget *w, void *ev, void *data);
 static void ewl_cursor_cb_destroy(Ewl_Widget *w, void *ev, void *data);
 
+/**
+ * @return Returns a new Ewl_Cursor on success, or NULL on failure
+ * @brief Creates and initializes a new Ewl_Cursor widget
+ */
+Ewl_Widget *
+ewl_cursor_new(void)
+{
+       Ewl_Widget *w = NULL;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       w = NEW(Ewl_Cursor, 1);
+       if (!w)
+               DRETURN_PTR(NULL, DLEVEL_STABLE);
+
+       if (!ewl_cursor_init(EWL_CURSOR(w)))
+       {
+               ewl_widget_destroy(w);
+               w = NULL;
+       }
+
+       DRETURN_PTR(w, DLEVEL_STABLE);
+}
+
+/**
+ * @param cursor: The Ewl_Cursor to initialize
+ * @return Returns TRUE on success, FALSE on failure
+ * @brief Initializes an Ewl_Cursor widget
+ */
 int
 ewl_cursor_init(Ewl_Cursor *cursor)
 {
@@ -33,7 +62,7 @@
 }
 
 static void
-ewl_cursor_cb_render(Ewl_Widget *w, void *ev, void *data)
+ewl_cursor_cb_render(Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__)
 {
                int handle;
        int width, height;
@@ -76,7 +105,8 @@
 }
 
 static void
-ewl_cursor_cb_destroy(Ewl_Widget *w, void *ev, void *data)
+ewl_cursor_cb_destroy(Ewl_Widget *w, void *ev __UNUSED__, 
+                                       void *data __UNUSED__)
 {
        Ewl_Cursor *cursor = EWL_CURSOR(w);
 
@@ -86,3 +116,4 @@
                */
        cursor->handle = 0;
 }
+
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_cursor.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_cursor.h        4 Nov 2006 16:26:05 -0000       1.1
+++ ewl_cursor.h        5 Nov 2006 22:08:22 -0000       1.2
@@ -35,13 +35,13 @@
  */
 struct Ewl_Cursor
 {
-       Ewl_Window      window;       /**< Inherit from Ewl_Window */
-       int             refcount;     /**< Number of references to cursor */
-       int             handle;       /**< Engine id for generated cursor */
+       Ewl_Window window;       /**< Inherit from Ewl_Window */
+       int refcount;     /**< Number of references to cursor */
+       int handle;       /**< Engine id for generated cursor */
 };
 
 Ewl_Widget     *ewl_cursor_new(void);
-int             ewl_cursor_init(Ewl_Cursor * c);
+int             ewl_cursor_init(Ewl_Cursor *c);
 
 /**
  * @}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- ewl_enums.h 4 Nov 2006 16:58:05 -0000       1.63
+++ ewl_enums.h 5 Nov 2006 22:08:22 -0000       1.64
@@ -263,15 +263,15 @@
 typedef enum Ewl_Window_Flags Ewl_Window_Flags;
 
 /**
- * @enum Ewl_Popup_Types
+ * @enum Ewl_Popup_Type
  * The possible popup types
  */
 enum Ewl_Popup_Type
 {
-       EWL_POPUP_TYPE_NONE,
-       EWL_POPUP_TYPE_MOUSE,
-       EWL_POPUP_TYPE_MENU_HORIZONTAL,
-       EWL_POPUP_TYPE_MENU_VERTICAL
+       EWL_POPUP_TYPE_NONE,            /**< No popup type */
+       EWL_POPUP_TYPE_MOUSE,           /**< Popup off the mouse */
+       EWL_POPUP_TYPE_MENU_HORIZONTAL, /**< Popup with horizontal data */
+       EWL_POPUP_TYPE_MENU_VERTICAL    /**< Popup with vertical data */
 };
 
 /**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_menu.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_menu.h  4 Nov 2006 16:58:05 -0000       1.16
+++ ewl_menu.h  5 Nov 2006 22:08:22 -0000       1.17
@@ -48,7 +48,6 @@
 /*
  * Internally used callbacks, override at your own risk.
  */
-void ewl_menu_cb_realize(Ewl_Widget *w, void *ev_data, void *user_data);
 void ewl_menu_cb_configure(Ewl_Widget *w, void *ev_data, void *user_data);
 void ewl_menu_cb_expand(Ewl_Widget *w, void *ev_data, void *user_data);
 void ewl_menu_cb_hide(Ewl_Widget *w, void *ev_data, void *user_data);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_misc.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_misc.h  27 Oct 2006 04:26:56 -0000      1.17
+++ ewl_misc.h  5 Nov 2006 22:08:22 -0000       1.18
@@ -18,9 +18,6 @@
 void            ewl_realize_request(Ewl_Widget *w);
 void            ewl_realize_cancel_request(Ewl_Widget *w);
 void            ewl_destroy_request(Ewl_Widget *w);
-void            ewl_realize_phase_enter(void);
-void            ewl_realize_phase_exit(void);
-int             ewl_in_realize_phase(void);
 void            ewl_evas_destroy(Evas *evas);
 void            ewl_evas_object_destroy(Evas_Object *obj);
 char          *ewl_debug_indent_get(int mod_dir);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_notebook.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_notebook.h      15 Mar 2006 04:03:48 -0000      1.11
+++ ewl_notebook.h      5 Nov 2006 22:08:22 -0000       1.12
@@ -81,7 +81,7 @@
 Ewl_Widget     *ewl_notebook_page_tab_widget_get(Ewl_Notebook *n,
                                                Ewl_Widget *page);
 
-/**
+/*
  * Internal stuff.
  */
 void ewl_notebook_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_popup.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_popup.c 4 Nov 2006 16:58:05 -0000       1.1
+++ ewl_popup.c 5 Nov 2006 22:08:22 -0000       1.2
@@ -29,7 +29,7 @@
 }
 
 /**
- * @param s: the popup to initialize
+ * @param p: the popup to initialize
  * @return Returns TRUE on success, FALSE on failure.
  * @brief Initialize the popup and inherited fields
  *
@@ -68,7 +68,7 @@
 
 /**
  * @param p: The popup to set the type for
- * @parma type: the type
+ * @param type: the type
  * @return Returns no value
  * @brief This is to set the type of the popup. The type defines how the
  * popup will handle the positioning
@@ -120,9 +120,11 @@
        if (p->follow)
                ewl_callback_del_with_data(p->follow, EWL_CALLBACK_DESTROY,
                                                ewl_popup_cb_follow_destroy, p);
+
        if (w)
                ewl_callback_prepend(w, EWL_CALLBACK_DESTROY, 
                                        ewl_popup_cb_follow_destroy, p);
+
        p->follow = w;
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -130,8 +132,8 @@
 
 /**
  * @param p: The popup to set the mouse position for
- * @parma x: the x coordinate
- * @parma y: the y coordinate
+ * @param x: the x coordinate
+ * @param y: the y coordinate
  * @return Returns no value
  * @brief This is to set the mouse coordinates to the popup,
  * where it get placed relative to.
@@ -167,13 +169,11 @@
 
        ewl_popup_position_check(EWL_POPUP(w));
 
-
-       if (ewl_window_pointer_grab_get(EWL_WINDOW(w))) {
+       if (ewl_window_pointer_grab_get(EWL_WINDOW(w)))
                ewl_window_pointer_grab_set(EWL_WINDOW(w), TRUE);
-       }
-       if (ewl_window_keyboard_grab_get(EWL_WINDOW(w))) {
+
+       if (ewl_window_keyboard_grab_get(EWL_WINDOW(w)))
                ewl_window_keyboard_grab_set(EWL_WINDOW(w), TRUE);
-       }
 
         DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -197,10 +197,10 @@
         DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
        p = EWL_POPUP(w);
-
        if (p->follow)
                ewl_callback_del_with_data(p->follow, EWL_CALLBACK_DESTROY,
                                        ewl_popup_cb_follow_destroy, p);
+
         DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
@@ -223,7 +223,6 @@
         DCHECK_TYPE("user_data", user_data, EWL_POPUP_TYPE);
 
        p = EWL_POPUP(user_data);
-
        p->follow = NULL;
 
        if (p->type != EWL_POPUP_TYPE_NONE)
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_popup.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_popup.h 4 Nov 2006 16:58:05 -0000       1.1
+++ ewl_popup.h 5 Nov 2006 22:08:22 -0000       1.2
@@ -30,11 +30,12 @@
  */
 struct Ewl_Popup
 {
-       Ewl_Window      window; /**< Inherit from Ewl_Window */
-       Ewl_Popup_Type  type;   /**< The Popup type */
-       Ewl_Widget     *follow;
-       int             x;
-       int             y;
+       Ewl_Window window; /**< Inherit from Ewl_Window */
+
+       Ewl_Popup_Type type;   /**< The Popup type */
+       Ewl_Widget *follow;     /**< The object to follow */
+       int x;                  /**< The x position */
+       int y;                  /**< The y position */
 };
 
 Ewl_Widget     *ewl_popup_new(void);
@@ -44,8 +45,9 @@
 void           ewl_popup_follow_set(Ewl_Popup *p, Ewl_Widget *w);
 
 void            ewl_popup_mouse_position_set(Ewl_Popup *p, int x, int y);
-/**
- * @}
+
+/*
+ * Internal, override at your own risk
  */
 void ewl_popup_cb_show(Ewl_Widget *w, void *ev_data, void *user_data);
 void ewl_popup_cb_destroy(Ewl_Widget *w, void *ev_data, void *user_data);
@@ -53,5 +55,9 @@
                                        Ewl_Orientation o);
 void ewl_popup_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
 void ewl_popup_cb_follow_destroy(Ewl_Widget *w, void *ev_data, void 
*user_data);
-#endif
 
+/**
+ * @}
+ */
+
+#endif



-------------------------------------------------------------------------
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