From 246e270c9fb1f3bd055562ce01b1a74e16d4c56d Mon Sep 17 00:00:00 2001 From: Yakov Goldberg Date: Wed, 13 May 2015 19:26:12 +0300 Subject: [PATCH] elm_scroller: Move enums to elm_scroller.eo Move enums from elm_scroller_common.h to elm_scroller.eo in order to make them more accessible for bindings. Delete elm_scroller_common.h. Moved the include for elm_scroller.eo.legacy.h to the top of elm_scroller_legacy.h to allow the use of the generated types in the function declarations. --- src/lib/Makefile.am | 1 - src/lib/elm_interface_scrollable.eo | 4 +-- src/lib/elm_scroller.eo | 44 +++++++++++++++++++++++++++++++++ src/lib/elm_scroller.h | 1 - src/lib/elm_scroller_common.h | 49 ------------------------------------- src/lib/elm_scroller_legacy.h | 3 +-- 6 files changed, 47 insertions(+), 55 deletions(-) delete mode 100644 src/lib/elm_scroller_common.h diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index a488e76..473570d 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -337,7 +337,6 @@ elm_route_legacy.h \ elm_scale.h \ elm_scroll.h \ elm_scroller.h \ -elm_scroller_common.h \ elm_scroller_eo.h \ elm_scroller_legacy.h \ elm_segment_control.h \ diff --git a/src/lib/elm_interface_scrollable.eo b/src/lib/elm_interface_scrollable.eo index b52c322..75fd51c 100644 --- a/src/lib/elm_interface_scrollable.eo +++ b/src/lib/elm_interface_scrollable.eo @@ -139,8 +139,8 @@ mixin Elm_Interface_Scrollable(Evas.Scrollable_Interface, Evas.Object_Smart) get { } values { - Elm_Scroller_Policy hbar; /*@ Horizontal scrollbar policy */ - Elm_Scroller_Policy vbar; /*@ Vertical scrollbar policy */ + Elm.Scroller.Policy hbar; /*@ Horizontal scrollbar policy */ + Elm.Scroller.Policy vbar; /*@ Vertical scrollbar policy */ } } @property content_region { diff --git a/src/lib/elm_scroller.eo b/src/lib/elm_scroller.eo index da339ff..b128ce8 100644 --- a/src/lib/elm_scroller.eo +++ b/src/lib/elm_scroller.eo @@ -1,3 +1,47 @@ +enum Elm.Scroller.Policy +{ + /*@ + @brief Type that controls when scrollbars should appear. + @see elm_scroller_policy_set() + + @ingroup Scroller + */ + auto = 0, /*@< Show scrollbars as needed */ + on, /*@< Always show scrollbars */ + off, /*@< Never show scrollbars */ + last +} + +enum Elm.Scroller.Single_Direction +{ + /*@ + @brief Type that controls how the content is scrolled. + + @see elm_scroller_single_direction_set() + @ingroup Scroller + */ + none = 0, /*@< Scroll every direction */ + soft, /*@< Scroll single direction if the direction is certain*/ + hard, /*@< Scroll only single direction */ + last +} + +enum Elm.Scroller.Movement_Block +{ + /*@ + @brief Type that blocks the scroll movement in one or more direction. + + @see elm_scroller_movement_block() + + @since 1.8 + @ingroup Scroller + */ + legacy: elm_scroller_movement; + no_block = 1 << 0, /*@< Do not block movements */ + block_vertical = 1 << 1, /*@< Block vertical movements */ + block_horizontal = 1 << 2 /*@< Block horizontal movements */ +} + class Elm.Scroller (Elm.Layout, Elm_Interface_Scrollable, Elm_Interface_Atspi_Widget_Action) { diff --git a/src/lib/elm_scroller.h b/src/lib/elm_scroller.h index 0c36c74..0ab2445 100644 --- a/src/lib/elm_scroller.h +++ b/src/lib/elm_scroller.h @@ -64,7 +64,6 @@ * @{ */ -#include #ifdef EFL_EO_API_SUPPORT #include #endif diff --git a/src/lib/elm_scroller_common.h b/src/lib/elm_scroller_common.h deleted file mode 100644 index 0df0bf7..0000000 --- a/src/lib/elm_scroller_common.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @addtogroup Scroller - * - * @{ - */ - -/** - * @brief Type that controls when scrollbars should appear. - * - * @see elm_scroller_policy_set() - */ -typedef enum -{ - ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */ - ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */ - ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */ - ELM_SCROLLER_POLICY_LAST -} Elm_Scroller_Policy; - -/** - * @brief Type that controls how the content is scrolled. - * - * @see elm_scroller_single_direction_set() - */ -typedef enum -{ - ELM_SCROLLER_SINGLE_DIRECTION_NONE = 0, /**< Scroll every direction */ - ELM_SCROLLER_SINGLE_DIRECTION_SOFT, /**< Scroll single direction if the direction is certain*/ - ELM_SCROLLER_SINGLE_DIRECTION_HARD, /**< Scroll only single direction */ - ELM_SCROLLER_SINGLE_DIRECTION_LAST -} Elm_Scroller_Single_Direction; - -/** - * @brief Type that blocks the scroll movement in one or more direction. - * - * @see elm_scroller_movement_block() - * - * @since 1.8 - */ -typedef enum -{ - ELM_SCROLLER_MOVEMENT_NO_BLOCK = 1 << 0, /**< Do not block movements */ - ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL = 1 << 1, /**< Block vertical movements */ - ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL = 1 << 2 /**< Block horizontal movements */ -} Elm_Scroller_Movement_Block; - -/** - * @} - */ diff --git a/src/lib/elm_scroller_legacy.h b/src/lib/elm_scroller_legacy.h index 8d49b74..bf4d361 100644 --- a/src/lib/elm_scroller_legacy.h +++ b/src/lib/elm_scroller_legacy.h @@ -1,3 +1,4 @@ +#include "elm_scroller.eo.legacy.h" /** * @brief Add a new scroller to the parent * @@ -524,5 +525,3 @@ EAPI void elm_scroller_loop_set(Evas_Object *obj, Eina_ * @ingroup Scroller */ EAPI void elm_scroller_loop_get(const Evas_Object *obj, Eina_Bool *loop_h, Eina_Bool *loop_v); - -#include "elm_scroller.eo.legacy.h" -- 2.7.4