summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-28 18:02:56 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-28 18:42:45 +0200
commita864d62ecfeb09177cc4f4d311351477879e229e (patch)
treee88d4cca61d71b6ae75c971546e3df6d17ec120b /src/lib/elementary
parent2a1ef9fce74cbae6dfe82cc55180e50737706b81 (diff)
elm_*: make scrolling correct again
in revision D9859 the scroll events have been renamed. However this also renamed the legacy widgets, which also renamed the evas smart events, which is a bug. With this commit we are back to plain old evas_smart_callback_call calls, as these just take the string, and do not need the bypassing through the eo events. This fixes: - elm_test gengrid,toolbar,panel (the events are now shown correctly again) - scrolling in elm_code_widget - elm_map in a touchscreen Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10240
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_entry.c3
-rw-r--r--src/lib/elementary/elm_gengrid.c10
-rw-r--r--src/lib/elementary/elm_genlist.c10
-rw-r--r--src/lib/elementary/elm_map.c15
-rw-r--r--src/lib/elementary/elm_panel.c3
-rw-r--r--src/lib/elementary/elm_scroller.c16
-rw-r--r--src/lib/elementary/elm_toolbar.c10
7 files changed, 28 insertions, 39 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 28fcd55..4cbf725 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -5149,8 +5149,7 @@ _scroll_cb(Evas_Object *obj, void *data EINA_UNUSED)
5149{ 5149{
5150 ELM_ENTRY_DATA_GET(obj, sd); 5150 ELM_ENTRY_DATA_GET(obj, sd);
5151 /* here we need to emit the signal that the elm_scroller would have done */ 5151 /* here we need to emit the signal that the elm_scroller would have done */
5152 efl_event_callback_legacy_call 5152 evas_object_smart_callback_call(obj, "scroll", NULL);
5153 (obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL);
5154 5153
5155 if (sd->have_selection) 5154 if (sd->have_selection)
5156 _update_selection_handler(obj); 5155 _update_selection_handler(obj);
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 39e6c2a..a162fb7 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -3714,28 +3714,28 @@ static void
3714_scroll_animate_start_cb(Evas_Object *obj, 3714_scroll_animate_start_cb(Evas_Object *obj,
3715 void *data EINA_UNUSED) 3715 void *data EINA_UNUSED)
3716{ 3716{
3717 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_STARTED, NULL); 3717 evas_object_smart_callback_call(obj, "anim,start", NULL);
3718} 3718}
3719 3719
3720static void 3720static void
3721_scroll_animate_stop_cb(Evas_Object *obj, 3721_scroll_animate_stop_cb(Evas_Object *obj,
3722 void *data EINA_UNUSED) 3722 void *data EINA_UNUSED)
3723{ 3723{
3724 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_FINISHED, NULL); 3724 evas_object_smart_callback_call(obj, "anim,stop", NULL);
3725} 3725}
3726 3726
3727static void 3727static void
3728_scroll_drag_start_cb(Evas_Object *obj, 3728_scroll_drag_start_cb(Evas_Object *obj,
3729 void *data EINA_UNUSED) 3729 void *data EINA_UNUSED)
3730{ 3730{
3731 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_STARTED, NULL); 3731 evas_object_smart_callback_call(obj, "drag,start", NULL);
3732} 3732}
3733 3733
3734static void 3734static void
3735_scroll_drag_stop_cb(Evas_Object *obj, 3735_scroll_drag_stop_cb(Evas_Object *obj,
3736 void *data EINA_UNUSED) 3736 void *data EINA_UNUSED)
3737{ 3737{
3738 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_FINISHED, NULL); 3738 evas_object_smart_callback_call(obj, "drag,stop", NULL);
3739} 3739}
3740 3740
3741static void 3741static void
@@ -3777,7 +3777,7 @@ static void
3777_scroll_cb(Evas_Object *obj, 3777_scroll_cb(Evas_Object *obj,
3778 void *data EINA_UNUSED) 3778 void *data EINA_UNUSED)
3779{ 3779{
3780 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL); 3780 evas_object_smart_callback_call(obj, "changed", NULL);
3781} 3781}
3782 3782
3783static int 3783static int
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 09dd0df..1c0864e 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -5541,35 +5541,35 @@ static void
5541_scroll_animate_start_cb(Evas_Object *obj, 5541_scroll_animate_start_cb(Evas_Object *obj,
5542 void *data EINA_UNUSED) 5542 void *data EINA_UNUSED)
5543{ 5543{
5544 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_STARTED, NULL); 5544 evas_object_smart_callback_call(obj, "anim,start", NULL);
5545} 5545}
5546 5546
5547static void 5547static void
5548_scroll_animate_stop_cb(Evas_Object *obj, 5548_scroll_animate_stop_cb(Evas_Object *obj,
5549 void *data EINA_UNUSED) 5549 void *data EINA_UNUSED)
5550{ 5550{
5551 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_FINISHED, NULL); 5551 evas_object_smart_callback_call(obj, "anim,stop", NULL);
5552} 5552}
5553 5553
5554static void 5554static void
5555_scroll_drag_start_cb(Evas_Object *obj, 5555_scroll_drag_start_cb(Evas_Object *obj,
5556 void *data EINA_UNUSED) 5556 void *data EINA_UNUSED)
5557{ 5557{
5558 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_STARTED, NULL); 5558 evas_object_smart_callback_call(obj, "drag,start", NULL);
5559} 5559}
5560 5560
5561static void 5561static void
5562_scroll_cb(Evas_Object *obj, 5562_scroll_cb(Evas_Object *obj,
5563 void *data EINA_UNUSED) 5563 void *data EINA_UNUSED)
5564{ 5564{
5565 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL); 5565 evas_object_smart_callback_call(obj, "changed", NULL);
5566} 5566}
5567 5567
5568static void 5568static void
5569_scroll_drag_stop_cb(Evas_Object *obj, 5569_scroll_drag_stop_cb(Evas_Object *obj,
5570 void *data EINA_UNUSED) 5570 void *data EINA_UNUSED)
5571{ 5571{
5572 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_FINISHED, NULL); 5572 evas_object_smart_callback_call(obj, "drag,stop", NULL);
5573} 5573}
5574 5574
5575static void 5575static void
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 6590616..ea509c8 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -1307,8 +1307,7 @@ _scr_timeout_cb(void *data)
1307 1307
1308 _smooth_update(sd); 1308 _smooth_update(sd);
1309 sd->scr_timer = NULL; 1309 sd->scr_timer = NULL;
1310 efl_event_callback_legacy_call 1310 evas_object_smart_callback_call(sd->obj, "drag,stop", NULL);
1311 (sd->obj, EFL_UI_EVENT_SCROLL_DRAG_FINISHED, NULL);
1312 1311
1313 return ECORE_CALLBACK_CANCEL; 1312 return ECORE_CALLBACK_CANCEL;
1314} 1313}
@@ -1321,12 +1320,10 @@ _scroll_cb(Evas_Object *obj,
1321 1320
1322 if (sd->scr_timer) ecore_timer_del(sd->scr_timer); 1321 if (sd->scr_timer) ecore_timer_del(sd->scr_timer);
1323 else 1322 else
1324 efl_event_callback_legacy_call 1323 evas_object_smart_callback_call(sd->obj, "drag,stop", NULL);
1325 (sd->obj, EFL_UI_EVENT_SCROLL_DRAG_STARTED, NULL);
1326 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del); 1324 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
1327 sd->scr_timer = ecore_timer_add(0.25, _scr_timeout_cb, obj); 1325 sd->scr_timer = ecore_timer_add(0.25, _scr_timeout_cb, obj);
1328 efl_event_callback_legacy_call 1326 evas_object_smart_callback_call(sd->obj, "scroll", NULL);
1329 (sd->obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL);
1330} 1327}
1331 1328
1332static void 1329static void
@@ -1335,8 +1332,7 @@ _scroll_animate_start_cb(Evas_Object *obj,
1335{ 1332{
1336 ELM_MAP_DATA_GET(obj, sd); 1333 ELM_MAP_DATA_GET(obj, sd);
1337 1334
1338 efl_event_callback_legacy_call 1335 evas_object_smart_callback_call(sd->obj, "anim,start", NULL);
1339 (sd->obj, EFL_UI_EVENT_SCROLL_ANIM_STARTED, NULL);
1340} 1336}
1341 1337
1342static void 1338static void
@@ -1345,8 +1341,7 @@ _scroll_animate_stop_cb(Evas_Object *obj,
1345{ 1341{
1346 ELM_MAP_DATA_GET(obj, sd); 1342 ELM_MAP_DATA_GET(obj, sd);
1347 1343
1348 efl_event_callback_legacy_call 1344 evas_object_smart_callback_call(sd->obj, "anim,stop", NULL);
1349 (sd->obj, EFL_UI_EVENT_SCROLL_ANIM_FINISHED, NULL);
1350} 1345}
1351 1346
1352static Eina_Bool 1347static Eina_Bool
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 64074a6..1468d81 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -1232,8 +1232,7 @@ _scroll_cb(Evas_Object *obj, void *data EINA_UNUSED)
1232 } 1232 }
1233 break; 1233 break;
1234 } 1234 }
1235 efl_event_callback_legacy_call 1235 evas_object_smart_callback_call(obj, "scroll", &event);
1236 (obj, EFL_UI_EVENT_SCROLL_CHANGED, (void *) &event);
1237} 1236}
1238 1237
1239EOLIAN static void 1238EOLIAN static void
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index 6c84fa5..630e900 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -487,8 +487,7 @@ static void
487_scroll_cb(Evas_Object *obj, 487_scroll_cb(Evas_Object *obj,
488 void *data EINA_UNUSED) 488 void *data EINA_UNUSED)
489{ 489{
490 efl_event_callback_legacy_call 490 evas_object_smart_callback_call(obj, "scroll", NULL);
491 (obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL);
492} 491}
493 492
494static void 493static void
@@ -523,32 +522,29 @@ static void
523_scroll_anim_start_cb(Evas_Object *obj, 522_scroll_anim_start_cb(Evas_Object *obj,
524 void *data EINA_UNUSED) 523 void *data EINA_UNUSED)
525{ 524{
526 efl_event_callback_legacy_call 525 evas_object_smart_callback_call(obj, "anim,start", NULL);
527 (obj, EFL_UI_EVENT_SCROLL_ANIM_STARTED, NULL);
528} 526}
529 527
530static void 528static void
531_scroll_anim_stop_cb(Evas_Object *obj, 529_scroll_anim_stop_cb(Evas_Object *obj,
532 void *data EINA_UNUSED) 530 void *data EINA_UNUSED)
533{ 531{
534 efl_event_callback_legacy_call 532 evas_object_smart_callback_call(obj, "anim,stop", NULL);
535 (obj, EFL_UI_EVENT_SCROLL_ANIM_FINISHED, NULL);
536} 533}
537 534
538static void 535static void
539_scroll_drag_start_cb(Evas_Object *obj, 536_scroll_drag_start_cb(Evas_Object *obj,
540 void *data EINA_UNUSED) 537 void *data EINA_UNUSED)
541{ 538{
542 efl_event_callback_legacy_call 539 evas_object_smart_callback_call(obj, "drag,start", NULL);
543 (obj, EFL_UI_EVENT_SCROLL_DRAG_STARTED, NULL);
544} 540}
545 541
542
546static void 543static void
547_scroll_drag_stop_cb(Evas_Object *obj, 544_scroll_drag_stop_cb(Evas_Object *obj,
548 void *data EINA_UNUSED) 545 void *data EINA_UNUSED)
549{ 546{
550 efl_event_callback_legacy_call 547 evas_object_smart_callback_call(obj, "drag,stop", NULL);
551 (obj, EFL_UI_EVENT_SCROLL_DRAG_FINISHED, NULL);
552} 548}
553 549
554static void 550static void
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index a54c77a..dd15fa9 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2235,21 +2235,21 @@ static void
2235_scroll_cb(Evas_Object *obj, 2235_scroll_cb(Evas_Object *obj,
2236 void *data EINA_UNUSED) 2236 void *data EINA_UNUSED)
2237{ 2237{
2238 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_CHANGED, NULL); 2238 evas_object_smart_callback_call(obj, "scroll", NULL);
2239} 2239}
2240 2240
2241static void 2241static void
2242_scroll_anim_start_cb(Evas_Object *obj, 2242_scroll_anim_start_cb(Evas_Object *obj,
2243 void *data EINA_UNUSED) 2243 void *data EINA_UNUSED)
2244{ 2244{
2245 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_STARTED, NULL); 2245 evas_object_smart_callback_call(obj, "anim,start", NULL);
2246} 2246}
2247 2247
2248static void 2248static void
2249_scroll_anim_stop_cb(Evas_Object *obj, 2249_scroll_anim_stop_cb(Evas_Object *obj,
2250 void *data EINA_UNUSED) 2250 void *data EINA_UNUSED)
2251{ 2251{
2252 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_ANIM_FINISHED, NULL); 2252 evas_object_smart_callback_call(obj, "anim,stop", NULL);
2253} 2253}
2254 2254
2255static void 2255static void
@@ -2259,14 +2259,14 @@ _scroll_drag_start_cb(Evas_Object *obj,
2259 ELM_TOOLBAR_DATA_GET(obj, sd); 2259 ELM_TOOLBAR_DATA_GET(obj, sd);
2260 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del); 2260 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
2261 2261
2262 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_STARTED, NULL); 2262 evas_object_smart_callback_call(obj, "drag,start", NULL);
2263} 2263}
2264 2264
2265static void 2265static void
2266_scroll_drag_stop_cb(Evas_Object *obj, 2266_scroll_drag_stop_cb(Evas_Object *obj,
2267 void *data EINA_UNUSED) 2267 void *data EINA_UNUSED)
2268{ 2268{
2269 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SCROLL_DRAG_FINISHED, NULL); 2269 evas_object_smart_callback_call(obj, "drag,stop", NULL);
2270} 2270}
2271 2271
2272static void 2272static void