From a54fb3d36c34f7e71cc4aca6b6221ce8d329da00 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Mon, 1 Apr 2013 17:13:32 +0900 Subject: [PATCH] Add the repeat_events_set/get for blocking the events of content objects. This feature is useful to the access. --- ChangeLog | 5 +++++ NEWS | 1 + src/lib/elm_interface_scrollable.c | 27 +++++++++++++++++++++++++++ src/lib/elm_interface_scrollable.h | 24 ++++++++++++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12e8ec8..0ae43df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1194,3 +1194,8 @@ 2013-04-01 Jaehwan Kim * Scroller decides whether the accelerator is on or not, depending on the velocity and the interval time of the flick event. + +2013-04-01 Jaehwan Kim + + * Add the repeat_events_set/get for blocking the events of content objects. + This feature is useful to the access. diff --git a/NEWS b/NEWS index 0eec980..0dc497c 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,7 @@ Additions: * Add API - elm_object_focused_object_get. * Add APIs - elm_entry_input_panel_layout_variation_set/get * Add elm_map smart callback - "language,changed". + * Add the repeat_events_set/get for blocking the events of content objects. Improvements: diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index e64bd2b..f3dda51 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -3921,6 +3921,28 @@ _elm_scroll_single_direction_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) } static void +_elm_scroll_repeat_events_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +{ + Elm_Scrollable_Smart_Interface_Data *sid = _pd; + Eina_Bool repeat_events = va_arg(*list, int); + + if (sid->event_rect) + evas_object_repeat_events_set(sid->event_rect, repeat_events); +} + +static void +_elm_scroll_repeat_events_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +{ + Elm_Scrollable_Smart_Interface_Data *sid = _pd; + Eina_Bool *ret = va_arg(*list, Eina_Bool *); + + if (sid->event_rect) + *ret = evas_object_repeat_events_get(sid->event_rect); + else + *ret = EINA_TRUE; +} + +static void _elm_scroll_hold_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) { Elm_Scrollable_Smart_Interface_Data *sid = _pd; @@ -3928,6 +3950,7 @@ _elm_scroll_hold_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) sid->hold = hold; } + static void _elm_scroll_freeze_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) { @@ -4250,6 +4273,8 @@ _elm_scrollable_interface_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET), _elm_scroll_policy_get), EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET), _elm_scroll_single_direction_set), EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET), _elm_scroll_single_direction_get), + EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET), _elm_scroll_repeat_events_set), + EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET), _elm_scroll_repeat_events_get), EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_MIRRORED_SET), _elm_scroll_mirrored_set), EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_HOLD_SET), _elm_scroll_hold_set), EO_OP_FUNC(ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_FREEZE_SET), _elm_scroll_freeze_set), @@ -4316,6 +4341,8 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET, "description here"), EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET, "description here"), EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET, "description here"), + EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET, "description here"), + EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET, "description here"), EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_MIRRORED_SET, "description here"), EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_HOLD_SET, "description here"), EO_OP_DESCRIPTION(ELM_SCROLLABLE_INTERFACE_SUB_ID_FREEZE_SET, "description here"), diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h index 1a001e7..d0a2ab0 100644 --- a/src/lib/elm_interface_scrollable.h +++ b/src/lib/elm_interface_scrollable.h @@ -187,6 +187,8 @@ enum ELM_SCROLLABLE_INTERFACE_SUB_ID_POLICY_GET, ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_SET, ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET, + ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET, + ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET, ELM_SCROLLABLE_INTERFACE_SUB_ID_MIRRORED_SET, ELM_SCROLLABLE_INTERFACE_SUB_ID_HOLD_SET, ELM_SCROLLABLE_INTERFACE_SUB_ID_FREEZE_SET, @@ -651,6 +653,28 @@ enum #define elm_scrollable_interface_single_direction_get(single_dir) ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_SINGLE_DIRECTION_GET), EO_TYPECHECK(Eina_Bool *, single_dir) /** + * @def elm_scrollable_interface_repeat_events_set + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] repeat_events + * + */ +#define elm_scrollable_interface_repeat_events_set(repeat_events) ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_SET), EO_TYPECHECK(Eina_Bool, repeat_events) + +/** + * @def elm_scrollable_interface_repeat_events_get + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[out] repeat_events + * + */ +#define elm_scrollable_interface_repeat_events_get(repeat_events) ELM_SCROLLABLE_INTERFACE_ID(ELM_SCROLLABLE_INTERFACE_SUB_ID_REPEAT_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, repeat_events) + +/** * @def elm_scrollable_interface_mirrored_set * @since 1.8 * -- 2.7.4