summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_dayselector.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-29 20:06:25 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-20 16:02:02 +0200
commit89102ecbd3bb99c996d7b34fbbb55900686200bc (patch)
tree9dfb0db1da14ca205c2772372ad23a6d922c6023 /src/lib/elementary/elm_dayselector.c
parent8cc340e8b2016bab13872e19abcde6a0b438b4db (diff)
efl_ui_radio: cleanup API
This is a bit of a giant commit. However, the problem here is that cleaning up the API went hand in hand with rewriting most of the usages. In the process of renewing and removing old API the following was done: - Legacy API testcases have been ported back to smart callbacks - EO-API testcases have been ported to efl_add syntax - weird event #defines have been removed - Wrong constructor usage has been removed - Ported to the new box object introduced before - removed legacy API from efl_ui_radio -> no more ptr(int) q66 will do jumps of happiness -> no more ununderstandable group_add methods -> Seperated code in blocks only for legacy, and blocks only for non-legacy To verify this commit, you can check all the tests that have been touched here. Additionally, the cxx example has been adjusted ref T7867 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9060
Diffstat (limited to 'src/lib/elementary/elm_dayselector.c')
-rw-r--r--src/lib/elementary/elm_dayselector.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index 781ee0c..d014952 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -204,11 +204,11 @@ _item_signal_emit_cb(void *data,
204} 204}
205 205
206static void 206static void
207_item_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED) 207_item_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
208{ 208{
209 Elm_Dayselector_Item_Data *it = data; 209 Elm_Dayselector_Item_Data *it = data;
210 210
211 efl_event_callback_legacy_call(WIDGET(it), EFL_UI_CHECK_EVENT_CHANGED, (void *)it->day); 211 evas_object_smart_callback_call(WIDGET(it), "changed", event_info);
212} 212}
213 213
214static Elm_Dayselector_Item_Data * 214static Elm_Dayselector_Item_Data *
@@ -295,8 +295,7 @@ _elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item
295 snprintf(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it)); 295 snprintf(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it));
296 elm_layout_signal_emit(obj, buf, "elm"); 296 elm_layout_signal_emit(obj, buf, "elm");
297 297
298 efl_event_callback_add 298 evas_object_smart_callback_add(VIEW(it), "changed", _item_clicked_cb, it);
299 (VIEW(it), EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it);
300 evas_object_event_callback_add 299 evas_object_event_callback_add
301 (VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb, obj); 300 (VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb, obj);
302 301
@@ -342,7 +341,7 @@ _elm_dayselector_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *it
342 if (!content) return NULL; 341 if (!content) return NULL;
343 342
344 sd->items = eina_list_remove(sd->items, it); 343 sd->items = eina_list_remove(sd->items, it);
345 efl_event_callback_del(content, EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it); 344 evas_object_smart_callback_del_full(content, "changed", _item_clicked_cb, it);
346 evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _item_del_cb); 345 evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _item_del_cb);
347 346
348 elm_object_signal_callback_del 347 elm_object_signal_callback_del