From f490c4e5aa161fc8dd092483b3ab5ebf78504f73 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Fri, 3 May 2013 16:38:59 -0300 Subject: [PATCH] evas/events: Add evas_event_input_multi_move(). Same as evas_event_input_mouse_move, but for multi_move. --- ChangeLog | 1 + src/lib/evas/Evas_Eo.h | 24 ++++++++ src/lib/evas/Evas_Legacy.h | 1 + src/lib/evas/canvas/evas_events.c | 114 ++++++++++++++++++++++++++---------- src/lib/evas/canvas/evas_main.c | 2 + src/lib/evas/include/evas_private.h | 1 + 6 files changed, 113 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 515d66d..df5c5e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2013-04-03 Rafael Antognolli * Evas: Added evas_event_input_mouse_move() for internal use only. + * Evas: Added evas_event_input_multi_move() for internal use only. 2013-04-29 ChunEon Park (Hermet) diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index e2a6965..4750d78 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -191,6 +191,7 @@ enum EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT, EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN, EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP, + EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE, EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE, EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN, EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP, @@ -996,6 +997,29 @@ enum #define evas_canvas_event_feed_multi_up(d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP), EO_TYPECHECK(int, d), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(double, rad), EO_TYPECHECK(double, radx), EO_TYPECHECK(double, rady), EO_TYPECHECK(double, pres), EO_TYPECHECK(double, ang), EO_TYPECHECK(double, fx), EO_TYPECHECK(double, fy), EO_TYPECHECK(Evas_Button_Flags, flags), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) /** + * @def evas_canvas_event_input_multi_move + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] d + * @param[in] x + * @param[in] y + * @param[in] rad + * @param[in] radx + * @param[in] rady + * @param[in] pres + * @param[in] ang + * @param[in] fx + * @param[in] fy + * @param[in] timestamp + * @param[in] data + * + * @see evas_event_feed_multi_move + */ +#define evas_canvas_event_input_multi_move(d, x, y, rad, radx, rady, pres, ang, fx, fy, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE), EO_TYPECHECK(int, d), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(double, rad), EO_TYPECHECK(double, radx), EO_TYPECHECK(double, rady), EO_TYPECHECK(double, pres), EO_TYPECHECK(double, ang), EO_TYPECHECK(double, fx), EO_TYPECHECK(double, fy), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) + +/** * @def evas_canvas_event_feed_multi_move * @since 1.8 * diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 8e59c9c..3451acb 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -1170,6 +1170,7 @@ EAPI void evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void * EAPI void evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); EAPI void evas_event_feed_multi_down(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); EAPI void evas_event_feed_multi_up(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); +EAPI void evas_event_input_multi_move(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data); EAPI void evas_event_feed_multi_move(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data); /** diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 4c6ca84..10ee07a 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -2373,37 +2373,14 @@ _canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list) _evas_unwalk(e); } -EAPI void -evas_event_feed_multi_move(Evas *eo_e, - int d, int x, int y, - double rad, double radx, double rady, - double pres, double ang, - double fx, double fy, - unsigned int timestamp, const void *data) -{ - MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eo_do(eo_e, evas_canvas_event_feed_multi_move(d, x, y, rad, radx, rady, pres, ang, fx, fy, timestamp, data)); -} - -void -_canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) +static void +_canvas_event_feed_multi_move_internal(Eo *eo_e, void *_pd, int d, int x, + int y, double rad, double radx, + double rady, double pres, double ang, + double fx, double fy, + unsigned int timestamp, + const void *data) { - int d = va_arg(*list, int); - int x = va_arg(*list, int); - int y = va_arg(*list, int); - double rad = va_arg(*list, double); - double radx = va_arg(*list, double); - double rady = va_arg(*list, double); - double pres = va_arg(*list, double); - double ang = va_arg(*list, double); - double fx = va_arg(*list, double); - double fy = va_arg(*list, double); - unsigned int timestamp = va_arg(*list, unsigned int); - const void *data = va_arg(*list, const void *); - Evas_Public_Data *e = _pd; if (e->is_frozen) return; @@ -2569,6 +2546,83 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) } EAPI void +evas_event_input_multi_move(Evas *eo_e, + int d, int x, int y, + double rad, double radx, double rady, + double pres, double ang, + double fx, double fy, + unsigned int timestamp, const void *data) +{ + MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + eo_do(eo_e, evas_canvas_event_input_multi_move(d, x, y, rad, radx, rady, + pres, ang, fx, fy, timestamp, + data)); +} + +void +_canvas_event_input_multi_move(Eo *eo_e, void *_pd, va_list *list) +{ + int d = va_arg(*list, int); + int x = va_arg(*list, int); + int y = va_arg(*list, int); + double rad = va_arg(*list, double); + double radx = va_arg(*list, double); + double rady = va_arg(*list, double); + double pres = va_arg(*list, double); + double ang = va_arg(*list, double); + double fx = va_arg(*list, double); + double fy = va_arg(*list, double); + unsigned int timestamp = va_arg(*list, unsigned int); + const void *data = va_arg(*list, const void *); + Evas_Public_Data *e = _pd; + + _canvas_event_feed_multi_move_internal(eo_e, _pd, d, + x - e->framespace.x, y - e->framespace.y, + rad, radx, rady, + pres, ang, fx, fy, timestamp, data); +} + +EAPI void +evas_event_feed_multi_move(Evas *eo_e, + int d, int x, int y, + double rad, double radx, double rady, + double pres, double ang, + double fx, double fy, + unsigned int timestamp, const void *data) +{ + MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + eo_do(eo_e, evas_canvas_event_feed_multi_move(d, x, y, rad, radx, rady, + pres, ang, fx, fy, timestamp, + data)); +} + +void +_canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) +{ + int d = va_arg(*list, int); + int x = va_arg(*list, int); + int y = va_arg(*list, int); + double rad = va_arg(*list, double); + double radx = va_arg(*list, double); + double rady = va_arg(*list, double); + double pres = va_arg(*list, double); + double ang = va_arg(*list, double); + double fx = va_arg(*list, double); + double fy = va_arg(*list, double); + unsigned int timestamp = va_arg(*list, unsigned int); + const void *data = va_arg(*list, const void *); + + _canvas_event_feed_multi_move_internal(eo_e, _pd, d, x, y, rad, radx, rady, + pres, ang, fx, fy, timestamp, data); +} + +EAPI void evas_event_feed_key_down(Evas *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 4d7ab7a..ce630e3 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -1044,6 +1044,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT), _canvas_event_feed_mouse_out), EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN), _canvas_event_feed_multi_down), EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP), _canvas_event_feed_multi_up), + EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE), _canvas_event_input_multi_move), EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE), _canvas_event_feed_multi_move), EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN), _canvas_event_feed_key_down), EO_OP_FUNC(EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP), _canvas_event_feed_key_up), @@ -1145,6 +1146,7 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT, "Mouse out event feed."), EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN, "Multi down event feed."), EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP, "Multi up event feed."), + EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_INPUT_MULTI_MOVE, "Multi move event input."), EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE, "Multi move event feed."), EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN, "Key down event feed"), EO_OP_DESCRIPTION(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP, "Key up event feed"), diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index b1f6d56..5db60ac 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1137,6 +1137,7 @@ void _canvas_event_feed_mouse_in(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_mouse_out(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_multi_down(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_multi_up(Eo *e, void *_pd, va_list *list); +void _canvas_event_input_multi_move(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_multi_move(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_key_down(Eo *e, void *_pd, va_list *list); void _canvas_event_feed_key_up(Eo *e, void *_pd, va_list *list); -- 2.7.4