aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2017-06-14 23:34:03 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2017-06-15 15:30:09 +0900
commit7a66fdc7847395c23b13195d19b35f49fb9b2634 (patch)
tree43e885f4708566fa96004df09749b068be74efae
parentadd scrollbar_mode property to efl.ui.scrollable interface (diff)
downloadefl-7a66fdc7847395c23b13195d19b35f49fb9b2634.tar.gz
make "content" as a property of Elm.Pan class
_elm_pan_content_set was an internal function so efl_ui_scroll_manager could not use it directly. this commit makes it public and available for external usage. this is a pre-step for removing elm_interface_scrollable from efl_ui_scroll_manager.
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c12
-rw-r--r--src/lib/elementary/elm_pan.eo8
2 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 4c1e4a74bc..cdd4b55147 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -45,7 +45,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{NULL, NULL}
};
-static void _elm_pan_content_set(Evas_Object *, Evas_Object *);
static void
_elm_scroll_scroll_to_x(Elm_Scrollable_Smart_Interface_Data *sid,
double t_in,
@@ -96,7 +95,7 @@ _elm_pan_efl_canvas_group_group_add(Eo *obj, Elm_Pan_Smart_Data *priv)
EOLIAN static void
_elm_pan_efl_canvas_group_group_del(Eo *obj, Elm_Pan_Smart_Data *_pd EINA_UNUSED)
{
- _elm_pan_content_set(obj, NULL);
+ elm_obj_pan_content_set(obj, NULL);
efl_canvas_group_del(efl_super(obj, MY_PAN_CLASS));
}
@@ -240,14 +239,13 @@ _elm_pan_content_resize_cb(void *data,
efl_event_callback_legacy_call(psd->self, ELM_PAN_EVENT_CHANGED, NULL);
}
-static void
+EOLIAN static void
_elm_pan_content_set(Evas_Object *obj,
+ Elm_Pan_Smart_Data *psd,
Evas_Object *content)
{
Evas_Coord w, h;
- ELM_PAN_DATA_GET_OR_RETURN(obj, psd);
-
if (content == psd->content) return;
if (psd->content)
{
@@ -3935,7 +3933,7 @@ _elm_interface_scrollable_content_set(Eo *obj, Elm_Scrollable_Smart_Interface_Da
if (sid->content)
{
/* if we had content, for sure we had a pan object */
- _elm_pan_content_set(sid->pan_obj, NULL);
+ elm_obj_pan_content_set(sid->pan_obj, NULL);
evas_object_event_callback_del_full
(sid->content, EVAS_CALLBACK_DEL, _elm_scroll_content_del_cb, sid);
}
@@ -3960,7 +3958,7 @@ _elm_interface_scrollable_content_set(Eo *obj, Elm_Scrollable_Smart_Interface_Da
evas_object_event_callback_add
(content, EVAS_CALLBACK_DEL, _elm_scroll_content_del_cb, sid);
- _elm_pan_content_set(sid->pan_obj, content);
+ elm_obj_pan_content_set(sid->pan_obj, content);
elm_obj_pan_content_size_get(sid->pan_obj, &w, &h);
sid->content_info.w = w;
sid->content_info.h = h;
diff --git a/src/lib/elementary/elm_pan.eo b/src/lib/elementary/elm_pan.eo
index f1313dcc4b..96482325e0 100644
--- a/src/lib/elementary/elm_pan.eo
+++ b/src/lib/elementary/elm_pan.eo
@@ -6,6 +6,14 @@ class Elm.Pan (Efl.Canvas.Group.Clipped)
event_prefix: elm_pan;
data: Elm_Pan_Smart_Data;
methods {
+ @property content {
+ [[Content]]
+ set {
+ }
+ values {
+ content: Efl.Canvas.Object @nullable; [[Content object]]
+ }
+ }
@property pos {
[[Position]]
set {