forked from enlightenment/efl
elementary_test: Fix efl_add_ref to efl_add for window autodel
Fix this error message ERR<15404>:eo ../src/lib/eo/eo_base_class.c:710 efl_del() Calling efl_del on object Efl.Ui.Win@0x400000a4b774[2]:hidden:children=0:'(null)':'(null)' with no parent is not advised any more. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10863
This commit is contained in:
parent
e617ff441a
commit
55d987b418
|
@ -332,7 +332,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
Evas_Object *win, *box, *cs;
|
Evas_Object *win, *box, *cs;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"),
|
efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
||||||
efl_ui_win_alpha_set(efl_added, 1));
|
efl_ui_win_alpha_set(efl_added, 1));
|
||||||
|
@ -408,7 +408,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
Evas_Object *rd, *c;
|
Evas_Object *rd, *c;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"),
|
efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
||||||
efl_ui_win_alpha_set(efl_added, EINA_FALSE));
|
efl_ui_win_alpha_set(efl_added, EINA_FALSE));
|
||||||
|
|
|
@ -433,7 +433,7 @@ test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
current_date = time(NULL) + SEC_PER_YEAR;
|
current_date = time(NULL) + SEC_PER_YEAR;
|
||||||
localtime_r(¤t_date, &max_date);
|
localtime_r(¤t_date, &max_date);
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Ui Calendar"),
|
efl_text_set(efl_added, "Efl Ui Calendar"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
Evas_Object *win, *img;
|
Evas_Object *win, *img;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Gfx Map"),
|
efl_text_set(efl_added, "Efl Gfx Map"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
|
||||||
// This line must to need.
|
// This line must to need.
|
||||||
setenv("ELM_ACCEL", "gl", 1);
|
setenv("ELM_ACCEL", "gl", 1);
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
|
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
|
||||||
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
@ -573,7 +573,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
|
||||||
Eo *win, *box;
|
Eo *win, *box;
|
||||||
char buf[255];
|
char buf[255];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
|
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
|
||||||
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
|
@ -141,7 +141,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
Eo *win, *box, *box2, *box3, *box4, *label, *anim_view, *check, *slider;
|
Eo *win, *box, *box2, *box3, *box4, *label, *anim_view, *check, *slider;
|
||||||
char buf[255];
|
char buf[255];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
Eo *win, *box;
|
Eo *win, *box;
|
||||||
char buf[255];
|
char buf[255];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
|
||||||
Eo *en;
|
Eo *en;
|
||||||
char *markup;
|
char *markup;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Canvas_Layout"),
|
efl_text_set(efl_added, "Efl Canvas_Layout"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
Evas_Object *win, *img;
|
Evas_Object *win, *img;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Evas Map"),
|
efl_text_set(efl_added, "Evas Map"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
Elm_Genlist_Item_Class *itc;
|
Elm_Genlist_Item_Class *itc;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Evas masking demo"),
|
efl_text_set(efl_added, "Evas masking demo"),
|
||||||
efl_ui_win_autodel_set(efl_added, 1));
|
efl_ui_win_autodel_set(efl_added, 1));
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
Eo *win, *table, *o, *snap, *box;
|
Eo *win, *table, *o, *snap, *box;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Evas Snapshot"),
|
efl_text_set(efl_added, "Evas Snapshot"),
|
||||||
efl_ui_win_autodel_set(efl_added, 1));
|
efl_ui_win_autodel_set(efl_added, 1));
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
||||||
{
|
{
|
||||||
Eo *win, *box, *box2, *o, *text = NULL, *spinner, *code, *split, *flip, *tb;
|
Eo *win, *box, *box2, *o, *text = NULL, *spinner, *code, *split, *flip, *tb;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Gfx Filter Editor"),
|
efl_text_set(efl_added, "Gfx Filter Editor"),
|
||||||
efl_ui_win_autodel_set(efl_added, 1));
|
efl_ui_win_autodel_set(efl_added, 1));
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
content_class[15] = EFL_UI_SPIN_CLASS;
|
content_class[15] = EFL_UI_SPIN_CLASS;
|
||||||
content_class[16] = EFL_UI_SPIN_BUTTON_CLASS;
|
content_class[16] = EFL_UI_SPIN_BUTTON_CLASS;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Widget Part Background"),
|
efl_text_set(efl_added, "Widget Part Background"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
||||||
|
|
||||||
td = calloc(1, sizeof(*td));
|
td = calloc(1, sizeof(*td));
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_ui_win_name_set(efl_added, "shadow"),
|
efl_ui_win_name_set(efl_added, "shadow"),
|
||||||
efl_text_set(efl_added, "Shadow effects"));
|
efl_text_set(efl_added, "Shadow effects"));
|
||||||
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _delete_cb, td);
|
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _delete_cb, td);
|
||||||
|
|
|
@ -805,7 +805,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
||||||
Eo *win, *bx, *zoomable, *rect;
|
Eo *win, *bx, *zoomable, *rect;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Image_Zoomable animation"),
|
efl_text_set(efl_added, "Efl.Ui.Image_Zoomable animation"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ test_ui_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
Evas_Object *win, *bx, *o;
|
Evas_Object *win, *bx, *o;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Box_Stack"),
|
efl_text_set(efl_added, "Efl.Ui.Box_Stack"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ test_ui_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
Eo *win, *bx, *btn;
|
Eo *win, *bx, *btn;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Button"),
|
efl_text_set(efl_added, "Efl.Ui.Button"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE)
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE)
|
||||||
);
|
);
|
||||||
|
|
|
@ -48,7 +48,7 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bx;
|
Evas_Object *win, *bx;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Clock"),
|
efl_text_set(efl_added, "Efl.Ui.Clock"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
||||||
{
|
{
|
||||||
Eo *win, *bx, *f, *txt;
|
Eo *win, *bx, *f, *txt;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Frame"),
|
efl_text_set(efl_added, "Efl.Ui.Frame"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ test_ui_panel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
||||||
char buf[PATH_MAX] = {0};
|
char buf[PATH_MAX] = {0};
|
||||||
Eo *win, *table, *panel;
|
Eo *win, *table, *panel;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Panel"),
|
efl_text_set(efl_added, "Efl.Ui.Panel"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ test_ui_panel2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
int i;
|
int i;
|
||||||
Eo *win, *box, *check, *btn, *table, *list, *panel;
|
Eo *win, *box, *check, *btn, *table, *list, *panel;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Panel"),
|
efl_text_set(efl_added, "Efl.Ui.Panel"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
{
|
{
|
||||||
Eo *win, *panes, *panes_h;
|
Eo *win, *panes, *panes_h;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Panes"),
|
efl_text_set(efl_added, "Efl.Ui.Panes"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE)
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE)
|
||||||
);
|
);
|
||||||
|
|
|
@ -219,7 +219,7 @@ _win_del(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
/* only free pointer if the other window has already been freed */
|
/* only free pointer if the other window has already been freed */
|
||||||
if (!p_data->win)
|
if (!p_data->win)
|
||||||
free(p_data);
|
free(p_data);
|
||||||
efl_unref(win);
|
efl_del(win);
|
||||||
printf("window is deleted\n");
|
printf("window is deleted\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ _panel_win_del(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
/* only free pointer if the other window has already been freed */
|
/* only free pointer if the other window has already been freed */
|
||||||
if (!p_data->win)
|
if (!p_data->win)
|
||||||
free(p_data);
|
free(p_data);
|
||||||
efl_unref(win);
|
efl_del(win);
|
||||||
printf("window is deleted\n");
|
printf("window is deleted\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,14 +241,14 @@ test_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
||||||
{
|
{
|
||||||
efl_ui_popup_data *p_data = (efl_ui_popup_data*)calloc(1, sizeof(efl_ui_popup_data));
|
efl_ui_popup_data *p_data = (efl_ui_popup_data*)calloc(1, sizeof(efl_ui_popup_data));
|
||||||
|
|
||||||
Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup"),
|
efl_text_set(efl_added, "Efl.Ui.Popup"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
|
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
|
||||||
|
|
||||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
|
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
|
||||||
|
|
||||||
Eo *panel_win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *panel_win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup Panel"),
|
efl_text_set(efl_added, "Efl.Ui.Popup Panel"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_event_callback_add(panel_win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _panel_win_del, p_data);
|
efl_event_callback_add(panel_win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _panel_win_del, p_data);
|
||||||
|
@ -360,7 +360,7 @@ test_ui_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup.Alert"),
|
efl_text_set(efl_added, "Efl.Ui.Popup.Alert"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ _alert_scroll_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
void
|
void
|
||||||
test_ui_scroll_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
test_ui_scroll_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Scroll"),
|
efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Scroll"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
@ -898,7 +898,7 @@ _alert_text_case14_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
void
|
void
|
||||||
test_ui_text_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
test_ui_text_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Text"),
|
efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Text"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
@ -1008,7 +1008,7 @@ test_ui_anchor_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
|
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Popup.Anchor"),
|
efl_text_set(efl_added, "Efl.Ui.Popup.Anchor"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
|
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
|
||||||
|
|
|
@ -151,7 +151,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
|
||||||
|
|
||||||
pd = (pbdata *)calloc(1, sizeof(pbdata));
|
pd = (pbdata *)calloc(1, sizeof(pbdata));
|
||||||
|
|
||||||
pd->win = win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
pd->win = win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Progressbar"),
|
efl_text_set(efl_added, "Efl.Ui.Progressbar"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
||||||
efl_event_callback_add(efl_added, EFL_UI_WIN_EVENT_DELETE_REQUEST,
|
efl_event_callback_add(efl_added, EFL_UI_WIN_EVENT_DELETE_REQUEST,
|
||||||
|
|
|
@ -31,7 +31,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
Eo *win, *sc, *sc2, *sc3, *bx, *bx2, *gd, *gd2;
|
Eo *win, *sc, *sc2, *sc3, *bx, *bx2, *gd, *gd2;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Ui Scroller"),
|
efl_text_set(efl_added, "Efl Ui Scroller"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
||||||
|
@ -135,7 +135,7 @@ test_efl_ui_scroller_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED
|
||||||
Eo *win, *sc, *bx;
|
Eo *win, *sc, *bx;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Ui Scroller Simple"),
|
efl_text_set(efl_added, "Efl Ui Scroller Simple"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
||||||
|
@ -170,7 +170,7 @@ test_efl_ui_scroller_simple2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
|
||||||
Eo *win, *sc, *tb;
|
Eo *win, *sc, *tb;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl Ui Scroller Simple2"),
|
efl_text_set(efl_added, "Efl Ui Scroller Simple2"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
|
||||||
|
|
|
@ -52,7 +52,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
{
|
{
|
||||||
Eo *win, *bx, *hbx;
|
Eo *win, *bx, *hbx;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Slider"),
|
efl_text_set(efl_added, "Efl.Ui.Slider"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
Eo *win, *bx, *hbx;
|
Eo *win, *bx, *hbx;
|
||||||
double step;
|
double step;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Slider_Interval"),
|
efl_text_set(efl_added, "Efl.Ui.Slider_Interval"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ test_ui_spin(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
{
|
{
|
||||||
Eo *win, *bx, *sp;
|
Eo *win, *bx, *sp;
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Spin"),
|
efl_text_set(efl_added, "Efl.Ui.Spin"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
|
||||||
{9, "September"}, {10, "October"}, {11, "November"}, {12, "December"}
|
{9, "September"}, {10, "October"}, {11, "November"}, {12, "December"}
|
||||||
};
|
};
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Ui.Spin_Button"),
|
efl_text_set(efl_added, "Efl.Ui.Spin_Button"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ test_ui_table_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
||||||
Eo *win, *table, *bt, *rc, *en;
|
Eo *win, *table, *bt, *rc, *en;
|
||||||
api_data *api = calloc(1, sizeof(*api));
|
api_data *api = calloc(1, sizeof(*api));
|
||||||
|
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_ui_win_name_set(efl_added, "table"),
|
efl_ui_win_name_set(efl_added, "table"),
|
||||||
efl_text_set(efl_added, "Table"),
|
efl_text_set(efl_added, "Table"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
||||||
|
|
|
@ -104,7 +104,7 @@ _bt4_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even
|
||||||
{
|
{
|
||||||
Efl_Canvas_Object *dia, *lb;
|
Efl_Canvas_Object *dia, *lb;
|
||||||
|
|
||||||
dia = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
dia = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC),
|
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC),
|
||||||
efl_ui_win_name_set(efl_added, "window-dia-4"),
|
efl_ui_win_name_set(efl_added, "window-dia-4"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
|
||||||
|
|
|
@ -92,7 +92,7 @@ test_win_indicator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
indicator = _create_indicator();
|
indicator = _create_indicator();
|
||||||
|
|
||||||
// FIXME: Resizing window should no cause sizing issues!
|
// FIXME: Resizing window should no cause sizing issues!
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
|
||||||
efl_text_set(efl_added, "Efl.Win.Indicator"),
|
efl_text_set(efl_added, "Efl.Win.Indicator"),
|
||||||
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(300, -1)),
|
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(300, -1)),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
|
@ -14,18 +14,18 @@ static void _bt_popto(void *data, Evas_Object *obj, void *event_info);
|
||||||
static void _bt_pressed(void *data, Evas_Object *obj, void *event_info);
|
static void _bt_pressed(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
_win_new(Evas_Object *stack_top, const char *title)
|
_win_new(Evas_Object* parent, Evas_Object *stack_top, const char *title)
|
||||||
{
|
{
|
||||||
Evas_Object *bg, *bx, *bt, *lb, *win;
|
Evas_Object *bg, *bx, *bt, *lb, *win;
|
||||||
|
|
||||||
if (level >= 3)
|
if (level >= 3)
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, parent,
|
||||||
efl_ui_win_name_set(efl_added, "window-stack"),
|
efl_ui_win_name_set(efl_added, "window-stack"),
|
||||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_NAVIFRAME_BASIC),
|
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_NAVIFRAME_BASIC),
|
||||||
efl_text_set(efl_added, title),
|
efl_text_set(efl_added, title),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
else
|
else
|
||||||
win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
|
win = efl_add(EFL_UI_WIN_CLASS, parent,
|
||||||
efl_ui_win_name_set(efl_added, "window-stack"),
|
efl_ui_win_name_set(efl_added, "window-stack"),
|
||||||
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC),
|
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC),
|
||||||
efl_text_set(efl_added, title),
|
efl_text_set(efl_added, title),
|
||||||
|
@ -63,7 +63,7 @@ _win_new(Evas_Object *stack_top, const char *title)
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Push");
|
elm_object_text_set(bt, "Push");
|
||||||
evas_object_smart_callback_add(bt, "clicked", _bt_pressed, stack_top);
|
evas_object_smart_callback_add(bt, "clicked", _bt_pressed, parent);
|
||||||
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
elm_box_pack_end(bx, bt);
|
elm_box_pack_end(bx, bt);
|
||||||
|
@ -82,12 +82,12 @@ _bt_popto(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info
|
||||||
static void
|
static void
|
||||||
_bt_pressed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
_bt_pressed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object *win;
|
Evas_Object *win = (Evas_Object*) data;
|
||||||
char buf[100];
|
char buf[100];
|
||||||
|
|
||||||
level++;
|
level++;
|
||||||
snprintf(buf, sizeof(buf), "Level %i", level);
|
snprintf(buf, sizeof(buf), "Level %i", level);
|
||||||
win = _win_new(data, buf);
|
win = _win_new(win, obj, buf);
|
||||||
efl_ui_win_stack_master_id_set(win, efl_ui_win_stack_id_get(data));
|
efl_ui_win_stack_master_id_set(win, efl_ui_win_stack_id_get(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue