aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-07-18 10:59:15 +0900
committerHermet Park <hermetpark@gmail.com>2019-07-18 10:59:15 +0900
commit755f944f4d3c0d87b1845f117a03d2054c14b917 (patch)
tree20dd0628a7d7a30b47876e8a5d1815a404df0f51 /src/lib/elementary
parentMerge branch 'master' into devs/hermet/lottie (diff)
parentcxx: remove a compilation warning for g++ 7.x (diff)
downloadefl-755f944f4d3c0d87b1845f117a03d2054c14b917.tar.gz
Merge branch 'master' into devs/hermet/lottie
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_box.c6
-rw-r--r--src/lib/elementary/efl_ui_box_layout.c43
-rw-r--r--src/lib/elementary/efl_ui_box_private.h3
-rw-r--r--src/lib/elementary/efl_ui_clickable_util.eo29
-rw-r--r--src/lib/elementary/efl_ui_image.c70
-rw-r--r--src/lib/elementary/efl_ui_image.eo2
-rw-r--r--src/lib/elementary/efl_ui_layout.c86
-rw-r--r--src/lib/elementary/efl_ui_layout_base.eo2
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.c9
-rw-r--r--src/lib/elementary/efl_ui_slider.c16
-rw-r--r--src/lib/elementary/efl_ui_spin_button.c27
-rw-r--r--src/lib/elementary/efl_ui_spin_button_private.h2
-rw-r--r--src/lib/elementary/efl_ui_table_layout.c1
-rw-r--r--src/lib/elementary/efl_ui_text.c3
-rw-r--r--src/lib/elementary/efl_ui_widget.c223
-rw-r--r--src/lib/elementary/efl_ui_widget_image.h1
-rw-r--r--src/lib/elementary/efl_ui_win.c2
-rw-r--r--src/lib/elementary/elm_actionslider.c5
-rw-r--r--src/lib/elementary/elm_config.c12
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c5
-rw-r--r--src/lib/elementary/elm_widget.h2
-rw-r--r--src/lib/elementary/elm_widget_layout.h2
22 files changed, 409 insertions, 142 deletions
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c
index e9d31eb964..9db283ba6f 100644
--- a/src/lib/elementary/efl_ui_box.c
+++ b/src/lib/elementary/efl_ui_box.c
@@ -138,7 +138,7 @@ EOLIAN static void
_efl_ui_box_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Eina_Size2D sz)
{
efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz);
- efl_canvas_group_change(obj);
+ efl_pack_layout_request(obj);
}
EOLIAN static void
@@ -186,6 +186,7 @@ _efl_ui_box_efl_object_constructor(Eo *obj, Efl_Ui_Box_Data *pd)
pd->dir = EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
pd->align.h = 0.5;
pd->align.v = 0.5;
+ pd->full_recalc = EINA_TRUE;
return obj;
}
@@ -360,8 +361,9 @@ _efl_ui_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data
}
EOLIAN static void
-_efl_ui_box_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
+_efl_ui_box_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Box_Data *pd)
{
+ pd->full_recalc = EINA_TRUE;
efl_canvas_group_need_recalculate_set(obj, EINA_TRUE);
}
diff --git a/src/lib/elementary/efl_ui_box_layout.c b/src/lib/elementary/efl_ui_box_layout.c
index eede41e799..8e22742385 100644
--- a/src/lib/elementary/efl_ui_box_layout.c
+++ b/src/lib/elementary/efl_ui_box_layout.c
@@ -27,6 +27,28 @@ _weight_sort_cb(const void *l1, const void *l2)
return it2->weight_factor <= it1->weight_factor ? -1 : 1;
}
+/* this function performs a simplified layout when the box has changed position
+ * but no other changes have occurred, e.g., when a box is being scrolled
+ */
+static void
+_efl_ui_box_layout_simple(Efl_Ui_Box *ui_box, Efl_Ui_Box_Data *pd)
+{
+ Eo *child;
+ Eina_List *l;
+ Eina_Position2D pos = efl_gfx_entity_position_get(ui_box);
+
+ EINA_LIST_FOREACH(pd->children, l, child)
+ {
+ Eina_Position2D child_pos = efl_gfx_entity_position_get(child);
+
+ efl_gfx_entity_position_set(child,
+ EINA_POSITION2D(pos.x - pd->last_pos.x + child_pos.x,
+ pos.y - pd->last_pos.y + child_pos.y));
+ }
+ pd->last_pos = pos;
+ efl_event_callback_call(ui_box, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
+}
+
void
_efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Efl_Ui_Box_Data *pd)
{
@@ -49,10 +71,25 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Efl_Ui_Box_Data *pd)
efl_gfx_hint_size_restricted_min_set(ui_box, EINA_SIZE2D(0, 0));
return;
}
-
+ if (!pd->full_recalc)
+ {
+ _efl_ui_box_layout_simple(ui_box, pd);
+ return;
+ }
_efl_ui_container_layout_init(ui_box, box_calc);
+ pd->last_pos.x = box_calc[0].pos - box_calc[0].margin[0];
+ pd->last_pos.y = box_calc[1].pos - box_calc[1].margin[0];
- items = alloca(count * sizeof(*items));
+ /* Item_Calc struct is currently 152 bytes.
+ * this is pretty big to be allocating a huge number of, and we don't want to explode the stack
+ */
+ if (count >= 500)
+ {
+ items = malloc(count * sizeof(*items));
+ EINA_SAFETY_ON_NULL_RETURN(items);
+ }
+ else
+ items = alloca(count * sizeof(*items));
#ifdef DEBUG
memset(items, 0, count * sizeof(*items));
#endif
@@ -198,7 +235,9 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Efl_Ui_Box_Data *pd)
want[1] += (box_calc[1].margin[0] + box_calc[1].margin[1]) +
(box_calc[1].pad * (count - 1));
+ pd->full_recalc = EINA_FALSE;
efl_gfx_hint_size_restricted_min_set(ui_box, EINA_SIZE2D(want[0], want[1]));
efl_event_callback_call(ui_box, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
+ if (count >= 500) free(items);
}
diff --git a/src/lib/elementary/efl_ui_box_private.h b/src/lib/elementary/efl_ui_box_private.h
index 47400df3fc..4cb94c5d8f 100644
--- a/src/lib/elementary/efl_ui_box_private.h
+++ b/src/lib/elementary/efl_ui_box_private.h
@@ -27,7 +27,10 @@ struct _Efl_Ui_Box_Data
double h, v;
} align;
+ Eina_Position2D last_pos;
+
Eina_Bool homogeneous : 1;
+ Eina_Bool full_recalc : 1; //whether to force full recalc
};
#endif
diff --git a/src/lib/elementary/efl_ui_clickable_util.eo b/src/lib/elementary/efl_ui_clickable_util.eo
index 5f009e2925..d086c24581 100644
--- a/src/lib/elementary/efl_ui_clickable_util.eo
+++ b/src/lib/elementary/efl_ui_clickable_util.eo
@@ -1,23 +1,36 @@
class @beta Efl.Ui.Clickable_Util {
+ [[Helper class that connects theme signals or object events to the @Efl.Ui.Clickable interface.
+
+ This simplifies creating widgets that implement the @Efl.Ui.Clickable interface.
+ ]]
methods {
bind_to_theme @class {
- [[This will listen to the standard events of a theme, and emit the events on clickable
+ [[This will listen to the standard "click" events on a theme and emit the appropriate
+ events through the @Efl.Ui.Clickable interface.
+
+ Using these methods widgets do not need to listen to the theme signals. This class
+ does it and calls the correct clickable functions.
- This means, widgets themselfs do not neccessarily need to listen to the theme signals. This function does this, and calls the correct clickable functions.
+ This handles theme signals "efl,action,press", "efl,action,unpress" and "efl,action,mouse_out",
+ and the @[Efl.Input.Interface.pointer,move] event.
]]
params {
- object : Efl.Canvas.Layout; [[The object to listen on]]
- clickable : Efl.Ui.Clickable; [[The object to call the clickable events on]]
+ object : Efl.Canvas.Layout; [[The object to listen on.]]
+ clickable : Efl.Ui.Clickable; [[The object to call the clickable methods on.]]
}
}
bind_to_object @class {
- [[This will listen to the standard events on a object, and call the correct methods on clickable
+ [[This will listen to the standard "click" events on an object, and emit the appropriate
+ events through the @Efl.Ui.Clickable interface.
+
+ Using these methods widgets do not need to listen to the object events. This class
+ does it and calls the correct clickable functions.
- This means, widgets themselfs do not neccessarily need to listen to the events on the object. This function does this, and calls the correct clickable functions.
+ The handled events are @[Efl.Input.Interface.pointer,up] and @[Efl.Input.Interface.pointer,down].
]]
params {
- object : Efl.Input.Interface; [[The object to listen on]]
- clickable : Efl.Ui.Clickable; [[The object to call the clickable events on]]
+ object : Efl.Input.Interface; [[The object to listen on.]]
+ clickable : Efl.Ui.Clickable; [[The object to call the clickable methods on.]]
}
}
}
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 02dd574378..dea9ec1b00 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -53,6 +53,7 @@ void _efl_ui_image_sizing_eval(Evas_Object *obj);
static void _efl_ui_image_model_properties_changed_cb(void *data, const Efl_Event *event);
static void _on_size_hints_changed(void *data, const Efl_Event *e);
static Eina_Bool _efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url);
+static void _update_viewmodel(Eo *obj, Efl_Ui_Image_Data *pd);
static const Elm_Action key_actions[] = {
{"activate", _key_action_activate},
@@ -848,6 +849,21 @@ _on_size_hints_changed(void *data EINA_UNUSED, const Efl_Event *ev)
_efl_ui_image_sizing_eval(ev->object);
}
+static void
+_efl_ui_image_model_changed(void *data, const Efl_Event *event)
+{
+ Efl_Model_Changed_Event *ev = event->info;
+
+ if (ev->previous)
+ efl_event_callback_del(ev->previous, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_image_model_properties_changed_cb, event->object);
+ if (ev->current)
+ efl_event_callback_add(ev->current, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_image_model_properties_changed_cb, event->object);
+
+ _update_viewmodel(event->object, data);
+}
+
EOLIAN static Eo *
_efl_ui_image_efl_object_constructor(Eo *obj, Efl_Ui_Image_Data *pd)
{
@@ -861,6 +877,22 @@ _efl_ui_image_efl_object_constructor(Eo *obj, Efl_Ui_Image_Data *pd)
return obj;
}
+EOLIAN static void
+_efl_ui_image_efl_object_invalidate(Eo *obj, Efl_Ui_Image_Data *pd EINA_UNUSED)
+{
+ Efl_Model *model;
+
+ if (pd->property_watch)
+ efl_event_callback_del(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED,
+ _efl_ui_image_model_changed, pd);
+
+ model = efl_ui_view_model_get(obj);
+ if (model)
+ efl_event_callback_del(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_image_model_properties_changed_cb, obj);
+ efl_invalidate(efl_super(obj, EFL_UI_IMAGE_CLASS));
+}
+
static const Eina_Slice remote_uri[] = {
EINA_SLICE_STR_LITERAL("http://"),
EINA_SLICE_STR_LITERAL("https://"),
@@ -1829,6 +1861,15 @@ _update_viewmodel(Eo *obj, Efl_Ui_Image_Data *pd)
char *key = NULL;
Efl_Model *model;
+ if (!pd->property.file) return ;
+
+ if (!pd->property_watch)
+ {
+ efl_event_callback_add(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED,
+ _efl_ui_image_model_changed, pd);
+ pd->property_watch = EINA_TRUE;
+ }
+
model = efl_ui_view_model_get(obj);
if (!model) return ;
@@ -1903,35 +1944,14 @@ _efl_ui_image_model_properties_changed_cb(void *data, const Efl_Event *event)
if (refresh) _update_viewmodel(obj, pd);
}
-EOLIAN static void
-_efl_ui_image_efl_ui_view_model_set(Eo *obj, Efl_Ui_Image_Data *pd, Efl_Model *model)
-{
- Efl_Model *setted;
-
- setted = efl_ui_view_model_get(obj);
- if (setted)
- {
- efl_event_callback_del(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_image_model_properties_changed_cb, obj);
- }
-
- efl_ui_view_model_set(efl_super(obj, EFL_UI_IMAGE_CLASS), model);
-
- setted = efl_ui_view_model_get(obj);
- if (setted)
- {
- efl_event_callback_add(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_image_model_properties_changed_cb, obj);
- }
-
- _update_viewmodel(obj, pd);
-}
-
EOLIAN static Eina_Error
_efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd, const char *key, const char *property)
{
Eina_Stringshare *sk;
+ if (efl_ui_property_bind(efl_super(obj, EFL_UI_IMAGE_CLASS), key, property) == 0)
+ return 0;
+
if (strcmp(key, "filename") == 0)
{
pd->property.icon = EINA_FALSE;
@@ -1949,7 +1969,7 @@ _efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd,
}
else
{
- return efl_ui_property_bind(efl_super(obj, EFL_UI_IMAGE_CLASS), key, property);
+ return EFL_PROPERTY_ERROR_INVALID_KEY;
}
_update_viewmodel(obj, pd);
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index d6db562358..728a6c4cb0 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -89,6 +89,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.
}
implements {
Efl.Object.constructor;
+ Efl.Object.invalidate;
Efl.File.load;
Efl.File.unload;
Efl.Gfx.Color.color { set; }
@@ -118,7 +119,6 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.
Efl.Canvas.Group.group_member_add;
Efl.Ui.Draggable.drag_target { get; set; }
Efl.Ui.Property_Bind.property_bind;
- Efl.Ui.View.model { set; }
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.widget_input_event_handler;
Efl.Access.Component.extents { get; }
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 5547ae94bf..1390fc774f 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2225,24 +2225,34 @@ _efl_ui_layout_connect_hash(Efl_Ui_Layout_Data *pd)
pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(_efl_ui_layout_factory_free)); // Hash of property triggering a content creation
}
-EOLIAN static void
-_efl_ui_layout_base_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model *model)
+
+static void
+_efl_ui_layout_base_model_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd,
+ Efl_Model *model)
+{
+ if (!model) return ;
+ if (!pd->model_bound) return ;
+
+ efl_event_callback_del(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_model_properties_changed_cb, pd);
+
+ pd->model_bound = EINA_FALSE;
+}
+
+static void
+_efl_ui_layout_base_model_register(Eo *obj, Efl_Ui_Layout_Data *pd,
+ Efl_Model *model)
{
Eina_Stringshare *key;
Eina_Hash_Tuple *tuple;
Eina_Iterator *it;
- Efl_Model *setted;
- setted = efl_ui_view_model_get(obj);
- if (setted)
- efl_event_callback_del(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_model_properties_changed_cb, pd);
+ if (!model) return ;
+ if (pd->model_bound) return;
+ pd->model_bound = EINA_TRUE;
- efl_ui_view_model_set(efl_super(obj, EFL_UI_LAYOUT_BASE_CLASS), model);
-
- if (model)
- efl_event_callback_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_model_properties_changed_cb, pd);
+ efl_event_callback_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_model_properties_changed_cb, pd);
_efl_ui_layout_connect_hash(pd);
@@ -2279,6 +2289,31 @@ _efl_ui_layout_base_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_M
_efl_ui_layout_view_model_update(pd);
}
+static void
+_efl_ui_layout_base_model_update(void *data, const Efl_Event *event)
+{
+ Efl_Ui_Layout_Data *pd = data;
+ Efl_Model_Changed_Event *ev = event->info;
+
+ _efl_ui_layout_base_model_unregister(event->object, pd, ev->previous);
+ _efl_ui_layout_base_model_register(event->object, pd, ev->current);
+}
+
+static void
+_efl_ui_layout_base_model_watch(Eo *obj, Efl_Ui_Layout_Data *pd)
+{
+ Efl_Model *model;
+
+ if (pd->model_watch) return ;
+ pd->model_watch = EINA_TRUE;
+
+ efl_event_callback_add(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED,
+ _efl_ui_layout_base_model_update, pd);
+ model = efl_ui_view_model_get(obj);
+ if (!model) return ;
+ _efl_ui_layout_base_model_register(obj, pd, model);
+}
+
EOLIAN static Eina_Error
_efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Layout_Data *pd, const char *key, const char *property)
{
@@ -2298,6 +2333,9 @@ _efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Layout_Da
if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE))
return EFL_PROPERTY_ERROR_INVALID_KEY;
+ // Check if there is a model and register it
+ _efl_ui_layout_base_model_watch(obj, pd);
+
_efl_ui_layout_connect_hash(pd);
sprop = eina_stringshare_add(property);
@@ -2354,6 +2392,9 @@ _efl_ui_layout_base_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui
if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE))
return;
+ // Check if there is a model and register it
+ _efl_ui_layout_base_model_watch(obj, pd);
+
if (!pd->connect.factories)
pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(_efl_ui_layout_factory_free));
@@ -2421,6 +2462,27 @@ _efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNU
return eo;
}
+static void
+_efl_ui_layout_base_efl_object_invalidate(Eo *obj, Efl_Ui_Layout_Data *pd)
+{
+ if (pd->model_watch)
+ {
+ Efl_Model *model;
+
+ pd->model_watch = EINA_FALSE;
+ efl_event_callback_del(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED,
+ _efl_ui_layout_base_model_update, pd);
+
+ model = efl_ui_view_model_get(obj);
+ if (!model)
+ {
+ _efl_ui_layout_base_model_unregister(obj, pd, model);
+ }
+ }
+
+ efl_invalidate(efl_super(obj, EFL_UI_LAYOUT_BASE_CLASS));
+}
+
EOLIAN static void
_efl_ui_layout_base_efl_layout_signal_message_send(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNUSED, int id, const Eina_Value msg)
{
diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo
index 54a646c1bb..1266dcef85 100644
--- a/src/lib/elementary/efl_ui_layout_base.eo
+++ b/src/lib/elementary/efl_ui_layout_base.eo
@@ -60,6 +60,7 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container,
class.constructor;
Efl.Object.constructor;
Efl.Object.finalize;
+ Efl.Object.invalidate;
Efl.Canvas.Group.group_calculate;
Efl.Layout.Calc.calc_freeze;
Efl.Layout.Calc.calc_thaw;
@@ -86,7 +87,6 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container,
Efl.Part.part_get;
Efl.Ui.Property_Bind.property_bind;
Efl.Ui.Factory_Bind.factory_bind;
- Efl.Ui.View.model { set; }
}
events {
theme,changed: void; [[Called when theme changed]]
diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c
index a6bf0cda22..dd924ed0b8 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.c
+++ b/src/lib/elementary/efl_ui_scroll_manager.c
@@ -1555,10 +1555,11 @@ _scroll_manager_scrollto_y_animator_del(Efl_Ui_Scroll_Manager_Data *sd)
static void
_scroll_manager_scrollto_animator_add(Efl_Ui_Scroll_Manager_Data *sd, Evas_Coord sx, Evas_Coord sy, Evas_Coord x, Evas_Coord y, double tx, double ty, InterpType interp)
{
- _scroll_manager_scrollto_animator_del(sd);
-
- if (!sd->pan_obj) return;
- if (sd->freeze) return;
+ if (!sd->pan_obj || sd->freeze)
+ {
+ _scroll_manager_scrollto_animator_del(sd);
+ return;
+ }
_scroll_manager_scrollto_x_animator_add(sd, sx, x, tx, interp);
_scroll_manager_scrollto_y_animator_add(sd, sy, y, ty, interp);
}
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 2eb3f28ac7..2714cce3d5 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -205,6 +205,7 @@ _drag_up(void *data,
const char *source EINA_UNUSED)
{
double step;
+ double relative_step;
EFL_UI_SLIDER_DATA_GET(data, sd);
step = sd->step;
@@ -212,12 +213,14 @@ _drag_up(void *data,
if (efl_ui_layout_orientation_is_inverted(sd->dir)) step *= -1.0;
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
+ relative_step = step/(sd->val_max - sd->val_min);
if (elm_widget_is_legacy(obj))
efl_ui_drag_step_move(efl_part(wd->resize_obj, "elm.dragable.slider"),
step, step);
else
efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.dragable.slider"),
- step, step);
+ relative_step, relative_step);
+ _slider_update(data, EINA_TRUE);
}
static void
@@ -227,6 +230,7 @@ _drag_down(void *data,
const char *source EINA_UNUSED)
{
double step;
+ double relative_step;
EFL_UI_SLIDER_DATA_GET(data, sd);
step = -sd->step;
@@ -234,12 +238,14 @@ _drag_down(void *data,
if (efl_ui_layout_orientation_is_inverted(sd->dir)) step *= -1.0;
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
+ relative_step = step/(sd->val_max - sd->val_min);
if (elm_widget_is_legacy(obj))
efl_ui_drag_step_move(efl_part(wd->resize_obj, "elm.dragable.slider"),
step, step);
else
efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.dragable.slider"),
- step, step);
+ relative_step, relative_step);
+ _slider_update(data, EINA_TRUE);
}
static Eina_Bool
@@ -247,6 +253,9 @@ _key_action_drag(Evas_Object *obj, const char *params)
{
EFL_UI_SLIDER_DATA_GET(obj, sd);
const char *dir = params;
+ double old_value, new_value;
+
+ old_value = efl_ui_range_value_get(obj);
if (!strcmp(dir, "left"))
{
@@ -282,7 +291,8 @@ _key_action_drag(Evas_Object *obj, const char *params)
}
else return EINA_FALSE;
- return EINA_TRUE;
+ new_value = efl_ui_range_value_get(obj);
+ return !EINA_DBL_EQ(new_value, old_value);
}
// _slider_efl_ui_widget_widget_input_event_handler
diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c
index f14c365ba8..6974428dc4 100644
--- a/src/lib/elementary/efl_ui_spin_button.c
+++ b/src/lib/elementary/efl_ui_spin_button.c
@@ -113,15 +113,20 @@ _label_write(Evas_Object *obj)
eina_strbuf_free(strbuf);
}
-static Eina_Bool
-_delay_change_timer_cb(void *data)
+static Eina_Value
+_delay_change_timer_cb(Eo *o, void *data EINA_UNUSED, const Eina_Value v)
{
- Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS);
+ efl_event_callback_call(o, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, NULL);
- sd->delay_change_timer = NULL;
- efl_event_callback_call(data, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, NULL);
+ return v;
+}
- return ECORE_CALLBACK_CANCEL;
+static void
+_delay_change_timer_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
+{
+ Efl_Ui_Spin_Button_Data *sd = data;
+
+ sd->delay_change_timer = NULL;
}
static Eina_Bool
@@ -130,6 +135,7 @@ _value_set(Evas_Object *obj,
{
Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS);
Efl_Ui_Spin_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_CLASS);
+ Eina_Future *f;
if (sd->circulate)
{
@@ -146,9 +152,12 @@ _value_set(Evas_Object *obj,
if (EINA_DBL_EQ(new_val, efl_ui_range_value_get(obj))) return EINA_TRUE;
efl_ui_range_value_set(obj, new_val);
- ecore_timer_del(sd->delay_change_timer);
- sd->delay_change_timer = ecore_timer_add(EFL_UI_SPIN_BUTTON_DELAY_CHANGE_TIME,
- _delay_change_timer_cb, obj);
+ if (sd->delay_change_timer) eina_future_cancel(sd->delay_change_timer);
+ f = efl_loop_timeout(efl_loop_get(obj), EFL_UI_SPIN_BUTTON_DELAY_CHANGE_TIME);
+ sd->delay_change_timer = efl_future_then(obj, f,
+ .success = _delay_change_timer_cb,
+ .free = _delay_change_timer_cleanup,
+ .data = sd);
return EINA_TRUE;
}
diff --git a/src/lib/elementary/efl_ui_spin_button_private.h b/src/lib/elementary/efl_ui_spin_button_private.h
index 1c32c75a6d..5c6d0a977b 100644
--- a/src/lib/elementary/efl_ui_spin_button_private.h
+++ b/src/lib/elementary/efl_ui_spin_button_private.h
@@ -5,7 +5,7 @@ typedef struct _Efl_Ui_Spin_Button_Data Efl_Ui_Spin_Button_Data;
struct _Efl_Ui_Spin_Button_Data
{
Evas_Object *ent, *inc_button, *dec_button, *text_button;
- Ecore_Timer *delay_change_timer; /**< a timer for a delay,changed smart callback */
+ Eina_Future *delay_change_timer; /**< a timer for a delay,changed smart callback */
Efl_Ui_Layout_Orientation dir;
diff --git a/src/lib/elementary/efl_ui_table_layout.c b/src/lib/elementary/efl_ui_table_layout.c
index ac90b63876..391878019e 100644
--- a/src/lib/elementary/efl_ui_table_layout.c
+++ b/src/lib/elementary/efl_ui_table_layout.c
@@ -383,4 +383,5 @@ _efl_ui_table_custom_layout(Efl_Ui_Table *ui_table, Efl_Ui_Table_Data *pd)
efl_gfx_hint_size_restricted_min_set(ui_table,
EINA_SIZE2D(table_calc.want[0],
table_calc.want[1]));
+ efl_event_callback_call(ui_table, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
}
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 34e8a4f62b..3201c8875e 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2213,7 +2213,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_text_size_changed_cb, obj);
- elm_widget_can_focus_set(obj, EINA_TRUE);
+ efl_ui_widget_focus_allow_set(obj, sd->editable);
efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL);
efl_ui_text_input_panel_enabled_set(obj, EINA_TRUE);
@@ -2390,6 +2390,7 @@ _efl_ui_text_efl_text_interactive_editable_set(Eo *obj, Efl_Ui_Text_Data *sd, Ei
if (sd->editable == editable) return;
sd->editable = editable;
efl_ui_widget_theme_apply(obj);
+ efl_ui_widget_focus_allow_set(obj, editable);
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 91fccee918..7560fe3151 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -300,17 +300,6 @@ _candidacy_exam(Eo *obj)
static void _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd);
-static void
-_manager_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
-{
- if (!efl_alive_get(data))
- return;
-
- ELM_WIDGET_DATA_GET(data, pd);
-
- _full_eval(data, pd);
-}
-
static Efl_Ui_Focus_Object*
_focus_manager_eval(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool want, Eina_Bool should)
{
@@ -333,19 +322,9 @@ _focus_manager_eval(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool want, Eina_Boo
{
old = pd->manager.manager;
- if (pd->manager.provider)
- efl_event_callback_del(pd->manager.provider, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_MANAGER_CHANGED, _manager_changed_cb, obj);
-
pd->manager.manager = new;
pd->manager.provider = provider;
}
- if (pd->manager.provider)
- {
- if (!want && !should)
- efl_event_callback_del(pd->manager.provider, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_MANAGER_CHANGED, _manager_changed_cb, obj);
- else
- efl_event_callback_add(pd->manager.provider, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_MANAGER_CHANGED, _manager_changed_cb, obj);
- }
return old;
}
@@ -490,6 +469,10 @@ _logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool s
{
ELM_WIDGET_DATA_GET_OR_RETURN(pd->logical.parent, logical_wd, NULL);
logical_wd->logical.child_count --;
+ if (logical_wd->logical.child_count == 0)
+ {
+ *state_change_to_parent = EINA_TRUE;
+ }
}
old = pd->logical.parent;
efl_weak_unref(&pd->logical.parent);
@@ -525,19 +508,23 @@ _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd)
old_parent = _logical_parent_eval(obj, pd, should, &state_change_to_parent);
- if (efl_isa(old_parent, EFL_UI_WIDGET_CLASS))
+ if (state_change_to_parent)
{
- //emit signal and focus eval old and new
- ELM_WIDGET_DATA_GET(old_parent, old_pd);
- _full_eval(old_parent, old_pd);
- }
+ if (efl_isa(old_parent, EFL_UI_WIDGET_CLASS))
+ {
+ //emit signal and focus eval old and new
+ ELM_WIDGET_DATA_GET(old_parent, old_pd);
+ _full_eval(old_parent, old_pd);
+ }
- if (state_change_to_parent && efl_isa(pd->logical.parent, EFL_UI_WIDGET_CLASS))
- {
- ELM_WIDGET_DATA_GET(pd->logical.parent, new_pd);
- _full_eval(pd->logical.parent, new_pd);
+ if (efl_isa(pd->logical.parent, EFL_UI_WIDGET_CLASS))
+ {
+ ELM_WIDGET_DATA_GET(pd->logical.parent, new_pd);
+ _full_eval(pd->logical.parent, new_pd);
+ }
}
+
_focus_manager_eval(obj, pd, want_full, should);
old_registered_parent = pd->focus.parent;
@@ -553,6 +540,7 @@ _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd)
if (old_registered_manager != pd->focus.manager)
{
+ _elm_widget_full_eval_children(obj, pd);
efl_event_callback_call(obj,
EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_MANAGER_CHANGED, old_registered_manager);
}
@@ -4786,7 +4774,6 @@ _efl_ui_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
{
if (sd->manager.provider)
{
- efl_event_callback_del(sd->manager.provider, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_MANAGER_CHANGED, _manager_changed_cb, obj);
sd->manager.provider = NULL;
}
efl_access_object_attributes_clear(obj);
@@ -5056,8 +5043,8 @@ _efl_ui_widget_efl_object_provider_find(const Eo *obj, Elm_Widget_Smart_Data *pd
if (pd->provider_lookup) return NULL;
pd->provider_lookup = EINA_TRUE;
- if (pd->parent_obj) lookup = efl_provider_find(pd->parent_obj, klass);
- if (!lookup) lookup = efl_provider_find(efl_super(obj, MY_CLASS), klass);
+ lookup = efl_provider_find(efl_super(obj, MY_CLASS), klass);
+ if (!lookup && pd->parent_obj) lookup = efl_provider_find(pd->parent_obj, klass);
pd->provider_lookup = EINA_FALSE;
@@ -5554,6 +5541,24 @@ _efl_ui_widget_part_efl_object_destructor(Eo *obj, Elm_Part_Data *pd)
efl_destructor(efl_super(obj, EFL_UI_WIDGET_PART_CLASS));
}
+static Efl_Canvas_Layout_Part_Type
+_efl_ui_widget_part_efl_canvas_layout_part_type_get(const Eo *obj EINA_UNUSED, Elm_Part_Data *pd)
+{
+ Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS);
+ return efl_canvas_layout_part_type_get(efl_part(sd->resize_obj, pd->part));
+}
+
+static Eina_Rect
+_efl_ui_widget_part_efl_gfx_entity_geometry_get(const Eo *obj EINA_UNUSED, Elm_Part_Data *pd)
+{
+ Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS);
+ return efl_gfx_entity_geometry_get(efl_part(sd->resize_obj, pd->part));
+}
+
+#define EFL_UI_WIDGET_PART_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(efl_canvas_layout_part_type_get, _efl_ui_widget_part_efl_canvas_layout_part_type_get), \
+ EFL_OBJECT_OP_FUNC(efl_gfx_entity_geometry_get, _efl_ui_widget_part_efl_gfx_entity_geometry_get)
+
#include "efl_ui_widget_part.eo.c"
/* Efl.Part end */
@@ -5770,12 +5775,112 @@ _efl_ui_view_property_bind_changed(void *data, const Efl_Event *event)
}
}
+static void
+_efl_ui_widget_model_update(Efl_Ui_Widget_Data *pd)
+{
+ Efl_Ui_Property_Bound *property;
+ Eina_Iterator *it;
+
+ it = eina_hash_iterator_data_new(pd->properties.model_lookup);
+ EINA_ITERATOR_FOREACH(it, property)
+ _efl_ui_property_bind_get(pd, property);
+}
+
+static void _efl_ui_widget_model_provider_model_change(void *data, const Efl_Event *event EINA_UNUSED);
+static void _efl_ui_widget_model_provider_invalidate(void *data, const Efl_Event *event EINA_UNUSED);
+
+EFL_CALLBACKS_ARRAY_DEFINE(efl_ui_widget_model_provider_callbacks,
+ { EFL_EVENT_INVALIDATE, _efl_ui_widget_model_provider_invalidate },
+ { EFL_UI_VIEW_EVENT_MODEL_CHANGED, _efl_ui_widget_model_provider_model_change });
+
+static void
+_efl_ui_widget_model_provider_model_change(void *data, const Efl_Event *event)
+{
+ Efl_Ui_Widget_Data *pd = data;
+
+ efl_replace(&pd->properties.model,
+ efl_ui_view_model_get(pd->properties.provider));
+ _efl_ui_widget_model_update(pd);
+
+ efl_event_callback_call(pd->obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED, event->info);
+}
+
+static void
+_efl_ui_widget_model_provider_invalidate(void *data, const Efl_Event *event EINA_UNUSED)
+{
+ Efl_Ui_Widget_Data *pd = data;
+
+ efl_event_callback_array_del(pd->properties.provider,
+ efl_ui_widget_model_provider_callbacks(),
+ pd);
+ efl_replace(&pd->properties.provider, NULL);
+ efl_replace(&pd->properties.model, NULL);
+}
+
+static void
+_efl_ui_widget_model_register(Eo *obj, Efl_Ui_Widget_Data *pd)
+{
+ if (pd->properties.registered) return ;
+
+ if (!pd->properties.model)
+ {
+ Efl_Model_Changed_Event ev;
+
+ efl_replace(&pd->properties.provider,
+ efl_provider_find(obj, EFL_MODEL_PROVIDER_CLASS));
+ if (!pd->properties.provider) return ;
+ efl_event_callback_array_add(pd->properties.provider,
+ efl_ui_widget_model_provider_callbacks(),
+ pd);
+
+ efl_replace(&pd->properties.model,
+ efl_ui_view_model_get(pd->properties.provider));
+
+ if (!pd->properties.model) return ;
+
+ ev.current = pd->properties.model;
+ ev.previous = NULL;
+ efl_event_callback_call(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED, &ev);
+ }
+
+ if (!pd->properties.model) return ;
+ if (!pd->properties.model_lookup) return ;
+
+ efl_event_callback_add(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_model_property_bind_changed, pd);
+ efl_event_callback_add(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_view_property_bind_changed, pd);
+ pd->properties.registered = EINA_TRUE;
+}
+
+static void
+_efl_ui_widget_model_unregister(Eo *obj, Efl_Ui_Widget_Data *pd)
+{
+ if (pd->properties.registered)
+ {
+ // Remove any existing handler that might exist for any reason
+ efl_event_callback_del(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_model_property_bind_changed, pd);
+ efl_event_callback_del(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
+ _efl_ui_view_property_bind_changed, pd);
+
+ pd->properties.registered = EINA_FALSE;
+ }
+ // Invalidate must be called before setting a new model and even if no model is registered
+ if (pd->properties.provider)
+ _efl_ui_widget_model_provider_invalidate(pd, NULL);
+}
static Eina_Error
_efl_ui_widget_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Data *pd,
const char *key, const char *property)
{
Efl_Ui_Property_Bound *prop;
+ // Always check for a model and fetch a provider in case a binded property
+ // is provided by a class down the hierarchy, but they still need to be notified
+ // when a model change
+ _efl_ui_widget_model_register(obj, pd);
+
// Check if the property is available from the reflection table of the object.
if (!efl_property_reflection_exist(obj, key)) return EFL_PROPERTY_ERROR_INVALID_KEY;
@@ -5783,13 +5888,6 @@ _efl_ui_widget_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Data *p
{
pd->properties.model_lookup = eina_hash_stringshared_new(_efl_ui_property_bind_free);
pd->properties.view_lookup = eina_hash_stringshared_new(NULL);
- if (pd->properties.model)
- {
- efl_event_callback_add(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_model_property_bind_changed, pd);
- efl_event_callback_add(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
- _efl_ui_view_property_bind_changed, pd);
- }
}
prop = calloc(1, sizeof (Efl_Ui_Property_Bound));
@@ -5812,25 +5910,27 @@ _efl_ui_widget_efl_ui_view_model_set(Eo *obj,
Efl_Ui_Widget_Data *pd,
Efl_Model *model)
{
- if (pd->properties.model)
- {
- // Remove any existing handler that might exist for any reason
- efl_event_callback_del(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_model_property_bind_changed, pd);
- efl_event_callback_del(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
- _efl_ui_view_property_bind_changed, pd);
- }
+ Efl_Model_Changed_Event ev;
+
+ ev.current = efl_ref(model);
+ ev.previous = efl_ref(pd->properties.model);
+
+ _efl_ui_widget_model_unregister(obj, pd);
efl_replace(&pd->properties.model, model);
- if (pd->properties.model && pd->properties.model_lookup)
- {
- // Set the properties handler just in case
- efl_event_callback_add(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_model_property_bind_changed, pd);
- efl_event_callback_add(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
- _efl_ui_view_property_bind_changed, pd);
- }
+ // Set the properties handler just in case
+ _efl_ui_widget_model_register(obj, pd);
+
+ // In case the model set was NULL, but we did found a model provider
+ // we shouldn't emit a second event. Otherwise we should.
+ if (ev.current == pd->properties.model)
+ efl_event_callback_call(obj, EFL_UI_VIEW_EVENT_MODEL_CHANGED, &ev);
+
+ if (pd->properties.model) _efl_ui_widget_model_update(pd);
+
+ efl_unref(ev.current);
+ efl_unref(ev.previous);
}
static Efl_Model *
@@ -5844,14 +5944,9 @@ _efl_ui_widget_efl_object_invalidate(Eo *obj, Efl_Ui_Widget_Data *pd)
{
efl_invalidate(efl_super(obj, EFL_UI_WIDGET_CLASS));
- if (pd->properties.model)
- {
- efl_event_callback_del(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
- _efl_ui_model_property_bind_changed, pd);
- efl_event_callback_del(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED,
- _efl_ui_view_property_bind_changed, pd);
- efl_replace(&pd->properties.model, NULL);
- }
+ _efl_ui_widget_model_unregister(obj, pd);
+ efl_replace(&pd->properties.model, NULL);
+
if (pd->properties.view_lookup) eina_hash_free(pd->properties.view_lookup);
pd->properties.view_lookup = NULL;
if (pd->properties.model_lookup) eina_hash_free(pd->properties.model_lookup);
diff --git a/src/lib/elementary/efl_ui_widget_image.h b/src/lib/elementary/efl_ui_widget_image.h
index c140c9b7c5..661cca94f2 100644
--- a/src/lib/elementary/efl_ui_widget_image.h
+++ b/src/lib/elementary/efl_ui_widget_image.h
@@ -103,6 +103,7 @@ struct _Efl_Ui_Image_Data
Eina_Bool scale_up : 1;
Eina_Bool scale_down : 1;
Eina_Bool legacy_align : 1;
+ Eina_Bool property_watch : 1;
};
/**
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ef3174e00f..d0cad8288b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2979,6 +2979,8 @@ _elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj)
EOLIAN static void
_efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd)
{
+ efl_event_freeze(sd->evas);
+
if ((sd->modal) && (evas_object_visible_get(obj)))
_elm_win_modality_decrement(sd);
diff --git a/src/lib/elementary/elm_actionslider.c b/src/lib/elementary/elm_actionslider.c
index d4e3ca129b..e26abbda29 100644
--- a/src/lib/elementary/elm_actionslider.c
+++ b/src/lib/elementary/elm_actionslider.c
@@ -237,7 +237,7 @@ _button_animator(void *data)
_text_get(obj, &left, &right, &center);
- if ((!EINA_DBL_EQ(sd->final_position, 0)) &&
+ if ((EINA_DBL_EQ(sd->final_position, 0)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
evas_object_smart_callback_call(obj, "selected",(char *)left);
else if ((EINA_DBL_EQ(sd->final_position, 0.5)) &&
@@ -548,7 +548,7 @@ _elm_actionslider_efl_object_constructor(Eo *obj, Elm_Actionslider_Data *_pd EIN
}
EOLIAN static void
-_elm_actionslider_indicator_pos_set(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNUSED, Elm_Actionslider_Pos pos)
+_elm_actionslider_indicator_pos_set(Eo *obj, Elm_Actionslider_Data *sd, Elm_Actionslider_Pos pos)
{
double position = 0.0;
@@ -559,6 +559,7 @@ _elm_actionslider_indicator_pos_set(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNU
if (pos == ELM_ACTIONSLIDER_CENTER) position = 0.5;
else if (pos == ELM_ACTIONSLIDER_RIGHT)
position = 1.0;
+ sd->final_position = position;
edje_object_part_drag_value_set
(wd->resize_obj, "elm.drag_button_base", position, 0.5);
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 13b59ed4fd..6093ca73cd 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1712,8 +1712,8 @@ _config_load(void)
if (_efl_config_obj)
{
efl_del_intercept_set(_efl_config_obj, NULL);
- efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
- efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
+ efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
+ efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
ELM_SAFE_FREE(_efl_config_obj, efl_del);
ELM_SAFE_FREE(_elm_config, _config_free);
_elm_font_overlays_del_free();
@@ -1721,8 +1721,8 @@ _config_load(void)
ELM_SAFE_FREE(_elm_key_bindings, eina_hash_free);
}
_efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, efl_main_loop_get());
- efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
- efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
+ efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
+ efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
if (!_use_build_config)
{
@@ -4662,8 +4662,8 @@ void
_elm_config_shutdown(void)
{
efl_del_intercept_set(_efl_config_obj, NULL);
- efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
- efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
+ efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
+ efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
ELM_SAFE_FREE(_efl_config_obj, efl_del);
ELM_SAFE_FREE(_elm_config, _config_free);
ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 02b808361c..1494b2c716 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -1285,7 +1285,10 @@ _elm_interface_scrollable_content_viewport_geometry_get(const Eo *obj EINA_UNUSE
{
if (!sid->pan_obj || !sid->edje_obj) return;
- edje_object_calc_force(sid->edje_obj);
+ /* we want to trigger any pending edje recalcs here but we don't strictly need to
+ * trigger one if it isn't necessary
+ */
+ efl_canvas_group_calculate(sid->edje_obj);
evas_object_geometry_get(sid->pan_obj, x, y, w, h);
}
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index fec163dc44..dfdfdb83f7 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -386,8 +386,10 @@ typedef struct _Elm_Widget_Smart_Data
} legacy_focus;
struct {
Efl_Model *model;
+ Efl_Model_Provider *provider;
Eina_Hash *model_lookup;
Eina_Hash *view_lookup;
+ Eina_Bool registered : 1;
} properties;
Eina_Bool scroll_x_locked : 1;
Eina_Bool scroll_y_locked : 1;
diff --git a/src/lib/elementary/elm_widget_layout.h b/src/lib/elementary/elm_widget_layout.h
index 4fda71cdba..d8de1d4bde 100644
--- a/src/lib/elementary/elm_widget_layout.h
+++ b/src/lib/elementary/elm_widget_layout.h
@@ -71,6 +71,8 @@ typedef struct _Elm_Layout_Smart_Data
Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */
Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/
Eina_Bool automatic_orientation_apply : 1;
+ Eina_Bool model_bound : 1; /**< Set to true once we are watching over a model*/
+ Eina_Bool model_watch : 1; /**< Set to true once we do watch for model change*/
} Efl_Ui_Layout_Data;
/**