Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_box.h ewl_button.h ewl_cell.h ewl_check.c ewl_check.h 
        ewl_checkbutton.h ewl_config.c ewl_container.c ewl_cursor.h 
        ewl_embed.h ewl_entry.h ewl_floater.h ewl_image.h ewl_imenu.h 
        ewl_menu.h ewl_misc.c ewl_misc.h ewl_radiobutton.h 
        ewl_scrollbar.h ewl_scrollpane.h ewl_seeker.h ewl_separator.h 
        ewl_spacer.h ewl_spinner.h ewl_widget.c 


Log Message:
More documentation, attempting to clean up some possible nasty freeing
conditions. Fix some state change issues with radio buttons.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_box.h   3 Sep 2003 19:52:05 -0000       1.24
+++ ewl_box.h   6 Oct 2003 17:39:53 -0000       1.25
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /box/file
+ * @themekey /box/group
+ */
+
+/**
  * The box widget is an Ewl_Container and lays out Ewl_Widget's either
  * horizontally or vertically.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_button.h        1 Sep 2003 04:57:07 -0000       1.18
+++ ewl_button.h        6 Oct 2003 17:39:53 -0000       1.19
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /button/file
+ * @themekey /button/group
+ */
+
+/**
  * The button provides a simple wrapper for creating a clickable Ewl_Widget
  * with an Ewl_Text displayed inside.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cell.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_cell.h  3 Sep 2003 21:33:35 -0000       1.4
+++ ewl_cell.h  6 Oct 2003 17:39:54 -0000       1.5
@@ -9,6 +9,11 @@
  * @{
  */
 
+/**
+ * @themekey /cell/file
+ * @themekey /cell/group
+ */
+
 typedef struct Ewl_Cell Ewl_Cell;
 #define EWL_CELL(t) ((Ewl_Cell *)t)
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_check.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_check.c 29 Sep 2003 21:46:50 -0000      1.8
+++ ewl_check.c 6 Oct 2003 17:39:54 -0000       1.9
@@ -88,6 +88,8 @@
        ewl_object_set_preferred_size(EWL_OBJECT(w), 20, 20);
 
        ewl_callback_append(w, EWL_CALLBACK_CLICKED, __ewl_check_clicked, NULL);
+       ewl_callback_append(w, EWL_CALLBACK_FOCUS_OUT, __ewl_check_update_check,
+                       NULL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_check.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_check.h 1 Sep 2003 04:57:07 -0000       1.2
+++ ewl_check.h 6 Oct 2003 17:39:54 -0000       1.3
@@ -8,6 +8,11 @@
  */
 
 /**
+ * @themekey /check/file
+ * @themekey /check/group
+ */
+
+/**
  * A single purpose extension of Ewl_Widget to provide a checked state.
  */
 typedef struct Ewl_Check Ewl_Check;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_checkbutton.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_checkbutton.h   1 Sep 2003 04:57:07 -0000       1.15
+++ ewl_checkbutton.h   6 Oct 2003 17:39:54 -0000       1.16
@@ -11,6 +11,11 @@
  */
 
 /**
+ * @themekey /checkbutton/file
+ * @themekey /checkbutton/group
+ */
+
+/**
  * The button class is a basic button with a label. This class is inherited by
  * the check button and radio button classes.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- ewl_config.c        18 Jul 2003 18:13:51 -0000      1.26
+++ ewl_config.c        6 Oct 2003 17:39:54 -0000       1.27
@@ -20,10 +20,10 @@
 extern Ewd_List *ewl_embed_list;
 
 /**
- * ewl_config_init - initialize the configuration system
+ * @return Returns true on success, false on failure.
+ * @brief Initialize the configuration system
  *
- * Returns true on success, false on failure. This sets up the necessary
- * configuration variables.
+ * This sets up the necessary configuration variables.
  */
 int ewl_config_init(void)
 {
@@ -40,13 +40,14 @@
 }
 
 /**
- * ewl_config_set_str - set the value of key to the specified string
- * @config: in what config to search for the key
- * @k: the key to set in the configuration database
- * @v: the string value that will be associated with the key
+ * @param config: in what config to search for the key
+ * @param k: the key to set in the configuration database
+ * @param v: the string value that will be associated with the key
+ * @return Returns TRUE on success, FALSE on failure.
+ * @brief set the value of key to the specified string
  *
- * Returns TRUE on success, FALSE on failure. Sets the string value associated
- * with the key @k to @v in the configuration database.
+ * Sets the string value associated with the key @a k to @a v in the
+ * configuration database.
  */
 int ewl_config_set_str(char *config, char *k, char *v)
 {
@@ -65,13 +66,14 @@
 
 
 /**
- * ewl_config_set_int - set the value of key to the specified integer
- * @config: in what config to search for the key
- * @k: the key to set in the configuration database
- * @v: the integer value that will be associated with the key
+ * @param config: in what config to search for the key
+ * @param k: the key to set in the configuration database
+ * @param v: the integer value that will be associated with the key
+ * @return Returns TRUE on success, FALSE on failure.
+ * @brief Set the value of key to the specified integer
  *
- * Returns TRUE on success, FALSE on failure. Sets the integer value associated
- * with the key @k to @v in the configuration database.
+ * Sets the integer value associated with the key @a k to @a v in the
+ * configuration database.
  */
 int ewl_config_set_int(char *config, char *k, int v)
 {
@@ -89,13 +91,14 @@
 
 
 /**
- * ewl_config_set_float - set the value of key to the specified float
- * @config: in what config to search for the key
- * @k: the key to set in the configuration database
- * @v: the float value that will be associated with the key
+ * @param config: in what config to search for the key
+ * @param k: the key to set in the configuration database
+ * @param v: the float value that will be associated with the key
+ * @return Returns TRUE on success, FALSE on failure.
+ * @brief Set the value of key to the specified float
  *
- * Returns TRUE on success, FALSE on failure. Sets the float value associated
- * with the key @k to @v in the configuration database.
+ * Sets the float value associated with the key @a k to @a v in the
+ * configuration database.
  */
 int ewl_config_set_float(char *config, char *k, float v)
 {
@@ -113,12 +116,10 @@
 
 
 /**
- * ewl_config_get_str - retrieve string value associated with a key
- * @config: in what config to search for the key
- * @k: the key to search
- *
- * Returns the string value associated with key @k in the configuration
- * database on success, NULL on failure.
+ * @param config: in what config to search for the key
+ * @param k: the key to search
+ * @return Returns the found string value on success, NULL on failure.
+ * @brief Retrieve string value associated with a key
  */
 char           *ewl_config_get_str(char *config, char *k)
 {
@@ -137,12 +138,10 @@
 
 
 /**
- * ewl_config_get_int - retrieve integer value associated with a key
- * @config: in what config to search for the key
- * @k: the key to search
- *
- * Returns the integer value associated with key @k in the configuration
- * database on success, 0 on failure.
+ * @param config: in what config to search for the key
+ * @param k: the key to search
+ * @return Returns the found integer value on success, 0 on failure.
+ * @brief Retrieve integer value associated with a key
  */
 int ewl_config_get_int(char *config, char *k)
 {
@@ -164,12 +163,10 @@
 }
 
 /**
- * ewl_config_get_float - retrieve floating point value associated with a key
- * @config: in what config to search for the key
- * @k: the key to search
- *
- * Returns the float value associated with key @k in the configuration
- * database on success, 0.0 on failure.
+ * @param config: in what config to search for the key
+ * @param k: the key to search
+ * @return Returns the found float value on success, 0.0 on failure.
+ * @brief Retrieve floating point value associated with a key
  */
 float ewl_config_get_float(char *config, char *k)
 {
@@ -191,9 +188,8 @@
 }
 
 /**
- * ewl_config_get_render_method - retrieve the render method of the evas
- *
- * Returns the found render method on success, software rendering on failure.
+ * @return Returns the found render method, default software render.
+ * @brief Retrieve the render method of the evas
  */
 int ewl_config_get_render_method()
 {
@@ -210,10 +206,11 @@
 }
 
 /**
- * ewl_config_reread_and_apply - reread the values of the configuration database
+ * @return Returns no value.
+ * @brief Reread the values of the configuration database
  *
- * Returns no value. Reads in the values of the configuration database and
- * applies them to the running ewl program.
+ * Reads in the values of the configuration database and applies them to the
+ * running ewl program.
  */
 void ewl_config_reread_and_apply(void)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ewl_container.c     29 Sep 2003 21:46:50 -0000      1.44
+++ ewl_container.c     6 Oct 2003 17:39:54 -0000       1.45
@@ -10,6 +10,9 @@
 void            __ewl_container_unrealize(Ewl_Widget *w, void *ev_data,
                                          void *user_data);
 
+void            __ewl_evas_clip_box_del(void *data, Evas *e, Evas_Object *obj,
+                                       void *event_info);
+
 /**
  * @param c: the container to initialize
  * @param appearance: the appearance key for this container
@@ -508,7 +511,7 @@
 
 /**
  * @param c: the container receiving a new child widget
- * @w: the child widget added to the container
+ * @param w: the child widget added to the container
  * @return Returns no value.
  * @brief Triggers the child_add callback for the container @a c.
  */
@@ -601,6 +604,9 @@
         * to the wanted area.
         */
        c->clip_box = evas_object_rectangle_add(emb->evas);
+
+       evas_object_event_callback_add(c->clip_box, EVAS_CALLBACK_FREE,
+                       __ewl_evas_clip_box_del, c);
        evas_object_move(c->clip_box, CURRENT_X(w), CURRENT_Y(w));
        evas_object_resize(c->clip_box, CURRENT_W(w), CURRENT_H(w));
        evas_object_clip_set(c->clip_box, w->fx_clip_box);
@@ -673,4 +679,14 @@
        }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void
+__ewl_evas_clip_box_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ewl_Container *c;
+
+       c = EWL_CONTAINER(data);
+       c->clip_box = NULL;
+       ewl_widget_destroy(EWL_WIDGET(c));
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cursor.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_cursor.h        4 Sep 2003 01:48:35 -0000       1.10
+++ ewl_cursor.h        6 Oct 2003 17:39:54 -0000       1.11
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /cursor/file
+ * @themekey /cursor/group
+ */
+
+/**
  * The cursor indicates where in an Ewl_Entry typed text will be placed.
  */
 typedef struct Ewl_Cursor Ewl_Cursor;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_embed.h 4 Sep 2003 01:48:35 -0000       1.4
+++ ewl_embed.h 6 Oct 2003 17:39:54 -0000       1.5
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /embed/file
+ * @themekey /embed/group
+ */
+
+/**
  * The embed structure is mostly a container for holding widgets and a
  * wrapper evas smart object.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_entry.h 4 Sep 2003 01:48:35 -0000       1.24
+++ ewl_entry.h 6 Oct 2003 17:39:54 -0000       1.25
@@ -9,6 +9,11 @@
  */
 
 /**
+ * @themekey /entry/file
+ * @themekey /entry/group
+ */
+
+/**
  * Inherits from the Ewl_Widget and provides single line editable text.
  */
 typedef struct Ewl_Entry Ewl_Entry;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_floater.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_floater.h       1 Sep 2003 04:57:07 -0000       1.5
+++ ewl_floater.h       6 Oct 2003 17:39:54 -0000       1.6
@@ -11,6 +11,11 @@
  */
 
 /**
+ * @themekey /floater/file
+ * @themekey /floater/group
+ */
+
+/**
  * The floater is a container for widgets that need to be drawn on top
  * of multiple widgets (ie. dropdownbox)
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_image.h 4 Sep 2003 01:48:35 -0000       1.15
+++ ewl_image.h 6 Oct 2003 17:39:54 -0000       1.16
@@ -8,6 +8,11 @@
  * @{
  */
 
+/**
+ * @themekey /image/file
+ * @themekey /image/group
+ */
+
 typedef enum Ewl_Image_Type Ewl_Image_Type;
 
 enum Ewl_Image_Type
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_imenu.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_imenu.h 5 Sep 2003 03:07:04 -0000       1.4
+++ ewl_imenu.h 6 Oct 2003 17:39:55 -0000       1.5
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /imenu/file
+ * @themekey /imenu/group
+ */
+
+/**
  * A simple internal menu, it is limited to drawing within the current evas.
  */
 typedef struct Ewl_IMenu Ewl_IMenu;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_menu.h  5 Sep 2003 15:17:37 -0000       1.3
+++ ewl_menu.h  6 Oct 2003 17:39:55 -0000       1.4
@@ -9,6 +9,11 @@
  */
 
 /**
+ * @themekey /menu/file
+ * @themekey /menu/group
+ */
+
+/**
  * A simple popup menu widget, with the capability of being nested inside
  * another menu.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_misc.c  29 Sep 2003 21:46:50 -0000      1.39
+++ ewl_misc.c  6 Oct 2003 17:39:55 -0000       1.40
@@ -3,9 +3,10 @@
 
 int             ewl_idle_render(void *data);
 
-char           *xdisplay = NULL;
 extern Ewd_List *ewl_embed_list;
 
+unsigned int    phase_status = 0;
+char           *xdisplay = NULL;
 Ewd_List *configure_list = NULL;
 Ewd_List *realize_list = NULL;
 Ewd_List *destroy_list = NULL;
@@ -486,6 +487,42 @@
                        ewl_widget_realize(EWL_WIDGET(w));
                }
        }
+}
+
+/**
+ * @return Returns no value.
+ * @brief Marks that EWL is currently realizing a widget.
+ */
+void ewl_enter_realize_phase()
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       phase_status |= EWL_FLAG_QUEUED_RSCHEDULED;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @return Returns no value.
+ * @brief Marks that EWL is not realizing a widget.
+ */
+void ewl_exit_realize_phase()
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       phase_status &= ~EWL_FLAG_QUEUED_RSCHEDULED;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @return Returns TRUE if currently realizing a widget, FALSE otherwise.
+ * @brief Checks if EWL is currently in the process of realizing widgets.
+ */
+int ewl_in_realize_phase()
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DRETURN_INT((phase_status & EWL_FLAG_QUEUED_RSCHEDULED), DLEVEL_STABLE);
 }
 
 void ewl_destroy_request(Ewl_Widget *w)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_misc.h  29 Sep 2003 21:46:50 -0000      1.18
+++ ewl_misc.h  6 Oct 2003 17:39:55 -0000       1.19
@@ -25,5 +25,8 @@
 void            ewl_realize_queue();
 void           ewl_destroy_request(Ewl_Widget *w);
 void           ewl_garbage_collect();
+void            ewl_enter_realize_phase();
+void            ewl_exit_realize_phase();
+int             ewl_in_realize_phase();
 
 #endif                         /* __EWL_MISC_H__ */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_radiobutton.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_radiobutton.h   4 Sep 2003 01:48:35 -0000       1.12
+++ ewl_radiobutton.h   6 Oct 2003 17:39:55 -0000       1.13
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /radiobutton/file
+ * @themekey /radiobutton/group
+ */
+
+/**
  * The radio button provides a means for selecting a single item from a group
  * of options.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_scrollbar.h     29 Sep 2003 21:46:51 -0000      1.9
+++ ewl_scrollbar.h     6 Oct 2003 17:39:55 -0000       1.10
@@ -9,6 +9,23 @@
  */
 
 /**
+ * @themekey /hscrollbar/file
+ * @themekey /hscrollbar/group
+ * @themekey /vscrollbar/file
+ * @themekey /vscrollbar/group
+ *
+ * @themekey /hscrollbar/seeker/file
+ * @themekey /hscrollbar/seeker/group
+ * @themekey /vscrollbar/seeker/file
+ * @themekey /vscrollbar/seeker/group
+ *
+ * @themekey /hscrollbar/seeker/button/file
+ * @themekey /hscrollbar/seeker/button/group
+ * @themekey /vscrollbar/seeker/button/file
+ * @themekey /vscrollbar/seeker/button/group
+ */
+
+/**
  * Provides a seeker with increment and decrement buttons arranged in a
  * specified order.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_scrollpane.h    5 Sep 2003 03:07:04 -0000       1.5
+++ ewl_scrollpane.h    6 Oct 2003 17:39:55 -0000       1.6
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /scrollpane/file
+ * @themekey /scrollpane/group
+ */
+
+/**
  * The scrollpane provides a way to pan around large collections of images.
  */
 typedef struct Ewl_ScrollPane Ewl_ScrollPane;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_seeker.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_seeker.h        29 Sep 2003 21:46:51 -0000      1.17
+++ ewl_seeker.h        6 Oct 2003 17:39:55 -0000       1.18
@@ -11,6 +11,13 @@
  */
 
 /**
+ * @themekey /hseeker/file
+ * @themekey /hseeker/group
+ * @themekey /vseeker/file
+ * @themekey /vseeker/group
+ */
+
+/**
  * The Ewl_Seeker provides a means to select a value from a range using a
  * draggable button.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_separator.h     1 Sep 2003 04:57:07 -0000       1.14
+++ ewl_separator.h     6 Oct 2003 17:39:55 -0000       1.15
@@ -9,6 +9,13 @@
  */
 
 /**
+ * @themekey /hseparator/file
+ * @themekey /hseparator/group
+ * @themekey /vseparator/file
+ * @themekey /vseparator/group
+ */
+
+/**
  * Provides an Ewl_Widget to simply act as a separator between other
  * Ewl_Widget's.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spacer.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_spacer.h        1 Sep 2003 04:57:07 -0000       1.4
+++ ewl_spacer.h        6 Oct 2003 17:39:55 -0000       1.5
@@ -11,6 +11,11 @@
  */
 
 /**
+ * @themekey /spacer/file
+ * @themekey /spacer/group
+ */
+
+/**
  * The Ewl_Spacer is a simple widget that is used to tweak spacing in an app.
  */
 typedef struct Ewl_Spacer Ewl_Spacer;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_spinner.h       5 Sep 2003 15:17:37 -0000       1.16
+++ ewl_spinner.h       6 Oct 2003 17:39:55 -0000       1.17
@@ -10,6 +10,11 @@
  */
 
 /**
+ * @themekey /spinner/file
+ * @themekey /spinner/group
+ */
+
+/**
  * A combination of entry and increment/decrement buttons for adjusting
  * numerical values.
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- ewl_widget.c        29 Sep 2003 21:46:51 -0000      1.73
+++ ewl_widget.c        6 Oct 2003 17:39:55 -0000       1.74
@@ -40,6 +40,11 @@
                                     void *user_data);
  */
 
+void __ewl_evas_object_del(void *data, Evas *e, Evas_Object *obj,
+               void *event_info);
+void __ewl_evas_clip_del(void *data, Evas *e, Evas_Object *obj,
+               void *event_info);
+
 void __ewl_widget_get_theme_padding(Ewl_Widget *w, int *l, int *r, int *t,
                int *b);
 void __ewl_widget_get_theme_insets(Ewl_Widget *w, int *l, int *r, int *t,
@@ -130,6 +135,8 @@
        if (REALIZED(w))
                DRETURN(DLEVEL_STABLE);
 
+       ewl_enter_realize_phase();
+
        /*
         * The parent's realize function will get us here again.
         */
@@ -140,6 +147,8 @@
                ewl_widget_show(w);
        }
 
+       ewl_exit_realize_phase();
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
@@ -755,6 +764,8 @@
         * entire contents of the widget
         */
        w->fx_clip_box = evas_object_rectangle_add(emb->evas);
+       evas_object_event_callback_add(w->fx_clip_box, EVAS_CALLBACK_FREE,
+                       __ewl_evas_clip_del, w);
        evas_object_layer_set(w->fx_clip_box, ewl_widget_get_layer_sum(w));
 
        pc = EWL_CONTAINER(w->parent);
@@ -817,6 +828,9 @@
                 * Load the theme object
                 */
                w->theme_object = edje_object_add(emb->evas);
+               evas_object_event_callback_add(w->theme_object,
+                               EVAS_CALLBACK_FREE, __ewl_evas_object_del, w);
+               
                edje_object_file_set(w->theme_object, i, group);
                FREE(i);
                IF_FREE(group);
@@ -895,7 +909,6 @@
         */
        if (w->fx_clip_box) {
                evas_object_del(w->fx_clip_box);
-               w->fx_clip_box = NULL;
        }
 
        /*
@@ -1135,4 +1148,24 @@
                ewl_container_remove_child(EWL_CONTAINER(w->parent), w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void
+__ewl_evas_object_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ewl_Widget *w;
+
+       w = EWL_WIDGET(data);
+       w->theme_object = NULL;
+       ewl_widget_destroy(w);
+}
+
+void
+__ewl_evas_clip_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ewl_Widget *w;
+
+       w = EWL_WIDGET(data);
+       w->fx_clip_box = NULL;
+       ewl_widget_destroy(w);
 }




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