summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/Efl_Ui.h8
-rw-r--r--src/lib/elementary/efl_ui.eot16
-rw-r--r--src/lib/elementary/efl_ui_alert_popup.c38
-rw-r--r--src/lib/elementary/efl_ui_alert_popup.eo3
-rw-r--r--src/lib/elementary/efl_ui_alert_popup_part_title.eo (renamed from src/lib/elementary/efl_ui_alert_popup_part.eo)2
-rw-r--r--src/lib/elementary/efl_ui_animation_view.c31
-rw-r--r--src/lib/elementary/efl_ui_animation_view.eo19
-rw-r--r--src/lib/elementary/efl_ui_caching_factory.c4
-rw-r--r--src/lib/elementary/efl_ui_caching_factory.eo7
-rw-r--r--src/lib/elementary/efl_ui_check.c3
-rw-r--r--src/lib/elementary/efl_ui_collection_view.c141
-rw-r--r--src/lib/elementary/efl_ui_internal_text_scroller.c16
-rw-r--r--src/lib/elementary/efl_ui_position_manager_list.c31
-rw-r--r--src/lib/elementary/efl_ui_relative_container.c (renamed from src/lib/elementary/efl_ui_relative_layout.c)198
-rw-r--r--src/lib/elementary/efl_ui_relative_container.eo94
-rw-r--r--src/lib/elementary/efl_ui_relative_container_private.h (renamed from src/lib/elementary/efl_ui_relative_layout_private.h)68
-rw-r--r--src/lib/elementary/efl_ui_relative_layout.eo73
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.eo12
-rw-r--r--src/lib/elementary/efl_ui_selection_manager.c5
-rw-r--r--src/lib/elementary/efl_ui_slider.c48
-rw-r--r--src/lib/elementary/efl_ui_spotlight_container.c4
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager.eo8
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_plain.c10
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_plain.eo2
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_scroll.c6
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_scroll.eo2
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_stack.c166
-rw-r--r--src/lib/elementary/efl_ui_spotlight_manager_stack.eo2
-rw-r--r--src/lib/elementary/efl_ui_table_static.eo8
-rw-r--r--src/lib/elementary/efl_ui_text.c48
-rw-r--r--src/lib/elementary/efl_ui_text.eo118
-rw-r--r--src/lib/elementary/efl_ui_widget.c8
-rw-r--r--src/lib/elementary/efl_ui_win.c4
-rw-r--r--src/lib/elementary/elc_naviframe.c4
-rw-r--r--src/lib/elementary/elm_code_file.c11
-rw-r--r--src/lib/elementary/elm_config.c27
-rw-r--r--src/lib/elementary/elm_entry.c1
-rw-r--r--src/lib/elementary/elm_general.eot1
-rw-r--r--src/lib/elementary/elm_gengrid.c1
-rw-r--r--src/lib/elementary/elm_genlist.c172
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c61
-rw-r--r--src/lib/elementary/elm_interface_scrollable.eo3
-rw-r--r--src/lib/elementary/elm_list.c3
-rw-r--r--src/lib/elementary/elm_map.c3
-rw-r--r--src/lib/elementary/elm_panel.c1
-rw-r--r--src/lib/elementary/elm_priv.h4
-rw-r--r--src/lib/elementary/elm_scroller.c1
-rw-r--r--src/lib/elementary/elm_slider.c58
-rw-r--r--src/lib/elementary/elm_toolbar.c1
-rw-r--r--src/lib/elementary/elm_widget_genlist.h3
-rw-r--r--src/lib/elementary/meson.build8
51 files changed, 893 insertions, 673 deletions
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 917ef5b..9c8744d 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -222,15 +222,15 @@ EAPI Eina_Bool efl_ui_win_autodel_get(const Efl_Ui_Win *obj);
222#endif 222#endif
223# include <efl_ui_win_inlined.eo.h> 223# include <efl_ui_win_inlined.eo.h>
224# include <efl_ui_win_socket.eo.h> 224# include <efl_ui_win_socket.eo.h>
225# include <efl_ui_relative_layout.eo.h> 225# include <efl_ui_relative_container.eo.h>
226
227// FIXME - Text object must stop using Context_Item_Clicked_Cb!
228typedef void (*Context_Item_Clicked_Cb)(void *data, Eo *obj, void *event_info);
226 229
227/* FIXME: Efl.Ui.Text must not use elm_general.h
228# include <elm_general.h>
229# include <efl_text_interactive.eo.h> 230# include <efl_text_interactive.eo.h>
230# include <efl_ui_text.eo.h> 231# include <efl_ui_text.eo.h>
231# include <efl_ui_text_editable.eo.h> 232# include <efl_ui_text_editable.eo.h>
232# include <efl_ui_text_async.eo.h> 233# include <efl_ui_text_async.eo.h>
233*/
234 234
235# include <efl_ui_animation_view.eo.h> 235# include <efl_ui_animation_view.eo.h>
236# include <efl_ui_clock.eo.h> 236# include <efl_ui_clock.eo.h>
diff --git a/src/lib/elementary/efl_ui.eot b/src/lib/elementary/efl_ui.eot
index e9c2fbc..3c186c9 100644
--- a/src/lib/elementary/efl_ui.eot
+++ b/src/lib/elementary/efl_ui.eot
@@ -42,23 +42,9 @@ enum Efl.Ui.Focus.Move_Policy
42 Left, Right, Up, Down, Tab, or Shift+Tab.]] 42 Left, Right, Up, Down, Tab, or Shift+Tab.]]
43} 43}
44 44
45enum @beta Efl.Ui.Slider_Indicator_Visible_Mode 45enum @beta Efl.Ui.Focus.Autoscroll_Mode
46{
47 [[Slider's indicator visibility mode.
48
49 @since 1.13
50 ]]
51 on_drag, [[show indicator on mouse down or change in slider value]]
52 always, [[Always show the indicator.]]
53 on_focus, [[Show the indicator on focus]]
54 none [[Never show the indicator ]]
55}
56
57enum Efl.Ui.Focus.Autoscroll_Mode
58{ 46{
59 [[Focus Autoscroll Mode 47 [[Focus Autoscroll Mode
60
61 @since 1.10
62 ]] 48 ]]
63 show, [[Directly show the focused region or item automatically.]] 49 show, [[Directly show the focused region or item automatically.]]
64 none, [[Do not show the focused region or item automatically.]] 50 none, [[Do not show the focused region or item automatically.]]
diff --git a/src/lib/elementary/efl_ui_alert_popup.c b/src/lib/elementary/efl_ui_alert_popup.c
index 0c5fc1b..65dcb49 100644
--- a/src/lib/elementary/efl_ui_alert_popup.c
+++ b/src/lib/elementary/efl_ui_alert_popup.c
@@ -8,7 +8,7 @@
8 8
9#include "elm_priv.h" 9#include "elm_priv.h"
10#include "efl_ui_alert_popup_private.h" 10#include "efl_ui_alert_popup_private.h"
11#include "efl_ui_alert_popup_part.eo.h" 11#include "efl_ui_alert_popup_part_title.eo.h"
12#include "elm_part_helper.h" 12#include "elm_part_helper.h"
13 13
14#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS 14#define MY_CLASS EFL_UI_ALERT_POPUP_CLASS
@@ -257,18 +257,42 @@ _efl_ui_alert_popup_efl_object_destructor(Eo *obj, Efl_Ui_Alert_Popup_Data *pd)
257} 257}
258 258
259static Eina_Bool 259static Eina_Bool
260_part_is_efl_ui_alert_popup_part(const Eo *obj, const char *part) 260_part_is_efl_ui_alert_popup_part_title(const Eo *obj, const char *part)
261{ 261{
262 if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE; 262 if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE;
263 return eina_streq(part, "efl.text.title"); 263 return eina_streq(part, "efl.text.title");
264} 264}
265 265
266/* Efl.Part begin */ 266/* Efl.Part begin */
267ELM_PART_OVERRIDE_PARTIAL(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, 267EOLIAN static Efl_Object *
268 Efl_Ui_Alert_Popup_Data, _part_is_efl_ui_alert_popup_part) 268_efl_ui_alert_popup_efl_part_part_get(const Eo *obj, Efl_Ui_Alert_Popup_Data *priv EINA_UNUSED, const char *part)
269ELM_PART_OVERRIDE_TEXT_SET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data) 269{
270ELM_PART_OVERRIDE_TEXT_GET(efl_ui_alert_popup, EFL_UI_ALERT_POPUP, Efl_Ui_Alert_Popup_Data) 270 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
271#include "efl_ui_alert_popup_part.eo.c" 271 if (_part_is_efl_ui_alert_popup_part_title(obj, part))
272 return ELM_PART_IMPLEMENT(EFL_UI_ALERT_POPUP_PART_TITLE_CLASS, obj, part);
273 return efl_part_get(efl_super(obj, EFL_UI_ALERT_POPUP_CLASS), part);
274}
275
276EOLIAN static void
277_efl_ui_alert_popup_part_title_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text)
278{
279 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
280 Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
281
282 _efl_ui_alert_popup_text_set(pd->obj, sd, pd->part, text);
283}
284
285EOLIAN static const char*
286_efl_ui_alert_popup_part_title_efl_text_text_get(const Eo *obj, void *_pd EINA_UNUSED)
287{
288 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
289 Efl_Ui_Alert_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_ALERT_POPUP_CLASS);
290
291 return _efl_ui_alert_popup_text_get(pd->obj, sd, pd->part);
292}
293
294
295#include "efl_ui_alert_popup_part_title.eo.c"
272 296
273/* Efl.Part end */ 297/* Efl.Part end */
274EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup) 298EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_alert_popup)
diff --git a/src/lib/elementary/efl_ui_alert_popup.eo b/src/lib/elementary/efl_ui_alert_popup.eo
index c154bb2..b51fcb4 100644
--- a/src/lib/elementary/efl_ui_alert_popup.eo
+++ b/src/lib/elementary/efl_ui_alert_popup.eo
@@ -45,6 +45,9 @@ class Efl.Ui.Alert_Popup extends Efl.Ui.Popup
45 } 45 }
46 } 46 }
47 } 47 }
48 parts {
49 title @beta: Efl.Ui.Alert_Popup_Part_Title; [[The title text of Alert Popup.]]
50 }
48 implements { 51 implements {
49 Efl.Object.constructor; 52 Efl.Object.constructor;
50 Efl.Object.destructor; 53 Efl.Object.destructor;
diff --git a/src/lib/elementary/efl_ui_alert_popup_part.eo b/src/lib/elementary/efl_ui_alert_popup_part_title.eo
index b5860a9..94a4899 100644
--- a/src/lib/elementary/efl_ui_alert_popup_part.eo
+++ b/src/lib/elementary/efl_ui_alert_popup_part_title.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Alert_Popup_Part extends Efl.Ui.Layout_Part_Text 1class @beta Efl.Ui.Alert_Popup_Part_Title extends Efl.Ui.Layout_Part_Text
2{ 2{
3 [[Efl UI Alert Popup internal part class]] 3 [[Efl UI Alert Popup internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/efl_ui_animation_view.c b/src/lib/elementary/efl_ui_animation_view.c
index 82aba0f..074ebfd 100644
--- a/src/lib/elementary/efl_ui_animation_view.c
+++ b/src/lib/elementary/efl_ui_animation_view.c
@@ -468,6 +468,37 @@ _efl_ui_animation_view_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
468 return EINA_TRUE; 468 return EINA_TRUE;
469} 469}
470 470
471Eina_Bool _efl_ui_animation_view_play_sector(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *start, const char *end)
472{
473 int start_frame = 0;
474 int end_frame = evas_object_vg_animated_frame_count_get(pd->vg) - 1;
475
476 if (start && end)
477 {
478 efl_gfx_frame_controller_sector_get(pd->vg, start, &start_frame, NULL);
479 efl_gfx_frame_controller_sector_get(pd->vg, end, &end_frame, NULL);
480 }
481 else
482 {
483 if (start)
484 {
485 efl_gfx_frame_controller_sector_get(pd->vg, start, &start_frame, &end_frame);
486 }
487 else if (end)
488 {
489 efl_gfx_frame_controller_sector_get(pd->vg, end, &end_frame, NULL);
490 }
491 }
492
493 efl_ui_animation_view_min_frame_set(obj, start_frame);
494 if (start_frame < end_frame)
495 efl_ui_animation_view_max_frame_set(obj, end_frame);
496
497 if (!efl_ui_animation_view_play(obj))
498 return EINA_FALSE;
499 return EINA_TRUE;
500}
501
471EOLIAN static Eina_Bool 502EOLIAN static Eina_Bool
472_efl_ui_animation_view_stop(Eo *obj, Efl_Ui_Animation_View_Data *pd) 503_efl_ui_animation_view_stop(Eo *obj, Efl_Ui_Animation_View_Data *pd)
473{ 504{
diff --git a/src/lib/elementary/efl_ui_animation_view.eo b/src/lib/elementary/efl_ui_animation_view.eo
index 2d090bb..f06c9b1 100644
--- a/src/lib/elementary/efl_ui_animation_view.eo
+++ b/src/lib/elementary/efl_ui_animation_view.eo
@@ -135,6 +135,25 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
135 135
136 return: bool; [[$true when it's successful. $false otherwise.]] 136 return: bool; [[$true when it's successful. $false otherwise.]]
137 } 137 }
138 play_sector {
139 [[Play animation of sector one time instantly when it's available.
140
141 If end sector is NULL, only start sector is referenced.
142 If both the start and end sectors are valid,
143 Play is played and stoped at starting point of each sector.
144
145 If start is null and end is valid, playback starts from 0 frame to the start frame of the end sector.
146 If both sectors start and end are invalid. Play from 0 frame to the last frame of animation view object.
147
148 Note: This method use to @.min_frame, @.max_frame (@.min_progress, @.max_progress) internally.
149 So if you have changed the min or max frame(progress) it can be changed to the sector frame.
150 ]]
151 params {
152 @in start: string; [[ The name of start sector ]]
153 @in end: string; [[ The name of end sector ]]
154 }
155 return: bool; [[$true when it's successful. $false otherwise.]]
156 }
138 play_back { 157 play_back {
139 [[Play back animation one time instantly when it's available. 158 [[Play back animation one time instantly when it's available.
140 159
diff --git a/src/lib/elementary/efl_ui_caching_factory.c b/src/lib/elementary/efl_ui_caching_factory.c
index 5c714d9..1ec9bd1 100644
--- a/src/lib/elementary/efl_ui_caching_factory.c
+++ b/src/lib/elementary/efl_ui_caching_factory.c
@@ -438,8 +438,8 @@ _efl_ui_caching_factory_pause(void *data, const Efl_Event *event EINA_UNUSED)
438 Efl_Ui_Caching_Factory_Data *pd = data; 438 Efl_Ui_Caching_Factory_Data *pd = data;
439 Efl_Gfx_Entity *entity; 439 Efl_Gfx_Entity *entity;
440 440
441 // Application is going into background, let's free ressource 441 // Application is going into background, let's free resources.
442 // Possible improvement would be to delay that by a few second. 442 // Possible improvement would be to delay that by a few seconds.
443 EINA_LIST_FREE(pd->cache, entity) 443 EINA_LIST_FREE(pd->cache, entity)
444 efl_del(entity); 444 efl_del(entity);
445 445
diff --git a/src/lib/elementary/efl_ui_caching_factory.eo b/src/lib/elementary/efl_ui_caching_factory.eo
index 9907da7..e3a6c6b 100644
--- a/src/lib/elementary/efl_ui_caching_factory.eo
+++ b/src/lib/elementary/efl_ui_caching_factory.eo
@@ -1,3 +1,5 @@
1parse efl_app;
2
1class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory 3class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory
2{ 4{
3 [[Efl UI Factory that provides object caching. 5 [[Efl UI Factory that provides object caching.
@@ -6,14 +8,13 @@ class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory
6 defined. 8 defined.
7 This factory will rely on its parent class @Efl.Ui.Widget_Factory for creating the subset of class that match the 9 This factory will rely on its parent class @Efl.Ui.Widget_Factory for creating the subset of class that match the
8 @Efl.Ui.Widget interface. 10 @Efl.Ui.Widget interface.
9 The factory will automatically empties the cache when the application goes into pause. 11 The factory will automatically empty the cache when the application goes into the background
12 (@[Efl.App.pause] event).
10 13
11 Creating objects is costly and time consuming, keeping a few on hand for when you next will need them helps a lot. 14 Creating objects is costly and time consuming, keeping a few on hand for when you next will need them helps a lot.
12 This is what this factory caching infrastructure provides. It will create the object from the class defined on it 15 This is what this factory caching infrastructure provides. It will create the object from the class defined on it
13 and set the parent and the model as needed for all created items. The View has to release the Item using the 16 and set the parent and the model as needed for all created items. The View has to release the Item using the
14 release function of the Factory interface for all of this to work properly. 17 release function of the Factory interface for all of this to work properly.
15
16 The cache might decide to flush itself when the application event pause is triggered.
17 ]] 18 ]]
18 methods { 19 methods {
19 @property memory_limit { 20 @property memory_limit {
diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c
index 15f5281..1ac817e 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -319,6 +319,9 @@ _efl_ui_check_efl_ui_selectable_selected_set(Eo *obj, Efl_Ui_Check_Data *pd, Ein
319 319
320 pd->selected = value; 320 pd->selected = value;
321 321
322 pd->legacy_changed_emitted_select = !pd->selected;
323 pd->legacy_changed_emitted_unselect = pd->selected;
324
322 if (!elm_widget_is_legacy(obj)) 325 if (!elm_widget_is_legacy(obj))
323 efl_event_callback_call(obj, EFL_UI_EVENT_SELECTED_CHANGED, &pd->selected); 326 efl_event_callback_call(obj, EFL_UI_EVENT_SELECTED_CHANGED, &pd->selected);
324} 327}
diff --git a/src/lib/elementary/efl_ui_collection_view.c b/src/lib/elementary/efl_ui_collection_view.c
index fa2dd42..e3d4c96 100644
--- a/src/lib/elementary/efl_ui_collection_view.c
+++ b/src/lib/elementary/efl_ui_collection_view.c
@@ -57,8 +57,7 @@ struct _Efl_Ui_Collection_Request
57 uint64_t offset; 57 uint64_t offset;
58 uint64_t length; 58 uint64_t length;
59 59
60 Eina_Bool model_requested : 1; 60 Eina_Bool need_size : 1;
61 Eina_Bool model_fetched : 1;
62 Eina_Bool need_entity : 1; 61 Eina_Bool need_entity : 1;
63 Eina_Bool entity_requested : 1; 62 Eina_Bool entity_requested : 1;
64}; 63};
@@ -109,7 +108,7 @@ static const char *COLLECTION_VIEW_MANAGED_YES = "yes";
109#define MY_DATA_GET(obj, pd) \ 108#define MY_DATA_GET(obj, pd) \
110 Efl_Ui_Collection_View_Data *pd = efl_data_scope_get(obj, MY_CLASS); 109 Efl_Ui_Collection_View_Data *pd = efl_data_scope_get(obj, MY_CLASS);
111 110
112static void _entity_request(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_Request *request); 111static Eina_Bool _entity_request(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_Request *request);
113static void _idle_cb(void *data, const Efl_Event *event); 112static void _idle_cb(void *data, const Efl_Event *event);
114 113
115static int 114static int
@@ -352,6 +351,7 @@ _request_add(Eina_List *requests, Efl_Ui_Collection_Request **request,
352 if ((*request)->offset + (*request)->length == index) 351 if ((*request)->offset + (*request)->length == index)
353 { 352 {
354 if (need_entity) (*request)->need_entity = EINA_TRUE; 353 if (need_entity) (*request)->need_entity = EINA_TRUE;
354 if (!need_entity) (*request)->need_size = EINA_TRUE;
355 (*request)->length += 1; 355 (*request)->length += 1;
356 return requests; 356 return requests;
357 } 357 }
@@ -364,8 +364,8 @@ _request_add(Eina_List *requests, Efl_Ui_Collection_Request **request,
364 (*request)->offset = index; 364 (*request)->offset = index;
365 (*request)->length = 1; 365 (*request)->length = 1;
366 // At this point, we rely on the model caching ability to avoid recreating model 366 // At this point, we rely on the model caching ability to avoid recreating model
367 (*request)->model_requested = EINA_TRUE;
368 (*request)->need_entity = !!need_entity; 367 (*request)->need_entity = !!need_entity;
368 (*request)->need_size = EINA_TRUE;
369 369
370 return requests; 370 return requests;
371} 371}
@@ -379,7 +379,6 @@ _model_fetched_cb(Eo *obj, void *data, const Eina_Value v)
379 unsigned int i, len; 379 unsigned int i, len;
380 Eina_Bool request_entity = EINA_FALSE; 380 Eina_Bool request_entity = EINA_FALSE;
381 381
382 request->model_fetched = EINA_TRUE;
383 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child) 382 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
384 { 383 {
385 Efl_Ui_Collection_Item_Lookup *insert; 384 Efl_Ui_Collection_Item_Lookup *insert;
@@ -437,7 +436,14 @@ _model_fetched_cb(Eo *obj, void *data, const Eina_Value v)
437 if (request_entity) 436 if (request_entity)
438 { 437 {
439 request->need_entity = EINA_TRUE; 438 request->need_entity = EINA_TRUE;
440 _entity_request(obj, request); 439
440 if (!request->entity_requested)
441 _entity_request(obj, request);
442 }
443 else if (request->need_size)
444 {
445 efl_ui_position_manager_entity_item_size_changed(pd->manager, request->offset,
446 request->offset + len);
441 } 447 }
442 448
443 return v; 449 return v;
@@ -449,12 +455,7 @@ _model_free_cb(Eo *o, void *data, const Eina_Future *dead_future EINA_UNUSED)
449 MY_DATA_GET(o, pd); 455 MY_DATA_GET(o, pd);
450 Efl_Ui_Collection_Request *request = data; 456 Efl_Ui_Collection_Request *request = data;
451 457
452 if (request->need_entity) 458 if (!request->entity_requested)
453 {
454 if (!request->entity_requested)
455 _entity_request(o, request);
456 }
457 else
458 { 459 {
459 pd->requests = eina_list_remove(pd->requests, request); 460 pd->requests = eina_list_remove(pd->requests, request);
460 free(request); 461 free(request);
@@ -575,7 +576,6 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
575 } 576 }
576 } 577 }
577#endif 578#endif
578
579 // When requesting an entity, the model should already be in the cache 579 // When requesting an entity, the model should already be in the cache
580 if (!child) continue; 580 if (!child) continue;
581 581
@@ -624,16 +624,16 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
624 search_index - 1); 624 search_index - 1);
625 updated_size = EINA_FALSE; 625 updated_size = EINA_FALSE;
626 } 626 }
627 }} 627 }
628 ; 628 }
629 629
630 // Currently position manager will flush its entire size cache on update, so only do 630 // Currently position manager will flush its entire size cache on update, so only do
631 // it when necessary to improve performance. 631 // it when necessary to improve performance.
632 if (updated_size) 632 if (updated_size || request->need_size)
633 { 633 {
634 efl_ui_position_manager_entity_item_size_changed(pd->manager, 634 efl_ui_position_manager_entity_item_size_changed(pd->manager,
635 updated_size_start_id, 635 updated_size_start_id,
636 i - 1); 636 request->offset + i - 1);
637 updated_size = EINA_FALSE; 637 updated_size = EINA_FALSE;
638 } 638 }
639 639
@@ -642,7 +642,7 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
642 { 642 {
643 efl_ui_position_manager_entity_entities_ready(pd->manager, 643 efl_ui_position_manager_entity_entities_ready(pd->manager,
644 updated_entity_start_id, 644 updated_entity_start_id,
645 i - 1); 645 request->offset + i - 1);
646 646
647 efl_event_callback_del(efl_main_loop_get(), EFL_LOOP_EVENT_IDLE, _idle_cb, obj); 647 efl_event_callback_del(efl_main_loop_get(), EFL_LOOP_EVENT_IDLE, _idle_cb, obj);
648 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_IDLE, _idle_cb, obj); 648 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_IDLE, _idle_cb, obj);
@@ -749,10 +749,10 @@ _cache_entity_fetch(Eina_List *requests, Efl_Ui_Collection_Request **request,
749 return requests; 749 return requests;
750} 750}
751 751
752static void 752static Eina_Bool
753_entity_request(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_Request *request) 753_entity_request(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_Request *request)
754{ 754{
755 if (request->model_requested && (!request->model_fetched)) return; 755 if (request->entity_requested) return EINA_TRUE;
756 request->f = efl_future_then(obj, request->f, 756 request->f = efl_future_then(obj, request->f,
757 .success_type = EINA_VALUE_TYPE_ARRAY, 757 .success_type = EINA_VALUE_TYPE_ARRAY,
758 .success = _entity_fetch_cb); 758 .success = _entity_fetch_cb);
@@ -762,17 +762,20 @@ _entity_request(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_Request *request)
762 .data = request, 762 .data = request,
763 .free = _entity_free_cb); 763 .free = _entity_free_cb);
764 request->entity_requested = EINA_TRUE; 764 request->entity_requested = EINA_TRUE;
765 request->need_entity = EINA_TRUE;
766
767 return EINA_TRUE;
765} 768}
766 769
767static inline void 770static inline Eina_Bool
768_entity_inflight_request(Efl_Ui_Collection_View *obj, 771_entity_inflight_request(Efl_Ui_Collection_View *obj,
769 Efl_Ui_Collection_Request *request, 772 Efl_Ui_Collection_Request *request,
770 Efl_Ui_Collection_Request *inflight) 773 Efl_Ui_Collection_Request *inflight)
771{ 774{
772 if (request->need_entity == EINA_FALSE) return ; 775 inflight->need_size |= request->need_size;
773 if (inflight->entity_requested) return ; 776 if (request->need_entity == EINA_FALSE) return EINA_TRUE;
774 777
775 _entity_request(obj, inflight); 778 return _entity_request(obj, inflight);
776} 779}
777 780
778static Eina_List * 781static Eina_List *
@@ -805,7 +808,7 @@ _batch_request_flush(Eina_List *requests,
805 // request included in current inflight request 808 // request included in current inflight request
806 if (rstart >= istart && rend <= iend) 809 if (rstart >= istart && rend <= iend)
807 { 810 {
808 _entity_inflight_request(obj, request, inflight); 811 if (!_entity_inflight_request(obj, request, inflight)) continue;
809 812
810 // In this case no need to start a request 813 // In this case no need to start a request
811 requests = eina_list_remove_list(requests, ll); 814 requests = eina_list_remove_list(requests, ll);
@@ -817,6 +820,8 @@ _batch_request_flush(Eina_List *requests,
817 // request overflow left and right 820 // request overflow left and right
818 if (rstart < istart && iend < rend) 821 if (rstart < istart && iend < rend)
819 { 822 {
823 if (!_entity_inflight_request(obj, request, inflight)) continue;
824
820 // Remove the center portion of the request by emitting a new one 825 // Remove the center portion of the request by emitting a new one
821 Efl_Ui_Collection_Request *rn; 826 Efl_Ui_Collection_Request *rn;
822 827
@@ -825,30 +830,29 @@ _batch_request_flush(Eina_List *requests,
825 830
826 rn->offset = iend; 831 rn->offset = iend;
827 rn->length = rend - iend; 832 rn->length = rend - iend;
828 rn->model_requested = request->model_requested;
829 rn->need_entity = request->need_entity; 833 rn->need_entity = request->need_entity;
834 rn->need_size = request->need_size;
830 835
831 requests = eina_list_append(requests, rn); 836 requests = eina_list_append(requests, rn);
832 837
833 request->length = istart - rstart; 838 request->length = istart - rstart;
834 _entity_inflight_request(obj, request, inflight);
835 continue; 839 continue;
836 } 840 }
837 841
838 // request overflow left 842 // request overflow left
839 if (rstart < istart && rend > istart && rend <= iend) 843 if (rstart < istart && rend > istart && rend <= iend)
840 { 844 {
845 if (!_entity_inflight_request(obj, request, inflight)) continue;
841 request->length = istart - rstart; 846 request->length = istart - rstart;
842 _entity_inflight_request(obj, request, inflight);
843 continue; 847 continue;
844 } 848 }
845 849
846 // request overflow right 850 // request overflow right
847 if (rstart >= istart && rstart < iend && iend <= rend) 851 if (rstart >= istart && rstart < iend && iend <= rend)
848 { 852 {
853 if (!_entity_inflight_request(obj, request, inflight)) continue;
849 request->offset = iend; 854 request->offset = iend;
850 request->length = rend - iend; 855 request->length = rend - iend;
851 _entity_inflight_request(obj, request, inflight);
852 continue; 856 continue;
853 } 857 }
854 } 858 }
@@ -878,12 +882,6 @@ _batch_request_flush(Eina_List *requests,
878 882
879 // We now have a request, time to trigger a fetch 883 // We now have a request, time to trigger a fetch
880 // We assume here that we are always fetching the model (model_requested must be true) 884 // We assume here that we are always fetching the model (model_requested must be true)
881 if (!request->model_requested)
882 {
883 CRI("Someone forgot to set model_requested for %" PRIu64 " to %" PRIu64 ".",
884 request->offset, request->offset + request->length);
885 request->model_requested = EINA_TRUE;
886 }
887 request->f = efl_model_children_slice_get(model, request->offset, request->length); 885 request->f = efl_model_children_slice_get(model, request->offset, request->length);
888 request->f = efl_future_then(obj, request->f, 886 request->f = efl_future_then(obj, request->f,
889 .success = _model_fetched_cb, 887 .success = _model_fetched_cb,
@@ -892,7 +890,7 @@ _batch_request_flush(Eina_List *requests,
892 890
893 eina_list_move_list(&pd->requests, &requests, ll); 891 eina_list_move_list(&pd->requests, &requests, ll);
894 } 892 }
895 return NULL; 893 return eina_list_free(requests);
896} 894}
897 895
898static Efl_Ui_Position_Manager_Size_Batch_Result 896static Efl_Ui_Position_Manager_Size_Batch_Result
@@ -1054,7 +1052,7 @@ _batch_entity_cb(void *data, Efl_Ui_Position_Manager_Request_Range range, Eina_R
1054 1052
1055 entities = memory.mem; 1053 entities = memory.mem;
1056 //count = efl_model_children_count_get(parent); 1054 //count = efl_model_children_count_get(parent);
1057 limit = range.end_id - range.start_id;; 1055 limit = range.end_id - range.start_id;
1058 1056
1059 // Look in the temporary cache now for the beginning of the buffer 1057 // Look in the temporary cache now for the beginning of the buffer
1060#ifdef VIEWPORT_ENABLE 1058#ifdef VIEWPORT_ENABLE
@@ -1111,7 +1109,6 @@ _batch_entity_cb(void *data, Efl_Ui_Position_Manager_Request_Range range, Eina_R
1111 1109
1112 requests = _cache_entity_fetch(requests, &request, pd, 1110 requests = _cache_entity_fetch(requests, &request, pd,
1113 search_index, &entities[idx]); 1111 search_index, &entities[idx]);
1114
1115 idx++; 1112 idx++;
1116 } 1113 }
1117 // Done, but flush request first 1114 // Done, but flush request first
@@ -1534,7 +1531,7 @@ _manager_content_visible_range_changed_cb(void *data, const Efl_Event *ev)
1534 request->offset = lowerlimit_offset; 1531 request->offset = lowerlimit_offset;
1535 // This length work over multiple viewport as they are contiguous 1532 // This length work over multiple viewport as they are contiguous
1536 request->length = lowerlimit_offset - pd->viewport[0]->offset; 1533 request->length = lowerlimit_offset - pd->viewport[0]->offset;
1537 request->model_requested = EINA_TRUE; 1534 request->need_size = EINA_TRUE;
1538 request->need_entity = EINA_TRUE; 1535 request->need_entity = EINA_TRUE;
1539 1536
1540 requests = eina_list_append(requests, request); 1537 requests = eina_list_append(requests, request);
@@ -1551,7 +1548,7 @@ _manager_content_visible_range_changed_cb(void *data, const Efl_Event *ev)
1551 request->offset = upperlimit_offset; 1548 request->offset = upperlimit_offset;
1552 // This length work over multiple viewport as they are contiguous 1549 // This length work over multiple viewport as they are contiguous
1553 request->length = pd->viewport[2]->offset + pd->viewport[2]->count - upperlimit_offset; 1550 request->length = pd->viewport[2]->offset + pd->viewport[2]->count - upperlimit_offset;
1554 request->model_requested = EINA_TRUE; 1551 request->need_size = EINA_TRUE;
1555 request->need_entity = EINA_TRUE; 1552 request->need_entity = EINA_TRUE;
1556 1553
1557 requests = eina_list_append(requests, request); 1554 requests = eina_list_append(requests, request);
@@ -1761,7 +1758,7 @@ _efl_model_child_added(void *data, const Efl_Event *event)
1761 if (!request) break; 1758 if (!request) break;
1762 request->offset = ev->index; 1759 request->offset = ev->index;
1763 request->length = 1; 1760 request->length = 1;
1764 request->model_requested = EINA_TRUE; 1761 request->need_size = EINA_TRUE;
1765 request->need_entity = EINA_TRUE; 1762 request->need_entity = EINA_TRUE;
1766 1763
1767 requests = eina_list_append(requests, request); 1764 requests = eina_list_append(requests, request);
@@ -1773,7 +1770,6 @@ _efl_model_child_added(void *data, const Efl_Event *event)
1773 1770
1774 notify_manager: 1771 notify_manager:
1775#endif 1772#endif
1776 // FIXME this function must be called with an entity
1777 efl_ui_position_manager_entity_item_added(pd->manager, ev->index, NULL); 1773 efl_ui_position_manager_entity_item_added(pd->manager, ev->index, NULL);
1778} 1774}
1779 1775
@@ -1842,7 +1838,7 @@ _efl_model_child_removed(void *data, const Efl_Event *event)
1842 if (!request) break; 1838 if (!request) break;
1843 request->offset = pd->viewport[2]->offset + pd->viewport[i]->count - 1; 1839 request->offset = pd->viewport[2]->offset + pd->viewport[i]->count - 1;
1844 request->length = 1; 1840 request->length = 1;
1845 request->model_requested = EINA_TRUE; 1841 request->need_size = EINA_TRUE;
1846 request->need_entity = EINA_TRUE; 1842 request->need_entity = EINA_TRUE;
1847 1843
1848 requests = eina_list_append(requests, request); 1844 requests = eina_list_append(requests, request);
@@ -1878,7 +1874,9 @@ static void
1878_efl_ui_collection_view_model_changed(void *data, const Efl_Event *event) 1874_efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1879{ 1875{
1880 Efl_Model_Changed_Event *ev = event->info; 1876 Efl_Model_Changed_Event *ev = event->info;
1877#ifdef VIEWPORT_ENABLE
1881 Eina_List *requests = NULL; 1878 Eina_List *requests = NULL;
1879#endif
1882 MY_DATA_GET(data, pd); 1880 MY_DATA_GET(data, pd);
1883 Eina_Iterator *it; 1881 Eina_Iterator *it;
1884 const char *property; 1882 const char *property;
@@ -1887,24 +1885,21 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1887 Efl_Model *mselect = NULL; 1885 Efl_Model *mselect = NULL;
1888 Eina_Bool selection = EINA_FALSE, sizing = EINA_FALSE; 1886 Eina_Bool selection = EINA_FALSE, sizing = EINA_FALSE;
1889 1887
1890 if (ev->previous) efl_event_callback_array_del(ev->previous, model_cbs(), data); 1888 // Cleanup all object, pending request to prepare refetching everything
1891 if (ev->current) efl_event_callback_array_add(ev->current, model_cbs(), data);
1892
1893 // Cleanup all object, pending request and refetch everything
1894 _all_cleanup(data, pd); 1889 _all_cleanup(data, pd);
1895 1890 if (pd->model) efl_event_callback_array_del(pd->model, model_cbs(), data);
1896 efl_replace(&pd->model, NULL); 1891 if (pd->multi_selectable_async_model)
1892 {
1893 efl_event_callback_forwarder_del(pd->multi_selectable_async_model,
1894 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1895 data);
1896 efl_composite_detach(data, pd->multi_selectable_async_model);
1897 }
1897 1898
1898 if (!ev->current) 1899 if (!ev->current)
1899 { 1900 {
1900 if (pd->multi_selectable_async_model) 1901 efl_replace(&pd->model, NULL);
1901 { 1902 efl_replace(&pd->multi_selectable_async_model, NULL);
1902 efl_event_callback_forwarder_del(pd->multi_selectable_async_model,
1903 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1904 data);
1905 efl_composite_detach(data, pd->multi_selectable_async_model);
1906 efl_replace(&pd->multi_selectable_async_model, NULL);
1907 }
1908 return ; 1903 return ;
1909 } 1904 }
1910 1905
@@ -1943,15 +1938,9 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1943 // Build and connect the selection model properly 1938 // Build and connect the selection model properly
1944 if (!mselect) 1939 if (!mselect)
1945 { 1940 {
1946 mselect = model = efl_add(EFL_UI_SELECT_MODEL_CLASS, data, 1941 mselect = model = efl_add_ref(EFL_UI_SELECT_MODEL_CLASS, data,
1947 efl_ui_view_model_set(efl_added, model)); 1942 efl_ui_view_model_set(efl_added, model),
1948 } 1943 efl_loop_model_volatile_make(efl_added));
1949 if (pd->multi_selectable_async_model)
1950 {
1951 efl_event_callback_forwarder_del(pd->multi_selectable_async_model,
1952 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1953 data);
1954 efl_composite_detach(data, pd->multi_selectable_async_model);
1955 } 1944 }
1956 efl_replace(&pd->multi_selectable_async_model, mselect); 1945 efl_replace(&pd->multi_selectable_async_model, mselect);
1957 efl_composite_attach(data, pd->multi_selectable_async_model); 1946 efl_composite_attach(data, pd->multi_selectable_async_model);
@@ -1959,8 +1948,15 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1959 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED, 1948 EFL_UI_SELECTABLE_EVENT_SELECTION_CHANGED,
1960 data); 1949 data);
1961 1950
1962 if (!sizing) model = efl_add(EFL_UI_HOMOGENEOUS_MODEL_CLASS, data, 1951 if (!sizing) model = efl_add_ref(EFL_UI_HOMOGENEOUS_MODEL_CLASS, data,
1963 efl_ui_view_model_set(efl_added, model)); 1952 efl_ui_view_model_set(efl_added, model),
1953 efl_loop_model_volatile_make(efl_added));
1954
1955 efl_replace(&pd->model, model);
1956 efl_event_callback_array_add(pd->model, model_cbs(), data);
1957
1958 if (mselect) efl_unref(mselect);
1959 if (!sizing) efl_unref(model);
1964 1960
1965 count = efl_model_children_count_get(model); 1961 count = efl_model_children_count_get(model);
1966 1962
@@ -1977,16 +1973,14 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1977 1973
1978 request->offset = pd->viewport[i]->offset; 1974 request->offset = pd->viewport[i]->offset;
1979 request->length = pd->viewport[i]->count; 1975 request->length = pd->viewport[i]->count;
1980 request->model_requested = EINA_TRUE; 1976 request->need_size = EINA_TRUE;
1981 request->need_entity = EINA_TRUE; 1977 request->need_entity = EINA_TRUE;
1982 1978
1983 requests = eina_list_append(requests, request); 1979 requests = eina_list_append(requests, request);
1984 } 1980 }
1985#endif
1986 requests = _batch_request_flush(requests, data, pd); 1981 requests = _batch_request_flush(requests, data, pd);
1982#endif
1987 1983
1988 pd->model = model;
1989 efl_ui_position_manager_entity_item_size_changed(pd->manager, 0, count - 1);
1990 switch(efl_ui_position_manager_entity_version(pd->manager, 1)) 1984 switch(efl_ui_position_manager_entity_version(pd->manager, 1))
1991 { 1985 {
1992 case 1: 1986 case 1:
@@ -1996,8 +1990,7 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
1996 count); 1990 count);
1997 break; 1991 break;
1998 } 1992 }
1999 1993 efl_ui_position_manager_entity_item_size_changed(pd->manager, 0, count - 1);
2000
2001} 1994}
2002 1995
2003static void 1996static void
diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.c b/src/lib/elementary/efl_ui_internal_text_scroller.c
index 8ee50a7..b5888f5 100644
--- a/src/lib/elementary/efl_ui_internal_text_scroller.c
+++ b/src/lib/elementary/efl_ui_internal_text_scroller.c
@@ -21,6 +21,14 @@
21#define EFL_UI_SCROLLER_DATA_GET(o, sd) \ 21#define EFL_UI_SCROLLER_DATA_GET(o, sd) \
22 Efl_Ui_Scroller_Data * sd = efl_data_scope_safe_get(o, EFL_UI_SCROLLER_CLASS) 22 Efl_Ui_Scroller_Data * sd = efl_data_scope_safe_get(o, EFL_UI_SCROLLER_CLASS)
23 23
24#define EFL_UI_SCROLLER_DATA_GET_OR_RETURN(o, ptr, ...) \
25 EFL_UI_SCROLLER_DATA_GET(o, ptr); \
26 if (EINA_UNLIKELY(!ptr)) \
27 { \
28 ERR("No widget data for object %p (%s)", \
29 o, evas_object_type_get(o)); \
30 return __VA_ARGS__; \
31 }
24#define MY_CLASS EFL_UI_INTERNAL_TEXT_SCROLLER_CLASS 32#define MY_CLASS EFL_UI_INTERNAL_TEXT_SCROLLER_CLASS
25#define MY_CLASS_PFX efl_ui_internal_text_scroller 33#define MY_CLASS_PFX efl_ui_internal_text_scroller
26 34
@@ -55,7 +63,7 @@ _efl_ui_internal_text_scroller_efl_object_constructor(Eo *obj,
55 Efl_Ui_Internal_Text_Scroller_Data *sd EINA_UNUSED) 63 Efl_Ui_Internal_Text_Scroller_Data *sd EINA_UNUSED)
56{ 64{
57 obj = efl_constructor(efl_super(obj, MY_CLASS)); 65 obj = efl_constructor(efl_super(obj, MY_CLASS));
58 //EFL_UI_SCROLLER_DATA_GET(obj, psd); 66 //EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, psd, NULL);
59 efl_ui_scrollbar_bar_mode_set(obj, 67 efl_ui_scrollbar_bar_mode_set(obj,
60 EFL_UI_SCROLLBAR_MODE_OFF, EFL_UI_SCROLLBAR_MODE_OFF); 68 EFL_UI_SCROLLBAR_MODE_OFF, EFL_UI_SCROLLBAR_MODE_OFF);
61 69
@@ -71,7 +79,7 @@ _efl_ui_internal_text_scroller_efl_canvas_group_group_calculate(Eo *obj,
71 Evas_Coord vmw = 0, vmh = 0; 79 Evas_Coord vmw = 0, vmh = 0;
72 80
73 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); 81 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
74 EFL_UI_SCROLLER_DATA_GET(obj, psd); 82 EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, psd);
75 83
76 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 84 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
77 85
@@ -162,7 +170,7 @@ _efl_ui_internal_text_scroller_scroller_mode_set(Eo *obj,
162 Efl_Ui_Internal_Text_Scroller_Data *sd, 170 Efl_Ui_Internal_Text_Scroller_Data *sd,
163 Efl_Ui_Text_Scroller_Mode mode) 171 Efl_Ui_Text_Scroller_Mode mode)
164{ 172{
165 EFL_UI_SCROLLER_DATA_GET(obj, psd); 173 EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, psd);
166 sd->mode = mode; 174 sd->mode = mode;
167 if (mode == EFL_UI_TEXT_SCROLLER_MODE_MULTILINE) 175 if (mode == EFL_UI_TEXT_SCROLLER_MODE_MULTILINE)
168 { 176 {
@@ -180,7 +188,7 @@ EOLIAN static Eo *
180_efl_ui_internal_text_scroller_viewport_clip_get(const Eo *obj, 188_efl_ui_internal_text_scroller_viewport_clip_get(const Eo *obj,
181 Efl_Ui_Internal_Text_Scroller_Data *sd EINA_UNUSED) 189 Efl_Ui_Internal_Text_Scroller_Data *sd EINA_UNUSED)
182{ 190{
183 EFL_UI_SCROLLER_DATA_GET(obj, psd); 191 EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, psd, NULL);
184 return evas_object_clip_get(psd->pan_obj); 192 return evas_object_clip_get(psd->pan_obj);
185} 193}
186 194
diff --git a/src/lib/elementary/efl_ui_position_manager_list.c b/src/lib/elementary/efl_ui_position_manager_list.c
index d22d42c..34d7e5f 100644
--- a/src/lib/elementary/efl_ui_position_manager_list.c
+++ b/src/lib/elementary/efl_ui_position_manager_list.c
@@ -339,18 +339,23 @@ position_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
339} 339}
340 340
341static Eina_Value 341static Eina_Value
342_rebuild_job_cb(void *data, Eina_Value v EINA_UNUSED, const Eina_Future *f EINA_UNUSED) 342_rebuild_job_cb(Eo *obj, void *data, const Eina_Value v)
343{ 343{
344 MY_DATA_GET(data, pd); 344 Efl_Ui_Position_Manager_List_Data *pd = data;
345 345
346 if (!efl_alive_get(data)) return EINA_VALUE_EMPTY; 346 cache_require(obj, pd);
347 recalc_absolut_size(obj, pd);
348 position_content(obj, pd);
347 349
348 cache_require(data, pd); 350 return v;
349 recalc_absolut_size(data, pd); 351}
350 position_content(data, pd);
351 pd->rebuild_absolut_size = NULL;
352 352
353 return EINA_VALUE_EMPTY; 353static void
354_rebuild_job_free(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
355{
356 Efl_Ui_Position_Manager_List_Data *pd = data;
357
358 pd->rebuild_absolut_size = NULL;
354} 359}
355 360
356static void 361static void
@@ -358,8 +363,10 @@ schedule_recalc_absolut_size(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd)
358{ 363{
359 if (pd->rebuild_absolut_size) return; 364 if (pd->rebuild_absolut_size) return;
360 365
361 pd->rebuild_absolut_size = efl_loop_job(efl_app_main_get()); 366 pd->rebuild_absolut_size = efl_future_then(obj, efl_loop_job(efl_app_main_get()),
362 eina_future_then(pd->rebuild_absolut_size, _rebuild_job_cb, obj); 367 .success = _rebuild_job_cb,
368 .data = pd,
369 .free = _rebuild_job_free);
363} 370}
364 371
365EOLIAN static void 372EOLIAN static void
@@ -386,7 +393,7 @@ _efl_ui_position_manager_list_efl_ui_position_manager_entity_scroll_position_set
386} 393}
387 394
388EOLIAN static void 395EOLIAN static void
389_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_added(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int added_index EINA_UNUSED, Efl_Gfx_Entity *subobj) 396_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_added(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int added_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
390{ 397{
391 if (pd->size == 0) 398 if (pd->size == 0)
392 { 399 {
@@ -403,7 +410,7 @@ _efl_ui_position_manager_list_efl_ui_position_manager_entity_item_added(Eo *obj
403} 410}
404 411
405EOLIAN static void 412EOLIAN static void
406_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_removed(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj) 413_efl_ui_position_manager_list_efl_ui_position_manager_entity_item_removed(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, int removed_index EINA_UNUSED, Efl_Gfx_Entity *subobj)
407{ 414{
408 pd->size --; 415 pd->size --;
409 if (subobj) 416 if (subobj)
diff --git a/src/lib/elementary/efl_ui_relative_layout.c b/src/lib/elementary/efl_ui_relative_container.c
index c591c15..a3e20a6 100644
--- a/src/lib/elementary/efl_ui_relative_layout.c
+++ b/src/lib/elementary/efl_ui_relative_container.c
@@ -1,7 +1,7 @@
1#include "efl_ui_relative_layout_private.h" 1#include "efl_ui_relative_container_private.h"
2 2
3#define MY_CLASS EFL_UI_RELATIVE_LAYOUT_CLASS 3#define MY_CLASS EFL_UI_RELATIVE_CONTAINER_CLASS
4#define MY_CLASS_NAME "Efl.Ui.Relative_Layout" 4#define MY_CLASS_NAME "Efl.Ui.Relative_Container"
5 5
6#define LEFT 0 6#define LEFT 0
7#define RIGHT 1 7#define RIGHT 1
@@ -11,15 +11,15 @@
11#define START (axis ? TOP : LEFT) 11#define START (axis ? TOP : LEFT)
12#define END (axis ? BOTTOM : RIGHT) 12#define END (axis ? BOTTOM : RIGHT)
13 13
14static void _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis); 14static void _child_calc(Efl_Ui_Relative_Container_Child *child, Eina_Bool axis);
15 15
16static int 16static int
17_chain_sort_cb(const void *l1, const void *l2) 17_chain_sort_cb(const void *l1, const void *l2)
18{ 18{
19 Efl_Ui_Relative_Layout_Calc *calc1, *calc2; 19 Efl_Ui_Relative_Container_Calc *calc1, *calc2;
20 20
21 calc1 = EINA_INLIST_CONTAINER_GET(l1, Efl_Ui_Relative_Layout_Calc); 21 calc1 = EINA_INLIST_CONTAINER_GET(l1, Efl_Ui_Relative_Container_Calc);
22 calc2 = EINA_INLIST_CONTAINER_GET(l2, Efl_Ui_Relative_Layout_Calc); 22 calc2 = EINA_INLIST_CONTAINER_GET(l2, Efl_Ui_Relative_Container_Calc);
23 23
24 return calc2->comp_factor <= calc1->comp_factor ? -1 : 1; 24 return calc2->comp_factor <= calc1->comp_factor ? -1 : 1;
25} 25}
@@ -27,7 +27,7 @@ _chain_sort_cb(const void *l1, const void *l2)
27static void 27static void
28_on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED) 28_on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED)
29{ 29{
30 Efl_Ui_Relative_Layout *obj = data; 30 Efl_Ui_Relative_Container *obj = data;
31 31
32 efl_pack_layout_request(obj); 32 efl_pack_layout_request(obj);
33} 33}
@@ -35,7 +35,7 @@ _on_child_size_changed(void *data, const Efl_Event *event EINA_UNUSED)
35static void 35static void
36_on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED) 36_on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED)
37{ 37{
38 Efl_Ui_Relative_Layout *obj = data; 38 Efl_Ui_Relative_Container *obj = data;
39 39
40 efl_pack_layout_request(obj); 40 efl_pack_layout_request(obj);
41} 41}
@@ -43,42 +43,42 @@ _on_child_hints_changed(void *data, const Efl_Event *event EINA_UNUSED)
43static void 43static void
44_on_child_del(void *data, const Efl_Event *event) 44_on_child_del(void *data, const Efl_Event *event)
45{ 45{
46 Efl_Ui_Relative_Layout *obj = data; 46 Efl_Ui_Relative_Container *obj = data;
47 47
48 efl_pack_unpack(obj, event->object); 48 efl_pack_unpack(obj, event->object);
49} 49}
50 50
51EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_relative_layout_callbacks, 51EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_relative_container_callbacks,
52 { EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _on_child_size_changed }, 52 { EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _on_child_size_changed },
53 { EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_child_hints_changed }, 53 { EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_child_hints_changed },
54 { EFL_EVENT_DEL, _on_child_del } 54 { EFL_EVENT_DEL, _on_child_del }
55); 55);
56 56
57static Efl_Ui_Relative_Layout_Child * 57static Efl_Ui_Relative_Container_Child *
58_efl_ui_relative_layout_register(Efl_Ui_Relative_Layout_Data *pd, Eo *child) 58_efl_ui_relative_container_register(Efl_Ui_Relative_Container_Data *pd, Eo *child)
59{ 59{
60 Efl_Ui_Relative_Layout_Child *rc; 60 Efl_Ui_Relative_Container_Child *rc;
61 61
62 if (!efl_ui_widget_sub_object_add(pd->obj, child)) 62 if (!efl_ui_widget_sub_object_add(pd->obj, child))
63 return NULL; 63 return NULL;
64 64
65 rc = calloc(1, sizeof(Efl_Ui_Relative_Layout_Child)); 65 rc = calloc(1, sizeof(Efl_Ui_Relative_Container_Child));
66 if (!rc) return NULL; 66 if (!rc) return NULL;
67 67
68 rc->obj = child; 68 rc->obj = child;
69 rc->layout = pd->obj; 69 rc->layout = pd->obj;
70 rc->rel[LEFT].to = rc->layout; 70 rc->rel[LEFT].to = rc->layout;
71 rc->rel[LEFT].relative = 0.0; 71 rc->rel[LEFT].relative_position = 0.0;
72 rc->rel[RIGHT].to = rc->layout; 72 rc->rel[RIGHT].to = rc->layout;
73 rc->rel[RIGHT].relative = 1.0; 73 rc->rel[RIGHT].relative_position = 1.0;
74 rc->rel[TOP].to = rc->layout; 74 rc->rel[TOP].to = rc->layout;
75 rc->rel[TOP].relative = 0.0; 75 rc->rel[TOP].relative_position = 0.0;
76 rc->rel[BOTTOM].to = rc->layout; 76 rc->rel[BOTTOM].to = rc->layout;
77 rc->rel[BOTTOM].relative = 1.0; 77 rc->rel[BOTTOM].relative_position = 1.0;
78 78
79 efl_key_data_set(child, "_elm_leaveme", pd->obj); 79 efl_key_data_set(child, "_elm_leaveme", pd->obj);
80 efl_canvas_object_clipper_set(child, pd->clipper); 80 efl_canvas_object_clipper_set(child, pd->clipper);
81 efl_event_callback_array_add(child, efl_ui_relative_layout_callbacks(), pd->obj); 81 efl_event_callback_array_add(child, efl_ui_relative_container_callbacks(), pd->obj);
82 efl_canvas_group_member_add(pd->obj, child); 82 efl_canvas_group_member_add(pd->obj, child);
83 efl_canvas_group_change(pd->obj); 83 efl_canvas_group_change(pd->obj);
84 84
@@ -87,22 +87,22 @@ _efl_ui_relative_layout_register(Efl_Ui_Relative_Layout_Data *pd, Eo *child)
87 return rc; 87 return rc;
88} 88}
89 89
90static Efl_Ui_Relative_Layout_Child * 90static Efl_Ui_Relative_Container_Child *
91_relative_child_get(Efl_Ui_Relative_Layout_Data *pd, Eo *child) 91_relative_child_get(Efl_Ui_Relative_Container_Data *pd, Eo *child)
92{ 92{
93 Efl_Ui_Relative_Layout_Child *rc; 93 Efl_Ui_Relative_Container_Child *rc;
94 94
95 rc = eina_hash_find(pd->children, &child); 95 rc = eina_hash_find(pd->children, &child);
96 if (!rc) 96 if (!rc)
97 rc = _efl_ui_relative_layout_register(pd, child); 97 rc = _efl_ui_relative_container_register(pd, child);
98 98
99 return rc; 99 return rc;
100} 100}
101 101
102static Efl_Ui_Relative_Layout_Child * 102static Efl_Ui_Relative_Container_Child *
103_relative_child_find(Efl_Ui_Relative_Layout_Data *pd, Eo *target) 103_relative_child_find(Efl_Ui_Relative_Container_Data *pd, Eo *target)
104{ 104{
105 Efl_Ui_Relative_Layout_Child *child; 105 Efl_Ui_Relative_Container_Child *child;
106 106
107 if (pd->obj == target) 107 if (pd->obj == target)
108 return pd->base; 108 return pd->base;
@@ -118,9 +118,9 @@ _relative_child_find(Efl_Ui_Relative_Layout_Data *pd, Eo *target)
118} 118}
119 119
120static void 120static void
121_child_aspect_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis) 121_child_aspect_calc(Efl_Ui_Relative_Container_Child *child, Eina_Bool axis)
122{ 122{
123 Efl_Ui_Relative_Layout_Calc *calc = &child->calc; 123 Efl_Ui_Relative_Container_Calc *calc = &child->calc;
124 double temph; 124 double temph;
125 125
126 if ((calc->aspect[0] <= 0) || (calc->aspect[1] <= 0)) 126 if ((calc->aspect[0] <= 0) || (calc->aspect[1] <= 0))
@@ -200,9 +200,9 @@ _child_aspect_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
200} 200}
201 201
202static Eina_Bool 202static Eina_Bool
203_child_chain_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis) 203_child_chain_calc(Efl_Ui_Relative_Container_Child *child, Eina_Bool axis)
204{ 204{
205 Efl_Ui_Relative_Layout_Child *head, *tail, *o; 205 Efl_Ui_Relative_Container_Child *head, *tail, *o;
206 Efl_Gfx_Hint_Aspect aspect_type; 206 Efl_Gfx_Hint_Aspect aspect_type;
207 int space, min_sum = 0; 207 int space, min_sum = 0;
208 double weight_sum = 0, cur_pos; 208 double weight_sum = 0, cur_pos;
@@ -260,15 +260,15 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
260 _child_calc(tail->calc.to[END], axis); 260 _child_calc(tail->calc.to[END], axis);
261 261
262 cur_pos = head->calc.to[START]->calc.want[axis].position + 262 cur_pos = head->calc.to[START]->calc.want[axis].position +
263 (head->calc.to[START]->calc.want[axis].length * head->rel[START].relative); 263 (head->calc.to[START]->calc.want[axis].length * head->rel[START].relative_position);
264 space = tail->calc.to[END]->calc.want[axis].position + 264 space = tail->calc.to[END]->calc.want[axis].position +
265 (tail->calc.to[END]->calc.want[axis].length * tail->rel[END].relative) - cur_pos; 265 (tail->calc.to[END]->calc.want[axis].length * tail->rel[END].relative_position) - cur_pos;
266 266
267 if ((space <= min_sum) || EINA_DBL_EQ(weight_sum, 0.0)) 267 if ((space <= min_sum) || EINA_DBL_EQ(weight_sum, 0.0))
268 cur_pos += (space - min_sum) * head->calc.align[axis]; 268 cur_pos += (space - min_sum) * head->calc.align[axis];
269 else 269 else
270 { 270 {
271 Efl_Ui_Relative_Layout_Calc *calc; 271 Efl_Ui_Relative_Container_Calc *calc;
272 double weight_len, orig_space = space, orig_weight = weight_sum; 272 double weight_len, orig_space = space, orig_weight = weight_sum;
273 273
274 // Calculate compare factor 274 // Calculate compare factor
@@ -314,21 +314,21 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
314 child->calc.m0[axis] += o->calc.min[axis]; 314 child->calc.m0[axis] += o->calc.min[axis];
315 } 315 }
316 316
317 child->calc.mi[axis] = head->rel[START].relative * (head->calc.to[START]->calc.mj[axis] - 317 child->calc.mi[axis] = head->rel[START].relative_position * (head->calc.to[START]->calc.mj[axis] -
318 head->calc.to[START]->calc.mi[axis]) + head->calc.to[START]->calc.mi[axis]; 318 head->calc.to[START]->calc.mi[axis]) + head->calc.to[START]->calc.mi[axis];
319 child->calc.mj[axis] = tail->rel[END].relative * (tail->calc.to[END]->calc.mj[axis] - 319 child->calc.mj[axis] = tail->rel[END].relative_position * (tail->calc.to[END]->calc.mj[axis] -
320 tail->calc.to[END]->calc.mi[axis]) + tail->calc.to[END]->calc.mi[axis]; 320 tail->calc.to[END]->calc.mi[axis]) + tail->calc.to[END]->calc.mi[axis];
321 child->calc.m0[axis] += -child->calc.min[axis] + 321 child->calc.m0[axis] += -child->calc.min[axis] +
322 (head->calc.to[START]->calc.m0[axis] * head->rel[START].relative) + 322 (head->calc.to[START]->calc.m0[axis] * head->rel[START].relative_position) +
323 (tail->calc.to[END]->calc.m0[axis] * (1 - tail->rel[END].relative)); 323 (tail->calc.to[END]->calc.m0[axis] * (1 - tail->rel[END].relative_position));
324 324
325 return EINA_TRUE; 325 return EINA_TRUE;
326} 326}
327 327
328static void 328static void
329_child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis) 329_child_calc(Efl_Ui_Relative_Container_Child *child, Eina_Bool axis)
330{ 330{
331 Efl_Ui_Relative_Layout_Calc *calc = &child->calc; 331 Efl_Ui_Relative_Container_Calc *calc = &child->calc;
332 332
333 if (calc->state[axis] == RELATIVE_CALC_DONE) 333 if (calc->state[axis] == RELATIVE_CALC_DONE)
334 return; 334 return;
@@ -348,10 +348,10 @@ _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
348 _child_calc(calc->to[END], axis); 348 _child_calc(calc->to[END], axis);
349 349
350 calc->space[axis].position = calc->to[START]->calc.want[axis].position 350 calc->space[axis].position = calc->to[START]->calc.want[axis].position
351 + (calc->to[START]->calc.want[axis].length * child->rel[START].relative) 351 + (calc->to[START]->calc.want[axis].length * child->rel[START].relative_position)
352 + calc->margin[START]; 352 + calc->margin[START];
353 calc->space[axis].length = calc->to[END]->calc.want[axis].position 353 calc->space[axis].length = calc->to[END]->calc.want[axis].position
354 + (calc->to[END]->calc.want[axis].length * child->rel[END].relative) 354 + (calc->to[END]->calc.want[axis].length * child->rel[END].relative_position)
355 - calc->margin[END] - calc->space[axis].position; 355 - calc->margin[END] - calc->space[axis].position;
356 } 356 }
357 357
@@ -381,18 +381,18 @@ _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
381 return; 381 return;
382 382
383 //calculate relative layout min 383 //calculate relative layout min
384 calc->mi[axis] = child->rel[START].relative * (calc->to[START]->calc.mj[axis] - 384 calc->mi[axis] = child->rel[START].relative_position * (calc->to[START]->calc.mj[axis] -
385 calc->to[START]->calc.mi[axis]) + calc->to[START]->calc.mi[axis]; 385 calc->to[START]->calc.mi[axis]) + calc->to[START]->calc.mi[axis];
386 calc->mj[axis] = child->rel[END].relative * (calc->to[END]->calc.mj[axis] - 386 calc->mj[axis] = child->rel[END].relative_position * (calc->to[END]->calc.mj[axis] -
387 calc->to[END]->calc.mi[axis]) + calc->to[END]->calc.mi[axis]; 387 calc->to[END]->calc.mi[axis]) + calc->to[END]->calc.mi[axis];
388 calc->m0[axis] = calc->to[START]->calc.m0[axis] * child->rel[START].relative; 388 calc->m0[axis] = calc->to[START]->calc.m0[axis] * child->rel[START].relative_position;
389 389
390 if ((calc->to[START] == calc->to[END]) && 390 if ((calc->to[START] == calc->to[END]) &&
391 EINA_DBL_EQ(child->rel[START].relative, child->rel[END].relative)) 391 EINA_DBL_EQ(child->rel[START].relative_position, child->rel[END].relative_position))
392 { 392 {
393 double r, a; // relative, align 393 double r, a; // relative, align
394 r = calc->mi[axis] + 394 r = calc->mi[axis] +
395 (child->rel[START].relative * (calc->mj[axis] - calc->mi[axis])); 395 (child->rel[START].relative_position * (calc->mj[axis] - calc->mi[axis]));
396 a = calc->align[axis]; 396 a = calc->align[axis];
397 calc->m0[axis] += (calc->min[axis] + calc->margin[START] + calc->margin[END]) * 397 calc->m0[axis] += (calc->min[axis] + calc->margin[START] + calc->margin[END]) *
398 ((EINA_DBL_EQ(r, 0.0) || (!EINA_DBL_EQ(r, 1.0) && (a < r))) ? 398 ((EINA_DBL_EQ(r, 0.0) || (!EINA_DBL_EQ(r, 1.0) && (a < r))) ?
@@ -400,7 +400,7 @@ _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
400 } 400 }
401 else 401 else
402 { 402 {
403 calc->m0[axis] += calc->to[END]->calc.m0[axis] * (1 - child->rel[END].relative); 403 calc->m0[axis] += calc->to[END]->calc.m0[axis] * (1 - child->rel[END].relative_position);
404 } 404 }
405 405
406} 406}
@@ -408,12 +408,12 @@ _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis)
408static void 408static void
409_hash_free_cb(void *data) 409_hash_free_cb(void *data)
410{ 410{
411 Efl_Ui_Relative_Layout_Child *child = data; 411 Efl_Ui_Relative_Container_Child *child = data;
412 412
413 efl_canvas_group_member_remove(child->layout, child->obj); 413 efl_canvas_group_member_remove(child->layout, child->obj);
414 efl_canvas_object_clipper_set(child->obj, NULL); 414 efl_canvas_object_clipper_set(child->obj, NULL);
415 efl_key_data_set(child->obj, "_elm_leaveme", NULL); 415 efl_key_data_set(child->obj, "_elm_leaveme", NULL);
416 efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(), 416 efl_event_callback_array_del(child->obj, efl_ui_relative_container_callbacks(),
417 child->layout); 417 child->layout);
418 418
419 if (!efl_invalidated_get(child->obj)) 419 if (!efl_invalidated_get(child->obj))
@@ -425,9 +425,9 @@ _hash_free_cb(void *data)
425static void 425static void
426_hash_clear_cb(void *data) 426_hash_clear_cb(void *data)
427{ 427{
428 Efl_Ui_Relative_Layout_Child *child = data; 428 Efl_Ui_Relative_Container_Child *child = data;
429 429
430 efl_event_callback_array_del(child->obj, efl_ui_relative_layout_callbacks(), 430 efl_event_callback_array_del(child->obj, efl_ui_relative_container_callbacks(),
431 child->layout); 431 child->layout);
432 efl_del(child->obj); 432 efl_del(child->obj);
433} 433}
@@ -436,9 +436,9 @@ static Eina_Bool
436_hash_child_calc_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, 436_hash_child_calc_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
437 void *data, void *fdata) 437 void *data, void *fdata)
438{ 438{
439 Efl_Ui_Relative_Layout_Child *child = data; 439 Efl_Ui_Relative_Container_Child *child = data;
440 Efl_Ui_Relative_Layout_Calc *calc = &(child->calc); 440 Efl_Ui_Relative_Container_Calc *calc = &(child->calc);
441 Efl_Ui_Relative_Layout_Data *pd = fdata; 441 Efl_Ui_Relative_Container_Data *pd = fdata;
442 Eina_Rect want; 442 Eina_Rect want;
443 int axis, layout_min; 443 int axis, layout_min;
444 double min_len; 444 double min_len;
@@ -475,9 +475,9 @@ _hash_child_init_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key E
475 void *data, void *fdata) 475 void *data, void *fdata)
476{ 476{
477 Eina_Size2D max, min, aspect; 477 Eina_Size2D max, min, aspect;
478 Efl_Ui_Relative_Layout_Child *child = data; 478 Efl_Ui_Relative_Container_Child *child = data;
479 Efl_Ui_Relative_Layout_Calc *calc = &(child->calc); 479 Efl_Ui_Relative_Container_Calc *calc = &(child->calc);
480 Efl_Ui_Relative_Layout_Data *pd = fdata; 480 Efl_Ui_Relative_Container_Data *pd = fdata;
481 481
482 calc->to[LEFT] = _relative_child_find(pd, child->rel[LEFT].to); 482 calc->to[LEFT] = _relative_child_find(pd, child->rel[LEFT].to);
483 calc->to[RIGHT] = _relative_child_find(pd, child->rel[RIGHT].to); 483 calc->to[RIGHT] = _relative_child_find(pd, child->rel[RIGHT].to);
@@ -532,13 +532,13 @@ _hash_child_init_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key E
532} 532}
533 533
534static void 534static void
535_efl_ui_relative_layout_hints_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev) 535_efl_ui_relative_container_hints_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
536{ 536{
537 efl_pack_layout_request(ev->object); 537 efl_pack_layout_request(ev->object);
538} 538}
539 539
540EOLIAN static void 540EOLIAN static void
541_efl_ui_relative_layout_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 541_efl_ui_relative_container_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
542{ 542{
543 Eina_Rect want = efl_gfx_entity_geometry_get(obj); 543 Eina_Rect want = efl_gfx_entity_geometry_get(obj);
544 pd->base->calc.want[0].position = want.x; 544 pd->base->calc.want[0].position = want.x;
@@ -557,34 +557,34 @@ _efl_ui_relative_layout_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Relative_L
557} 557}
558 558
559EOLIAN static void 559EOLIAN static void
560_efl_ui_relative_layout_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED) 560_efl_ui_relative_container_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Relative_Container_Data *pd EINA_UNUSED)
561{ 561{
562 efl_canvas_group_need_recalculate_set(obj, EINA_TRUE); 562 efl_canvas_group_need_recalculate_set(obj, EINA_TRUE);
563} 563}
564 564
565EOLIAN static void 565EOLIAN static void
566_efl_ui_relative_layout_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED) 566_efl_ui_relative_container_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Relative_Container_Data *pd EINA_UNUSED)
567{ 567{
568 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); 568 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
569 efl_pack_layout_update(obj); 569 efl_pack_layout_update(obj);
570} 570}
571 571
572EOLIAN static void 572EOLIAN static void
573_efl_ui_relative_layout_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED, Eina_Size2D sz) 573_efl_ui_relative_container_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Relative_Container_Data *pd EINA_UNUSED, Eina_Size2D sz)
574{ 574{
575 efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz); 575 efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz);
576 efl_canvas_group_change(obj); 576 efl_canvas_group_change(obj);
577} 577}
578 578
579EOLIAN static void 579EOLIAN static void
580_efl_ui_relative_layout_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED, Eina_Position2D pos) 580_efl_ui_relative_container_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Relative_Container_Data *pd EINA_UNUSED, Eina_Position2D pos)
581{ 581{
582 efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos); 582 efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos);
583 efl_canvas_group_change(obj); 583 efl_canvas_group_change(obj);
584} 584}
585 585
586EOLIAN static void 586EOLIAN static void
587_efl_ui_relative_layout_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Relative_Layout_Data *pd EINA_UNUSED) 587_efl_ui_relative_container_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Relative_Container_Data *pd EINA_UNUSED)
588{ 588{
589 pd->clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj); 589 pd->clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS, obj);
590 evas_object_static_clip_set(pd->clipper, EINA_TRUE); 590 evas_object_static_clip_set(pd->clipper, EINA_TRUE);
@@ -593,14 +593,14 @@ _efl_ui_relative_layout_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Relative_Layo
593 efl_ui_widget_sub_object_add(obj, pd->clipper); 593 efl_ui_widget_sub_object_add(obj, pd->clipper);
594 594
595 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, 595 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
596 _efl_ui_relative_layout_hints_changed_cb, NULL); 596 _efl_ui_relative_container_hints_changed_cb, NULL);
597 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 597 efl_canvas_group_add(efl_super(obj, MY_CLASS));
598 598
599 elm_widget_highlight_ignore_set(obj, EINA_TRUE); 599 elm_widget_highlight_ignore_set(obj, EINA_TRUE);
600} 600}
601 601
602EOLIAN static Eo * 602EOLIAN static Eo *
603_efl_ui_relative_layout_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 603_efl_ui_relative_container_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
604{ 604{
605 obj = efl_constructor(efl_super(obj, MY_CLASS)); 605 obj = efl_constructor(efl_super(obj, MY_CLASS));
606 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 606 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
@@ -610,19 +610,19 @@ _efl_ui_relative_layout_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Layout_D
610 pd->obj = obj; 610 pd->obj = obj;
611 pd->children = eina_hash_pointer_new(_hash_free_cb); 611 pd->children = eina_hash_pointer_new(_hash_free_cb);
612 612
613 pd->base = calloc(1, sizeof(Efl_Ui_Relative_Layout_Child)); 613 pd->base = calloc(1, sizeof(Efl_Ui_Relative_Container_Child));
614 if (!pd->base) return NULL; 614 if (!pd->base) return NULL;
615 615
616 pd->base->obj = obj; 616 pd->base->obj = obj;
617 pd->base->layout = obj; 617 pd->base->layout = obj;
618 pd->base->rel[LEFT].to = obj; 618 pd->base->rel[LEFT].to = obj;
619 pd->base->rel[LEFT].relative = 0.0; 619 pd->base->rel[LEFT].relative_position = 0.0;
620 pd->base->rel[RIGHT].to = obj; 620 pd->base->rel[RIGHT].to = obj;
621 pd->base->rel[RIGHT].relative = 1.0; 621 pd->base->rel[RIGHT].relative_position = 1.0;
622 pd->base->rel[TOP].to = obj; 622 pd->base->rel[TOP].to = obj;
623 pd->base->rel[TOP].relative = 0.0; 623 pd->base->rel[TOP].relative_position = 0.0;
624 pd->base->rel[BOTTOM].to = obj; 624 pd->base->rel[BOTTOM].to = obj;
625 pd->base->rel[BOTTOM].relative = 1.0; 625 pd->base->rel[BOTTOM].relative_position = 1.0;
626 pd->base->calc.mi[0] = pd->base->calc.mi[1] = 0.0; 626 pd->base->calc.mi[0] = pd->base->calc.mi[1] = 0.0;
627 pd->base->calc.mj[0] = pd->base->calc.mj[1] = 1.0; 627 pd->base->calc.mj[0] = pd->base->calc.mj[1] = 1.0;
628 pd->base->calc.state[0] = RELATIVE_CALC_DONE; 628 pd->base->calc.state[0] = RELATIVE_CALC_DONE;
@@ -634,7 +634,7 @@ _efl_ui_relative_layout_efl_object_constructor(Eo *obj, Efl_Ui_Relative_Layout_D
634} 634}
635 635
636EOLIAN static void 636EOLIAN static void
637_efl_ui_relative_layout_efl_object_invalidate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 637_efl_ui_relative_container_efl_object_invalidate(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
638{ 638{
639 efl_invalidate(efl_super(obj, MY_CLASS)); 639 efl_invalidate(efl_super(obj, MY_CLASS));
640 640
@@ -642,26 +642,26 @@ _efl_ui_relative_layout_efl_object_invalidate(Eo *obj, Efl_Ui_Relative_Layout_Da
642} 642}
643 643
644EOLIAN static void 644EOLIAN static void
645_efl_ui_relative_layout_efl_object_destructor(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 645_efl_ui_relative_container_efl_object_destructor(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
646{ 646{
647 efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, 647 efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
648 _efl_ui_relative_layout_hints_changed_cb, NULL); 648 _efl_ui_relative_container_hints_changed_cb, NULL);
649 eina_hash_free(pd->children); 649 eina_hash_free(pd->children);
650 if (pd->base) free(pd->base); 650 if (pd->base) free(pd->base);
651 efl_destructor(efl_super(obj, MY_CLASS)); 651 efl_destructor(efl_super(obj, MY_CLASS));
652} 652}
653 653
654EOLIAN static Eina_Bool 654EOLIAN static Eina_Bool
655_efl_ui_relative_layout_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Efl_Gfx_Entity *subobj) 655_efl_ui_relative_container_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Container_Data *pd, Efl_Gfx_Entity *subobj)
656{ 656{
657 EINA_SAFETY_ON_FALSE_RETURN_VAL(subobj, EINA_FALSE); 657 EINA_SAFETY_ON_FALSE_RETURN_VAL(subobj, EINA_FALSE);
658 EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_hash_find(pd->children, &subobj), EINA_FALSE); 658 EINA_SAFETY_ON_TRUE_RETURN_VAL(!!eina_hash_find(pd->children, &subobj), EINA_FALSE);
659 659
660 return !!_efl_ui_relative_layout_register(pd, subobj); 660 return !!_efl_ui_relative_container_register(pd, subobj);
661} 661}
662 662
663EOLIAN static Eina_Bool 663EOLIAN static Eina_Bool
664_efl_ui_relative_layout_efl_pack_unpack(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Efl_Object *child) 664_efl_ui_relative_container_efl_pack_unpack(Eo *obj, Efl_Ui_Relative_Container_Data *pd, Efl_Object *child)
665{ 665{
666 if (!eina_hash_del_by_key(pd->children, &child)) 666 if (!eina_hash_del_by_key(pd->children, &child))
667 { 667 {
@@ -675,7 +675,7 @@ _efl_ui_relative_layout_efl_pack_unpack(Eo *obj, Efl_Ui_Relative_Layout_Data *pd
675} 675}
676 676
677EOLIAN static Eina_Bool 677EOLIAN static Eina_Bool
678_efl_ui_relative_layout_efl_pack_unpack_all(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 678_efl_ui_relative_container_efl_pack_unpack_all(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
679{ 679{
680 eina_hash_free_buckets(pd->children); 680 eina_hash_free_buckets(pd->children);
681 efl_pack_layout_request(obj); 681 efl_pack_layout_request(obj);
@@ -684,7 +684,7 @@ _efl_ui_relative_layout_efl_pack_unpack_all(Eo *obj, Efl_Ui_Relative_Layout_Data
684} 684}
685 685
686EOLIAN static Eina_Bool 686EOLIAN static Eina_Bool
687_efl_ui_relative_layout_efl_pack_pack_clear(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 687_efl_ui_relative_container_efl_pack_pack_clear(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
688{ 688{
689 eina_hash_free_cb_set(pd->children, _hash_clear_cb); 689 eina_hash_free_cb_set(pd->children, _hash_clear_cb);
690 eina_hash_free_buckets(pd->children); 690 eina_hash_free_buckets(pd->children);
@@ -696,9 +696,9 @@ _efl_ui_relative_layout_efl_pack_pack_clear(Eo *obj, Efl_Ui_Relative_Layout_Data
696} 696}
697 697
698static Eina_Bool 698static Eina_Bool
699_efl_ui_relative_layout_content_iterator_next(Efl_Ui_Relative_Layout_Content_Iterator *it, void **data) 699_efl_ui_relative_container_content_iterator_next(Efl_Ui_Relative_Container_Content_Iterator *it, void **data)
700{ 700{
701 Efl_Ui_Relative_Layout_Child *child; 701 Efl_Ui_Relative_Container_Child *child;
702 702
703 if (!eina_iterator_next(it->real_iterator, (void **) &child)) 703 if (!eina_iterator_next(it->real_iterator, (void **) &child))
704 return EINA_FALSE; 704 return EINA_FALSE;
@@ -708,54 +708,54 @@ _efl_ui_relative_layout_content_iterator_next(Efl_Ui_Relative_Layout_Content_Ite
708} 708}
709 709
710static Eo * 710static Eo *
711_efl_ui_relative_layout_content_iterator_get_container(Efl_Ui_Relative_Layout_Content_Iterator *it) 711_efl_ui_relative_container_content_iterator_get_container(Efl_Ui_Relative_Container_Content_Iterator *it)
712{ 712{
713 return it->relative_layout; 713 return it->relative_container;
714} 714}
715 715
716static void 716static void
717_efl_ui_relative_layout_content_iterator_free(Efl_Ui_Relative_Layout_Content_Iterator *it) 717_efl_ui_relative_container_content_iterator_free(Efl_Ui_Relative_Container_Content_Iterator *it)
718{ 718{
719 eina_iterator_free(it->real_iterator); 719 eina_iterator_free(it->real_iterator);
720 free(it); 720 free(it);
721} 721}
722 722
723EOLIAN static Eina_Iterator * 723EOLIAN static Eina_Iterator *
724_efl_ui_relative_layout_efl_container_content_iterate(Eo *obj, Efl_Ui_Relative_Layout_Data *pd) 724_efl_ui_relative_container_efl_container_content_iterate(Eo *obj, Efl_Ui_Relative_Container_Data *pd)
725{ 725{
726 Efl_Ui_Relative_Layout_Content_Iterator *it; 726 Efl_Ui_Relative_Container_Content_Iterator *it;
727 727
728 it = calloc(1, sizeof(*it)); 728 it = calloc(1, sizeof(*it));
729 if (!it) return NULL; 729 if (!it) return NULL;
730 730
731 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); 731 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
732 732
733 it->relative_layout = obj; 733 it->relative_container = obj;
734 it->real_iterator = eina_hash_iterator_data_new(pd->children); 734 it->real_iterator = eina_hash_iterator_data_new(pd->children);
735 735
736 it->iterator.version = EINA_ITERATOR_VERSION; 736 it->iterator.version = EINA_ITERATOR_VERSION;
737 it->iterator.next = FUNC_ITERATOR_NEXT(_efl_ui_relative_layout_content_iterator_next); 737 it->iterator.next = FUNC_ITERATOR_NEXT(_efl_ui_relative_container_content_iterator_next);
738 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER( 738 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(
739 _efl_ui_relative_layout_content_iterator_get_container); 739 _efl_ui_relative_container_content_iterator_get_container);
740 it->iterator.free = FUNC_ITERATOR_FREE(_efl_ui_relative_layout_content_iterator_free); 740 it->iterator.free = FUNC_ITERATOR_FREE(_efl_ui_relative_container_content_iterator_free);
741 741
742 return &it->iterator; 742 return &it->iterator;
743} 743}
744 744
745EOLIAN static int 745EOLIAN static int
746_efl_ui_relative_layout_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd) 746_efl_ui_relative_container_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Relative_Container_Data *pd)
747{ 747{
748 return eina_hash_population(pd->children); 748 return eina_hash_population(pd->children);
749} 749}
750 750
751EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(left, LEFT); 751EFL_UI_RELATIVE_CONTAINER_RELATION_SET_GET(left, LEFT);
752EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(right, RIGHT); 752EFL_UI_RELATIVE_CONTAINER_RELATION_SET_GET(right, RIGHT);
753EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(top, TOP); 753EFL_UI_RELATIVE_CONTAINER_RELATION_SET_GET(top, TOP);
754EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(bottom, BOTTOM); 754EFL_UI_RELATIVE_CONTAINER_RELATION_SET_GET(bottom, BOTTOM);
755 755
756/* Internal EO APIs and hidden overrides */ 756/* Internal EO APIs and hidden overrides */
757 757
758#define EFL_UI_RELATIVE_LAYOUT_EXTRA_OPS \ 758#define EFL_UI_RELATIVE_CONTAINER_EXTRA_OPS \
759 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_relative_layout) 759 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_relative_container)
760 760
761#include "efl_ui_relative_layout.eo.c" 761#include "efl_ui_relative_container.eo.c"
diff --git a/src/lib/elementary/efl_ui_relative_container.eo b/src/lib/elementary/efl_ui_relative_container.eo
new file mode 100644
index 0000000..9d7a6cb
--- /dev/null
+++ b/src/lib/elementary/efl_ui_relative_container.eo
@@ -0,0 +1,94 @@
1import efl_gfx_types;
2class @beta Efl.Ui.Relative_Container extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack
3{
4 [[The relative container class.
5
6 A relative container calculates the size and position of all the children
7 based on their relationship to each other.]]
8 methods {
9 @property relation_left {
10 [[Specifies the left side edge of the $child object relative to the $base object.
11 When $relative_position is 0 the left edges of the two objects are aligned.
12 When $relative_position is 1 the left edge of the $child object is aligned
13 to the right edge of the $base object.]]
14 keys {
15 child: Efl.Gfx.Entity; [[The child object whose size and position is
16 being changed.]]
17 }
18 values {
19 base: Efl.Gfx.Entity; [[The object whose size and position is being used as reference.
20 $NULL means that the container object is used
21 (this is the default value).]]
22 relative_position: Efl.Gfx.Align(0.0); [[The ratio between left and right of the base,
23 ranging from 0.0 to 1.0.]]
24 }
25 }
26 @property relation_right {
27 [[Specifies the right side edge of the $child object relative to the $base object.
28 When $relative_position is 0 the right edge of the $child object is aligned
29 to the left edge of the $base object.
30 When $relative_position is 1 the right edges of the two objects are aligned.]]
31 keys {
32 child: Efl.Gfx.Entity; [[The child object whose size and position is
33 being changed.]]
34 }
35 values {
36 base: Efl.Gfx.Entity; [[The object whose size and position is being used as reference.
37 $NULL means that the container object is used
38 (this is the default value).]]
39 relative_position: Efl.Gfx.Align(1.0); [[The ratio between left and right of the base,
40 ranging from 0.0 to 1.0.]]
41 }
42 }
43 @property relation_top {
44 [[Specifies the top side edge of the $child object relative to the $base object.
45 When $relative_position is 0 the top edges of the two objects are aligned.
46 When $relative_position is 1 the top edge of the $child object is aligned
47 to the bottom edge of the $base object.]]
48 keys {
49 child: Efl.Gfx.Entity; [[The child object whose size and position is
50 being changed.]]
51 }
52 values {
53 base: Efl.Gfx.Entity; [[The object whose size and position is being used as reference.
54 $NULL means that the container object is used
55 (this is the default value).]]
56 relative_position: Efl.Gfx.Align(0.0); [[The ratio between top and bottom of the base,
57 ranging from 0.0 to 1.0.]]
58 }
59 }
60 @property relation_bottom {
61 [[Specifies the bottom side edge of the $child object relative to the $base object.
62 When $relative_position is 0 the bottom edge of the $child object is aligned
63 to the top edge of the $base object.
64 When $relative_position is 1 the bottom edges of the two objects are aligned.]]
65 keys {
66 child: Efl.Gfx.Entity; [[The child object whose size and position is
67 being changed.]]
68 }
69 values {
70 base: Efl.Gfx.Entity; [[The object whose size and position is being used as reference.
71 $NULL means that the container object is used
72 (this is the default value).]]
73 relative_position: Efl.Gfx.Align(1.0); [[The ratio between top and bottom of the base,
74 ranging from 0.0 to 1.0.]]
75 }
76 }
77 }
78 implements {
79 Efl.Object.constructor;
80 Efl.Object.invalidate;
81 Efl.Object.destructor;
82 Efl.Canvas.Group.group_calculate;
83 Efl.Pack.pack_clear;
84 Efl.Pack.unpack_all;
85 Efl.Pack.unpack;
86 Efl.Pack.pack;
87 Efl.Container.content_iterate;
88 Efl.Container.content_count;
89 Efl.Gfx.Entity.position { set; }
90 Efl.Gfx.Entity.size { set; }
91 Efl.Pack_Layout.layout_update;
92 Efl.Pack_Layout.layout_request;
93 }
94}
diff --git a/src/lib/elementary/efl_ui_relative_layout_private.h b/src/lib/elementary/efl_ui_relative_container_private.h
index 79a22be..43ea3c2 100644
--- a/src/lib/elementary/efl_ui_relative_layout_private.h
+++ b/src/lib/elementary/efl_ui_relative_container_private.h
@@ -1,5 +1,5 @@
1#ifndef EFL_UI_RELATIVE_LAYOUT_PRIVATE_H 1#ifndef EFL_UI_RELATIVE_CONTAINER_PRIVATE_H
2#define EFL_UI_RELATIVE_LAYOUT_PRIVATE_H 2#define EFL_UI_RELATIVE_CONTAINER_PRIVATE_H
3 3
4#ifdef HAVE_CONFIG_H 4#ifdef HAVE_CONFIG_H
5# include "elementary_config.h" 5# include "elementary_config.h"
@@ -10,20 +10,20 @@
10#include <Elementary.h> 10#include <Elementary.h>
11#include "elm_priv.h" 11#include "elm_priv.h"
12 12
13typedef enum _Efl_Ui_Relative_Layout_Calc_State 13typedef enum _Efl_Ui_Relative_Container_Calc_State
14{ 14{
15 RELATIVE_CALC_NONE, 15 RELATIVE_CALC_NONE,
16 RELATIVE_CALC_DONE, 16 RELATIVE_CALC_DONE,
17 RELATIVE_CALC_ON 17 RELATIVE_CALC_ON
18} Efl_Ui_Relative_Layout_Calc_State; 18} Efl_Ui_Relative_Container_Calc_State;
19 19
20typedef struct _Efl_Ui_Relative_Layout_Data Efl_Ui_Relative_Layout_Data; 20typedef struct _Efl_Ui_Relative_Container_Data Efl_Ui_Relative_Container_Data;
21typedef struct _Efl_Ui_Relative_Layout_Child Efl_Ui_Relative_Layout_Child; 21typedef struct _Efl_Ui_Relative_Container_Child Efl_Ui_Relative_Container_Child;
22typedef struct _Efl_Ui_Relative_Layout_Calc Efl_Ui_Relative_Layout_Calc; 22typedef struct _Efl_Ui_Relative_Container_Calc Efl_Ui_Relative_Container_Calc;
23typedef struct _Efl_Ui_Relative_Layout_Relation Efl_Ui_Relative_Layout_Relation; 23typedef struct _Efl_Ui_Relative_Container_Relation Efl_Ui_Relative_Container_Relation;
24typedef struct _Efl_Ui_Relative_Layout_Content_Iterator Efl_Ui_Relative_Layout_Content_Iterator; 24typedef struct _Efl_Ui_Relative_Container_Content_Iterator Efl_Ui_Relative_Container_Content_Iterator;
25 25
26struct _Efl_Ui_Relative_Layout_Calc 26struct _Efl_Ui_Relative_Container_Calc
27{ 27{
28 EINA_INLIST; 28 EINA_INLIST;
29 29
@@ -42,7 +42,7 @@ struct _Efl_Ui_Relative_Layout_Calc
42 * align is greater than relative, (min * ((1 - align) / (1 - relative))) otherwise. 42 * align is greater than relative, (min * ((1 - align) / (1 - relative))) otherwise.
43 * mi, mj are transformed relative based on layout min size. they are 43 * mi, mj are transformed relative based on layout min size. they are
44 * calculated as (target.mi + (relative * (target.mj - target.mi))). for example, 44 * calculated as (target.mi + (relative * (target.mj - target.mi))). for example,
45 * there are two children of relative_layout that has different target base. 45 * there are two children of relative_container that has different target base.
46 * | | obj1 | obj2 | 46 * | | obj1 | obj2 |
47 * | min | 100 | 100 | 47 * | min | 100 | 100 |
48 * |left.target | layout| obj1 | 48 * |left.target | layout| obj1 |
@@ -52,7 +52,7 @@ struct _Efl_Ui_Relative_Layout_Calc
52 * | mi | 0.0 | 0.25 | 52 * | mi | 0.0 | 0.25 |
53 * | mj | 0.5 | 0.5 | 53 * | mj | 0.5 | 0.5 |
54 * 54 *
55 * obj1.mi = layout.mi(0.0) + (obj1.relative(0.0) * (layout.mj(1.0) - layout.mi(0.0))) = 0.0 55 * obj1.mi = layout.mi(0.0) + (obj1.relative(0.0) * (LAyout.mj(1.0) - layout.mi(0.0))) = 0.0
56 * obj1.mj = layout.mi(0.0) + (obj1.relative(0.5) * (layout.mj(1.0) - layout.mi(0.0))) = 0.5 56 * obj1.mj = layout.mi(0.0) + (obj1.relative(0.5) * (layout.mj(1.0) - layout.mi(0.0))) = 0.5
57 * obj2.mi = obj1.mi(0.0) + (obj2.relative(0.5) * (obj1.mj(0.5) - obj1.mi(0.0))) = 0.25 57 * obj2.mi = obj1.mi(0.0) + (obj2.relative(0.5) * (obj1.mj(0.5) - obj1.mi(0.0))) = 0.25
58 * obj2.mj = obj1.mi(0.0) + (obj2.relative(1.0) * (obj1.mj(0.5) - obj1.mi(0.0))) = 0.5 58 * obj2.mj = obj1.mi(0.0) + (obj2.relative(1.0) * (obj1.mj(0.5) - obj1.mi(0.0))) = 0.5
@@ -70,71 +70,71 @@ struct _Efl_Ui_Relative_Layout_Calc
70 double length; 70 double length;
71 } space[2], want[2]; 71 } space[2], want[2];
72 72
73 Efl_Ui_Relative_Layout_Calc_State state[2]; 73 Efl_Ui_Relative_Container_Calc_State state[2];
74 Efl_Ui_Relative_Layout_Calc_State chain_state[2]; 74 Efl_Ui_Relative_Container_Calc_State chain_state[2];
75 Efl_Ui_Relative_Layout_Child *to[4]; 75 Efl_Ui_Relative_Container_Child *to[4];
76}; 76};
77 77
78struct _Efl_Ui_Relative_Layout_Data 78struct _Efl_Ui_Relative_Container_Data
79{ 79{
80 Eo *obj; 80 Eo *obj;
81 Eo *clipper; 81 Eo *clipper;
82 Eina_Hash *children; 82 Eina_Hash *children;
83 Efl_Ui_Relative_Layout_Child *base; 83 Efl_Ui_Relative_Container_Child *base;
84}; 84};
85 85
86struct _Efl_Ui_Relative_Layout_Relation 86struct _Efl_Ui_Relative_Container_Relation
87{ 87{
88 Efl_Object *to; 88 Efl_Object *to;
89 double relative; 89 double relative_position;
90}; 90};
91 91
92struct _Efl_Ui_Relative_Layout_Child 92struct _Efl_Ui_Relative_Container_Child
93{ 93{
94 Eo *obj; 94 Eo *obj;
95 Eo *layout; 95 Eo *layout;
96 Efl_Ui_Relative_Layout_Relation rel[4]; 96 Efl_Ui_Relative_Container_Relation rel[4];
97 Efl_Ui_Relative_Layout_Calc calc; 97 Efl_Ui_Relative_Container_Calc calc;
98}; 98};
99 99
100struct _Efl_Ui_Relative_Layout_Content_Iterator 100struct _Efl_Ui_Relative_Container_Content_Iterator
101{ 101{
102 Eina_Iterator iterator; 102 Eina_Iterator iterator;
103 Eina_Iterator *real_iterator; 103 Eina_Iterator *real_iterator;
104 Eo *relative_layout; 104 Eo *relative_container;
105}; 105};
106 106
107#define EFL_UI_RELATIVE_LAYOUT_RELATION_SET_GET(direction, DIRECTION) \ 107#define EFL_UI_RELATIVE_CONTAINER_RELATION_SET_GET(direction, DIRECTION) \
108 EOLIAN static void \ 108 EOLIAN static void \
109 _efl_ui_relative_layout_relation_ ## direction ## _set(Eo *obj, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo *target, double relative) \ 109 _efl_ui_relative_container_relation_ ## direction ## _set(Eo *obj, Efl_Ui_Relative_Container_Data *pd, Eo *child, Eo *target, double relative_position) \
110 { \ 110 { \
111 Efl_Ui_Relative_Layout_Child *rc; \ 111 Efl_Ui_Relative_Container_Child *rc; \
112 if (!child) return; \ 112 if (!child) return; \
113 rc = _relative_child_get(pd, child); \ 113 rc = _relative_child_get(pd, child); \
114 if (!rc) return; \ 114 if (!rc) return; \
115 if (target) rc->rel[DIRECTION].to = target; \ 115 if (target) rc->rel[DIRECTION].to = target; \
116 if (relative < 0) relative = 0; \ 116 if (relative_position < 0) relative_position = 0; \
117 else if (relative > 1) relative = 1; \ 117 else if (relative_position > 1) relative_position = 1; \
118 rc->rel[DIRECTION].relative = relative; \ 118 rc->rel[DIRECTION].relative_position = relative_position; \
119 efl_pack_layout_request(obj); \ 119 efl_pack_layout_request(obj); \
120 } \ 120 } \
121 \ 121 \
122 EOLIAN static void \ 122 EOLIAN static void \
123 _efl_ui_relative_layout_relation_ ## direction ## _get(const Eo *obj EINA_UNUSED, Efl_Ui_Relative_Layout_Data *pd, Eo *child, Eo **target, double *relative) \ 123 _efl_ui_relative_container_relation_ ## direction ## _get(const Eo *obj EINA_UNUSED, Efl_Ui_Relative_Container_Data *pd, Eo *child, Eo **target, double *relative_position) \
124 { \ 124 { \
125 Efl_Ui_Relative_Layout_Child *rc; \ 125 Efl_Ui_Relative_Container_Child *rc; \
126 Eo *rel_to = NULL; \ 126 Eo *rel_to = NULL; \
127 double rel_relative = 0.0; \ 127 double rel_relative = 0.0; \
128 rc = eina_hash_find(pd->children, &child); \ 128 rc = eina_hash_find(pd->children, &child); \
129 if (rc) \ 129 if (rc) \
130 { \ 130 { \
131 rel_to = rc->rel[DIRECTION].to; \ 131 rel_to = rc->rel[DIRECTION].to; \
132 rel_relative = rc->rel[DIRECTION].relative; \ 132 rel_relative = rc->rel[DIRECTION].relative_position; \
133 } \ 133 } \
134 else \ 134 else \
135 ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child)); \ 135 ERR("child(%p(%s)) is not registered", child, efl_class_name_get(child)); \
136 if (target) *target = rel_to; \ 136 if (target) *target = rel_to; \
137 if (relative) *relative = rel_relative; \ 137 if (relative_position) *relative_position = rel_relative; \
138 } 138 }
139 139
140#endif 140#endif
diff --git a/src/lib/elementary/efl_ui_relative_layout.eo b/src/lib/elementary/efl_ui_relative_layout.eo
deleted file mode 100644
index 03b3183..0000000
--- a/src/lib/elementary/efl_ui_relative_layout.eo
+++ /dev/null
@@ -1,73 +0,0 @@
1class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack
2{
3 [[The relative layout class.
4
5 A relative layout calculates the size and position of all the children
6 based on their relationship to each other.]]
7 methods {
8 @property relation_left {
9 [[Specifies the left side edge of the child relative to the target.
10 By default, target is parent and relative is 0.0.]]
11 keys {
12 child: Efl.Object; [[The child to specify relation.]]
13 }
14 values {
15 target: Efl.Object; [[The relative target.]]
16 relative: double; [[The ratio between left and right of the target,
17 ranging from 0.0 to 1.0.]]
18 }
19 }
20 @property relation_right {
21 [[Specifies the right side edge of the child relative to the target.
22 By default, target is parent and relative is 1.0.]]
23 keys {
24 child: Efl.Object; [[The child to specify relation.]]
25 }
26 values {
27 target: Efl.Object; [[The relative target.]]
28 relative: double; [[The ratio between left and right of the target,
29 ranging from 0.0 to 1.0.]]
30 }
31 }
32 @property relation_top {
33 [[Specifies the top side edge of the child relative to the target.
34 By default, target is parent and relative is 0.0.]]
35 keys {
36 child: Efl.Object; [[The child to specify relation.]]
37 }
38 values {
39 target: Efl.Object; [[The relative target.]]
40 relative: double; [[The ratio between top and bottom of the target,
41 ranging from 0.0 to 1.0.]]
42 }
43 }
44 @property relation_bottom {
45 [[Specifies the bottom side edge of the child relative to the target.
46 By default, target is parent and relative is 1.0.]]
47 keys {
48 child: Efl.Object; [[The child to specify relation.]]
49 }
50 values {
51 target: Efl.Object; [[The relative target.]]
52 relative: double; [[The ratio between top and bottom of the target,
53 ranging from 0.0 to 1.0.]]
54 }
55 }
56 }
57 implements {
58 Efl.Object.constructor;
59 Efl.Object.invalidate;
60 Efl.Object.destructor;
61 Efl.Canvas.Group.group_calculate;
62 Efl.Pack.pack_clear;
63 Efl.Pack.unpack_all;
64 Efl.Pack.unpack;
65 Efl.Pack.pack;
66 Efl.Container.content_iterate;
67 Efl.Container.content_count;
68 Efl.Gfx.Entity.position { set; }
69 Efl.Gfx.Entity.size { set; }
70 Efl.Pack_Layout.layout_update;
71 Efl.Pack_Layout.layout_request;
72 }
73}
diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo
index 2a05083..957a4f4 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.eo
+++ b/src/lib/elementary/efl_ui_scroll_manager.eo
@@ -8,16 +8,16 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements
8 c_prefix: efl_ui_scroll_manager; 8 c_prefix: efl_ui_scroll_manager;
9 methods { 9 methods {
10 @property pan @protected { 10 @property pan @protected {
11 [[This is the internal pan object managed by scroll manager. 11 [[This is the internal pan object managed by scroll manager.
12 12
13 This property is protected as it is meant for scrollable object 13 This property is protected as it is meant for scrollable object
14 implementations only, to set and access the internal pan object. 14 implementations only, to set and access the internal pan object.
15 If pan is set to $NULL, scrolling does not work. 15 If pan is set to $NULL, scrolling does not work.
16 ]] 16 ]]
17 set { 17 set {
18 } 18 }
19 values { 19 values {
20 pan: Efl.Ui.Pan; [[Pan object]] 20 pan: Efl.Ui.Pan; [[Pan object.]]
21 } 21 }
22 } 22 }
23 } 23 }
diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c
index 3c8ab8d..3a5db97 100644
--- a/src/lib/elementary/efl_ui_selection_manager.c
+++ b/src/lib/elementary/efl_ui_selection_manager.c
@@ -5475,8 +5475,9 @@ _efl_ui_selection_manager_efl_object_constructor(Eo *obj, Efl_Ui_Selection_Manag
5475 _efl_sel_manager_x11_selection_notify, pd); 5475 _efl_sel_manager_x11_selection_notify, pd);
5476 pd->clear_handler = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR, 5476 pd->clear_handler = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
5477 _x11_selection_clear, pd); 5477 _x11_selection_clear, pd);
5478 pd->fix_handler = ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, 5478 if (ECORE_X_EVENT_FIXES_SELECTION_NOTIFY) // If XFIXES is not available ECORE_X_EVENT_FIXES_SELECTION_NOTIFY would be NULL
5479 _x11_fixes_selection_notify, pd); 5479 pd->fix_handler = ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY,
5480 _x11_fixes_selection_notify, pd);
5480 } 5481 }
5481#endif 5482#endif
5482 5483
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 2aca5f9..920dcfa 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -48,6 +48,21 @@ _is_horizontal(Efl_Ui_Layout_Orientation dir)
48 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE); 48 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE);
49} 49}
50 50
51static Eina_Bool
52_is_inverted(Eo *obj, Efl_Ui_Slider_Data *sd)
53{
54 Eina_Bool mirrored, inverted;
55
56 mirrored = efl_ui_mirrored_get(obj);
57 inverted = efl_ui_layout_orientation_is_inverted(sd->dir);
58
59 if ((_is_horizontal(sd->dir) && (mirrored ^ inverted)) ||
60 (!_is_horizontal(sd->dir) && inverted))
61 return EINA_TRUE;
62 else
63 return EINA_FALSE;
64}
65
51static void 66static void
52_emit_events(Eo *obj, Efl_Ui_Slider_Data *sd) 67_emit_events(Eo *obj, Efl_Ui_Slider_Data *sd)
53{ 68{
@@ -78,6 +93,21 @@ _user_value_update(Evas_Object *obj, double value)
78} 93}
79 94
80static void 95static void
96_step_value_update(Evas_Object *obj, double step)
97{
98 double value;
99
100 EFL_UI_SLIDER_DATA_GET(obj, sd);
101
102 if (_is_inverted(obj, sd))
103 step *= -1.0;
104
105 value = CLAMP(sd->val + step, sd->val_min, sd->val_max);
106 _user_value_update(obj, value);
107
108}
109
110static void
81_drag_value_fetch(Evas_Object *obj) 111_drag_value_fetch(Evas_Object *obj)
82{ 112{
83 EFL_UI_SLIDER_DATA_GET(obj, sd); 113 EFL_UI_SLIDER_DATA_GET(obj, sd);
@@ -90,10 +120,8 @@ _drag_value_fetch(Evas_Object *obj)
90 if (_is_horizontal(sd->dir)) pos = posx; 120 if (_is_horizontal(sd->dir)) pos = posx;
91 else pos = posy; 121 else pos = posy;
92 122
93 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 123 if (_is_inverted(obj, sd))
94 { 124 pos = 1.0 - pos;
95 pos = 1.0 - pos;
96 }
97 125
98 val = (pos * (sd->val_max - sd->val_min)) + sd->val_min; 126 val = (pos * (sd->val_max - sd->val_min)) + sd->val_min;
99 127
@@ -124,10 +152,8 @@ _drag_value_update(Evas_Object *obj)
124 152
125 pos = (sd->val - sd->val_min) / (sd->val_max - sd->val_min); 153 pos = (sd->val - sd->val_min) / (sd->val_max - sd->val_min);
126 154
127 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 155 if (_is_inverted(obj, sd))
128 { 156 pos = 1.0 - pos;
129 pos = 1.0 - pos;
130 }
131 157
132 efl_ui_drag_value_set(efl_part(wd->resize_obj, "efl.draggable.slider"), 158 efl_ui_drag_value_set(efl_part(wd->resize_obj, "efl.draggable.slider"),
133 pos, pos); 159 pos, pos);
@@ -194,7 +220,8 @@ _drag_up(Evas_Object *obj)
194 220
195 efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"), 221 efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"),
196 relative_step, relative_step); 222 relative_step, relative_step);
197 _drag_value_fetch(obj); 223
224 _step_value_update(obj, step);
198} 225}
199 226
200static void 227static void
@@ -214,7 +241,8 @@ _drag_down(Evas_Object *obj)
214 241
215 efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"), 242 efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"),
216 relative_step, relative_step); 243 relative_step, relative_step);
217 _drag_value_fetch(obj); 244
245 _step_value_update(obj, step);
218} 246}
219 247
220static Eina_Bool 248static Eina_Bool
diff --git a/src/lib/elementary/efl_ui_spotlight_container.c b/src/lib/elementary/efl_ui_spotlight_container.c
index 608aca1..f725f48 100644
--- a/src/lib/elementary/efl_ui_spotlight_container.c
+++ b/src/lib/elementary/efl_ui_spotlight_container.c
@@ -229,7 +229,7 @@ _efl_ui_spotlight_container_efl_object_finalize(Eo *obj, Efl_Ui_Spotlight_Contai
229 } 229 }
230 else 230 else
231 { 231 {
232 efl_ui_spotlight_manager_animation_enabled_set(manager, EINA_TRUE); 232 efl_ui_spotlight_manager_animated_transition_set(manager, EINA_TRUE);
233 } 233 }
234 234
235 return obj; 235 return obj;
@@ -619,7 +619,7 @@ _efl_ui_spotlight_container_spotlight_manager_set(Eo *obj, Efl_Ui_Spotlight_Cont
619 //the api indicates that the caller passes ownership to this function, so we need to unref here 619 //the api indicates that the caller passes ownership to this function, so we need to unref here
620 efl_unref(pd->transition); 620 efl_unref(pd->transition);
621 //disable animation when not finalized yet, this help reducing the overhead of scheduling a animation that will not be displayed 621 //disable animation when not finalized yet, this help reducing the overhead of scheduling a animation that will not be displayed
622 efl_ui_spotlight_manager_animation_enabled_set(pd->transition, efl_finalized_get(obj)); 622 efl_ui_spotlight_manager_animated_transition_set(pd->transition, efl_finalized_get(obj));
623 efl_ui_spotlight_manager_bind(pd->transition, obj, 623 efl_ui_spotlight_manager_bind(pd->transition, obj,
624 pd->page_root); 624 pd->page_root);
625 efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz); 625 efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
diff --git a/src/lib/elementary/efl_ui_spotlight_manager.eo b/src/lib/elementary/efl_ui_spotlight_manager.eo
index 03f0e4f..ddb1ac1 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager.eo
+++ b/src/lib/elementary/efl_ui_spotlight_manager.eo
@@ -55,10 +55,12 @@ abstract @beta Efl.Ui.Spotlight.Manager extends Efl.Object {
55 size : Eina.Size2D; [[The new size of the sub-widgets.]] 55 size : Eina.Size2D; [[The new size of the sub-widgets.]]
56 } 56 }
57 } 57 }
58 @property animation_enabled @pure_virtual { 58 @property animated_transition @pure_virtual {
59 [[This flag can be used to disable animations.]] 59 [[When this flag is $true the transition from the previous element to the new one will be animated whenever
60 @Efl.Ui.Spotlight.Container.active_element changes.]]
60 values { 61 values {
61 enable : bool; [[$true if you want animations to happen, $false otherwise.]] 62 enable : bool; [[$true to enable animated transitions. If $false, the new active element is shown
63 immediately.]]
62 } 64 }
63 } 65 }
64 } 66 }
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_plain.c b/src/lib/elementary/efl_ui_spotlight_manager_plain.c
index ec7c3a2..50371ed 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_plain.c
+++ b/src/lib/elementary/efl_ui_spotlight_manager_plain.c
@@ -71,7 +71,7 @@ _efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Sp
71 71
72 for (int i = 0; i < efl_content_count(spotlight) ; ++i) { 72 for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
73 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i); 73 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
74 efl_canvas_group_member_add(pd->group, elem); 74 efl_canvas_group_member_add(pd->container, elem);
75 efl_gfx_entity_visible_set(elem, EINA_FALSE); 75 efl_gfx_entity_visible_set(elem, EINA_FALSE);
76 } 76 }
77 index = efl_ui_spotlight_active_element_get(spotlight); 77 index = efl_ui_spotlight_active_element_get(spotlight);
@@ -102,7 +102,7 @@ _content_changed(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
102EOLIAN static void 102EOLIAN static void
103_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_add(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED) 103_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_add(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
104{ 104{
105 efl_canvas_group_member_add(pd->group, subobj); 105 efl_canvas_group_member_add(pd->container, subobj);
106 efl_gfx_entity_visible_set(subobj, EINA_FALSE); 106 efl_gfx_entity_visible_set(subobj, EINA_FALSE);
107 _content_changed(obj, pd); 107 _content_changed(obj, pd);
108} 108}
@@ -110,7 +110,7 @@ _efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_add(Eo *obj, Ef
110EOLIAN static void 110EOLIAN static void
111_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_del(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED) 111_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_del(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
112{ 112{
113 efl_canvas_group_member_remove(pd->group, subobj); 113 efl_canvas_group_member_remove(pd->container, subobj);
114 _content_changed(obj, pd); 114 _content_changed(obj, pd);
115} 115}
116EOLIAN static void 116EOLIAN static void
@@ -157,13 +157,13 @@ _efl_ui_spotlight_manager_plain_efl_object_destructor(Eo *obj, Efl_Ui_Spotlight_
157} 157}
158 158
159EOLIAN static void 159EOLIAN static void
160_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Eina_Bool animation) 160_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animated_transition_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Eina_Bool animation)
161{ 161{
162 pd->animation = animation; 162 pd->animation = animation;
163} 163}
164 164
165EOLIAN static Eina_Bool 165EOLIAN static Eina_Bool
166_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd) 166_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animated_transition_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
167{ 167{
168 return pd->animation; 168 return pd->animation;
169} 169}
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_plain.eo b/src/lib/elementary/efl_ui_spotlight_manager_plain.eo
index 3556145..fd4f5d9 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_plain.eo
+++ b/src/lib/elementary/efl_ui_spotlight_manager_plain.eo
@@ -6,7 +6,7 @@ class @beta Efl.Ui.Spotlight.Manager_Plain extends Efl.Ui.Spotlight.Manager
6 Efl.Ui.Spotlight.Manager.content_del; 6 Efl.Ui.Spotlight.Manager.content_del;
7 Efl.Ui.Spotlight.Manager.switch_to; 7 Efl.Ui.Spotlight.Manager.switch_to;
8 Efl.Ui.Spotlight.Manager.size {set;} 8 Efl.Ui.Spotlight.Manager.size {set;}
9 Efl.Ui.Spotlight.Manager.animation_enabled {set; get;} 9 Efl.Ui.Spotlight.Manager.animated_transition {set; get;}
10 Efl.Object.destructor; 10 Efl.Object.destructor;
11 } 11 }
12} 12}
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_scroll.c b/src/lib/elementary/efl_ui_spotlight_manager_scroll.c
index e7179a2..34baa3f 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_scroll.c
+++ b/src/lib/elementary/efl_ui_spotlight_manager_scroll.c
@@ -181,11 +181,13 @@ _efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_S
181 pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, 181 pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
182 evas_object_evas_get(group)); 182 evas_object_evas_get(group));
183 evas_object_static_clip_set(pd->foreclip, EINA_TRUE); 183 evas_object_static_clip_set(pd->foreclip, EINA_TRUE);
184 efl_canvas_group_member_add(spotlight, pd->foreclip);
184 185
185 pd->backclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, 186 pd->backclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
186 evas_object_evas_get(group)); 187 evas_object_evas_get(group));
187 evas_object_static_clip_set(pd->backclip, EINA_TRUE); 188 evas_object_static_clip_set(pd->backclip, EINA_TRUE);
188 efl_gfx_entity_visible_set(pd->backclip, EINA_FALSE); 189 efl_gfx_entity_visible_set(pd->backclip, EINA_FALSE);
190 efl_canvas_group_member_add(spotlight, pd->backclip);
189 191
190 for (int i = 0; i < efl_content_count(spotlight) ; ++i) { 192 for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
191 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i); 193 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
@@ -303,7 +305,7 @@ _efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_size_set(Eo *obj EINA_
303} 305}
304 306
305EOLIAN static void 307EOLIAN static void
306_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Eina_Bool animation) 308_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animated_transition_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Eina_Bool animation)
307{ 309{
308 pd->animation = animation; 310 pd->animation = animation;
309 if (pd->transition.active && !animation) 311 if (pd->transition.active && !animation)
@@ -315,7 +317,7 @@ _efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animation_enabled_set(
315} 317}
316 318
317EOLIAN static Eina_Bool 319EOLIAN static Eina_Bool
318_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd) 320_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animated_transition_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd)
319{ 321{
320 return pd->animation; 322 return pd->animation;
321} 323}
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_scroll.eo b/src/lib/elementary/efl_ui_spotlight_manager_scroll.eo
index 16ba58d..c9a8e7a 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_scroll.eo
+++ b/src/lib/elementary/efl_ui_spotlight_manager_scroll.eo
@@ -21,7 +21,7 @@ class @beta Efl.Ui.Spotlight.Manager_Scroll extends Efl.Ui.Spotlight.Manager
21 Efl.Ui.Spotlight.Manager.content_del; 21 Efl.Ui.Spotlight.Manager.content_del;
22 Efl.Ui.Spotlight.Manager.switch_to; 22 Efl.Ui.Spotlight.Manager.switch_to;
23 Efl.Ui.Spotlight.Manager.size {set;} 23 Efl.Ui.Spotlight.Manager.size {set;}
24 Efl.Ui.Spotlight.Manager.animation_enabled {set; get;} 24 Efl.Ui.Spotlight.Manager.animated_transition {set; get;}
25 Efl.Object.invalidate; 25 Efl.Object.invalidate;
26 } 26 }
27} 27}
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_stack.c b/src/lib/elementary/efl_ui_spotlight_manager_stack.c
index e93c820..3696eb9 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_stack.c
+++ b/src/lib/elementary/efl_ui_spotlight_manager_stack.c
@@ -9,9 +9,9 @@
9typedef struct { 9typedef struct {
10 Efl_Ui_Spotlight_Container * container; 10 Efl_Ui_Spotlight_Container * container;
11 Efl_Gfx_Entity *group; 11 Efl_Gfx_Entity *group;
12 Efl_Canvas_Animation_Player *hide, *show; 12 Efl_Canvas_Animation_Player *alpha_anim;
13 int from, to; 13 Efl_Gfx_Entity *content[2];
14 Efl_Gfx_Entity *content; 14 int ids[2]; //only used when in animation
15 Eina_Size2D page_size; 15 Eina_Size2D page_size;
16 Eina_Bool animation; 16 Eina_Bool animation;
17} Efl_Ui_Spotlight_Manager_Stack_Data; 17} Efl_Ui_Spotlight_Manager_Stack_Data;
@@ -21,29 +21,16 @@ typedef struct {
21static void 21static void
22_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd) 22_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd)
23{ 23{
24 Eina_Array *array = eina_array_new(2);
25 Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->group); 24 Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->group);
26 if (efl_player_playing_get(pd->hide))
27 {
28 //we are currently in animation, sync the geometry of the targets
29 eina_array_push(array, efl_animation_player_target_get(pd->hide));
30 eina_array_push(array, efl_animation_player_target_get(pd->show));
31 }
32 else
33 {
34 //we only have our content right now, or nothing
35 eina_array_push(array, pd->content);
36 }
37 Eina_Rect goal = EINA_RECT_EMPTY(); 25 Eina_Rect goal = EINA_RECT_EMPTY();
38 goal.size = pd->page_size; 26 goal.size = pd->page_size;
39 goal.y = (group_pos.y + group_pos.h/2)-pd->page_size.h/2; 27 goal.y = (group_pos.y + group_pos.h/2)-pd->page_size.h/2;
40 goal.x = (group_pos.x + group_pos.w/2)-pd->page_size.w/2; 28 goal.x = (group_pos.x + group_pos.w/2)-pd->page_size.w/2;
41 while (eina_array_count(array) > 0) 29 for (int i = 0; i < 2; ++i)
42 { 30 {
43 Efl_Gfx_Entity *subobj = eina_array_pop(array); 31 if (pd->content[i])
44 efl_gfx_entity_geometry_set(subobj, goal); 32 efl_gfx_entity_geometry_set(pd->content[i], goal);
45 } 33 }
46 eina_array_free(array);
47} 34}
48 35
49static void 36static void
@@ -66,95 +53,46 @@ _running_cb(void *data, const Efl_Event *ev EINA_UNUSED)
66 53
67 EINA_SAFETY_ON_NULL_RETURN(pd); 54 EINA_SAFETY_ON_NULL_RETURN(pd);
68 //calculate absolut position, multiply pos with 2.0 because duration is only 0.5) 55 //calculate absolut position, multiply pos with 2.0 because duration is only 0.5)
69 absolut_position = pd->from + (pd->to - pd->from)*(efl_player_playback_position_get(pd->show)*2.0); 56 absolut_position = pd->ids[0] + (pd->ids[1] - pd->ids[0])*(efl_canvas_object_animation_progress_get(ev->object));
70 efl_event_callback_call(data, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position); 57 efl_event_callback_call(data, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position);
71} 58}
72 59
73static void 60static void
74_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event) 61_hide_object_cb(void *data, const Efl_Event *ev)
75{ 62{
76 Efl_Canvas_Object *content; 63 if (!ev->info)
77 64 {
78 content = efl_animation_player_target_get(event->object); 65 efl_gfx_entity_visible_set(ev->object, EINA_FALSE);
79 efl_gfx_entity_visible_set(content, EINA_TRUE); 66 efl_event_callback_del(ev->object, ev->desc, _hide_object_cb, data);
80} 67 efl_event_callback_del(ev->object, EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _running_cb, data);
81 68 }
82static void
83_hide_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED)
84{
85 Efl_Ui_Spotlight_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
86 Efl_Canvas_Object *content;
87
88 EINA_SAFETY_ON_NULL_RETURN(pd);
89 content = efl_animation_player_target_get(pd->hide);
90 efl_gfx_entity_visible_set(content, EINA_FALSE);
91}
92
93static void
94_show_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED)
95{
96 Efl_Ui_Spotlight_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
97 Efl_Canvas_Object *content;
98
99 EINA_SAFETY_ON_NULL_RETURN(pd);
100 content = efl_animation_player_target_get(pd->show);
101 efl_gfx_entity_visible_set(content, EINA_TRUE);
102 pd->content = content;
103} 69}
104 70
105EFL_CALLBACKS_ARRAY_DEFINE(_anim_show_event_cb,
106 {EFL_ANIMATION_PLAYER_EVENT_RUNNING, _running_cb},
107 {EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb},
108 {EFL_ANIMATION_PLAYER_EVENT_ENDED, _show_anim_ended_cb},
109)
110
111EFL_CALLBACKS_ARRAY_DEFINE(_anim_hide_event_cb,
112 {EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb},
113 {EFL_ANIMATION_PLAYER_EVENT_ENDED, _hide_anim_ended_cb},
114)
115
116EOLIAN static void 71EOLIAN static void
117_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group) 72_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group)
118{ 73{
119 if (spotlight && group) 74 if (spotlight && group)
120 { 75 {
121 Efl_Canvas_Animation_Alpha *show_anim, *hide_anim;
122 pd->container = spotlight; 76 pd->container = spotlight;
123 pd->group = group; 77 pd->group = group;
124 78
125 efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj); 79 efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
126 efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj); 80 efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
127 81
128 show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, obj); 82 pd->alpha_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, obj);
129 efl_animation_alpha_set(show_anim, 0.0, 1.0); 83 efl_animation_alpha_set(pd->alpha_anim, 0.0, 1.0);
130 efl_animation_duration_set(show_anim, 0.5); 84 efl_animation_duration_set(pd->alpha_anim, 0.5);
131 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 85 efl_animation_final_state_keep_set(pd->alpha_anim, EINA_TRUE);
132
133 pd->show = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, obj);
134 efl_animation_player_animation_set(pd->show, show_anim);
135 efl_player_playing_set(pd->show, EINA_FALSE);
136 efl_event_callback_array_add(pd->show, _anim_show_event_cb(), obj);
137
138 //Default Hide Animation
139 hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, obj);
140 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
141 efl_animation_duration_set(hide_anim, 0.5);
142 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
143
144 pd->hide = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, obj);
145 efl_animation_player_animation_set(pd->hide, hide_anim);
146 efl_player_playing_set(pd->hide, EINA_FALSE);
147 efl_event_callback_array_add(pd->hide, _anim_hide_event_cb(), obj);
148 86
149 for (int i = 0; i < efl_content_count(spotlight) ; ++i) { 87 for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
150 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i); 88 Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
151 efl_canvas_group_member_add(pd->group, elem); 89 efl_canvas_group_member_add(pd->container, elem);
152 efl_gfx_entity_visible_set(elem, EINA_FALSE); 90 efl_gfx_entity_visible_set(elem, EINA_FALSE);
153 } 91 }
154 if (efl_ui_spotlight_active_element_get(spotlight)) 92 if (efl_ui_spotlight_active_element_get(spotlight))
155 { 93 {
156 pd->content = efl_ui_spotlight_active_element_get(spotlight); 94 pd->content[0] = efl_ui_spotlight_active_element_get(spotlight);
157 efl_gfx_entity_visible_set(pd->content, EINA_TRUE); 95 efl_gfx_entity_visible_set(pd->content[0], EINA_TRUE);
158 _geom_sync(obj, pd); 96 _geom_sync(obj, pd);
159 } 97 }
160 } 98 }
@@ -163,22 +101,14 @@ _efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Sp
163EOLIAN static void 101EOLIAN static void
164_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED) 102_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
165{ 103{
166 efl_canvas_group_member_add(pd->group, subobj); 104 efl_canvas_group_member_add(pd->container, subobj);
167 efl_gfx_entity_visible_set(subobj, EINA_FALSE); 105 efl_gfx_entity_visible_set(subobj, EINA_FALSE);
168} 106}
169 107
170EOLIAN static void 108EOLIAN static void
171_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED) 109_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
172{ 110{
173 efl_canvas_group_member_remove(pd->group, subobj); 111 efl_canvas_group_member_remove(pd->container, subobj);
174}
175
176static void
177_setup_anim(Efl_Animation_Player *player, Efl_Gfx_Entity *entity)
178{
179 efl_player_playing_set(player, EINA_FALSE);
180 efl_animation_player_target_set(player, entity);
181 efl_player_playing_set(player, EINA_TRUE);
182} 112}
183 113
184static Eina_Bool 114static Eina_Bool
@@ -193,33 +123,35 @@ is_valid(Eo *obj, int index)
193EOLIAN static void 123EOLIAN static void
194_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, int from, int to) 124_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, int from, int to)
195{ 125{
196 if (efl_pack_content_get(pd->container, to) == pd->content) 126 if (efl_pack_content_get(pd->container, to) == pd->content[1])
197 return; 127 return;
198 128
199 if (is_valid(pd->container, to) && is_valid(pd->container, from)) 129 if (is_valid(pd->container, to) && is_valid(pd->container, from))
200 { 130 {
201 if (pd->animation) 131 int tmp[2] = {from, to};
132
133 for (int i = 0; i < 2; ++i)
202 { 134 {
203 pd->from = from; 135 pd->ids[i] = tmp[i];
204 pd->to = to; 136 pd->content[i] = efl_pack_content_get(pd->container, pd->ids[i]);
205 pd->content = NULL; 137 if (pd->animation)
206 _setup_anim(pd->hide, efl_pack_content_get(pd->container, from)); 138 efl_canvas_object_animation_start(pd->content[i], pd->alpha_anim, -1.0+2.0*i, 0.0);
207 _setup_anim(pd->show, efl_pack_content_get(pd->container, to)); 139 efl_gfx_entity_visible_set(pd->content[i], EINA_TRUE);
208 } 140 }
209 else 141 if (pd->animation)
210 { 142 {
211 efl_gfx_entity_visible_set(efl_pack_content_get(pd->container, from), EINA_FALSE); 143 efl_event_callback_add(pd->content[0], EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _hide_object_cb, obj);
212 pd->content = efl_pack_content_get(pd->container, to); 144 efl_event_callback_add(pd->content[0], EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _running_cb, obj);
213 efl_gfx_entity_visible_set(pd->content, EINA_TRUE);
214 } 145 }
215 } 146 }
216 else 147 else
217 { 148 {
218 double pos = to; 149 double pos = to;
219 150
220 pd->content = efl_pack_content_get(pd->container, to); 151 pd->content[0] = efl_pack_content_get(pd->container, to);
221 efl_gfx_entity_visible_set(pd->content, EINA_TRUE); 152 efl_gfx_entity_visible_set(pd->content[0], EINA_TRUE);
222 efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &pos); 153 efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &pos);
154 pd->content[1] = NULL;
223 } 155 }
224 156
225 _geom_sync(obj, pd); 157 _geom_sync(obj, pd);
@@ -250,27 +182,19 @@ _efl_ui_spotlight_manager_stack_efl_object_invalidate(Eo *obj, Efl_Ui_Spotlight_
250 } 182 }
251} 183}
252 184
253static void
254_reset_player(Efl_Animation_Player *player, Eina_Bool vis)
255{
256 Efl_Gfx_Entity *obj;
257
258 obj = efl_animation_player_target_get(player);
259 efl_player_playing_set(player, EINA_FALSE);
260 efl_animation_player_target_set(player, NULL);
261 efl_gfx_entity_visible_set(obj, vis);
262}
263
264EOLIAN static void 185EOLIAN static void
265_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Eina_Bool animation) 186_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animated_transition_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Eina_Bool animation)
266{ 187{
267 _reset_player(pd->hide, EINA_FALSE); 188 for (int i = 0; i < 2; ++i)
268 _reset_player(pd->show, EINA_TRUE); 189 {
190 if (pd->content[i])
191 efl_canvas_object_animation_stop(pd->content[i]);
192 }
269 pd->animation = animation; 193 pd->animation = animation;
270} 194}
271 195
272EOLIAN static Eina_Bool 196EOLIAN static Eina_Bool
273_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd) 197_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animated_transition_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd)
274{ 198{
275 return pd->animation; 199 return pd->animation;
276} 200}
diff --git a/src/lib/elementary/efl_ui_spotlight_manager_stack.eo b/src/lib/elementary/efl_ui_spotlight_manager_stack.eo
index c18fe31..2275eb8 100644
--- a/src/lib/elementary/efl_ui_spotlight_manager_stack.eo
+++ b/src/lib/elementary/efl_ui_spotlight_manager_stack.eo
@@ -6,7 +6,7 @@ class @beta Efl.Ui.Spotlight.Manager_Stack extends Efl.Ui.Spotlight.Manager
6 Efl.Ui.Spotlight.Manager.content_del; 6 Efl.Ui.Spotlight.Manager.content_del;
7 Efl.Ui.Spotlight.Manager.switch_to; 7 Efl.Ui.Spotlight.Manager.switch_to;
8 Efl.Ui.Spotlight.Manager.size {set;} 8 Efl.Ui.Spotlight.Manager.size {set;}
9 Efl.Ui.Spotlight.Manager.animation_enabled {set; get;} 9 Efl.Ui.Spotlight.Manager.animated_transition {set; get;}
10 Efl.Object.invalidate; 10 Efl.Object.invalidate;
11 } 11 }
12} 12}
diff --git a/src/lib/elementary/efl_ui_table_static.eo b/src/lib/elementary/efl_ui_table_static.eo
index c459dcb..461d7dc 100644
--- a/src/lib/elementary/efl_ui_table_static.eo
+++ b/src/lib/elementary/efl_ui_table_static.eo
@@ -1,6 +1,12 @@
1class @beta Efl.Ui.Table_Static extends Efl.Ui.Table 1class @beta Efl.Ui.Table_Static extends Efl.Ui.Table
2{ 2{
3 [[Efl UI table static class]] 3 [[Widget container that arranges its elements in a uniform grid.
4
5 For convenience, the grid has an initial size of 100 by 100 cells, so all positions and
6 sizes can be interpreted as percentages.
7 Cells are always shown with the same size, regardless of their content. Therefore, adding
8 content to one cell does not affect other cells.
9 ]]
4 data: null; 10 data: null;
5 implements { 11 implements {
6 Efl.Object.constructor; 12 Efl.Object.constructor;
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index a57ca7e..caf84c2 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -15,7 +15,6 @@
15 15
16#include "elm_entry_common.h" 16#include "elm_entry_common.h"
17#include "elm_widget_entry.h" 17#include "elm_widget_entry.h"
18#include "efl_ui_text.eo.h"
19#include "elm_hoversel_eo.h" 18#include "elm_hoversel_eo.h"
20#include "efl_ui_text_part.eo.h" 19#include "efl_ui_text_part.eo.h"
21#include "elm_part_helper.h" 20#include "elm_part_helper.h"
@@ -73,11 +72,11 @@ struct _Efl_Ui_Text_Data
73 int cursor_pos; 72 int cursor_pos;
74 Elm_Scroller_Policy policy_h, policy_v; 73 Elm_Scroller_Policy policy_h, policy_v;
75 Elm_Wrap_Type line_wrap; 74 Elm_Wrap_Type line_wrap;
76 Elm_Input_Panel_Layout input_panel_layout; 75 Efl_Ui_Input_Panel_Layout input_panel_layout;
77 Elm_Autocapital_Type autocapital_type; 76 Efl_Ui_Autocapital_Type autocapital_type;
78 Elm_Input_Panel_Lang input_panel_lang; 77 Efl_Ui_Input_Panel_Language_Type input_panel_lang;
79 Elm_Input_Panel_Return_Key_Type input_panel_return_key_type; 78 Efl_Ui_Input_Panel_Return_Key_Type input_panel_return_key_type;
80 Elm_Input_Hints input_hints; 79 Efl_Ui_Input_Hints input_hints;
81 Efl_Text_Cursor_Cursor *sel_handler_cursor; 80 Efl_Text_Cursor_Cursor *sel_handler_cursor;
82 void *input_panel_imdata; 81 void *input_panel_imdata;
83 int input_panel_imdata_len; 82 int input_panel_imdata_len;
@@ -390,7 +389,7 @@ _validate(Evas_Object *obj)
390{ 389{
391 EFL_UI_TEXT_DATA_GET(obj, sd); 390 EFL_UI_TEXT_DATA_GET(obj, sd);
392 Eina_Bool res; 391 Eina_Bool res;
393 Elm_Validate_Content vc; 392 Efl_Ui_Validate_Content_Info vc;
394 Eina_Strbuf *buf; 393 Eina_Strbuf *buf;
395 394
396 if (sd->validators == 0) return; 395 if (sd->validators == 0) return;
@@ -2496,7 +2495,7 @@ _efl_ui_text_context_menu_clear(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2496} 2495}
2497 2496
2498EOLIAN static void 2497EOLIAN static void
2499_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data) 2498_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *label, const char *icon_file, Efl_Ui_Icon_Type icon_type, Context_Item_Clicked_Cb func, const void *data)
2500{ 2499{
2501 Elm_Entry_Context_Menu_Item *it; 2500 Elm_Entry_Context_Menu_Item *it;
2502 2501
@@ -2507,7 +2506,7 @@ _efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *la
2507 it->obj = obj; 2506 it->obj = obj;
2508 it->label = eina_stringshare_add(label); 2507 it->label = eina_stringshare_add(label);
2509 it->icon_file = eina_stringshare_add(icon_file); 2508 it->icon_file = eina_stringshare_add(icon_file);
2510 it->icon_type = icon_type; 2509 it->icon_type = (Elm_Icon_Type)icon_type;
2511 it->func = func; 2510 it->func = func;
2512 it->data = (void *)data; 2511 it->data = (void *)data;
2513} 2512}
@@ -2630,20 +2629,20 @@ _efl_ui_text_scrollable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2630} 2629}
2631 2630
2632EOLIAN static void 2631EOLIAN static void
2633_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Layout layout) 2632_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Layout layout)
2634{ 2633{
2635 sd->input_panel_layout = layout; 2634 sd->input_panel_layout = layout;
2636 2635
2637 edje_object_part_text_input_panel_layout_set 2636 edje_object_part_text_input_panel_layout_set
2638 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Layout)layout); 2637 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Layout)layout);
2639 2638
2640 if (layout == ELM_INPUT_PANEL_LAYOUT_PASSWORD) 2639 if (layout == EFL_UI_INPUT_PANEL_LAYOUT_PASSWORD)
2641 efl_ui_text_input_hint_set(obj, ((sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA)); 2640 efl_ui_text_input_hint_set(obj, ((sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
2642 else if (layout == ELM_INPUT_PANEL_LAYOUT_TERMINAL) 2641 else if (layout == EFL_UI_INPUT_PANEL_LAYOUT_TERMINAL)
2643 efl_ui_text_input_hint_set(obj, (sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE)); 2642 efl_ui_text_input_hint_set(obj, (sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE));
2644} 2643}
2645 2644
2646EOLIAN static Elm_Input_Panel_Layout 2645EOLIAN static Efl_Ui_Input_Panel_Layout
2647_efl_ui_text_input_panel_layout_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) 2646_efl_ui_text_input_panel_layout_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2648{ 2647{
2649 return sd->input_panel_layout; 2648 return sd->input_panel_layout;
@@ -2665,14 +2664,14 @@ _efl_ui_text_input_panel_layout_variation_get(const Eo *obj EINA_UNUSED, Efl_Ui_
2665} 2664}
2666 2665
2667EOLIAN static void 2666EOLIAN static void
2668_efl_ui_text_autocapital_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Autocapital_Type autocapital_type) 2667_efl_ui_text_autocapital_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Autocapital_Type autocapital_type)
2669{ 2668{
2670 sd->autocapital_type = autocapital_type; 2669 sd->autocapital_type = autocapital_type;
2671 edje_object_part_text_autocapital_type_set 2670 edje_object_part_text_autocapital_type_set
2672 (sd->entry_edje, "efl.text", (Edje_Text_Autocapital_Type)autocapital_type); 2671 (sd->entry_edje, "efl.text", (Edje_Text_Autocapital_Type)autocapital_type);
2673} 2672}
2674 2673
2675EOLIAN static Elm_Autocapital_Type 2674EOLIAN static Efl_Ui_Autocapital_Type
2676_efl_ui_text_autocapital_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) 2675_efl_ui_text_autocapital_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2677{ 2676{
2678 return sd->autocapital_type; 2677 return sd->autocapital_type;
@@ -2693,7 +2692,7 @@ _efl_ui_text_prediction_allow_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *s
2693} 2692}
2694 2693
2695EOLIAN static void 2694EOLIAN static void
2696_efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Hints hints) 2695_efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Hints hints)
2697{ 2696{
2698 sd->input_hints = hints; 2697 sd->input_hints = hints;
2699 2698
@@ -2701,7 +2700,7 @@ _efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input
2701 (sd->entry_edje, "efl.text", (Edje_Input_Hints)hints); 2700 (sd->entry_edje, "efl.text", (Edje_Input_Hints)hints);
2702} 2701}
2703 2702
2704EOLIAN static Elm_Input_Hints 2703EOLIAN static Efl_Ui_Input_Hints
2705_efl_ui_text_input_hint_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) 2704_efl_ui_text_input_hint_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2706{ 2705{
2707 return sd->input_hints; 2706 return sd->input_hints;
@@ -2735,14 +2734,14 @@ _efl_ui_text_input_panel_hide(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2735} 2734}
2736 2735
2737EOLIAN static void 2736EOLIAN static void
2738_efl_ui_text_input_panel_language_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Lang lang) 2737_efl_ui_text_input_panel_language_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Language_Type lang)
2739{ 2738{
2740 sd->input_panel_lang = lang; 2739 sd->input_panel_lang = lang;
2741 edje_object_part_text_input_panel_language_set 2740 edje_object_part_text_input_panel_language_set
2742 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Lang)lang); 2741 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Lang)lang);
2743} 2742}
2744 2743
2745EOLIAN static Elm_Input_Panel_Lang 2744EOLIAN static Efl_Ui_Input_Panel_Language_Type
2746_efl_ui_text_input_panel_language_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) 2745_efl_ui_text_input_panel_language_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2747{ 2746{
2748 return sd->input_panel_lang; 2747 return sd->input_panel_lang;
@@ -2770,7 +2769,7 @@ _efl_ui_text_input_panel_imdata_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data
2770} 2769}
2771 2770
2772EOLIAN static void 2771EOLIAN static void
2773_efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Return_Key_Type return_key_type) 2772_efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Return_Key_Type return_key_type)
2774{ 2773{
2775 sd->input_panel_return_key_type = return_key_type; 2774 sd->input_panel_return_key_type = return_key_type;
2776 2775
@@ -2778,7 +2777,7 @@ _efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Da
2778 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Return_Key_Type)return_key_type); 2777 (sd->entry_edje, "efl.text", (Edje_Input_Panel_Return_Key_Type)return_key_type);
2779} 2778}
2780 2779
2781EOLIAN static Elm_Input_Panel_Return_Key_Type 2780EOLIAN static Efl_Ui_Input_Panel_Return_Key_Type
2782_efl_ui_text_input_panel_return_key_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) 2781_efl_ui_text_input_panel_return_key_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
2783{ 2782{
2784 return sd->input_panel_return_key_type; 2783 return sd->input_panel_return_key_type;
@@ -3389,13 +3388,6 @@ _efl_ui_text_efl_access_object_i18n_name_get(const Eo *obj, Efl_Ui_Text_Data *pd
3389 return ret; 3388 return ret;
3390} 3389}
3391 3390
3392EOLIAN static Efl_Text_Cursor_Cursor *
3393_efl_ui_text_cursor_new(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd EINA_UNUSED)
3394{
3395 Eo *text_obj = sd->text_obj;
3396 return efl_text_cursor_new(text_obj);
3397}
3398
3399static void 3391static void
3400_edje_signal_emit(Efl_Ui_Text_Data *sd, const char *sig, const char *src) 3392_edje_signal_emit(Efl_Ui_Text_Data *sd, const char *sig, const char *src)
3401{ 3393{
diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo
index 2118bab..e718d42 100644
--- a/src/lib/elementary/efl_ui_text.eo
+++ b/src/lib/elementary/efl_ui_text.eo
@@ -1,11 +1,92 @@
1/* FIXME - Text object must stop using elm_general! */ 1/* FIXME - Text object must stop using Context_Item_Clicked_Cb! */
2import elm_general; 2/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
3type @beta @extern Context_Item_Clicked_Cb: __undefined_type; [[Evas smart callback type]]
4
5struct @beta Efl.Ui.Validate_Content_Info
6{
7 [[Validate content information.]]
8 text: string; [[Validate content text]]
9 signal: string; [[Validate content signal]]
10}
11
12enum @beta Efl.Ui.Autocapital_Type
13{
14 [[Autocapitalization Types.
15 Choose method of auto-capitalization.
16 ]]
17 none, [[No auto-capitalization when typing.]]
18 word, [[Autocapitalize each word typed.]]
19 sentence, [[Autocapitalize the start of each sentence.]]
20 allcharacter [[Autocapitalize all letters.]]
21}
22
23enum @beta Efl.Ui.Input_Panel_Language_Type
24{
25 [[Input panel (virtual keyboard) language modes.
26 ]]
27 automatic, [[Automatic]]
28 alphabet [[Alphabet]]
29}
30
31
32enum @beta Efl.Ui.Input_Hints
33{
34 [[Enumeration that defines the types of Input Hints.]]
35 none = 0, [[No active hints.]]
36 auto_complete = 1 << 0, [[Suggest word auto completion.]]
37 sensitive_data = 1 << 1, [[Typed text should not be stored.]]
38}
39
40
41enum @beta Efl.Ui.Input_Panel_Layout
42{
43 [[Input panel (virtual keyboard) layout types.
44 Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired.
45 ]]
46 normal, [[Default layout.]]
47 number, [[Number layout.]]
48 email, [[Email layout.]]
49 url, [[URL layout.]]
50 phonenumber, [[Phone Number layout.]]
51 ip, [[IP layout.]]
52 month, [[Month layout.]]
53 numberonly, [[Number Only layout.]]
54 invalid, [[Never use this.]]
55 hex, [[Hexadecimal layout.]]
56 terminal, [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]]
57 password, [[Like normal, but no auto-correct, no auto-capitalization etc.]]
58 datetime, [[Date and time layout.]]
59 emoticon, [[Emoticon layout.]]
60 voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]]
61}
62
63enum @beta Efl.Ui.Input_Panel_Return_Key_Type
64{
65 [["Return" Key types on the input panel (virtual keyboard).
66 ]]
67 default, [[Default.]]
68 done, [[Done.]]
69 go, [[Go.]]
70 join, [[Join.]]
71 login, [[Login.]]
72 next, [[Next.]]
73 search, [[Search string or magnifier icon.]]
74 send, [[Send.]]
75 signin [[Sign-in.]]
76}
77enum @beta Efl.Ui.Icon_Type
78{
79 [[Icon types.]]
80 none, [[Icon has no type set.]]
81 file, [[Icon is of type file.]]
82 standard [[Icon is of type standard.]]
83}
3 84
4class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickable, 85class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickable,
5 Efl.Access.Text, Efl.Access.Editable.Text, Efl.File, 86 Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
6 Efl.Ui.Text_Selectable 87 Efl.Ui.Text_Selectable
7 composites 88 composites
8 Efl.Text_Interactive, Efl.Text_Markup 89 Efl.Text_Interactive, Efl.Text_Markup, Efl.Text_Cursor
9{ 90{
10 [[A flexible text widget which can be static (as a label) or editable by 91 [[A flexible text widget which can be static (as a label) or editable by
11 the user (as a text entry). It provides all sorts of editing facilities 92 the user (as a text entry). It provides all sorts of editing facilities
@@ -73,7 +154,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
73 get { 154 get {
74 } 155 }
75 values { 156 values {
76 lang: Elm.Input.Panel.Lang; [[Language to be set to the input panel.]] 157 lang: Efl.Ui.Input_Panel_Language_Type; [[Language to be set to the input panel.]]
77 } 158 }
78 } 159 }
79 @property selection_handler_disabled { 160 @property selection_handler_disabled {
@@ -104,7 +185,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
104 get { 185 get {
105 } 186 }
106 values { 187 values {
107 autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]] 188 autocapital_type: Efl.Ui.Autocapital_Type; [[The type of autocapitalization.]]
108 } 189 }
109 } 190 }
110 @property password_mode { 191 @property password_mode {
@@ -149,7 +230,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
149 get { 230 get {
150 } 231 }
151 values { 232 values {
152 hints: Elm.Input.Hints; [[Input hint.]] 233 hints: Efl.Ui.Input_Hints; [[Input hint.]]
153 } 234 }
154 } 235 }
155 @property input_panel_layout { 236 @property input_panel_layout {
@@ -159,7 +240,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
159 get { 240 get {
160 } 241 }
161 values { 242 values {
162 layout: Elm.Input.Panel.Layout(Elm.Input.Panel.Layout.invalid); [[Layout type.]] 243 layout: Efl.Ui.Input_Panel_Layout(Efl.Ui.Input_Panel_Layout.invalid); [[Layout type.]]
163 } 244 }
164 } 245 }
165 @property input_panel_return_key_type { 246 @property input_panel_return_key_type {
@@ -172,7 +253,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
172 get { 253 get {
173 } 254 }
174 values { 255 values {
175 return_key_type: Elm.Input.Panel.Return_Key.Type; [[The type of "return" key on the input panel.]] 256 return_key_type: Efl.Ui.Input_Panel_Return_Key_Type; [[The type of "return" key on the input panel.]]
176 } 257 }
177 } 258 }
178 @property input_panel_enabled { 259 @property input_panel_enabled {
@@ -274,15 +355,11 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
274 params { 355 params {
275 @in label: string @optional; [[The item's text label.]] 356 @in label: string @optional; [[The item's text label.]]
276 @in icon_file: string @optional; [[The item's icon file.]] 357 @in icon_file: string @optional; [[The item's icon file.]]
277 @in icon_type: Elm.Icon.Type; [[The item's icon type.]] 358 @in icon_type: Efl.Ui.Icon_Type; [[The item's icon type.]]
278 @in func: Evas_Smart_Cb @optional; [[The callback to execute when the item is clicked.]] 359 @in func: Context_Item_Clicked_Cb @optional; [[The callback to execute when the item is clicked.]]
279 @in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]] 360 @in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]]
280 } 361 }
281 } 362 }
282 cursor_new {
283 [[Creates and returns a new cursor for the text.]]
284 return: ptr(Efl.Text_Cursor_Cursor); [[Text cursor]]
285 }
286 } 363 }
287 implements { 364 implements {
288 Efl.Object.constructor; 365 Efl.Object.constructor;
@@ -339,18 +416,19 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
339 /* can be $NULL, tag nullable once Eolian supports it */ 416 /* can be $NULL, tag nullable once Eolian supports it */
340 changed,user: Efl.Ui.Text_Change_Info; 417 changed,user: Efl.Ui.Text_Change_Info;
341 [[The text object has changed due to user interaction]] 418 [[The text object has changed due to user interaction]]
342 validate: Elm.Validate_Content; [[Called when validating]] 419 validate: Efl.Ui.Validate_Content_Info; [[Called when validating]]
343 context,open: void; [[Called when context menu was opened]] 420 context,open: void; [[Called when context menu was opened]]
344 preedit,changed: void; [[Called when entry preedit changed]] 421 preedit,changed: void; [[Called when entry preedit changed]]
345 press: void; [[Called when entry pressed]] 422 press: void; [[Called when entry pressed]]
346 redo,request: void; [[Called when redo is requested]] 423 redo,request: void; [[Called when redo is requested]]
347 undo,request: void; [[Called when undo is requested]] 424 undo,request: void; [[Called when undo is requested]]
348 aborted: void; [[Called when entry is aborted]] 425 aborted: void; [[Called when entry is aborted]]
349 anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]] 426 // FIXME: efl_ui_text doesn't support anchor callbacks yet.
350 anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]] 427 //anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]]
351 anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]] 428 //anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]]
352 anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]] 429 //anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]]
353 anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]] 430 //anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]]
431 //anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]]
354 cursor,changed,manual: void; [[Called on manual cursor change]] 432 cursor,changed,manual: void; [[Called on manual cursor change]]
355 } 433 }
356} 434}
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index d98ee78..96cecc6 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -21,10 +21,6 @@
21#include "elm_part_helper.h" 21#include "elm_part_helper.h"
22#include "elm_widget_combobox.h" 22#include "elm_widget_combobox.h"
23 23
24/* FIXME: remove this when we don't rely on evas event structs anymore */
25#define EFL_INTERNAL_UNSTABLE
26#include "interfaces/efl_common_internal.h"
27
28#define MY_CLASS EFL_UI_WIDGET_CLASS 24#define MY_CLASS EFL_UI_WIDGET_CLASS
29 25
30#define MY_CLASS_NAME "Efl_Ui_Widget" 26#define MY_CLASS_NAME "Efl_Ui_Widget"
@@ -1732,7 +1728,7 @@ elm_widget_tree_unfocusable_set(Eo *obj, Eina_Bool tree_unfocusable)
1732 Efl_Ui_Widget *subs; 1728 Efl_Ui_Widget *subs;
1733 Eina_List *n; 1729 Eina_List *n;
1734 Elm_Widget_Smart_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS); 1730 Elm_Widget_Smart_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS);
1735 if (!pd) return; 1731 EINA_SAFETY_ON_NULL_RETURN(pd);
1736 int distance, parent_counter = (pd->parent_obj ? _tree_unfocusable_counter_get(pd->parent_obj) : 0); 1732 int distance, parent_counter = (pd->parent_obj ? _tree_unfocusable_counter_get(pd->parent_obj) : 0);
1737 1733
1738 if (tree_unfocusable) 1734 if (tree_unfocusable)
@@ -1772,7 +1768,7 @@ EAPI Eina_Bool
1772elm_widget_tree_unfocusable_get(const Eo *obj) 1768elm_widget_tree_unfocusable_get(const Eo *obj)
1773{ 1769{
1774 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 1770 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
1775 if (!sd) return EINA_FALSE; 1771 EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
1776 1772
1777 return !!sd->tree_unfocusable; 1773 return !!sd->tree_unfocusable;
1778} 1774}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 36ec921..e6fb019 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -26,9 +26,6 @@
26 26
27#include "../evas/canvas/evas_box_eo.h" 27#include "../evas/canvas/evas_box_eo.h"
28 28
29#define EFL_INTERNAL_UNSTABLE
30#include "interfaces/efl_common_internal.h"
31
32#include "elm_part_helper.h" 29#include "elm_part_helper.h"
33#include "efl_ui_win_part.eo.h" 30#include "efl_ui_win_part.eo.h"
34#include "elm_plug_eo.h" 31#include "elm_plug_eo.h"
@@ -8887,7 +8884,6 @@ _elm_win_legacy_init(Efl_Ui_Win_Data *sd)
8887 else 8884 else
8888 edje_object_part_swallow(sd->legacy.edje, "efl.contents", sd->legacy.box); 8885 edje_object_part_swallow(sd->legacy.edje, "efl.contents", sd->legacy.box);
8889 8886
8890 evas_object_geometry_set(sd->legacy.edje, 0, 0, 1, 1);
8891 if (sd->type != EFL_UI_WIN_TYPE_FAKE) 8887 if (sd->type != EFL_UI_WIN_TYPE_FAKE)
8892 { 8888 {
8893 edje_object_update_hints_set(sd->legacy.edje, EINA_TRUE); 8889 edje_object_update_hints_set(sd->legacy.edje, EINA_TRUE);
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index 58a7bfc..10368cb 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -512,9 +512,9 @@ _elm_naviframe_item_elm_widget_item_part_text_set(Eo *eo_it,
512 if (_elm_config->access_mode) 512 if (_elm_config->access_mode)
513 _access_obj_process(nit, EINA_TRUE); 513 _access_obj_process(nit, EINA_TRUE);
514 514
515 memset(buf, 0x0, sizeof(buf)); 515 buf[0] = 0;
516 if (nit->title_label) 516 if (nit->title_label)
517 strncat(buf, nit->title_label, sizeof(buf) - 1); 517 strncpy(buf, nit->title_label, sizeof(buf) - 1);
518 if (nit->subtitle_label) 518 if (nit->subtitle_label)
519 { 519 {
520 if ((nit->title_label) && (strlen(buf) < (sizeof(buf) - 2))) 520 if ((nit->title_label) && (strlen(buf) < (sizeof(buf) - 2)))
diff --git a/src/lib/elementary/elm_code_file.c b/src/lib/elementary/elm_code_file.c
index c5d429f..07e2f92 100644
--- a/src/lib/elementary/elm_code_file.c
+++ b/src/lib/elementary/elm_code_file.c
@@ -185,18 +185,17 @@ EAPI void elm_code_file_save(Elm_Code_File *file)
185 tmp = _elm_code_file_tmp_path_get(file); 185 tmp = _elm_code_file_tmp_path_get(file);
186 crchars = elm_code_file_line_ending_chars_get(file, &crlength); 186 crchars = elm_code_file_line_ending_chars_get(file, &crlength);
187 187
188 if (stat(path, &st) != -1)
189 {
190 mode = st.st_mode;
191 have_mode = EINA_TRUE;
192 }
193
194 out = fopen(tmp, "w"); 188 out = fopen(tmp, "w");
195 if (out == NULL) 189 if (out == NULL)
196 { 190 {
197 free(tmp); 191 free(tmp);
198 return; 192 return;
199 } 193 }
194 if (fstat(fileno(out), &st) != -1)
195 {
196 mode = st.st_mode;
197 have_mode = EINA_TRUE;
198 }
200 199
201 EINA_LIST_FOREACH(file->lines, item, line_item) 200 EINA_LIST_FOREACH(file->lines, item, line_item)
202 { 201 {
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index fc9b0d5..476eb15 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -809,9 +809,11 @@ _elm_config_profile_derived_save(const char *profile, Elm_Config_Derived *derive
809 eet_close(ef); 809 eet_close(ef);
810 if (ret) 810 if (ret)
811 { 811 {
812 if (!ecore_file_cp(buf, buf2)) 812 if (!ecore_file_mv(buf, buf2))
813 ERR("Error saving Elementary's derived configuration profile file"); 813 {
814 ecore_file_unlink(buf); 814 ERR("Error saving Elementary's derived configuration profile file");
815 ecore_file_unlink(buf);
816 }
815 } 817 }
816 else 818 else
817 { 819 {
@@ -2155,15 +2157,13 @@ _elm_config_profile_save(const char *profile)
2155 goto err; 2157 goto err;
2156 } 2158 }
2157 2159
2158 ret = ecore_file_cp(buf2, buf); 2160 ret = ecore_file_mv(buf2, buf);
2159 if (!ret) 2161 if (!ret)
2160 { 2162 {
2161 ERR("Error saving Elementary's configuration profile file"); 2163 ERR("Error saving Elementary's configuration profile file");
2162 goto err; 2164 goto err;
2163 } 2165 }
2164 2166
2165 ecore_file_unlink(buf2);
2166
2167 derived = _elm_config_derived_load(profile ? profile : _elm_profile); 2167 derived = _elm_config_derived_load(profile ? profile : _elm_profile);
2168 if (derived) 2168 if (derived)
2169 { 2169 {
@@ -2248,14 +2248,13 @@ _elm_config_save(Elm_Config *cfg, const char *profile)
2248 goto err; 2248 goto err;
2249 } 2249 }
2250 2250
2251 ret = ecore_file_cp(buf2, buf); 2251 ret = ecore_file_mv(buf2, buf);
2252 if (!ret) 2252 if (!ret)
2253 { 2253 {
2254 ERR("Error saving Elementary's configuration file"); 2254 ERR("Error saving Elementary's configuration file");
2255 goto err; 2255 goto err;
2256 } 2256 }
2257 2257
2258 ecore_file_unlink(buf2);
2259 return EINA_TRUE; 2258 return EINA_TRUE;
2260 2259
2261err: 2260err:
@@ -4876,16 +4875,6 @@ static const struct {
4876}; 4875};
4877 4876
4878static const struct { 4877static const struct {
4879 Efl_Ui_Slider_Indicator_Visible_Mode val;
4880 const char *str;
4881} _enum_map_slider_indicator_visible_mode[] = {
4882{ EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_ON_DRAG, "on_drag" },
4883{ EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS, "always" },
4884{ EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS, "on_focus" },
4885{ EFL_UI_SLIDER_INDICATOR_VISIBLE_MODE_NONE, "none" },
4886};
4887
4888static const struct {
4889 Efl_Ui_Focus_Move_Policy val; 4878 Efl_Ui_Focus_Move_Policy val;
4890 const char *str; 4879 const char *str;
4891} _enum_map_focus_move_policy[] = { 4880} _enum_map_focus_move_policy[] = {
@@ -4994,7 +4983,6 @@ _efl_config_global_efl_config_config_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNU
4994 CONFIG_SETD(scroll_thumbscroll_momentum_animation_duration_max_limit); 4983 CONFIG_SETD(scroll_thumbscroll_momentum_animation_duration_max_limit);
4995 4984
4996 CONFIG_SETE(focus_autoscroll_mode); 4985 CONFIG_SETE(focus_autoscroll_mode);
4997 CONFIG_SETE(slider_indicator_visible_mode);
4998 CONFIG_SETD(longpress_timeout); 4986 CONFIG_SETD(longpress_timeout);
4999 CONFIG_SETE(softcursor_mode); 4987 CONFIG_SETE(softcursor_mode);
5000 CONFIG_SETD(tooltip_delay); 4988 CONFIG_SETD(tooltip_delay);
@@ -5138,7 +5126,6 @@ _efl_config_global_efl_config_config_get(const Eo *obj EINA_UNUSED, void *_pd EI
5138 CONFIG_GETD(scroll_thumbscroll_momentum_animation_duration_max_limit); 5126 CONFIG_GETD(scroll_thumbscroll_momentum_animation_duration_max_limit);
5139 5127
5140 CONFIG_GETE(focus_autoscroll_mode); 5128 CONFIG_GETE(focus_autoscroll_mode);
5141 CONFIG_GETE(slider_indicator_visible_mode);
5142 CONFIG_GETD(longpress_timeout); 5129 CONFIG_GETD(longpress_timeout);
5143 CONFIG_GETE(softcursor_mode); 5130 CONFIG_GETE(softcursor_mode);
5144 CONFIG_GETD(tooltip_delay); 5131 CONFIG_GETD(tooltip_delay);
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 4cbf725..737be81 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -1003,6 +1003,7 @@ _elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
1003 elm_widget_theme_object_set 1003 elm_widget_theme_object_set
1004 (obj, sd->scr_edje, "scroller", "entry", style); 1004 (obj, sd->scr_edje, "scroller", "entry", style);
1005 1005
1006 elm_interface_scrollable_reset_signals(obj);
1006 _elm_entry_background_switch(sd->entry_edje, sd->scr_edje); 1007 _elm_entry_background_switch(sd->entry_edje, sd->scr_edje);
1007 1008
1008 str = edje_object_data_get(sd->scr_edje, "focus_highlight"); 1009 str = edje_object_data_get(sd->scr_edje, "focus_highlight");
diff --git a/src/lib/elementary/elm_general.eot b/src/lib/elementary/elm_general.eot
index d508080..1d6bf40 100644
--- a/src/lib/elementary/elm_general.eot
+++ b/src/lib/elementary/elm_general.eot
@@ -39,7 +39,6 @@ enum @beta @extern Elm.Icon.Type
39} 39}
40 40
41/* FIXME: shouldn't exist, they are unusable by the bindings */ 41/* FIXME: shouldn't exist, they are unusable by the bindings */
42struct @beta @extern Elm.Validate_Content; [[Data for the elm_validator_regexp_helper()]]
43struct @beta @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the "anchor,clicked" signals emitted 42struct @beta @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the "anchor,clicked" signals emitted
44 by entries.]] 43 by entries.]]
45struct @beta @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback for "anchor,hover" signals emitted 44struct @beta @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback for "anchor,hover" signals emitted
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index f30dfe6..36206fd 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -3623,6 +3623,7 @@ _elm_gengrid_efl_ui_widget_theme_apply(Eo *obj, Elm_Gengrid_Data *sd EINA_UNUSED
3623 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); 3623 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
3624 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret; 3624 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
3625 3625
3626 elm_interface_scrollable_reset_signals(obj);
3626 _mirrored_set(obj, efl_ui_mirrored_get(obj)); 3627 _mirrored_set(obj, efl_ui_mirrored_get(obj));
3627 3628
3628 return int_ret; 3629 return int_ret;
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 182de48..65bc518 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -101,7 +101,6 @@
101 cmd(SIG_ITEM_UNFOCUSED, "item,unfocused", "") \ 101 cmd(SIG_ITEM_UNFOCUSED, "item,unfocused", "") \
102 cmd(SIG_PRESSED, "pressed", "") \ 102 cmd(SIG_PRESSED, "pressed", "") \
103 cmd(SIG_RELEASED, "released", "") \ 103 cmd(SIG_RELEASED, "released", "") \
104 cmd(SIG_CHANGED, "changed", "") \
105 cmd(SIG_FILTER_DONE, "filter,done", "") 104 cmd(SIG_FILTER_DONE, "filter,done", "")
106 105
107ELM_PRIV_GENLIST_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE); 106ELM_PRIV_GENLIST_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
@@ -167,7 +166,7 @@ static void _access_activate_cb(void *data EINA_UNUSED,
167 Elm_Object_Item *item); 166 Elm_Object_Item *item);
168static void _decorate_item_set(Elm_Gen_Item *); 167static void _decorate_item_set(Elm_Gen_Item *);
169static void _internal_elm_genlist_clear(Evas_Object *obj); 168static void _internal_elm_genlist_clear(Evas_Object *obj);
170static Eina_Bool _item_filtered_get(Elm_Gen_Item *it); 169static Eina_Bool _item_filtered_get(Elm_Gen_Item *it, Elm_Genlist_Data *sd);
171 170
172static void _elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd); 171static void _elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd);
173static Eina_Bool _elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd); 172static Eina_Bool _elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd);
@@ -184,14 +183,6 @@ static const Elm_Action key_actions[] = {
184 {NULL, NULL} 183 {NULL, NULL}
185}; 184};
186 185
187static inline void
188_add_calc_job(Elm_Genlist_Data *sd)
189{
190 ELM_SAFE_FREE(sd->calc_job, ecore_job_del);
191 if (!efl_alive_get(sd->obj)) return;
192 sd->calc_job = ecore_job_add(_calc_job, sd->obj);
193}
194
195static void 186static void
196_size_cache_free(void *data) 187_size_cache_free(void *data)
197{ 188{
@@ -297,7 +288,6 @@ _elm_genlist_pan_efl_gfx_entity_position_set(Eo *obj, Elm_Genlist_Pan_Data *psd,
297 288
298 psd->wsd->pan_changed = EINA_TRUE; 289 psd->wsd->pan_changed = EINA_TRUE;
299 evas_object_smart_changed(obj); 290 evas_object_smart_changed(obj);
300 ELM_SAFE_FREE(psd->wsd->calc_job, ecore_job_del);
301} 291}
302 292
303static void 293static void
@@ -333,9 +323,7 @@ _elm_genlist_pan_efl_gfx_entity_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Ein
333 // away or appeared to queue a job to deal with it. it should settle in 323 // away or appeared to queue a job to deal with it. it should settle in
334 // the end to a steady-state 324 // the end to a steady-state
335 if (old.w != size.w) 325 if (old.w != size.w)
336 _add_calc_job(sd); 326 efl_canvas_group_change(sd->obj);
337 else
338 ELM_SAFE_FREE(sd->calc_job, ecore_job_del);
339 327
340super: 328super:
341 efl_gfx_entity_size_set(efl_super(obj, MY_PAN_CLASS), size); 329 efl_gfx_entity_size_set(efl_super(obj, MY_PAN_CLASS), size);
@@ -481,7 +469,8 @@ _item_content_realize(Elm_Gen_Item *it,
481 469
482 if (elm_widget_is(content)) 470 if (elm_widget_is(content))
483 { 471 {
484 if (!calc) 472 elm_widget_tree_unfocusable_set(content, it->item->unfocusable);
473 if (!calc && (!it->item->unfocusable))
485 _elm_widget_full_eval(content); 474 _elm_widget_full_eval(content);
486 } 475 }
487 } 476 }
@@ -784,7 +773,7 @@ _must_recalc_idler(void *data)
784{ 773{
785 ELM_GENLIST_DATA_GET(data, sd); 774 ELM_GENLIST_DATA_GET(data, sd);
786 775
787 _add_calc_job(sd); 776 efl_canvas_group_change(sd->obj);
788 sd->must_recalc_idler = NULL; 777 sd->must_recalc_idler = NULL;
789 return ECORE_CALLBACK_CANCEL; 778 return ECORE_CALLBACK_CANCEL;
790} 779}
@@ -794,12 +783,13 @@ _calc_job(void *data)
794{ 783{
795 int in = 0; 784 int in = 0;
796 Item_Block *itb, *chb = NULL; 785 Item_Block *itb, *chb = NULL;
797 ELM_GENLIST_DATA_GET(data, sd); 786 Elm_Genlist_Data *sd = data;
798 Eina_Bool minw_change = EINA_FALSE; 787 Eina_Bool minw_change = EINA_FALSE;
799 Eina_Bool did_must_recalc = EINA_FALSE; 788 Eina_Bool did_must_recalc = EINA_FALSE;
800 Evas_Coord minw = -1, minh = 0, y = 0, ow = 0, vw = 0; 789 Evas_Coord minw = -1, minh = 0, y = 0, ow = 0, vw = 0;
801 Evas *e; 790 Evas *e;
802 791
792 sd->need_calc = EINA_FALSE;
803 evas_object_geometry_get(sd->pan_obj, NULL, NULL, &ow, &sd->h); 793 evas_object_geometry_get(sd->pan_obj, NULL, NULL, &ow, &sd->h);
804 if (sd->mode == ELM_LIST_COMPRESS) 794 if (sd->mode == ELM_LIST_COMPRESS)
805 elm_interface_scrollable_content_viewport_geometry_get 795 elm_interface_scrollable_content_viewport_geometry_get
@@ -906,7 +896,7 @@ _calc_job(void *data)
906 if (did_must_recalc) 896 if (did_must_recalc)
907 { 897 {
908 if (!sd->must_recalc_idler) 898 if (!sd->must_recalc_idler)
909 sd->must_recalc_idler = ecore_idler_add(_must_recalc_idler, data); 899<