Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_attach.c ewl_box.h ewl_calendar.h ewl_colordialog.c ewl_colorpicker.h ewl_combo.c ewl_container.c ewl_datepicker.h ewl_dialog.c ewl_dialog.h ewl_entry.h ewl_fileselector.h ewl_floater.c ewl_floater.h ewl_iconbox.c ewl_iconbox.h ewl_image.h ewl_imenu.c ewl_misc.c ewl_object.c ewl_selectionbar.c ewl_separator.c Log Message: Convert floater to new API. Convert dialog to new API. Change separator fill policy on orientation change. Remove some unused code. Stricter constructor function prototypes. Fixed some constructor calls. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_attach.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_attach.c 8 Oct 2005 06:08:33 -0000 1.5 +++ ewl_attach.c 9 Oct 2005 05:18:39 -0000 1.6 @@ -6,7 +6,7 @@ typedef struct Ewl_Attach_Tooltip Ewl_Attach_Tooltip; struct Ewl_Attach_Tooltip { - Ewl_Widget *embed; + Ewl_Widget *embed; Ewl_Widget *win; Ewl_Widget *box; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_box.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_box.h 3 Oct 2005 06:43:06 -0000 1.5 +++ ewl_box.h 9 Oct 2005 05:18:39 -0000 1.6 @@ -44,9 +44,9 @@ unsigned int homogeneous; /**< Flag indicating space assignemnt */ }; -Ewl_Widget *ewl_box_new(); -Ewl_Widget *ewl_hbox_new(); -Ewl_Widget *ewl_vbox_new(); +Ewl_Widget *ewl_box_new(void); +Ewl_Widget *ewl_hbox_new(void); +Ewl_Widget *ewl_vbox_new(void); int ewl_box_init(Ewl_Box * box); void ewl_box_orientation_set(Ewl_Box * b, Ewl_Orientation o); Ewl_Orientation ewl_box_orientation_get(Ewl_Box * b); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_calendar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ewl_calendar.h 11 Jul 2005 11:52:06 -0000 1.3 +++ ewl_calendar.h 9 Oct 2005 05:18:39 -0000 1.4 @@ -43,7 +43,7 @@ }; -Ewl_Widget *ewl_calendar_new(); +Ewl_Widget *ewl_calendar_new(void); int ewl_calendar_init(Ewl_Calendar* calendar); void ewl_calendar_grid_setup(Ewl_Calendar* cal); void ewl_calendar_ascii_time_get(Ewl_Calendar* cal, char* str); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_colordialog.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ewl_colordialog.c 5 Oct 2005 05:41:01 -0000 1.12 +++ ewl_colordialog.c 9 Oct 2005 05:18:39 -0000 1.13 @@ -70,7 +70,7 @@ * HSV values, ok and cancel buttons */ - vbox = ewl_box_new(EWL_ORIENTATION_VERTICAL); + vbox = ewl_vbox_new(); ewl_box_spacing_set(EWL_BOX(vbox), 10); ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); ewl_object_alignment_set(EWL_OBJECT(vbox), EWL_FLAG_ALIGN_CENTER); @@ -89,7 +89,7 @@ ewl_widget_color_set(cd->preview, r, g, b, 255); ewl_widget_show(cd->preview); - hbox = ewl_box_new(EWL_ORIENTATION_HORIZONTAL); + hbox = ewl_hbox_new(); ewl_box_spacing_set(EWL_BOX(hbox), 5); ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_HFILL); ewl_object_alignment_set(EWL_OBJECT(hbox), EWL_FLAG_ALIGN_CENTER); @@ -132,7 +132,7 @@ ewl_colordialog_bluevalue_changed, cd); ewl_widget_show(cd->blue_entry); - hbox = ewl_box_new(EWL_ORIENTATION_HORIZONTAL); + hbox = ewl_hbox_new(); ewl_box_spacing_set(EWL_BOX(hbox), 5); ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_HFILL); ewl_object_alignment_set(EWL_OBJECT(hbox), EWL_FLAG_ALIGN_CENTER); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_colorpicker.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_colorpicker.h 28 Sep 2005 02:10:09 -0000 1.9 +++ ewl_colorpicker.h 9 Oct 2005 05:18:39 -0000 1.10 @@ -23,7 +23,7 @@ Ewl_Widget *range; }; -Ewl_Widget *ewl_colorpicker_new(); +Ewl_Widget *ewl_colorpicker_new(void); int ewl_colorpicker_init(Ewl_ColorPicker *cp); void ewl_colorpicker_color_set(Ewl_ColorPicker *cp, int r, int g, int b); void ewl_colorpicker_hue_set(Ewl_ColorPicker *cp, float h); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_combo.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ewl_combo.c 3 Oct 2005 06:43:06 -0000 1.6 +++ ewl_combo.c 9 Oct 2005 05:18:39 -0000 1.7 @@ -104,7 +104,9 @@ /* * Create the popup combo portion of the widget. */ - combo->base.popup = ewl_floater_new(EWL_WIDGET(combo)); + combo->base.popup = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(combo->base.popup), + EWL_WIDGET(combo)); ewl_widget_internal_set(combo->base.popup, TRUE); ewl_widget_layer_set(combo->base.popup, 1000); ewl_widget_appearance_set(EWL_WIDGET(combo->base.popup), "imenu"); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ewl_container.c 3 Oct 2005 06:43:06 -0000 1.13 +++ ewl_container.c 9 Oct 2005 05:18:39 -0000 1.14 @@ -855,24 +855,18 @@ */ void ewl_container_child_hide_call(Ewl_Container *c, Ewl_Widget *w) { - int hide = 1; - DENTER_FUNCTION(DLEVEL_STABLE); if (c->child_hide && !VISIBLE(w) && REALIZED(w)) c->child_hide(c, w); - ecore_list_goto_first(c->children); - while ((w = ecore_list_next(c->children))) { - if (VISIBLE(w)) { - hide = 0; - break; - } + if (c->clip_box) { + const Evas_List *clippees; + clippees = evas_object_clipees_get(c->clip_box); + if (!clippees) + evas_object_hide(c->clip_box); } - if (hide && c->clip_box) - evas_object_hide(c->clip_box); - ewl_widget_configure(EWL_WIDGET(c)); DLEAVE_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_datepicker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_datepicker.h 10 Jul 2005 09:09:32 -0000 1.1 +++ ewl_datepicker.h 9 Oct 2005 05:18:39 -0000 1.2 @@ -39,7 +39,7 @@ }; -Ewl_Widget *ewl_datepicker_new(); +Ewl_Widget *ewl_datepicker_new(void); int ewl_datepicker_init(Ewl_DatePicker* datepicker); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_dialog.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_dialog.c 5 Oct 2005 05:41:01 -0000 1.5 +++ ewl_dialog.c 9 Oct 2005 05:18:39 -0000 1.6 @@ -4,11 +4,10 @@ #include "ewl_private.h" /** - * @param pos: the position of the action area. * @return Returns a pointer to a new dialog on success, NULL on failure. * @brief Create a new internal dialog */ -Ewl_Widget *ewl_dialog_new(Ewl_Position pos) +Ewl_Widget *ewl_dialog_new(void) { Ewl_Dialog *d; @@ -18,21 +17,19 @@ if (!d) DRETURN_PTR(NULL, DLEVEL_STABLE); - ewl_dialog_init(d, pos); + ewl_dialog_init(d); DRETURN_PTR(EWL_WIDGET(d), DLEVEL_STABLE); } /** * @param dialog: the dialog to initialize. - * @param pos: the position of the action area. * @return Return TRUE on success, FALSE otherwise. * @brief Initialize an internal dialog to starting values */ -int ewl_dialog_init(Ewl_Dialog * dialog, Ewl_Position pos) +int ewl_dialog_init(Ewl_Dialog * dialog) { Ewl_Widget *w; - Ewl_Widget *box; Ewl_Widget *spacer; DENTER_FUNCTION(DLEVEL_STABLE); @@ -46,155 +43,47 @@ ewl_widget_appearance_set(w, "window"); ewl_widget_inherit(w, "dialog"); - dialog->position = pos; + dialog->position = EWL_POSITION_BOTTOM; - switch (pos) { - case EWL_POSITION_LEFT: - box = ewl_hbox_new(); - break; - case EWL_POSITION_RIGHT: - box = ewl_hbox_new(); - break; - case EWL_POSITION_TOP: - box = ewl_vbox_new(); - break; - default: - box = ewl_vbox_new(); - break; - } - - if (box) { - ewl_container_child_append(EWL_CONTAINER(dialog), box); - ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_ALL); - ewl_widget_show(box); + /* + * Create a box for laying out the whole window + */ + dialog->box = ewl_vbox_new(); + if (dialog->box) { + ewl_container_child_append(EWL_CONTAINER(dialog), dialog->box); + ewl_object_fill_policy_set(EWL_OBJECT(dialog->box), + EWL_FLAG_FILL_ALL); + ewl_widget_show(dialog->box); } + /* + * Setup a vertical box for the displayed window contents. + */ dialog->vbox = ewl_vbox_new(); ewl_object_fill_policy_set(EWL_OBJECT(dialog->vbox), EWL_FLAG_FILL_ALL); if (dialog->vbox) { - ewl_container_child_append(EWL_CONTAINER(box), + ewl_container_child_append(EWL_CONTAINER(dialog->box), dialog->vbox); ewl_box_homogeneous_set(EWL_BOX(dialog->vbox), FALSE); - switch (pos) { - case EWL_POSITION_LEFT: - { - dialog->action_area = ewl_vbox_new(); - dialog->separator = ewl_vseparator_new(); - break; - } - case EWL_POSITION_RIGHT: - { - dialog->action_area = ewl_vbox_new(); - dialog->separator = ewl_vseparator_new(); - break; - } - case EWL_POSITION_TOP: - { - dialog->action_area = ewl_hbox_new(); - dialog->separator = ewl_hseparator_new(); - break; - } - default: - { - dialog->action_area = ewl_hbox_new(); - dialog->separator = ewl_hseparator_new(); - break; - } - } + dialog->action_area = ewl_hbox_new(); + dialog->separator = ewl_hseparator_new(); ewl_widget_show(dialog->vbox); } if (dialog->separator) { - switch (pos) { - case EWL_POSITION_LEFT: - { - ewl_container_child_prepend(EWL_CONTAINER - (box), - dialog-> - separator); - break; - } - case EWL_POSITION_TOP: - { - ewl_container_child_prepend(EWL_CONTAINER - (box), - dialog-> - separator); - break; - } - case EWL_POSITION_RIGHT: - { - ewl_container_child_append(EWL_CONTAINER - (box), - dialog-> - separator); - break; - } - default: - { - ewl_container_child_append(EWL_CONTAINER - (box), - dialog-> - separator); - break; - } - } - ewl_object_fill_policy_set(EWL_OBJECT(dialog->separator), - EWL_FLAG_FILL_SHRINK); + ewl_container_child_append(EWL_CONTAINER(dialog->box), + dialog->separator); ewl_widget_show(dialog->separator); } + /* + * Create an action area for buttons + */ if (dialog->action_area) { - switch (pos) { - case EWL_POSITION_LEFT: - { - ewl_container_child_prepend(EWL_CONTAINER - (box), - dialog-> - action_area); - ewl_object_fill_policy_set(EWL_OBJECT - (dialog-> - action_area), - EWL_FLAG_FILL_VFILL); - break; - } - case EWL_POSITION_TOP: - { - ewl_container_child_prepend(EWL_CONTAINER - (box), - dialog-> - action_area); - ewl_object_fill_policy_set(EWL_OBJECT - (dialog-> - action_area), - EWL_FLAG_FILL_HFILL); - break; - } - case EWL_POSITION_RIGHT: - { - ewl_container_child_append(EWL_CONTAINER - (box), - dialog-> - action_area); - ewl_object_fill_policy_set(EWL_OBJECT - (dialog-> - action_area), - EWL_FLAG_FILL_VFILL); - break; - } - default: - { - ewl_container_child_append(EWL_CONTAINER - (box), - dialog-> - action_area); - ewl_object_fill_policy_set(EWL_OBJECT - (dialog-> - action_area), - EWL_FLAG_FILL_HFILL); - break; - } - } + ewl_container_child_append(EWL_CONTAINER(dialog->box), + dialog->action_area); + ewl_object_fill_policy_set(EWL_OBJECT(dialog->action_area), + EWL_FLAG_FILL_HFILL); ewl_box_homogeneous_set(EWL_BOX(dialog->action_area), FALSE); @@ -216,6 +105,77 @@ } /** + * @param d: dialog to change action area position + * @param pos: the new position for the new action area + * @return Returns no value. + * @brief Changes the action area position for a dialog. + */ +void ewl_dialog_action_position_set(Ewl_Dialog *d, Ewl_Position pos) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("d", d); + + if (pos == d->position) + DRETURN(DLEVEL_STABLE); + + d->position = pos; + + /* + * First determine the orientation of the dialog area. + */ + if (pos & EWL_POSITION_LEFT & EWL_POSITION_RIGHT) { + ewl_box_orientation_set(EWL_BOX(d->box), + EWL_ORIENTATION_HORIZONTAL); + ewl_box_orientation_set(EWL_BOX(d->separator), + EWL_ORIENTATION_VERTICAL); + ewl_box_orientation_set(EWL_BOX(d->action_area), + EWL_ORIENTATION_VERTICAL); + } + else { + ewl_box_orientation_set(EWL_BOX(d->box), + EWL_ORIENTATION_VERTICAL); + ewl_box_orientation_set(EWL_BOX(d->separator), + EWL_ORIENTATION_HORIZONTAL); + ewl_box_orientation_set(EWL_BOX(d->action_area), + EWL_ORIENTATION_HORIZONTAL); + } + + ewl_container_child_remove(EWL_CONTAINER(d->box), d->separator); + ewl_container_child_remove(EWL_CONTAINER(d->box), d->action_area); + + /* + * Repack order of the widgets to match new position + */ + if (pos & EWL_POSITION_LEFT & EWL_POSITION_TOP) { + ewl_container_child_prepend(EWL_CONTAINER(d->box), + d->separator); + ewl_container_child_prepend(EWL_CONTAINER(d->box), + d->action_area); + } + else { + ewl_container_child_append(EWL_CONTAINER(d->box), + d->separator); + ewl_container_child_append(EWL_CONTAINER(d->box), + d->action_area); + } + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @param d: dialog to check action area position + * @return Returns the current action area position. + * @brief Checks the action area position for a dialog. + */ +Ewl_Position ewl_dialog_action_position_get(Ewl_Dialog *d) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET("d", d, EWL_POSITION_BOTTOM); + + DRETURN_INT(d->position, DLEVEL_STABLE); +} + +/** * @param dialog: the dialog to add the widget in. * @param w: the widget to add in the vbox. * @return Returns no value. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_dialog.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ewl_dialog.h 17 Feb 2005 19:14:54 -0000 1.3 +++ ewl_dialog.h 9 Oct 2005 05:18:39 -0000 1.4 @@ -40,22 +40,26 @@ { Ewl_Window window; /* Inherit from a window */ - Ewl_Widget *vbox; /* the box where messages are displayed */ + Ewl_Widget *box; /* The box for window layout */ + Ewl_Widget *vbox; /* The box where messages are displayed */ Ewl_Widget *action_area; /* The box where the buttons are added */ Ewl_Widget *separator; /* The separator between vbox and action_area */ - Ewl_Position position; /* position of the action_area */ + Ewl_Position position; /* Position of the action_area */ }; -Ewl_Widget *ewl_dialog_new (Ewl_Position pos); -int ewl_dialog_init (Ewl_Dialog *dialog, Ewl_Position pos); +Ewl_Widget *ewl_dialog_new (void); +int ewl_dialog_init (Ewl_Dialog *dialog); -void ewl_dialog_widget_add(Ewl_Dialog *dialog, Ewl_Widget *w); -Ewl_Widget *ewl_dialog_button_add(Ewl_Dialog *dialog, char *button_text, - int response_id); -Ewl_Widget *ewl_dialog_button_left_add(Ewl_Dialog *dialog, char *button_text, - int response_id); +void ewl_dialog_action_position_set(Ewl_Dialog *d, Ewl_Position pos); +Ewl_Position ewl_dialog_action_position_get(Ewl_Dialog *dialog); + +void ewl_dialog_widget_add(Ewl_Dialog *dialog, Ewl_Widget *w); +Ewl_Widget *ewl_dialog_button_add(Ewl_Dialog *dialog, char *button_text, + int response_id); +Ewl_Widget *ewl_dialog_button_left_add(Ewl_Dialog *dialog, char *button_text, + int response_id); unsigned int ewl_dialog_has_separator_get (Ewl_Dialog *dialog); void ewl_dialog_has_separator_set (Ewl_Dialog *dialog, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_entry.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_entry.h 3 Oct 2005 06:43:06 -0000 1.9 +++ ewl_entry.h 9 Oct 2005 05:18:39 -0000 1.10 @@ -14,7 +14,7 @@ unsigned int in_select_mode; }; -Ewl_Widget *ewl_entry_new(); +Ewl_Widget *ewl_entry_new(void); int ewl_entry_init(Ewl_Entry *e); void ewl_entry_multiline_set(Ewl_Entry *e, unsigned int multiline); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_fileselector.h 14 Jul 2005 05:59:35 -0000 1.10 +++ ewl_fileselector.h 9 Oct 2005 05:18:39 -0000 1.11 @@ -51,7 +51,7 @@ unsigned int multi_select; /**< is the selector multi select or not */ }; -Ewl_Widget *ewl_fileselector_new(); +Ewl_Widget *ewl_fileselector_new(void); int ewl_fileselector_init(Ewl_Fileselector *fs); char *ewl_fileselector_path_get(Ewl_Fileselector *fs); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_floater.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ewl_floater.c 3 Oct 2005 06:43:06 -0000 1.4 +++ ewl_floater.c 9 Oct 2005 05:18:39 -0000 1.5 @@ -4,14 +4,10 @@ #include "ewl_private.h" /** - * @param parent: the parent widget to follow if desired * @return Returns NULL on failure, or the new floater widget on success. * @brief Allocate a new floater widget - * - * The @a parent widget should be either a widget to follow - * relative too, or a window for absolute positioning. */ -Ewl_Widget *ewl_floater_new(Ewl_Widget * parent) +Ewl_Widget *ewl_floater_new(void) { Ewl_Widget *f; @@ -21,7 +17,7 @@ if (!f) DRETURN_PTR(NULL, DLEVEL_STABLE); - ewl_floater_init(EWL_FLOATER(f), parent); + ewl_floater_init(EWL_FLOATER(f)); DRETURN_PTR(EWL_WIDGET(f), DLEVEL_STABLE); } @@ -29,20 +25,17 @@ /** * @param f: the floater widget - * @param parent: the parent widget, we need this to get the evas and clip_box * @return Returns no value. * @brief Initialize a floater to default values * * Sets the fields and callbacks of the floater @a f to their defaults. */ -int ewl_floater_init(Ewl_Floater * f, Ewl_Widget * parent) +int ewl_floater_init(Ewl_Floater * f) { Ewl_Widget *w; - /* Ewl_Window *window; */ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("f", f, FALSE); - DCHECK_PARAM_PTR_RET("parent", parent, FALSE); w = EWL_WIDGET(f); @@ -58,21 +51,48 @@ ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NORMAL); ewl_widget_appearance_set(w, "floater"); ewl_widget_inherit(w, "floater"); - f->follows = parent; + + ewl_callback_append(EWL_WIDGET(f), EWL_CALLBACK_DESTROY, + ewl_floater_follow_destroy_cb, w); + + DRETURN_INT(FALSE, DLEVEL_STABLE); +} + +void ewl_floater_follow_set(Ewl_Floater *f, Ewl_Widget *p) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("f", f); + + /* + * Don't follow the old parent. + */ + if (f->follows) { + ewl_callback_del_with_data(p, EWL_CALLBACK_CONFIGURE, + ewl_floater_follow_configure_cb, f); + } /* * Need to add callbacks to the window that contains it as well the * widget it follows, if they are not the same. */ - ewl_callback_append(EWL_WIDGET(f->follows), EWL_CALLBACK_CONFIGURE, - ewl_floater_parent_configure_cb, w); - ewl_callback_append(EWL_WIDGET(f), EWL_CALLBACK_DESTROY, - ewl_floater_parent_destroy_cb, w); + if (p) { + ewl_callback_append(p, EWL_CALLBACK_CONFIGURE, + ewl_floater_follow_configure_cb, f); + } - f->x = CURRENT_X(EWL_OBJECT(parent)); - f->y = CURRENT_Y(EWL_OBJECT(parent)); + f->follows = p; - DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_configure(EWL_WIDGET(f)); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +Ewl_Widget *ewl_floater_follow_get(Ewl_Floater *f) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR_RET("f", f, NULL); + + DRETURN_PTR(f->follows, DLEVEL_STABLE); } /** @@ -130,7 +150,7 @@ */ if (f->follows) ewl_callback_del(f->follows, EWL_CALLBACK_CONFIGURE, - ewl_floater_parent_configure_cb); + ewl_floater_follow_configure_cb); /* * Set the widget that the floater follows. @@ -146,7 +166,7 @@ * Use this to ensure the floater gets configured when the parent/window is. */ void -ewl_floater_parent_configure_cb(Ewl_Widget * w, void *ev_data __UNUSED__, +ewl_floater_follow_configure_cb(Ewl_Widget * w, void *ev_data __UNUSED__, void *user_data) { int align, x, y; @@ -204,7 +224,7 @@ } void -ewl_floater_parent_destroy_cb(Ewl_Widget * w, void *ev_data __UNUSED__, +ewl_floater_follow_destroy_cb(Ewl_Widget * w, void *ev_data __UNUSED__, void *user_data __UNUSED__) { DENTER_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_floater.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ewl_floater.h 3 Oct 2005 06:43:06 -0000 1.3 +++ ewl_floater.h 9 Oct 2005 05:18:39 -0000 1.4 @@ -42,16 +42,19 @@ }; -Ewl_Widget *ewl_floater_new(Ewl_Widget * parent); +Ewl_Widget *ewl_floater_new(void); +int ewl_floater_init(Ewl_Floater * f); +void ewl_floater_follow_set(Ewl_Floater *f, Ewl_Widget *p); +Ewl_Widget *ewl_floater_follow_get(Ewl_Floater *f); void ewl_floater_position_set(Ewl_Floater * parent, int x, int y); -int ewl_floater_init(Ewl_Floater * f, Ewl_Widget * parent); +void ewl_floater_position_get(Ewl_Floater * parent, int *x, int *y); /* * Internally used callbacks, override at your own risk. */ -void ewl_floater_parent_configure_cb(Ewl_Widget * w, void *ev_data, +void ewl_floater_follow_configure_cb(Ewl_Widget * w, void *ev_data, void *user_data); -void ewl_floater_parent_destroy_cb(Ewl_Widget * w, void *ev_data, +void ewl_floater_follow_destroy_cb(Ewl_Widget * w, void *ev_data, void *user_data); void ewl_floater_reparent_cb(Ewl_Widget * parent, void *ev_data, void *user_data); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_iconbox.c 7 Oct 2005 10:42:01 -0000 1.25 +++ ewl_iconbox.c 9 Oct 2005 05:18:39 -0000 1.26 @@ -196,7 +196,9 @@ /*** Context menu **/ /*Make the menu floater */ - ib->ewl_iconbox_menu_floater = ewl_floater_new(ib->ewl_iconbox_pane_inner); + ib->ewl_iconbox_menu_floater = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(ib->ewl_iconbox_menu_floater), + ib->ewl_iconbox_pane_inner); ewl_object_fill_policy_set(EWL_OBJECT(ib->ewl_iconbox_menu_floater), EWL_FLAG_FILL_FILL); @@ -238,7 +240,9 @@ ewl_object_fill_policy_set(EWL_OBJECT(ib), EWL_FLAG_FILL_ALL); /* Create the selector / selector floater */ - ib->select_floater = ewl_floater_new(ib->ewl_iconbox_pane_inner); + ib->select_floater = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(ib->select_floater), + ib->ewl_iconbox_pane_inner); ewl_object_fill_policy_set(EWL_OBJECT(ib->select_floater), EWL_FLAG_FILL_FILL); ib->select =ewl_button_new(); @@ -274,9 +278,11 @@ ewl_entry_cursor_position_set(EWL_ENTRY_CURSOR(EWL_ENTRY(ib->entry)->cursor), 50); ewl_widget_show(ib->entry); - ib->entry_floater = ewl_floater_new(ib->ewl_iconbox_pane_inner); + ib->entry_floater = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(ib->entry_floater), + ib->ewl_iconbox_pane_inner); /*ewl_widget_show(ib->entry_floater);*/ - ib->entry_box = ewl_box_new(EWL_ORIENTATION_HORIZONTAL); + ib->entry_box = ewl_hbox_new(); ewl_widget_show(ib->entry_box); ewl_container_child_append(EWL_CONTAINER(ib->entry_floater), ib->entry_box); ewl_container_child_append(EWL_CONTAINER(ib->entry_box), ib->entry); @@ -840,7 +846,9 @@ EWL_ICONBOX_ICON(ib)->selected = 0; - EWL_ICONBOX_ICON(ib)->floater = ewl_floater_new(iconbox->ewl_iconbox_pane_inner); + EWL_ICONBOX_ICON(ib)->floater = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(iconbox->ewl_iconbox_pane_inner), + iconbox->ewl_iconbox_pane_inner); /*Set the label*/ ewl_iconbox_icon_label_setup(EWL_ICONBOX_ICON(ib), name); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ewl_iconbox.h 2 Oct 2005 00:57:41 -0000 1.8 +++ ewl_iconbox.h 9 Oct 2005 05:18:39 -0000 1.9 @@ -99,8 +99,8 @@ }; -Ewl_Widget *ewl_iconbox_new(); -Ewl_Widget *ewl_iconbox_icon_new(); +Ewl_Widget *ewl_iconbox_new(void); +Ewl_Widget *ewl_iconbox_icon_new(void); int ewl_iconbox_init(Ewl_IconBox* iconbox); int ewl_iconbox_icon_init(Ewl_IconBox_Icon* icon); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_image.h 3 Oct 2005 06:43:07 -0000 1.5 +++ ewl_image.h 9 Oct 2005 05:18:39 -0000 1.6 @@ -48,7 +48,7 @@ } tile; }; -Ewl_Widget *ewl_image_new(); +Ewl_Widget *ewl_image_new(void); void ewl_image_init(Ewl_Image * i); void ewl_image_file_set(Ewl_Image * i, char *im, char *key); char *ewl_image_file_get(Ewl_Image * i); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_imenu.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ewl_imenu.c 5 Sep 2005 14:12:15 -0000 1.3 +++ ewl_imenu.c 9 Oct 2005 05:18:39 -0000 1.4 @@ -52,7 +52,8 @@ /* * Create the popup menu portion of the widget. */ - menu->base.popup = ewl_floater_new(EWL_WIDGET(menu)); + menu->base.popup = ewl_floater_new(); + ewl_floater_follow_set(EWL_FLOATER(menu->base.popup), EWL_WIDGET(menu)); ewl_widget_internal_set(menu->base.popup, TRUE); ewl_widget_layer_set(menu->base.popup, 1000); ewl_widget_appearance_set(EWL_WIDGET(menu->base.popup), "imenu"); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ewl_misc.c 2 Oct 2005 03:11:55 -0000 1.15 +++ ewl_misc.c 9 Oct 2005 05:18:39 -0000 1.16 @@ -329,9 +329,18 @@ evas_event_freeze(emb->evas); } - if (!ecore_list_is_empty(configure_list)) + while (!ecore_list_is_empty(configure_list)) { ewl_configure_queue(); + /* + * Reclaim obscured objects at this point + */ + + /* + * Allocate objects to revealed widgets. + */ + } + edje_thaw(); /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_object.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ewl_object.c 5 Sep 2005 14:12:15 -0000 1.6 +++ ewl_object.c 9 Oct 2005 05:18:39 -0000 1.7 @@ -243,11 +243,6 @@ ewl_container_child_resize(EWL_WIDGET(o), new_size - old_size, EWL_ORIENTATION_HORIZONTAL); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -297,11 +292,6 @@ ewl_container_child_resize(EWL_WIDGET(o), new_size - old_size, EWL_ORIENTATION_VERTICAL); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -684,11 +674,6 @@ if (CURRENT_W(o) < w) ewl_object_w_request(o, w); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -733,11 +718,6 @@ if (CURRENT_H(o) < h) ewl_object_h_request(o, h); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -901,11 +881,6 @@ if (CURRENT_W(o) > w) ewl_object_h_request(o, w); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -944,11 +919,6 @@ if (CURRENT_H(o) > h) ewl_object_h_request(o, h); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -1097,11 +1067,6 @@ ewl_container_child_resize(EWL_WIDGET(o), dv, EWL_ORIENTATION_VERTICAL); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -1222,11 +1187,6 @@ ewl_container_child_resize(EWL_WIDGET(o), dv, EWL_ORIENTATION_VERTICAL); - /* - if (EWL_WIDGET(o)->parent) - ewl_widget_configure(EWL_WIDGET(o)->parent); - */ - DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -1409,35 +1369,6 @@ ewl_object_flags_remove(o, EWL_FLAGS_FILL_MASK, EWL_FLAGS_FILL_MASK); ewl_object_flags_add(o, fill, EWL_FLAGS_FILL_MASK); - /* - * Notify the parent of a resize if the fill policy causes the returned - * minimum size to change. Check horizontal change first. - */ - /* FIXME: - if ((old_mask & EWL_FLAG_FILL_HSHRINK) && - !(fill & EWL_FLAG_FILL_HSHRINK)) - ewl_container_child_resize(EWL_WIDGET(o), PREFERRED_W(o) - - MINIMUM_W(o), EWL_ORIENTATION_HORIZONTAL); - else if (!(old_mask & EWL_FLAG_FILL_HSHRINK) && - (fill & EWL_FLAG_FILL_HSHRINK)) - ewl_container_child_resize(EWL_WIDGET(o), MINIMUM_W(o) - - PREFERRED_W(o), EWL_ORIENTATION_HORIZONTAL); - */ - - /* - * Now the vertical change - */ - /* FIXME: - if ((old_mask & EWL_FLAG_FILL_VSHRINK) && - !(fill & EWL_FLAG_FILL_VSHRINK)) - ewl_container_child_resize(EWL_WIDGET(o), PREFERRED_H(o) - - MINIMUM_H(o), EWL_ORIENTATION_VERTICAL); - else if (!(old_mask & EWL_FLAG_FILL_VSHRINK) && - (fill & EWL_FLAG_FILL_VSHRINK)) - ewl_container_child_resize(EWL_WIDGET(o), MINIMUM_H(o) - - PREFERRED_H(o), EWL_ORIENTATION_VERTICAL); - */ - if (EWL_WIDGET(o)->parent) ewl_widget_configure(EWL_WIDGET(o)->parent); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_selectionbar.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_selectionbar.c 3 Oct 2005 06:43:07 -0000 1.5 +++ ewl_selectionbar.c 9 Oct 2005 05:18:39 -0000 1.6 @@ -52,7 +52,8 @@ w = EWL_WIDGET(s); - ewl_floater_init(EWL_FLOATER(s), parent); + ewl_floater_init(EWL_FLOATER(s)); + ewl_floater_follow_set(EWL_FLOATER(s), parent); ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, ewl_selectionbar_configure_cb, NULL); ewl_callback_append(w, EWL_CALLBACK_REALIZE, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_separator.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_separator.c 5 Oct 2005 10:45:32 -0000 1.7 +++ ewl_separator.c 9 Oct 2005 05:18:39 -0000 1.8 @@ -77,7 +77,8 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_widget_appearance_set(EWL_WIDGET(s), "hseparator"); - ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_HFILL); + ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_HFILL | + EWL_FLAG_FILL_SHRINK); ewl_widget_inherit(w, "separator"); ewl_object_alignment_set(EWL_OBJECT(s), EWL_FLAG_ALIGN_LEFT); @@ -99,9 +100,15 @@ if (o == EWL_ORIENTATION_HORIZONTAL) { ewl_widget_appearance_set(EWL_WIDGET(s), "hseparator"); + ewl_object_fill_policy_set(EWL_OBJECT(s), + EWL_FLAG_FILL_HFILL | + EWL_FLAG_FILL_HSHRINK); } else { ewl_widget_appearance_set(EWL_WIDGET(s), "vseparator"); + ewl_object_fill_policy_set(EWL_OBJECT(s), + EWL_FLAG_FILL_VFILL | + EWL_FLAG_FILL_VSHRINK); } ewl_widget_configure(EWL_WIDGET(s)); ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs