From: Marcel Hollerbach Date: Fri, 20 Sep 2019 12:57:09 +0000 (+0200) Subject: efl_ui_win: default the window type to basic X-Git-Tag: submit/tizen/20190924.220547~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e470f592785fe656bcc28fc1d76012fa4e92a9e;p=platform%2Fupstream%2Fefl.git efl_ui_win: default the window type to basic normally when you create a window, you just want to have it beeing a basic window. If not you still can set the window type. ref T8229 Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10049 --- diff --git a/src/benchmarks/elementary/collection.c b/src/benchmarks/elementary/collection.c index 99b8472..ec18d22 100644 --- a/src/benchmarks/elementary/collection.c +++ b/src/benchmarks/elementary/collection.c @@ -155,8 +155,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) } win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Item_Container benchmark"), + efl_text_set(efl_added, "Efl.Ui.Item_Container benchmark"), efl_ui_win_autodel_set(efl_added, EINA_TRUE) ); printf("Building %d objects\n", items); diff --git a/src/bin/elementary/test_efl_ui_animation_view.c b/src/bin/elementary/test_efl_ui_animation_view.c index 36e28c4..31bdb5b 100644 --- a/src/bin/elementary/test_efl_ui_animation_view.c +++ b/src/bin/elementary/test_efl_ui_animation_view.c @@ -142,8 +142,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, char buf[255]; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - 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)); // Create a box in Canvas @@ -297,8 +296,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, char buf[255]; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - 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)); // Create a box diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c index a939304..8a4da1e 100644 --- a/src/bin/elementary/test_efl_ui_text.c +++ b/src/bin/elementary/test_efl_ui_text.c @@ -42,8 +42,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi char *markup; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win); @@ -146,8 +145,7 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve Eo *bt; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl Ui Text"), + efl_text_set(efl_added, "Efl Ui Text"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); bx = efl_add(EFL_UI_BOX_CLASS, win); @@ -205,8 +203,7 @@ test_efl_ui_text_inputfield(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED Eo *win, *bx, *en; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl Ui Text Input Field"), + efl_text_set(efl_added, "Efl Ui Text Input Field"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); bx = efl_add(EFL_UI_BOX_CLASS, win); @@ -295,8 +292,7 @@ test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Eina_File *f; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl Ui Text Item Factory"), + efl_text_set(efl_added, "Efl Ui Text Item Factory"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); bx = efl_add(EFL_UI_BOX_CLASS, win); diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c index 42ef33f..6f50740 100644 --- a/src/bin/elementary/test_photocam.c +++ b/src/bin/elementary/test_photocam.c @@ -806,8 +806,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE char buf[PATH_MAX]; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_button.c b/src/bin/elementary/test_ui_button.c index 9571930..0cd1e93 100644 --- a/src/bin/elementary/test_ui_button.c +++ b/src/bin/elementary/test_ui_button.c @@ -30,8 +30,7 @@ test_ui_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event char buf[PATH_MAX]; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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) ); diff --git a/src/bin/elementary/test_ui_clock.c b/src/bin/elementary/test_ui_clock.c index d8cfd17..4542fe8 100644 --- a/src/bin/elementary/test_ui_clock.c +++ b/src/bin/elementary/test_ui_clock.c @@ -49,8 +49,7 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ Evas_Object *win, *bx; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_collection.c b/src/bin/elementary/test_ui_collection.c index 1cc275f..ed98d2e 100644 --- a/src/bin/elementary/test_ui_collection.c +++ b/src/bin/elementary/test_ui_collection.c @@ -176,8 +176,7 @@ void create_item_container_ui(const Efl_Class *collection_class, const Efl_Class Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx)); win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, name), + efl_text_set(efl_added, name), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); tbl = efl_add(EFL_UI_TABLE_CLASS, win); efl_content_set(win, tbl); diff --git a/src/bin/elementary/test_ui_datepicker.c b/src/bin/elementary/test_ui_datepicker.c index 5b12f35..7898f12 100644 --- a/src/bin/elementary/test_ui_datepicker.c +++ b/src/bin/elementary/test_ui_datepicker.c @@ -19,8 +19,7 @@ test_ui_datepicker(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e Eo *win, *bx; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Datepicker"), + efl_text_set(efl_added, "Efl.Ui.Datepicker"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_frame.c b/src/bin/elementary/test_ui_frame.c index 84e5747..4f37a26 100644 --- a/src/bin/elementary/test_ui_frame.c +++ b/src/bin/elementary/test_ui_frame.c @@ -16,8 +16,7 @@ test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ Eo *win, *bx, *f, *txt; win = efl_add_ref(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_items.c b/src/bin/elementary/test_ui_items.c index 54dcb64..b254069 100644 --- a/src/bin/elementary/test_ui_items.c +++ b/src/bin/elementary/test_ui_items.c @@ -54,8 +54,7 @@ void test_efl_ui_item(void *data EINA_UNUSED, Eo *win, *box, *o; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Item examples"), + efl_text_set(efl_added, "Item examples"), efl_ui_win_autodel_set(efl_added, EINA_TRUE) ); diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c index df9afd5..e0df202 100644 --- a/src/bin/elementary/test_ui_pager.c +++ b/src/bin/elementary/test_ui_pager.c @@ -701,8 +701,7 @@ void test_ui_pager(void *data EINA_UNUSED, int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Pager"), + efl_text_set(efl_added, "Pager"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); panes = efl_add(EFL_UI_PANES_CLASS, win, diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c index 1ac37da..b6548a4 100644 --- a/src/bin/elementary/test_ui_pager_scroll.c +++ b/src/bin/elementary/test_ui_pager_scroll.c @@ -901,8 +901,7 @@ void test_ui_pager_scroll(void *data EINA_UNUSED, int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Pager"), + efl_text_set(efl_added, "Pager"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); panes = efl_add(EFL_UI_PANES_CLASS, win, diff --git a/src/bin/elementary/test_ui_panel.c b/src/bin/elementary/test_ui_panel.c index 928dd2d..d5045c6 100644 --- a/src/bin/elementary/test_ui_panel.c +++ b/src/bin/elementary/test_ui_panel.c @@ -11,8 +11,7 @@ test_ui_panel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ Eo *win, *table, *panel; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); table = efl_add(EFL_UI_TABLE_CLASS, win, @@ -104,8 +103,7 @@ test_ui_panel2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event Eo *win, *box, *check, *btn, *table, *list, *panel; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); box = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_panes.c b/src/bin/elementary/test_ui_panes.c index 96f30fb..72d2ab9 100644 --- a/src/bin/elementary/test_ui_panes.c +++ b/src/bin/elementary/test_ui_panes.c @@ -10,8 +10,7 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e Eo *win, *panes, *panes_h; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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) ); diff --git a/src/bin/elementary/test_ui_progressbar.c b/src/bin/elementary/test_ui_progressbar.c index 016c530..c0bf12f 100644 --- a/src/bin/elementary/test_ui_progressbar.c +++ b/src/bin/elementary/test_ui_progressbar.c @@ -152,8 +152,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf pd = (pbdata *)calloc(1, sizeof(pbdata)); pd->win = win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_event_callback_add(efl_added, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_delete_req_cb, pd) diff --git a/src/bin/elementary/test_ui_radio.c b/src/bin/elementary/test_ui_radio.c index 487c6aa..e03dcf5 100644 --- a/src/bin/elementary/test_ui_radio.c +++ b/src/bin/elementary/test_ui_radio.c @@ -96,8 +96,7 @@ void test_efl_ui_radio(void *data EINA_UNUSED, Efl_Ui_Button *o; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Radio_Box"), + efl_text_set(efl_added, "Efl.Ui.Radio_Box"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); table = efl_add(EFL_UI_TABLE_CLASS, win); efl_content_set(win, table); diff --git a/src/bin/elementary/test_ui_relative_layout.c b/src/bin/elementary/test_ui_relative_layout.c index 63a6419..06851bb 100644 --- a/src/bin/elementary/test_ui_relative_layout.c +++ b/src/bin/elementary/test_ui_relative_layout.c @@ -276,8 +276,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo Eo *win, *vbox, *f, *hbox; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), + efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); vbox = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_scroller.c b/src/bin/elementary/test_ui_scroller.c index 02cae9a..e5f2a61 100644 --- a/src/bin/elementary/test_ui_scroller.c +++ b/src/bin/elementary/test_ui_scroller.c @@ -32,8 +32,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void int i, j; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_gfx_entity_size_set(win, EINA_SIZE2D(320, 400)); @@ -137,8 +136,7 @@ test_efl_ui_scroller_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED int i; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_gfx_entity_size_set(win, EINA_SIZE2D(320, 400)); @@ -173,8 +171,7 @@ test_efl_ui_scroller_simple2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE int i; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_gfx_entity_size_set(win, EINA_SIZE2D(320, 400)); diff --git a/src/bin/elementary/test_ui_slider.c b/src/bin/elementary/test_ui_slider.c index 36155e9..5aa3100 100644 --- a/src/bin/elementary/test_ui_slider.c +++ b/src/bin/elementary/test_ui_slider.c @@ -53,8 +53,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event Eo *win, *bx, *hbx; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_slider_interval.c b/src/bin/elementary/test_ui_slider_interval.c index 75dcbe2..186e2da 100644 --- a/src/bin/elementary/test_ui_slider_interval.c +++ b/src/bin/elementary/test_ui_slider_interval.c @@ -34,8 +34,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void double step; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_spin.c b/src/bin/elementary/test_ui_spin.c index 6f325bb..965c88e 100644 --- a/src/bin/elementary/test_ui_spin.c +++ b/src/bin/elementary/test_ui_spin.c @@ -40,8 +40,7 @@ test_ui_spin(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i Eo *win, *bx, *sp; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_spin_button.c b/src/bin/elementary/test_ui_spin_button.c index d6b9a96..600611e 100644 --- a/src/bin/elementary/test_ui_spin_button.c +++ b/src/bin/elementary/test_ui_spin_button.c @@ -29,8 +29,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * }; win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_ui_spotlight.c b/src/bin/elementary/test_ui_spotlight.c index c2bc6b4..384da6e 100644 --- a/src/bin/elementary/test_ui_spotlight.c +++ b/src/bin/elementary/test_ui_spotlight.c @@ -856,8 +856,7 @@ test_ui_spotlight_stack(void *data EINA_UNUSED, int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Spotlight Stack"), + efl_text_set(efl_added, "Efl.Ui.Spotlight Stack"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); panes = efl_add(EFL_UI_PANES_CLASS, win, @@ -955,8 +954,7 @@ test_ui_spotlight_plain(void *data EINA_UNUSED, int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Spotlight Plain"), + efl_text_set(efl_added, "Efl.Ui.Spotlight Plain"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); panes = efl_add(EFL_UI_PANES_CLASS, win, @@ -1050,8 +1048,7 @@ test_ui_spotlight_scroll(void *data EINA_UNUSED, int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Spotlight Scroll"), + efl_text_set(efl_added, "Efl.Ui.Spotlight Scroll"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); panes = efl_add(EFL_UI_PANES_CLASS, win, diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c index 490fdef..ed73dae 100644 --- a/src/bin/elementary/test_ui_tab_pager.c +++ b/src/bin/elementary/test_ui_tab_pager.c @@ -104,8 +104,7 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev int i; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Tab_Pager"), + efl_text_set(efl_added, "Efl.Ui.Tab_Pager"), efl_ui_win_autodel_set(efl_added, EINA_TRUE), efl_event_callback_add(efl_added, EFL_EVENT_DEL, _win_del_cb, ad)); diff --git a/src/bin/elementary/test_ui_tags.c b/src/bin/elementary/test_ui_tags.c index efd87dc..c5d7425 100644 --- a/src/bin/elementary/test_ui_tags.c +++ b/src/bin/elementary/test_ui_tags.c @@ -60,8 +60,7 @@ test_ui_tags(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i char buf[PATH_MAX]; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Tags"), + efl_text_set(efl_added, "Efl.Ui.Tags"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); snprintf(buf, sizeof(buf), "%s/objects/multibuttonentry.edj", elm_app_data_dir_get()); diff --git a/src/bin/elementary/test_ui_timepicker.c b/src/bin/elementary/test_ui_timepicker.c index c57ee6b..3249699 100644 --- a/src/bin/elementary/test_ui_timepicker.c +++ b/src/bin/elementary/test_ui_timepicker.c @@ -20,8 +20,7 @@ test_ui_timepicker(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e Eo *win, *bx; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Timepicker"), + efl_text_set(efl_added, "Efl.Ui.Timepicker"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); bx = efl_add(EFL_UI_BOX_CLASS, win, diff --git a/src/bin/elementary/test_win_indicator.c b/src/bin/elementary/test_win_indicator.c index aa9606f..98ba2e2 100644 --- a/src/bin/elementary/test_win_indicator.c +++ b/src/bin/elementary/test_win_indicator.c @@ -93,8 +93,7 @@ test_win_indicator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e // FIXME: Resizing window should no cause sizing issues! win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_ui_win_autodel_set(efl_added, EINA_TRUE)); efl_event_callback_add(win, EFL_EVENT_DEL, _win_del, indicator); diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c index bb4fa7b..593dbe8 100644 --- a/src/examples/elementary/efl_canvas_layout_text.c +++ b/src/examples/elementary/efl_canvas_layout_text.c @@ -121,8 +121,7 @@ efl_main(void *data EINA_UNUSED, Eo *win; win = efl_add(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - 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_event_callback_add(efl_added, EFL_UI_WIN_EVENT_DELETE_REQUEST, _on_win_delete, NULL)); diff --git a/src/examples/elementary/efl_ui_grid_example_1.c b/src/examples/elementary/efl_ui_grid_example_1.c index fb854fc..032e5d8 100644 --- a/src/examples/elementary/efl_ui_grid_example_1.c +++ b/src/examples/elementary/efl_ui_grid_example_1.c @@ -23,8 +23,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) Efl_Ui_Item *gitem; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Grid"), + efl_text_set(efl_added, "Efl.Ui.Grid"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); box = efl_add(EFL_UI_BOX_CLASS, win); diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c index 1666414..cbd05d2 100644 --- a/src/examples/elementary/efl_ui_list_example_1.c +++ b/src/examples/elementary/efl_ui_list_example_1.c @@ -110,8 +110,7 @@ elm_main(int argc EINA_UNUSED, char **argv) win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.List"), + efl_text_set(efl_added, "Efl.Ui.List"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); diff --git a/src/examples/elementary/efl_ui_radio_example_01.c b/src/examples/elementary/efl_ui_radio_example_01.c index b6b72e2..3ab57b8 100644 --- a/src/examples/elementary/efl_ui_radio_example_01.c +++ b/src/examples/elementary/efl_ui_radio_example_01.c @@ -25,8 +25,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Radio example"), + efl_text_set(efl_added, "Efl.Ui.Radio example"), efl_ui_win_autodel_set(efl_added, EINA_TRUE) ); diff --git a/src/examples/elementary/efl_ui_relative_layout_example_01.c b/src/examples/elementary/efl_ui_relative_layout_example_01.c index e2d2af7..77453cf 100644 --- a/src/examples/elementary/efl_ui_relative_layout_example_01.c +++ b/src/examples/elementary/efl_ui_relative_layout_example_01.c @@ -16,8 +16,7 @@ elm_main(int argc, char **argv) Eo *win, *layout, *btn1, *btn2, *btn3; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), + efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win, diff --git a/src/examples/elementary/efl_ui_relative_layout_example_02.c b/src/examples/elementary/efl_ui_relative_layout_example_02.c index fe25463..bc3740d 100644 --- a/src/examples/elementary/efl_ui_relative_layout_example_02.c +++ b/src/examples/elementary/efl_ui_relative_layout_example_02.c @@ -16,8 +16,7 @@ elm_main(int argc, char **argv) Eo *win, *layout, *btn1, *btn2; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), + efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win, diff --git a/src/examples/elementary/efl_ui_theme_example_01.c b/src/examples/elementary/efl_ui_theme_example_01.c index fe09a83..27ad63f 100644 --- a/src/examples/elementary/efl_ui_theme_example_01.c +++ b/src/examples/elementary/efl_ui_theme_example_01.c @@ -52,8 +52,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) efl_ui_theme_extension_add(default_theme, EXAMPLE_EDJ_FILE_PATH); win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Theme example"), + efl_text_set(efl_added, "Efl.Ui.Theme example"), efl_ui_win_autodel_set(efl_added, EINA_TRUE) ); diff --git a/src/examples/elementary/efl_ui_theme_example_02.c b/src/examples/elementary/efl_ui_theme_example_02.c index 1b7e61c..52b1952 100644 --- a/src/examples/elementary/efl_ui_theme_example_02.c +++ b/src/examples/elementary/efl_ui_theme_example_02.c @@ -52,8 +52,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) efl_ui_theme_overlay_add(default_theme, EXAMPLE_EDJ_FILE_PATH); win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Efl.Ui.Theme example"), + efl_text_set(efl_added, "Efl.Ui.Theme example"), efl_ui_win_autodel_set(efl_added, EINA_TRUE) ); diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 6cc09d8..d4bd550 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -6970,6 +6970,9 @@ _efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd) efl_access_object_access_parent_set(obj, root); // + if (elm_widget_is_legacy(obj)) + pd->type = EFL_UI_WIN_TYPE_BASIC; + return obj; } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 2c48bc9..9a8c30b 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -480,7 +480,7 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac [[If the object is not window object, returns $unknown.]] } values { - type: Efl.Ui.Win_Type(Efl.Ui.Win_Type.unknown); [[Window type]] + type: Efl.Ui.Win_Type(Efl.Ui.Win_Type.basic); [[Window type]] } } @property accel_preference @beta { diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c index 23118fe..74e8f2e 100644 --- a/src/tests/elementary/efl_ui_test_widget.c +++ b/src/tests/elementary/efl_ui_test_widget.c @@ -19,8 +19,7 @@ static void _small_ui(State *s) { s->win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Hello World")); + efl_text_set(efl_added, "Hello World")); s->ic = efl_add(EFL_UI_IMAGE_CLASS, s->win, efl_ui_win_icon_object_set(s->win, efl_added)); @@ -233,8 +232,7 @@ EFL_START_TEST(efl_ui_test_widget_parent_relation) Efl_Ui_Win *win, *w1, *w2, *w3; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Hello World")); + efl_text_set(efl_added, "Hello World")); //first check the initial state w1 = efl_add(efl_ui_widget_realized_class_get(), win); ck_assert_ptr_eq(efl_ui_widget_parent_get(w1), win); @@ -257,8 +255,7 @@ EFL_START_TEST(efl_ui_test_widget_disabled_parent) Efl_Ui_Win *win, *w1, *w2, *t; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Hello World")); + efl_text_set(efl_added, "Hello World")); //first check the initial state w1 = efl_add(efl_ui_widget_realized_class_get(), win); efl_ui_widget_disabled_set(w1, EINA_TRUE); @@ -293,8 +290,7 @@ EFL_START_TEST(efl_ui_test_widget_disabled_behaviour) Efl_Ui_Win *win, *w1, *w2, *t; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), - efl_text_set(efl_added, "Hello World")); + efl_text_set(efl_added, "Hello World")); //first check the initial state w1 = efl_add(efl_ui_widget_realized_class_get(), win); efl_ui_widget_disabled_set(w1, EINA_TRUE); diff --git a/src/tests/elementary/efl_ui_test_win.c b/src/tests/elementary/efl_ui_test_win.c index 4e61e5b..2d893be 100644 --- a/src/tests/elementary/efl_ui_test_win.c +++ b/src/tests/elementary/efl_ui_test_win.c @@ -433,6 +433,17 @@ EFL_START_TEST(efl_ui_win_test_efl_input_interface_pointer_cancel) ck_assert_int_eq(called, 2); } EFL_END_TEST + +EFL_START_TEST(efl_ui_win_test_type) +{ + Efl_Ui_Win *win; + + win = win_add(); + + ck_assert_int_eq(efl_ui_win_type_get(win), EFL_UI_WIN_TYPE_BASIC); +} +EFL_END_TEST + void efl_ui_test_win(TCase *tc) { @@ -447,4 +458,5 @@ efl_ui_test_win(TCase *tc) tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_in_out); tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_wheel); tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_cancel); + tcase_add_test(tc, efl_ui_win_test_type); } diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index dc335bf..e90a31a 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c @@ -465,6 +465,18 @@ EFL_START_TEST(elm_win_test_rotation) } EFL_END_TEST +EFL_START_TEST(elm_win_test_default_type) +{ + Evas_Object *win; + + win = elm_win_add(NULL, "test win default type", ELM_WIN_UNKNOWN); + ck_assert_int_eq(elm_win_type_get(win), ELM_WIN_UNKNOWN); + + win = elm_win_util_standard_add("test win default type", "test"); + ck_assert_int_eq(elm_win_type_get(win), ELM_WIN_BASIC); +} +EFL_END_TEST + void elm_test_win(TCase *tc) { tcase_add_test(tc, elm_win_legacy_type_check); @@ -475,6 +487,7 @@ void elm_test_win(TCase *tc) tcase_add_test(tc, elm_win_test_app_exit_on_windows_close); tcase_add_test(tc, efl_ui_win_multi_touch_inputs); tcase_add_test(tc, elm_win_test_rotation); + tcase_add_test(tc, elm_win_test_default_type); #ifdef HAVE_ELEMENTARY_X tcase_add_test(tc, elm_win_autohide); tcase_add_test(tc, elm_win_autohide_and_policy_quit_last_window_hidden); diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c index 81da381..d4204ef 100644 --- a/src/tests/elementary/suite_helpers.c +++ b/src/tests/elementary/suite_helpers.c @@ -201,7 +201,7 @@ _elm_suite_win_create() if (legacy_mode) win = elm_win_add(NULL, "elm_suite", ELM_WIN_BASIC); else - win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC)); + win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get()); if (!buffer) return win; loop = efl_add(efl_loop_realized_class_get(), win); timer = efl_add(EFL_LOOP_TIMER_CLASS, loop,