From 4c81e0c5b98c7ee48efda104ecdeaf75da2d8e77 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 16 May 2017 17:23:00 +0900 Subject: [PATCH] evas: Remove Evas.Modifier from EO Similar to the previous patch with Evas.Lock Ref T5312 --- src/lib/evas/Evas_Legacy.h | 31 +++++++++++++++++++++++++++--- src/lib/evas/canvas/evas_canvas.eo | 18 ----------------- src/lib/evas/canvas/evas_key.c | 5 +++-- src/lib/evas/canvas/evas_types.eot | 2 -- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 8587624e83..86dd94ddac 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -101,6 +101,19 @@ EAPI Evas_Engine_Info *evas_engine_info_get(const Evas *obj); */ typedef struct _Evas_Lock Evas_Lock; +/** + * An opaque type containing information on which modifier keys are registered + * in an Evas canvas. + */ +typedef struct _Evas_Modifier Evas_Modifier; + +/** + * A bitmask of modifier keys. + * + * See evas_key_modifier_mask_get() for the keyname to bit conversion. + */ +typedef unsigned long long Evas_Modifier_Mask; + /** * @} */ @@ -871,11 +884,23 @@ EAPI void evas_event_refeed_event(Evas *obj, void *event_copy, Evas_ */ /** - * A bitmask of modifier keys. + * @brief Returns a handle to the list of modifier keys registered in the + * canvas @c e. * - * See evas_key_modifier_mask_get() for the keyname to bit conversion. + * This is required to check for which modifiers are set at a given time with + * the @ref evas_key_modifier_is_set function. + * + * See also @ref evas_key_modifier_add, @ref evas_key_modifier_del, + * @ref evas_key_modifier_on, @ref evas_key_modifier_off, + * @ref evas_seat_key_modifier_on, @ref evas_seat_key_modifier_off. + * + * @return An Evas_Modifier handle to query Evas' keys subsystem with @ref + * evas_key_modifier_is_set or @ref evas_seat_key_modifier_is_set, or @c null + * on error. + * + * @ingroup Evas_Canvas */ -typedef unsigned long long Evas_Modifier_Mask; +EAPI const Evas_Modifier *evas_key_modifier_get(const Evas *obj) EINA_WARN_UNUSED_RESULT; /** * @brief Creates a bit mask from the @c keyname modifier key. Values returned diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo index 7de84b64be..4b16116a42 100644 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo @@ -352,24 +352,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface, ]] } } - @property key_modifier { - get { - [[Returns a handle to the list of modifier keys registered in - the canvas $e. - - This is required to check for which modifiers are set at a - given time with the \@ref evas_key_modifier_is_set function. - - See also @.key_modifier_add, @.key_modifier_del, - @.key_modifier_on, @.key_modifier_off, @.seat_key_modifier_on, - @.seat_key_modifier_off. - ]] - return: ptr(const(Evas.Modifier)) @warn_unused; [[ - An Evas_Modifier handle to query Evas' keys subsystem - with \@ref evas_key_modifier_is_set or \@ref evas_seat_key_modifier_is_set, or $null on error. - ]] - } - } @property pointer_button_down_mask_by_device { [[Returns a bitmask with the mouse buttons currently pressed, set to 1.]] diff --git a/src/lib/evas/canvas/evas_key.c b/src/lib/evas/canvas/evas_key.c index 3cc25702cc..5a0856cd81 100644 --- a/src/lib/evas/canvas/evas_key.c +++ b/src/lib/evas/canvas/evas_key.c @@ -31,9 +31,10 @@ evas_key_lock_number(const Evas_Lock *l, const char *keyname) /* public calls */ -EOLIAN const Evas_Modifier* -_evas_canvas_key_modifier_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) +EAPI const Evas_Modifier* +evas_key_modifier_get(const Evas *eo_e) { + EVAS_LEGACY_API(eo_e, e, NULL); return &(e->modifiers); } diff --git a/src/lib/evas/canvas/evas_types.eot b/src/lib/evas/canvas/evas_types.eot index 8762c4327d..3e706cdfe9 100644 --- a/src/lib/evas/canvas/evas_types.eot +++ b/src/lib/evas/canvas/evas_types.eot @@ -1,5 +1,3 @@ -struct Evas.Modifier; [[An opaque type containing information on which modifier keys are registered in an Evas canvas]] - // ---------------------------------------------------------------------------- // All the below types are for Evas 3D