summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-31 14:28:23 -0400
committerCedric BAIL <cedric.bail@free.fr>2019-07-31 14:00:13 -0700
commit407a0aa3671c726f9f311f9586e8555919a55f04 (patch)
tree82a3bb07696e5ac542b91c92e8285660e47f29a9 /src/lib
parentdd11dadfefbcc7f8e0bc7475dcd687a3e5cc874a (diff)
elm/colorselector: directly use smart callback api here
this is not a mixed legacy+unified widget, so we don't need to use efl api here Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9464
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_colorselector.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c
index bb1d5f4444..c45bedba61 100644
--- a/src/lib/elementary/elm_colorselector.c
+++ b/src/lib/elementary/elm_colorselector.c
@@ -604,8 +604,8 @@ _update_hsla_from_colorbar(Evas_Object *obj, Color_Type type, double x)
604 _update_colorbars(sd); 604 _update_colorbars(sd);
605 if ((sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_PICKER)) 605 if ((sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_PICKER))
606 _color_picker_init(sd); 606 _color_picker_init(sd);
607 efl_event_callback_legacy_call(obj, ELM_COLORSELECTOR_EVENT_CHANGED, NULL); 607 evas_object_smart_callback_call(obj, "changed", NULL);
608 efl_event_callback_legacy_call(obj, ELM_COLORSELECTOR_EVENT_CHANGED_USER, NULL); 608 evas_object_smart_callback_call(obj, "changed,user", NULL);
609} 609}
610 610
611static void 611static void
@@ -662,7 +662,7 @@ _colors_set(Evas_Object *obj,
662 if ((sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_PICKER)) 662 if ((sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_PICKER))
663 _color_picker_init(sd); 663 _color_picker_init(sd);
664 if (!mode_change) 664 if (!mode_change)
665 efl_event_callback_legacy_call(obj, ELM_COLORSELECTOR_EVENT_CHANGED, NULL); 665 evas_object_smart_callback_call(obj, "changed", NULL);
666} 666}
667 667
668static void 668static void
@@ -707,7 +707,7 @@ _spinner_changed_cb(void *data, const Efl_Event *event)
707 break; 707 break;
708 } 708 }
709 evas_object_data_del(event->object, "_changed"); 709 evas_object_data_del(event->object, "_changed");
710 efl_event_callback_legacy_call(parent, ELM_COLORSELECTOR_EVENT_CHANGED_USER, NULL); 710 evas_object_smart_callback_call(parent, "changed,user", NULL);
711} 711}
712 712
713#ifdef HAVE_ELEMENTARY_X 713#ifdef HAVE_ELEMENTARY_X
@@ -795,7 +795,7 @@ _mouse_up_cb(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
795 795
796 _unselect_selected_item(sd); 796 _unselect_selected_item(sd);
797 _colors_set(o, r, g, b, 0xFF, EINA_FALSE); 797 _colors_set(o, r, g, b, 0xFF, EINA_FALSE);
798 efl_event_callback_legacy_call(o, ELM_COLORSELECTOR_EVENT_CHANGED_USER, NULL); 798 evas_object_smart_callback_call(o, "changed,user", NULL);
799 799
800 return EINA_TRUE; 800 return EINA_TRUE;
801} 801}
@@ -1569,8 +1569,7 @@ _on_color_long_press(void *data)
1569 1569
1570 sd->longpress_timer = NULL; 1570 sd->longpress_timer = NULL;
1571 1571
1572 efl_event_callback_legacy_call 1572 evas_object_smart_callback_call(WIDGET(item), "color,item,longpressed", EO_OBJ(item));
1573 (WIDGET(item), ELM_COLORSELECTOR_EVENT_COLOR_ITEM_LONGPRESSED, EO_OBJ(item));
1574 1573
1575 return ECORE_CALLBACK_CANCEL; 1574 return ECORE_CALLBACK_CANCEL;
1576} 1575}
@@ -1644,8 +1643,7 @@ _on_color_released(void *data,
1644 elm_object_signal_emit(VIEW(item), "elm,state,selected", "elm"); 1643 elm_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
1645 elm_colorselector_color_set(WIDGET(item), item->color->r, item->color->g, 1644 elm_colorselector_color_set(WIDGET(item), item->color->r, item->color->g,
1646 item->color->b, item->color->a); 1645 item->color->b, item->color->a);
1647 efl_event_callback_legacy_call 1646 evas_object_smart_callback_call(WIDGET(item), "color,item,selected", EO_OBJ(item));
1648 (WIDGET(item), ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED, EO_OBJ(item));
1649 1647
1650 eo_temp_item = eina_list_data_get(sd->selected); 1648 eo_temp_item = eina_list_data_get(sd->selected);
1651 if (eo_temp_item && (eo_temp_item != EO_OBJ(item))) 1649 if (eo_temp_item && (eo_temp_item != EO_OBJ(item)))
@@ -2540,8 +2538,7 @@ _elm_color_item_selected_set(Eo *eo_item,
2540 if (eo_item == eo_temp_item) sd->selected = l; 2538 if (eo_item == eo_temp_item) sd->selected = l;
2541 2539
2542 elm_object_signal_emit(VIEW(item), "elm,anim,activate", "elm"); 2540 elm_object_signal_emit(VIEW(item), "elm,anim,activate", "elm");
2543 efl_event_callback_legacy_call 2541 evas_object_smart_callback_call(WIDGET(item), "color,item,selected", EO_OBJ(item));
2544 (WIDGET(item), ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED, eo_item);
2545 } 2542 }
2546} 2543}
2547 2544