From dc05a18731c9bffbaf4d58e4f670e43b9924c8b2 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 19 Apr 2016 16:00:21 +0100 Subject: [PATCH] Elm interface scrollable: Fix eo type errors. --- .../elementary/elm_interface_scrollable.eo | 44 +++++++++++++++++++ src/lib/elementary/elm_interface_scrollable.h | 5 ++- src/lib/elementary/elm_scroller.eo | 36 --------------- src/lib/elementary/elm_scroller_legacy.h | 1 + 4 files changed, 48 insertions(+), 38 deletions(-) diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 8b7cb0735d..45b2870d37 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -1,3 +1,47 @@ +import elm_general; + +type Elm_Interface_Scrollable_Cb: __undefined_type; +type Elm_Interface_Scrollable_Resize_Cb: __undefined_type; +type Elm_Interface_Scrollable_Min_Limit_Cb: __undefined_type; + +/* FIXME: Rename the namespace of the types. */ +enum Elm.Scroller.Policy +{ + [[Type that controls when scrollbars should appear. + + See also @Elm.Interface_Scrollable.policy.set. + ]] + auto = 0, [[Show scrollbars as needed]] + on, [[Always show scrollbars]] + off, [[Never show scrollbars]] + last +} + +enum Elm.Scroller.Single_Direction +{ + [[Type that controls how the content is scrolled. + + See also @Elm.Interface_Scrollable.single_direction.set. + ]] + 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 +{ + [[Type that blocks the scroll movement in one or more direction. + + @since 1.8 + ]] + 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]] +} + + mixin Elm.Interface_Scrollable(Evas.Scrollable_Interface, Evas.Object_Smart) { legacy_prefix: null; diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h index d5a38c32d6..21e17ffa97 100644 --- a/src/lib/elementary/elm_interface_scrollable.h +++ b/src/lib/elementary/elm_interface_scrollable.h @@ -56,6 +56,9 @@ typedef void (*Elm_Interface_Scrollable_Resize_Cb)(Evas_Object *obj, Evas_C typedef struct _Elm_Scrollable_Smart_Interface_Data Elm_Scrollable_Smart_Interface_Data; + +#include "elm_interface_scrollable.eo.h" + struct _Elm_Scrollable_Smart_Interface_Data { Evas_Coord x, y, w, h; @@ -232,8 +235,6 @@ struct _Elm_Scrollable_Smart_Interface_Data return __VA_ARGS__; \ } -#include "elm_interface_scrollable.eo.h" - /** * @} */ diff --git a/src/lib/elementary/elm_scroller.eo b/src/lib/elementary/elm_scroller.eo index 8a0a53570f..3fdf2edf7e 100644 --- a/src/lib/elementary/elm_scroller.eo +++ b/src/lib/elementary/elm_scroller.eo @@ -1,39 +1,3 @@ -enum Elm.Scroller.Policy -{ - [[Type that controls when scrollbars should appear. - - See also @Elm.Interface_Scrollable.policy.set. - ]] - auto = 0, [[Show scrollbars as needed]] - on, [[Always show scrollbars]] - off, [[Never show scrollbars]] - last -} - -enum Elm.Scroller.Single_Direction -{ - [[Type that controls how the content is scrolled. - - See also @Elm.Interface_Scrollable.single_direction.set. - ]] - 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 -{ - [[Type that blocks the scroll movement in one or more direction. - - @since 1.8 - ]] - 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, Evas.Scrollable_Interface) diff --git a/src/lib/elementary/elm_scroller_legacy.h b/src/lib/elementary/elm_scroller_legacy.h index 36343fc920..28e5d785e6 100644 --- a/src/lib/elementary/elm_scroller_legacy.h +++ b/src/lib/elementary/elm_scroller_legacy.h @@ -1,3 +1,4 @@ +#include "elm_interface_scrollable.eo.legacy.h" #include "elm_scroller.eo.legacy.h" /** * @brief Add a new scroller to the parent