summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-03-19 15:16:32 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2020-03-19 17:28:03 +0900
commit0f83f2bf4a9f4818f659c8ceeccbaed4a47cac84 (patch)
tree96e560e376b982694420af42f1a0dc79265d1c81
parente8ea9741ec8db10089c8fa3fd3cc74c7009af258 (diff)
+ rule_value_provider_overridedevs/jsuya/mi_controller
-rw-r--r--src/lib/elementary/efl_ui_mi_controller.c7
-rw-r--r--src/lib/elementary/efl_ui_mi_controller.eo6
-rw-r--r--src/lib/elementary/efl_ui_mi_rule.c30
-rw-r--r--src/lib/elementary/efl_ui_mi_rule.eo8
-rw-r--r--src/lib/elementary/efl_ui_mi_rule_private.h1
5 files changed, 48 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_mi_controller.c b/src/lib/elementary/efl_ui_mi_controller.c
index 690babeee1..4745ff6751 100644
--- a/src/lib/elementary/efl_ui_mi_controller.c
+++ b/src/lib/elementary/efl_ui_mi_controller.c
@@ -255,6 +255,13 @@ _animation_playback_progress_changed_cb(void *data, const Efl_Event *event)
255} 255}
256 256
257EOLIAN static void 257EOLIAN static void
258_efl_ui_mi_controller_value_provider_override(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Controller_Data *pd, Efl_Gfx_Vg_Value_Provider *value_provider)
259{
260 if (!value_provider) return;
261 efl_ui_vg_animation_value_provider_override(pd->anim, value_provider);
262}
263
264EOLIAN static void
258_efl_ui_mi_controller_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Mi_Controller_Data *pd) 265_efl_ui_mi_controller_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Mi_Controller_Data *pd)
259{ 266{
260 efl_canvas_group_add(efl_super(obj, MY_CLASS)); 267 efl_canvas_group_add(efl_super(obj, MY_CLASS));
diff --git a/src/lib/elementary/efl_ui_mi_controller.eo b/src/lib/elementary/efl_ui_mi_controller.eo
index a428e6ba4e..8afae44434 100644
--- a/src/lib/elementary/efl_ui_mi_controller.eo
+++ b/src/lib/elementary/efl_ui_mi_controller.eo
@@ -67,6 +67,12 @@ class @beta Efl.Ui.Mi_Controller extends Efl.Ui.Widget implements Efl.File, Efl.
67 } 67 }
68 return: bool; [[$true when it's successful. $false otherwise.]] 68 return: bool; [[$true when it's successful. $false otherwise.]]
69 } 69 }
70 value_provider_override @beta {
71 [[ ]]
72 params {
73 value_provider: Efl.Gfx.Vg.Value_Provider;
74 }
75 }
70 } 76 }
71 implements { 77 implements {
72 Efl.Object.constructor; 78 Efl.Object.constructor;
diff --git a/src/lib/elementary/efl_ui_mi_rule.c b/src/lib/elementary/efl_ui_mi_rule.c
index 92497fbd96..125b1761c0 100644
--- a/src/lib/elementary/efl_ui_mi_rule.c
+++ b/src/lib/elementary/efl_ui_mi_rule.c
@@ -40,7 +40,7 @@ tap_gesture_cb(void *data , const Efl_Event *ev)
40 case EFL_GESTURE_STATE_CANCELED: 40 case EFL_GESTURE_STATE_CANCELED:
41 break;*/ 41 break;*/
42 case EFL_GESTURE_STATE_FINISHED: 42 case EFL_GESTURE_STATE_FINISHED:
43 efl_event_callback_call(obj, EFL_EVENT_GESTURE_TAP, &ev); 43 efl_event_callback_call(obj, EFL_EVENT_GESTURE_TAP, g);
44 break; 44 break;
45 default: 45 default:
46 break; 46 break;
@@ -48,8 +48,9 @@ tap_gesture_cb(void *data , const Efl_Event *ev)
48} 48}
49 49
50EOLIAN static void 50EOLIAN static void
51_efl_ui_mi_rule_keypath_set(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd, const char* keypath) 51_efl_ui_mi_rule_keypath_set(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd, Eina_Stringshare *keypath)
52{ 52{
53 if (!keypath) return;
53 Eo *parent; 54 Eo *parent;
54 Eo *object = obj; 55 Eo *object = obj;
55 Evas *e = NULL; 56 Evas *e = NULL;
@@ -73,6 +74,8 @@ _efl_ui_mi_rule_keypath_set(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd, const
73 printf("%s (%p)\n", efl_class_name_get(efl_class_get(parent)), parent); 74 printf("%s (%p)\n", efl_class_name_get(efl_class_get(parent)), parent);
74#endif 75#endif
75 76
77 eina_stringshare_replace(&pd->keypath, keypath);
78
76 evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE, _tb_resize, pd->event_rect); 79 evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE, _tb_resize, pd->event_rect);
77 if (!strcmp(keypath, "*")) 80 if (!strcmp(keypath, "*"))
78 { 81 {
@@ -86,12 +89,32 @@ _efl_ui_mi_rule_keypath_set(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd, const
86 89
87} 90}
88 91
89EOLIAN const char* 92EOLIAN const Eina_Stringshare*
90_efl_ui_mi_rule_keypath_get(const Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd) 93_efl_ui_mi_rule_keypath_get(const Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd)
91{ 94{
92 return NULL; 95 return NULL;
93} 96}
94 97
98EOLIAN static void
99_efl_ui_mi_rule_value_provider_override(Eo *obj EINA_UNUSED, Efl_Ui_Mi_Rule_Data *pd, Efl_Gfx_Vg_Value_Provider *value_provider)
100{
101 if (!value_provider) return;
102 Eo *parent;
103 Eo *object = obj;
104 Evas *e = NULL;
105 do
106 {
107 parent = efl_parent_get(object);
108 if (!parent) continue;
109
110 if (efl_class_get(parent) == EFL_UI_MI_CONTROLLER_CLASS) break;
111 object = parent;
112 } while(!e);
113
114 if (!efl_gfx_vg_value_provider_keypath_get(value_provider))
115 efl_gfx_vg_value_provider_keypath_set(value_provider, pd->keypath);
116 efl_ui_mi_controller_value_provider_override(parent, value_provider);
117}
95 118
96EOLIAN static void 119EOLIAN static void
97_efl_ui_mi_rule_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Mi_Rule_Data *priv) 120_efl_ui_mi_rule_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Mi_Rule_Data *priv)
@@ -112,6 +135,7 @@ EOLIAN static void
112_efl_ui_mi_rule_efl_object_destructor(Eo *obj, 135_efl_ui_mi_rule_efl_object_destructor(Eo *obj,
113 Efl_Ui_Mi_Rule_Data *pd EINA_UNUSED) 136 Efl_Ui_Mi_Rule_Data *pd EINA_UNUSED)
114{ 137{
138 if (pd->keypath) eina_stringshare_del(pd->keypath);
115 efl_destructor(efl_super(obj, MY_CLASS)); 139 efl_destructor(efl_super(obj, MY_CLASS));
116} 140}
117 141
diff --git a/src/lib/elementary/efl_ui_mi_rule.eo b/src/lib/elementary/efl_ui_mi_rule.eo
index 339dc52c05..be5f1ac082 100644
--- a/src/lib/elementary/efl_ui_mi_rule.eo
+++ b/src/lib/elementary/efl_ui_mi_rule.eo
@@ -14,7 +14,13 @@ class @beta Efl.Ui.Mi_Rule extends Efl.Object implements Efl.Canvas.Gesture_Even
14 get { 14 get {
15 } 15 }
16 values { 16 values {
17 keypath: string; [[ ]] 17 keypath: stringshare; [[ ]]
18 }
19 }
20 value_provider_override @beta {
21 [[ ]]
22 params {
23 value_provider: Efl.Gfx.Vg.Value_Provider;
18 } 24 }
19 } 25 }
20 } 26 }
diff --git a/src/lib/elementary/efl_ui_mi_rule_private.h b/src/lib/elementary/efl_ui_mi_rule_private.h
index 18de373c36..b417887994 100644
--- a/src/lib/elementary/efl_ui_mi_rule_private.h
+++ b/src/lib/elementary/efl_ui_mi_rule_private.h
@@ -9,6 +9,7 @@ typedef struct _Efl_Ui_Mi_Rule_Data Efl_Ui_Mi_Rule_Data;
9struct _Efl_Ui_Mi_Rule_Data 9struct _Efl_Ui_Mi_Rule_Data
10{ 10{
11 Evas_Object *event_rect; 11 Evas_Object *event_rect;
12 Eina_Stringshare *keypath;
12}; 13};
13 14
14#define EFL_UI_MI_RULE_DATA_GET(o, sd) \ 15#define EFL_UI_MI_RULE_DATA_GET(o, sd) \