summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-11-20 10:24:05 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-11-20 10:24:05 +0900
commit0611620301b3ada285bc48fc801cac2c5ba3e0a7 (patch)
tree13a02e4c1b2325162036990bc77a04616ef9f83f
parentffb992cd4f32815a147d317d0785e2074f22e583 (diff)
efl_ui_bg: remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget class
Summary: Efl.Ui.Bg interface does not have any new property or method. Moreover, Efl.Ui.Bg interface is not used by widgets except Efl.Ui.Bg_Widget and Efl.Ui.Widget_Part_Bg. Consequently, Efl.Ui.Bg interface can be replaced by other interfaces. Due to Efl.Ui.Bg interface, the bg widget class name becomes Efl.UI.Bg_Widget which is not synchronized with other widget names. Therefore, to keep consistency with other widgets, it would be better to remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget to Efl.Ui.Bg. Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7304
Diffstat (limited to '')
-rw-r--r--src/Makefile_Elementary.am6
-rw-r--r--src/bin/elementary/test_bg.c4
-rw-r--r--src/bin/elementary/test_part_bg.c2
-rw-r--r--src/examples/elementary/bg_cxx_example_02.cc2
-rw-r--r--src/lib/elementary/Efl_Ui.h1
-rw-r--r--src/lib/elementary/Elementary.h1
-rw-r--r--src/lib/elementary/efl_ui_bg.c287
-rw-r--r--src/lib/elementary/efl_ui_bg.eo16
-rw-r--r--src/lib/elementary/efl_ui_bg_legacy.eo (renamed from src/lib/elementary/efl_ui_bg_widget_legacy.eo)2
-rw-r--r--src/lib/elementary/efl_ui_bg_private.h (renamed from src/lib/elementary/efl_ui_bg_widget_private.h)20
-rw-r--r--src/lib/elementary/efl_ui_bg_widget.c295
-rw-r--r--src/lib/elementary/efl_ui_bg_widget.eo19
-rw-r--r--src/lib/elementary/efl_ui_widget.c4
-rw-r--r--src/lib/elementary/efl_ui_widget_part_bg.eo2
-rw-r--r--src/lib/elementary/efl_ui_win.c4
-rw-r--r--src/lib/elementary/elm_bg_legacy.h2
-rw-r--r--src/lib/elementary/meson.build6
17 files changed, 325 insertions, 348 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index b7844562ac..2f4f9c0164 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -4,7 +4,6 @@
4elm_public_eolian_files = \ 4elm_public_eolian_files = \
5 lib/elementary/efl_ui_widget.eo \ 5 lib/elementary/efl_ui_widget.eo \
6 lib/elementary/efl_ui_bg.eo \ 6 lib/elementary/efl_ui_bg.eo \
7 lib/elementary/efl_ui_bg_widget.eo \
8 lib/elementary/efl_ui_button.eo \ 7 lib/elementary/efl_ui_button.eo \
9 lib/elementary/efl_ui_calendar.eo \ 8 lib/elementary/efl_ui_calendar.eo \
10 lib/elementary/efl_ui_calendar_item.eo \ 9 lib/elementary/efl_ui_calendar_item.eo \
@@ -174,7 +173,7 @@ elm_legacy_eolian_files = \
174 lib/elementary/efl_ui_button_legacy.eo \ 173 lib/elementary/efl_ui_button_legacy.eo \
175 lib/elementary/efl_ui_check_legacy.eo \ 174 lib/elementary/efl_ui_check_legacy.eo \
176 lib/elementary/efl_ui_radio_legacy.eo \ 175 lib/elementary/efl_ui_radio_legacy.eo \
177 lib/elementary/efl_ui_bg_widget_legacy.eo \ 176 lib/elementary/efl_ui_bg_legacy.eo \
178 lib/elementary/efl_ui_video_legacy.eo \ 177 lib/elementary/efl_ui_video_legacy.eo \
179 lib/elementary/efl_ui_frame_legacy.eo \ 178 lib/elementary/efl_ui_frame_legacy.eo \
180 lib/elementary/efl_ui_panes_legacy.eo \ 179 lib/elementary/efl_ui_panes_legacy.eo \
@@ -338,7 +337,7 @@ includesunstable_HEADERS = \
338 lib/elementary/elm_widget_box.h \ 337 lib/elementary/elm_widget_box.h \
339 lib/elementary/elm_widget_bubble.h \ 338 lib/elementary/elm_widget_bubble.h \
340 lib/elementary/efl_ui_button_private.h \ 339 lib/elementary/efl_ui_button_private.h \
341 lib/elementary/efl_ui_bg_widget_private.h \ 340 lib/elementary/efl_ui_bg_private.h \
342 lib/elementary/elm_widget_calendar.h \ 341 lib/elementary/elm_widget_calendar.h \
343 lib/elementary/efl_ui_calendar_private.h \ 342 lib/elementary/efl_ui_calendar_private.h \
344 lib/elementary/efl_ui_check_private.h \ 343 lib/elementary/efl_ui_check_private.h \
@@ -686,7 +685,6 @@ lib_elementary_libelementary_la_SOURCES = \
686 lib/elementary/elm_atspi_bridge.c \ 685 lib/elementary/elm_atspi_bridge.c \
687 lib/elementary/efl_ui_legacy.c \ 686 lib/elementary/efl_ui_legacy.c \
688 lib/elementary/efl_ui_bg.c \ 687 lib/elementary/efl_ui_bg.c \
689 lib/elementary/efl_ui_bg_widget.c \
690 lib/elementary/elm_box.c \ 688 lib/elementary/elm_box.c \
691 lib/elementary/elm_bubble.c \ 689 lib/elementary/elm_bubble.c \
692 lib/elementary/efl_ui_button.c \ 690 lib/elementary/efl_ui_button.c \
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 59d18821d0..f71dd7bb86 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -408,7 +408,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
408 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 408 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
409 efl_ui_win_alpha_set(efl_added, EINA_FALSE)); 409 efl_ui_win_alpha_set(efl_added, EINA_FALSE));
410 410
411 efl_add(EFL_UI_BG_WIDGET_CLASS, win, 411 efl_add(EFL_UI_BG_CLASS, win,
412 efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND), 412 efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
413 efl_content_set(win, efl_added)); 413 efl_content_set(win, efl_added));
414 414
@@ -419,7 +419,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
419 419
420 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 420 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
421 421
422 o_bg = efl_add(EFL_UI_BG_WIDGET_CLASS, box, 422 o_bg = efl_add(EFL_UI_BG_CLASS, box,
423 efl_file_set(efl_added, buf, NULL), 423 efl_file_set(efl_added, buf, NULL),
424 efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND), 424 efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
425 efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL), 425 efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL),
diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c
index 111af88de1..60a83a8c8a 100644
--- a/src/bin/elementary/test_part_bg.c
+++ b/src/bin/elementary/test_part_bg.c
@@ -135,7 +135,7 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
135 content_class[9] = EFL_UI_FLIP_CLASS; 135 content_class[9] = EFL_UI_FLIP_CLASS;
136 content_class[10] = EFL_UI_PANES_CLASS; 136 content_class[10] = EFL_UI_PANES_CLASS;
137 content_class[11] = EFL_UI_VIDEO_CLASS; 137 content_class[11] = EFL_UI_VIDEO_CLASS;
138 content_class[12] = EFL_UI_BG_WIDGET_CLASS; 138 content_class[12] = EFL_UI_BG_CLASS;
139 content_class[13] = EFL_UI_IMAGE_CLASS; 139 content_class[13] = EFL_UI_IMAGE_CLASS;
140 content_class[14] = EFL_UI_IMAGE_ZOOMABLE_CLASS; 140 content_class[14] = EFL_UI_IMAGE_ZOOMABLE_CLASS;
141 content_class[15] = EFL_UI_NSTATE_CLASS; 141 content_class[15] = EFL_UI_NSTATE_CLASS;
diff --git a/src/examples/elementary/bg_cxx_example_02.cc b/src/examples/elementary/bg_cxx_example_02.cc
index f5bc52223e..71c3540d98 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -29,7 +29,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
29 else 29 else
30 path = "performance/background.png"; 30 path = "performance/background.png";
31 31
32 efl::ui::Bg_Widget bg(instantiate, win); 32 efl::ui::Bg bg(instantiate, win);
33 bg.scale_type_set(EFL_GFX_IMAGE_SCALE_TYPE_FILL); 33 bg.scale_type_set(EFL_GFX_IMAGE_SCALE_TYPE_FILL);
34 bg.file_set(path, nullptr); 34 bg.file_set(path, nullptr);
35 win.content_set(bg); 35 win.content_set(bg);
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 042a100b7b..511afab27b 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -180,7 +180,6 @@ typedef Eo Efl_Ui_Focus_Manager;
180# include <efl_ui_layout_part_table.eo.h> 180# include <efl_ui_layout_part_table.eo.h>
181# include <efl_ui_win_part.eo.h> 181# include <efl_ui_win_part.eo.h>
182# include <efl_ui_bg.eo.h> 182# include <efl_ui_bg.eo.h>
183# include <efl_ui_bg_widget.eo.h>
184# include <efl_ui_box.eo.h> 183# include <efl_ui_box.eo.h>
185# include <efl_ui_box_flow.eo.h> 184# include <efl_ui_box_flow.eo.h>
186# include <efl_ui_box_stack.eo.h> 185# include <efl_ui_box_stack.eo.h>
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 0bae61deeb..f6dfa55240 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -294,7 +294,6 @@ typedef Eo Efl_Ui_Focus_Manager;
294# include <efl_ui_layout_part_table.eo.h> 294# include <efl_ui_layout_part_table.eo.h>
295# include <efl_ui_win_part.eo.h> 295# include <efl_ui_win_part.eo.h>
296# include <efl_ui_bg.eo.h> 296# include <efl_ui_bg.eo.h>
297# include <efl_ui_bg_widget.eo.h>
298# include <efl_ui_box.eo.h> 297# include <efl_ui_box.eo.h>
299# include <efl_ui_box_flow.eo.h> 298# include <efl_ui_box_flow.eo.h>
300# include <efl_ui_box_stack.eo.h> 299# include <efl_ui_box_stack.eo.h>
diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index cdf4efa2f5..90bb5061eb 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -2,7 +2,294 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4 4
5#define EFL_ACCESS_OBJECT_PROTECTED
6#define ELM_LAYOUT_PROTECTED
7
5#include <Elementary.h> 8#include <Elementary.h>
6#include "elm_priv.h" 9#include "elm_priv.h"
10#include "efl_ui_bg_private.h"
11
12#define MY_CLASS EFL_UI_BG_CLASS
13#define MY_CLASS_PFX efl_ui_bg
14
15#define MY_CLASS_NAME "Efl.Ui.Bg"
16
17static const Elm_Layout_Part_Alias_Description _content_aliases[] =
18{
19 {"overlay", "elm.swallow.content"},
20 {NULL, NULL}
21};
22
23EOLIAN static Eo *
24_efl_ui_bg_efl_object_constructor(Eo *obj, Efl_Ui_Bg_Data *pd)
25{
26 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
27
28 if (!elm_widget_theme_klass_get(obj))
29 elm_widget_theme_klass_set(obj, "bg");
30
31 obj = efl_constructor(efl_super(obj, MY_CLASS));
32 elm_widget_sub_object_parent_add(obj);
33 elm_widget_can_focus_set(obj, EINA_FALSE);
34
35 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
36 elm_widget_theme_klass_get(obj),
37 elm_widget_theme_element_get(obj),
38 elm_widget_theme_style_get(obj)))
39 CRI("Failed to set layout!");
40
41 if (elm_widget_is_legacy(obj))
42 {
43 pd->rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj,
44 efl_gfx_color_set(efl_added, 0, 0, 0, 0),
45 efl_content_set(efl_part(obj, "elm.swallow.rectangle"), efl_added));
46
47 pd->img = efl_add(EFL_UI_IMAGE_CLASS, obj,
48 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
49 efl_content_set(efl_part(obj, "elm.swallow.background"), efl_added));
50 }
51 else
52 {
53 pd->rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj,
54 efl_gfx_color_set(efl_added, 0, 0, 0, 0),
55 efl_content_set(efl_part(obj, "efl.rectangle"), efl_added));
56
57 pd->img = efl_add(EFL_UI_IMAGE_CLASS, obj,
58 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
59 efl_content_set(efl_part(obj, "efl.background"), efl_added));
60 }
61 pd->file = NULL;
62 pd->key = NULL;
63
64 efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED);
65
66 efl_ui_widget_focus_allow_set(obj, EINA_FALSE);
67
68 return obj;
69}
70
71EOLIAN static void
72_efl_ui_bg_efl_object_destructor(Eo *obj, Efl_Ui_Bg_Data *sd)
73{
74 ELM_SAFE_FREE(sd->file, eina_stringshare_del);
75 ELM_SAFE_FREE(sd->key, eina_stringshare_del);
76
77 efl_destructor(efl_super(obj, MY_CLASS));
78}
79
80EAPI void
81elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
82{
83 Efl_Gfx_Image_Scale_Type type;
84
85 switch (option)
86 {
87 case ELM_BG_OPTION_CENTER:
88 type = EFL_GFX_IMAGE_SCALE_TYPE_NONE;
89 break;
90 case ELM_BG_OPTION_SCALE:
91 type = EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE;
92 break;
93 case ELM_BG_OPTION_TILE:
94 type = EFL_GFX_IMAGE_SCALE_TYPE_TILE;
95 break;
96 case ELM_BG_OPTION_STRETCH:
97 type = EFL_GFX_IMAGE_SCALE_TYPE_FILL;
98 break;
99 case ELM_BG_OPTION_LAST:
100 default:
101 type = EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE;
102 }
103 efl_gfx_image_scale_type_set(obj, type);
104}
105
106EAPI Elm_Bg_Option
107elm_bg_option_get(const Evas_Object *obj)
108{
109 Efl_Gfx_Image_Scale_Type type;
110 Elm_Bg_Option option = ELM_BG_OPTION_LAST;
111
112 type = efl_gfx_image_scale_type_get(obj);
113 switch (type)
114 {
115 case EFL_GFX_IMAGE_SCALE_TYPE_NONE:
116 option = ELM_BG_OPTION_CENTER;
117 break;
118 case EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE:
119 option = ELM_BG_OPTION_SCALE;
120 break;
121 case EFL_GFX_IMAGE_SCALE_TYPE_TILE:
122 option = ELM_BG_OPTION_TILE;
123 break;
124 case EFL_GFX_IMAGE_SCALE_TYPE_FILL:
125 option = ELM_BG_OPTION_STRETCH;
126 break;
127 case EFL_GFX_IMAGE_SCALE_TYPE_FIT_INSIDE:
128 default:
129 ERR("Scale type %d cannot be converted to Elm_Bg_Option", type);
130 break;
131 }
132
133 return option;
134}
135
136EOLIAN static void
137_efl_ui_bg_efl_gfx_image_scale_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Efl_Gfx_Image_Scale_Type scale_type)
138{
139 efl_gfx_image_scale_type_set(sd->img, scale_type);
140}
141
142EOLIAN static Efl_Gfx_Image_Scale_Type
143_efl_ui_bg_efl_gfx_image_scale_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
144{
145 return efl_gfx_image_scale_type_get(sd->img);
146}
147
148EAPI void
149elm_bg_color_set(Evas_Object *obj,
150 int r,
151 int g,
152 int b)
153{
154 int a = 255;
155 EFL_UI_BG_DATA_GET_OR_RETURN(obj, sd);
156
157 // reset color
158 if ((r == -1) && (g == -1) && (b == -1))
159 {
160 r = g = b = a = 0;
161 }
162 efl_gfx_color_set(sd->rect, r, g, b, a);
163}
164
165EOLIAN static void
166_efl_ui_bg_efl_gfx_color_color_set(Eo *obj, Efl_Ui_Bg_Data *sd, int r, int g, int b, int a)
167{
168 efl_gfx_color_set(efl_super(obj, MY_CLASS), r, g, b, a);
169 efl_gfx_color_set(sd->rect, r, g, b, a);
170}
171
172EAPI void
173elm_bg_color_get(const Evas_Object *obj,
174 int *r,
175 int *g,
176 int *b)
177{
178 EFL_UI_BG_CHECK(obj);
179 efl_gfx_color_get((Eo *) obj, r, g, b, NULL);
180}
181
182EOLIAN static void
183_efl_ui_bg_efl_gfx_color_color_get(const Eo *obj, Efl_Ui_Bg_Data *sd, int *r, int *g, int *b, int *a)
184{
185 if (!sd->rect)
186 efl_gfx_color_get(efl_super(obj, MY_CLASS), r, g, b, a);
187 else
188 efl_gfx_color_get(sd->rect, r, g, b, a);
189}
190
191EAPI void
192elm_bg_load_size_set(Evas_Object *obj, int w, int h)
193{
194 EFL_UI_BG_DATA_GET_OR_RETURN(obj, sd);
195 efl_gfx_image_load_controller_load_size_set(sd->img, EINA_SIZE2D(w, h));
196}
197
198EOLIAN static void
199_efl_ui_bg_efl_gfx_image_load_controller_load_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Eina_Size2D sz)
200{
201 efl_gfx_image_load_controller_load_size_set(sd->img, sz);
202}
203
204EOLIAN static Eina_Size2D
205_efl_ui_bg_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
206{
207 return efl_gfx_image_load_controller_load_size_get(sd->img);
208}
209
210EAPI Eina_Bool
211elm_bg_file_set(Eo *obj, const char *file, const char *group)
212{
213 return efl_file_set((Eo *) obj, file, group);
214}
215
216EOLIAN static Eina_Bool
217_efl_ui_bg_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *file, const char *key)
218{
219 eina_stringshare_replace(&sd->file, file);
220 eina_stringshare_replace(&sd->key, key);
221
222 return efl_file_set(sd->img, file, key);
223}
224EAPI void
225elm_bg_file_get(const Eo *obj, const char **file, const char **group)
226{
227 efl_file_get((Eo *) obj, file, group);
228}
229
230EOLIAN static void
231_efl_ui_bg_efl_file_file_get(const Eo *obj, Efl_Ui_Bg_Data *sd, const char **file, const char **key)
232{
233 if (elm_widget_is_legacy(obj))
234 {
235 if (file) *file = sd->file;
236 if (key) *key = sd->key;
237 return;
238 }
239
240 efl_file_get(sd->img, file, key);
241}
242
243EOLIAN static Eina_Bool
244_efl_ui_bg_efl_file_mmap_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd,
245 const Eina_File *file, const char *key)
246{
247 return efl_file_mmap_set(sd->img, file, key);
248}
249
250EOLIAN static void
251_efl_ui_bg_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd,
252 const Eina_File **file, const char **key)
253{
254 efl_file_mmap_get(sd->img, file, key);
255}
256
257/* Internal EO APIs and hidden overrides */
258
259ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
260
261#define EFL_UI_BG_EXTRA_OPS \
262 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX)
7 263
8#include "efl_ui_bg.eo.c" 264#include "efl_ui_bg.eo.c"
265
266
267#include "efl_ui_bg_legacy.eo.h"
268
269#define MY_CLASS_NAME_LEGACY "elm_bg"
270
271static void
272_efl_ui_bg_legacy_class_constructor(Efl_Class *klass)
273{
274 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
275}
276
277EOLIAN static Eo *
278_efl_ui_bg_legacy_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
279{
280 obj = efl_constructor(efl_super(obj, EFL_UI_BG_LEGACY_CLASS));
281 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
282 EFL_UI_BG_DATA_GET_OR_RETURN_VAL(obj, pd, obj);
283 efl_gfx_entity_scale_set(pd->img, 1.0);
284
285 return obj;
286}
287
288EAPI Evas_Object *
289elm_bg_add(Evas_Object *parent)
290{
291 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
292 return elm_legacy_add(EFL_UI_BG_LEGACY_CLASS, parent);
293}
294
295#include "efl_ui_bg_legacy.eo.c"
diff --git a/src/lib/elementary/efl_ui_bg.eo b/src/lib/elementary/efl_ui_bg.eo
index ac94ebc0ca..91f3fa64b7 100644
--- a/src/lib/elementary/efl_ui_bg.eo
+++ b/src/lib/elementary/efl_ui_bg.eo
@@ -1,9 +1,19 @@
1interface Efl.Ui.Bg (Efl.Interface, Efl.Gfx.Entity, Efl.Gfx.Image, Efl.File) 1class Efl.Ui.Bg (Efl.Ui.Layout, Efl.Gfx.Color, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller)
2{ 2{
3 [[The bg (background) widget is used for setting (solid) background decorations 3 [[The bg (background) widget is used for setting (solid) background decorations
4 4
5 in a window (unless it has transparency enabled) or on any container object. It 5 for a window (unless it has transparency enabled) or for any container object. It
6 works just like an image but has some properties useful for backgrounds, such as 6 works just like an image, but has some properties useful for backgrounds, such as
7 setting it to tiled, centered, scaled or stretched. 7 setting it to tiled, centered, scaled or stretched.
8 ]] 8 ]]
9 legacy_prefix: elm_bg;
10 implements {
11 Efl.Object.constructor;
12 Efl.Object.destructor;
13 Efl.File.file { get; set; }
14 Efl.File.mmap { get; set; }
15 Efl.Gfx.Color.color { get; set; }
16 Efl.Gfx.Image.scale_type { get; set; }
17 Efl.Gfx.Image_Load_Controller.load_size { get; set; }
18 }
9} 19}
diff --git a/src/lib/elementary/efl_ui_bg_widget_legacy.eo b/src/lib/elementary/efl_ui_bg_legacy.eo
index 66d38b27b1..7460aaa039 100644
--- a/src/lib/elementary/efl_ui_bg_widget_legacy.eo
+++ b/src/lib/elementary/efl_ui_bg_legacy.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Bg_Widget_Legacy (Efl.Ui.Bg_Widget, Efl.Ui.Legacy) 1class Efl.Ui.Bg_Legacy (Efl.Ui.Bg, Efl.Ui.Legacy)
2{ 2{
3 [[The bg (background) widget is used for setting (solid) background decorations 3 [[The bg (background) widget is used for setting (solid) background decorations
4 4
diff --git a/src/lib/elementary/efl_ui_bg_widget_private.h b/src/lib/elementary/efl_ui_bg_private.h
index e886db50ba..5fa4842e40 100644
--- a/src/lib/elementary/efl_ui_bg_widget_private.h
+++ b/src/lib/elementary/efl_ui_bg_private.h
@@ -23,8 +23,8 @@
23/** 23/**
24 * Base layout smart data extended with bg instance data. 24 * Base layout smart data extended with bg instance data.
25 */ 25 */
26typedef struct _Efl_Ui_Bg_Widget_Data Efl_Ui_Bg_Widget_Data; 26typedef struct _Efl_Ui_Bg_Data Efl_Ui_Bg_Data;
27struct _Efl_Ui_Bg_Widget_Data 27struct _Efl_Ui_Bg_Data
28{ 28{
29 Evas_Object *rect; /*<< Used for elm_bg_color_set(): elm.swallow.rectangle */ 29 Evas_Object *rect; /*<< Used for elm_bg_color_set(): elm.swallow.rectangle */
30 Evas_Object *img; /*<< Used for elm_bg_file_set(): elm.swallow.content */ 30 Evas_Object *img; /*<< Used for elm_bg_file_set(): elm.swallow.content */
@@ -36,11 +36,11 @@ struct _Efl_Ui_Bg_Widget_Data
36 * @} 36 * @}
37 */ 37 */
38 38
39#define EFL_UI_BG_WIDGET_DATA_GET(o, sd) \ 39#define EFL_UI_BG_DATA_GET(o, sd) \
40Efl_Ui_Bg_Widget_Data * sd = efl_data_scope_get(o, EFL_UI_BG_WIDGET_CLASS) 40Efl_Ui_Bg_Data * sd = efl_data_scope_get(o, EFL_UI_BG_CLASS)
41 41
42#define EFL_UI_BG_WIDGET_DATA_GET_OR_RETURN(o, ptr) \ 42#define EFL_UI_BG_DATA_GET_OR_RETURN(o, ptr) \
43 EFL_UI_BG_WIDGET_DATA_GET(o, ptr); \ 43 EFL_UI_BG_DATA_GET(o, ptr); \
44 if (EINA_UNLIKELY(!ptr)) \ 44 if (EINA_UNLIKELY(!ptr)) \
45 { \ 45 { \
46 ERR("No widget data for object %p (%s)", \ 46 ERR("No widget data for object %p (%s)", \
@@ -48,8 +48,8 @@ Efl_Ui_Bg_Widget_Data * sd = efl_data_scope_get(o, EFL_UI_BG_WIDGET_CLASS)
48 return; \ 48 return; \
49 } 49 }
50 50
51#define EFL_UI_BG_WIDGET_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ 51#define EFL_UI_BG_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
52 EFL_UI_BG_WIDGET_DATA_GET(o, ptr); \ 52 EFL_UI_BG_DATA_GET(o, ptr); \
53 if (EINA_UNLIKELY(!ptr)) \ 53 if (EINA_UNLIKELY(!ptr)) \
54 { \ 54 { \
55 ERR("No widget data for object %p (%s)", \ 55 ERR("No widget data for object %p (%s)", \
@@ -57,8 +57,8 @@ Efl_Ui_Bg_Widget_Data * sd = efl_data_scope_get(o, EFL_UI_BG_WIDGET_CLASS)
57 return val; \ 57 return val; \
58 } 58 }
59 59
60#define EFL_UI_BG_WIDGET_CHECK(obj) \ 60#define EFL_UI_BG_CHECK(obj) \
61 if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_BG_WIDGET_CLASS))) \ 61 if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_BG_CLASS))) \
62 return 62 return
63 63
64#endif 64#endif
diff --git a/src/lib/elementary/efl_ui_bg_widget.c b/src/lib/elementary/efl_ui_bg_widget.c
deleted file mode 100644
index cd05d060a7..0000000000
--- a/src/lib/elementary/efl_ui_bg_widget.c
+++ /dev/null
@@ -1,295 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#define EFL_ACCESS_OBJECT_PROTECTED
6#define ELM_LAYOUT_PROTECTED
7
8#include <Elementary.h>
9#include "elm_priv.h"
10#include "efl_ui_bg_widget_private.h"
11
12#define MY_CLASS EFL_UI_BG_WIDGET_CLASS
13#define MY_CLASS_PFX efl_ui_bg_widget
14
15#define MY_CLASS_NAME "Efl.Ui.Bg_Widget"
16
17static const Elm_Layout_Part_Alias_Description _content_aliases[] =
18{
19 {"overlay", "elm.swallow.content"},
20 {NULL, NULL}
21};
22
23EOLIAN static Eo *
24_efl_ui_bg_widget_efl_object_constructor(Eo *obj, Efl_Ui_Bg_Widget_Data *pd)
25{
26 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
27
28 if (!elm_widget_theme_klass_get(obj))
29 elm_widget_theme_klass_set(obj, "bg");
30
31 obj = efl_constructor(efl_super(obj, MY_CLASS));
32 elm_widget_sub_object_parent_add(obj);
33 elm_widget_can_focus_set(obj, EINA_FALSE);
34
35 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
36 elm_widget_theme_klass_get(obj),
37 elm_widget_theme_element_get(obj),
38 elm_widget_theme_style_get(obj)))
39 CRI("Failed to set layout!");
40
41 if (elm_widget_is_legacy(obj))
42 {
43 pd->rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj,
44 efl_gfx_color_set(efl_added, 0, 0, 0, 0),
45 efl_content_set(efl_part(obj, "elm.swallow.rectangle"), efl_added));
46
47 pd->img = efl_add(EFL_UI_IMAGE_CLASS, obj,
48 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
49 efl_content_set(efl_part(obj, "elm.swallow.background"), efl_added));
50 }
51 else
52 {
53 pd->rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj,
54 efl_gfx_color_set(efl_added, 0, 0, 0, 0),
55 efl_content_set(efl_part(obj, "efl.rectangle"), efl_added));
56
57 pd->img = efl_add(EFL_UI_IMAGE_CLASS, obj,
58 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
59 efl_content_set(efl_part(obj, "efl.background"), efl_added));
60 }
61 pd->file = NULL;
62 pd->key = NULL;
63
64 efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED);
65
66 efl_ui_widget_focus_allow_set(obj, EINA_FALSE);
67
68 return obj;
69}
70
71EOLIAN static void
72_efl_ui_bg_widget_efl_object_destructor(Eo *obj, Efl_Ui_Bg_Widget_Data *sd)
73{
74 ELM_SAFE_FREE(sd->file, eina_stringshare_del);
75 ELM_SAFE_FREE(sd->key, eina_stringshare_del);
76
77 efl_destructor(efl_super(obj, MY_CLASS));
78}
79
80EAPI void
81elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
82{
83 Efl_Gfx_Image_Scale_Type type;
84
85 switch (option)
86 {
87 case ELM_BG_OPTION_CENTER:
88 type = EFL_GFX_IMAGE_SCALE_TYPE_NONE;
89 break;
90 case ELM_BG_OPTION_SCALE:
91 type = EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE;
92 break;
93 case ELM_BG_OPTION_TILE:
94 type = EFL_GFX_IMAGE_SCALE_TYPE_TILE;
95 break;
96 case ELM_BG_OPTION_STRETCH:
97 type = EFL_GFX_IMAGE_SCALE_TYPE_FILL;
98 break;
99 case ELM_BG_OPTION_LAST:
100 default:
101 type = EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE;
102 }
103 efl_gfx_image_scale_type_set(obj, type);
104}
105
106EAPI Elm_Bg_Option
107elm_bg_option_get(const Evas_Object *obj)
108{
109 Efl_Gfx_Image_Scale_Type type;
110 Elm_Bg_Option option = ELM_BG_OPTION_LAST;
111
112 type = efl_gfx_image_scale_type_get(obj);
113 switch (type)
114 {
115 case EFL_GFX_IMAGE_SCALE_TYPE_NONE:
116 option = ELM_BG_OPTION_CENTER;
117 break;
118 case EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE:
119 option = ELM_BG_OPTION_SCALE;
120 break;
121 case EFL_GFX_IMAGE_SCALE_TYPE_TILE:
122 option = ELM_BG_OPTION_TILE;
123 break;
124 case EFL_GFX_IMAGE_SCALE_TYPE_FILL:
125 option = ELM_BG_OPTION_STRETCH;
126 break;
127 case EFL_GFX_IMAGE_SCALE_TYPE_FIT_INSIDE:
128 default:
129 ERR("Scale type %d cannot be converted to Elm_Bg_Option", type);
130 break;
131 }
132
133 return option;
134}
135
136EOLIAN static void
137_efl_ui_bg_widget_efl_gfx_image_scale_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd, Efl_Gfx_Image_Scale_Type scale_type)
138{
139 efl_gfx_image_scale_type_set(sd->img, scale_type);
140}
141
142EOLIAN static Efl_Gfx_Image_Scale_Type
143_efl_ui_bg_widget_efl_gfx_image_scale_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd)
144{
145 return efl_gfx_image_scale_type_get(sd->img);
146}
147
148EAPI void
149elm_bg_color_set(Evas_Object *obj,
150 int r,
151 int g,
152 int b)
153{
154 int a = 255;
155 EFL_UI_BG_WIDGET_DATA_GET_OR_RETURN(obj, sd);
156
157 // reset color
158 if ((r == -1) && (g == -1) && (b == -1))
159 {
160 r = g = b = a = 0;
161 }
162 efl_gfx_color_set(sd->rect, r, g, b, a);
163}
164
165EOLIAN static void
166_efl_ui_bg_widget_efl_gfx_color_color_set(Eo *obj, Efl_Ui_Bg_Widget_Data *sd, int r, int g, int b, int a)
167{
168 efl_gfx_color_set(efl_super(obj, MY_CLASS), r, g, b, a);
169 efl_gfx_color_set(sd->rect, r, g, b, a);
170}
171
172EAPI void
173elm_bg_color_get(const Evas_Object *obj,
174 int *r,
175 int *g,
176 int *b)
177{
178 EFL_UI_BG_WIDGET_CHECK(obj);
179 efl_gfx_color_get((Eo *) obj, r, g, b, NULL);
180}
181
182EOLIAN static void
183_efl_ui_bg_widget_efl_gfx_color_color_get(const Eo *obj, Efl_Ui_Bg_Widget_Data *sd, int *r, int *g, int *b, int *a)
184{
185 if (!sd->rect)
186 efl_gfx_color_get(efl_super(obj, MY_CLASS), r, g, b, a);
187 else
188 efl_gfx_color_get(sd->rect, r, g, b, a);
189}
190
191EAPI void
192elm_bg_load_size_set(Evas_Object *obj, int w, int h)
193{
194 EFL_UI_BG_WIDGET_DATA_GET_OR_RETURN(obj, sd);
195 efl_gfx_image_load_controller_load_size_set(sd->img, EINA_SIZE2D(w, h));
196}
197
198EOLIAN static void
199_efl_ui_bg_widget_efl_gfx_image_load_controller_load_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd, Eina_Size2D sz)
200{
201 efl_gfx_image_load_controller_load_size_set(sd->img, sz);
202}
203
204EOLIAN static Eina_Size2D
205_efl_ui_bg_widget_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd)
206{
207 return efl_gfx_image_load_controller_load_size_get(sd->img);
208}
209
210EAPI Eina_Bool
211elm_bg_file_set(Eo *obj, const char *file, const char *group)
212{
213 return efl_file_set((Eo *) obj, file, group);
214}
215
216EOLIAN static Eina_Bool
217_efl_ui_bg_widget_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd, const char *file, const char *key)
218{
219 eina_stringshare_replace(&sd->file, file);
220 eina_stringshare_replace(&sd->key, key);
221
222 return efl_file_set(sd->img, file, key);
223}
224EAPI void
225elm_bg_file_get(const Eo *obj, const char **file, const char **group)
226{
227 efl_file_get((Eo *) obj, file, group);
228}
229
230EOLIAN static void
231_efl_ui_bg_widget_efl_file_file_get(const Eo *obj, Efl_Ui_Bg_Widget_Data *sd, const char **file, const char **key)
232{
233 if (elm_widget_is_legacy(obj))
234 {
235 if (file) *file = sd->file;
236 if (key) *key = sd->key;
237 return;
238 }
239
240 efl_file_get(sd->img, file, key);
241}
242
243EOLIAN static Eina_Bool
244_efl_ui_bg_widget_efl_file_mmap_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd,
245 const Eina_File *file, const char *key)
246{
247 return efl_file_mmap_set(sd->img, file, key);
248}
249
250EOLIAN static void
251_efl_ui_bg_widget_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Widget_Data *sd,
252 const Eina_File **file, const char **key)
253{
254 efl_file_mmap_get(sd->img, file, key);
255}
256
257/* Internal EO APIs and hidden overrides */
258
259ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
260
261#define EFL_UI_BG_WIDGET_EXTRA_OPS \
262 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX)
263
264#include "efl_ui_bg_widget.eo.c"
265
266
267#include "efl_ui_bg_widget_legacy.eo.h"
268
269#define MY_CLASS_NAME_LEGACY "elm_bg"
270
271static void
272_efl_ui_bg_widget_legacy_class_constructor(Efl_Class *klass)
273{
274 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
275}
276
277EOLIAN static Eo *
278_efl_ui_bg_widget_legacy_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
279{
280 obj = efl_constructor(efl_super(obj, EFL_UI_BG_WIDGET_LEGACY_CLASS));
281 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
282 EFL_UI_BG_WIDGET_DATA_GET_OR_RETURN_VAL(obj, pd, obj);
283 efl_gfx_entity_scale_set(pd->img, 1.0);
284
285 return obj;
286}
287
288EAPI Evas_Object *
289elm_bg_add(Evas_Object *parent)
290{
291 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
292 return elm_legacy_add(EFL_UI_BG_WIDGET_LEGACY_CLASS, parent);
293}
294
295#include "efl_ui_bg_widget_legacy.eo.c"
diff --git a/src/lib/elementary/efl_ui_bg_widget.eo b/src/lib/elementary/efl_ui_bg_widget.eo
deleted file mode 100644
index 6af5aa5ae5..0000000000
--- a/src/lib/elementary/efl_ui_bg_widget.eo
+++ /dev/null
@@ -1,19 +0,0 @@
1class Efl.Ui.Bg_Widget (Efl.Ui.Layout, Efl.Ui.Bg, Efl.Gfx.Image_Load_Controller)
2{
3 [[The bg (background) widget is used for setting (solid) background decorations
4
5 for a window (unless it has transparency enabled) or for any container object. It
6 works just like an image, but has some properties useful for backgrounds, such as
7 setting it to tiled, centered, scaled or stretched.
8 ]]
9 legacy_prefix: elm_bg;
10 implements {
11 Efl.Object.constructor;
12 Efl.Object.destructor;
13 Efl.File.file { get; set; }
14 Efl.File.mmap { get; set; }
15 Efl.Gfx.Color.color { get; set; }
16 Efl.Gfx.Image.scale_type { get; set; }
17 Efl.Gfx.Image_Load_Controller.load_size { get; set; }
18 }
19}
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 3ad54d31aa..4e1d2d9c54 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -82,7 +82,7 @@ struct _Elm_Translate_String_Data
82 * "." to "_" among the class name. */ 82 * "." to "_" among the class name. */
83static const char *legacy_type_table[][2] = 83static const char *legacy_type_table[][2] =
84{ 84{
85 { "Efl.Ui.Bg_Widget_Legacy", "Elm_Bg" }, 85 { "Efl.Ui.Bg_Legacy", "Elm_Bg" },
86 { "Efl.Ui.Button_Legacy", "Elm_Button" }, 86 { "Efl.Ui.Button_Legacy", "Elm_Button" },
87 { "Efl.Ui.Check_Legacy", "Elm_Check" }, 87 { "Efl.Ui.Check_Legacy", "Elm_Check" },
88 { "Efl.Ui.Clock_Legacy", "Elm_Datetime" }, 88 { "Efl.Ui.Clock_Legacy", "Elm_Datetime" },
@@ -6086,7 +6086,7 @@ _efl_ui_widget_bg_get(const Efl_Ui_Widget *obj)
6086 if (!bg_obj) 6086 if (!bg_obj)
6087 { 6087 {
6088 /* XXX const */ 6088 /* XXX const */
6089 bg_obj = efl_add(EFL_UI_BG_WIDGET_CLASS, (Eo *)obj); 6089 bg_obj = efl_add(EFL_UI_BG_CLASS, (Eo *)obj);
6090 EINA_SAFETY_ON_NULL_RETURN_VAL(bg_obj, NULL); 6090 EINA_SAFETY_ON_NULL_RETURN_VAL(bg_obj, NULL);
6091 sd->bg = bg_obj; 6091 sd->bg = bg_obj;
6092 efl_canvas_group_member_add((Eo *)obj, sd->bg); 6092 efl_canvas_group_member_add((Eo *)obj, sd->bg);
diff --git a/src/lib/elementary/efl_ui_widget_part_bg.eo b/src/lib/elementary/efl_ui_widget_part_bg.eo
index a058403a55..8faa63b315 100644
--- a/src/lib/elementary/efl_ui_widget_part_bg.eo
+++ b/src/lib/elementary/efl_ui_widget_part_bg.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Widget_Part_Bg (Efl.Ui.Widget_Part, Efl.Gfx.Color, Efl.Ui.Bg) 1class Efl.Ui.Widget_Part_Bg (Efl.Ui.Widget_Part, Efl.File, Efl.Gfx.Color, Efl.Gfx.Image)
2{ 2{
3 [[Elementary widget internal part background class]] 3 [[Elementary widget internal part background class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 529b41405e..3cf8ac264a 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -7368,7 +7368,7 @@ _elm_win_bg_must_swallow(Efl_Ui_Win_Data *sd)
7368 // Note: This code path is probably not necessary (custom legacy 7368 // Note: This code path is probably not necessary (custom legacy
7369 // theme but efl_add'ed window -- all efl_add'ed widgets would 7369 // theme but efl_add'ed window -- all efl_add'ed widgets would
7370 // use default theme) 7370 // use default theme)
7371 bg = efl_add(EFL_UI_BG_WIDGET_CLASS, sd->obj); 7371 bg = efl_add(EFL_UI_BG_CLASS, sd->obj);
7372 } 7372 }
7373 wd = efl_data_scope_get(bg, EFL_UI_WIDGET_CLASS); 7373 wd = efl_data_scope_get(bg, EFL_UI_WIDGET_CLASS);
7374 if (wd) 7374 if (wd)
@@ -7411,7 +7411,7 @@ _elm_win_standard_init(Eo *obj)
7411 // Note: This code path is probably not necessary (custom legacy 7411 // Note: This code path is probably not necessary (custom legacy
7412 // theme but efl_add'ed window -- all efl_add'ed widgets would 7412 // theme but efl_add'ed window -- all efl_add'ed widgets would
7413 // use default theme) 7413 // use default theme)
7414 bg = efl_add(EFL_UI_BG_WIDGET_CLASS, obj); 7414 bg = efl_add(EFL_UI_BG_CLASS, obj);
7415 } 7415 }
7416 _elm_win_bg_set(sd, bg); 7416 _elm_win_bg_set(sd, bg);
7417 } 7417 }
diff --git a/src/lib/elementary/elm_bg_legacy.h b/src/lib/elementary/elm_bg_legacy.h
index 66f56e7501..ee50dd9d6b 100644
--- a/src/lib/elementary/elm_bg_legacy.h
+++ b/src/lib/elementary/elm_bg_legacy.h
@@ -165,4 +165,4 @@ EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj);
165 */ 165 */
166EAPI void elm_bg_load_size_set(Evas_Object *obj, int w, int h); 166EAPI void elm_bg_load_size_set(Evas_Object *obj, int w, int h);
167 167
168#include "efl_ui_bg_widget.eo.legacy.h" 168#include "efl_ui_bg.eo.legacy.h"
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 8786d4dc0c..491319c6ec 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -2,7 +2,7 @@ pub_legacy_eo_files = [
2 'efl_ui_button_legacy.eo', 2 'efl_ui_button_legacy.eo',
3 'efl_ui_check_legacy.eo', 3 'efl_ui_check_legacy.eo',
4 'efl_ui_radio_legacy.eo', 4 'efl_ui_radio_legacy.eo',
5 'efl_ui_bg_widget_legacy.eo', 5 'efl_ui_bg_legacy.eo',
6 'efl_ui_video_legacy.eo', 6 'efl_ui_video_legacy.eo',
7 'efl_ui_frame_legacy.eo', 7 'efl_ui_frame_legacy.eo',
8 'efl_ui_panes_legacy.eo', 8 'efl_ui_panes_legacy.eo',
@@ -132,7 +132,6 @@ endforeach
132pub_eo_files = [ 132pub_eo_files = [
133 'efl_ui_widget.eo', 133 'efl_ui_widget.eo',
134 'efl_ui_bg.eo', 134 'efl_ui_bg.eo',
135 'efl_ui_bg_widget.eo',
136 'efl_ui_button.eo', 135 'efl_ui_button.eo',
137 'efl_ui_calendar.eo', 136 'efl_ui_calendar.eo',
138 'efl_ui_calendar_item.eo', 137 'efl_ui_calendar_item.eo',
@@ -364,7 +363,7 @@ elementary_headers_unstable = [
364 'elm_widget_box.h', 363 'elm_widget_box.h',
365 'elm_widget_bubble.h', 364 'elm_widget_bubble.h',
366 'efl_ui_button_private.h', 365 'efl_ui_button_private.h',
367 'efl_ui_bg_widget_private.h', 366 'efl_ui_bg_private.h',
368 'elm_widget_calendar.h', 367 'elm_widget_calendar.h',
369 'efl_ui_calendar_private.h', 368 'efl_ui_calendar_private.h',
370 'efl_ui_check_private.h', 369 'efl_ui_check_private.h',
@@ -709,7 +708,6 @@ elementary_src = [
709 'elm_atspi_bridge.c', 708 'elm_atspi_bridge.c',
710 'efl_ui_legacy.c', 709 'efl_ui_legacy.c',
711 'efl_ui_bg.c', 710 'efl_ui_bg.c',
712 'efl_ui_bg_widget.c',
713 'elm_box.c', 711 'elm_box.c',
714 'elm_bubble.c', 712 'elm_bubble.c',
715 'efl_ui_button.c', 713 'efl_ui_button.c',