From 4c77ee6843807cb0e27d73153203eec6ea42b8fb Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 12 Dec 2019 01:37:16 +0000 Subject: [PATCH] efl_ui: cleanup elm headers since e2980cd9812113fc4a216749eb23d7611b02fd55, `efl.ui.text` doesn't need `elm_general.h`. This partially reverts commit 96be3cd83d3426c5a9eb8d903245c51927567dc6. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10849 --- src/bin/elementary/test_efl_ui_animation_view.c | 2 +- src/bin/elementary/test_efl_ui_text.c | 1 - src/bin/elementary/test_gfx_filters.c | 2 +- src/bin/elementary/test_part_bg.c | 2 +- src/bin/elementary/test_photocam.c | 2 +- src/bin/elementary/test_ui_clock.c | 2 +- src/bin/elementary/test_ui_collection.c | 7 +++---- src/bin/elementary/test_ui_frame.c | 2 +- src/bin/elementary/test_ui_image.c | 2 +- src/bin/elementary/test_ui_items.c | 5 ++--- src/bin/elementary/test_ui_relative_container.c | 2 +- src/bin/elementary/test_ui_slider.c | 2 +- src/bin/elementary/test_ui_slider_interval.c | 2 +- src/bin/elementary/test_win_dialog.c | 2 -- src/examples/elementary/efl_ui_list_example_1.c | 6 ------ src/lib/elementary/elm_priv.h | 6 ------ 16 files changed, 15 insertions(+), 32 deletions(-) diff --git a/src/bin/elementary/test_efl_ui_animation_view.c b/src/bin/elementary/test_efl_ui_animation_view.c index b086a1b3bf..f5a73df745 100644 --- a/src/bin/elementary/test_efl_ui_animation_view.c +++ b/src/bin/elementary/test_efl_ui_animation_view.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.text doesn't need elm_general.h + #ifndef EFL_BETA_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c index f14d25d8e8..066e73295a 100644 --- a/src/bin/elementary/test_efl_ui_text.c +++ b/src/bin/elementary/test_efl_ui_text.c @@ -4,7 +4,6 @@ #define EO_BETA_API #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.text doesn't need elm_general.h static void _apply_style(Eo *obj, size_t start_pos, size_t end_pos, const char *style) diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c index 8fb84ab671..7ab9a6372d 100644 --- a/src/bin/elementary/test_gfx_filters.c +++ b/src/bin/elementary/test_gfx_filters.c @@ -5,7 +5,7 @@ #include #include #include "elm_spinner_eo.h" -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static const int default_font_size = 48; typedef struct _Filter_Image diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c index 1ee74d7786..850377b590 100644 --- a/src/bin/elementary/test_part_bg.c +++ b/src/bin/elementary/test_part_bg.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + #define MAX_NUM_OF_CONTENT 17 const Efl_Class *content_class[MAX_NUM_OF_CONTENT]; diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c index 6de8bde32c..166f669a42 100644 --- a/src/bin/elementary/test_photocam.c +++ b/src/bin/elementary/test_photocam.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static const struct { Evas_Image_Orient orient; const char *name; diff --git a/src/bin/elementary/test_ui_clock.c b/src/bin/elementary/test_ui_clock.c index c2840a61ce..79e9074ead 100644 --- a/src/bin/elementary/test_ui_clock.c +++ b/src/bin/elementary/test_ui_clock.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + /* A simple test, just displaying clock in its default format */ Evas_Object *dt1, *dt2, *dt3, *dt4; diff --git a/src/bin/elementary/test_ui_collection.c b/src/bin/elementary/test_ui_collection.c index 2397e14211..6e4d8327ac 100644 --- a/src/bin/elementary/test_ui_collection.c +++ b/src/bin/elementary/test_ui_collection.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#include #include static void @@ -114,7 +113,7 @@ _add_item(Efl_Ui_Collection *c, Eo *cont) snprintf(buf, sizeof(buf), "%d - Test %d", i, i%13); efl_text_set(il, buf); - rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas_object_evas_get(c)); + rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, c); switch (i % 5) { case 0: @@ -312,14 +311,14 @@ void create_item_container_ui(const Efl_Class *collection_class, const Efl_Class } void test_efl_ui_collection_grid(void *data EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, + Efl_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { create_item_container_ui(EFL_UI_GRID_CLASS, EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Grid"); } void test_efl_ui_collection_list(void *data EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, + Efl_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { create_item_container_ui(EFL_UI_LIST_CLASS, EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.List"); diff --git a/src/bin/elementary/test_ui_frame.c b/src/bin/elementary/test_ui_frame.c index 2c152c9428..4271f41571 100644 --- a/src/bin/elementary/test_ui_frame.c +++ b/src/bin/elementary/test_ui_frame.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static void _inc_clicked(void *data, const Efl_Event *ev EINA_UNUSED) { diff --git a/src/bin/elementary/test_ui_image.c b/src/bin/elementary/test_ui_image.c index 1608605bec..fc8a9fb298 100644 --- a/src/bin/elementary/test_ui_image.c +++ b/src/bin/elementary/test_ui_image.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static const struct { Efl_Gfx_Image_Orientation orient; const char *name; diff --git a/src/bin/elementary/test_ui_items.c b/src/bin/elementary/test_ui_items.c index 826f4e43e4..36c5f9719f 100644 --- a/src/bin/elementary/test_ui_items.c +++ b/src/bin/elementary/test_ui_items.c @@ -2,7 +2,6 @@ # include "elementary_config.h" #endif -#include #include static Efl_Ui_Widget* @@ -15,7 +14,7 @@ _item_add(Eo *box, const Efl_Class *c, int i) snprintf(buf, sizeof(buf), "%d - Test %d", i, i%13); efl_text_set(il, buf); - rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas_object_evas_get(il)); + rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, il); switch (i % 5) { case 0: @@ -49,7 +48,7 @@ _item_add(Eo *box, const Efl_Class *c, int i) } void test_efl_ui_item(void *data EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, + Efl_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Eo *win, *box, *o; diff --git a/src/bin/elementary/test_ui_relative_container.c b/src/bin/elementary/test_ui_relative_container.c index 5ed7a84f71..1578256dc4 100644 --- a/src/bin/elementary/test_ui_relative_container.c +++ b/src/bin/elementary/test_ui_relative_container.c @@ -4,8 +4,8 @@ #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h #include "test.h" + static Eo *layout, *btn1, *btn2, *btn3; typedef enum { diff --git a/src/bin/elementary/test_ui_slider.c b/src/bin/elementary/test_ui_slider.c index 90932a8ebd..81d4cf1aaa 100644 --- a/src/bin/elementary/test_ui_slider.c +++ b/src/bin/elementary/test_ui_slider.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static void _slider_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev) { diff --git a/src/bin/elementary/test_ui_slider_interval.c b/src/bin/elementary/test_ui_slider_interval.c index 09d97be10d..29dd76b76d 100644 --- a/src/bin/elementary/test_ui_slider_interval.c +++ b/src/bin/elementary/test_ui_slider_interval.c @@ -3,7 +3,7 @@ #endif #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h + static double _step_size_calculate(double min, double max) { diff --git a/src/bin/elementary/test_win_dialog.c b/src/bin/elementary/test_win_dialog.c index f2b0a16d24..05046697b3 100644 --- a/src/bin/elementary/test_win_dialog.c +++ b/src/bin/elementary/test_win_dialog.c @@ -4,8 +4,6 @@ #include #include -#include "elm_priv.h" //FIXME remove this once efl.ui.textbox doesn't need elm_general.h - static void _bt_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c index 7a010fb9ff..d9ade67180 100644 --- a/src/examples/elementary/efl_ui_list_example_1.c +++ b/src/examples/elementary/efl_ui_list_example_1.c @@ -13,12 +13,6 @@ #include #include -//FIXME this can go away when efl_ui_text doesn't need elm_general -# include -# include -# include -# include - #define NUM_ITEMS 400 typedef struct _List_Scroll_Data { diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index c1f936c3f4..ca3ab0620f 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -167,12 +167,6 @@ # include "efl_ui_selection_manager.eo.h" # include "efl_datetime_manager.eo.h" -//FIXME this needs to not use elm_general.h and go to Efl_Ui.h -# include -# include -# include -# include - extern const char *_efl_model_property_itemw; extern const char *_efl_model_property_itemh; extern const char *_efl_model_property_selfw;