Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_callback.h ewl_cell.h ewl_check.h ewl_checkbutton.c 
        ewl_config.h ewl_container.c ewl_container.h ewl_debug.h 
        ewl_embed.c ewl_embed.h ewl_events.c ewl_menu_base.h 
        ewl_misc.c ewl_misc.h ewl_progressbar.h ewl_row.h 
        ewl_scrollbar.c ewl_scrollpane.c ewl_seeker.c 
        ewl_selectionbook.h ewl_spacer.h ewl_spectrum.h ewl_spinner.h 
        ewl_tree.c ewl_tree.h ewl_widget.c ewl_window.h 


Log Message:
Added a mechanism for automatically reparenting widgets into complex
containers. Also ensure that smart object callbacks don't access stale
pointers to the embed widget.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_callback.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_callback.h      16 Oct 2003 20:54:25 -0000      1.27
+++ ewl_callback.h      25 Nov 2003 07:47:29 -0000      1.28
@@ -86,8 +86,8 @@
                        ((unsigned int)w->callbacks[t] & \
                         EWL_CALLBACK_NOTIFY_MASK)
 
-void            ewl_callbacks_init();
-void            ewl_callbacks_deinit();
+void            ewl_callbacks_init(void);
+void            ewl_callbacks_deinit(void);
 int             ewl_callback_append(Ewl_Widget * widget, Ewl_Callback_Type type,
                                    Ewl_Callback_Function func,
                                    void *user_data);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cell.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_cell.h  19 Nov 2003 20:18:34 -0000      1.7
+++ ewl_cell.h  25 Nov 2003 07:47:29 -0000      1.8
@@ -27,7 +27,7 @@
        Ewl_Container container; /**< Inherit from the Ewl_Container */
 };
 
-Ewl_Widget *ewl_cell_new();
+Ewl_Widget *ewl_cell_new(void);
 int ewl_cell_init(Ewl_Cell *cell);
 
 /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_check.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_check.h 19 Nov 2003 20:18:34 -0000      1.5
+++ ewl_check.h 25 Nov 2003 07:47:29 -0000      1.6
@@ -35,7 +35,7 @@
        int             checked; /**< Indicates if this is checked */
 };
 
-Ewl_Widget     *ewl_check_new();
+Ewl_Widget     *ewl_check_new(void);
 void            ewl_check_init(Ewl_Check * c);
 int             ewl_check_is_checked(Ewl_Check * c);
 void            ewl_check_set_checked(Ewl_Check * c, int checked);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_checkbutton.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ewl_checkbutton.c   19 Nov 2003 20:18:34 -0000      1.38
+++ ewl_checkbutton.c   25 Nov 2003 07:47:29 -0000      1.39
@@ -53,6 +53,7 @@
         * Add the check box first.
         */
        cb->check = ewl_check_new();
+       ewl_widget_set_internal(cb->check, TRUE);
        ewl_callback_del(cb->check, EWL_CALLBACK_CLICKED, ewl_check_clicked_cb);
        ewl_container_prepend_child(EWL_CONTAINER(cb), cb->check);
        ewl_widget_show(cb->check);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_config.h        4 Nov 2003 07:16:45 -0000       1.24
+++ ewl_config.h        25 Nov 2003 07:47:29 -0000      1.25
@@ -37,7 +37,7 @@
 char           *ewl_config_get_str(char *config, char *k);
 int             ewl_config_get_int(char *config, char *k);
 float           ewl_config_get_float(char *config, char *k);
-char *          ewl_config_get_render_method();
+char *          ewl_config_get_render_method(void);
 void            ewl_config_reread_and_apply(void);
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- ewl_container.c     22 Nov 2003 20:01:01 -0000      1.53
+++ ewl_container.c     25 Nov 2003 07:47:29 -0000      1.54
@@ -133,6 +133,9 @@
                DRETURN(DLEVEL_STABLE);
        }
 
+       while (pc->redirect)
+               pc = pc->redirect;
+
        if (ewd_list_is_empty(pc->children) && pc->clip_box)
                evas_object_show(pc->clip_box);
 
@@ -162,6 +165,9 @@
                DRETURN(DLEVEL_STABLE);
        }
 
+       while (pc->redirect)
+               pc = pc->redirect;
+
        if (ewd_list_is_empty(pc->children) && pc->clip_box)
                evas_object_show(pc->clip_box);
 
@@ -194,6 +200,9 @@
                DRETURN(DLEVEL_STABLE);
        }
 
+       while (pc->redirect)
+               pc = pc->redirect;
+
        if (ewd_list_is_empty(pc->children) && pc->clip_box)
                evas_object_show(pc->clip_box);
 
@@ -220,6 +229,14 @@
        DCHECK_PARAM_PTR("pc", pc);
        DCHECK_PARAM_PTR("child", child);
 
+       if (child == EWL_WIDGET(pc->redirect))
+               pc->redirect = NULL;
+
+       if (child->parent != EWL_WIDGET(pc)) {
+               while (pc->redirect)
+                       pc = pc->redirect;
+       }
+
        /*
         * First remove reference to the parent if necessary.
         */
@@ -419,7 +436,8 @@
  * @return Returns no value.
  * @brief Destroy all children of the container
  *
- * Destroys all the children of the container but not the container itself.
+ * Destroys all the children of the container but not the container itself or
+ * internally used widgets.
  */
 void ewl_container_reset(Ewl_Container * c)
 {
@@ -428,11 +446,18 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("c", c);
 
+       while (c->redirect)
+               c = c->redirect;
+
        /*
         * Loop through removing each child and destroying it.
         */
-       while ((w = ewd_list_goto_last(c->children)))
-               ewl_container_remove_child(c, w);
+       while ((w = ewd_list_goto_last(c->children))) {
+               if (!ewl_object_has_flags(EWL_OBJECT(w),
+                                       EWL_FLAG_PROPERTY_INTERNAL,
+                                       EWL_FLAGS_PROPERTY_MASK))
+                       ewl_container_remove_child(c, w);
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -595,13 +620,14 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("c", c);
 
+       c->redirect = NULL;
        if (c->children) {
                /*
                 * Destroy any children still in the container.
                 */
-               ewd_list_goto_first(c->children);
-               while ((child = ewd_list_remove_last(c->children)))
+               while ((child = ewd_list_remove_last(c->children))) {
                        ewl_widget_destroy(child);
+               }
 
                /*
                 * Destroy the container list and set it to NULL.
@@ -609,6 +635,59 @@
                ewd_list_destroy(c->children);
                c->children = NULL;
        }
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param c: the container to retrieve it's redirection end container
+ * @return Returns the container children are placed in, NULL if none.
+ * @brief Searches for the last redirected container of the container.
+ */
+Ewl_Container *ewl_container_get_end_redirect(Ewl_Container *c)
+{
+       Ewl_Container *rc;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("c", c, NULL);
+
+       if (!c->redirect)
+               DRETURN_PTR(NULL, DLEVEL_STABLE);
+
+       while (c->redirect) {
+               rc = c->redirect;
+               c = c->redirect;
+       }
+
+       DRETURN_PTR(rc, DLEVEL_STABLE);
+}
+
+/**
+ * @param c: the container to retrieve it's redirection container
+ * @return Returns the container children are placed in, NULL if none.
+ * @brief Retrieves for the redirected container of the container.
+ */
+Ewl_Container *ewl_container_get_redirect(Ewl_Container *c)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("c", c, NULL);
+
+       DRETURN_PTR(c->redirect, DLEVEL_STABLE);
+}
+
+/**
+ * @param c: the container to change it's redirection container
+ * @param rc: the new container to redirect children to
+ * @return Returns no value.
+ * @brief Changes the redirected container of the container.
+ */
+void ewl_container_set_redirect(Ewl_Container *c, Ewl_Container *rc)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("c", c);
+       DCHECK_PARAM_PTR("rc", rc);
+
+       c->redirect = rc;
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_container.h     19 Nov 2003 20:18:34 -0000      1.27
+++ ewl_container.h     25 Nov 2003 07:47:29 -0000      1.28
@@ -56,6 +56,7 @@
        Ewl_Child_Add    child_add; /**< Function called on child add */
        Ewl_Child_Add    child_remove; /**< Function called on child remove */
        Ewl_Child_Resize child_resize; /**< Function called on child resize */
+       Ewl_Container   *redirect; /**< Non-internal widgets placed here */
 };
 
 void            ewl_container_init(Ewl_Container * widget, char *appearance,
@@ -92,6 +93,9 @@
                                             Ewl_Orientation o);
 void            ewl_container_call_child_add(Ewl_Container *c, Ewl_Widget *w);
 void            ewl_container_call_child_remove(Ewl_Container *c, Ewl_Widget *w);
+Ewl_Container  *ewl_container_get_end_redirect(Ewl_Container *c);
+Ewl_Container  *ewl_container_get_redirect(Ewl_Container *c);
+void            ewl_container_set_redirect(Ewl_Container *c, Ewl_Container *rc);
 
 /*
  * Internally used callbacks, override at your own risk.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_debug.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_debug.h 26 Mar 2003 05:22:02 -0000      1.17
+++ ewl_debug.h 25 Nov 2003 07:47:29 -0000      1.18
@@ -6,7 +6,7 @@
 #define DLEVEL_TESTING 10
 #define DLEVEL_STABLE 20
 
-inline void     ewl_print_warning();
+inline void     ewl_print_warning(void);
 
 #define DENTER_FUNCTION(lvl) \
 { \
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_embed.c 20 Nov 2003 02:21:29 -0000      1.16
+++ ewl_embed.c 25 Nov 2003 07:47:29 -0000      1.17
@@ -310,6 +310,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        if (EWL_EMBED(w)->smart) {
+               evas_object_smart_data_set(EWL_EMBED(w)->smart, NULL);
                ewl_evas_object_destroy(EWL_EMBED(w)->smart);
                EWL_EMBED(w)->smart = NULL;
        }
@@ -430,8 +431,10 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       emb->smart = NULL;
-       ewl_widget_unrealize(EWL_WIDGET(emb));
+       if (emb) {
+               emb->smart = NULL;
+               ewl_widget_unrealize(EWL_WIDGET(emb));
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -443,7 +446,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_widget_set_layer(EWL_WIDGET(emb), l);
+       if (emb)
+               ewl_widget_set_layer(EWL_WIDGET(emb), l);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -458,7 +462,8 @@
        l = evas_object_layer_get(obj);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_widget_set_layer(EWL_WIDGET(emb), l);
+       if (emb)
+               ewl_widget_set_layer(EWL_WIDGET(emb), l);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -471,10 +476,11 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       l = evas_object_layer_get(obj);
-
        emb = evas_object_smart_data_get(obj);
-       ewl_widget_set_layer(EWL_WIDGET(emb), l);
+       if (emb) {
+               l = evas_object_layer_get(obj);
+               ewl_widget_set_layer(EWL_WIDGET(emb), l);
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -487,7 +493,9 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_object_request_position(EWL_OBJECT(emb), (int)(x), (int)(y));
+       if (emb)
+               ewl_object_request_position(EWL_OBJECT(emb), (int)(x),
+                                           (int)(y));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -500,7 +508,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_object_request_size(EWL_OBJECT(emb), (int)(w), (int)(h));
+       if (emb)
+               ewl_object_request_size(EWL_OBJECT(emb), (int)(w), (int)(h));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -512,7 +521,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_widget_show(EWL_WIDGET(emb));
+       if (emb)
+               ewl_widget_show(EWL_WIDGET(emb));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -524,7 +534,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       ewl_widget_hide(EWL_WIDGET(emb));
+       if (emb)
+               ewl_widget_hide(EWL_WIDGET(emb));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -548,12 +559,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       if (!emb) {
-               printf("No smart data on object?!?\n");
-               DRETURN(DLEVEL_STABLE);
-       }
-
-       if (EWL_WIDGET(emb)->fx_clip_box
+       if (emb && EWL_WIDGET(emb)->fx_clip_box
                        && clip != EWL_WIDGET(emb)->fx_clip_box)
                evas_object_clip_set(EWL_WIDGET(emb)->fx_clip_box, clip);
 
@@ -567,7 +573,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        emb = evas_object_smart_data_get(obj);
-       if (EWL_WIDGET(emb)->fx_clip_box)
+       if (emb && EWL_WIDGET(emb)->fx_clip_box)
                evas_object_clip_unset(EWL_WIDGET(emb)->fx_clip_box);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_embed.h 19 Nov 2003 20:18:34 -0000      1.9
+++ ewl_embed.h 25 Nov 2003 07:47:29 -0000      1.10
@@ -41,7 +41,7 @@
        Evas_Object *smart; /**< Object to manipulate Ewl_Embed from evas */
 };
 
-Ewl_Widget     *ewl_embed_new();
+Ewl_Widget     *ewl_embed_new(void);
 int             ewl_embed_init(Ewl_Embed * win);
 Evas_Object    *ewl_embed_set_evas(Ewl_Embed *emb, Evas *evas,
                                   Ecore_X_Window evas_window);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- ewl_events.c        18 Nov 2003 18:28:49 -0000      1.41
+++ ewl_events.c        25 Nov 2003 07:47:29 -0000      1.42
@@ -3,6 +3,7 @@
 
 
 Ewl_Widget     *last_selected = NULL;
+Ewl_Widget     *last_clicked = NULL;
 Ewl_Widget     *last_key = NULL;
 Ewl_Widget     *last_focused = NULL;
 Ewl_Widget     *dnd_widget = NULL;
@@ -271,6 +272,11 @@
                }
        }
 
+       if (ev->double_click)
+               last_clicked = widget;
+       else
+               last_clicked = NULL;
+
        /*
         * While the mouse is down the widget has a pressed state, the widget
         * and its parents are notified in this change of state.
@@ -329,6 +335,11 @@
                                        EWL_FLAG_STATE_PRESSED);
                        ewl_callback_call_with_event_data(temp,
                                        EWL_CALLBACK_MOUSE_UP, ev);
+
+                       if (last_selected == last_clicked)
+                               ewl_callback_call_with_event_data(temp,
+                                               EWL_CALLBACK_DOUBLE_CLICKED,
+                                               ev);
                }
 
                temp = temp->parent;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu_base.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_menu_base.h     19 Nov 2003 20:18:34 -0000      1.9
+++ ewl_menu_base.h     25 Nov 2003 07:47:29 -0000      1.10
@@ -79,7 +79,7 @@
 void            ewl_menu_item_init(Ewl_Menu_Item * menu, char *image,
                                   char *title);
 
-Ewl_Menu_Separator *ewl_menu_separator_new();
+Ewl_Menu_Separator *ewl_menu_separator_new(void);
 void            ewl_menu_separator_init(Ewl_Menu_Separator *sep);
 
 void            ewl_menu_base_init(Ewl_Menu_Base * menu, char *image,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- ewl_misc.c  22 Nov 2003 20:01:02 -0000      1.54
+++ ewl_misc.c  25 Nov 2003 07:47:29 -0000      1.55
@@ -107,6 +107,30 @@
 
 /**
  * @return Returns no value.
+ * @brief Cleanup internal data structures used by ewl.
+ *
+ * This should be called to cleanup internal EWL data structures, if using
+ * ecore directly rather than using ewl_main().
+ */
+void ewl_deinit()
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       ecore_timer_del(config_timer);
+       ewl_callbacks_deinit();
+
+       ewd_list_destroy(configure_list);
+       ewd_list_destroy(realize_list);
+       ewd_list_destroy(destroy_list);
+       ewd_list_destroy(free_evas_list);
+       ewd_list_destroy(free_evas_object_list);
+       ewd_list_destroy(child_add_list);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @return Returns no value.
  * @brief The main execution loop of EWL
  * 
  * This is the  main execution loop of ewl. It dispatches
@@ -117,6 +141,7 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ecore_main_loop_begin();
+       ewl_deinit();
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -197,15 +222,6 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
 
        ecore_main_loop_quit();
-       ecore_timer_del(config_timer);
-       ewl_callbacks_deinit();
-
-       ewd_list_destroy(configure_list);
-       ewd_list_destroy(realize_list);
-       ewd_list_destroy(destroy_list);
-       ewd_list_destroy(free_evas_list);
-       ewd_list_destroy(free_evas_object_list);
-       ewd_list_destroy(child_add_list);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- ewl_misc.h  28 Oct 2003 18:49:34 -0000      1.22
+++ ewl_misc.h  25 Nov 2003 07:47:29 -0000      1.23
@@ -16,18 +16,19 @@
 };
 
 void            ewl_init(int *argc, char **argv);
+void            ewl_deinit(void);
 void            ewl_main(void);
 void            ewl_main_quit(void);
 void            ewl_configure_request(Ewl_Widget * w);
-void            ewl_configure_queue();
+void            ewl_configure_queue(void);
 void            ewl_configure_cancel_request(Ewl_Widget *w);
 void            ewl_realize_request(Ewl_Widget *w);
-void            ewl_realize_queue();
+void            ewl_realize_queue(void);
 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();
+void           ewl_garbage_collect(void);
+void            ewl_enter_realize_phase(void);
+void            ewl_exit_realize_phase(void);
+int             ewl_in_realize_phase(void);
 void            ewl_evas_destroy(Evas *evas);
 void            ewl_evas_object_destroy(Evas_Object *obj);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_progressbar.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_progressbar.h   19 Nov 2003 20:18:35 -0000      1.4
+++ ewl_progressbar.h   25 Nov 2003 07:47:29 -0000      1.5
@@ -42,7 +42,7 @@
 };
 
 
-Ewl_Widget *ewl_progressbar_new();
+Ewl_Widget *ewl_progressbar_new(void);
 void ewl_progressbar_init (Ewl_Progressbar * p);
 
 void ewl_progressbar_set_value (Ewl_Progressbar * p, double v);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_row.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_row.h   19 Nov 2003 20:18:35 -0000      1.11
+++ ewl_row.h   25 Nov 2003 07:47:29 -0000      1.12
@@ -13,7 +13,7 @@
        Ewl_Row *header;
 };
 
-Ewl_Widget *ewl_row_new();
+Ewl_Widget *ewl_row_new(void);
 int ewl_row_init(Ewl_Row *row);
 
 void ewl_row_set_header(Ewl_Row *row, Ewl_Row *header);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_scrollbar.c     19 Nov 2003 20:18:35 -0000      1.27
+++ ewl_scrollbar.c     25 Nov 2003 07:47:29 -0000      1.28
@@ -55,6 +55,7 @@
         * Create the basic widgets that are contained in the scrollbar.
         */
        s->button_decrement = ewl_button_new(NULL);
+       ewl_widget_set_internal(s->button_decrement, TRUE);
        ewl_object_set_alignment(EWL_OBJECT(s->button_decrement),
                        EWL_FLAG_ALIGN_CENTER);
        ewl_object_set_fill_policy(EWL_OBJECT(s->button_decrement),
@@ -65,6 +66,7 @@
         * Create the increment button.
         */
        s->button_increment = ewl_button_new(NULL);
+       ewl_widget_set_internal(s->button_increment, TRUE);
        ewl_object_set_alignment(EWL_OBJECT(s->button_increment),
                        EWL_FLAG_ALIGN_CENTER);
        ewl_object_set_fill_policy(EWL_OBJECT(s->button_increment),
@@ -75,6 +77,7 @@
         * Setup the seeker portion
         */
        s->seeker = ewl_seeker_new(orientation);
+       ewl_widget_set_internal(s->seeker, TRUE);
        ewl_widget_show(s->seeker);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_scrollpane.c    19 Nov 2003 20:18:35 -0000      1.29
+++ ewl_scrollpane.c    25 Nov 2003 07:47:29 -0000      1.30
@@ -62,10 +62,16 @@
        ewl_container_append_child(EWL_CONTAINER(s), s->hscrollbar);
        ewl_container_append_child(EWL_CONTAINER(s), s->vscrollbar);
 
+       ewl_widget_set_internal(s->box, TRUE);
+       ewl_widget_set_internal(s->hscrollbar, TRUE);
+       ewl_widget_set_internal(s->vscrollbar, TRUE);
+
        ewl_widget_show(s->box);
        ewl_widget_show(s->hscrollbar);
        ewl_widget_show(s->vscrollbar);
 
+       ewl_container_set_redirect(EWL_CONTAINER(s), EWL_CONTAINER(s->box));
+
        /*
         * Append necessary callbacks for the scrollpane.
         */
@@ -310,6 +316,7 @@
  */
 void ewl_scrollpane_add_cb(Ewl_Container * parent, Ewl_Widget * child)
 {
+       int pw, ph;
        Ewl_ScrollPane *s;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -319,12 +326,27 @@
 
        s = EWL_SCROLLPANE(parent);
 
-       if ((child != s->box) && (child != s->hscrollbar) &&
-                       (child != s->vscrollbar)) {
-               ewl_container_append_child(EWL_CONTAINER
-                                          (EWL_SCROLLPANE(parent)->box),
-                                          child);
+       if (child == s->vscrollbar) {
+               pw = PREFERRED_W(parent) +
+                       ewl_object_get_preferred_w(EWL_OBJECT(child));
+               ph = MAX(PREFERRED_H(parent),
+                               ewl_object_get_preferred_h(EWL_OBJECT(child)));
        }
+       else if (child == s->hscrollbar) {
+               pw = MAX(PREFERRED_W(parent),
+                               ewl_object_get_preferred_w(EWL_OBJECT(child)));
+               ph = PREFERRED_H(parent) +
+                       ewl_object_get_preferred_h(EWL_OBJECT(child));
+       }
+       else {
+               pw = PREFERRED_W(parent) +
+                       ewl_object_get_preferred_w(EWL_OBJECT(child));
+               ph = PREFERRED_H(parent) +
+                       ewl_object_get_preferred_h(EWL_OBJECT(child));
+       }
+
+       ewl_object_set_preferred_w(EWL_OBJECT(parent), pw);
+       ewl_object_set_preferred_h(EWL_OBJECT(parent), ph);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -348,11 +370,11 @@
        if (o == EWL_ORIENTATION_HORIZONTAL) {
                ewl_object_set_preferred_w(EWL_OBJECT(parent),
                                ewl_object_get_preferred_w(EWL_OBJECT(s->box)) +
-                               ewl_object_get_preferred_h(EWL_OBJECT(s->vscrollbar)));
+                               ewl_object_get_preferred_w(EWL_OBJECT(s->vscrollbar)));
        }
        else
                ewl_object_set_preferred_h(EWL_OBJECT(parent),
-                               ewl_object_get_preferred_w(EWL_OBJECT(s->box)) +
+                               ewl_object_get_preferred_h(EWL_OBJECT(s->box)) +
                                ewl_object_get_preferred_h(EWL_OBJECT(s->hscrollbar)));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_seeker.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_seeker.c        19 Nov 2003 20:18:35 -0000      1.49
+++ ewl_seeker.c        25 Nov 2003 07:47:29 -0000      1.50
@@ -64,6 +64,7 @@
         * Create and add the button portion of the seeker
         */
        s->button = ewl_button_new(NULL);
+       ewl_widget_set_internal(s->button, TRUE);
        ewl_container_append_child(EWL_CONTAINER(s), s->button);
        ewl_widget_show(s->button);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_selectionbook.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_selectionbook.h 19 Nov 2003 20:18:35 -0000      1.3
+++ ewl_selectionbook.h 25 Nov 2003 07:47:29 -0000      1.4
@@ -29,7 +29,7 @@
 };
 
 
-Ewl_Widget     *ewl_selectionbook_new();
+Ewl_Widget     *ewl_selectionbook_new(void);
 void            ewl_selectionbook_init(Ewl_Selectionbook * s);
 void            ewl_selectionbook_add_page(Ewl_Selectionbook * s,
                                           Ewl_Widget * tab, Ewl_Widget * page);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spacer.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_spacer.h        16 Oct 2003 20:54:25 -0000      1.6
+++ ewl_spacer.h        25 Nov 2003 07:47:29 -0000      1.7
@@ -37,7 +37,7 @@
  */
 #define EWL_SPACER(spacer) ((Ewl_Spacer *) spacer)
 
-Ewl_Widget     *ewl_spacer_new();
+Ewl_Widget     *ewl_spacer_new(void);
 void            ewl_spacer_init(Ewl_Spacer * s);
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spectrum.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_spectrum.h      19 Nov 2003 20:18:36 -0000      1.2
+++ ewl_spectrum.h      25 Nov 2003 07:47:29 -0000      1.3
@@ -26,7 +26,7 @@
        int             redraw;
 };
 
-Ewl_Widget     *ewl_spectrum_new();
+Ewl_Widget     *ewl_spectrum_new(void);
 void            ewl_spectrum_init(Ewl_Spectrum * cp);
 
 void            ewl_spectrum_mode_set(Ewl_Spectrum * sp,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_spinner.h       19 Nov 2003 20:18:36 -0000      1.19
+++ ewl_spinner.h       25 Nov 2003 07:47:29 -0000      1.20
@@ -43,7 +43,7 @@
        Ewl_Widget     *button_decrease; /**< Ewl_Button to subtract value */
 };
 
-Ewl_Widget     *ewl_spinner_new();
+Ewl_Widget     *ewl_spinner_new(void);
 void            ewl_spinner_init(Ewl_Spinner * s);
 void            ewl_spinner_set_value(Ewl_Spinner * s, double value);
 double          ewl_spinner_get_value(Ewl_Spinner * s);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_tree.c  19 Nov 2003 20:18:36 -0000      1.28
+++ ewl_tree.c  25 Nov 2003 07:47:29 -0000      1.29
@@ -1,7 +1,5 @@
 #include "Ewl.h"
 
-void ewl_tree_add_cb(Ewl_Container *c, Ewl_Widget *w);
-
 void ewl_tree_node_configure_cb(Ewl_Widget * w, void *ev_data,
                             void *user_data);
 void ewl_tree_node_clicked_cb(Ewl_Widget * w, void *ev_data,
@@ -93,9 +91,8 @@
        ewl_container_append_child(EWL_CONTAINER(tree), tree->scrollarea);
        ewl_widget_show(tree->scrollarea);
 
-       ewl_container_add_notify(EWL_CONTAINER(tree), ewl_tree_add_cb);
-
-       ewl_container_remove_notify(EWL_CONTAINER(tree), NULL);
+       ewl_container_set_redirect(EWL_CONTAINER(tree),
+                                  EWL_CONTAINER(tree->scrollarea));
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
@@ -186,6 +183,7 @@
                        break;
                }
 
+               ewl_widget_set_internal(cell, TRUE);
                ewl_container_append_child(EWL_CONTAINER(row), cell);
                ewl_object_set_fill_policy(EWL_OBJECT(cell),
                                EWL_FLAG_FILL_HFILL |
@@ -465,20 +463,6 @@
                ewl_widget_show(w);
 
        ewl_widget_set_state(EWL_WIDGET(node), "expanded");
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-void
-ewl_tree_add_cb(Ewl_Container *c, Ewl_Widget *w)
-{
-       Ewl_Tree *t;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-
-       t = EWL_TREE(c);
-       if (w != t->scrollarea && w != t->header)
-               ewl_container_append_child(EWL_CONTAINER(t->scrollarea), w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ewl_tree.h  16 Oct 2003 20:54:25 -0000      1.15
+++ ewl_tree.h  25 Nov 2003 07:47:29 -0000      1.16
@@ -58,7 +58,7 @@
 /*
  * Node creation/initialization functions.
  */
-Ewl_Widget *ewl_tree_node_new();
+Ewl_Widget *ewl_tree_node_new(void);
 int ewl_tree_node_init(Ewl_Tree_Node *tree_node);
 
 /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- ewl_widget.c        22 Nov 2003 20:01:02 -0000      1.89
+++ ewl_widget.c        25 Nov 2003 07:47:29 -0000      1.90
@@ -665,9 +665,7 @@
        snprintf(path, PATH_MAX, "%s/%s",
                        (w->parent ? w->parent->appearance : ""), base);
 
-       base = w->appearance;
-       FREE(base);
-
+       FREE(w->appearance);
        w->appearance = strdup(path);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -1066,6 +1064,7 @@
         */
        if (w->theme_object) {
                ewl_evas_object_destroy(w->theme_object);
+               w->theme_object = NULL;
        }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_window.h        4 Nov 2003 07:16:45 -0000       1.24
+++ ewl_window.h        25 Nov 2003 07:47:29 -0000      1.25
@@ -42,7 +42,7 @@
        int             y; /**< Screen relative vertical position of window */
 };
 
-Ewl_Widget     *ewl_window_new();
+Ewl_Widget     *ewl_window_new(void);
 int             ewl_window_init(Ewl_Window * win);
 Ewl_Window     *ewl_window_find_window(Ecore_X_Window window);
 void            ewl_window_set_title(Ewl_Window * win, char *title);




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to