diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index 5bbe572184..81faaa344e 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -603,7 +603,8 @@ elm_toolbar.eo \ elm_video.eo \ elm_web.eo \ elm_widget.eo \ -elm_win.eo +elm_win.eo \ +elm_widget_item.eo elm_eolian_c = $(elm_eolian_files:%.eo=%.eo.c) elm_eolian_h = $(elm_eolian_files:%.eo=%.eo.h) @@ -622,6 +623,103 @@ EXTRA_DIST += ${elementaryeolianfiles_DATA} nodist_includesunstable_HEADERS = $(elm_eolian_h) $(elm_eolian_legacy_h) CLEANFILES += $(nodist_includesunstable_HEADERS) +elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ +elementaryeolianfiles_DATA = \ + elm_widget.eo \ + elm_container.eo \ + elm_layout.eo \ + elm_interface_scrollable.eo \ + elm_pan.eo \ + elm_frame.eo \ + elm_hover.eo \ + elm_access.eo \ + elm_actionslider.eo \ + elm_app_client.eo \ + elm_app_client_view.eo \ + elm_app_server.eo \ + elm_app_server_view.eo \ + elm_atspi_app_object.eo \ + elm_interface_atspi_accessible.eo \ + elm_interface_atspi_action.eo \ + elm_interface_atspi_component.eo \ + elm_interface_atspi_editable_text.eo \ + elm_interface_atspi_image.eo \ + elm_interface_atspi_selection.eo \ + elm_interface_atspi_text.eo \ + elm_interface_atspi_value.eo \ + elm_interface_atspi_widget.eo \ + elm_interface_atspi_widget_action.eo \ + elm_interface_atspi_window.eo \ + elm_bg.eo \ + elm_box.eo \ + elm_bubble.eo \ + elm_button.eo \ + elm_calendar.eo \ + elm_check.eo \ + elm_clock.eo \ + elm_colorselector.eo \ + elm_conformant.eo \ + elm_ctxpopup.eo \ + elm_datetime.eo \ + elm_dayselector.eo \ + elm_diskselector.eo \ + elm_entry.eo \ + elm_fileselector.eo \ + elm_fileselector_button.eo \ + elm_fileselector_entry.eo \ + elm_flipselector.eo \ + elm_flip.eo \ + elm_gengrid.eo \ + elm_gengrid_pan.eo \ + elm_genlist.eo \ + elm_genlist_pan.eo \ + elm_gesture_layer.eo \ + elm_glview.eo \ + elm_grid.eo \ + elm_hoversel.eo \ + elm_image.eo \ + elm_icon.eo \ + elm_index.eo \ + elm_interface_fileselector.eo \ + elm_inwin.eo \ + elm_label.eo \ + elm_list.eo \ + elm_map_pan.eo \ + elm_map.eo \ + elm_menu.eo \ + elm_multibuttonentry.eo \ + elm_naviframe.eo \ + elm_panel.eo \ + elm_mapbuf.eo \ + elm_notify.eo \ + elm_panes.eo \ + elm_photocam.eo \ + elm_photocam_pan.eo \ + elm_photo.eo \ + elm_player.eo \ + elm_plug.eo \ + elm_popup.eo \ + elm_prefs.eo \ + elm_progressbar.eo \ + elm_radio.eo \ + elm_route.eo \ + elm_scroller.eo \ + elm_segment_control.eo \ + elm_separator.eo \ + elm_slider.eo \ + elm_slideshow.eo \ + elm_spinner.eo \ + elm_systray.eo \ + elm_table.eo \ + elm_thumb.eo \ + elm_toolbar.eo \ + elm_video.eo \ + elm_web.eo \ + elm_win.eo \ + elm_widget_item.eo + +EXTRA_DIST += ${elementaryeolianfiles_DATA} + includecxxbindingsdir = $(includedir)/elementary-cxx-@VMAJ@ if HAVE_CXX11 nodist_includecxxbindings_HEADERS = Elementary.hh $(elm_eolian_hh) diff --git a/legacy/elementary/src/lib/elc_naviframe.c b/legacy/elementary/src/lib/elc_naviframe.c index b25e7453b7..80fe8f8842 100644 --- a/legacy/elementary/src/lib/elc_naviframe.c +++ b/legacy/elementary/src/lib/elc_naviframe.c @@ -431,13 +431,13 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access) _elm_access_callback_set(_elm_access_info_get(ao), ELM_ACCESS_INFO, _access_info_cb, it); /* to access title access object, any idea? */ - ((Elm_Widget_Item *)it)->access_obj = ao; + ((Elm_Widget_Item_Data *)it)->access_obj = ao; } } else { /* to access title access object, any idea? */ - ao = ((Elm_Widget_Item *)it)->access_obj; + ao = ((Elm_Widget_Item_Data *)it)->access_obj; if (!ao) return; if (it->title_label || it->subtitle_label) diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c index cb7c0585c9..754aba9c63 100644 --- a/legacy/elementary/src/lib/elm_access.c +++ b/legacy/elementary/src/lib/elm_access.c @@ -129,7 +129,7 @@ _elm_access_elm_widget_activate(Eo *obj, void *_pd EINA_UNUSED, Elm_Activate act if (ac->activate) ac->activate(ac->activate_data, ac->part_object, - (Elm_Object_Item *)ac->widget_item); + (Elm_Object_Item *)ac->widget_item->eo_obj); return EINA_TRUE; } @@ -413,13 +413,13 @@ _access_order_del_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - Elm_Widget_Item *item = data; + Elm_Widget_Item_Data *item = data; item->access_order = eina_list_remove(item->access_order, obj); } void -_elm_access_widget_item_access_order_set(Elm_Widget_Item *item, +_elm_access_widget_item_access_order_set(Elm_Widget_Item_Data *item, Eina_List *objs) { Eina_List *l; @@ -439,14 +439,14 @@ _elm_access_widget_item_access_order_set(Elm_Widget_Item *item, } const Eina_List * -_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item) +_elm_access_widget_item_access_order_get(const Elm_Widget_Item_Data *item) { if (!item) return NULL; return item->access_order; } void -_elm_access_widget_item_access_order_unset(Elm_Widget_Item *item) +_elm_access_widget_item_access_order_unset(Elm_Widget_Item_Data *item) { Eina_List *l, *l_next; Evas_Object *o; @@ -1156,7 +1156,7 @@ _elm_access_object_unregister(Evas_Object *obj, Evas_Object *hoverobj) } EAPI void -_elm_access_widget_item_register(Elm_Widget_Item *item) +_elm_access_widget_item_register(Elm_Widget_Item_Data *item) { Evas_Object *ao, *ho; Evas_Coord x, y, w, h; @@ -1194,7 +1194,7 @@ _elm_access_widget_item_register(Elm_Widget_Item *item) } EAPI void -_elm_access_widget_item_unregister(Elm_Widget_Item *item) +_elm_access_widget_item_unregister(Elm_Widget_Item_Data *item) { Evas_Object *ao; diff --git a/legacy/elementary/src/lib/elm_colorselector.c b/legacy/elementary/src/lib/elm_colorselector.c index 425024354e..cc679fc9ee 100644 --- a/legacy/elementary/src/lib/elm_colorselector.c +++ b/legacy/elementary/src/lib/elm_colorselector.c @@ -1360,7 +1360,7 @@ _access_widget_item_register(Elm_Color_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); @@ -1800,7 +1800,7 @@ _elm_colorselector_elm_widget_focus_next(Eo *obj, Elm_Colorselector_Data *sd, El { Eina_List *items = NULL; Eina_List *l; - Elm_Widget_Item *item; + Elm_Widget_Item_Data *item; int i = 0; if (!sd) return EINA_FALSE; @@ -1842,7 +1842,7 @@ _access_obj_process(Evas_Object *obj, Eina_Bool is_access) else { EINA_LIST_FOREACH(sd->items, l, it) - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); //TODO: _elm_access_edje_object_part_object_unregister() ? } diff --git a/legacy/elementary/src/lib/elm_diskselector.c b/legacy/elementary/src/lib/elm_diskselector.c index 02b5d67f40..0e38e13ae1 100644 --- a/legacy/elementary/src/lib/elm_diskselector.c +++ b/legacy/elementary/src/lib/elm_diskselector.c @@ -669,7 +669,7 @@ _item_new(Evas_Object *obj, //XXX: ACCESS if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) { - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); _elm_access_text_set(_elm_access_info_get(it->base.access_obj), ELM_ACCESS_TYPE, E_("diskselector item")); diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c index 9c2605b79d..a539505b37 100644 --- a/legacy/elementary/src/lib/elm_gengrid.c +++ b/legacy/elementary/src/lib/elm_gengrid.c @@ -793,7 +793,7 @@ _access_widget_item_register(Elm_Gen_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); @@ -3620,7 +3620,7 @@ _access_obj_process(Elm_Gengrid_Data * sd, Eina_Bool is_access) if (!it->realized) continue; if (is_access) _access_widget_item_register(it); else - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); } } diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 7ad7faf57a..7375e87dd8 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -1543,7 +1543,7 @@ _access_widget_item_register(Elm_Gen_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); @@ -1692,7 +1692,7 @@ _item_realize(Elm_Gen_Item *it, /* access: unregister item which have no text and content */ if (_elm_config->access_mode && !it->texts && !it->contents) - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); if (!it->item->mincalcd) { @@ -4772,7 +4772,7 @@ _item_unrealize_cb(Elm_Gen_Item *it) /* access */ if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); // unswallow VIEW(it) first then manipulate VIEW(it) _decorate_item_unrealize(it); @@ -5399,7 +5399,7 @@ _access_obj_process(Elm_Genlist_Data *sd, Eina_Bool is_access) if (!it->realized) continue; if (is_access) _access_widget_item_register(it); else - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); } } else if (done) break; diff --git a/legacy/elementary/src/lib/elm_index.c b/legacy/elementary/src/lib/elm_index.c index 9fd65b9e0e..5a05862554 100644 --- a/legacy/elementary/src/lib/elm_index.c +++ b/legacy/elementary/src/lib/elm_index.c @@ -111,7 +111,7 @@ _access_widget_item_register(Elm_Index_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); @@ -1031,7 +1031,7 @@ _access_obj_process(Evas_Object *obj, Eina_Bool is_access) { if (it->level != 0) continue; if (is_access) _access_widget_item_register(it); - else _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + else _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); } if (is_access) diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c index 37c3b9d2b6..0b2f42ab5f 100644 --- a/legacy/elementary/src/lib/elm_list.c +++ b/legacy/elementary/src/lib/elm_list.c @@ -2132,10 +2132,10 @@ _access_widget_item_register(Elm_List_Item *it, Eina_Bool is_access) { Elm_Access_Info *ai; - if (!is_access) _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + if (!is_access) _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); else { - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); diff --git a/legacy/elementary/src/lib/elm_main.c b/legacy/elementary/src/lib/elm_main.c index e7ae247054..ff9f44f073 100644 --- a/legacy/elementary/src/lib/elm_main.c +++ b/legacy/elementary/src/lib/elm_main.c @@ -1653,9 +1653,27 @@ elm_coords_finger_size_adjust(int times_w, *h = elm_config_finger_size_get() * times_h; } + +// Object item Eo migration defines, will be removed later +#define IF_EO_DO(obj, func) \ + if (eo_isa((Eo *)obj, ELM_WIDGET_ITEM_CLASS)) \ + { \ + eo_do ((Eo *)obj, func); \ + return; \ + } + +#define IF_EO_RETURN(obj, type, func) \ + if (eo_isa((Eo *)obj, ELM_WIDGET_ITEM_CLASS)) \ + { \ + type ret; \ + eo_do ((Eo *)obj, ret = func); \ + return ret; \ + } + EAPI Evas_Object * elm_object_item_widget_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_widget_get()); return elm_widget_item_widget_get(it); } @@ -1664,20 +1682,23 @@ elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content) { - _elm_widget_item_part_content_set((Elm_Widget_Item *)it, part, content); + IF_EO_DO(it, elm_wdg_item_part_content_set(part, content)); + elm_widget_item_internal_part_content_set((Elm_Widget_Item_Data *)it, part, content); } EAPI Evas_Object * elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part) { - return _elm_widget_item_part_content_get((Elm_Widget_Item *)it, part); + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_part_content_get(part)); + return elm_widget_item_internal_part_content_get((Elm_Widget_Item_Data *)it, part); } EAPI Evas_Object * elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part) { - return _elm_widget_item_part_content_unset((Elm_Widget_Item *)it, part); + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_part_content_unset(part)); + return elm_widget_item_internal_part_content_unset((Elm_Widget_Item_Data *)it, part); } EAPI void @@ -1685,31 +1706,36 @@ elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label) { - _elm_widget_item_part_text_set((Elm_Widget_Item *)it, part, label); + IF_EO_DO(it, elm_wdg_item_part_text_set(part, label)); + elm_widget_item_internal_part_text_set((Elm_Widget_Item_Data *)it, part, label); } EAPI const char * elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part) { - return _elm_widget_item_part_text_get((Elm_Widget_Item *)it, part); + IF_EO_RETURN(it, const char *, elm_wdg_item_part_text_get(part)); + return elm_widget_item_internal_part_text_get((Elm_Widget_Item_Data *)it, part); } EAPI void elm_object_item_domain_translatable_part_text_set(Elm_Object_Item *it, const char *part, const char *domain, const char *text) { - _elm_widget_item_domain_translatable_part_text_set((Elm_Widget_Item *)it, part, domain, text); + IF_EO_DO(it, elm_wdg_item_domain_translatable_part_text_set(part, domain, text)); + elm_widget_item_internal_domain_translatable_part_text_set((Elm_Widget_Item_Data *)it, part, domain, text); } EAPI const char * elm_object_item_translatable_part_text_get(const Elm_Object_Item *it, const char *part) { - return _elm_widget_item_translatable_part_text_get((Elm_Widget_Item *)it, part); + IF_EO_RETURN(it, const char *, elm_wdg_item_translatable_part_text_get(part)); + return elm_widget_item_internal_translatable_part_text_get((Elm_Widget_Item_Data *)it, part); } EAPI void elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const char *part, const char *domain, Eina_Bool translatable) { - _elm_widget_item_domain_part_text_translatable_set((Elm_Widget_Item *)it, part, domain, translatable); + IF_EO_DO(it, elm_wdg_item_domain_part_text_translatable_set(part, domain, translatable)); + elm_widget_item_internal_domain_part_text_translatable_set((Elm_Widget_Item_Data *)it, part, domain, translatable); } EAPI void @@ -1746,15 +1772,18 @@ elm_object_focused_item_get(const Evas_Object *obj) EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt) { - _elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt); + IF_EO_DO(it, elm_wdg_item_access_info_set(txt)); + _elm_widget_item_internal_access_info_set((Elm_Widget_Item_Data *)it, txt); } EAPI Evas_Object * elm_object_item_access_register(Elm_Object_Item *item) { - Elm_Widget_Item *it; + IF_EO_RETURN(item, Evas_Object *, elm_wdg_item_access_register()); - it = (Elm_Widget_Item *)item; + Elm_Widget_Item_Data *it; + + it = (Elm_Widget_Item_Data *)item; _elm_access_widget_item_register(it); @@ -1765,208 +1794,243 @@ elm_object_item_access_register(Elm_Object_Item *item) EAPI void elm_object_item_access_unregister(Elm_Object_Item *item) { - _elm_access_widget_item_unregister((Elm_Widget_Item *)item); + IF_EO_DO(item, elm_wdg_item_access_unregister()); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)item); } EAPI Evas_Object * elm_object_item_access_object_get(const Elm_Object_Item *item) { + IF_EO_RETURN(item, Evas_Object *, elm_wdg_item_access_object_get()); if (!item) return NULL; - return ((Elm_Widget_Item *)item)->access_obj; + return ((Elm_Widget_Item_Data *)item)->access_obj; } EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs) { - _elm_access_widget_item_access_order_set((Elm_Widget_Item *)item, objs); + IF_EO_DO(item, elm_wdg_item_access_order_set(objs)); + _elm_access_widget_item_access_order_set((Elm_Widget_Item_Data *)item, objs); } EAPI const Eina_List * elm_object_item_access_order_get(const Elm_Object_Item *item) { - return _elm_access_widget_item_access_order_get((Elm_Widget_Item *)item); + IF_EO_RETURN(item, const Eina_List *, elm_wdg_item_access_order_get()); + return _elm_access_widget_item_access_order_get((Elm_Widget_Item_Data *)item); } EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item) { - _elm_access_widget_item_access_order_unset((Elm_Widget_Item *)item); + IF_EO_DO(item, elm_wdg_item_access_order_unset()); + _elm_access_widget_item_access_order_unset((Elm_Widget_Item_Data *)item); } EAPI void * elm_object_item_data_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_data_get()); return elm_widget_item_data_get(it); } EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data) { + IF_EO_DO(it, elm_wdg_item_data_set(data)); elm_widget_item_data_set(it, data); } EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source) { - _elm_widget_item_signal_emit((Elm_Widget_Item *)it, emission, source); + IF_EO_DO(it, elm_wdg_item_signal_emit(emission, source)); + elm_widget_item_internal_signal_emit((Elm_Widget_Item_Data *)it, emission, source); } EAPI void elm_object_item_signal_callback_add(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func, void *data) { - _elm_widget_item_signal_callback_add((Elm_Widget_Item *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func, data); + IF_EO_DO(it, elm_wdg_item_signal_callback_add(emission, source, func, data)); + elm_widget_item_internal_signal_callback_add((Elm_Widget_Item_Data *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func, data); } EAPI void * elm_object_item_signal_callback_del(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func) { - return _elm_widget_item_signal_callback_del((Elm_Widget_Item *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func); + IF_EO_RETURN(it, void *, elm_wdg_item_signal_callback_del(emission, source, func)); + return elm_widget_item_internal_signal_callback_del((Elm_Widget_Item_Data *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func); } EAPI void elm_object_item_style_set(Elm_Object_Item *it, const char *style) { + IF_EO_DO(it, elm_wdg_item_style_set(style)); elm_widget_item_style_set(it, style); } EAPI const char * elm_object_item_style_get(Elm_Object_Item *it) { + IF_EO_RETURN(it, const char *, elm_wdg_item_style_get()); return elm_widget_item_style_get(it); } EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) { - _elm_widget_item_disabled_set((Elm_Widget_Item *)it, disabled); + IF_EO_DO(it, elm_wdg_item_disabled_set(disabled)); + elm_widget_item_internal_disabled_set((Elm_Widget_Item_Data *)it, disabled); } EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it) { - return _elm_widget_item_disabled_get((Elm_Widget_Item *)it); + IF_EO_RETURN(it, Eina_Bool, elm_wdg_item_disabled_get()); + return elm_widget_item_internal_disabled_get((Elm_Widget_Item_Data *)it); } EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb) { - _elm_widget_item_del_cb_set((Elm_Widget_Item *)it, del_cb); + IF_EO_DO(it, elm_wdg_item_del_cb_set(del_cb)); + elm_widget_item_internal_del_cb_set((Elm_Widget_Item_Data *)it, del_cb); } EAPI void elm_object_item_del(Elm_Object_Item *it) { if (!it) return; - _elm_widget_item_del((Elm_Widget_Item *)it); + IF_EO_DO(it, elm_wdg_item_del()); + _elm_widget_item_internal_del((Elm_Widget_Item_Data *)it); } EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text) { + IF_EO_DO(it, elm_wdg_item_tooltip_text_set(text)); elm_widget_item_tooltip_text_set(it, text); } EAPI void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) { + IF_EO_DO(it, elm_wdg_item_tooltip_content_cb_set(func, data, del_cb)); elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb); } EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it) { + IF_EO_DO(it, elm_wdg_item_tooltip_unset()); elm_widget_item_tooltip_unset(it); } EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable) { + IF_EO_RETURN(it, Eina_Bool, elm_wdg_item_tooltip_window_mode_set(disable)); return elm_widget_item_tooltip_window_mode_set(it, disable); } EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, Eina_Bool, elm_wdg_item_tooltip_window_mode_get()); return elm_widget_item_tooltip_window_mode_get(it); } EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style) { + IF_EO_DO(it, elm_wdg_item_tooltip_style_set(style)); elm_widget_item_tooltip_style_set(it, style); } EAPI const char * elm_object_item_tooltip_style_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, const char *, elm_wdg_item_tooltip_style_get()); return elm_widget_item_tooltip_style_get(it); } EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor) { + IF_EO_DO(it, elm_wdg_item_cursor_set(cursor)); elm_widget_item_cursor_set(it, cursor); } EAPI const char * elm_object_item_cursor_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, const char *, elm_wdg_item_cursor_get()); return elm_widget_item_cursor_get(it); } EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it) { + IF_EO_DO(it, elm_wdg_item_cursor_unset()); elm_widget_item_cursor_unset(it); } EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style) { + IF_EO_DO(it, elm_wdg_item_cursor_style_set(style)); elm_widget_item_cursor_style_set(it, style); } EAPI const char * elm_object_item_cursor_style_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, const char *, elm_wdg_item_cursor_style_get()); return elm_widget_item_cursor_style_get(it); } EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) { + IF_EO_DO(it, elm_wdg_item_cursor_engine_only_set(engine_only)); elm_widget_item_cursor_engine_only_set(it, engine_only); } EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, Eina_Bool, elm_wdg_item_cursor_engine_only_get()); return elm_widget_item_cursor_engine_only_get(it); } EAPI Evas_Object * elm_object_item_track(Elm_Object_Item *it) { - return elm_widget_item_track((Elm_Widget_Item *)it); + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_track()); + return elm_widget_item_track((Elm_Widget_Item_Data *)it); } void elm_object_item_untrack(Elm_Object_Item *it) { - elm_widget_item_untrack((Elm_Widget_Item *)it); + IF_EO_DO(it, elm_wdg_item_untrack()); + elm_widget_item_untrack((Elm_Widget_Item_Data *)it); } int elm_object_item_track_get(const Elm_Object_Item *it) { - return elm_widget_item_track_get((Elm_Widget_Item *)it); + IF_EO_RETURN(it, int, elm_wdg_item_track_get()); + return elm_widget_item_track_get((Elm_Widget_Item_Data *)it); } EAPI void elm_object_item_focus_set(Elm_Object_Item *item, Eina_Bool focused) { + IF_EO_DO(item, elm_wdg_item_focus_set(focused)); elm_widget_item_focus_set(item, focused); } EAPI Eina_Bool elm_object_item_focus_get(const Elm_Object_Item *item) { + IF_EO_RETURN(item, Eina_Bool, elm_wdg_item_focus_get()); return elm_widget_item_focus_get(item); } diff --git a/legacy/elementary/src/lib/elm_object_item_migration_temp.h b/legacy/elementary/src/lib/elm_object_item_migration_temp.h new file mode 100644 index 0000000000..4563d260f4 --- /dev/null +++ b/legacy/elementary/src/lib/elm_object_item_migration_temp.h @@ -0,0 +1,4 @@ +#undef VIEW +#undef WIDGET +#define VIEW(X) X->base->view +#define WIDGET(X) X->base->widget diff --git a/legacy/elementary/src/lib/elm_segment_control.c b/legacy/elementary/src/lib/elm_segment_control.c index 5b9522002a..0d8b665c49 100644 --- a/legacy/elementary/src/lib/elm_segment_control.c +++ b/legacy/elementary/src/lib/elm_segment_control.c @@ -531,7 +531,7 @@ _access_widget_item_register(Elm_Segment_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); @@ -661,7 +661,7 @@ _access_obj_process(Elm_Segment_Control_Data *sd, Eina_Bool is_access) { if (is_access) _access_widget_item_register(it); else - _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); } } diff --git a/legacy/elementary/src/lib/elm_toolbar.c b/legacy/elementary/src/lib/elm_toolbar.c index 29e1171b4c..7c1f2737de 100644 --- a/legacy/elementary/src/lib/elm_toolbar.c +++ b/legacy/elementary/src/lib/elm_toolbar.c @@ -2189,7 +2189,7 @@ static char * _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED) { Elm_Toolbar_Item *it = (Elm_Toolbar_Item *)data; - const char *txt = ((Elm_Widget_Item *)it)->access_info; + const char *txt = ((Elm_Widget_Item_Data *)it)->access_info; if (!txt) txt = it->label; if (txt) return strdup(txt); @@ -2275,7 +2275,7 @@ static void _access_widget_item_register(Elm_Toolbar_Item *it) { Elm_Access_Info *ai; - _elm_access_widget_item_register((Elm_Widget_Item *)it); + _elm_access_widget_item_register((Elm_Widget_Item_Data *)it); ai = _elm_access_info_get(it->base.access_obj); _elm_access_text_set(ai, ELM_ACCESS_TYPE, E_("Toolbar Item")); @@ -2912,7 +2912,7 @@ _access_obj_process(Elm_Toolbar_Data * sd, Eina_Bool is_access) EINA_INLIST_FOREACH (sd->items, it) { if (is_access) _access_widget_item_register(it); - else _elm_access_widget_item_unregister((Elm_Widget_Item *)it); + else _elm_access_widget_item_unregister((Elm_Widget_Item_Data *)it); } } diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c index 02b76271a5..ced56a0722 100644 --- a/legacy/elementary/src/lib/elm_widget.c +++ b/legacy/elementary/src/lib/elm_widget.c @@ -2,6 +2,7 @@ # include "elementary_config.h" #endif +#define ELM_WIDGET_ITEM_PROTECTED #include #include "elm_priv.h" @@ -139,12 +140,18 @@ _callbacks_del(Eo *widget, void *data) } void -_elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it) +_elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *eo_it) { const char *str; - if (!it) return; - str = edje_object_data_get(VIEW(it), "focus_highlight"); + if (!eo_it) return; + if (eo_isa((Eo *)eo_it, ELM_WIDGET_ITEM_CLASS)) + { + Elm_Widget_Item_Data *it = eo_data_scope_get((Eo *)eo_it, ELM_WIDGET_ITEM_CLASS); + str = edje_object_data_get(it->view, "focus_highlight"); + } + else + str = edje_object_data_get(((Elm_Widget_Item_Data *)eo_it)->view, "focus_highlight"); if ((str) && (!strcmp(str, "on"))) elm_widget_highlight_in_theme_set(obj, EINA_TRUE); else @@ -4007,7 +4014,7 @@ _track_obj_view_update(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - Elm_Widget_Item *item = data; + Elm_Widget_Item_Data *item = data; _track_obj_update(item->track_obj, obj); return EO_CALLBACK_CONTINUE; } @@ -4029,7 +4036,7 @@ _track_obj_view_del(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - Elm_Widget_Item *item = data; + Elm_Widget_Item_Data *item = data; while (evas_object_ref_get(item->track_obj) > 0) evas_object_unref(item->track_obj); @@ -4046,7 +4053,7 @@ static void _track_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Elm_Widget_Item *item = data; + Elm_Widget_Item_Data *item = data; item->track_obj = NULL; if (!item->view) return; @@ -4063,7 +4070,7 @@ _elm_widget_item_signal_cb(void *data, Evas_Object *obj EINA_UNUSED, const char } static void * -_elm_widget_item_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *position) +_elm_widget_item_signal_callback_list_get(Elm_Widget_Item_Data *item, Eina_List *position) { Elm_Widget_Item_Signal_Data *wisd = eina_list_data_get(position); void *data; @@ -4087,6 +4094,8 @@ _elm_widget_item_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *posi return data; } +#define ERR_NOT_SUPPORTED(item, method) ERR("%s does not support %s API.", elm_widget_type_get(item->widget), method); + /** * @internal * @@ -4106,16 +4115,16 @@ _elm_widget_item_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *posi * @see elm_widget_item_del() to release memory. * @ingroup Widget */ -EAPI Elm_Widget_Item * +EAPI Elm_Widget_Item_Data * _elm_widget_item_new(Evas_Object *widget, size_t alloc_size) { if (!_elm_widget_is(widget)) return NULL; - Elm_Widget_Item *item; + Elm_Widget_Item_Data *item; - EINA_SAFETY_ON_TRUE_RETURN_VAL(alloc_size < sizeof(Elm_Widget_Item), NULL); + EINA_SAFETY_ON_TRUE_RETURN_VAL(alloc_size < sizeof(Elm_Widget_Item_Data), NULL); EINA_SAFETY_ON_TRUE_RETURN_VAL(!_elm_widget_is(widget), NULL); item = calloc(1, alloc_size); @@ -4126,8 +4135,25 @@ _elm_widget_item_new(Evas_Object *widget, return item; } +EOLIAN static void +_elm_widget_item_eo_base_constructor(Eo *eo_item, Elm_Widget_Item_Data *item) +{ + Evas_Object *widget; + eo_do (eo_item, widget = eo_parent_get()); + + if (!_elm_widget_is(widget)) + { + eo_error_set(eo_item); + return; + } + + eo_do_super(eo_item, ELM_WIDGET_ITEM_CLASS, eo_constructor()); + item->widget = widget; + item->eo_obj = eo_item; +} + EAPI void -_elm_widget_item_free(Elm_Widget_Item *item) +_elm_widget_item_free(Elm_Widget_Item_Data *item) { Elm_Translate_String_Data *ts; @@ -4157,7 +4183,16 @@ _elm_widget_item_free(Elm_Widget_Item *item) eina_hash_free(item->labels); EINA_MAGIC_SET(item, EINA_MAGIC_NONE); - free(item); + + if (!item->eo_obj) + free(item); +} + +EOLIAN static void +_elm_widget_item_eo_base_destructor(Eo *eo_item, Elm_Widget_Item_Data *item) +{ + _elm_widget_item_free(item); + eo_do_super(eo_item, ELM_WIDGET_ITEM_CLASS, eo_destructor()); } /** @@ -4183,14 +4218,28 @@ _elm_widget_item_free(Elm_Widget_Item *item) * @see elm_widget_item_del() convenience macro. * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_del(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_widget_item_internal_del(item); +} + EAPI void -_elm_widget_item_del(Elm_Widget_Item *item) +_elm_widget_item_internal_del(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); item->on_deletion = EINA_TRUE; //Widget item delete callback + if (item->eo_obj) + { + Eina_Bool del_ok; + eo_do(item->eo_obj, del_ok = elm_wdg_item_del_pre()); + if (del_ok) + eo_del(item->eo_obj); + return; + } if (item->del_pre_func) { if (item->del_pre_func((Elm_Object_Item *)item)) @@ -4210,13 +4259,19 @@ _elm_widget_item_del(Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_del_pre_hook_set(Elm_Widget_Item *item, +_elm_widget_item_del_pre_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Del_Pre_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); item->del_pre_func = func; } + +EOLIAN static Eina_Bool +_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item EINA_UNUSED) +{ + return EINA_TRUE; +} /** * @internal * @@ -4227,7 +4282,7 @@ _elm_widget_item_del_pre_hook_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI void -_elm_widget_item_style_set_hook_set(Elm_Widget_Item *item, +_elm_widget_item_style_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Style_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4245,7 +4300,7 @@ _elm_widget_item_style_set_hook_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI void -_elm_widget_item_style_get_hook_set(Elm_Widget_Item *item, +_elm_widget_item_style_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Style_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4263,7 +4318,7 @@ _elm_widget_item_style_get_hook_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI void -_elm_widget_item_focus_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Set_Cb func) +_elm_widget_item_focus_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Focus_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4280,7 +4335,7 @@ _elm_widget_item_focus_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Set_ * @ingroup Widget */ EAPI void -_elm_widget_item_focus_get_hook_set(Elm_Widget_Item *item, +_elm_widget_item_focus_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Focus_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4301,8 +4356,14 @@ _elm_widget_item_focus_get_hook_set(Elm_Widget_Item *item, * @see elm_widget_item_pre_notify_del() convenience macro. * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_pre_notify_del(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_pre_notify_del(item); +} + EAPI void -_elm_widget_item_pre_notify_del(Elm_Widget_Item *item) +elm_widget_item_internal_pre_notify_del(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); if (!item->del_func) return; @@ -4328,8 +4389,16 @@ _elm_widget_item_pre_notify_del(Elm_Widget_Item *item) * @see elm_widget_item_del_cb_set() convenience macro. * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_del_cb_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Evas_Smart_Cb func) +{ + elm_widget_item_internal_del_cb_set(item,func); +} + EAPI void -_elm_widget_item_del_cb_set(Elm_Widget_Item *item, +elm_widget_item_internal_del_cb_set(Elm_Widget_Item_Data *item, Evas_Smart_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4351,8 +4420,14 @@ _elm_widget_item_del_cb_set(Elm_Widget_Item *item, * @return owner widget of this item. * @ingroup Widget */ +EOLIAN static Evas_Object * +_elm_widget_item_widget_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_widget_get(item); +} + EAPI Evas_Object * -_elm_widget_item_widget_get(const Elm_Widget_Item *item) +elm_widget_item_internal_widget_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, NULL); @@ -4374,8 +4449,16 @@ _elm_widget_item_widget_get(const Elm_Widget_Item *item) * @see elm_widget_item_del_cb_set() convenience macro. * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_data_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const void *data) +{ + elm_widget_item_internal_data_set(item, data); +} + EAPI void -_elm_widget_item_data_set(Elm_Widget_Item *item, +elm_widget_item_internal_data_set(Elm_Widget_Item_Data *item, const void *data) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4395,15 +4478,29 @@ _elm_widget_item_data_set(Elm_Widget_Item *item, * @see elm_widget_item_data_set() * @ingroup Widget */ +EOLIAN static void * +_elm_widget_item_data_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_data_get(item); +} + EAPI void * -_elm_widget_item_data_get(const Elm_Widget_Item *item) +elm_widget_item_internal_data_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return (void *)item->data; } +EOLIAN static void +_elm_widget_item_disabled_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_Bool disabled) +{ + elm_widget_item_internal_disabled_set(item, disabled); +} + EAPI void -_elm_widget_item_disabled_set(Elm_Widget_Item *item, +elm_widget_item_internal_disabled_set(Elm_Widget_Item_Data *item, Eina_Bool disabled) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4411,33 +4508,55 @@ _elm_widget_item_disabled_set(Elm_Widget_Item *item, if (item->disabled == disabled) return; item->disabled = !!disabled; - if (item->disable_func) item->disable_func(item); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_disable()); + else + if (item->disable_func) item->disable_func(item); +} + +EOLIAN static Eina_Bool +_elm_widget_item_disabled_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_disabled_get(item); } EAPI Eina_Bool -_elm_widget_item_disabled_get(const Elm_Widget_Item *item) +elm_widget_item_internal_disabled_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return item->disabled; } +EOLIAN static void +_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, const char *style EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_style_set()"); +} + EAPI void -_elm_widget_item_style_set(Elm_Widget_Item *item, const char *style) +elm_widget_item_internal_style_set(Elm_Widget_Item_Data *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); if (item->style_set_func) item->style_set_func(item, style); } +EOLIAN static const char * +_elm_widget_item_style_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + ERR_NOT_SUPPORTED(item, "elm_object_style_get()"); + return NULL; +} + EAPI const char * -_elm_widget_item_style_get(Elm_Widget_Item *item) +elm_widget_item_internal_style_get(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return item->style_get_func ? item->style_get_func(item) : NULL; } EAPI void -_elm_widget_item_disable_hook_set(Elm_Widget_Item *item, +_elm_widget_item_disable_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Disable_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4445,22 +4564,50 @@ _elm_widget_item_disable_hook_set(Elm_Widget_Item *item, item->disable_func = func; } +EOLIAN static void +_elm_widget_item_disable(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item EINA_UNUSED) +{ +} + +EOLIAN static void +_elm_widget_item_focus_set(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, Eina_Bool focused EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_item_focus_set"); +} + EAPI void -_elm_widget_item_focus_set(Elm_Widget_Item *item, Eina_Bool focused) +elm_widget_item_internal_focus_set(Elm_Widget_Item_Data *item, Eina_Bool focused) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); item->focus_set_func(item, focused); } +EOLIAN static Eina_Bool +_elm_widget_item_focus_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + ERR_NOT_SUPPORTED(item, "elm_object_item_focus_get"); + return EINA_FALSE; +} + EAPI Eina_Bool -_elm_widget_item_focus_get(const Elm_Widget_Item *item) +elm_widget_item_internal_focus_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return item->focus_get_func(item); } +EOLIAN static void +_elm_widget_item_domain_translatable_part_text_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part, + const char *domain, + const char *label) +{ + elm_widget_item_internal_domain_translatable_part_text_set(item, part, domain, label); +} + EAPI void -_elm_widget_item_domain_translatable_part_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_domain_translatable_part_text_set(Elm_Widget_Item_Data *item, const char *part, const char *domain, const char *label) @@ -4488,12 +4635,23 @@ _elm_widget_item_domain_translatable_part_text_set(Elm_Widget_Item *item, #endif } item->on_translate = EINA_TRUE; - _elm_widget_item_part_text_set(item, part, label); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_part_text_set(part, label)); + else + elm_widget_item_internal_part_text_set(item, part, label); item->on_translate = EINA_FALSE; } +EOLIAN static const char * +_elm_widget_item_translatable_part_text_get(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part) +{ + return elm_widget_item_internal_translatable_part_text_get(item, part); +} + EAPI const char * -_elm_widget_item_translatable_part_text_get(const Elm_Widget_Item *item, +elm_widget_item_internal_translatable_part_text_get(const Elm_Widget_Item_Data *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -4505,8 +4663,18 @@ _elm_widget_item_translatable_part_text_get(const Elm_Widget_Item *item, return NULL; } +EOLIAN static void +_elm_widget_item_domain_part_text_translatable_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part, + const char *domain, + Eina_Bool translatable) +{ + elm_widget_item_internal_domain_part_text_translatable_set(item, part, domain, translatable); +} + EAPI void -_elm_widget_item_domain_part_text_translatable_set(Elm_Widget_Item *item, +elm_widget_item_internal_domain_part_text_translatable_set(Elm_Widget_Item_Data *item, const char *part, const char *domain, Eina_Bool translatable) @@ -4522,7 +4690,11 @@ _elm_widget_item_domain_part_text_translatable_set(Elm_Widget_Item *item, if (!ts->domain) ts->domain = eina_stringshare_add(domain); else eina_stringshare_replace(&ts->domain, domain); - text = _elm_widget_item_part_text_get(item, part); + if (item->eo_obj) + eo_do(item->eo_obj, text = elm_wdg_item_part_text_get(part)); + else + text = elm_widget_item_internal_part_text_get(item, part); + if (!text || !text[0]) return; if (!ts->string) ts->string = eina_stringshare_add(text); @@ -4532,12 +4704,21 @@ _elm_widget_item_domain_part_text_translatable_set(Elm_Widget_Item *item, text = dgettext(domain, text); #endif item->on_translate = EINA_TRUE; - _elm_widget_item_part_text_set(item, part, text); + if (item->eo_obj) + eo_do (item->eo_obj, elm_wdg_item_part_text_set(part, text)); + else + elm_widget_item_internal_part_text_set(item, part, text); item->on_translate = EINA_FALSE; } +EOLIAN static void +_elm_widget_item_track_cancel(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_track_cancel(item); +} + EAPI void -_elm_widget_item_track_cancel(Elm_Widget_Item *item) +elm_widget_item_internal_track_cancel(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4550,8 +4731,14 @@ _elm_widget_item_track_cancel(Elm_Widget_Item *item) evas_object_del(item->track_obj); } +EOLIAN static Evas_Object * +_elm_widget_item_track(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_track(item); +} + EAPI Evas_Object * -elm_widget_item_track(Elm_Widget_Item *item) +elm_widget_item_track(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, NULL); @@ -4586,8 +4773,14 @@ elm_widget_item_track(Elm_Widget_Item *item) return track; } +EOLIAN static void +_elm_widget_item_untrack(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_untrack(item); +} + void -elm_widget_item_untrack(Elm_Widget_Item *item) +elm_widget_item_untrack(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4599,8 +4792,14 @@ elm_widget_item_untrack(Elm_Widget_Item *item) evas_object_del(item->track_obj); } +EOLIAN static int +_elm_widget_item_track_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_track_get(item); +} + int -elm_widget_item_track_get(const Elm_Widget_Item *item) +elm_widget_item_track_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, 0); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, 0); @@ -4613,7 +4812,7 @@ typedef struct _Elm_Widget_Item_Tooltip Elm_Widget_Item_Tooltip; struct _Elm_Widget_Item_Tooltip { - Elm_Widget_Item *item; + Elm_Widget_Item_Data *item; Elm_Tooltip_Item_Content_Cb func; Evas_Smart_Cb del_cb; const void *data; @@ -4668,8 +4867,16 @@ _elm_widget_item_tooltip_label_del_cb(void *data, * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_tooltip_text_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item EINA_UNUSED, + const char *text) +{ + elm_widget_item_internal_tooltip_text_set(item, text); +} + EAPI void -_elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_text_set(Elm_Widget_Item_Data *item, const char *text) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4677,13 +4884,27 @@ _elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, EINA_SAFETY_ON_NULL_RETURN(text); text = eina_stringshare_add(text); - _elm_widget_item_tooltip_content_cb_set - (item, _elm_widget_item_tooltip_label_create, text, - _elm_widget_item_tooltip_label_del_cb); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_tooltip_content_cb_set( + _elm_widget_item_tooltip_label_create, + text, + _elm_widget_item_tooltip_label_del_cb)); + else + elm_widget_item_internal_tooltip_content_cb_set + (item, _elm_widget_item_tooltip_label_create, text, + _elm_widget_item_tooltip_label_del_cb); +} + +EOLIAN static void +_elm_widget_item_tooltip_translatable_text_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item EINA_UNUSED, + const char *text) +{ + elm_widget_item_internal_tooltip_translatable_text_set(item, text); } EAPI void -_elm_widget_item_tooltip_translatable_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_translatable_text_set(Elm_Widget_Item_Data *item, const char *text) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4691,9 +4912,15 @@ _elm_widget_item_tooltip_translatable_text_set(Elm_Widget_Item *item, EINA_SAFETY_ON_NULL_RETURN(text); text = eina_stringshare_add(text); - _elm_widget_item_tooltip_content_cb_set - (item, _elm_widget_item_tooltip_trans_label_create, text, - _elm_widget_item_tooltip_label_del_cb); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_tooltip_content_cb_set( + _elm_widget_item_tooltip_trans_label_create, + text, + _elm_widget_item_tooltip_label_del_cb)); + else + elm_widget_item_internal_tooltip_content_cb_set + (item, _elm_widget_item_tooltip_trans_label_create, text, + _elm_widget_item_tooltip_label_del_cb); } static Evas_Object * @@ -4737,8 +4964,18 @@ _elm_widget_item_tooltip_del_cb(void *data, * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_tooltip_content_cb_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Elm_Tooltip_Item_Content_Cb func, + const void *data, + Evas_Smart_Cb del_cb) +{ + elm_widget_item_internal_tooltip_content_cb_set(item, func, data, del_cb); +} + EAPI void -_elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_content_cb_set(Elm_Widget_Item_Data *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) @@ -4750,7 +4987,10 @@ _elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, if (!func) { - _elm_widget_item_tooltip_unset(item); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_tooltip_unset()); + else + elm_widget_item_internal_tooltip_unset(item); return; } @@ -4789,8 +5029,14 @@ error: * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_tooltip_unset(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_tooltip_unset(item); +} + EAPI void -_elm_widget_item_tooltip_unset(Elm_Widget_Item *item) +elm_widget_item_internal_tooltip_unset(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4812,8 +5058,16 @@ _elm_widget_item_tooltip_unset(Elm_Widget_Item *item) * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_tooltip_style_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *style) +{ + elm_widget_item_internal_tooltip_style_set(item, style); +} + EAPI void -_elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_style_set(Elm_Widget_Item_Data *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4822,8 +5076,16 @@ _elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, elm_object_tooltip_style_set(item->view, style); } +EOLIAN static Eina_Bool +_elm_widget_item_tooltip_window_mode_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_Bool disable) +{ + return elm_widget_item_internal_tooltip_window_mode_set(item, disable); +} + EAPI Eina_Bool -_elm_widget_item_tooltip_window_mode_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_window_mode_set(Elm_Widget_Item_Data *item, Eina_Bool disable) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); @@ -4832,8 +5094,14 @@ _elm_widget_item_tooltip_window_mode_set(Elm_Widget_Item *item, return elm_object_tooltip_window_mode_set(item->view, disable); } +EOLIAN static Eina_Bool +_elm_widget_item_tooltip_window_mode_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_tooltip_window_mode_get(item); +} + EAPI Eina_Bool -_elm_widget_item_tooltip_window_mode_get(const Elm_Widget_Item *item) +elm_widget_item_internal_tooltip_window_mode_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, EINA_FALSE); @@ -4852,16 +5120,30 @@ _elm_widget_item_tooltip_window_mode_get(const Elm_Widget_Item *item) * * @ingroup Widget */ +EOLIAN static const char * +_elm_widget_item_tooltip_style_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_tooltip_style_get(item); +} + EAPI const char * -_elm_widget_item_tooltip_style_get(const Elm_Widget_Item *item) +elm_widget_item_internal_tooltip_style_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_tooltip_style_get(item->view); } +EOLIAN static void +_elm_widget_item_cursor_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *cursor) +{ + elm_widget_item_internal_cursor_set(item, cursor); +} + EAPI void -_elm_widget_item_cursor_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_set(Elm_Widget_Item_Data *item, const char *cursor) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4870,15 +5152,27 @@ _elm_widget_item_cursor_set(Elm_Widget_Item *item, elm_object_sub_cursor_set(item->view, item->widget, cursor); } +EOLIAN static const char * +_elm_widget_item_cursor_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_get(item); +} + EAPI const char * -_elm_widget_item_cursor_get(const Elm_Widget_Item *item) +elm_widget_item_internal_cursor_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_cursor_get(item->view); } +EOLIAN static void +_elm_widget_item_cursor_unset(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_cursor_unset(item); +} + EAPI void -_elm_widget_item_cursor_unset(Elm_Widget_Item *item) +elm_widget_item_internal_cursor_unset(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4899,8 +5193,16 @@ _elm_widget_item_cursor_unset(Elm_Widget_Item *item) * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_cursor_style_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *style) +{ + elm_widget_item_internal_cursor_style_set(item, style); +} + EAPI void -_elm_widget_item_cursor_style_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_style_set(Elm_Widget_Item_Data *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4920,8 +5222,15 @@ _elm_widget_item_cursor_style_set(Elm_Widget_Item *item, * * @ingroup Widget */ +EOLIAN static const char * +_elm_widget_item_cursor_style_get(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_style_get(item); +} + EAPI const char * -_elm_widget_item_cursor_style_get(const Elm_Widget_Item *item) +elm_widget_item_internal_cursor_style_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_cursor_style_get(item->view); @@ -4943,8 +5252,16 @@ _elm_widget_item_cursor_style_get(const Elm_Widget_Item *item) * * @ingroup Widget */ +EOLIAN static void +_elm_widget_item_cursor_engine_only_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_Bool engine_only) +{ + elm_widget_item_internal_cursor_engine_only_set(item, engine_only); +} + EAPI void -_elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_engine_only_set(Elm_Widget_Item_Data *item, Eina_Bool engine_only) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4965,15 +5282,21 @@ _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, * * @ingroup Widget */ +EOLIAN static Eina_Bool +_elm_widget_item_cursor_engine_only_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_engine_only_get(item); +} + EAPI Eina_Bool -_elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item) +elm_widget_item_internal_cursor_engine_only_get(const Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return !elm_object_cursor_theme_search_enabled_get(item->view); } EAPI void -_elm_widget_item_part_content_set(Elm_Widget_Item *item, +elm_widget_item_internal_part_content_set(Elm_Widget_Item_Data *item, const char *part, Evas_Object *content) { @@ -4988,8 +5311,17 @@ _elm_widget_item_part_content_set(Elm_Widget_Item *item, item->content_set_func((Elm_Object_Item *)item, part, content); } +EOLIAN static void +_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part EINA_UNUSED, + Evas_Object *content EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_part_content_set()"); +} + EAPI Evas_Object * -_elm_widget_item_part_content_get(const Elm_Widget_Item *item, +elm_widget_item_internal_part_content_get(const Elm_Widget_Item_Data *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -5003,8 +5335,17 @@ _elm_widget_item_part_content_get(const Elm_Widget_Item *item, return item->content_get_func((Elm_Object_Item *)item, part); } +EOLIAN static Evas_Object * +_elm_widget_item_part_content_get(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_part_content_get()"); + return NULL; +} + EAPI Evas_Object * -_elm_widget_item_part_content_unset(Elm_Widget_Item *item, +elm_widget_item_internal_part_content_unset(Elm_Widget_Item_Data *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -5018,8 +5359,17 @@ _elm_widget_item_part_content_unset(Elm_Widget_Item *item, return item->content_unset_func((Elm_Object_Item *)item, part); } +EOLIAN static Evas_Object * +_elm_widget_item_part_content_unset(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_part_content_unset()"); + return NULL; +} + EAPI void -_elm_widget_item_part_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_part_text_set(Elm_Widget_Item_Data *item, const char *part, const char *label) { @@ -5034,8 +5384,17 @@ _elm_widget_item_part_text_set(Elm_Widget_Item *item, item->text_set_func((Elm_Object_Item *)item, part, label); } +EOLIAN static void +_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part EINA_UNUSED, + const char *label EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_part_text_set()"); +} + EAPI const char * -_elm_widget_item_part_text_get(const Elm_Widget_Item *item, +elm_widget_item_internal_part_text_get(const Elm_Widget_Item_Data *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -5049,6 +5408,15 @@ _elm_widget_item_part_text_get(const Elm_Widget_Item *item, return item->text_get_func((Elm_Object_Item *)item, part); } +EOLIAN static const char * +_elm_widget_item_part_text_get(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_part_text_get()"); + return NULL; +} + static void _elm_widget_item_part_text_custom_free(void *data) { @@ -5059,8 +5427,17 @@ _elm_widget_item_part_text_custom_free(void *data) free(label); } +EOLIAN static void +_elm_widget_item_part_text_custom_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part, + const char *text) +{ + _elm_widget_item_internal_part_text_custom_set(item, part, text); +} + EAPI void -_elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, +_elm_widget_item_internal_part_text_custom_set(Elm_Widget_Item_Data *item, const char *part, const char *text) { @@ -5089,8 +5466,16 @@ _elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, eina_stringshare_replace(&label->text, text); } +EOLIAN static const char * +_elm_widget_item_part_text_custom_get(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part) +{ + return _elm_widget_item_internal_part_text_custom_get(item, part); +} + EAPI const char * -_elm_widget_item_part_text_custom_get(Elm_Widget_Item *item, +_elm_widget_item_internal_part_text_custom_get(Elm_Widget_Item_Data *item, const char *part) { Elm_Label_Data *label; @@ -5106,15 +5491,26 @@ _elm_widget_item_part_text_custom_foreach(const Eina_Hash *labels EINA_UNUSED, void *func_data) { Elm_Label_Data *label; - Elm_Widget_Item *item; + Elm_Widget_Item_Data *item; label = data; item = func_data; - item->text_set_func((Elm_Object_Item *)item, label->part, label->text); + + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_part_text_set(label->part, label->text)); + else + item->text_set_func((Elm_Object_Item *)item, label->part, label->text); + return EINA_TRUE; } +EOLIAN static void +_elm_widget_item_part_text_custom_update(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_widget_item_internal_part_text_custom_update(item); +} + EAPI void -_elm_widget_item_part_text_custom_update(Elm_Widget_Item *item) +_elm_widget_item_internal_part_text_custom_update(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -5124,7 +5520,7 @@ _elm_widget_item_part_text_custom_update(Elm_Widget_Item *item) } EAPI void -_elm_widget_item_content_set_hook_set(Elm_Widget_Item *item, +_elm_widget_item_content_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5134,7 +5530,7 @@ _elm_widget_item_content_set_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_content_get_hook_set(Elm_Widget_Item *item, +_elm_widget_item_content_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5144,7 +5540,7 @@ _elm_widget_item_content_get_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_content_unset_hook_set(Elm_Widget_Item *item, +_elm_widget_item_content_unset_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Unset_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5154,7 +5550,7 @@ _elm_widget_item_content_unset_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_text_set_hook_set(Elm_Widget_Item *item, +_elm_widget_item_text_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Text_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5164,7 +5560,7 @@ _elm_widget_item_text_set_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_text_get_hook_set(Elm_Widget_Item *item, +_elm_widget_item_text_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Text_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5173,8 +5569,17 @@ _elm_widget_item_text_get_hook_set(Elm_Widget_Item *item, item->text_get_func = func; } +EOLIAN static void +_elm_widget_item_signal_emit(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item EINA_UNUSED, + const char *emission EINA_UNUSED, + const char *source EINA_UNUSED) +{ + +} + EAPI void -_elm_widget_item_signal_emit(Elm_Widget_Item *item, +elm_widget_item_internal_signal_emit(Elm_Widget_Item_Data *item, const char *emission, const char *source) { @@ -5186,7 +5591,7 @@ _elm_widget_item_signal_emit(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *item, +_elm_widget_item_signal_emit_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Signal_Emit_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5195,8 +5600,19 @@ _elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *item, item->signal_emit_func = func; } +EOLIAN static void +_elm_widget_item_signal_callback_add(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *emission, + const char *source, + Elm_Object_Item_Signal_Cb func, + void *data) +{ + elm_widget_item_internal_signal_callback_add(item, emission, source,(Elm_Widget_Item_Signal_Cb)func, data); +} + EAPI void -_elm_widget_item_signal_callback_add(Elm_Widget_Item *item, +elm_widget_item_internal_signal_callback_add(Elm_Widget_Item_Data *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func, @@ -5232,8 +5648,18 @@ _elm_widget_item_signal_callback_add(Elm_Widget_Item *item, item->signals = eina_list_append(item->signals, wisd); } +EOLIAN static void * +_elm_widget_item_signal_callback_del(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *emission, + const char *source, + Elm_Object_Item_Signal_Cb func) +{ + return elm_widget_item_internal_signal_callback_del(item, emission, source, (Elm_Widget_Item_Signal_Cb)func); +} + EAPI void * -_elm_widget_item_signal_callback_del(Elm_Widget_Item *item, +elm_widget_item_internal_signal_callback_del(Elm_Widget_Item_Data *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func) @@ -5256,8 +5682,16 @@ _elm_widget_item_signal_callback_del(Elm_Widget_Item *item, return NULL; } +EOLIAN static void +_elm_widget_item_access_info_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *txt) +{ + _elm_widget_item_internal_access_info_set(item, txt); +} + EAPI void -_elm_widget_item_access_info_set(Elm_Widget_Item *item, +_elm_widget_item_internal_access_info_set(Elm_Widget_Item_Data *item, const char *txt) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5268,8 +5702,14 @@ _elm_widget_item_access_info_set(Elm_Widget_Item *item, else item->access_info = eina_stringshare_add(txt); } +EOLIAN static void +_elm_widget_item_translate(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_translate(item); +} + EAPI void -_elm_widget_item_translate(Elm_Widget_Item *item) +elm_widget_item_internal_translate(Elm_Widget_Item_Data *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -5281,12 +5721,54 @@ _elm_widget_item_translate(Elm_Widget_Item *item) if (!ts->string) continue; const char *s = dgettext(ts->domain, ts->string); item->on_translate = EINA_TRUE; - _elm_widget_item_part_text_set(item, ts->id, s); + if (item->eo_obj) + eo_do(item->eo_obj, elm_wdg_item_part_text_set(ts->id, s)); + else + elm_widget_item_internal_part_text_set(item, ts->id, s); item->on_translate = EINA_FALSE; } #endif } +EOLIAN static void +_elm_widget_item_access_order_set(Eo *eo_item EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_List *objs) +{ + _elm_access_widget_item_access_order_set(item, objs); +} + +EOLIAN static const Eina_List * +_elm_widget_item_access_order_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return _elm_access_widget_item_access_order_get(item); +} + +EOLIAN static void +_elm_widget_item_access_order_unset(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_access_widget_item_access_order_unset(item); +} + +EOLIAN static Evas_Object* +_elm_widget_item_access_register(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_access_widget_item_register(item); + return item->access_obj; +} + +EOLIAN static void +_elm_widget_item_access_unregister(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_access_widget_item_unregister(item); +} + +EOLIAN static Evas_Object* +_elm_widget_item_access_object_get(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return item->access_obj; +} + /* happy debug functions */ #ifdef ELM_DEBUG static void @@ -5473,4 +5955,5 @@ _elm_widget_class_constructor(Eo_Class *klass) evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); } +#include "elm_widget_item.eo.c" #include "elm_widget.eo.c" diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index c82e9a5f46..6e8410dac1 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -447,7 +447,7 @@ typedef struct _Elm_Tooltip Elm_Tooltip; typedef struct _Elm_Cursor Elm_Cursor; /**< base structure for all widget items that are not Elm_Widget themselves */ -typedef struct _Elm_Widget_Item Elm_Widget_Item; +typedef struct _Elm_Widget_Item_Data Elm_Widget_Item_Data; typedef struct _Elm_Widget_Item_Signal_Data Elm_Widget_Item_Signal_Data; /**< accessibility information to be able to set and get from the access API */ @@ -466,7 +466,7 @@ typedef Evas_Object *(*Elm_Widget_Content_Unset_Cb)(const void *data, c typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const char *emission, const char *source); typedef void (*Elm_Widget_Disable_Cb)(void *data); typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data); -typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Widget_Item *item, const char *emission, const char *source); +typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Widget_Item_Data *item, const char *emission, const char *source); typedef void (*Elm_Widget_Style_Set_Cb)(void *data, const char *style); typedef const char *(*Elm_Widget_Style_Get_Cb)(const void *data); typedef void (*Elm_Widget_Focus_Set_Cb)(void *data, Eina_Bool focused); @@ -496,7 +496,7 @@ struct _Elm_Access_Info Elm_Access_Activate_Cb activate; /* the owner widget item that owns this access info */ - Elm_Widget_Item *widget_item; + Elm_Widget_Item_Data *widget_item; /* the owner part object that owns this access info */ Evas_Object *part_object; @@ -517,9 +517,9 @@ void _elm_access_mouse_event_enabled_set(Eina_Bool enabled); /* if auto_higlight is EINA_TRUE, it does not steal a focus, it just moves a highlight */ void _elm_access_auto_highlight_set(Eina_Bool enabled); Eina_Bool _elm_access_auto_highlight_get(void); -void _elm_access_widget_item_access_order_set(Elm_Widget_Item *item, Eina_List *objs); -const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item); -void _elm_access_widget_item_access_order_unset(Elm_Widget_Item *item); +void _elm_access_widget_item_access_order_set(Elm_Widget_Item_Data *item, Eina_List *objs); +const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item_Data *item); +void _elm_access_widget_item_access_order_unset(Elm_Widget_Item_Data *item); // widget focus highlight void _elm_widget_focus_highlight_start(const Evas_Object *obj); @@ -551,8 +551,8 @@ EAPI Eina_Bool _elm_access_2nd_click_timeout(Evas_Object *obj); EAPI void _elm_access_highlight_set(Evas_Object* obj); EAPI Evas_Object * _elm_access_edje_object_part_object_register(Evas_Object *obj, const Evas_Object *partobj, const char* part); EAPI void _elm_access_edje_object_part_object_unregister(Evas_Object* obj, const Evas_Object *eobj, const char* part); -EAPI void _elm_access_widget_item_register(Elm_Widget_Item *item); -EAPI void _elm_access_widget_item_unregister(Elm_Widget_Item *item); +EAPI void _elm_access_widget_item_register(Elm_Widget_Item_Data *item); +EAPI void _elm_access_widget_item_unregister(Elm_Widget_Item_Data *item); EAPI void _elm_access_on_highlight_hook_set(Elm_Access_Info *ac, Elm_Access_On_Highlight_Cb func, void *data); EAPI void _elm_access_activate_callback_set(Elm_Access_Info *ac, Elm_Access_Activate_Cb func, void *data); EAPI void _elm_access_highlight_object_activate(Evas_Object *obj, Elm_Activate act); @@ -563,18 +563,18 @@ EINA_DEPRECATED EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object * #define ELM_PREFS_DATA_MAGIC 0xe1f5da7a /**< put this as the first member in your widget item struct */ -#define ELM_WIDGET_ITEM Elm_Widget_Item base +#define ELM_WIDGET_ITEM Elm_Widget_Item_Data base struct _Elm_Widget_Item_Signal_Data { - Elm_Widget_Item *item; + Elm_Widget_Item_Data *item; Elm_Widget_Item_Signal_Cb func; const char *emission; const char *source; void *data; }; -struct _Elm_Widget_Item +struct _Elm_Widget_Item_Data { /* ef1 ~~ efl, el3 ~~ elm */ #define ELM_WIDGET_ITEM_MAGIC 0xef1e1301 @@ -582,8 +582,11 @@ struct _Elm_Widget_Item /* simple accessor macros */ #define VIEW(X) X->base.view #define WIDGET(X) X->base.widget +#define EO_OBJ(X) (Elm_Object_Item *)((X)?X->base->eo_obj:NULL) /**< the owner widget that owns this item */ Evas_Object *widget; + /**< The Eo item, useful to invoke eo_do when only the item data is available */ + Eo *eo_obj; /**< the base view object */ Evas_Object *view; /**< item specific data. used for del callback */ @@ -768,69 +771,69 @@ EAPI Elm_Object_Item *elm_widget_focused_item_get(const Evas_Object *obj); EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled); EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj); EAPI void elm_widget_focus_highlight_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); -EAPI Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size); -EAPI void _elm_widget_item_free(Elm_Widget_Item *item); -EAPI Evas_Object *_elm_widget_item_widget_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_del(Elm_Widget_Item *item); -EAPI void _elm_widget_item_pre_notify_del(Elm_Widget_Item *item); -EAPI void _elm_widget_item_del_cb_set(Elm_Widget_Item *item, Evas_Smart_Cb del_cb); -EAPI void _elm_widget_item_data_set(Elm_Widget_Item *item, const void *data); -EAPI void *_elm_widget_item_data_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, const char *text); -EAPI void _elm_widget_item_tooltip_translatable_text_set(Elm_Widget_Item *item, const char *text); -EAPI void _elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); -EAPI void _elm_widget_item_tooltip_unset(Elm_Widget_Item *item); -EAPI void _elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, const char *style); -EAPI Eina_Bool _elm_widget_item_tooltip_window_mode_set(Elm_Widget_Item *item, Eina_Bool disable); -EAPI Eina_Bool _elm_widget_item_tooltip_window_mode_get(const Elm_Widget_Item *item); -EAPI const char *_elm_widget_item_tooltip_style_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_cursor_set(Elm_Widget_Item *item, const char *cursor); -EAPI const char *_elm_widget_item_cursor_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_cursor_unset(Elm_Widget_Item *item); -EAPI void _elm_widget_item_cursor_style_set(Elm_Widget_Item *item, const char *style); -EAPI const char *_elm_widget_item_cursor_style_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only); -EAPI Eina_Bool _elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_part_content_set(Elm_Widget_Item *item, const char *part, Evas_Object *content); -EAPI Evas_Object *_elm_widget_item_part_content_get(const Elm_Widget_Item *item, const char *part); -EAPI Evas_Object *_elm_widget_item_part_content_unset(Elm_Widget_Item *item, const char *part); -EAPI void _elm_widget_item_part_text_set(Elm_Widget_Item *item, const char *part, const char *label); -EAPI const char *_elm_widget_item_part_text_get(const Elm_Widget_Item *item, const char *part); -EAPI void _elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, const char *part, const char *label); -EAPI const char *_elm_widget_item_part_text_custom_get(Elm_Widget_Item *item, const char *part); -EAPI void _elm_widget_item_part_text_custom_update(Elm_Widget_Item *item); -EAPI void _elm_widget_item_focus_set(Elm_Widget_Item *item, Eina_Bool focused); -EAPI Eina_Bool _elm_widget_item_focus_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_style_set(Elm_Widget_Item *item, const char *style); -EAPI const char *_elm_widget_item_style_get(Elm_Widget_Item *item); +EAPI Elm_Widget_Item_Data *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size); +EAPI void _elm_widget_item_free(Elm_Widget_Item_Data *item); +EAPI Evas_Object *elm_widget_item_internal_widget_get(const Elm_Widget_Item_Data *item); +EAPI void _elm_widget_item_internal_del(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_pre_notify_del(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_del_cb_set(Elm_Widget_Item_Data *item, Evas_Smart_Cb del_cb); +EAPI void elm_widget_item_internal_data_set(Elm_Widget_Item_Data *item, const void *data); +EAPI void *elm_widget_item_internal_data_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_tooltip_text_set(Elm_Widget_Item_Data *item, const char *text); +EAPI void elm_widget_item_internal_tooltip_translatable_text_set(Elm_Widget_Item_Data *item, const char *text); +EAPI void elm_widget_item_internal_tooltip_content_cb_set(Elm_Widget_Item_Data *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); +EAPI void elm_widget_item_internal_tooltip_unset(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_tooltip_style_set(Elm_Widget_Item_Data *item, const char *style); +EAPI Eina_Bool elm_widget_item_internal_tooltip_window_mode_set(Elm_Widget_Item_Data *item, Eina_Bool disable); +EAPI Eina_Bool elm_widget_item_internal_tooltip_window_mode_get(const Elm_Widget_Item_Data *item); +EAPI const char *elm_widget_item_internal_tooltip_style_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_cursor_set(Elm_Widget_Item_Data *item, const char *cursor); +EAPI const char *elm_widget_item_internal_cursor_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_cursor_unset(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_cursor_style_set(Elm_Widget_Item_Data *item, const char *style); +EAPI const char *elm_widget_item_internal_cursor_style_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_cursor_engine_only_set(Elm_Widget_Item_Data *item, Eina_Bool engine_only); +EAPI Eina_Bool elm_widget_item_internal_cursor_engine_only_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_part_content_set(Elm_Widget_Item_Data *item, const char *part, Evas_Object *content); +EAPI Evas_Object *elm_widget_item_internal_part_content_get(const Elm_Widget_Item_Data *item, const char *part); +EAPI Evas_Object *elm_widget_item_internal_part_content_unset(Elm_Widget_Item_Data *item, const char *part); +EAPI void elm_widget_item_internal_part_text_set(Elm_Widget_Item_Data *item, const char *part, const char *label); +EAPI const char *elm_widget_item_internal_part_text_get(const Elm_Widget_Item_Data *item, const char *part); +EAPI void _elm_widget_item_internal_part_text_custom_set(Elm_Widget_Item_Data *item, const char *part, const char *label); +EAPI const char *_elm_widget_item_internal_part_text_custom_get(Elm_Widget_Item_Data *item, const char *part); +EAPI void _elm_widget_item_internal_part_text_custom_update(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_focus_set(Elm_Widget_Item_Data *item, Eina_Bool focused); +EAPI Eina_Bool elm_widget_item_internal_focus_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_style_set(Elm_Widget_Item_Data *item, const char *style); +EAPI const char *elm_widget_item_internal_style_get(Elm_Widget_Item_Data *item); -EAPI void _elm_widget_item_signal_callback_add(Elm_Widget_Item *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func, void *data); -EAPI void *_elm_widget_item_signal_callback_del(Elm_Widget_Item *it, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func); -EAPI void _elm_widget_item_signal_emit(Elm_Widget_Item *item, const char *emission, const char *source); -EAPI void _elm_widget_item_content_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Set_Cb func); -EAPI void _elm_widget_item_content_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Get_Cb func); -EAPI void _elm_widget_item_content_unset_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Unset_Cb func); -EAPI void _elm_widget_item_text_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Set_Cb func); -EAPI void _elm_widget_item_text_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Get_Cb func); -EAPI void _elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *it, Elm_Widget_Signal_Emit_Cb func); -EAPI void _elm_widget_item_access_info_set(Elm_Widget_Item *item, const char *txt); -EAPI void _elm_widget_item_disabled_set(Elm_Widget_Item *item, Eina_Bool disabled); -EAPI Eina_Bool _elm_widget_item_disabled_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_disable_hook_set(Elm_Widget_Item *item, Elm_Widget_Disable_Cb func); -EAPI void _elm_widget_item_del_pre_hook_set(Elm_Widget_Item *item, Elm_Widget_Del_Pre_Cb func); -EAPI void _elm_widget_item_style_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Set_Cb func); -EAPI void _elm_widget_item_style_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Get_Cb func); -EAPI void _elm_widget_item_focus_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Get_Cb func); -EAPI void _elm_widget_item_focus_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Set_Cb func); -EAPI void _elm_widget_item_domain_translatable_part_text_set(Elm_Widget_Item *item, const char *part, const char *domain, const char *label); -EAPI const char * _elm_widget_item_translatable_part_text_get(const Elm_Widget_Item *item, const char *part); -EAPI void _elm_widget_item_translate(Elm_Widget_Item *item); -EAPI void _elm_widget_item_domain_part_text_translatable_set(Elm_Widget_Item *item, const char *part, const char *domain, Eina_Bool translatable); +EAPI void elm_widget_item_internal_signal_callback_add(Elm_Widget_Item_Data *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func, void *data); +EAPI void *elm_widget_item_internal_signal_callback_del(Elm_Widget_Item_Data *it, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func); +EAPI void elm_widget_item_internal_signal_emit(Elm_Widget_Item_Data *item, const char *emission, const char *source); +EAPI void _elm_widget_item_content_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Set_Cb func); +EAPI void _elm_widget_item_content_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Get_Cb func); +EAPI void _elm_widget_item_content_unset_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Content_Unset_Cb func); +EAPI void _elm_widget_item_text_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Text_Set_Cb func); +EAPI void _elm_widget_item_text_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Text_Get_Cb func); +EAPI void _elm_widget_item_signal_emit_hook_set(Elm_Widget_Item_Data *it, Elm_Widget_Signal_Emit_Cb func); +EAPI void _elm_widget_item_internal_access_info_set(Elm_Widget_Item_Data *item, const char *txt); +EAPI void elm_widget_item_internal_disabled_set(Elm_Widget_Item_Data *item, Eina_Bool disabled); +EAPI Eina_Bool elm_widget_item_internal_disabled_get(const Elm_Widget_Item_Data *item); +EAPI void _elm_widget_item_disable_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Disable_Cb func); +EAPI void _elm_widget_item_del_pre_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Del_Pre_Cb func); +EAPI void _elm_widget_item_style_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Style_Set_Cb func); +EAPI void _elm_widget_item_style_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Style_Get_Cb func); +EAPI void _elm_widget_item_focus_get_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Focus_Get_Cb func); +EAPI void _elm_widget_item_focus_set_hook_set(Elm_Widget_Item_Data *item, Elm_Widget_Focus_Set_Cb func); +EAPI void elm_widget_item_internal_domain_translatable_part_text_set(Elm_Widget_Item_Data *item, const char *part, const char *domain, const char *label); +EAPI const char * elm_widget_item_internal_translatable_part_text_get(const Elm_Widget_Item_Data *item, const char *part); +EAPI void elm_widget_item_internal_translate(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_domain_part_text_translatable_set(Elm_Widget_Item_Data *item, const char *part, const char *domain, Eina_Bool translatable); -EAPI Evas_Object *elm_widget_item_track(Elm_Widget_Item *item); -EAPI void elm_widget_item_untrack(Elm_Widget_Item *item); -EAPI int elm_widget_item_track_get(const Elm_Widget_Item *item); -EAPI void _elm_widget_item_track_cancel(Elm_Widget_Item *item); +EAPI Evas_Object *elm_widget_item_track(Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_untrack(Elm_Widget_Item_Data *item); +EAPI int elm_widget_item_track_get(const Elm_Widget_Item_Data *item); +EAPI void elm_widget_item_internal_track_cancel(Elm_Widget_Item_Data *item); void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); /** @@ -859,7 +862,7 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out /** * Convenience macro to create new widget item, doing casts for you. - * @see _elm_widget_item_new() + * @see elm_widget_item_internal_new() * @param parent a valid elm_widget variant. * @param type the C type that extends Elm_Widget_Item */ @@ -867,279 +870,173 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out (type *)_elm_widget_item_new((parent), sizeof(type)) /** * Convenience macro to free widget item, doing casts for you. - * @see _elm_widget_item_free() + * @see elm_widget_item_internal_free() * @param item a valid item. */ #define elm_widget_item_free(item) \ - _elm_widget_item_free((Elm_Widget_Item *)item) + _elm_widget_item_free((Elm_Widget_Item_Data *)item) /** * Convenience macro to delete widget item, doing casts for you. - * @see _elm_widget_item_del() + * @see elm_widget_item_internal_del() * @param item a valid item. */ #define elm_widget_item_del(item) \ - _elm_widget_item_del((Elm_Widget_Item *)item) -/** - * Convenience macro to notify deletion of widget item, doing casts for you. - * @see _elm_widget_item_pre_notify_del() - */ + _elm_widget_item_internal_del((Elm_Widget_Item_Data *)item) #define elm_widget_item_pre_notify_del(item) \ - _elm_widget_item_pre_notify_del((Elm_Widget_Item *)item) -/** - * Convenience macro to set deletion callback of widget item, doing casts for you. - * @see _elm_widget_item_del_cb_set() - */ + elm_widget_item_internal_pre_notify_del((Elm_Widget_Item_Data *)item) #define elm_widget_item_del_cb_set(item, del_cb) \ - _elm_widget_item_del_cb_set((Elm_Widget_Item *)item, del_cb) - -/** - * Get item's owner widget - * @see _elm_widget_item_widget_get() - */ + elm_widget_item_internal_del_cb_set((Elm_Widget_Item_Data *)item, del_cb) #define elm_widget_item_widget_get(item) \ - _elm_widget_item_widget_get((const Elm_Widget_Item *)item) - -/** - * Set item's data - * @see _elm_widget_item_data_set() - */ + elm_widget_item_internal_widget_get((const Elm_Widget_Item_Data *)item) #define elm_widget_item_data_set(item, data) \ - _elm_widget_item_data_set((Elm_Widget_Item *)item, data) -/** - * Get item's data - * @see _elm_widget_item_data_get() - */ + elm_widget_item_internal_data_set((Elm_Widget_Item_Data *)item, data) #define elm_widget_item_data_get(item) \ - _elm_widget_item_data_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_data_get((const Elm_Widget_Item_Data *)item) -/** - * Convenience function to set widget item tooltip as a text string. - * @see _elm_widget_item_tooltip_text_set() - */ #define elm_widget_item_tooltip_text_set(item, text) \ - _elm_widget_item_tooltip_text_set((Elm_Widget_Item *)item, text) -/** - * Convenience function to set widget item tooltip as a text string. - * @see _elm_widget_item_tooltip_text_set() - */ + elm_widget_item_internal_tooltip_text_set((Elm_Widget_Item_Data *)item, text) #define elm_widget_item_tooltip_translatable_text_set(item, text) \ - _elm_widget_item_tooltip_translatable_text_set((Elm_Widget_Item *)item, text) -/** - * Convenience function to set widget item tooltip. - * @see _elm_widget_item_tooltip_content_cb_set() - */ + elm_widget_item_internal_tooltip_translatable_text_set((Elm_Widget_Item_Data *)item, text) #define elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb) \ - _elm_widget_item_tooltip_content_cb_set((Elm_Widget_Item *)item, \ + elm_widget_item_internal_tooltip_content_cb_set((Elm_Widget_Item_Data *)item, \ func, data, del_cb) -/** - * Convenience function to unset widget item tooltip. - * @see _elm_widget_item_tooltip_unset() - */ #define elm_widget_item_tooltip_unset(item) \ - _elm_widget_item_tooltip_unset((Elm_Widget_Item *)item) -/** - * Convenience function to change item's tooltip style. - * @see _elm_widget_item_tooltip_style_set() - */ + elm_widget_item_internal_tooltip_unset((Elm_Widget_Item_Data *)item) #define elm_widget_item_tooltip_style_set(item, style) \ - _elm_widget_item_tooltip_style_set((Elm_Widget_Item *)item, style) + elm_widget_item_internal_tooltip_style_set((Elm_Widget_Item_Data *)item, style) #define elm_widget_item_tooltip_window_mode_set(item, disable) \ - _elm_widget_item_tooltip_window_mode_set((Elm_Widget_Item *)item, disable) + elm_widget_item_internal_tooltip_window_mode_set((Elm_Widget_Item_Data *)item, disable) #define elm_widget_item_tooltip_window_mode_get(item) \ - _elm_widget_item_tooltip_window_mode_get((Elm_Widget_Item *)item) -/** - * Convenience function to query item's tooltip style. - * @see _elm_widget_item_tooltip_style_get() - */ + elm_widget_item_internal_tooltip_window_mode_get((Elm_Widget_Item_Data *)item) #define elm_widget_item_tooltip_style_get(item) \ - _elm_widget_item_tooltip_style_get((const Elm_Widget_Item *)item) -/** - * Convenience function to set widget item cursor. - * @see _elm_widget_item_cursor_set() - */ + elm_widget_item_internal_tooltip_style_get((const Elm_Widget_Item_Data *)item) #define elm_widget_item_cursor_set(item, cursor) \ - _elm_widget_item_cursor_set((Elm_Widget_Item *)item, cursor) -/** - * Convenience function to get widget item cursor. - * @see _elm_widget_item_cursor_get() - */ + elm_widget_item_internal_cursor_set((Elm_Widget_Item_Data *)item, cursor) #define elm_widget_item_cursor_get(item) \ - _elm_widget_item_cursor_get((const Elm_Widget_Item *)item) -/** - * Convenience function to unset widget item cursor. - * @see _elm_widget_item_cursor_unset() - */ + elm_widget_item_internal_cursor_get((const Elm_Widget_Item_Data *)item) #define elm_widget_item_cursor_unset(item) \ - _elm_widget_item_cursor_unset((Elm_Widget_Item *)item) -/** - * Convenience function to change item's cursor style. - * @see _elm_widget_item_cursor_style_set() - */ + elm_widget_item_internal_cursor_unset((Elm_Widget_Item_Data *)item) #define elm_widget_item_cursor_style_set(item, style) \ - _elm_widget_item_cursor_style_set((Elm_Widget_Item *)item, style) -/** - * Convenience function to query item's cursor style. - * @see _elm_widget_item_cursor_style_get() - */ + elm_widget_item_internal_cursor_style_set((Elm_Widget_Item_Data *)item, style) #define elm_widget_item_cursor_style_get(item) \ - _elm_widget_item_cursor_style_get((const Elm_Widget_Item *)item) -/** - * Convenience function to change item's cursor engine_only. - * @see _elm_widget_item_cursor_engine_only_set() - */ + elm_widget_item_internal_cursor_style_get((const Elm_Widget_Item_Data *)item) #define elm_widget_item_cursor_engine_only_set(item, engine_only) \ - _elm_widget_item_cursor_engine_only_set((Elm_Widget_Item *)item, engine_only) -/** - * Convenience function to query item's cursor engine_only. - * @see _elm_widget_item_cursor_engine_only_get() - */ + elm_widget_item_internal_cursor_engine_only_set((Elm_Widget_Item_Data *)item, engine_only) #define elm_widget_item_cursor_engine_only_get(item) \ - _elm_widget_item_cursor_engine_only_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_cursor_engine_only_get((const Elm_Widget_Item_Data *)item) /** * Convenience function to query item's content set hook. - * @see _elm_widget_item_content_set_hook_set() + * @see elm_widget_item_internal_content_set_hook_set() */ #define elm_widget_item_content_set_hook_set(item, func) \ - _elm_widget_item_content_set_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Content_Set_Cb)func) + _elm_widget_item_content_set_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Content_Set_Cb)func) /** * Convenience function to query item's content get hook. - * @see _elm_widget_item_content_get_hook_set() + * @see elm_widget_item_internal_content_get_hook_set() */ #define elm_widget_item_content_get_hook_set(item, func) \ - _elm_widget_item_content_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Content_Get_Cb)func) + _elm_widget_item_content_get_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Content_Get_Cb)func) /** * Convenience function to query item's content unset hook. - * @see _elm_widget_item_content_unset_hook_set() + * @see elm_widget_item_internal_content_unset_hook_set() */ #define elm_widget_item_content_unset_hook_set(item, func) \ - _elm_widget_item_content_unset_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Content_Unset_Cb)func) + _elm_widget_item_content_unset_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Content_Unset_Cb)func) /** * Convenience function to query item's text set hook. - * @see _elm_widget_item_text_set_hook_set() + * @see elm_widget_item_internal_text_set_hook_set() */ #define elm_widget_item_text_set_hook_set(item, func) \ - _elm_widget_item_text_set_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Text_Set_Cb)func) + _elm_widget_item_text_set_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Text_Set_Cb)func) /** * Convenience function to query item's text get hook. - * @see _elm_widget_item_text_get_hook_set() + * @see elm_widget_item_internal_text_get_hook_set() */ #define elm_widget_item_text_get_hook_set(item, func) \ - _elm_widget_item_text_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Text_Get_Cb)func) + _elm_widget_item_text_get_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Text_Get_Cb)func) /** * Convenience function to query item's signal emit hook. - * @see _elm_widget_item_signal_emit_hook_set() + * @see elm_widget_item_internal_signal_emit_hook_set() */ #define elm_widget_item_signal_emit_hook_set(item, func) \ - _elm_widget_item_signal_emit_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Signal_Emit_Cb)func) + _elm_widget_item_signal_emit_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Signal_Emit_Cb)func) /** * Convenience function to query disable get hook. - * @see _elm_widget_item_disabled_get() + * @see elm_widget_item_internal_disabled_get() */ #define elm_widget_item_disabled_get(item) \ - _elm_widget_item_disabled_get((Elm_Widget_Item *)item) + elm_widget_item_internal_disabled_get((Elm_Widget_Item_Data *)item) /** * Convenience function to query disable set hook. - * @see _elm_widget_item_disable_hook_set() + * @see elm_widget_item_internal_disable_hook_set() */ #define elm_widget_item_disable_hook_set(item, func) \ - _elm_widget_item_disable_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Disable_Cb)func) + _elm_widget_item_disable_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Disable_Cb)func) /** * Convenience function to query del pre hook. - * @see _elm_widget_item_del_pre_hook_set() + * @see elm_widget_item_internal_del_pre_hook_set() */ #define elm_widget_item_del_pre_hook_set(item, func) \ - _elm_widget_item_del_pre_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Del_Pre_Cb)func) + _elm_widget_item_del_pre_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Del_Pre_Cb)func) /** * Convenience function to query style set hook. - * @see _elm_widget_item_style_set_hook_set() + * @see elm_widget_item_internal_style_set_hook_set() */ #define elm_widget_item_style_set_hook_set(item, func) \ - _elm_widget_item_style_set_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Style_Set_Cb)func) + _elm_widget_item_style_set_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Style_Set_Cb)func) /** * Convenience function to query style get hook. - * @see _elm_widget_item_style_get_hook_set() + * @see elm_widget_item_internal_style_get_hook_set() */ #define elm_widget_item_style_get_hook_set(item, func) \ - _elm_widget_item_style_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Style_Get_Cb)func) + _elm_widget_item_style_get_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Style_Get_Cb)func) -/** - * Convenience function to set style . - * @see _elm_widget_item_style_set() - */ #define elm_widget_item_style_set(item, style) \ - _elm_widget_item_style_set((Elm_Widget_Item *)item, style) -/** - * Convenience function to get style . - * @see _elm_widget_item_style_get() - */ + elm_widget_item_internal_style_set((Elm_Widget_Item_Data *)item, style) #define elm_widget_item_style_get(item) \ - _elm_widget_item_style_get((Elm_Widget_Item *)item) + elm_widget_item_internal_style_get((Elm_Widget_Item_Data *)item) /** * Convenience function to query focus set hook. - * @see _elm_widget_item_focus_set_hook_set() + * @see elm_widget_item_internal_focus_set_hook_set() */ #define elm_widget_item_focus_set_hook_set(item, func) \ - _elm_widget_item_focus_set_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Focus_Set_Cb)func) + _elm_widget_item_focus_set_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Focus_Set_Cb)func) /** * Convenience function to query focus get hook. - * @see _elm_widget_item_focus_get_hook_set() + * @see elm_widget_item_internal_focus_get_hook_set() */ #define elm_widget_item_focus_get_hook_set(item, func) \ - _elm_widget_item_focus_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Focus_Get_Cb)func) + _elm_widget_item_focus_get_hook_set((Elm_Widget_Item_Data *)item, (Elm_Widget_Focus_Get_Cb)func) /** * Convenience function to query track_cancel. - * @see _elm_widget_item_del_pre_hook_set() + * @see elm_widget_item_internal_del_pre_hook_set() */ #define elm_widget_item_track_cancel(item) \ - _elm_widget_item_track_cancel((Elm_Widget_Item *)item) + elm_widget_item_internal_track_cancel((Elm_Widget_Item_Data *)item) -/** - * Convenience function to query translate hook. - * @see _elm_widget_item_track_cancel() - */ #define elm_widget_item_translate(item) \ - _elm_widget_item_translate((Elm_Widget_Item *)item) + elm_widget_item_internal_translate((Elm_Widget_Item_Data *)item) -/** - * Convenience function to save additional text part content. - * @see _elm_widget_item_part_text_custom_set() - */ #define elm_widget_item_part_text_custom_set(item, part, text) \ - _elm_widget_item_part_text_custom_set((Elm_Widget_Item *)item, part, text) + _elm_widget_item_internal_part_text_custom_set((Elm_Widget_Item_Data *)item, part, text) -/** - * Convenience function to get additional text part content. - * @see _elm_widget_item_part_text_custom_set() - */ #define elm_widget_item_part_text_custom_get(item, part) \ - _elm_widget_item_part_text_custom_get((Elm_Widget_Item *)item, part) + _elm_widget_item_internal_part_text_custom_get((Elm_Widget_Item_Data *)item, part) -/** - * Convenience function to update additional text part content. - * @see _elm_widget_item_part_text_custom_set() - */ #define elm_widget_item_part_text_custom_update(item) \ - _elm_widget_item_part_text_custom_update((Elm_Widget_Item *)item) + _elm_widget_item_internal_part_text_custom_update((Elm_Widget_Item_Data *)item) -/** - * Convenience function to set the focus on widget item. - * @see _elm_widget_item_focus_set() - */ #define elm_widget_item_focus_set(item, focused) \ - _elm_widget_item_focus_set((Elm_Widget_Item *)item, focused) + elm_widget_item_internal_focus_set((Elm_Widget_Item_Data *)item, focused) -/** - * Convenience function to query focus set hook. - * @see _elm_widget_item_focus_get() - */ #define elm_widget_item_focus_get(item) \ - _elm_widget_item_focus_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_focus_get((const Elm_Widget_Item_Data *)item) #define ELM_WIDGET_CHECK_OR_RETURN(obj, ...) \ do { \ @@ -1164,6 +1061,8 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out CRI("Elm_Widget_Item " # item " is NULL"); \ return __VA_ARGS__; \ } \ + if ((item)->eo_obj && \ + eo_isa((item)->eo_obj, ELM_WIDGET_ITEM_CLASS)) break; \ if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ return __VA_ARGS__; \ @@ -1176,6 +1075,8 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out CRI("Elm_Widget_Item " # item " is NULL"); \ goto label; \ } \ + if ((item)->eo_obj && \ + eo_isa((item)->eo_obj, ELM_WIDGET_ITEM_CLASS)) break; \ if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ goto label; \ @@ -1193,4 +1094,7 @@ typedef void * (*list_data_get_func_type)(const Eina_List * l); #include "elm_widget.eo.h" +#define ELM_WIDGET_ITEM_PROTECTED +#include "elm_widget_item.eo.h" + #endif diff --git a/legacy/elementary/src/lib/elm_widget_colorselector.h b/legacy/elementary/src/lib/elm_widget_colorselector.h index 8e7c547e24..b55d59be07 100644 --- a/legacy/elementary/src/lib/elm_widget_colorselector.h +++ b/legacy/elementary/src/lib/elm_widget_colorselector.h @@ -126,11 +126,11 @@ struct _Elm_Color_Item return #define ELM_COLORSELECTOR_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_COLORSELECTOR_CHECK(it->base.widget); #define ELM_COLORSELECTOR_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_COLORSELECTOR_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_ctxpopup.h b/legacy/elementary/src/lib/elm_widget_ctxpopup.h index 0044a7de63..cde2f1b904 100644 --- a/legacy/elementary/src/lib/elm_widget_ctxpopup.h +++ b/legacy/elementary/src/lib/elm_widget_ctxpopup.h @@ -92,7 +92,7 @@ struct _Elm_Ctxpopup_Data return #define ELM_CTXPOPUP_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_CTXPOPUP_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_diskselector.h b/legacy/elementary/src/lib/elm_widget_diskselector.h index 02a8863012..1f8f408eaa 100644 --- a/legacy/elementary/src/lib/elm_widget_diskselector.h +++ b/legacy/elementary/src/lib/elm_widget_diskselector.h @@ -96,15 +96,15 @@ struct _Elm_Diskselector_Item return #define ELM_DISKSELECTOR_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_DISKSELECTOR_CHECK(it->base.widget); #define ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_DISKSELECTOR_CHECK(it->base.widget) __VA_ARGS__; #define ELM_DISKSELECTOR_ITEM_CHECK_OR_GOTO(it, label) \ - ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ + ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item_Data *)it, label); \ if (!it->base.widget || !eo_isa((it->base.widget), ELM_DISKSELECTOR_CLASS)) \ goto label; diff --git a/legacy/elementary/src/lib/elm_widget_flipselector.h b/legacy/elementary/src/lib/elm_widget_flipselector.h index fa7ce07bc1..b96188e3aa 100644 --- a/legacy/elementary/src/lib/elm_widget_flipselector.h +++ b/legacy/elementary/src/lib/elm_widget_flipselector.h @@ -77,11 +77,11 @@ struct _Elm_Flipselector_Item return #define ELM_FLIPSELECTOR_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_FLIPSELECTOR_CHECK(it->base.widget); #define ELM_FLIPSELECTOR_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_FLIPSELECTOR_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_gengrid.h b/legacy/elementary/src/lib/elm_widget_gengrid.h index e8bd551b69..7f9fcddc83 100644 --- a/legacy/elementary/src/lib/elm_widget_gengrid.h +++ b/legacy/elementary/src/lib/elm_widget_gengrid.h @@ -192,15 +192,15 @@ struct _Elm_Gengrid_Pan_Data return #define ELM_GENGRID_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_GENGRID_CHECK(it->base.widget); #define ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_GENGRID_CHECK(it->base.widget) __VA_ARGS__; #define ELM_GENGRID_ITEM_CHECK_OR_GOTO(it, label) \ - ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ + ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item_Data *)it, label); \ if (!it->base.widget || !eo_isa \ ((it->base.widget), ELM_GENGRID_CLASS)) goto label; diff --git a/legacy/elementary/src/lib/elm_widget_genlist.h b/legacy/elementary/src/lib/elm_widget_genlist.h index aab884a638..df2e9aa202 100644 --- a/legacy/elementary/src/lib/elm_widget_genlist.h +++ b/legacy/elementary/src/lib/elm_widget_genlist.h @@ -324,15 +324,15 @@ struct _Elm_Genlist_Pan_Data return #define ELM_GENLIST_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_GENLIST_CHECK(it->base.widget); #define ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_GENLIST_CHECK(it->base.widget) __VA_ARGS__; #define ELM_GENLIST_ITEM_CHECK_OR_GOTO(it, label) \ - ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ + ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item_Data *)it, label); \ if (!it->base.widget || !eo_isa \ ((it->base.widget), ELM_GENLIST_CLASS)) goto label; diff --git a/legacy/elementary/src/lib/elm_widget_hoversel.h b/legacy/elementary/src/lib/elm_widget_hoversel.h index 5752414ce1..524fecd781 100644 --- a/legacy/elementary/src/lib/elm_widget_hoversel.h +++ b/legacy/elementary/src/lib/elm_widget_hoversel.h @@ -81,11 +81,11 @@ struct _Elm_Hoversel_Item return #define ELM_HOVERSEL_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_HOVERSEL_CHECK(it->base.widget); #define ELM_HOVERSEL_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_HOVERSEL_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_index.h b/legacy/elementary/src/lib/elm_widget_index.h index 4f8a6f6718..dd30545b91 100644 --- a/legacy/elementary/src/lib/elm_widget_index.h +++ b/legacy/elementary/src/lib/elm_widget_index.h @@ -99,11 +99,11 @@ struct _Elm_Index_Omit return #define ELM_INDEX_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_INDEX_CHECK(it->base.widget); #define ELM_INDEX_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_INDEX_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_item.eo b/legacy/elementary/src/lib/elm_widget_item.eo new file mode 100644 index 0000000000..9faa04638b --- /dev/null +++ b/legacy/elementary/src/lib/elm_widget_item.eo @@ -0,0 +1,751 @@ +class Elm_Widget_Item(Eo.Base) +{ + legacy_prefix: null; + eo_prefix: elm_wdg_item; + properties { + data { + get { + /** + Get the data associated with an object item + + @note Every elm_object_item supports this API + @ingroup General + */ + } + set { + /** + Set the data associated with an object item + + @note Every elm_object_item supports this API + @ingroup General + */ + } + values { + void *data @const_set; /*@ The data associated with the item */ + } + } + tooltip_window_mode { + get { + /** + @brief Retrieve size restriction state of an object's tooltip + + This function returns whether a tooltip is allowed to expand beyond + its parent window's canvas. + It will instead be limited only by the size of the display. + */ + } + set { + /** + @brief Disable size restrictions on an object's tooltip + + This function allows a tooltip to expand beyond its parent window's canvas. + It will instead be limited only by the size of the display. + */ + return: bool; /*@ @c EINA_FALSE on failure, @c EINA_TRUE on success */ + } + values { + Eina_Bool disable; /*@ If @c EINA_TRUE, size restrictions are disabled */ + } + } + tooltip_style { + get { + /** + Get the style for this item tooltip. + + @see elm_object_tooltip_style_get() for more details. + @see elm_object_item_tooltip_style_set() + + @ingroup General + */ + } + set { + /** + Sets a different style for this item tooltip. + + @note before you set a style you should define a tooltip with + elm_object_item_tooltip_content_cb_set() or + elm_object_item_tooltip_text_set() + + @see elm_object_tooltip_style_set() for more details. + + @ingroup General + */ + } + values { + const (char)* style; /*@ the theme style used/to use (default, transparent, ...) */ + } + } + cursor { + get { + /* + Get the type of mouse pointer/cursor decoration set to be shown, + when the mouse pointer is over the given item + + @see elm_object_cursor_get() + @see elm_object_item_cursor_set() + @see elm_object_item_cursor_unset() + + @ingroup General + */ + } + set { + /** + Set the type of mouse pointer/cursor decoration to be shown, + when the mouse pointer is over the given item + + This function works analogously as elm_object_cursor_set(), but + here the cursor's changing area is restricted to the item's + area, and not the whole widget's. Note that that item cursors + have precedence over widget cursors, so that a mouse over an + item with custom cursor set will always show @b that cursor. + + If this function is called twice for an object, a previously set + cursor will be unset on the second call. + + @see elm_object_cursor_set() + @see elm_object_item_cursor_get() + @see elm_object_item_cursor_unset() + + @ingroup General + */ + } + values { + const (char) *cursor; /*@ the cursor type's name */ + } + } + cursor_style { + get { + /** + Get the current @b style set for a given item's custom + cursor + + @see elm_object_item_cursor_style_set() for more details + + @ingroup General + */ + } + set { + /** + Set a different @b style for a given custom cursor set for an + item. + + This function only makes sense when one is using custom mouse + cursor decorations defined in a theme file, which can have, + given a cursor name/type, alternate styles on it. It + works analogously as elm_object_cursor_style_set(), but here + applies only to item objects. + + @warning Before you set a cursor style you should have defined a + custom cursor previously on the item, with + elm_object_item_cursor_set() + + @see elm_object_item_cursor_engine_only_set() + @see elm_object_item_cursor_style_get() + + @ingroup General + */ + } + values { + const (char) *style; /*@ the theme style to use/in use (e.g. @c "default", @c "transparent", etc) */ + } + } + cursor_engine_only { + get { + /** + Get if the (custom) cursor for a given item is being + searched in its theme, also, or is only relying on the rendering + engine. + + @return @c EINA_TRUE, if cursors are being looked for only on + those provided by the rendering engine, @c EINA_FALSE if they + are being searched on the widget's theme, as well. + + @see elm_object_item_cursor_engine_only_set(), for more details + + @ingroup General + */ + } + set { + /** + Set if the (custom)cursor for a given item should be + searched in its theme, also, or should only rely on the + rendering engine. + + @note This call is of use only if you've set a custom cursor + for items, with elm_object_item_cursor_set(). + + @note By default, cursors will only be looked for between those + provided by the rendering engine. + + @ingroup General + */ + } + values { + Eina_Bool engine_only; /* Use @c EINA_TRUE to have cursors looked for only + on those provided by the rendering engine, @c EINA_FALSE + to have them searched on the widget's theme, as well. */ + } + } + part_content { + get { + /** + Get a content of an object item + + @return content of the object item or NULL for any error + + @note Elementary object items may have many contents + + @ingroup General + */ + } + set { + /** + Set a content of an object item + + This sets a new object to an item as a content object. If any object was + already set as a content object in the same part, previous object will be + deleted automatically. + + @note Elementary object items may have many contents + + @ingroup General + */ + } + keys { + const (char) *part; /*@ The content part name (NULL for the default content) */ + } + values { + Evas_Object *content; /*@ The content of the object item */ + } + } + part_text { + get { + /** + Get a label of an object item + + @note Elementary object items may have many labels + + @ingroup General + */ + } + set { + /** + Set a label of an object item + + @note Elementary object items may have many labels + + @ingroup General + */ + } + keys { + const (char) *part; /*@ The text part name (NULL for the default label) */ + } + values { + const (char) *label; /*@ Text of the label */ + } + } + part_text_custom @protected { + get { + /*@ Get additional text part content */ + legacy: null; + } + set { + /*@ Save additional text part content */ + legacy: null; + } + keys { + const (char) *part; + } + values { + const (char) *label; + } + } + focus { + get { + /** + Get whether the @p it is focused or not. + + @see elm_object_item_focus_set() + + @ingroup Focus + @since 1.10 + */ + } + set { + /** + Set the object item focused + + @see elm_object_item_focus_get() + + @ingroup Focus + @since 1.10 + */ + } + values { + Eina_Bool focused; /*@ The focused state */ + } + } + style { + get { + /** + Get the style of an object item + + @since 1.9 + + @ingroup General + */ + } + set { + /** + Set a style of an object item + + @since 1.9 + + @ingroup General + */ + } + values { + const (char) *style; /*@ The style of object item */ + } + } + disabled { + get { + /** + Get the disabled state of an widget item. + + This gets the state of the widget, which might be enabled or disabled. + + @ingroup Styles + */ + } + set { + /** + Set the disabled state of an widget item. + + Elementary object item can be @b disabled, in which state they won't + receive input and, in general, will be themed differently from + their normal state, usually greyed out. Useful for contexts + where you don't want your users to interact with some of the + parts of you interface. + + This sets the state for the widget item, either disabling it or + enabling it back. + + @ingroup Styles + */ + } + values { + Eina_Bool disable; /*@ @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE if it's enabled (or on errors) */ + } + } + access_order { + get { + /** + @brief Get highlight order + @since 1.8 + + @ingroup General + */ + } + set { + /** + @brief Set highlight order + @since 1.8 + + @ingroup General + */ + } + values { + Eina_List *objs @const_get; /*@ Order of objects to pass highlight */ + } + } + } + methods { + widget_get @const { + /** + Get the widget object's handle which contains a given item + + @note This returns the widget object itself that an item belongs to. + @note Every elm_object_item supports this API + @ingroup General + */ + return: Evas_Object*; /*@ The widget object */ + } + del { + /** + Delete the given item. + + @ingroup General + */ + } + pre_notify_del @protected { + /*@ notify deletion of widget item */ + legacy: null; + } + tooltip_text_set { + /** + Set the text to be shown in a given object item's tooltips. + + Setup the text as tooltip to object. The item can have only one tooltip, + so any previous tooltip data - set with this function or + elm_object_item_tooltip_content_cb_set() - is removed. + + @see elm_object_tooltip_text_set() for more details. + + @ingroup General + */ + params { + const (char) *text; /*@ The text to set in the content. */ + } + } + tooltip_translatable_text_set @protected { + /*@ Set widget item tooltip as a text string */ + legacy: null; + params { + const (char) *text; + } + } + tooltip_unset { + /** + Unset tooltip from item. + + Remove tooltip from item. The callback provided as del_cb to + elm_object_item_tooltip_content_cb_set() will be called to notify + it is not used anymore. + + @see elm_object_tooltip_unset() for more details. + @see elm_object_item_tooltip_content_cb_set() + + @ingroup General + */ + } + cursor_unset { + /** + Unset any custom mouse pointer/cursor decoration set to be + shown, when the mouse pointer is over the given + item, thus making it show the @b default cursor again. + + Use this call to undo any custom settings on this item's cursor + decoration, bringing it back to defaults (no custom style set). + + @see elm_object_cursor_unset() + @see elm_object_item_cursor_set() + + @ingroup General + */ + } + part_content_unset { + /** + Unset a content of an object item + + @note Elementary object items may have many contents + + @ingroup General + */ + params { + const (char) *part; /*@ The content part name to unset (NULL for the default content) */ + } + return: Evas_Object*; + } + part_text_custom_update @protected { + /*@ Update additional text part content */ + legacy: null; + } + signal_callback_add { + /** + Add a callback for a signal emitted by object item edje. + + This function connects a callback function to a signal emitted by the + edje object of the object item. + Globs can occur in either the emission or source name. + + @since 1.8 + + @ingroup General + */ + params { + const (char) *emission; /*@ The signal's name. */ + const (char) *source; /*@ The signal's source. */ + Elm_Object_Item_Signal_Cb func; /*@ The callback function to be executed when the signal is emitted. */ + void *data; /*@ A pointer to data to pass to the callback function. */ + } + } + signal_callback_del { + /** + Remove a signal-triggered callback from a object item edje object. + + This function removes the @b last callback, previously attached to + a signal emitted by an underlying Edje object of @a it, whose + parameters @a emission, @a source and @c func match exactly with + those passed to a previous call to + elm_object_item_signal_callback_add(). The data pointer that was passed + to this call will be returned. + + @see elm_object_item_signal_callback_add() + @since 1.8 + + @ingroup General + */ + params { + const (char) *emission; /*@ The signal's name. */ + const (char) *source; /*@ The signal's source. */ + Elm_Object_Item_Signal_Cb func; /*@ The callback function to be executed when the signal is emitted. */ + } + return: void*; /*@ The data pointer of the signal callback or @c NULL, on errors. */ + } + signal_emit { + /** + Send a signal to the edje object of the widget item. + + This function sends a signal to the edje object of the obj item. An + edje program can respond to a signal by specifying matching + 'signal' and 'source' fields. + + @ingroup General + */ + params { + const (char) *emission; /*@ The signal's name. */ + const (char) *source; /*@ The signal's source. */ + } + } + access_info_set { + /** + Set the text to read out when in accessibility mode + + @ingroup General + */ + params { + const (char) *txt; /*@ The text that describes the widget to people with poor or no vision */ + } + } + access_object_get @const { + /** + @brief Get an accessible object of the object item. + @since 1.8 + + @ingroup General + */ + return: Evas_Object*; /*@ Accessible object of the object item or NULL for any error */ + } + domain_translatable_part_text_set { + /** + Set the text for an object item's part, marking it as translatable. + + The string to set as @p text must be the original one. Do not pass the + return of @c gettext() here. Elementary will translate the string + internally and set it on the object item using + elm_object_item_part_text_set(), also storing the original string so that it + can be automatically translated when the language is changed with + elm_language_set(). The @p domain will be stored along to find the + translation in the correct catalog. It can be NULL, in which case it will use + whatever domain was set by the application with @c textdomain(). This is + useful in case you are building a library on top of Elementary that will have + its own translatable strings, that should not be mixed with those of programs + using the library. + + @ingroup General + @since 1.8 + */ + params { + const (char) *part; /*@ The name of the part to set */ + const (char) *domain; /*@ The translation domain to use */ + const (char) *label; /*@ The original, non-translated text to set */ + } + } + translatable_part_text_get @const { + /** + Get the original string set as translatable for an object item. + + When setting translated strings, the function elm_object_item_part_text_get() + will return the translation returned by @c gettext(). To get the original + string use this function. + + @ingroup General + @since 1.8 + */ + params { + const (char) *part; /*@ The name of the part that was set */ + } + return: const (char)*; /*@ The original, untranslated string */ + } + translate @protected { + /*@ Query translate */ + legacy: null; + } + domain_part_text_translatable_set { + /** + Mark the part text to be translatable or not. + + Once you mark the part text to be translatable, the text will be translated + internally regardless of elm_object_item_part_text_set() and + elm_object_item_domain_translatable_part_text_set(). In other case, if you + set the Elementary policy that all text will be translatable in default, you + can set the part text to not be translated by calling this API. + + @see elm_object_item_domain_translatable_part_text_set() + @see elm_object_item_part_text_set() + @see elm_policy() + + @since 1.8 + + @ingroup General + */ + params { + const (char) *part; /*@ The part name of the translatable text */ + const (char) *domain; /*@ The translation domain to use */ + Eina_Bool translatable; /*@ @c EINA_TRUE, the part text will be translated internally. @c EINA_FALSE, otherwise. */ + } + } + track { + /** + This returns track object of the item. + + @note This gets a rectangle object that represents the object item's internal + object. If you wanna check the geometry, visibility of the item, you + can call the evas apis such as evas_object_geometry_get(), + evas_object_visible_get() to the track object. Note that all of the + widget items may/may not have the internal object so this api may + return @c NULL if the widget item doesn't have it. Additionally, the + widget item is managed/controlled by the widget, the widget item could + be changed(moved, resized even deleted) anytime by it's own widget's + decision. So please dont' change the track object as well as don't + keep the track object in your side as possible but get the track object + at the moment you need to refer. Otherwise, you need to add some + callbacks to the track object to track it's attributes changes. + + @warning After use the track object, please call the + elm_object_item_untrack() paired to elm_object_item_track() + definitely to free the track object properly. Don't delete the + track object. + + @see elm_object_item_untrack() + @see elm_object_item_track_get() + + @since 1.8 + + @ingroup General + */ + return: Evas_Object*; /*@ The track object */ + } + untrack { + /** + This retrieve the track object of the item. + + @note This retrieves the track object that was returned from + elm_object_item_track(). + + @see elm_object_item_track() + @see elm_object_item_track_get() + + @since 1.8 + + @ingroup General + */ + } + track_get @const { + /** + Get the track object reference count. + + @note This gets the reference count for the track object. Whenever you call + the elm_object_item_track(), the reference count will be increased by + one. Likely the referece count will be decreased again when you call + the elm_object_item_untrack(). Unless the reference count reaches to + zero, the track object won't be deleted. So please be sure to call + elm_object_item_untrack() paired to the elm_object_item_track() call + count. + + @see elm_object_item_track() + @see elm_object_item_track_get() + + @since 1.8 + + @ingroup General + */ + return: int; + } + track_cancel @protected { + /*@ Query track_cancel */ + legacy: null; + } + del_cb_set { + /** + @brief Set the function to be called when an item from the widget is + freed. + + That function will receive these parameters: + @li void * item data + @li Evas_Object * widget object + @li Elm_Object_Item * widget item + + @note Every elm_object_item supports this API + + @see elm_object_item_del() + @ingroup General + */ + params { + Evas_Smart_Cb del_cb; /*@ The function called */ + } + } + tooltip_content_cb_set { + /** + Set the content to be shown in the tooltip item. + + Setup the tooltip to item. The item can have only one tooltip, + so any previous tooltip data is removed. @p func(with @p data) will + be called every time that need show the tooltip and it should + return a valid Evas_Object. This object is then managed fully by + tooltip system and is deleted when the tooltip is gone. + + @see elm_object_tooltip_content_cb_set() for more details. + + @ingroup General + */ + params { + Elm_Tooltip_Item_Content_Cb func; /*@ the function used to create the tooltip contents. */ + const (void) *data; /*@ what to provide to @a func as callback data/context. */ + Evas_Smart_Cb del_cb; /*@ called when data is not needed anymore, either when + another callback replaces @a func, the tooltip is unset with + elm_object_item_tooltip_unset() or the owner @a item + dies. This callback receives as the first parameter the + given @a data, and @p event_info is the item. */ + + } + } + access_register { + /** + @brief Register object item as an accessible object. + @since 1.8 + + @ingroup General + */ + return: Evas_Object*; /*@ Accessible object of the object item or NULL for any error */ + } + access_unregister { + /** + @brief Unregister accessible object of the object item. + @since 1.8 + + @ingroup General + */ + } + access_order_unset { + /** + @brief Unset highlight order + @since 1.8 + + @ingroup General + */ + } + disable @protected { + legacy: null; + } + del_pre @protected { + legacy: null; + return: bool; + } + } + implements { + Eo.Base.constructor; + Eo.Base.destructor; + } +} diff --git a/legacy/elementary/src/lib/elm_widget_list.h b/legacy/elementary/src/lib/elm_widget_list.h index 79a105095f..1ba59c039b 100644 --- a/legacy/elementary/src/lib/elm_widget_list.h +++ b/legacy/elementary/src/lib/elm_widget_list.h @@ -120,7 +120,7 @@ struct _Elm_List_Item return #define ELM_LIST_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_LIST_CHECK(it->base.widget); \ if (((Elm_List_Item *)it)->deleted) \ { \ @@ -129,7 +129,7 @@ struct _Elm_List_Item } #define ELM_LIST_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_LIST_CHECK(it->base.widget) __VA_ARGS__; \ if (((Elm_List_Item *)it)->deleted) \ { \ diff --git a/legacy/elementary/src/lib/elm_widget_menu.h b/legacy/elementary/src/lib/elm_widget_menu.h index 9e6065b053..a29665c9c6 100644 --- a/legacy/elementary/src/lib/elm_widget_menu.h +++ b/legacy/elementary/src/lib/elm_widget_menu.h @@ -93,11 +93,11 @@ struct _Elm_Menu_Item return #define ELM_MENU_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_MENU_CHECK(it->base.widget); #define ELM_MENU_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_MENU_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_multibuttonentry.h b/legacy/elementary/src/lib/elm_widget_multibuttonentry.h index 10fa22bf92..6a9b8d9b1c 100644 --- a/legacy/elementary/src/lib/elm_widget_multibuttonentry.h +++ b/legacy/elementary/src/lib/elm_widget_multibuttonentry.h @@ -134,11 +134,11 @@ struct _Elm_Multibuttonentry_Data return #define ELM_MULTIBUTTONENTRY_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_MULTIBUTTONENTRY_CHECK(it->base.widget); #define ELM_MULTIBUTTONENTRY_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_MULTIBUTTONENTRY_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_naviframe.h b/legacy/elementary/src/lib/elm_widget_naviframe.h index cd1d813cc3..8abf384ea6 100644 --- a/legacy/elementary/src/lib/elm_widget_naviframe.h +++ b/legacy/elementary/src/lib/elm_widget_naviframe.h @@ -113,11 +113,11 @@ struct _Elm_Naviframe_Text_Item_Pair return #define ELM_NAVIFRAME_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_NAVIFRAME_CHECK(it->base.widget); #define ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_NAVIFRAME_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_popup.h b/legacy/elementary/src/lib/elm_widget_popup.h index 936f2f66d1..4210b345c9 100644 --- a/legacy/elementary/src/lib/elm_widget_popup.h +++ b/legacy/elementary/src/lib/elm_widget_popup.h @@ -57,7 +57,7 @@ struct _Elm_Popup_Data typedef struct _Elm_Popup_Item Elm_Popup_Item; struct _Elm_Popup_Item { - Elm_Widget_Item base; + Elm_Widget_Item_Data base; const char *label; Evas_Object *icon; @@ -102,11 +102,11 @@ struct _Action_Area_Data return #define ELM_POPUP_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_POPUP_CHECK(it->base.widget); #define ELM_POPUP_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_POPUP_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_segment_control.h b/legacy/elementary/src/lib/elm_widget_segment_control.h index 8b009a193c..1ef7fe14e8 100644 --- a/legacy/elementary/src/lib/elm_widget_segment_control.h +++ b/legacy/elementary/src/lib/elm_widget_segment_control.h @@ -74,11 +74,11 @@ struct _Elm_Segment_Item return #define ELM_SEGMENT_CONTROL_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_SEGMENT_CONTROL_CHECK(it->base.widget); #define ELM_SEGMENT_CONTROL_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_SEGMENT_CONTROL_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_slideshow.h b/legacy/elementary/src/lib/elm_widget_slideshow.h index b81e715d8c..c9c914fe69 100644 --- a/legacy/elementary/src/lib/elm_widget_slideshow.h +++ b/legacy/elementary/src/lib/elm_widget_slideshow.h @@ -90,11 +90,11 @@ struct _Elm_Slideshow_Data return #define ELM_SLIDESHOW_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_SLIDESHOW_CHECK(it->base.widget); #define ELM_SLIDESHOW_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_SLIDESHOW_CHECK(it->base.widget) __VA_ARGS__; #endif diff --git a/legacy/elementary/src/lib/elm_widget_toolbar.h b/legacy/elementary/src/lib/elm_widget_toolbar.h index 07be0c9388..fb57835335 100644 --- a/legacy/elementary/src/lib/elm_widget_toolbar.h +++ b/legacy/elementary/src/lib/elm_widget_toolbar.h @@ -128,15 +128,15 @@ struct _Elm_Toolbar_Item_State return #define ELM_TOOLBAR_ITEM_CHECK(it) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, ); \ ELM_TOOLBAR_CHECK(it->base.widget); #define ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item_Data *)it, __VA_ARGS__); \ ELM_TOOLBAR_CHECK(it->base.widget) __VA_ARGS__; #define ELM_TOOLBAR_ITEM_CHECK_OR_GOTO(it, label) \ - ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ + ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item_Data *)it, label); \ if (!it->base.widget || !eo_isa ((it->base.widget), ELM_TOOLBAR_CLASS)) goto label; #endif