diff options
author | Yossi Kantor <yossi.kantor@samsung.com> | 2014-07-27 14:16:42 +0300 |
---|---|---|
committer | Yossi Kantor <yossi.kantor@samsung.com> | 2014-08-03 14:44:50 +0300 |
commit | d403541dc88d87cd5e8ec94053f682a7da5caae7 (patch) | |
tree | f50173a6357a92aae896a9cd3a41ab2cb7cc02b8 | |
parent | e49b7e290853ebf5665a4463c20e1ea33d1a44a2 (diff) | |
download | elementary-d403541dc88d87cd5e8ec94053f682a7da5caae7.tar.gz |
Elm_Widget_Item Eo class
-rw-r--r-- | src/lib/Makefile.am | 7 | ||||
-rw-r--r-- | src/lib/elm_gengrid.c | 2 | ||||
-rw-r--r-- | src/lib/elm_genlist.c | 2 | ||||
-rw-r--r-- | src/lib/elm_list.c | 2 | ||||
-rw-r--r-- | src/lib/elm_main.c | 96 | ||||
-rw-r--r-- | src/lib/elm_object_item_migration_temp.h | 7 | ||||
-rw-r--r-- | src/lib/elm_toolbar.c | 2 | ||||
-rw-r--r-- | src/lib/elm_widget.c | 678 | ||||
-rw-r--r-- | src/lib/elm_widget.h | 308 | ||||
-rw-r--r-- | src/lib/elm_widget_item.eo | 289 |
10 files changed, 1125 insertions, 268 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index a2de0d87e..b7cf6a6a3 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -774,7 +774,9 @@ BUILT_SOURCES = \ elm_web.eo.legacy.h \ elm_win.eo.c \ elm_win.eo.h \ - elm_win.eo.legacy.h + elm_win.eo.legacy.h \ + elm_widget_item.eo.c \ + elm_widget_item.eo.h elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ elementaryeolianfiles_DATA = \ @@ -866,7 +868,8 @@ elementaryeolianfiles_DATA = \ elm_toolbar.eo \ elm_video.eo \ elm_web.eo \ - elm_win.eo + elm_win.eo \ + elm_widget_item.eo EXTRA_DIST += \ ${elementaryeolianfiles_DATA} diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index c5953c12e..19c850958 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2944,7 +2944,7 @@ _item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused) _elm_gengrid_item_unfocused((Elm_Gen_Item *)sd->focused_item); _elm_gengrid_item_focused((Elm_Gen_Item *)it); - _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it); + elm_widget_item_internal_highlight_in_theme(obj, (Elm_Object_Item *)it); _elm_widget_highlight_in_theme_update(obj); _elm_widget_focus_highlight_start(obj); } diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 406098a1b..a93c0587d 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5680,7 +5680,7 @@ _item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused) _elm_genlist_item_unfocused((Elm_Gen_Item *)sd->focused_item); _elm_genlist_item_focused((Elm_Gen_Item *)it); - _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it); + elm_widget_item_internal_highlight_in_theme(obj, (Elm_Object_Item *)it); _elm_widget_highlight_in_theme_update(obj); _elm_widget_focus_highlight_start(obj); } diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index eb48c4da8..1970304b1 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -984,7 +984,7 @@ _items_fix(Evas_Object *obj) _elm_list_unwalk(obj, sd); //focus highlight in_theme is set by list item theme. - _elm_widget_item_highlight_in_theme( + elm_widget_item_internal_highlight_in_theme( obj, elm_list_first_item_get(obj)); evas_object_unref(obj); diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index 341ae6a69..bb9b394c1 100644 --- a/src/lib/elm_main.c +++ b/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 *)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 *)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 *)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 *)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 *)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 *)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 *)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 *)it, part, domain, translatable); } EAPI void @@ -1746,12 +1772,15 @@ 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 *)it, txt); } EAPI Evas_Object * elm_object_item_access_register(Elm_Object_Item *item) { + IF_EO_RETURN(item, Evas_Object *, elm_wdg_item_access_register()); + Elm_Widget_Item *it; it = (Elm_Widget_Item *)item; @@ -1765,12 +1794,14 @@ elm_object_item_access_register(Elm_Object_Item *item) EAPI void elm_object_item_access_unregister(Elm_Object_Item *item) { + IF_EO_DO(item, elm_wdg_item_access_unregister()); _elm_access_widget_item_unregister((Elm_Widget_Item *)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; @@ -1779,194 +1810,227 @@ elm_object_item_access_object_get(const Elm_Object_Item *item) EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs) { + IF_EO_DO(item, elm_wdg_item_access_order_set(objs)); _elm_access_widget_item_access_order_set((Elm_Widget_Item *)item, objs); } EAPI const Eina_List * elm_object_item_access_order_get(const Elm_Object_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 *)item); } EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item) { + IF_EO_DO(item, elm_wdg_item_access_order_unset()); _elm_access_widget_item_access_order_unset((Elm_Widget_Item *)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 *)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 *)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 *)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 *)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 *)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 *)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 *)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) { + IF_EO_RETURN(it, Evas_Object *, elm_wdg_item_track()); return elm_widget_item_track((Elm_Widget_Item *)it); } void elm_object_item_untrack(Elm_Object_Item *it) { + IF_EO_DO(it, elm_wdg_item_untrack()); elm_widget_item_untrack((Elm_Widget_Item *)it); } int elm_object_item_track_get(const Elm_Object_Item *it) { + IF_EO_RETURN(it, int, elm_wdg_item_track_get()); return elm_widget_item_track_get((Elm_Widget_Item *)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/src/lib/elm_object_item_migration_temp.h b/src/lib/elm_object_item_migration_temp.h new file mode 100644 index 000000000..262481fa7 --- /dev/null +++ b/src/lib/elm_object_item_migration_temp.h @@ -0,0 +1,7 @@ +// Item Eo migration temp defs - to be removed +typedef Eo Elm_Widobj_Item; + +#undef VIEW +#undef WIDGET +#define VIEW(X) X->base->view +#define WIDGET(X) X->base->widget
\ No newline at end of file diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 9d51be77a..79d734296 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -822,7 +822,7 @@ _item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused) _elm_toolbar_item_unfocused(it); } - _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it); + elm_widget_item_internal_highlight_in_theme(obj, (Elm_Object_Item *)it); _elm_widget_highlight_in_theme_update(obj); _elm_widget_focus_highlight_start(obj); } diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 5f1e7edb7..cef938069 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -84,7 +84,7 @@ _elm_scrollable_is(const Evas_Object *obj) } void -_elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it) +elm_widget_item_internal_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it) { const char *str; @@ -3446,13 +3446,13 @@ _elm_widget_drag_child_locked_y_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data * } EOLIAN static void -_elm_widget_item_loop_enabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable EINA_UNUSED) +elm_widget_item_internal_loop_enabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable EINA_UNUSED) { return; } EOLIAN static Eina_Bool -_elm_widget_item_loop_enabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED) +elm_widget_item_internal_loop_enabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED) { return EINA_FALSE; } @@ -3990,7 +3990,7 @@ _track_obj_del(void *data, Evas *e EINA_UNUSED, } static void -_elm_widget_item_signal_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *emission, +elm_widget_item_internal_signal_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *emission, const char *source) { Elm_Widget_Item_Signal_Data *wisd = data; @@ -3998,7 +3998,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_internal_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *position) { Elm_Widget_Item_Signal_Data *wisd = eina_list_data_get(position); void *data; @@ -4009,12 +4009,12 @@ _elm_widget_item_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *posi if (_elm_widget_is(item->view)) elm_object_signal_callback_del(item->view, wisd->emission, wisd->source, - _elm_widget_item_signal_cb); + elm_widget_item_internal_signal_cb); else if (!strcmp(eo_class_name_get(eo_class_get(item->view)), "edje")) edje_object_signal_callback_del_full(item->view, wisd->emission, wisd->source, - _elm_widget_item_signal_cb, wisd); + elm_widget_item_internal_signal_cb, wisd); eina_stringshare_del(wisd->emission); eina_stringshare_del(wisd->source); @@ -4023,6 +4023,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 * @@ -4043,7 +4045,7 @@ _elm_widget_item_signal_callback_list_get(Elm_Widget_Item *item, Eina_List *posi * @ingroup Widget */ EAPI Elm_Widget_Item * -_elm_widget_item_new(Evas_Object *widget, +elm_widget_item_internal_new(Evas_Object *widget, size_t alloc_size) { if (!_elm_widget_is(widget)) @@ -4062,8 +4064,25 @@ _elm_widget_item_new(Evas_Object *widget, return item; } +EOLIAN static void +_elm_widget_item_eo_base_constructor(Eo *obj, Elm_Widget_Item_Data *item) +{ + Evas_Object *widget; + eo_do (obj, widget = eo_parent_get()); + + if (!_elm_widget_is(widget)) + { + eo_error_set(obj); + return; + } + + eo_do_super(obj, ELM_WIDGET_ITEM_CLASS, eo_constructor()); + item->widget = widget; + item->eo_obj = obj; +} + EAPI void -_elm_widget_item_free(Elm_Widget_Item *item) +elm_widget_item_internal_free(Elm_Widget_Item *item) { Elm_Translate_String_Data *ts; @@ -4077,7 +4096,7 @@ _elm_widget_item_free(Elm_Widget_Item *item) eina_stringshare_del(item->access_info); while (item->signals) - _elm_widget_item_signal_callback_list_get(item, item->signals); + elm_widget_item_internal_signal_callback_list_get(item, item->signals); while (item->translate_strings) { @@ -4093,7 +4112,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 *obj, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_free(item); + eo_do_super(obj, ELM_WIDGET_ITEM_CLASS, eo_destructor()); } /** @@ -4120,20 +4148,36 @@ _elm_widget_item_free(Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_del(Elm_Widget_Item *item) +elm_widget_item_internal_del(Elm_Widget_Item *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->del_pre_func) + if (!item->eo_obj) { - if (item->del_pre_func((Elm_Object_Item *)item)) - _elm_widget_item_free(item); + if (item->del_pre_func) + { + if (item->del_pre_func((Elm_Object_Item *)item)) + elm_widget_item_internal_free(item); + } + else + elm_widget_item_free(item); } else - _elm_widget_item_free(item); + { + Eina_Bool del_ok; + eo_do(item->eo_obj, del_ok = elm_wdg_item_del_pre()); + if (del_ok) + eo_del(item->eo_obj); + } +} + +EOLIAN static void +_elm_widget_item_del(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_del(item); } /** @@ -4146,13 +4190,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_internal_del_pre_hook_set(Elm_Widget_Item *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 *obj EINA_UNUSED, Elm_Widget_Item_Data *item EINA_UNUSED) +{ + return EINA_TRUE; +} /** * @internal * @@ -4163,7 +4213,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_internal_style_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4181,7 +4231,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_internal_style_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4199,7 +4249,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_internal_focus_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4216,7 +4266,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_internal_focus_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4238,7 +4288,7 @@ _elm_widget_item_focus_get_hook_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI void -_elm_widget_item_pre_notify_del(Elm_Widget_Item *item) +elm_widget_item_internal_pre_notify_del(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); if (!item->del_func) return; @@ -4246,6 +4296,13 @@ _elm_widget_item_pre_notify_del(Elm_Widget_Item *item) item->del_func = NULL; } +EOLIAN static void +_elm_widget_item_pre_notify_del(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_pre_notify_del(item); +} + + /** * @internal * @@ -4265,7 +4322,7 @@ _elm_widget_item_pre_notify_del(Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_del_cb_set(Elm_Widget_Item *item, +elm_widget_item_internal_del_cb_set(Elm_Widget_Item *item, Evas_Smart_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4278,6 +4335,14 @@ _elm_widget_item_del_cb_set(Elm_Widget_Item *item, item->del_func = func; } +EOLIAN static void +_elm_widget_item_del_cb_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + Evas_Smart_Cb func) +{ + elm_widget_item_internal_del_cb_set(item,func); +} + /** * @internal * @@ -4288,7 +4353,7 @@ _elm_widget_item_del_cb_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI Evas_Object * -_elm_widget_item_widget_get(const Elm_Widget_Item *item) +elm_widget_item_internal_widget_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, NULL); @@ -4296,6 +4361,13 @@ _elm_widget_item_widget_get(const Elm_Widget_Item *item) return item->widget; } +EOLIAN static Evas_Object * +_elm_widget_item_widget_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_widget_get(item); +} + + /** * @internal * @@ -4311,7 +4383,7 @@ _elm_widget_item_widget_get(const Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_data_set(Elm_Widget_Item *item, +elm_widget_item_internal_data_set(Elm_Widget_Item *item, const void *data) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4322,6 +4394,14 @@ _elm_widget_item_data_set(Elm_Widget_Item *item, item->data = data; } +EOLIAN static void +_elm_widget_item_data_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const void *data) +{ + elm_widget_item_internal_data_set(item, data); +} + /** * @internal * @@ -4332,14 +4412,20 @@ _elm_widget_item_data_set(Elm_Widget_Item *item, * @ingroup Widget */ EAPI void * -_elm_widget_item_data_get(const Elm_Widget_Item *item) +elm_widget_item_internal_data_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return (void *)item->data; } +EOLIAN static void * +_elm_widget_item_data_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_data_get(item); +} + EAPI void -_elm_widget_item_disabled_set(Elm_Widget_Item *item, +elm_widget_item_internal_disabled_set(Elm_Widget_Item *item, Eina_Bool disabled) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4347,33 +4433,63 @@ _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 void +_elm_widget_item_disabled_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_Bool disabled) +{ + elm_widget_item_internal_disabled_set(item, disabled); } EAPI Eina_Bool -_elm_widget_item_disabled_get(const Elm_Widget_Item *item) +elm_widget_item_internal_disabled_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return item->disabled; } +EOLIAN static Eina_Bool +_elm_widget_item_disabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_disabled_get(item); +} + EAPI void -_elm_widget_item_style_set(Elm_Widget_Item *item, const char *style) +elm_widget_item_internal_style_set(Elm_Widget_Item *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); item->style_set_func(item, style); } +EOLIAN static void +_elm_widget_item_style_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item, const char *style EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_style_set()"); +} + EAPI const char * -_elm_widget_item_style_get(Elm_Widget_Item *item) +elm_widget_item_internal_style_get(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return item->style_get_func(item); } +EOLIAN static const char * +_elm_widget_item_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + ERR_NOT_SUPPORTED(item, "elm_object_style_get()"); + return NULL; +} + EAPI void -_elm_widget_item_disable_hook_set(Elm_Widget_Item *item, +elm_widget_item_internal_disable_hook_set(Elm_Widget_Item *item, Elm_Widget_Disable_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4381,22 +4497,41 @@ _elm_widget_item_disable_hook_set(Elm_Widget_Item *item, item->disable_func = func; } +EOLIAN static void +_elm_widget_item_disable(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item EINA_UNUSED) +{ + +} + EAPI void -_elm_widget_item_focus_set(Elm_Widget_Item *item, Eina_Bool focused) +elm_widget_item_internal_focus_set(Elm_Widget_Item *item, Eina_Bool focused) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); item->focus_set_func(item, focused); } +EOLIAN static void +_elm_widget_item_focus_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item, Eina_Bool focused EINA_UNUSED) +{ + ERR_NOT_SUPPORTED(item, "elm_object_item_focus_set"); +} + EAPI Eina_Bool -_elm_widget_item_focus_get(const Elm_Widget_Item *item) +elm_widget_item_internal_focus_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return item->focus_get_func(item); } +EOLIAN static Eina_Bool +_elm_widget_item_focus_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + ERR_NOT_SUPPORTED(item, "elm_object_item_focus_get"); + return EINA_FALSE; +} + 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 *item, const char *part, const char *domain, const char *label) @@ -4424,12 +4559,25 @@ _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 void +_elm_widget_item_domain_translatable_part_text_set(Eo *obj 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 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 *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -4441,8 +4589,16 @@ _elm_widget_item_translatable_part_text_get(const Elm_Widget_Item *item, return NULL; } +EOLIAN static const char * +_elm_widget_item_translatable_part_text_get(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part) +{ + return elm_widget_item_internal_translatable_part_text_get(item, part); +} + 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 *item, const char *part, const char *domain, Eina_Bool translatable) @@ -4458,7 +4614,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); @@ -4468,12 +4628,25 @@ _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_domain_part_text_translatable_set(Eo *obj 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_track_cancel(Elm_Widget_Item *item) +elm_widget_item_internal_track_cancel(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4486,6 +4659,12 @@ _elm_widget_item_track_cancel(Elm_Widget_Item *item) evas_object_del(item->track_obj); } +EOLIAN static void +_elm_widget_item_track_cancel(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_track_cancel(item); +} + EAPI Evas_Object * elm_widget_item_track(Elm_Widget_Item *item) { @@ -4530,6 +4709,12 @@ elm_widget_item_track(Elm_Widget_Item *item) return track; } +EOLIAN static Evas_Object * +_elm_widget_item_track(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_track(item); +} + void elm_widget_item_untrack(Elm_Widget_Item *item) { @@ -4543,6 +4728,12 @@ elm_widget_item_untrack(Elm_Widget_Item *item) evas_object_del(item->track_obj); } +EOLIAN static void +_elm_widget_item_untrack(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_untrack(item); +} + int elm_widget_item_track_get(const Elm_Widget_Item *item) { @@ -4553,6 +4744,12 @@ elm_widget_item_track_get(const Elm_Widget_Item *item) return evas_object_ref_get(item->track_obj); } +EOLIAN static int +_elm_widget_item_track_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_track_get(item); +} + typedef struct _Elm_Widget_Item_Tooltip Elm_Widget_Item_Tooltip; struct _Elm_Widget_Item_Tooltip @@ -4564,7 +4761,7 @@ struct _Elm_Widget_Item_Tooltip }; static Evas_Object * -_elm_widget_item_tooltip_label_create(void *data, +elm_widget_item_internal_tooltip_label_create(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip, void *item EINA_UNUSED) @@ -4578,7 +4775,7 @@ _elm_widget_item_tooltip_label_create(void *data, } static Evas_Object * -_elm_widget_item_tooltip_trans_label_create(void *data, +elm_widget_item_internal_tooltip_trans_label_create(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip, void *item EINA_UNUSED) @@ -4592,7 +4789,7 @@ _elm_widget_item_tooltip_trans_label_create(void *data, } static void -_elm_widget_item_tooltip_label_del_cb(void *data, +elm_widget_item_internal_tooltip_label_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { @@ -4613,7 +4810,7 @@ _elm_widget_item_tooltip_label_del_cb(void *data, * @ingroup Widget */ EAPI void -_elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_text_set(Elm_Widget_Item *item, const char *text) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4621,13 +4818,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_internal_tooltip_label_create, + text, + elm_widget_item_internal_tooltip_label_del_cb)); + else + elm_widget_item_internal_tooltip_content_cb_set + (item, elm_widget_item_internal_tooltip_label_create, text, + elm_widget_item_internal_tooltip_label_del_cb); +} + +EOLIAN static void +_elm_widget_item_tooltip_text_set(Eo *obj 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_translatable_text_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_translatable_text_set(Elm_Widget_Item *item, const char *text) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4635,13 +4846,27 @@ _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_internal_tooltip_trans_label_create, + text, + elm_widget_item_internal_tooltip_label_del_cb)); + else + elm_widget_item_internal_tooltip_content_cb_set + (item, elm_widget_item_internal_tooltip_trans_label_create, text, + elm_widget_item_internal_tooltip_label_del_cb); +} + +EOLIAN static void +_elm_widget_item_tooltip_translatable_text_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item EINA_UNUSED, + const char *text) +{ + elm_widget_item_internal_tooltip_translatable_text_set(item, text); } static Evas_Object * -_elm_widget_item_tooltip_create(void *data, +elm_widget_item_internal_tooltip_create(void *data, Evas_Object *obj, Evas_Object *tooltip) { @@ -4649,8 +4874,9 @@ _elm_widget_item_tooltip_create(void *data, return wit->func((void *)wit->data, obj, tooltip, wit->item); } + static void -_elm_widget_item_tooltip_del_cb(void *data, +elm_widget_item_internal_tooltip_del_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { @@ -4682,7 +4908,7 @@ _elm_widget_item_tooltip_del_cb(void *data, * @ingroup Widget */ EAPI void -_elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_content_cb_set(Elm_Widget_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) @@ -4694,7 +4920,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; } @@ -4706,8 +4935,8 @@ _elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, wit->del_cb = del_cb; elm_object_sub_tooltip_content_cb_set - (item->view, item->widget, _elm_widget_item_tooltip_create, wit, - _elm_widget_item_tooltip_del_cb); + (item->view, item->widget, elm_widget_item_internal_tooltip_create, wit, + elm_widget_item_internal_tooltip_del_cb); return; @@ -4718,6 +4947,16 @@ error: if (del_cb) del_cb((void *)data, item->widget, item); } +EOLIAN static void +_elm_widget_item_tooltip_content_cb_set(Eo *obj 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); +} + /** * @internal * @@ -4734,7 +4973,7 @@ error: * @ingroup Widget */ EAPI void -_elm_widget_item_tooltip_unset(Elm_Widget_Item *item) +elm_widget_item_internal_tooltip_unset(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4742,6 +4981,12 @@ _elm_widget_item_tooltip_unset(Elm_Widget_Item *item) elm_object_tooltip_unset(item->view); } +EOLIAN static void +_elm_widget_item_tooltip_unset(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_tooltip_unset(item); +} + /** * @internal * @@ -4757,7 +5002,7 @@ _elm_widget_item_tooltip_unset(Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, +elm_widget_item_internal_tooltip_style_set(Elm_Widget_Item *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4766,8 +5011,16 @@ _elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, elm_object_tooltip_style_set(item->view, style); } +EOLIAN static void +_elm_widget_item_tooltip_style_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *style) +{ + elm_widget_item_internal_tooltip_style_set(item, style); +} + 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 *item, Eina_Bool disable) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); @@ -4776,8 +5029,16 @@ _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_set(Eo *obj 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_get(const Elm_Widget_Item *item) +elm_widget_item_internal_tooltip_window_mode_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item, EINA_FALSE); @@ -4785,6 +5046,12 @@ _elm_widget_item_tooltip_window_mode_get(const Elm_Widget_Item *item) return elm_object_tooltip_window_mode_get(item->view); } +EOLIAN static Eina_Bool +_elm_widget_item_tooltip_window_mode_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_tooltip_window_mode_get(item); +} + /** * @internal * @@ -4797,15 +5064,21 @@ _elm_widget_item_tooltip_window_mode_get(const Elm_Widget_Item *item) * @ingroup Widget */ 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 *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_tooltip_style_get(item->view); } +EOLIAN static const char * +_elm_widget_item_tooltip_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_tooltip_style_get(item); +} + EAPI void -_elm_widget_item_cursor_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_set(Elm_Widget_Item *item, const char *cursor) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4814,15 +5087,29 @@ _elm_widget_item_cursor_set(Elm_Widget_Item *item, elm_object_sub_cursor_set(item->view, item->widget, cursor); } +EOLIAN static void +_elm_widget_item_cursor_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *cursor) +{ + elm_widget_item_internal_cursor_set(item, cursor); +} + EAPI const char * -_elm_widget_item_cursor_get(const Elm_Widget_Item *item) +elm_widget_item_internal_cursor_get(const Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_cursor_get(item->view); } +EOLIAN static const char * +_elm_widget_item_cursor_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_get(item); +} + EAPI void -_elm_widget_item_cursor_unset(Elm_Widget_Item *item) +elm_widget_item_internal_cursor_unset(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -4830,6 +5117,12 @@ _elm_widget_item_cursor_unset(Elm_Widget_Item *item) elm_object_cursor_unset(item->view); } +EOLIAN static void +_elm_widget_item_cursor_unset(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_cursor_unset(item); +} + /** * @internal * @@ -4844,7 +5137,7 @@ _elm_widget_item_cursor_unset(Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_cursor_style_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_style_set(Elm_Widget_Item *item, const char *style) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4853,6 +5146,14 @@ _elm_widget_item_cursor_style_set(Elm_Widget_Item *item, elm_object_cursor_style_set(item->view, style); } +EOLIAN static void +_elm_widget_item_cursor_style_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *style) +{ + elm_widget_item_internal_cursor_style_set(item, style); +} + /** * @internal * @@ -4865,12 +5166,19 @@ _elm_widget_item_cursor_style_set(Elm_Widget_Item *item, * @ingroup Widget */ 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 *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); return elm_object_cursor_style_get(item->view); } +EOLIAN static const char * +_elm_widget_item_cursor_style_get(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_style_get(item); +} + /** * @internal * @@ -4888,7 +5196,7 @@ _elm_widget_item_cursor_style_get(const Elm_Widget_Item *item) * @ingroup Widget */ EAPI void -_elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, +elm_widget_item_internal_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -4897,6 +5205,14 @@ _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, elm_object_cursor_theme_search_enabled_set(item->view, !engine_only); } +EOLIAN static void +_elm_widget_item_cursor_engine_only_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + Eina_Bool engine_only) +{ + elm_widget_item_internal_cursor_engine_only_set(item, engine_only); +} + /** * @internal * @@ -4910,14 +5226,20 @@ _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, * @ingroup Widget */ 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 *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); return !elm_object_cursor_theme_search_enabled_get(item->view); } +EOLIAN static Eina_Bool +_elm_widget_item_cursor_engine_only_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return elm_widget_item_internal_cursor_engine_only_get(item); +} + EAPI void -_elm_widget_item_part_content_set(Elm_Widget_Item *item, +elm_widget_item_internal_part_content_set(Elm_Widget_Item *item, const char *part, Evas_Object *content) { @@ -4932,8 +5254,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 *obj 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 *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -4947,8 +5278,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 *obj 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 *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -4962,8 +5302,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 *obj 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 *item, const char *part, const char *label) { @@ -4978,8 +5327,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 *obj 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 *item, const char *part) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); @@ -4993,8 +5351,17 @@ _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 *obj 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) +elm_widget_item_internal_part_text_custom_free(void *data) { Elm_Label_Data *label; label = data; @@ -5004,7 +5371,7 @@ _elm_widget_item_part_text_custom_free(void *data) } EAPI void -_elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, +elm_widget_item_internal_part_text_custom_set(Elm_Widget_Item *item, const char *part, const char *text) { @@ -5020,7 +5387,7 @@ _elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, } if (!item->labels) item->labels = - eina_hash_stringshared_new(_elm_widget_item_part_text_custom_free); + eina_hash_stringshared_new(elm_widget_item_internal_part_text_custom_free); label = eina_hash_find(item->labels, part); if (!label) { @@ -5033,8 +5400,17 @@ _elm_widget_item_part_text_custom_set(Elm_Widget_Item *item, eina_stringshare_replace(&label->text, text); } +EOLIAN static void +_elm_widget_item_part_text_custom_set(Eo *obj 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 const char * -_elm_widget_item_part_text_custom_get(Elm_Widget_Item *item, +elm_widget_item_internal_part_text_custom_get(Elm_Widget_Item *item, const char *part) { Elm_Label_Data *label; @@ -5043,8 +5419,16 @@ _elm_widget_item_part_text_custom_get(Elm_Widget_Item *item, return label ? label->text : NULL; } +EOLIAN static const char * +_elm_widget_item_part_text_custom_get(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *part) +{ + return elm_widget_item_internal_part_text_custom_get(item, part); +} + static Eina_Bool -_elm_widget_item_part_text_custom_foreach(const Eina_Hash *labels EINA_UNUSED, +elm_widget_item_internal_part_text_custom_foreach(const Eina_Hash *labels EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *func_data) @@ -5053,22 +5437,33 @@ _elm_widget_item_part_text_custom_foreach(const Eina_Hash *labels EINA_UNUSED, Elm_Widget_Item *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; } EAPI void -_elm_widget_item_part_text_custom_update(Elm_Widget_Item *item) +elm_widget_item_internal_part_text_custom_update(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); if (item->labels) eina_hash_foreach(item->labels, - _elm_widget_item_part_text_custom_foreach, item); + elm_widget_item_internal_part_text_custom_foreach, item); +} + +EOLIAN static void +_elm_widget_item_part_text_custom_update(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_part_text_custom_update(item); } EAPI void -_elm_widget_item_content_set_hook_set(Elm_Widget_Item *item, +elm_widget_item_internal_content_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5078,7 +5473,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_internal_content_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5088,7 +5483,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_internal_content_unset_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Unset_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5098,7 +5493,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_internal_text_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Set_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5108,7 +5503,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_internal_text_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Get_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5118,7 +5513,7 @@ _elm_widget_item_text_get_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_signal_emit(Elm_Widget_Item *item, +elm_widget_item_internal_signal_emit(Elm_Widget_Item *item, const char *emission, const char *source) { @@ -5129,8 +5524,17 @@ _elm_widget_item_signal_emit(Elm_Widget_Item *item, item->signal_emit_func((Elm_Object_Item *)item, emission, source); } +EOLIAN static void +_elm_widget_item_signal_emit(Eo *obj 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_hook_set(Elm_Widget_Item *item, +elm_widget_item_internal_signal_emit_hook_set(Elm_Widget_Item *item, Elm_Widget_Signal_Emit_Cb func) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5140,7 +5544,7 @@ _elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *item, } EAPI void -_elm_widget_item_signal_callback_add(Elm_Widget_Item *item, +elm_widget_item_internal_signal_callback_add(Elm_Widget_Item *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func, @@ -5162,9 +5566,9 @@ _elm_widget_item_signal_callback_add(Elm_Widget_Item *item, wisd->source = eina_stringshare_add(source); if (_elm_widget_is(item->view)) - elm_object_signal_callback_add(item->view, emission, source, _elm_widget_item_signal_cb, wisd); + elm_object_signal_callback_add(item->view, emission, source, elm_widget_item_internal_signal_cb, wisd); else if (!strcmp(eo_class_name_get(eo_class_get(item->view)), "edje")) - edje_object_signal_callback_add(item->view, emission, source, _elm_widget_item_signal_cb, wisd); + edje_object_signal_callback_add(item->view, emission, source, elm_widget_item_internal_signal_cb, wisd); else { WRN("The %s widget item doesn't support signal callback add!", @@ -5176,8 +5580,19 @@ _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_add(Eo *obj 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_del(Elm_Widget_Item *item, +elm_widget_item_internal_signal_callback_del(Elm_Widget_Item *item, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func) @@ -5194,14 +5609,24 @@ _elm_widget_item_signal_callback_del(Elm_Widget_Item *item, if ((wisd->func == func) && !strcmp(wisd->emission, emission) && !strcmp(wisd->source, source)) - return _elm_widget_item_signal_callback_list_get(item, l); + return elm_widget_item_internal_signal_callback_list_get(item, l); } return NULL; } +EOLIAN static void * +_elm_widget_item_signal_callback_del(Eo *obj 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_access_info_set(Elm_Widget_Item *item, +elm_widget_item_internal_access_info_set(Elm_Widget_Item *item, const char *txt) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); @@ -5212,8 +5637,16 @@ _elm_widget_item_access_info_set(Elm_Widget_Item *item, else item->access_info = eina_stringshare_add(txt); } +EOLIAN static void +_elm_widget_item_access_info_set(Eo *obj EINA_UNUSED, + Elm_Widget_Item_Data *item, + const char *txt) +{ + elm_widget_item_internal_access_info_set(item, txt); +} + EAPI void -_elm_widget_item_translate(Elm_Widget_Item *item) +elm_widget_item_internal_translate(Elm_Widget_Item *item) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item); @@ -5225,12 +5658,60 @@ _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_translate(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + elm_widget_item_internal_translate(item); +} + +EOLIAN static void +_elm_widget_item_access_order_set(Eo *obj 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 *obj 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 *obj 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 *obj 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 *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + _elm_access_widget_item_unregister(item); +} + +EOLIAN static Evas_Object* +_elm_widget_item_access_object_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *item) +{ + return item->access_obj; +} + /* happy debug functions */ #ifdef ELM_DEBUG static void @@ -5417,4 +5898,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/src/lib/elm_widget.h b/src/lib/elm_widget.h index 1fe5ab4bf..8fbcd89d6 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -605,6 +605,9 @@ struct _Elm_Widget_Item Eina_Bool disabled : 1; Eina_Bool on_deletion : 1; Eina_Bool on_translate : 1; + + // Just for Eo migration purposes, will be removed + Eo *eo_obj; }; struct _Elm_Object_Item @@ -758,70 +761,70 @@ 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 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 Elm_Widget_Item *elm_widget_item_internal_new(Evas_Object *parent, size_t alloc_size); +EAPI void elm_widget_item_internal_free(Elm_Widget_Item *item); +EAPI Evas_Object *elm_widget_item_internal_widget_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_del(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_pre_notify_del(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_del_cb_set(Elm_Widget_Item *item, Evas_Smart_Cb del_cb); +EAPI void elm_widget_item_internal_data_set(Elm_Widget_Item *item, const void *data); +EAPI void *elm_widget_item_internal_data_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_tooltip_text_set(Elm_Widget_Item *item, const char *text); +EAPI void elm_widget_item_internal_tooltip_translatable_text_set(Elm_Widget_Item *item, const char *text); +EAPI void elm_widget_item_internal_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_internal_tooltip_unset(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_tooltip_style_set(Elm_Widget_Item *item, const char *style); +EAPI Eina_Bool elm_widget_item_internal_tooltip_window_mode_set(Elm_Widget_Item *item, Eina_Bool disable); +EAPI Eina_Bool elm_widget_item_internal_tooltip_window_mode_get(const Elm_Widget_Item *item); +EAPI const char *elm_widget_item_internal_tooltip_style_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_cursor_set(Elm_Widget_Item *item, const char *cursor); +EAPI const char *elm_widget_item_internal_cursor_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_cursor_unset(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_cursor_style_set(Elm_Widget_Item *item, const char *style); +EAPI const char *elm_widget_item_internal_cursor_style_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only); +EAPI Eina_Bool elm_widget_item_internal_cursor_engine_only_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_part_content_set(Elm_Widget_Item *item, const char *part, Evas_Object *content); +EAPI Evas_Object *elm_widget_item_internal_part_content_get(const Elm_Widget_Item *item, const char *part); +EAPI Evas_Object *elm_widget_item_internal_part_content_unset(Elm_Widget_Item *item, const char *part); +EAPI void elm_widget_item_internal_part_text_set(Elm_Widget_Item *item, const char *part, const char *label); +EAPI const char *elm_widget_item_internal_part_text_get(const Elm_Widget_Item *item, const char *part); +EAPI void elm_widget_item_internal_part_text_custom_set(Elm_Widget_Item *item, const char *part, const char *label); +EAPI const char *elm_widget_item_internal_part_text_custom_get(Elm_Widget_Item *item, const char *part); +EAPI void elm_widget_item_internal_part_text_custom_update(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_focus_set(Elm_Widget_Item *item, Eina_Bool focused); +EAPI Eina_Bool elm_widget_item_internal_focus_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_style_set(Elm_Widget_Item *item, const char *style); +EAPI const char *elm_widget_item_internal_style_get(Elm_Widget_Item *item); + +EAPI void elm_widget_item_internal_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_internal_signal_callback_del(Elm_Widget_Item *it, const char *emission, const char *source, Elm_Widget_Item_Signal_Cb func); +EAPI void elm_widget_item_internal_signal_emit(Elm_Widget_Item *item, const char *emission, const char *source); +EAPI void elm_widget_item_internal_content_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Set_Cb func); +EAPI void elm_widget_item_internal_content_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Get_Cb func); +EAPI void elm_widget_item_internal_content_unset_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Unset_Cb func); +EAPI void elm_widget_item_internal_text_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Set_Cb func); +EAPI void elm_widget_item_internal_text_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Text_Get_Cb func); +EAPI void elm_widget_item_internal_signal_emit_hook_set(Elm_Widget_Item *it, Elm_Widget_Signal_Emit_Cb func); +EAPI void elm_widget_item_internal_access_info_set(Elm_Widget_Item *item, const char *txt); +EAPI void elm_widget_item_internal_disabled_set(Elm_Widget_Item *item, Eina_Bool disabled); +EAPI Eina_Bool elm_widget_item_internal_disabled_get(const Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_disable_hook_set(Elm_Widget_Item *item, Elm_Widget_Disable_Cb func); +EAPI void elm_widget_item_internal_del_pre_hook_set(Elm_Widget_Item *item, Elm_Widget_Del_Pre_Cb func); +EAPI void elm_widget_item_internal_style_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Set_Cb func); +EAPI void elm_widget_item_internal_style_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Style_Get_Cb func); +EAPI void elm_widget_item_internal_focus_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Get_Cb func); +EAPI void elm_widget_item_internal_focus_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Focus_Set_Cb func); +EAPI void elm_widget_item_internal_domain_translatable_part_text_set(Elm_Widget_Item *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 *item, const char *part); +EAPI void elm_widget_item_internal_translate(Elm_Widget_Item *item); +EAPI void elm_widget_item_internal_domain_part_text_translatable_set(Elm_Widget_Item *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); -void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); +EAPI void elm_widget_item_internal_track_cancel(Elm_Widget_Item *item); +void elm_widget_item_internal_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); /** * Function to operate on a given widget's scrollabe children when necessary. @@ -849,287 +852,287 @@ 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 */ #define elm_widget_item_new(parent, type) \ - (type *)_elm_widget_item_new((parent), sizeof(type)) + (type *)elm_widget_item_internal_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_internal_free((Elm_Widget_Item *)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) + elm_widget_item_internal_del((Elm_Widget_Item *)item) /** * Convenience macro to notify deletion of widget item, doing casts for you. - * @see _elm_widget_item_pre_notify_del() + * @see elm_widget_item_internal_pre_notify_del() */ #define elm_widget_item_pre_notify_del(item) \ - _elm_widget_item_pre_notify_del((Elm_Widget_Item *)item) + elm_widget_item_internal_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() + * @see elm_widget_item_internal_del_cb_set() */ #define elm_widget_item_del_cb_set(item, del_cb) \ - _elm_widget_item_del_cb_set((Elm_Widget_Item *)item, del_cb) + elm_widget_item_internal_del_cb_set((Elm_Widget_Item *)item, del_cb) /** * Get item's owner widget - * @see _elm_widget_item_widget_get() + * @see elm_widget_item_internal_widget_get() */ #define elm_widget_item_widget_get(item) \ - _elm_widget_item_widget_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_widget_get((const Elm_Widget_Item *)item) /** * Set item's data - * @see _elm_widget_item_data_set() + * @see elm_widget_item_internal_data_set() */ #define elm_widget_item_data_set(item, data) \ - _elm_widget_item_data_set((Elm_Widget_Item *)item, data) + elm_widget_item_internal_data_set((Elm_Widget_Item *)item, data) /** * Get item's data - * @see _elm_widget_item_data_get() + * @see elm_widget_item_internal_data_get() */ #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 *)item) /** * Convenience function to set widget item tooltip as a text string. - * @see _elm_widget_item_tooltip_text_set() + * @see elm_widget_item_internal_tooltip_text_set() */ #define elm_widget_item_tooltip_text_set(item, text) \ - _elm_widget_item_tooltip_text_set((Elm_Widget_Item *)item, text) + elm_widget_item_internal_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() + * @see elm_widget_item_internal_tooltip_text_set() */ #define elm_widget_item_tooltip_translatable_text_set(item, text) \ - _elm_widget_item_tooltip_translatable_text_set((Elm_Widget_Item *)item, text) + elm_widget_item_internal_tooltip_translatable_text_set((Elm_Widget_Item *)item, text) /** * Convenience function to set widget item tooltip. - * @see _elm_widget_item_tooltip_content_cb_set() + * @see elm_widget_item_internal_tooltip_content_cb_set() */ #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 *)item, \ func, data, del_cb) /** * Convenience function to unset widget item tooltip. - * @see _elm_widget_item_tooltip_unset() + * @see elm_widget_item_internal_tooltip_unset() */ #define elm_widget_item_tooltip_unset(item) \ - _elm_widget_item_tooltip_unset((Elm_Widget_Item *)item) + elm_widget_item_internal_tooltip_unset((Elm_Widget_Item *)item) /** * Convenience function to change item's tooltip style. - * @see _elm_widget_item_tooltip_style_set() + * @see elm_widget_item_internal_tooltip_style_set() */ #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 *)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 *)item, disable) #define elm_widget_item_tooltip_window_mode_get(item) \ - _elm_widget_item_tooltip_window_mode_get((Elm_Widget_Item *)item) + elm_widget_item_internal_tooltip_window_mode_get((Elm_Widget_Item *)item) /** * Convenience function to query item's tooltip style. - * @see _elm_widget_item_tooltip_style_get() + * @see elm_widget_item_internal_tooltip_style_get() */ #define elm_widget_item_tooltip_style_get(item) \ - _elm_widget_item_tooltip_style_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_tooltip_style_get((const Elm_Widget_Item *)item) /** * Convenience function to set widget item cursor. - * @see _elm_widget_item_cursor_set() + * @see elm_widget_item_internal_cursor_set() */ #define elm_widget_item_cursor_set(item, cursor) \ - _elm_widget_item_cursor_set((Elm_Widget_Item *)item, cursor) + elm_widget_item_internal_cursor_set((Elm_Widget_Item *)item, cursor) /** * Convenience function to get widget item cursor. - * @see _elm_widget_item_cursor_get() + * @see elm_widget_item_internal_cursor_get() */ #define elm_widget_item_cursor_get(item) \ - _elm_widget_item_cursor_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_cursor_get((const Elm_Widget_Item *)item) /** * Convenience function to unset widget item cursor. - * @see _elm_widget_item_cursor_unset() + * @see elm_widget_item_internal_cursor_unset() */ #define elm_widget_item_cursor_unset(item) \ - _elm_widget_item_cursor_unset((Elm_Widget_Item *)item) + elm_widget_item_internal_cursor_unset((Elm_Widget_Item *)item) /** * Convenience function to change item's cursor style. - * @see _elm_widget_item_cursor_style_set() + * @see elm_widget_item_internal_cursor_style_set() */ #define elm_widget_item_cursor_style_set(item, style) \ - _elm_widget_item_cursor_style_set((Elm_Widget_Item *)item, style) + elm_widget_item_internal_cursor_style_set((Elm_Widget_Item *)item, style) /** * Convenience function to query item's cursor style. - * @see _elm_widget_item_cursor_style_get() + * @see elm_widget_item_internal_cursor_style_get() */ #define elm_widget_item_cursor_style_get(item) \ - _elm_widget_item_cursor_style_get((const Elm_Widget_Item *)item) + elm_widget_item_internal_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() + * @see elm_widget_item_internal_cursor_engine_only_set() */ #define elm_widget_item_cursor_engine_only_set(item, engine_only) \ - _elm_widget_item_cursor_engine_only_set((Elm_Widget_Item *)item, engine_only) + elm_widget_item_internal_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() + * @see elm_widget_item_internal_cursor_engine_only_get() */ #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 *)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_internal_content_set_hook_set((Elm_Widget_Item *)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_internal_content_get_hook_set((Elm_Widget_Item *)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_internal_content_unset_hook_set((Elm_Widget_Item *)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_internal_text_set_hook_set((Elm_Widget_Item *)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_internal_text_get_hook_set((Elm_Widget_Item *)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_internal_signal_emit_hook_set((Elm_Widget_Item *)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 *)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_internal_disable_hook_set((Elm_Widget_Item *)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_internal_del_pre_hook_set((Elm_Widget_Item *)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_internal_style_set_hook_set((Elm_Widget_Item *)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_internal_style_get_hook_set((Elm_Widget_Item *)item, (Elm_Widget_Style_Get_Cb)func) /** * Convenience function to set style . - * @see _elm_widget_item_style_set() + * @see elm_widget_item_internal_style_set() */ #define elm_widget_item_style_set(item, style) \ - _elm_widget_item_style_set((Elm_Widget_Item *)item, style) + elm_widget_item_internal_style_set((Elm_Widget_Item *)item, style) /** * Convenience function to get style . - * @see _elm_widget_item_style_get() + * @see elm_widget_item_internal_style_get() */ #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 *)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_internal_focus_set_hook_set((Elm_Widget_Item *)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_internal_focus_get_hook_set((Elm_Widget_Item *)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 *)item) /** * Convenience function to query translate hook. - * @see _elm_widget_item_track_cancel() + * @see elm_widget_item_internal_track_cancel() */ #define elm_widget_item_translate(item) \ - _elm_widget_item_translate((Elm_Widget_Item *)item) + elm_widget_item_internal_translate((Elm_Widget_Item *)item) /** * Convenience function to save additional text part content. - * @see _elm_widget_item_part_text_custom_set() + * @see elm_widget_item_internal_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 *)item, part, text) /** * Convenience function to get additional text part content. - * @see _elm_widget_item_part_text_custom_set() + * @see elm_widget_item_internal_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 *)item, part) /** * Convenience function to update additional text part content. - * @see _elm_widget_item_part_text_custom_set() + * @see elm_widget_item_internal_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 *)item) /** * Convenience function to set the focus on widget item. - * @see _elm_widget_item_focus_set() + * @see elm_widget_item_internal_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 *)item, focused) /** * Convenience function to query focus set hook. - * @see _elm_widget_item_focus_get() + * @see elm_widget_item_internal_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 *)item) #define ELM_WIDGET_CHECK_OR_RETURN(obj, ...) \ do { \ @@ -1154,6 +1157,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__; \ @@ -1166,6 +1171,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; \ @@ -1183,4 +1190,9 @@ 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" + +typedef Elm_Widget_Item Elm_Widget_Item_Data; + #endif diff --git a/src/lib/elm_widget_item.eo b/src/lib/elm_widget_item.eo new file mode 100644 index 000000000..93de0f6d5 --- /dev/null +++ b/src/lib/elm_widget_item.eo @@ -0,0 +1,289 @@ +class Elm_Widget_Item(Eo_Base) +{ + legacy_prefix: null; + eo_prefix: elm_wdg_item; + properties { + data { + get { + } + set { + data: const; + } + values { + void *data; + } + } + tooltip_window_mode { + get { + + } + set { + return Eina_Bool; + } + values { + Eina_Bool disable; + } + } + tooltip_style { + get { + + } + set { + + } + values { + const char *style; + } + } + cursor { + get { + + } + set { + + } + values { + const char *cursor; + } + } + cursor_style { + get { + + } + set { + + } + values { + const char *style; + } + } + cursor_engine_only { + get { + + } + set { + + } + values { + Eina_Bool engine_only; + } + } + part_content { + get { + + } + set { + + } + keys { + const char *part; + } + values { + Evas_Object *content; + } + } + part_text { + get { + + } + set { + + } + keys { + const char *part; + } + values { + const char *label; + } + } + protected part_text_custom { + get { + legacy null; + } + set { + legacy null; + } + keys { + const char *part; + } + values { + const char *label; + } + } + focus { + get { + + } + set { + + } + values { + Eina_Bool focused; + } + } + style { + get { + + } + set { + + } + values { + const char *style; + } + } + disabled { + get { + + } + set { + + } + values { + Eina_Bool disable; + } + } + access_order { + get { + objs: const; + } + set { + + } + values { + Eina_List *objs; + } + } + } + methods { + widget_get { + const; + return Evas_Object*; + } + del { + } + protected pre_notify_del { + legacy null; + } + tooltip_text_set { + params { + const char *text; + } + } + protected tooltip_translatable_text_set { + legacy null; + params { + const char *text; + } + } + tooltip_unset { + } + cursor_unset { + } + part_content_unset { + params { + const char *part; + } + return Evas_Object*; + } + protected part_text_custom_update { + legacy null; + } + signal_callback_add { + params { + const char *emission; + const char *source; + Elm_Object_Item_Signal_Cb func; + void *data; + } + } + signal_callback_del { + params { + const char *emission; + const char *source; + Elm_Object_Item_Signal_Cb func; + } + return void*; + } + signal_emit { + params { + const char *emission; + const char *source; + } + } + access_info_set { + params { + const char *txt; + } + } + access_object_get { + return Evas_Object*; + } + domain_translatable_part_text_set { + params { + const char *part; + const char *domain; + const char *label; + } + } + translatable_part_text_get { + const; + params { + const char *part; + } + return const char*; + } + protected translate { + legacy null; + } + domain_part_text_translatable_set { + params { + const char *part; + const char *domain; + Eina_Bool translatable; + } + } + track { + return Evas_Object*; + } + untrack { + } + track_get { + const; + return int; + } + protected track_cancel { + legacy null; + } + del_cb_set { + params { + Evas_Smart_Cb del_cb; + } + } + tooltip_content_cb_set { + params { + Elm_Tooltip_Item_Content_Cb func; + const void *data; + Evas_Smart_Cb del_cb; + } + } + access_register { + return Evas_Object*; + } + access_unregister { + } + access_order_unset { + } + protected disable { + legacy null; + } + protected del_pre { + legacy null; + return Eina_Bool; + } + } + implements { + Eo_Base::constructor; + Eo_Base::destructor; + } +}
\ No newline at end of file |