From 563bc027cd0e80a82aded426f0c58a36028b917a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_panel: 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/D8188 --- src/Makefile_Elementary.am | 5 +- src/lib/elementary/elm_panel.c | 2 +- src/lib/elementary/elm_panel.eo | 94 ---------- src/lib/elementary/elm_panel_eo.c | 210 +++++++++++++++++++++++ src/lib/elementary/elm_panel_eo.h | 140 +++++++++++++++ src/lib/elementary/elm_panel_eo.legacy.c | 54 ++++++ src/lib/elementary/elm_panel_eo.legacy.h | 125 ++++++++++++++ src/lib/elementary/elm_panel_legacy.h | 2 +- src/lib/elementary/elm_widget_panel.h | 2 +- src/lib/elementary/meson.build | 3 +- 10 files changed, 538 insertions(+), 99 deletions(-) delete mode 100644 src/lib/elementary/elm_panel.eo create mode 100644 src/lib/elementary/elm_panel_eo.c create mode 100644 src/lib/elementary/elm_panel_eo.h create mode 100644 src/lib/elementary/elm_panel_eo.legacy.c create mode 100644 src/lib/elementary/elm_panel_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 9c5f68b07f..ce7103cb5f 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -184,7 +184,6 @@ elm_private_eolian_files = \ # Legacy classes - not part of public EO API elm_legacy_eolian_files = \ lib/elementary/efl_ui_clock_legacy.eo \ - lib/elementary/elm_panel.eo \ lib/elementary/elm_player.eo \ lib/elementary/elm_plug.eo \ lib/elementary/elm_popup.eo \ @@ -375,6 +374,8 @@ lib/elementary/elm_naviframe_item_eo.c \ lib/elementary/elm_naviframe_item_eo.legacy.c \ lib/elementary/elm_notify_eo.c \ lib/elementary/elm_notify_eo.legacy.c \ +lib/elementary/elm_panel_eo.c \ +lib/elementary/elm_panel_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -530,6 +531,8 @@ lib/elementary/elm_naviframe_item_eo.h \ lib/elementary/elm_naviframe_item_eo.legacy.h \ lib/elementary/elm_notify_eo.h \ lib/elementary/elm_notify_eo.legacy.h \ +lib/elementary/elm_panel_eo.h \ +lib/elementary/elm_panel_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index 700056fea9..b6e47280ea 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -1501,4 +1501,4 @@ ELM_PART_OVERRIDE_CONTENT_UNSET(elm_panel, ELM_PANEL, Elm_Panel_Data) ELM_LAYOUT_SIZING_EVAL_OPS(elm_panel), \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_panel) -#include "elm_panel.eo.c" +#include "elm_panel_eo.c" diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo deleted file mode 100644 index 890aad8d6d..0000000000 --- a/src/lib/elementary/elm_panel.eo +++ /dev/null @@ -1,94 +0,0 @@ -enum Elm.Panel.Orient -{ - [[Panel orientation mode]] - - top, [[Panel (dis)appears from the top]] - bottom, [[Panel (dis)appears from the bottom]] - left, [[Panel (dis)appears from the left]] - right [[Panel (dis)appears from the right]] -} - -class Elm.Panel extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Layer, Elm.Interface_Scrollable, - Efl.Access.Widget.Action, Efl.Ui.Legacy -{ - [[Elementary panel class]] - legacy_prefix: elm_panel; - eo_prefix: elm_obj_panel; - event_prefix: elm_panel; - methods { - @property orient { - set { - [[Set the orientation of the panel - - Set from where the panel will (dis)appear. - ]] - } - get { - [[Get the orientation of the panel.]] - } - values { - orient: Elm.Panel.Orient(Elm.Panel.Orient.left); [[The panel orientation.]] - } - } - @property hidden { - set { - [[Set the state of the panel.]] - } - get { - [[Get the state of the panel.]] - } - values { - hidden: bool; [[If $true, the panel will run the animation to disappear.]] - } - } - @property scrollable { - set { - [[Set the scrollability of the panel.]] - } - get { - [[Get the state of the scrollability. - - @since 1.12 - ]] - } - values { - scrollable: bool; [[The scrollable state.]] - } - } - @property scrollable_content_size { - set { - [[Set the size of the scrollable panel.]] - } - get { - [[Get the size of the scrollable panel. - - @since 1.19 - ]] - } - values { - ratio: double; [[Size ratio]] - } - } - toggle { - [[Toggle the hidden state of the panel from code]] - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Gfx.Entity.position { set; } - Efl.Gfx.Entity.size { set; } - Efl.Canvas.Group.group_member_add; - Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.disabled {set;} - Efl.Ui.Widget.on_access_update; - Efl.Ui.Widget.widget_input_event_handler; - Efl.Ui.Widget.interest_region { get; } - Efl.Access.Widget.Action.elm_actions { get; } - Efl.Ui.I18n.mirrored { set; } - Efl.Part.part_get; - } - events { - toggled: void; [[Called when the hidden state was toggled]] - } -} diff --git a/src/lib/elementary/elm_panel_eo.c b/src/lib/elementary/elm_panel_eo.c new file mode 100644 index 0000000000..d54be07afe --- /dev/null +++ b/src/lib/elementary/elm_panel_eo.c @@ -0,0 +1,210 @@ +EWAPI const Efl_Event_Description _ELM_PANEL_EVENT_TOGGLED = + EFL_EVENT_DESCRIPTION("toggled"); + +void _elm_panel_orient_set(Eo *obj, Elm_Panel_Data *pd, Elm_Panel_Orient orient); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_panel_orient_set, EFL_FUNC_CALL(orient), Elm_Panel_Orient orient); + +Elm_Panel_Orient _elm_panel_orient_get(const Eo *obj, Elm_Panel_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_panel_orient_get, Elm_Panel_Orient, 2 /* Elm.Panel.Orient.left */); + +void _elm_panel_hidden_set(Eo *obj, Elm_Panel_Data *pd, Eina_Bool hidden); + + +static Eina_Error +__eolian_elm_panel_hidden_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_panel_hidden_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_panel_hidden_set, EFL_FUNC_CALL(hidden), Eina_Bool hidden); + +Eina_Bool _elm_panel_hidden_get(const Eo *obj, Elm_Panel_Data *pd); + + +static Eina_Value +__eolian_elm_panel_hidden_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_panel_hidden_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_panel_hidden_get, Eina_Bool, 0); + +void _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *pd, Eina_Bool scrollable); + + +static Eina_Error +__eolian_elm_panel_scrollable_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_panel_scrollable_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_panel_scrollable_set, EFL_FUNC_CALL(scrollable), Eina_Bool scrollable); + +Eina_Bool _elm_panel_scrollable_get(const Eo *obj, Elm_Panel_Data *pd); + + +static Eina_Value +__eolian_elm_panel_scrollable_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_panel_scrollable_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_panel_scrollable_get, Eina_Bool, 0); + +void _elm_panel_scrollable_content_size_set(Eo *obj, Elm_Panel_Data *pd, double ratio); + + +static Eina_Error +__eolian_elm_panel_scrollable_content_size_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; double cval; + if (!eina_value_double_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_panel_scrollable_content_size_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_panel_scrollable_content_size_set, EFL_FUNC_CALL(ratio), double ratio); + +double _elm_panel_scrollable_content_size_get(const Eo *obj, Elm_Panel_Data *pd); + + +static Eina_Value +__eolian_elm_panel_scrollable_content_size_get_reflect(Eo *obj) +{ + double val = elm_obj_panel_scrollable_content_size_get(obj); + return eina_value_double_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_panel_scrollable_content_size_get, double, 0); + +void _elm_panel_toggle(Eo *obj, Elm_Panel_Data *pd); + +EOAPI EFL_VOID_FUNC_BODY(elm_obj_panel_toggle); + +Efl_Object *_elm_panel_efl_object_constructor(Eo *obj, Elm_Panel_Data *pd); + + +void _elm_panel_efl_gfx_entity_position_set(Eo *obj, Elm_Panel_Data *pd, Eina_Position2D pos); + + +void _elm_panel_efl_gfx_entity_size_set(Eo *obj, Elm_Panel_Data *pd, Eina_Size2D size); + + +void _elm_panel_efl_canvas_group_group_member_add(Eo *obj, Elm_Panel_Data *pd, Efl_Canvas_Object *sub_obj); + + +Eina_Error _elm_panel_efl_ui_widget_theme_apply(Eo *obj, Elm_Panel_Data *pd); + + +void _elm_panel_efl_ui_widget_disabled_set(Eo *obj, Elm_Panel_Data *pd, Eina_Bool disabled); + + +void _elm_panel_efl_ui_widget_on_access_update(Eo *obj, Elm_Panel_Data *pd, Eina_Bool enable); + + +Eina_Bool _elm_panel_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Panel_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source); + + +Eina_Rect _elm_panel_efl_ui_widget_interest_region_get(const Eo *obj, Elm_Panel_Data *pd); + + +const Efl_Access_Action_Data *_elm_panel_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Panel_Data *pd); + + +void _elm_panel_efl_ui_i18n_mirrored_set(Eo *obj, Elm_Panel_Data *pd, Eina_Bool rtl); + + +Efl_Object *_elm_panel_efl_part_part_get(const Eo *obj, Elm_Panel_Data *pd, const char *name); + + +static Eina_Bool +_elm_panel_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_PANEL_EXTRA_OPS +#define ELM_PANEL_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_panel_orient_set, _elm_panel_orient_set), + EFL_OBJECT_OP_FUNC(elm_obj_panel_orient_get, _elm_panel_orient_get), + EFL_OBJECT_OP_FUNC(elm_obj_panel_hidden_set, _elm_panel_hidden_set), + EFL_OBJECT_OP_FUNC(elm_obj_panel_hidden_get, _elm_panel_hidden_get), + EFL_OBJECT_OP_FUNC(elm_obj_panel_scrollable_set, _elm_panel_scrollable_set), + EFL_OBJECT_OP_FUNC(elm_obj_panel_scrollable_get, _elm_panel_scrollable_get), + EFL_OBJECT_OP_FUNC(elm_obj_panel_scrollable_content_size_set, _elm_panel_scrollable_content_size_set), + EFL_OBJECT_OP_FUNC(elm_obj_panel_scrollable_content_size_get, _elm_panel_scrollable_content_size_get), + EFL_OBJECT_OP_FUNC(elm_obj_panel_toggle, _elm_panel_toggle), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_panel_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_panel_efl_gfx_entity_position_set), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_panel_efl_gfx_entity_size_set), + EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_panel_efl_canvas_group_group_member_add), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_panel_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_ui_widget_disabled_set, _elm_panel_efl_ui_widget_disabled_set), + EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_panel_efl_ui_widget_on_access_update), + EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_panel_efl_ui_widget_widget_input_event_handler), + EFL_OBJECT_OP_FUNC(efl_ui_widget_interest_region_get, _elm_panel_efl_ui_widget_interest_region_get), + EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_panel_efl_access_widget_action_elm_actions_get), + EFL_OBJECT_OP_FUNC(efl_ui_mirrored_set, _elm_panel_efl_ui_i18n_mirrored_set), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_panel_efl_part_part_get), + ELM_PANEL_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"hidden", __eolian_elm_panel_hidden_set_reflect, __eolian_elm_panel_hidden_get_reflect}, + {"scrollable", __eolian_elm_panel_scrollable_set_reflect, __eolian_elm_panel_scrollable_get_reflect}, + {"scrollable_content_size", __eolian_elm_panel_scrollable_content_size_set_reflect, __eolian_elm_panel_scrollable_content_size_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_panel_class_desc = { + EO_VERSION, + "Elm.Panel", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Panel_Data), + _elm_panel_class_initializer, + _elm_panel_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_panel_class_get, &_elm_panel_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_FOCUS_LAYER_MIXIN, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_panel_eo.legacy.c" diff --git a/src/lib/elementary/elm_panel_eo.h b/src/lib/elementary/elm_panel_eo.h new file mode 100644 index 0000000000..5e045de3ef --- /dev/null +++ b/src/lib/elementary/elm_panel_eo.h @@ -0,0 +1,140 @@ +#ifndef _ELM_PANEL_EO_H_ +#define _ELM_PANEL_EO_H_ + +#ifndef _ELM_PANEL_EO_CLASS_TYPE +#define _ELM_PANEL_EO_CLASS_TYPE + +typedef Eo Elm_Panel; + +#endif + +#ifndef _ELM_PANEL_EO_TYPES +#define _ELM_PANEL_EO_TYPES + +/** Panel orientation mode + * + * @ingroup Elm_Panel + */ +typedef enum +{ + ELM_PANEL_ORIENT_TOP = 0, /**< Panel (dis)appears from the top */ + ELM_PANEL_ORIENT_BOTTOM, /**< Panel (dis)appears from the bottom */ + ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */ + ELM_PANEL_ORIENT_RIGHT /**< Panel (dis)appears from the right */ +} Elm_Panel_Orient; + + +#endif +/** Elementary panel class + * + * @ingroup Elm_Panel + */ +#define ELM_PANEL_CLASS elm_panel_class_get() + +EWAPI const Efl_Class *elm_panel_class_get(void); + +/** + * @brief Set the orientation of the panel + * + * Set from where the panel will (dis)appear. + * + * @param[in] obj The object. + * @param[in] orient The panel orientation. + * + * @ingroup Elm_Panel + */ +EOAPI void elm_obj_panel_orient_set(Eo *obj, Elm_Panel_Orient orient); + +/** + * @brief Get the orientation of the panel. + * + * @param[in] obj The object. + * + * @return The panel orientation. + * + * @ingroup Elm_Panel + */ +EOAPI Elm_Panel_Orient elm_obj_panel_orient_get(const Eo *obj); + +/** + * @brief Set the state of the panel. + * + * @param[in] obj The object. + * @param[in] hidden If @c true, the panel will run the animation to disappear. + * + * @ingroup Elm_Panel + */ +EOAPI void elm_obj_panel_hidden_set(Eo *obj, Eina_Bool hidden); + +/** + * @brief Get the state of the panel. + * + * @param[in] obj The object. + * + * @return If @c true, the panel will run the animation to disappear. + * + * @ingroup Elm_Panel + */ +EOAPI Eina_Bool elm_obj_panel_hidden_get(const Eo *obj); + +/** + * @brief Set the scrollability of the panel. + * + * @param[in] obj The object. + * @param[in] scrollable The scrollable state. + * + * @ingroup Elm_Panel + */ +EOAPI void elm_obj_panel_scrollable_set(Eo *obj, Eina_Bool scrollable); + +/** + * @brief Get the state of the scrollability. + * + * @param[in] obj The object. + * + * @return The scrollable state. + * + * @since 1.12 + * + * @ingroup Elm_Panel + */ +EOAPI Eina_Bool elm_obj_panel_scrollable_get(const Eo *obj); + +/** + * @brief Set the size of the scrollable panel. + * + * @param[in] obj The object. + * @param[in] ratio Size ratio + * + * @ingroup Elm_Panel + */ +EOAPI void elm_obj_panel_scrollable_content_size_set(Eo *obj, double ratio); + +/** + * @brief Get the size of the scrollable panel. + * + * @param[in] obj The object. + * + * @return Size ratio + * + * @since 1.19 + * + * @ingroup Elm_Panel + */ +EOAPI double elm_obj_panel_scrollable_content_size_get(const Eo *obj); + +/** Toggle the hidden state of the panel from code + * + * @ingroup Elm_Panel + */ +EOAPI void elm_obj_panel_toggle(Eo *obj); + +EWAPI extern const Efl_Event_Description _ELM_PANEL_EVENT_TOGGLED; + +/** Called when the hidden state was toggled + * + * @ingroup Elm_Panel + */ +#define ELM_PANEL_EVENT_TOGGLED (&(_ELM_PANEL_EVENT_TOGGLED)) + +#endif diff --git a/src/lib/elementary/elm_panel_eo.legacy.c b/src/lib/elementary/elm_panel_eo.legacy.c new file mode 100644 index 0000000000..0dc4e86f01 --- /dev/null +++ b/src/lib/elementary/elm_panel_eo.legacy.c @@ -0,0 +1,54 @@ + +EAPI void +elm_panel_orient_set(Elm_Panel *obj, Elm_Panel_Orient orient) +{ + elm_obj_panel_orient_set(obj, orient); +} + +EAPI Elm_Panel_Orient +elm_panel_orient_get(const Elm_Panel *obj) +{ + return elm_obj_panel_orient_get(obj); +} + +EAPI void +elm_panel_hidden_set(Elm_Panel *obj, Eina_Bool hidden) +{ + elm_obj_panel_hidden_set(obj, hidden); +} + +EAPI Eina_Bool +elm_panel_hidden_get(const Elm_Panel *obj) +{ + return elm_obj_panel_hidden_get(obj); +} + +EAPI void +elm_panel_scrollable_set(Elm_Panel *obj, Eina_Bool scrollable) +{ + elm_obj_panel_scrollable_set(obj, scrollable); +} + +EAPI Eina_Bool +elm_panel_scrollable_get(const Elm_Panel *obj) +{ + return elm_obj_panel_scrollable_get(obj); +} + +EAPI void +elm_panel_scrollable_content_size_set(Elm_Panel *obj, double ratio) +{ + elm_obj_panel_scrollable_content_size_set(obj, ratio); +} + +EAPI double +elm_panel_scrollable_content_size_get(const Elm_Panel *obj) +{ + return elm_obj_panel_scrollable_content_size_get(obj); +} + +EAPI void +elm_panel_toggle(Elm_Panel *obj) +{ + elm_obj_panel_toggle(obj); +} diff --git a/src/lib/elementary/elm_panel_eo.legacy.h b/src/lib/elementary/elm_panel_eo.legacy.h new file mode 100644 index 0000000000..d6b8b49d7a --- /dev/null +++ b/src/lib/elementary/elm_panel_eo.legacy.h @@ -0,0 +1,125 @@ +#ifndef _ELM_PANEL_EO_LEGACY_H_ +#define _ELM_PANEL_EO_LEGACY_H_ + +#ifndef _ELM_PANEL_EO_CLASS_TYPE +#define _ELM_PANEL_EO_CLASS_TYPE + +typedef Eo Elm_Panel; + +#endif + +#ifndef _ELM_PANEL_EO_TYPES +#define _ELM_PANEL_EO_TYPES + +/** Panel orientation mode + * + * @ingroup Elm_Panel + */ +typedef enum +{ + ELM_PANEL_ORIENT_TOP = 0, /**< Panel (dis)appears from the top */ + ELM_PANEL_ORIENT_BOTTOM, /**< Panel (dis)appears from the bottom */ + ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */ + ELM_PANEL_ORIENT_RIGHT /**< Panel (dis)appears from the right */ +} Elm_Panel_Orient; + + +#endif + +/** + * @brief Set the orientation of the panel + * + * Set from where the panel will (dis)appear. + * + * @param[in] obj The object. + * @param[in] orient The panel orientation. + * + * @ingroup Elm_Panel_Group + */ +EAPI void elm_panel_orient_set(Elm_Panel *obj, Elm_Panel_Orient orient); + +/** + * @brief Get the orientation of the panel. + * + * @param[in] obj The object. + * + * @return The panel orientation. + * + * @ingroup Elm_Panel_Group + */ +EAPI Elm_Panel_Orient elm_panel_orient_get(const Elm_Panel *obj); + +/** + * @brief Set the state of the panel. + * + * @param[in] obj The object. + * @param[in] hidden If @c true, the panel will run the animation to disappear. + * + * @ingroup Elm_Panel_Group + */ +EAPI void elm_panel_hidden_set(Elm_Panel *obj, Eina_Bool hidden); + +/** + * @brief Get the state of the panel. + * + * @param[in] obj The object. + * + * @return If @c true, the panel will run the animation to disappear. + * + * @ingroup Elm_Panel_Group + */ +EAPI Eina_Bool elm_panel_hidden_get(const Elm_Panel *obj); + +/** + * @brief Set the scrollability of the panel. + * + * @param[in] obj The object. + * @param[in] scrollable The scrollable state. + * + * @ingroup Elm_Panel_Group + */ +EAPI void elm_panel_scrollable_set(Elm_Panel *obj, Eina_Bool scrollable); + +/** + * @brief Get the state of the scrollability. + * + * @param[in] obj The object. + * + * @return The scrollable state. + * + * @since 1.12 + * + * @ingroup Elm_Panel_Group + */ +EAPI Eina_Bool elm_panel_scrollable_get(const Elm_Panel *obj); + +/** + * @brief Set the size of the scrollable panel. + * + * @param[in] obj The object. + * @param[in] ratio Size ratio + * + * @ingroup Elm_Panel_Group + */ +EAPI void elm_panel_scrollable_content_size_set(Elm_Panel *obj, double ratio); + +/** + * @brief Get the size of the scrollable panel. + * + * @param[in] obj The object. + * + * @return Size ratio + * + * @since 1.19 + * + * @ingroup Elm_Panel_Group + */ +EAPI double elm_panel_scrollable_content_size_get(const Elm_Panel *obj); + +/** Toggle the hidden state of the panel from code + * + * @ingroup Elm_Panel_Group + */ +EAPI void elm_panel_toggle(Elm_Panel *obj); + +#endif diff --git a/src/lib/elementary/elm_panel_legacy.h b/src/lib/elementary/elm_panel_legacy.h index 33513fc8f6..a95c31046f 100644 --- a/src/lib/elementary/elm_panel_legacy.h +++ b/src/lib/elementary/elm_panel_legacy.h @@ -9,4 +9,4 @@ */ EAPI Evas_Object *elm_panel_add(Evas_Object *parent); -#include "elm_panel.eo.legacy.h" \ No newline at end of file +#include "elm_panel_eo.legacy.h" \ No newline at end of file diff --git a/src/lib/elementary/elm_widget_panel.h b/src/lib/elementary/elm_widget_panel.h index 7aa093fa44..dbbbf80f5c 100644 --- a/src/lib/elementary/elm_widget_panel.h +++ b/src/lib/elementary/elm_widget_panel.h @@ -3,7 +3,7 @@ #include "elm_interface_scrollable.h" #include "elm_widget_layout.h" -#include "elm_panel.eo.h" +#include "elm_panel_eo.h" /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 752c5c9901..72b7d30eae 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,6 +1,5 @@ pub_legacy_eo_files = [ 'efl_ui_clock_legacy.eo', - 'elm_panel.eo', 'elm_player.eo', 'elm_plug.eo', 'elm_popup.eo', @@ -778,6 +777,8 @@ elementary_pub_headers = [ 'elm_naviframe_item_eo.legacy.h', 'elm_notify_eo.h', 'elm_notify_eo.legacy.h', + 'elm_panel_eo.h', + 'elm_panel_eo.legacy.h', ] elementary_header_src = [