From 3bfc8f4090345fd39b3c5ff303ae66ec2d61abdf Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_multibuttonentry*: remove all legacy usage from eo files this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8185 Change-Id: I622a166e48276b85ca30a8c03b4fafee3fe24291 --- src/Makefile_Elementary.am | 10 +- src/lib/elementary/elc_multibuttonentry.c | 4 +- src/lib/elementary/elc_multibuttonentry_eo.h | 4 +- src/lib/elementary/elc_multibuttonentry_legacy.h | 4 +- src/lib/elementary/elm_multibuttonentry.eo | 213 ------------- src/lib/elementary/elm_multibuttonentry_eo.c | 224 +++++++++++++ src/lib/elementary/elm_multibuttonentry_eo.h | 346 +++++++++++++++++++++ .../elementary/elm_multibuttonentry_eo.legacy.c | 108 +++++++ .../elementary/elm_multibuttonentry_eo.legacy.h | 269 ++++++++++++++++ src/lib/elementary/elm_multibuttonentry_item.eo | 38 --- src/lib/elementary/elm_multibuttonentry_item_eo.c | 121 +++++++ src/lib/elementary/elm_multibuttonentry_item_eo.h | 67 ++++ .../elm_multibuttonentry_item_eo.legacy.c | 24 ++ .../elm_multibuttonentry_item_eo.legacy.h | 60 ++++ src/lib/elementary/meson.build | 6 +- 15 files changed, 1237 insertions(+), 261 deletions(-) delete mode 100644 src/lib/elementary/elm_multibuttonentry.eo create mode 100644 src/lib/elementary/elm_multibuttonentry_eo.c create mode 100644 src/lib/elementary/elm_multibuttonentry_eo.h create mode 100644 src/lib/elementary/elm_multibuttonentry_eo.legacy.c create mode 100644 src/lib/elementary/elm_multibuttonentry_eo.legacy.h delete mode 100644 src/lib/elementary/elm_multibuttonentry_item.eo create mode 100644 src/lib/elementary/elm_multibuttonentry_item_eo.c create mode 100644 src/lib/elementary/elm_multibuttonentry_item_eo.h create mode 100644 src/lib/elementary/elm_multibuttonentry_item_eo.legacy.c create mode 100644 src/lib/elementary/elm_multibuttonentry_item_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 6972f74..b90595e 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -144,8 +144,6 @@ elm_public_eolian_files += \ lib/elementary/efl_ui_check_legacy_part.eo \ lib/elementary/efl_ui_progressbar_legacy_part.eo \ lib/elementary/elm_spinner.eo \ - lib/elementary/elm_multibuttonentry.eo \ - lib/elementary/elm_multibuttonentry_item.eo \ lib/elementary/elm_multibuttonentry_part.eo \ lib/elementary/elm_interface_scrollable.eo \ lib/elementary/elm_atspi_bridge.eo \ @@ -382,6 +380,10 @@ lib/elementary/elm_menu_eo.c \ lib/elementary/elm_menu_eo.legacy.c \ lib/elementary/elm_menu_item_eo.c \ lib/elementary/elm_menu_item_eo.legacy.c \ +lib/elementary/elm_multibuttonentry_eo.c \ +lib/elementary/elm_multibuttonentry_eo.legacy.c \ +lib/elementary/elm_multibuttonentry_item_eo.c \ +lib/elementary/elm_multibuttonentry_item_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -527,6 +529,10 @@ lib/elementary/elm_menu_eo.h \ lib/elementary/elm_menu_eo.legacy.h \ lib/elementary/elm_menu_item_eo.h \ lib/elementary/elm_menu_item_eo.legacy.h \ +lib/elementary/elm_multibuttonentry_eo.h \ +lib/elementary/elm_multibuttonentry_eo.legacy.h \ +lib/elementary/elm_multibuttonentry_item_eo.h \ +lib/elementary/elm_multibuttonentry_item_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c index 9c0b082..0c94b2a 100644 --- a/src/lib/elementary/elc_multibuttonentry.c +++ b/src/lib/elementary/elc_multibuttonentry.c @@ -2418,5 +2418,5 @@ ELM_PART_OVERRIDE_TEXT_GET(elm_multibuttonentry, ELM_MULTIBUTTONENTRY, Elm_Multi ELM_LAYOUT_SIZING_EVAL_OPS(elm_multibuttonentry), \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_multibuttonentry) -#include "elm_multibuttonentry_item.eo.c" -#include "elm_multibuttonentry.eo.c" +#include "elm_multibuttonentry_item_eo.c" +#include "elm_multibuttonentry_eo.c" diff --git a/src/lib/elementary/elc_multibuttonentry_eo.h b/src/lib/elementary/elc_multibuttonentry_eo.h index 4d958bd..8852acf 100644 --- a/src/lib/elementary/elc_multibuttonentry_eo.h +++ b/src/lib/elementary/elc_multibuttonentry_eo.h @@ -1,2 +1,2 @@ -#include "elm_multibuttonentry_item.eo.h" -#include "elm_multibuttonentry.eo.h" +#include "elm_multibuttonentry_item_eo.h" +#include "elm_multibuttonentry_eo.h" diff --git a/src/lib/elementary/elc_multibuttonentry_legacy.h b/src/lib/elementary/elc_multibuttonentry_legacy.h index 6a769d6..7c90e24 100644 --- a/src/lib/elementary/elc_multibuttonentry_legacy.h +++ b/src/lib/elementary/elc_multibuttonentry_legacy.h @@ -1,5 +1,5 @@ -#include "elm_multibuttonentry_item.eo.legacy.h" -#include "elm_multibuttonentry.eo.legacy.h" +#include "elm_multibuttonentry_item_eo.legacy.h" +#include "elm_multibuttonentry_eo.legacy.h" /** * @brief Add a new multibuttonentry to the parent diff --git a/src/lib/elementary/elm_multibuttonentry.eo b/src/lib/elementary/elm_multibuttonentry.eo deleted file mode 100644 index f5a57b9..0000000 --- a/src/lib/elementary/elm_multibuttonentry.eo +++ /dev/null @@ -1,213 +0,0 @@ -type Elm_Multibuttonentry_Item_Filter_Cb: __undefined_type; [[Elementary multibuttonentry item filter callback type]] -type Elm_Multibuttonentry_Format_Cb: __undefined_type; [[Elementary multibuttonentry format callback type]] - -class Elm.Multibuttonentry extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable, Efl.Ui.Legacy -{ - [[Elementary multibuttonentry class]] - legacy_prefix: elm_multibuttonentry; - eo_prefix: elm_obj_multibuttonentry; - event_prefix: elm_multibuttonentry; - methods { - @property editable { - [[Control if the multibuttonentry is to be editable or not. - - @since 1.7]] - set { - } - get { - } - values { - editable: bool; [[If $true, user can add/delete item in multibuttonentry, if not, the multibuttonentry is non-editable.]] - } - } - @property expanded { - [[Control the multibuttonentry to expanded state. - - In expanded state, the complete entry will be displayed. - Otherwise, only single line of the entry will be displayed.]] - set { - } - get { - } - values { - expanded: bool; [[The value of expanded state. Set this to $true for expanded state. Set - this to $false for single line state.]] - } - } - @property format_function { - set { - [[Set a function to format the string that will be used to display the hidden items counter. - - If $format_function is $NULL, the default format will be used, - which is $"... + %d". - - @since 1.9]] - } - values { - format_function: Elm_Multibuttonentry_Format_Cb @nullable; [[Format_function The actual format function]] - data: const(void_ptr) @optional; [[Data User data to passed to $format_function]] - } - } - @property items { - get { - [[Get a list of items in the multibuttonentry]] - - return: const(list); [[The list of items, or NULL if none]] - } - } - @property first_item { - get { - [[Get the first item in the multibuttonentry]] - - return: Elm.Widget.Item; [[The first item, or NULL if none]] - } - } - @property last_item { - get { - [[Get the last item in the multibuttonentry]] - - return: Elm.Widget.Item; [[The last item, or NULL if none]] - } - } - @property entry { - get { - [[Get the entry of the multibuttonentry object]] - - return: Efl.Canvas.Object; [[The entry object, or NULL if none]] - } - } - @property selected_item { - get { - [[Get the selected item in the multibuttonentry]] - - return: Elm.Widget.Item; [[The selected item, or NULL if none]] - } - } - item_prepend { - [[Prepend a new item to the multibuttonentry - - See @Efl.Object.invalidate to delete the item.]] - - return: Elm.Widget.Item; [[A handle to the item added or NULL if not possible]] - params { - @in label: string; [[The label of new item]] - @in func: Evas_Smart_Cb @optional; [[The callback function to be invoked when this item is pressed.]] - @in data: void_ptr @optional; [[The pointer to the data to be attached]] - } - } - clear { - [[Remove all items in the multibuttonentry.]] - - } - item_filter_remove { - [[Remove a filter from the list - - Removes the given callback from the filter list. See elm_multibuttonentry_item_filter_append() - for more information.]] - - params { - @in func: Elm_Multibuttonentry_Item_Filter_Cb; [[The filter function to remove]] - @in data: void_ptr; [[The user data passed when adding the function]] - } - } - item_insert_before { - [[Add a new item to the multibuttonentry before the indicated object reference. - - See @Efl.Object.invalidate to delete the item.]] - - return: Elm.Widget.Item; [[A handle to the item added or NULL if not possible]] - params { - @in before: Elm.Widget.Item; [[The item before which to add it]] - @in label: string; [[The label of new item]] - @in func: Evas_Smart_Cb @optional; [[The callback function to be invoked when this item is pressed.]] - @in data: void_ptr @optional; [[The pointer to the data to be attached]] - } - } - item_append { - [[Append a new item to the multibuttonentry - - See @Efl.Object.invalidate to delete the item.]] - - return: Elm.Widget.Item; [[A handle to the item added or NULL if not possible]] - params { - @in label: string; [[The label of new item]] - @in func: Evas_Smart_Cb @optional; [[The callback function to be invoked when this item is pressed.]] - @in data: void_ptr @optional; [[The pointer to the data to be attached]] - } - } - item_filter_prepend { - [[Prepend a filter function for text inserted in the Multibuttonentry - - Prepend the given callback to the list. See elm_multibuttonentry_item_filter_append() - for more information]] - params { - @in func: Elm_Multibuttonentry_Item_Filter_Cb; [[The function to use as text filter]] - @in data: void_ptr; [[User data to pass to $func]] - } - } - item_filter_append { - [[Append an item filter function for text inserted in the Multibuttonentry - - Append the given callback to a list. This function is called - whenever any text is inserted into the Multibuttonentry, with the text to be inserted - as a parameter. The callback function is free to alter the text in any way - it wants but must free the given pointer and update it. - If the new text is to be discarded, the function can free it and set it text - parameter to NULL. This will also prevent any following filters from being - called.]] - - params { - @in func: Elm_Multibuttonentry_Item_Filter_Cb; [[The function to use as item filter]] - @in data: void_ptr; [[User data to pass to $func]] - } - } - item_insert_after { - [[Add a new item to the multibuttonentry after the indicated object - - See @Efl.Object.invalidate to delete the item.]] - - return: Elm.Widget.Item; [[A handle to the item added or NULL if not possible]] - params { - @in after: Elm.Widget.Item; [[The item after which to add it]] - @in label: string; [[The label of new item]] - @in func: Evas_Smart_Cb @optional; [[The callback function to be invoked when this item is pressed.]] - @in data: void_ptr @optional; [[The pointer to the data to be attached]] - } - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.on_access_update; - //TIZEN_ONLY(20180709): To maintain legacy focus policy. - Efl.Ui.Focus.Object.on_focus_update; - Efl.Ui.Widget.focus_next_manager_is; - Efl.Ui.Widget.focus_direction_manager_is; - Efl.Ui.Widget.focus_next; - Efl.Ui.Widget.focus_direction; - // - Efl.Ui.L10n.translation_update; - Efl.Ui.Widget.widget_input_event_handler; - Efl.Access.Object.access_children { get; } - Efl.Part.part_get; - - //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, - //register/unregister access objects accordingly. - // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property - Efl.Ui.Widget.screen_reader; - // - // - } - events { - item,selected: Efl.Object; [[Called when item was selected]] - item,added: Efl.Object; [[Called when item was added]] - item,deleted: Efl.Object; [[Called when item was deleted]] - item,clicked: Efl.Object; [[Called when item was clicked]] - item,longpressed: Efl.Object; [[Called when item got a longpress]] - expanded: void; [[Called when expanded]] - contracted: void; [[Called when contracted]] - /* FIXME: This is not very future-proof, a struct would be better */ - expand,state,changed: int; [[Called when expanded state changed]] - } -} diff --git a/src/lib/elementary/elm_multibuttonentry_eo.c b/src/lib/elementary/elm_multibuttonentry_eo.c new file mode 100644 index 0000000..0819d7a --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_eo.c @@ -0,0 +1,224 @@ +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_SELECTED = + EFL_EVENT_DESCRIPTION("item,selected"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_ADDED = + EFL_EVENT_DESCRIPTION("item,added"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_DELETED = + EFL_EVENT_DESCRIPTION("item,deleted"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_CLICKED = + EFL_EVENT_DESCRIPTION("item,clicked"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_LONGPRESSED = + EFL_EVENT_DESCRIPTION("item,longpressed"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_EXPANDED = + EFL_EVENT_DESCRIPTION("expanded"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_CONTRACTED = + EFL_EVENT_DESCRIPTION("contracted"); +EWAPI const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_EXPAND_STATE_CHANGED = + EFL_EVENT_DESCRIPTION("expand,state,changed"); + +void _elm_multibuttonentry_editable_set(Eo *obj, Elm_Multibuttonentry_Data *pd, Eina_Bool editable); + + +static Eina_Error +__eolian_elm_multibuttonentry_editable_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; Eina_Bool cval; + if (!eina_value_bool_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_multibuttonentry_editable_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_editable_set, EFL_FUNC_CALL(editable), Eina_Bool editable); + +Eina_Bool _elm_multibuttonentry_editable_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + + +static Eina_Value +__eolian_elm_multibuttonentry_editable_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_multibuttonentry_editable_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_editable_get, Eina_Bool, 0); + +void _elm_multibuttonentry_expanded_set(Eo *obj, Elm_Multibuttonentry_Data *pd, Eina_Bool expanded); + + +static Eina_Error +__eolian_elm_multibuttonentry_expanded_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; Eina_Bool cval; + if (!eina_value_bool_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_multibuttonentry_expanded_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_expanded_set, EFL_FUNC_CALL(expanded), Eina_Bool expanded); + +Eina_Bool _elm_multibuttonentry_expanded_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + + +static Eina_Value +__eolian_elm_multibuttonentry_expanded_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_multibuttonentry_expanded_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_expanded_get, Eina_Bool, 0); + +void _elm_multibuttonentry_format_function_set(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Multibuttonentry_Format_Cb format_function, const void *data); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_format_function_set, EFL_FUNC_CALL(format_function, data), Elm_Multibuttonentry_Format_Cb format_function, const void *data); + +const Eina_List *_elm_multibuttonentry_items_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_items_get, const Eina_List *, NULL); + +Elm_Widget_Item *_elm_multibuttonentry_first_item_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_first_item_get, Elm_Widget_Item *, NULL); + +Elm_Widget_Item *_elm_multibuttonentry_last_item_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_last_item_get, Elm_Widget_Item *, NULL); + +Efl_Canvas_Object *_elm_multibuttonentry_entry_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_entry_get, Efl_Canvas_Object *, NULL); + +Elm_Widget_Item *_elm_multibuttonentry_selected_item_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_selected_item_get, Elm_Widget_Item *, NULL); + +Elm_Widget_Item *_elm_multibuttonentry_item_prepend(Eo *obj, Elm_Multibuttonentry_Data *pd, const char *label, Evas_Smart_Cb func, void *data); + +EOAPI EFL_FUNC_BODYV(elm_obj_multibuttonentry_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, func, data), const char *label, Evas_Smart_Cb func, void *data); + +void _elm_multibuttonentry_clear(Eo *obj, Elm_Multibuttonentry_Data *pd); + +EOAPI EFL_VOID_FUNC_BODY(elm_obj_multibuttonentry_clear); + +void _elm_multibuttonentry_item_filter_remove(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_item_filter_remove, EFL_FUNC_CALL(func, data), Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +Elm_Widget_Item *_elm_multibuttonentry_item_insert_before(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Widget_Item *before, const char *label, Evas_Smart_Cb func, void *data); + +EOAPI EFL_FUNC_BODYV(elm_obj_multibuttonentry_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(before, label, func, data), Elm_Widget_Item *before, const char *label, Evas_Smart_Cb func, void *data); + +Elm_Widget_Item *_elm_multibuttonentry_item_append(Eo *obj, Elm_Multibuttonentry_Data *pd, const char *label, Evas_Smart_Cb func, void *data); + +EOAPI EFL_FUNC_BODYV(elm_obj_multibuttonentry_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, func, data), const char *label, Evas_Smart_Cb func, void *data); + +void _elm_multibuttonentry_item_filter_prepend(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_item_filter_prepend, EFL_FUNC_CALL(func, data), Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +void _elm_multibuttonentry_item_filter_append(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_item_filter_append, EFL_FUNC_CALL(func, data), Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +Elm_Widget_Item *_elm_multibuttonentry_item_insert_after(Eo *obj, Elm_Multibuttonentry_Data *pd, Elm_Widget_Item *after, const char *label, Evas_Smart_Cb func, void *data); + +EOAPI EFL_FUNC_BODYV(elm_obj_multibuttonentry_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(after, label, func, data), Elm_Widget_Item *after, const char *label, Evas_Smart_Cb func, void *data); + +Efl_Object *_elm_multibuttonentry_efl_object_constructor(Eo *obj, Elm_Multibuttonentry_Data *pd); + + +Eina_Error _elm_multibuttonentry_efl_ui_widget_theme_apply(Eo *obj, Elm_Multibuttonentry_Data *pd); + + +void _elm_multibuttonentry_efl_ui_widget_on_access_update(Eo *obj, Elm_Multibuttonentry_Data *pd, Eina_Bool enable); + + +void _elm_multibuttonentry_efl_ui_l10n_translation_update(Eo *obj, Elm_Multibuttonentry_Data *pd); + + +Eina_Bool _elm_multibuttonentry_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Multibuttonentry_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source); + + +Eina_List *_elm_multibuttonentry_efl_access_object_access_children_get(const Eo *obj, Elm_Multibuttonentry_Data *pd); + + +Efl_Object *_elm_multibuttonentry_efl_part_part_get(const Eo *obj, Elm_Multibuttonentry_Data *pd, const char *name); + + +static Eina_Bool +_elm_multibuttonentry_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_MULTIBUTTONENTRY_EXTRA_OPS +#define ELM_MULTIBUTTONENTRY_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_editable_set, _elm_multibuttonentry_editable_set), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_editable_get, _elm_multibuttonentry_editable_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_expanded_set, _elm_multibuttonentry_expanded_set), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_expanded_get, _elm_multibuttonentry_expanded_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_format_function_set, _elm_multibuttonentry_format_function_set), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_items_get, _elm_multibuttonentry_items_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_first_item_get, _elm_multibuttonentry_first_item_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_last_item_get, _elm_multibuttonentry_last_item_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_entry_get, _elm_multibuttonentry_entry_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_selected_item_get, _elm_multibuttonentry_selected_item_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_prepend, _elm_multibuttonentry_item_prepend), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_clear, _elm_multibuttonentry_clear), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_filter_remove, _elm_multibuttonentry_item_filter_remove), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_insert_before, _elm_multibuttonentry_item_insert_before), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_append, _elm_multibuttonentry_item_append), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_filter_prepend, _elm_multibuttonentry_item_filter_prepend), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_filter_append, _elm_multibuttonentry_item_filter_append), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_insert_after, _elm_multibuttonentry_item_insert_after), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_multibuttonentry_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_multibuttonentry_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_multibuttonentry_efl_ui_widget_on_access_update), + EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_multibuttonentry_efl_ui_l10n_translation_update), + EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_multibuttonentry_efl_ui_widget_widget_input_event_handler), + EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_multibuttonentry_efl_access_object_access_children_get), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_multibuttonentry_efl_part_part_get), + ELM_MULTIBUTTONENTRY_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"editable", __eolian_elm_multibuttonentry_editable_set_reflect, __eolian_elm_multibuttonentry_editable_get_reflect}, + {"expanded", __eolian_elm_multibuttonentry_expanded_set_reflect, __eolian_elm_multibuttonentry_expanded_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_multibuttonentry_class_desc = { + EO_VERSION, + "Elm.Multibuttonentry", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Multibuttonentry_Data), + _elm_multibuttonentry_class_initializer, + _elm_multibuttonentry_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_multibuttonentry_class_get, &_elm_multibuttonentry_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_multibuttonentry_eo.legacy.c" diff --git a/src/lib/elementary/elm_multibuttonentry_eo.h b/src/lib/elementary/elm_multibuttonentry_eo.h new file mode 100644 index 0000000..cac86fc --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_eo.h @@ -0,0 +1,346 @@ +#ifndef _ELM_MULTIBUTTONENTRY_EO_H_ +#define _ELM_MULTIBUTTONENTRY_EO_H_ + +#ifndef _ELM_MULTIBUTTONENTRY_EO_CLASS_TYPE +#define _ELM_MULTIBUTTONENTRY_EO_CLASS_TYPE + +typedef Eo Elm_Multibuttonentry; + +#endif + +#ifndef _ELM_MULTIBUTTONENTRY_EO_TYPES +#define _ELM_MULTIBUTTONENTRY_EO_TYPES + + +#endif +/** Elementary multibuttonentry class + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_CLASS elm_multibuttonentry_class_get() + +EWAPI const Efl_Class *elm_multibuttonentry_class_get(void); + +/** + * @brief Control if the multibuttonentry is to be editable or not. + * + * @param[in] obj The object. + * @param[in] editable If @c true, user can add/delete item in + * multibuttonentry, if not, the multibuttonentry is non-editable. + * + * @since 1.7 + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_editable_set(Eo *obj, Eina_Bool editable); + +/** + * @brief Control if the multibuttonentry is to be editable or not. + * + * @param[in] obj The object. + * + * @return If @c true, user can add/delete item in multibuttonentry, if not, + * the multibuttonentry is non-editable. + * + * @since 1.7 + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Eina_Bool elm_obj_multibuttonentry_editable_get(const Eo *obj); + +/** + * @brief Control the multibuttonentry to expanded state. + * + * In expanded state, the complete entry will be displayed. Otherwise, only + * single line of the entry will be displayed. + * + * @param[in] obj The object. + * @param[in] expanded The value of expanded state. Set this to @c true for + * expanded state. Set this to @c false for single line state. + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_expanded_set(Eo *obj, Eina_Bool expanded); + +/** + * @brief Control the multibuttonentry to expanded state. + * + * In expanded state, the complete entry will be displayed. Otherwise, only + * single line of the entry will be displayed. + * + * @param[in] obj The object. + * + * @return The value of expanded state. Set this to @c true for expanded state. + * Set this to @c false for single line state. + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Eina_Bool elm_obj_multibuttonentry_expanded_get(const Eo *obj); + +/** + * @brief Set a function to format the string that will be used to display the + * hidden items counter. + * + * If @c format_function is @c NULL, the default format will be used, which is + * $"... + %d". + * + * @param[in] obj The object. + * @param[in] format_function Format_function The actual format function + * @param[in] data Data User data to passed to @c format_function + * + * @since 1.9 + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_format_function_set(Eo *obj, Elm_Multibuttonentry_Format_Cb format_function, const void *data); + +/** + * @brief Get a list of items in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The list of items, or NULL if none + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI const Eina_List *elm_obj_multibuttonentry_items_get(const Eo *obj); + +/** + * @brief Get the first item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The first item, or NULL if none + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_first_item_get(const Eo *obj); + +/** + * @brief Get the last item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The last item, or NULL if none + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_last_item_get(const Eo *obj); + +/** + * @brief Get the entry of the multibuttonentry object + * + * @param[in] obj The object. + * + * @return The entry object, or NULL if none + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Efl_Canvas_Object *elm_obj_multibuttonentry_entry_get(const Eo *obj); + +/** + * @brief Get the selected item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The selected item, or NULL if none + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_selected_item_get(const Eo *obj); + +/** + * @brief Prepend a new item to the multibuttonentry + * + * See @ref efl_invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_prepend(Eo *obj, const char *label, Evas_Smart_Cb func, void *data); + +/** Remove all items in the multibuttonentry. + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_clear(Eo *obj); + +/** + * @brief Remove a filter from the list + * + * Removes the given callback from the filter list. See + * elm_multibuttonentry_item_filter_append() for more information. + * + * @param[in] obj The object. + * @param[in] func The filter function to remove + * @param[in] data The user data passed when adding the function + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_item_filter_remove(Eo *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Add a new item to the multibuttonentry before the indicated object + * reference. + * + * See @ref efl_invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] before The item before which to add it + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_insert_before(Eo *obj, Elm_Widget_Item *before, const char *label, Evas_Smart_Cb func, void *data); + +/** + * @brief Append a new item to the multibuttonentry + * + * See @ref efl_invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_append(Eo *obj, const char *label, Evas_Smart_Cb func, void *data); + +/** + * @brief Prepend a filter function for text inserted in the Multibuttonentry + * + * Prepend the given callback to the list. See + * elm_multibuttonentry_item_filter_append() for more information + * + * @param[in] obj The object. + * @param[in] func The function to use as text filter + * @param[in] data User data to pass to @c func + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_item_filter_prepend(Eo *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Append an item filter function for text inserted in the + * Multibuttonentry + * + * Append the given callback to a list. This function is called whenever any + * text is inserted into the Multibuttonentry, with the text to be inserted as + * a parameter. The callback function is free to alter the text in any way it + * wants but must free the given pointer and update it. If the new text is to + * be discarded, the function can free it and set it text parameter to NULL. + * This will also prevent any following filters from being called. + * + * @param[in] obj The object. + * @param[in] func The function to use as item filter + * @param[in] data User data to pass to @c func + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI void elm_obj_multibuttonentry_item_filter_append(Eo *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Add a new item to the multibuttonentry after the indicated object + * + * See @ref efl_invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] after The item after which to add it + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_insert_after(Eo *obj, Elm_Widget_Item *after, const char *label, Evas_Smart_Cb func, void *data); + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_SELECTED; + +/** Called when item was selected + * @return Efl_Object * + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_ITEM_SELECTED (&(_ELM_MULTIBUTTONENTRY_EVENT_ITEM_SELECTED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_ADDED; + +/** Called when item was added + * @return Efl_Object * + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_ITEM_ADDED (&(_ELM_MULTIBUTTONENTRY_EVENT_ITEM_ADDED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_DELETED; + +/** Called when item was deleted + * @return Efl_Object * + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_ITEM_DELETED (&(_ELM_MULTIBUTTONENTRY_EVENT_ITEM_DELETED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_CLICKED; + +/** Called when item was clicked + * @return Efl_Object * + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_ITEM_CLICKED (&(_ELM_MULTIBUTTONENTRY_EVENT_ITEM_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_ITEM_LONGPRESSED; + +/** Called when item got a longpress + * @return Efl_Object * + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_ITEM_LONGPRESSED (&(_ELM_MULTIBUTTONENTRY_EVENT_ITEM_LONGPRESSED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_EXPANDED; + +/** Called when expanded + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_EXPANDED (&(_ELM_MULTIBUTTONENTRY_EVENT_EXPANDED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_CONTRACTED; + +/** Called when contracted + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_CONTRACTED (&(_ELM_MULTIBUTTONENTRY_EVENT_CONTRACTED)) + +EWAPI extern const Efl_Event_Description _ELM_MULTIBUTTONENTRY_EVENT_EXPAND_STATE_CHANGED; + +/** Called when expanded state changed + * @return int + * + * @ingroup Elm_Multibuttonentry + */ +#define ELM_MULTIBUTTONENTRY_EVENT_EXPAND_STATE_CHANGED (&(_ELM_MULTIBUTTONENTRY_EVENT_EXPAND_STATE_CHANGED)) + +#endif diff --git a/src/lib/elementary/elm_multibuttonentry_eo.legacy.c b/src/lib/elementary/elm_multibuttonentry_eo.legacy.c new file mode 100644 index 0000000..fa95f80 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_eo.legacy.c @@ -0,0 +1,108 @@ + +EAPI void +elm_multibuttonentry_editable_set(Elm_Multibuttonentry *obj, Eina_Bool editable) +{ + elm_obj_multibuttonentry_editable_set(obj, editable); +} + +EAPI Eina_Bool +elm_multibuttonentry_editable_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_editable_get(obj); +} + +EAPI void +elm_multibuttonentry_expanded_set(Elm_Multibuttonentry *obj, Eina_Bool expanded) +{ + elm_obj_multibuttonentry_expanded_set(obj, expanded); +} + +EAPI Eina_Bool +elm_multibuttonentry_expanded_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_expanded_get(obj); +} + +EAPI void +elm_multibuttonentry_format_function_set(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Format_Cb format_function, const void *data) +{ + elm_obj_multibuttonentry_format_function_set(obj, format_function, data); +} + +EAPI const Eina_List * +elm_multibuttonentry_items_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_items_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_first_item_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_first_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_last_item_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_last_item_get(obj); +} + +EAPI Efl_Canvas_Object * +elm_multibuttonentry_entry_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_entry_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_selected_item_get(const Elm_Multibuttonentry *obj) +{ + return elm_obj_multibuttonentry_selected_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_prepend(Elm_Multibuttonentry *obj, const char *label, Evas_Smart_Cb func, void *data) +{ + return elm_obj_multibuttonentry_item_prepend(obj, label, func, data); +} + +EAPI void +elm_multibuttonentry_clear(Elm_Multibuttonentry *obj) +{ + elm_obj_multibuttonentry_clear(obj); +} + +EAPI void +elm_multibuttonentry_item_filter_remove(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) +{ + elm_obj_multibuttonentry_item_filter_remove(obj, func, data); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_insert_before(Elm_Multibuttonentry *obj, Elm_Widget_Item *before, const char *label, Evas_Smart_Cb func, void *data) +{ + return elm_obj_multibuttonentry_item_insert_before(obj, before, label, func, data); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_append(Elm_Multibuttonentry *obj, const char *label, Evas_Smart_Cb func, void *data) +{ + return elm_obj_multibuttonentry_item_append(obj, label, func, data); +} + +EAPI void +elm_multibuttonentry_item_filter_prepend(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) +{ + elm_obj_multibuttonentry_item_filter_prepend(obj, func, data); +} + +EAPI void +elm_multibuttonentry_item_filter_append(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) +{ + elm_obj_multibuttonentry_item_filter_append(obj, func, data); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_insert_after(Elm_Multibuttonentry *obj, Elm_Widget_Item *after, const char *label, Evas_Smart_Cb func, void *data) +{ + return elm_obj_multibuttonentry_item_insert_after(obj, after, label, func, data); +} diff --git a/src/lib/elementary/elm_multibuttonentry_eo.legacy.h b/src/lib/elementary/elm_multibuttonentry_eo.legacy.h new file mode 100644 index 0000000..dd99f04 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_eo.legacy.h @@ -0,0 +1,269 @@ +#ifndef _ELM_MULTIBUTTONENTRY_EO_LEGACY_H_ +#define _ELM_MULTIBUTTONENTRY_EO_LEGACY_H_ + +#ifndef _ELM_MULTIBUTTONENTRY_EO_CLASS_TYPE +#define _ELM_MULTIBUTTONENTRY_EO_CLASS_TYPE + +typedef Eo Elm_Multibuttonentry; + +#endif + +#ifndef _ELM_MULTIBUTTONENTRY_EO_TYPES +#define _ELM_MULTIBUTTONENTRY_EO_TYPES + + +#endif + +/** + * @brief Control if the multibuttonentry is to be editable or not. + * + * @param[in] obj The object. + * @param[in] editable If @c true, user can add/delete item in + * multibuttonentry, if not, the multibuttonentry is non-editable. + * + * @since 1.7 + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_editable_set(Elm_Multibuttonentry *obj, Eina_Bool editable); + +/** + * @brief Control if the multibuttonentry is to be editable or not. + * + * @param[in] obj The object. + * + * @return If @c true, user can add/delete item in multibuttonentry, if not, + * the multibuttonentry is non-editable. + * + * @since 1.7 + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Eina_Bool elm_multibuttonentry_editable_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Control the multibuttonentry to expanded state. + * + * In expanded state, the complete entry will be displayed. Otherwise, only + * single line of the entry will be displayed. + * + * @param[in] obj The object. + * @param[in] expanded The value of expanded state. Set this to @c true for + * expanded state. Set this to @c false for single line state. + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_expanded_set(Elm_Multibuttonentry *obj, Eina_Bool expanded); + +/** + * @brief Control the multibuttonentry to expanded state. + * + * In expanded state, the complete entry will be displayed. Otherwise, only + * single line of the entry will be displayed. + * + * @param[in] obj The object. + * + * @return The value of expanded state. Set this to @c true for expanded state. + * Set this to @c false for single line state. + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Eina_Bool elm_multibuttonentry_expanded_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Set a function to format the string that will be used to display the + * hidden items counter. + * + * If @c format_function is @c NULL, the default format will be used, which is + * $"... + %d". + * + * @param[in] obj The object. + * @param[in] format_function Format_function The actual format function + * @param[in] data Data User data to passed to @c format_function + * + * @since 1.9 + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_format_function_set(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Format_Cb format_function, const void *data); + +/** + * @brief Get a list of items in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The list of items, or NULL if none + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI const Eina_List *elm_multibuttonentry_items_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Get the first item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The first item, or NULL if none + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_first_item_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Get the last item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The last item, or NULL if none + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_last_item_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Get the entry of the multibuttonentry object + * + * @param[in] obj The object. + * + * @return The entry object, or NULL if none + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Efl_Canvas_Object *elm_multibuttonentry_entry_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Get the selected item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The selected item, or NULL if none + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_selected_item_get(const Elm_Multibuttonentry *obj); + +/** + * @brief Prepend a new item to the multibuttonentry + * + * See @ref Efl.Object.invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_prepend(Elm_Multibuttonentry *obj, const char *label, Evas_Smart_Cb func, void *data); + +/** Remove all items in the multibuttonentry. + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_clear(Elm_Multibuttonentry *obj); + +/** + * @brief Remove a filter from the list + * + * Removes the given callback from the filter list. See + * elm_multibuttonentry_item_filter_append() for more information. + * + * @param[in] obj The object. + * @param[in] func The filter function to remove + * @param[in] data The user data passed when adding the function + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_item_filter_remove(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Add a new item to the multibuttonentry before the indicated object + * reference. + * + * See @ref Efl.Object.invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] before The item before which to add it + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_insert_before(Elm_Multibuttonentry *obj, Elm_Widget_Item *before, const char *label, Evas_Smart_Cb func, void *data); + +/** + * @brief Append a new item to the multibuttonentry + * + * See @ref Efl.Object.invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_append(Elm_Multibuttonentry *obj, const char *label, Evas_Smart_Cb func, void *data); + +/** + * @brief Prepend a filter function for text inserted in the Multibuttonentry + * + * Prepend the given callback to the list. See + * elm_multibuttonentry_item_filter_append() for more information + * + * @param[in] obj The object. + * @param[in] func The function to use as text filter + * @param[in] data User data to pass to @c func + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_item_filter_prepend(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Append an item filter function for text inserted in the + * Multibuttonentry + * + * Append the given callback to a list. This function is called whenever any + * text is inserted into the Multibuttonentry, with the text to be inserted as + * a parameter. The callback function is free to alter the text in any way it + * wants but must free the given pointer and update it. If the new text is to + * be discarded, the function can free it and set it text parameter to NULL. + * This will also prevent any following filters from being called. + * + * @param[in] obj The object. + * @param[in] func The function to use as item filter + * @param[in] data User data to pass to @c func + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI void elm_multibuttonentry_item_filter_append(Elm_Multibuttonentry *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); + +/** + * @brief Add a new item to the multibuttonentry after the indicated object + * + * See @ref Efl.Object.invalidate to delete the item. + * + * @param[in] obj The object. + * @param[in] after The item after which to add it + * @param[in] label The label of new item + * @param[in] func The callback function to be invoked when this item is + * pressed. + * @param[in] data The pointer to the data to be attached + * + * @return A handle to the item added or NULL if not possible + * + * @ingroup Elm_Multibuttonentry_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_insert_after(Elm_Multibuttonentry *obj, Elm_Widget_Item *after, const char *label, Evas_Smart_Cb func, void *data); + +#endif diff --git a/src/lib/elementary/elm_multibuttonentry_item.eo b/src/lib/elementary/elm_multibuttonentry_item.eo deleted file mode 100644 index 09e05fd..0000000 --- a/src/lib/elementary/elm_multibuttonentry_item.eo +++ /dev/null @@ -1,38 +0,0 @@ -class Elm.Multibuttonentry_Item extends Elm.Widget.Item implements - Efl.Access.Widget.Action, - Efl.Ui.Legacy -{ - [[Elementary multibuttonentry class]] - legacy_prefix: elm_multibuttonentry_item; - eo_prefix: elm_obj_multibuttonentry_item; - methods { - @property selected { - [[Control the selected state of an item]] - get { - } - set { - } - values { - selected: bool; [[$true if selected $false otherwise]] - } - } - prev_get @const { - [[Get the previous item in the multibuttonentry]] - return: Elm.Widget.Item; [[The item before the item]] - } - next_get @const { - [[Get the next item in the multibuttonentry]] - return: Elm.Widget.Item; [[The item after the item]] - } - } - implements { - Efl.Object.constructor; - Efl.Object.destructor; - Elm.Widget.Item.signal_emit; - Elm.Widget.Item.part_text { get; set; } - Elm.Widget.Item.disable; - Efl.Access.Object.i18n_name { get; } - Efl.Access.Object.state_set { get; } - Efl.Access.Widget.Action.elm_actions { get; } - } -} diff --git a/src/lib/elementary/elm_multibuttonentry_item_eo.c b/src/lib/elementary/elm_multibuttonentry_item_eo.c new file mode 100644 index 0000000..0fcd277 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_item_eo.c @@ -0,0 +1,121 @@ + +void _elm_multibuttonentry_item_selected_set(Eo *obj, Elm_Multibuttonentry_Item_Data *pd, Eina_Bool selected); + + +static Eina_Error +__eolian_elm_multibuttonentry_item_selected_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; Eina_Bool cval; + if (!eina_value_bool_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_multibuttonentry_item_selected_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_multibuttonentry_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected); + +Eina_Bool _elm_multibuttonentry_item_selected_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +static Eina_Value +__eolian_elm_multibuttonentry_item_selected_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_multibuttonentry_item_selected_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_item_selected_get, Eina_Bool, 0); + +Elm_Widget_Item *_elm_multibuttonentry_item_prev_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_item_prev_get, Elm_Widget_Item *, NULL); + +Elm_Widget_Item *_elm_multibuttonentry_item_next_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_multibuttonentry_item_next_get, Elm_Widget_Item *, NULL); + +Efl_Object *_elm_multibuttonentry_item_efl_object_constructor(Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +void _elm_multibuttonentry_item_efl_object_destructor(Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +void _elm_multibuttonentry_item_elm_widget_item_signal_emit(Eo *obj, Elm_Multibuttonentry_Item_Data *pd, const char *emission, const char *source); + + +void _elm_multibuttonentry_item_elm_widget_item_part_text_set(Eo *obj, Elm_Multibuttonentry_Item_Data *pd, const char *part, const char *label); + + +const char *_elm_multibuttonentry_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd, const char *part); + + +void _elm_multibuttonentry_item_elm_widget_item_disable(Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +const char *_elm_multibuttonentry_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +Efl_Access_State_Set _elm_multibuttonentry_item_efl_access_object_state_set_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +const Efl_Access_Action_Data *_elm_multibuttonentry_item_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Multibuttonentry_Item_Data *pd); + + +static Eina_Bool +_elm_multibuttonentry_item_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS +#define ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_selected_set, _elm_multibuttonentry_item_selected_set), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_selected_get, _elm_multibuttonentry_item_selected_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_prev_get, _elm_multibuttonentry_item_prev_get), + EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_next_get, _elm_multibuttonentry_item_next_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_multibuttonentry_item_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_destructor, _elm_multibuttonentry_item_efl_object_destructor), + EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_multibuttonentry_item_elm_widget_item_signal_emit), + EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_multibuttonentry_item_elm_widget_item_part_text_set), + EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_multibuttonentry_item_elm_widget_item_part_text_get), + EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_multibuttonentry_item_elm_widget_item_disable), + EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_multibuttonentry_item_efl_access_object_i18n_name_get), + EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_multibuttonentry_item_efl_access_object_state_set_get), + EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_multibuttonentry_item_efl_access_widget_action_elm_actions_get), + ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"selected", __eolian_elm_multibuttonentry_item_selected_set_reflect, __eolian_elm_multibuttonentry_item_selected_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_multibuttonentry_item_class_desc = { + EO_VERSION, + "Elm.Multibuttonentry_Item", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Multibuttonentry_Item_Data), + _elm_multibuttonentry_item_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(elm_multibuttonentry_item_class_get, &_elm_multibuttonentry_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_multibuttonentry_item_eo.legacy.c" diff --git a/src/lib/elementary/elm_multibuttonentry_item_eo.h b/src/lib/elementary/elm_multibuttonentry_item_eo.h new file mode 100644 index 0000000..c1f5484 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_item_eo.h @@ -0,0 +1,67 @@ +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_H_ +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_H_ + +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_CLASS_TYPE +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_CLASS_TYPE + +typedef Eo Elm_Multibuttonentry_Item; + +#endif + +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_TYPES +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_TYPES + + +#endif +/** Elementary multibuttonentry class + * + * @ingroup Elm_Multibuttonentry_Item + */ +#define ELM_MULTIBUTTONENTRY_ITEM_CLASS elm_multibuttonentry_item_class_get() + +EWAPI const Efl_Class *elm_multibuttonentry_item_class_get(void); + +/** + * @brief Control the selected state of an item + * + * @param[in] obj The object. + * @param[in] selected @c true if selected @c false otherwise + * + * @ingroup Elm_Multibuttonentry_Item + */ +EOAPI void elm_obj_multibuttonentry_item_selected_set(Eo *obj, Eina_Bool selected); + +/** + * @brief Control the selected state of an item + * + * @param[in] obj The object. + * + * @return @c true if selected @c false otherwise + * + * @ingroup Elm_Multibuttonentry_Item + */ +EOAPI Eina_Bool elm_obj_multibuttonentry_item_selected_get(const Eo *obj); + +/** + * @brief Get the previous item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The item before the item + * + * @ingroup Elm_Multibuttonentry_Item + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_prev_get(const Eo *obj); + +/** + * @brief Get the next item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The item after the item + * + * @ingroup Elm_Multibuttonentry_Item + */ +EOAPI Elm_Widget_Item *elm_obj_multibuttonentry_item_next_get(const Eo *obj); + +#endif diff --git a/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.c b/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.c new file mode 100644 index 0000000..95f3250 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.c @@ -0,0 +1,24 @@ + +EAPI void +elm_multibuttonentry_item_selected_set(Elm_Multibuttonentry_Item *obj, Eina_Bool selected) +{ + elm_obj_multibuttonentry_item_selected_set(obj, selected); +} + +EAPI Eina_Bool +elm_multibuttonentry_item_selected_get(const Elm_Multibuttonentry_Item *obj) +{ + return elm_obj_multibuttonentry_item_selected_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_prev_get(const Elm_Multibuttonentry_Item *obj) +{ + return elm_obj_multibuttonentry_item_prev_get(obj); +} + +EAPI Elm_Widget_Item * +elm_multibuttonentry_item_next_get(const Elm_Multibuttonentry_Item *obj) +{ + return elm_obj_multibuttonentry_item_next_get(obj); +} diff --git a/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.h b/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.h new file mode 100644 index 0000000..d4e4281 --- /dev/null +++ b/src/lib/elementary/elm_multibuttonentry_item_eo.legacy.h @@ -0,0 +1,60 @@ +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_LEGACY_H_ +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_LEGACY_H_ + +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_CLASS_TYPE +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_CLASS_TYPE + +typedef Eo Elm_Multibuttonentry_Item; + +#endif + +#ifndef _ELM_MULTIBUTTONENTRY_ITEM_EO_TYPES +#define _ELM_MULTIBUTTONENTRY_ITEM_EO_TYPES + + +#endif + +/** + * @brief Control the selected state of an item + * + * @param[in] obj The object. + * @param[in] selected @c true if selected @c false otherwise + * + * @ingroup Elm_Multibuttonentry_Item_Group + */ +EAPI void elm_multibuttonentry_item_selected_set(Elm_Multibuttonentry_Item *obj, Eina_Bool selected); + +/** + * @brief Control the selected state of an item + * + * @param[in] obj The object. + * + * @return @c true if selected @c false otherwise + * + * @ingroup Elm_Multibuttonentry_Item_Group + */ +EAPI Eina_Bool elm_multibuttonentry_item_selected_get(const Elm_Multibuttonentry_Item *obj); + +/** + * @brief Get the previous item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The item before the item + * + * @ingroup Elm_Multibuttonentry_Item_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_prev_get(const Elm_Multibuttonentry_Item *obj); + +/** + * @brief Get the next item in the multibuttonentry + * + * @param[in] obj The object. + * + * @return The item after the item + * + * @ingroup Elm_Multibuttonentry_Item_Group + */ +EAPI Elm_Widget_Item *elm_multibuttonentry_item_next_get(const Elm_Multibuttonentry_Item *obj); + +#endif diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index d9bd7a6..a7f3294 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -198,8 +198,6 @@ pub_eo_files = [ 'efl_ui_progressbar_legacy_part.eo', 'elm_widget_item_container.eo', 'elm_spinner.eo', - 'elm_multibuttonentry.eo', - 'elm_multibuttonentry_item.eo', 'elm_multibuttonentry_part.eo', 'elm_interface_scrollable.eo', 'elm_atspi_bridge.eo', @@ -893,6 +891,10 @@ elementary_pub_headers = [ 'elm_menu_eo.legacy.h', 'elm_menu_item_eo.h', 'elm_menu_item_eo.legacy.h', + 'elm_multibuttonentry_eo.h', + 'elm_multibuttonentry_eo.legacy.h', + 'elm_multibuttonentry_item_eo.h', + 'elm_multibuttonentry_item_eo.legacy.h', ] elementary_header_src = [ -- 2.7.4