diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 66c5077e90..2c5c61bc36 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -183,7 +183,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_scroller.eo \ lib/elementary/elm_sys_notify_interface.eo \ lib/elementary/elm_sys_notify.eo \ lib/elementary/elm_sys_notify_dbus.eo \ @@ -381,6 +380,8 @@ lib/elementary/elm_prefs_eo.c \ lib/elementary/elm_prefs_eo.legacy.c \ lib/elementary/elm_route_eo.c \ lib/elementary/elm_route_eo.legacy.c \ +lib/elementary/elm_scroller_eo.c \ +lib/elementary/elm_scroller_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -554,6 +555,8 @@ lib/elementary/elm_prefs_eo.h \ lib/elementary/elm_prefs_eo.legacy.h \ lib/elementary/elm_route_eo.h \ lib/elementary/elm_route_eo.legacy.h \ +lib/elementary/elm_scroller_eo.h \ +lib/elementary/elm_scroller_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c index 47db121f7b..a3c87cd5fa 100644 --- a/src/lib/elementary/elm_conform.c +++ b/src/lib/elementary/elm_conform.c @@ -11,7 +11,7 @@ #include "elm_widget_conform.h" #include "elm_widget_layout.h" #include "elm_widget_plug.h" -#include "elm_scroller.eo.h" +#include "elm_scroller_eo.h" #include "elm_genlist_eo.h" #include "elm_conformant_eo.h" diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index ab53acc2b7..925f805273 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -13,7 +13,7 @@ #include "elm_widget_layout.h" #include "elm_widget_scroller.h" -#include "elm_scroller.eo.h" +#include "elm_scroller_eo.h" #include "elm_scroller_part.eo.h" #include "elm_part_helper.h" @@ -1390,4 +1390,4 @@ ELM_PART_OVERRIDE_CONTENT_UNSET(elm_scroller, ELM_SCROLLER, Elm_Scroller_Data) ELM_LAYOUT_SIZING_EVAL_OPS(elm_scroller), \ EFL_CANVAS_GROUP_ADD_OPS(elm_scroller) -#include "elm_scroller.eo.c" +#include "elm_scroller_eo.c" diff --git a/src/lib/elementary/elm_scroller.eo b/src/lib/elementary/elm_scroller.eo deleted file mode 100644 index 563eb42644..0000000000 --- a/src/lib/elementary/elm_scroller.eo +++ /dev/null @@ -1,78 +0,0 @@ -class Elm.Scroller extends Efl.Ui.Layout_Base implements Elm.Interface_Scrollable, - Efl.Access.Widget.Action, - Efl.Ui.Scrollable, Efl.Content, Efl.Ui.Legacy -{ - [[Elementary scroller class]] - legacy_prefix: elm_scroller; - eo_prefix: elm_obj_scroller; - event_prefix: elm_scroller; - methods { - @property custom_widget_base_theme { - set { - [[Set custom theme elements for the scroller]] - } - values { - klass: string; [[Klass name]] - group: string; [[Group name]] - } - } - page_scroll_limit_set @const { - [[Set the maximum of the movable page at a flicking. - - The value of maximum movable page should be more than 1. - - @since 1.8 - ]] - params { - @in page_limit_h: int; [[The maximum of the movable horizontal page]] - @in page_limit_v: int; [[The maximum of the movable vertical page]] - } - } - page_scroll_limit_get @const { - [[Get the maximum of the movable page at a flicking. - - @since 1.8 - ]] - params { - @in page_limit_h: ptr(int); [[The maximum of the movable horizontal page]] - @in page_limit_v: ptr(int); [[The maximum of the movable vertical page]] - } - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Gfx.Entity.position { set; } - Efl.Gfx.Entity.size { set; } - Efl.Canvas.Group.group_member_add; - Efl.Content.content { get; set; } - Efl.Content.content_unset; - Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.on_access_activate; - Efl.Ui.Widget.widget_sub_object_del; - Efl.Ui.Widget.widget_input_event_handler; - Elm.Interface_Scrollable.page_size { set; } - Elm.Interface_Scrollable.policy { set; } - Elm.Interface_Scrollable.single_direction { get; set; } - Efl.Access.Widget.Action.elm_actions { get; } - Efl.Part.part_get; - Efl.Ui.Widget.focus_state_apply; - } - events { - scroll,page,changed: void; [[Called when scroll page changed]] - hbar,unpress: void; [[Called when horizontal bar is no longer pressed]] - hbar,press: void; [[Called when horizontal bar is pressed]] - hbar,drag: void; [[Called when horizontal bar is dragged]] - vbar,unpress: void; [[Called when vertical bar is no longer pressed]] - vbar,press: void; [[Called when vertical bar is pressed]] - vbar,drag: void; [[Called when vertical bar is dragged]] - scroll,left: void; [[Called when scrolling to left]] - scroll,right: void; [[Called when scrolling to right]] - scroll,up: void; [[Called scrolled upwards]] - scroll,down: void; [[Called when scrolled downwards]] - edge,left: void; [[Called when hitting the left edge]] - edge,right: void; [[Called when hitting the right edge]] - edge,top: void; [[Called when hitting the top edge]] - edge,bottom: void; [[Called when hitting the bottom edge]] - } -} diff --git a/src/lib/elementary/elm_scroller_eo.c b/src/lib/elementary/elm_scroller_eo.c new file mode 100644 index 0000000000..aa977dd549 --- /dev/null +++ b/src/lib/elementary/elm_scroller_eo.c @@ -0,0 +1,150 @@ +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_PAGE_CHANGED = + EFL_EVENT_DESCRIPTION("scroll,page,changed"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_UNPRESS = + EFL_EVENT_DESCRIPTION("hbar,unpress"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_PRESS = + EFL_EVENT_DESCRIPTION("hbar,press"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_DRAG = + EFL_EVENT_DESCRIPTION("hbar,drag"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_UNPRESS = + EFL_EVENT_DESCRIPTION("vbar,unpress"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_PRESS = + EFL_EVENT_DESCRIPTION("vbar,press"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_DRAG = + EFL_EVENT_DESCRIPTION("vbar,drag"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_LEFT = + EFL_EVENT_DESCRIPTION("scroll,left"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_RIGHT = + EFL_EVENT_DESCRIPTION("scroll,right"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_UP = + EFL_EVENT_DESCRIPTION("scroll,up"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_DOWN = + EFL_EVENT_DESCRIPTION("scroll,down"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_LEFT = + EFL_EVENT_DESCRIPTION("edge,left"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_RIGHT = + EFL_EVENT_DESCRIPTION("edge,right"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_TOP = + EFL_EVENT_DESCRIPTION("edge,top"); +EWAPI const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_BOTTOM = + EFL_EVENT_DESCRIPTION("edge,bottom"); + +void _elm_scroller_custom_widget_base_theme_set(Eo *obj, Elm_Scroller_Data *pd, const char *klass, const char *group); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_scroller_custom_widget_base_theme_set, EFL_FUNC_CALL(klass, group), const char *klass, const char *group); + +void _elm_scroller_page_scroll_limit_set(const Eo *obj, Elm_Scroller_Data *pd, int page_limit_h, int page_limit_v); + +EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_scroller_page_scroll_limit_set, EFL_FUNC_CALL(page_limit_h, page_limit_v), int page_limit_h, int page_limit_v); + +void _elm_scroller_page_scroll_limit_get(const Eo *obj, Elm_Scroller_Data *pd, int *page_limit_h, int *page_limit_v); + +EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_scroller_page_scroll_limit_get, EFL_FUNC_CALL(page_limit_h, page_limit_v), int *page_limit_h, int *page_limit_v); + +Efl_Object *_elm_scroller_efl_object_constructor(Eo *obj, Elm_Scroller_Data *pd); + + +void _elm_scroller_efl_gfx_entity_position_set(Eo *obj, Elm_Scroller_Data *pd, Eina_Position2D pos); + + +void _elm_scroller_efl_gfx_entity_size_set(Eo *obj, Elm_Scroller_Data *pd, Eina_Size2D size); + + +void _elm_scroller_efl_canvas_group_group_member_add(Eo *obj, Elm_Scroller_Data *pd, Efl_Canvas_Object *sub_obj); + + +Eina_Bool _elm_scroller_efl_content_content_set(Eo *obj, Elm_Scroller_Data *pd, Efl_Gfx_Entity *content); + + +Efl_Gfx_Entity *_elm_scroller_efl_content_content_get(const Eo *obj, Elm_Scroller_Data *pd); + + +Efl_Gfx_Entity *_elm_scroller_efl_content_content_unset(Eo *obj, Elm_Scroller_Data *pd); + + +Eina_Error _elm_scroller_efl_ui_widget_theme_apply(Eo *obj, Elm_Scroller_Data *pd); + + +Eina_Bool _elm_scroller_efl_ui_widget_on_access_activate(Eo *obj, Elm_Scroller_Data *pd, Efl_Ui_Activate act); + + +Eina_Bool _elm_scroller_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Scroller_Data *pd, Efl_Canvas_Object *sub_obj); + + +Eina_Bool _elm_scroller_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Scroller_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source); + + +void _elm_scroller_elm_interface_scrollable_page_size_set(Eo *obj, Elm_Scroller_Data *pd, int x, int y); + + +void _elm_scroller_elm_interface_scrollable_policy_set(Eo *obj, Elm_Scroller_Data *pd, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar); + + +void _elm_scroller_elm_interface_scrollable_single_direction_set(Eo *obj, Elm_Scroller_Data *pd, Elm_Scroller_Single_Direction single_dir); + + +Elm_Scroller_Single_Direction _elm_scroller_elm_interface_scrollable_single_direction_get(const Eo *obj, Elm_Scroller_Data *pd); + + +const Efl_Access_Action_Data *_elm_scroller_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Scroller_Data *pd); + + +Efl_Object *_elm_scroller_efl_part_part_get(const Eo *obj, Elm_Scroller_Data *pd, const char *name); + + +Eina_Bool _elm_scroller_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Scroller_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect); + + +static Eina_Bool +_elm_scroller_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_SCROLLER_EXTRA_OPS +#define ELM_SCROLLER_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_scroller_custom_widget_base_theme_set, _elm_scroller_custom_widget_base_theme_set), + EFL_OBJECT_OP_FUNC(elm_obj_scroller_page_scroll_limit_set, _elm_scroller_page_scroll_limit_set), + EFL_OBJECT_OP_FUNC(elm_obj_scroller_page_scroll_limit_get, _elm_scroller_page_scroll_limit_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_scroller_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_scroller_efl_gfx_entity_position_set), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_scroller_efl_gfx_entity_size_set), + EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_scroller_efl_canvas_group_group_member_add), + EFL_OBJECT_OP_FUNC(efl_content_set, _elm_scroller_efl_content_content_set), + EFL_OBJECT_OP_FUNC(efl_content_get, _elm_scroller_efl_content_content_get), + EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_scroller_efl_content_content_unset), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_scroller_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_activate, _elm_scroller_efl_ui_widget_on_access_activate), + EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_scroller_efl_ui_widget_widget_sub_object_del), + EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_scroller_efl_ui_widget_widget_input_event_handler), + EFL_OBJECT_OP_FUNC(elm_interface_scrollable_page_size_set, _elm_scroller_elm_interface_scrollable_page_size_set), + EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_scroller_elm_interface_scrollable_policy_set), + EFL_OBJECT_OP_FUNC(elm_interface_scrollable_single_direction_set, _elm_scroller_elm_interface_scrollable_single_direction_set), + EFL_OBJECT_OP_FUNC(elm_interface_scrollable_single_direction_get, _elm_scroller_elm_interface_scrollable_single_direction_get), + EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_scroller_efl_access_widget_action_elm_actions_get), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_scroller_efl_part_part_get), + EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_scroller_efl_ui_widget_focus_state_apply), + ELM_SCROLLER_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_scroller_class_desc = { + EO_VERSION, + "Elm.Scroller", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Scroller_Data), + _elm_scroller_class_initializer, + _elm_scroller_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_scroller_class_get, &_elm_scroller_class_desc, EFL_UI_LAYOUT_BASE_CLASS, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_SCROLLABLE_INTERFACE, EFL_CONTENT_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_scroller_eo.legacy.c" diff --git a/src/lib/elementary/elm_scroller_eo.h b/src/lib/elementary/elm_scroller_eo.h new file mode 100644 index 0000000000..6d4dd6ce38 --- /dev/null +++ b/src/lib/elementary/elm_scroller_eo.h @@ -0,0 +1,183 @@ +#ifndef _ELM_SCROLLER_EO_H_ +#define _ELM_SCROLLER_EO_H_ + +#ifndef _ELM_SCROLLER_EO_CLASS_TYPE +#define _ELM_SCROLLER_EO_CLASS_TYPE + +typedef Eo Elm_Scroller; + +#endif + +#ifndef _ELM_SCROLLER_EO_TYPES +#define _ELM_SCROLLER_EO_TYPES + + +#endif +/** Elementary scroller class + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_CLASS elm_scroller_class_get() + +EWAPI const Efl_Class *elm_scroller_class_get(void); + +/** + * @brief Set custom theme elements for the scroller + * + * @param[in] obj The object. + * @param[in] klass Klass name + * @param[in] group Group name + * + * @ingroup Elm_Scroller + */ +EOAPI void elm_obj_scroller_custom_widget_base_theme_set(Eo *obj, const char *klass, const char *group); + +/** + * @brief Set the maximum of the movable page at a flicking. + * + * The value of maximum movable page should be more than 1. + * + * @param[in] obj The object. + * @param[in] page_limit_h The maximum of the movable horizontal page + * @param[in] page_limit_v The maximum of the movable vertical page + * + * @since 1.8 + * + * @ingroup Elm_Scroller + */ +EOAPI void elm_obj_scroller_page_scroll_limit_set(const Eo *obj, int page_limit_h, int page_limit_v); + +/** + * @brief Get the maximum of the movable page at a flicking. + * + * @param[in] obj The object. + * @param[in] page_limit_h The maximum of the movable horizontal page + * @param[in] page_limit_v The maximum of the movable vertical page + * + * @since 1.8 + * + * @ingroup Elm_Scroller + */ +EOAPI void elm_obj_scroller_page_scroll_limit_get(const Eo *obj, int *page_limit_h, int *page_limit_v); + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_PAGE_CHANGED; + +/** Called when scroll page changed + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_SCROLL_PAGE_CHANGED (&(_ELM_SCROLLER_EVENT_SCROLL_PAGE_CHANGED)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_UNPRESS; + +/** Called when horizontal bar is no longer pressed + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_HBAR_UNPRESS (&(_ELM_SCROLLER_EVENT_HBAR_UNPRESS)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_PRESS; + +/** Called when horizontal bar is pressed + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_HBAR_PRESS (&(_ELM_SCROLLER_EVENT_HBAR_PRESS)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_HBAR_DRAG; + +/** Called when horizontal bar is dragged + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_HBAR_DRAG (&(_ELM_SCROLLER_EVENT_HBAR_DRAG)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_UNPRESS; + +/** Called when vertical bar is no longer pressed + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_VBAR_UNPRESS (&(_ELM_SCROLLER_EVENT_VBAR_UNPRESS)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_PRESS; + +/** Called when vertical bar is pressed + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_VBAR_PRESS (&(_ELM_SCROLLER_EVENT_VBAR_PRESS)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_VBAR_DRAG; + +/** Called when vertical bar is dragged + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_VBAR_DRAG (&(_ELM_SCROLLER_EVENT_VBAR_DRAG)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_LEFT; + +/** Called when scrolling to left + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_SCROLL_LEFT (&(_ELM_SCROLLER_EVENT_SCROLL_LEFT)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_RIGHT; + +/** Called when scrolling to right + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_SCROLL_RIGHT (&(_ELM_SCROLLER_EVENT_SCROLL_RIGHT)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_UP; + +/** Called scrolled upwards + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_SCROLL_UP (&(_ELM_SCROLLER_EVENT_SCROLL_UP)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_SCROLL_DOWN; + +/** Called when scrolled downwards + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_SCROLL_DOWN (&(_ELM_SCROLLER_EVENT_SCROLL_DOWN)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_LEFT; + +/** Called when hitting the left edge + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_EDGE_LEFT (&(_ELM_SCROLLER_EVENT_EDGE_LEFT)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_RIGHT; + +/** Called when hitting the right edge + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_EDGE_RIGHT (&(_ELM_SCROLLER_EVENT_EDGE_RIGHT)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_TOP; + +/** Called when hitting the top edge + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_EDGE_TOP (&(_ELM_SCROLLER_EVENT_EDGE_TOP)) + +EWAPI extern const Efl_Event_Description _ELM_SCROLLER_EVENT_EDGE_BOTTOM; + +/** Called when hitting the bottom edge + * + * @ingroup Elm_Scroller + */ +#define ELM_SCROLLER_EVENT_EDGE_BOTTOM (&(_ELM_SCROLLER_EVENT_EDGE_BOTTOM)) + +#endif diff --git a/src/lib/elementary/elm_scroller_eo.legacy.c b/src/lib/elementary/elm_scroller_eo.legacy.c new file mode 100644 index 0000000000..829d5de6ab --- /dev/null +++ b/src/lib/elementary/elm_scroller_eo.legacy.c @@ -0,0 +1,18 @@ + +EAPI void +elm_scroller_custom_widget_base_theme_set(Elm_Scroller *obj, const char *klass, const char *group) +{ + elm_obj_scroller_custom_widget_base_theme_set(obj, klass, group); +} + +EAPI void +elm_scroller_page_scroll_limit_set(const Elm_Scroller *obj, int page_limit_h, int page_limit_v) +{ + elm_obj_scroller_page_scroll_limit_set(obj, page_limit_h, page_limit_v); +} + +EAPI void +elm_scroller_page_scroll_limit_get(const Elm_Scroller *obj, int *page_limit_h, int *page_limit_v) +{ + elm_obj_scroller_page_scroll_limit_get(obj, page_limit_h, page_limit_v); +} diff --git a/src/lib/elementary/elm_scroller_eo.legacy.h b/src/lib/elementary/elm_scroller_eo.legacy.h new file mode 100644 index 0000000000..04dba3497a --- /dev/null +++ b/src/lib/elementary/elm_scroller_eo.legacy.h @@ -0,0 +1,56 @@ +#ifndef _ELM_SCROLLER_EO_LEGACY_H_ +#define _ELM_SCROLLER_EO_LEGACY_H_ + +#ifndef _ELM_SCROLLER_EO_CLASS_TYPE +#define _ELM_SCROLLER_EO_CLASS_TYPE + +typedef Eo Elm_Scroller; + +#endif + +#ifndef _ELM_SCROLLER_EO_TYPES +#define _ELM_SCROLLER_EO_TYPES + + +#endif + +/** + * @brief Set custom theme elements for the scroller + * + * @param[in] obj The object. + * @param[in] klass Klass name + * @param[in] group Group name + * + * @ingroup Elm_Scroller_Group + */ +EAPI void elm_scroller_custom_widget_base_theme_set(Elm_Scroller *obj, const char *klass, const char *group); + +/** + * @brief Set the maximum of the movable page at a flicking. + * + * The value of maximum movable page should be more than 1. + * + * @param[in] obj The object. + * @param[in] page_limit_h The maximum of the movable horizontal page + * @param[in] page_limit_v The maximum of the movable vertical page + * + * @since 1.8 + * + * @ingroup Elm_Scroller_Group + */ +EAPI void elm_scroller_page_scroll_limit_set(const Elm_Scroller *obj, int page_limit_h, int page_limit_v); + +/** + * @brief Get the maximum of the movable page at a flicking. + * + * @param[in] obj The object. + * @param[in] page_limit_h The maximum of the movable horizontal page + * @param[in] page_limit_v The maximum of the movable vertical page + * + * @since 1.8 + * + * @ingroup Elm_Scroller_Group + */ +EAPI void elm_scroller_page_scroll_limit_get(const Elm_Scroller *obj, int *page_limit_h, int *page_limit_v); + +#endif diff --git a/src/lib/elementary/elm_scroller_legacy.h b/src/lib/elementary/elm_scroller_legacy.h index 884967c1fb..6b40eff78f 100644 --- a/src/lib/elementary/elm_scroller_legacy.h +++ b/src/lib/elementary/elm_scroller_legacy.h @@ -1,5 +1,5 @@ #include "elm_interface_scrollable.eo.legacy.h" -#include "elm_scroller.eo.legacy.h" +#include "elm_scroller_eo.legacy.h" /** * Type that blocks the scroll movement in one or more direction. diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 09a9bd67e6..4471d9ee83 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_scroller.eo', 'elm_sys_notify_interface.eo', 'elm_sys_notify.eo', 'elm_sys_notify_dbus.eo', @@ -787,6 +786,8 @@ elementary_pub_headers = [ 'elm_prefs_eo.legacy.h', 'elm_route_eo.h', 'elm_route_eo.legacy.h', + 'elm_scroller_eo.h', + 'elm_scroller_eo.legacy.h', ] elementary_header_src = [