$(NULL)
evas_gesture_eolian_pub_files = \
- lib/evas/gesture/efl_gesture_touch.eo \
- lib/evas/gesture/efl_gesture.eo \
- lib/evas/gesture/efl_gesture_tap.eo \
- lib/evas/gesture/efl_gesture_long_tap.eo \
- lib/evas/gesture/efl_gesture_recognizer.eo \
- lib/evas/gesture/efl_gesture_manager.eo \
+ lib/evas/gesture/efl_canvas_gesture_touch.eo \
+ lib/evas/gesture/efl_canvas_gesture.eo \
+ lib/evas/gesture/efl_canvas_gesture_tap.eo \
+ lib/evas/gesture/efl_canvas_gesture_long_tap.eo \
+ lib/evas/gesture/efl_canvas_gesture_recognizer.eo \
+ lib/evas/gesture/efl_canvas_gesture_manager.eo \
$(NULL)
evas_eolian_legacy_files = \
lib/evas/include/evas_ector_buffer.eo
evas_gesture_eolian_priv_files = \
- lib/evas/gesture/efl_gesture_recognizer_tap.eo \
- lib/evas/gesture/efl_gesture_recognizer_long_tap.eo
+ lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo \
+ lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo
evas_canvas_eolian_type_files = \
lib/evas/canvas/evas_canvas3d_types.eot \
lib/evas/canvas/efl_canvas_animation_types.eot
evas_gesture_eolian_type_files = \
- lib/evas/gesture/efl_gesture_types.eot
+ lib/evas/gesture/efl_canvas_gesture_types.eot
evas_canvas_eolian_priv_c = $(evas_canvas_eolian_priv_files:%.eo=%.eo.c)
evas_canvas_eolian_priv_h = $(evas_canvas_eolian_priv_files:%.eo=%.eo.h) \
lib/evas/canvas/efl_canvas_animation_group_sequential_private.h \
lib/evas/canvas/efl_canvas_animation_player_private.h \
lib/evas/canvas/evas_stack.x \
-lib/evas/gesture/efl_gesture_private.h
+lib/evas/gesture/efl_canvas_gesture_private.h
# Linebreak
lib/evas/canvas/efl_canvas_animation_group_parallel.c \
lib/evas/canvas/efl_canvas_animation_group_sequential.c \
lib/evas/canvas/efl_canvas_animation_player.c \
-lib/evas/gesture/efl_gesture_touch.c \
-lib/evas/gesture/efl_gesture.c \
-lib/evas/gesture/efl_gesture_tap.c \
-lib/evas/gesture/efl_gesture_long_tap.c \
-lib/evas/gesture/efl_gesture_recognizer.c \
-lib/evas/gesture/efl_gesture_recognizer_tap.c \
-lib/evas/gesture/efl_gesture_recognizer_long_tap.c \
-lib/evas/gesture/efl_gesture_manager.c \
+lib/evas/gesture/efl_canvas_gesture_touch.c \
+lib/evas/gesture/efl_canvas_gesture.c \
+lib/evas/gesture/efl_canvas_gesture_tap.c \
+lib/evas/gesture/efl_canvas_gesture_long_tap.c \
+lib/evas/gesture/efl_canvas_gesture_recognizer.c \
+lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c \
+lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c \
+lib/evas/gesture/efl_canvas_gesture_manager.c \
$(NULL)
EXTRA_DIST2 += \
/* START - Callbacks for gestures */
static void
-finger_tap_start(void *data , Efl_Gesture *tap)
+finger_tap_start(void *data , Efl_Canvas_Gesture *tap)
{
Eina_Vector2 pos = efl_gesture_hotspot_get(tap);
}
static void
-finger_tap_update(void *data , Efl_Gesture *tap EINA_UNUSED)
+finger_tap_update(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
{
_color_and_icon_set(data, TAP_NAME, 1, MAX_TAP, UPDATE_COLOR);
}
static void
-finger_tap_end(void *data , Efl_Gesture *tap)
+finger_tap_end(void *data , Efl_Canvas_Gesture *tap)
{
Eina_Vector2 pos = efl_gesture_hotspot_get(tap);
}
static void
-finger_tap_abort(void *data , Efl_Gesture *tap EINA_UNUSED)
+finger_tap_abort(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
{
_color_and_icon_set(data, TAP_NAME, 1, MAX_TAP, ABORT_COLOR);
printf("Tap Aborted\n");
}
static void
-finger_long_tap_start(void *data , Efl_Gesture *tap)
+finger_long_tap_start(void *data , Efl_Canvas_Gesture *tap)
{
Eina_Vector2 pos = efl_gesture_hotspot_get(tap);
}
static void
-finger_long_tap_update(void *data , Efl_Gesture *tap EINA_UNUSED)
+finger_long_tap_update(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
{
_color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, UPDATE_COLOR);
printf("Long Tap Gesture updated\n");
}
static void
-finger_long_tap_end(void *data , Efl_Gesture *tap)
+finger_long_tap_end(void *data , Efl_Canvas_Gesture *tap)
{
Eina_Vector2 pos = efl_gesture_hotspot_get(tap);
}
static void
-finger_long_tap_abort(void *data , Efl_Gesture *tap EINA_UNUSED)
+finger_long_tap_abort(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
{
_color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, ABORT_COLOR);
printf("Long Tap Aborted\n");
static void
tap_gesture_cb(void *data , const Efl_Event *ev)
{
- Efl_Gesture *g = ev->info;
+ Efl_Canvas_Gesture *g = ev->info;
switch(efl_gesture_state_get(g))
{
case EFL_GESTURE_STARTED:
static void
long_tap_gesture_cb(void *data , const Efl_Event *ev)
{
- Efl_Gesture *g = ev->info;
+ Efl_Canvas_Gesture *g = ev->info;
switch(efl_gesture_state_get(g))
{
case EFL_GESTURE_STARTED:
#endif /* EFL_EO_API_SUPPORT */
#ifdef EFL_EO_API_SUPPORT
-# include "gesture/efl_gesture_types.eot.h"
-# include "gesture/efl_gesture_touch.eo.h"
-# include "gesture/efl_gesture.eo.h"
-# include "gesture/efl_gesture_tap.eo.h"
-# include "gesture/efl_gesture_long_tap.eo.h"
-# include "gesture/efl_gesture_recognizer.eo.h"
-# include "gesture/efl_gesture_manager.eo.h"
+# include "gesture/efl_canvas_gesture_types.eot.h"
+# include "gesture/efl_canvas_gesture_touch.eo.h"
+# include "gesture/efl_canvas_gesture.eo.h"
+# include "gesture/efl_canvas_gesture_tap.eo.h"
+# include "gesture/efl_canvas_gesture_long_tap.eo.h"
+# include "gesture/efl_canvas_gesture_recognizer.eo.h"
+# include "gesture/efl_canvas_gesture_manager.eo.h"
#endif /* EFL_EO_API_SUPPORT */
type == EVAS_CALLBACK_MULTI_DOWN ||
type == EVAS_CALLBACK_MOUSE_UP ||
type == EVAS_CALLBACK_MULTI_UP)
- _efl_gesture_manager_filter_event(e->gesture_manager, eo_obj, event_info);
+ _efl_canvas_gesture_manager_filter_event(e->gesture_manager, eo_obj, event_info);
if (!_evas_object_callback_has_by_type(obj, type))
goto nothing_here;
for (i = 0; array[i].desc != NULL; i++)
{
if (obj->layer->evas->gesture_manager)
- _efl_gesture_manager_callback_add_hook(obj->layer->evas->gesture_manager, obj->object, array[i].desc);
+ _efl_canvas_gesture_manager_callback_add_hook(obj->layer->evas->gesture_manager, obj->object, array[i].desc);
if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
{
for (i = 0; array[i].desc != NULL; i++)
{
if (obj->layer->evas->gesture_manager)
- _efl_gesture_manager_callback_del_hook(obj->layer->evas->gesture_manager, obj->object, array[i].desc);
+ _efl_canvas_gesture_manager_callback_del_hook(obj->layer->evas->gesture_manager, obj->object, array[i].desc);
if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
{
eina_clist_init(&e->calc_list);
eina_clist_init(&e->calc_done);
- e->gesture_manager = efl_add(EFL_GESTURE_MANAGER_CLASS, eo_obj);
+ e->gesture_manager = efl_add(EFL_CANVAS_GESTURE_MANAGER_CLASS, eo_obj);
#define EVAS_ARRAY_SET(E, Array) \
eina_array_step_set(&E->Array, sizeof (E->Array), \
return (Eo *)eo_e;
else if (klass == EFL_LOOP_CLASS)
return efl_main_loop_get();
- else if (klass == EFL_GESTURE_MANAGER_CLASS)
+ else if (klass == EFL_CANVAS_GESTURE_MANAGER_CLASS)
return e->gesture_manager;
return efl_provider_find(efl_super(eo_e, MY_CLASS), klass);
}
--- /dev/null
+#include "efl_canvas_gesture_private.h"
+
+#define MY_CLASS EFL_CANVAS_GESTURE_CLASS
+
+EOLIAN static const Efl_Event_Description *
+ _efl_canvas_gesture_type_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
+{
+ return pd->type;
+}
+
+EOLIAN static Efl_Canvas_Gesture_State
+_efl_canvas_gesture_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
+{
+ return pd->state;
+}
+
+EOLIAN static void
+_efl_canvas_gesture_state_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd, Efl_Canvas_Gesture_State state)
+{
+ pd->state = state;
+}
+
+EOLIAN static void
+_efl_canvas_gesture_hotspot_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd, Eina_Vector2 hotspot)
+{
+ pd->hotspot = hotspot;
+}
+
+
+EOLIAN static Eina_Vector2
+_efl_canvas_gesture_hotspot_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd)
+{
+ return pd->hotspot;
+}
+
+#include "efl_canvas_gesture.eo.c"
\ No newline at end of file
-import efl_gesture_types;
+import efl_canvas_gesture_types;
-abstract Efl.Gesture(Efl.Object)
+abstract Efl.Canvas.Gesture(Efl.Object)
{
[[EFL Gesture abstract class]]
+ eo_prefix: efl_gesture;
methods {
@property type {
[[This property holds the type of the gesture.]]
set {
}
values {
- state: Efl.Gesture.State; [[gesture state]]
+ state: Efl.Canvas.Gesture.State; [[gesture state]]
}
}
@property hotspot {
--- /dev/null
+#include "efl_canvas_gesture_private.h"
+
+#define MY_CLASS EFL_CANVAS_GESTURE_LONG_TAP_CLASS
+
+
+EOLIAN static Efl_Object *
+_efl_canvas_gesture_long_tap_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Long_Tap_Data *pd EINA_UNUSED)
+{
+ Efl_Canvas_Gesture_Data *gd;
+
+ obj = efl_constructor(efl_super(obj, MY_CLASS));
+ gd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS);
+ gd->type = EFL_EVENT_GESTURE_LONG_TAP;
+
+ return obj;
+}
+
+EOLIAN static void
+_efl_canvas_gesture_long_tap_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Long_Tap_Data *pd)
+{
+ if (pd->timeout)
+ ecore_timer_del(pd->timeout);
+
+ efl_destructor(efl_super(obj, MY_CLASS));
+}
+
+#include "efl_canvas_gesture_long_tap.eo.c"
-import efl_gesture_types;
+import efl_canvas_gesture_types;
-class Efl.Gesture.Long_Tap (Efl.Gesture)
+class Efl.Canvas.Gesture.Long_Tap (Efl.Canvas.Gesture)
{
[[EFL Gesture Long Tap class]]
+ eo_prefix: efl_gesture_long_tap;
event_prefix: efl;
events {
gesture,long_tap; [[Event for tap gesture]]
-#include "efl_gesture_private.h"
+#include "efl_canvas_gesture_private.h"
-#define MY_CLASS EFL_GESTURE_MANAGER_CLASS
+#define MY_CLASS EFL_CANVAS_GESTURE_MANAGER_CLASS
typedef struct _Object_Gesture
{
Eo *object;
const Efl_Event_Description *type;
- Efl_Gesture *gesture;
- Efl_Gesture_Recognizer *recognizer;
+ Efl_Canvas_Gesture *gesture;
+ Efl_Canvas_Gesture_Recognizer *recognizer;
}Object_Gesture;
-typedef struct _Efl_Gesture_Manager_Data
+typedef struct _Efl_Canvas_Gesture_Manager_Data
{
// keeps track of all the gesture request for a particular target
Eina_Hash *m_gesture_contex; // (*target, *event_desc)
Eina_List *m_gestures_to_delete;
Eina_Hash *m_config;
-} Efl_Gesture_Manager_Data;
+} Efl_Canvas_Gesture_Manager_Data;
-static void _cleanup_cached_gestures(Efl_Gesture_Manager_Data *pd,
+static void _cleanup_cached_gestures(Efl_Canvas_Gesture_Manager_Data *pd,
Eo *target, const Efl_Event_Description *type);
-static Efl_Gesture*
-_get_state(Efl_Gesture_Manager_Data *pd, Eo *target,
- Efl_Gesture_Recognizer *recognizer, const Efl_Event_Description *type);
+static Efl_Canvas_Gesture*
+_get_state(Efl_Canvas_Gesture_Manager_Data *pd, Eo *target,
+ Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type);
static void
_cleanup_object(Eina_List *list)
}
EOLIAN static Efl_Object *
-_efl_gesture_manager_efl_object_constructor(Eo *obj, Efl_Gesture_Manager_Data *pd EINA_UNUSED)
+_efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd EINA_UNUSED)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
pd->m_config = eina_hash_string_superfast_new(EINA_FREE_CB(eina_value_free));
- efl_gesture_manager_recognizer_register(obj, efl_add(EFL_GESTURE_RECOGNIZER_TAP_CLASS, obj));
- efl_gesture_manager_recognizer_register(obj, efl_add(EFL_GESTURE_RECOGNIZER_LONG_TAP_CLASS, obj));
+ efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_TAP_CLASS, obj));
+ efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_LONG_TAP_CLASS, obj));
return obj;
}
EOLIAN static Eina_Value *
-_efl_gesture_manager_config_get(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, const char *name)
+_efl_canvas_gesture_manager_config_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const char *name)
{
return eina_hash_find(pd->m_config, name);
}
EOLIAN static void
-_efl_gesture_manager_config_set(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd, const char *name, Eina_Value *value)
+_efl_canvas_gesture_manager_config_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd, const char *name, Eina_Value *value)
{
Eina_Value *v = eina_value_new(eina_value_type_get(value));
eina_value_copy(value, v);
}
EOLIAN static void
-_efl_gesture_manager_efl_object_destructor(Eo *obj, Efl_Gesture_Manager_Data *pd EINA_UNUSED)
+_efl_canvas_gesture_manager_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Manager_Data *pd EINA_UNUSED)
{
eina_hash_free(pd->m_config);
eina_hash_free(pd->m_recognizers);
}
void
-_efl_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
+_efl_canvas_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
{
- Efl_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
// if there is a recognizer registered for that event then add it to the gesture context
- Efl_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
+ Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
if (recognizer)
{
// add it to the gesture context.
}
void
-_efl_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
+_efl_canvas_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Description *type)
{
- Efl_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS);
// if there is a recognizer registered for that event then add it to the gesture context
- Efl_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
+ Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
if (recognizer)
{
eina_hash_list_remove(pd->m_gesture_contex, &target, type);
}
void
-_efl_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
+_efl_canvas_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
{
Eina_List *l, *gesture_context;
- Efl_Gesture_Manager_Data *pd;
+ Efl_Canvas_Gesture_Manager_Data *pd;
const Efl_Event_Description *gesture_type;
- Efl_Gesture_Recognizer *recognizer;
- Efl_Gesture *gesture;
- Efl_Gesture_Recognizer_Result recog_result;
- Efl_Gesture_Recognizer_Result recog_state;
- Efl_Gesture_Touch *touch_event;
+ Efl_Canvas_Gesture_Recognizer *recognizer;
+ Efl_Canvas_Gesture *gesture;
+ Efl_Canvas_Gesture_Recognizer_Result recog_result;
+ Efl_Canvas_Gesture_Recognizer_Result recog_state;
+ Efl_Canvas_Gesture_Touch *touch_event;
Efl_Input_Pointer_Data *pointer_data = efl_data_scope_get(event, EFL_INPUT_POINTER_CLASS);
pd = efl_data_scope_get(obj, MY_CLASS);
touch_event = eina_hash_find(pd->m_object_events, &target);
if (!touch_event)
{
- touch_event = efl_add(EFL_GESTURE_TOUCH_CLASS, NULL);
+ touch_event = efl_add(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL);
eina_hash_add(pd->m_object_events, &target, touch_event);
}
}
EOLIAN static const Efl_Event_Description *
-_efl_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd,
- Efl_Gesture_Recognizer *recognizer)
+_efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
+ Efl_Canvas_Gesture_Recognizer *recognizer)
{
- Efl_Gesture_Recognizer_Data *rpd;
- Efl_Gesture *dummy = efl_gesture_recognizer_create(recognizer, 0);
+ Efl_Canvas_Gesture_Recognizer_Data *rpd;
+ Efl_Canvas_Gesture *dummy = efl_gesture_recognizer_create(recognizer, 0);
if (!dummy)
return NULL;
// Add the recognizer to the m_recognizers
eina_hash_add(pd->m_recognizers, &type, recognizer);
// update the manager
- rpd = efl_data_scope_get(recognizer, EFL_GESTURE_RECOGNIZER_CLASS);
+ rpd = efl_data_scope_get(recognizer, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
rpd->manager = obj;
efl_del(dummy);
}
EOLIAN static void
-_efl_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd,
- Efl_Gesture_Recognizer *recognizer)
+_efl_canvas_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
+ Efl_Canvas_Gesture_Recognizer *recognizer)
{
Eina_List *l, *l_next;
Object_Gesture *object_gesture;
const Efl_Event_Description *type;
- Efl_Gesture *dummy;
+ Efl_Canvas_Gesture *dummy;
if (!recognizer) return;
}
// EOLIAN static void
-// _efl_gesture_manager_ungrab_all(Eo *obj EINA_UNUSED, Efl_Gesture_Manager_Data *pd,
+// _efl_canvas_gesture_manager_ungrab_all(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Manager_Data *pd,
// Eo *target)
// {
// const Efl_Event_Description *type;
// }
// get or create a gesture object that will represent the state for a given object, used by the recognizer
-Efl_Gesture*
-_get_state(Efl_Gesture_Manager_Data *pd,
- Eo *target, Efl_Gesture_Recognizer *recognizer, const Efl_Event_Description *type)
+Efl_Canvas_Gesture*
+_get_state(Efl_Canvas_Gesture_Manager_Data *pd,
+ Eo *target, Efl_Canvas_Gesture_Recognizer *recognizer, const Efl_Event_Description *type)
{
Eina_List *l;
Object_Gesture *object_gesture;
- Efl_Gesture *gesture;
+ Efl_Canvas_Gesture *gesture;
// if the widget is being deleted we should be careful not to
// create a new state.
}
static void
-_cleanup_cached_gestures(Efl_Gesture_Manager_Data *pd,
+_cleanup_cached_gestures(Efl_Canvas_Gesture_Manager_Data *pd,
Eo *target, const Efl_Event_Description *type)
{
Eina_List *l, *l_next;
}
-#include "efl_gesture_manager.eo.c"
+#include "efl_canvas_gesture_manager.eo.c"
-import efl_gesture_types;
+import efl_canvas_gesture_types;
-class Efl.Gesture.Manager (Efl.Object)
+class Efl.Canvas.Gesture.Manager (Efl.Object)
{
[[EFL Gesture Manager class]]
+ eo_prefix: efl_gesture_manager;
methods {
recognizer_register {
- [[This function is called to register a new Efl.Gesture.Recognizer]]
+ [[This function is called to register a new Efl.Canvas.Gesture.Recognizer]]
params {
- @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]]
+ @in recognizer: Efl.Canvas.Gesture.Recognizer; [[The gesture recognizer object]]
}
return: ptr(const(Efl.Event.Description)); [[Returns the Efl.Event.Description type the recognizer supports]]
}
recognizer_unregister {
- [[This function is called to unregister a Efl.Gesture.Recognizer]]
+ [[This function is called to unregister a Efl.Canvas.Gesture.Recognizer]]
params {
- @in recognizer: Efl.Gesture.Recognizer; [[The gesture recognizer object]]
+ @in recognizer: Efl.Canvas.Gesture.Recognizer; [[The gesture recognizer object]]
}
}
@property config {
--- /dev/null
+#ifndef EFL_GESTURE_PRIVATE_H_
+#define EFL_GESTURE_PRIVATE_H_
+
+#include "evas_common_private.h"
+#include "evas_private.h"
+#define EFL_INTERNAL_UNSTABLE
+#include "interfaces/efl_common_internal.h"
+
+#include <Ecore.h>
+
+//private gesture classes
+#include "efl_canvas_gesture_recognizer_tap.eo.h"
+#include "efl_canvas_gesture_recognizer_long_tap.eo.h"
+
+typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
+typedef struct _Efl_Canvas_Gesture_Data Efl_Canvas_Gesture_Data;
+typedef struct _Efl_Canvas_Gesture_Tap_Data Efl_Canvas_Gesture_Tap_Data;
+typedef struct _Efl_Canvas_Gesture_Long_Tap_Data Efl_Canvas_Gesture_Long_Tap_Data;
+
+struct _Efl_Canvas_Gesture_Recognizer_Data
+{
+ Eo *manager; // keeps a reference of the manager
+};
+
+struct _Efl_Canvas_Gesture_Data
+{
+ const Efl_Event_Description *type;
+ Efl_Canvas_Gesture_State state;
+ Eina_Vector2 hotspot;
+};
+
+struct _Efl_Canvas_Gesture_Tap_Data
+{
+};
+
+struct _Efl_Canvas_Gesture_Long_Tap_Data
+{
+ Ecore_Timer *timeout;
+ Eina_Bool is_timeout;
+};
+
+#endif
--- /dev/null
+#include "efl_canvas_gesture_private.h"
+
+#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CLASS
+
+EOLIAN static Eina_Value *
+_efl_canvas_gesture_recognizer_config_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, const char *name)
+{
+ return efl_gesture_manager_config_get(pd->manager, name);
+}
+
+EOLIAN static void
+_efl_canvas_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd EINA_UNUSED,
+ Efl_Canvas_Gesture *gesture EINA_UNUSED)
+{
+
+}
+
+#include "efl_canvas_gesture_recognizer.eo.c"
-import efl_gesture_types;
+import efl_canvas_gesture_types;
-abstract Efl.Gesture.Recognizer (Efl.Object)
+abstract Efl.Canvas.Gesture.Recognizer (Efl.Object)
{
[[EFL Gesture Recognizer abstract class]]
+ eo_prefix: efl_gesture_recognizer;
methods {
create @pure_virtual {
- [[This function is called to create a new Efl.Gesture object for the given target]]
+ [[This function is called to create a new Efl.Canvas.Gesture object for the given target]]
params {
@in target: Efl.Object; [[The target widget]]
}
- return: Efl.Gesture; [[Returns the Efl.Gesture event object]]
+ return: Efl.Canvas.Gesture; [[Returns the Efl.Canvas.Gesture event object]]
}
recognize @pure_virtual {
[[Handles the given event for the watched object.
suitable result for the current recognition step.
]]
params {
- @in gesture: Efl.Gesture; [[The gesture object]]
+ @in gesture: Efl.Canvas.Gesture; [[The gesture object]]
@in watched: Efl.Object; [[The watched object]]
- @in event: Efl.Gesture.Touch; [[The pointer event]]
+ @in event: Efl.Canvas.Gesture.Touch; [[The pointer event]]
}
- return: Efl.Gesture.Recognizer_Result; [[Returns the Efl.Gesture event object]]
+ return: Efl.Canvas.Gesture.Recognizer_Result; [[Returns the Efl.Canvas.Gesture event object]]
}
/* FIXME: This function is not used? */
reset {
[[This function is called by the framework to reset a given gesture.]]
params {
- @in gesture: Efl.Gesture; [[The gesture object]]
+ @in gesture: Efl.Canvas.Gesture; [[The gesture object]]
}
}
@property config {
-#include "efl_gesture_private.h"
+#include "efl_canvas_gesture_private.h"
-#define MY_CLASS EFL_GESTURE_RECOGNIZER_LONG_TAP_CLASS
+#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_LONG_TAP_CLASS
#define LONG_TAP_TIME_OUT 0.2
-EOLIAN static Efl_Gesture *
-_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
+EOLIAN static Efl_Canvas_Gesture *
+_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
Efl_Object *target EINA_UNUSED)
{
- return efl_add(EFL_GESTURE_LONG_TAP_CLASS, obj);
+ return efl_add(EFL_CANVAS_GESTURE_LONG_TAP_CLASS, obj);
}
static Eina_Bool
_long_tap_timeout_cb(void *data)
{
- Efl_Gesture_Long_Tap_Data *ltp = data;
+ Efl_Canvas_Gesture_Long_Tap_Data *ltp = data;
/* FIXME: Needs to propagate this event back to evas! */
ltp->is_timeout = EINA_TRUE;
return ECORE_CALLBACK_RENEW;
}
-EOLIAN static Efl_Gesture_Recognizer_Result
-_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
+EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
+_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
void *pd EINA_UNUSED,
- Efl_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
- Efl_Gesture_Touch *event)
+ Efl_Canvas_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
+ Efl_Canvas_Gesture_Touch *event)
{
double length; // Manhattan distance
Eina_Vector2 pos, dist;
- Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
- Efl_Gesture_Long_Tap_Data *ltp = efl_data_scope_get(gesture, EFL_GESTURE_LONG_TAP_CLASS);
+ Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
+ Efl_Canvas_Gesture_Long_Tap_Data *ltp = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_LONG_TAP_CLASS);
switch (efl_gesture_touch_state_get(event))
{
}
EOLIAN static void
-_efl_gesture_recognizer_long_tap_efl_gesture_recognizer_reset(Eo *obj,
+_efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_reset(Eo *obj,
void *pd EINA_UNUSED,
- Efl_Gesture *gesture)
+ Efl_Canvas_Gesture *gesture)
{
- Efl_Gesture_Long_Tap_Data *ltp;
- ltp = efl_data_scope_get(gesture, EFL_GESTURE_LONG_TAP_CLASS);
+ Efl_Canvas_Gesture_Long_Tap_Data *ltp;
+ ltp = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_LONG_TAP_CLASS);
if (ltp->timeout)
ecore_timer_del(ltp->timeout);
ltp->timeout = NULL;
efl_gesture_recognizer_reset(efl_super(obj, MY_CLASS), gesture);
}
-#include "efl_gesture_recognizer_long_tap.eo.c"
+#include "efl_canvas_gesture_recognizer_long_tap.eo.c"
--- /dev/null
+class Efl.Canvas.Gesture.Recognizer_Long_Tap (Efl.Canvas.Gesture.Recognizer)
+{
+ [[EFL Gesture Recognizer Long Tap class]]
+ data: null;
+ eo_prefix: efl_gesture_recognizer_long_tap;
+ implements {
+ Efl.Canvas.Gesture.Recognizer.create;
+ Efl.Canvas.Gesture.Recognizer.recognize;
+ Efl.Canvas.Gesture.Recognizer.reset;
+ }
+}
-#include "efl_gesture_private.h"
+#include "efl_canvas_gesture_private.h"
-#define MY_CLASS EFL_GESTURE_RECOGNIZER_TAP_CLASS
+#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_TAP_CLASS
-EOLIAN static Efl_Gesture *
-_efl_gesture_recognizer_tap_efl_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
+EOLIAN static Efl_Canvas_Gesture *
+_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_create(Eo *obj, void *pd EINA_UNUSED,
Efl_Object *target EINA_UNUSED)
{
- return efl_add(EFL_GESTURE_TAP_CLASS, obj);
+ return efl_add(EFL_CANVAS_GESTURE_TAP_CLASS, obj);
}
-EOLIAN static Efl_Gesture_Recognizer_Result
-_efl_gesture_recognizer_tap_efl_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
+EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
+_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_recognize(Eo *obj EINA_UNUSED,
void *pd EINA_UNUSED,
- Efl_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
- Efl_Gesture_Touch *event EINA_UNUSED)
+ Efl_Canvas_Gesture *gesture, Efl_Object *watched EINA_UNUSED,
+ Efl_Canvas_Gesture_Touch *event EINA_UNUSED)
{
double length;
Eina_Vector2 pos, dist;
- Efl_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
+ Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
switch (efl_gesture_touch_state_get(event))
{
return result;
}
-#include "efl_gesture_recognizer_tap.eo.c"
+#include "efl_canvas_gesture_recognizer_tap.eo.c"
--- /dev/null
+class Efl.Canvas.Gesture.Recognizer_Tap (Efl.Canvas.Gesture.Recognizer)
+{
+ [[EFL Gesture Recognizer Tap class]]
+ data: null;
+ eo_prefix: efl_gesture_recognizer_tap;
+ implements {
+ Efl.Canvas.Gesture.Recognizer.create;
+ Efl.Canvas.Gesture.Recognizer.recognize;
+ }
+}
--- /dev/null
+#include "efl_canvas_gesture_private.h"
+
+#define MY_CLASS EFL_CANVAS_GESTURE_TAP_CLASS
+
+
+EOLIAN static Efl_Object *
+_efl_canvas_gesture_tap_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Tap_Data *pd EINA_UNUSED)
+{
+ Efl_Canvas_Gesture_Data *gd;
+
+ obj = efl_constructor(efl_super(obj, MY_CLASS));
+
+ gd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS);
+ gd->type = EFL_EVENT_GESTURE_TAP;
+
+ return obj;
+}
+
+#include "efl_canvas_gesture_tap.eo.c"
-import efl_gesture_types;
+import efl_canvas_gesture_types;
-class Efl.Gesture.Tap(Efl.Gesture)
+class Efl.Canvas.Gesture.Tap(Efl.Canvas.Gesture)
{
[[EFL Gesture Tap class]]
+ eo_prefix: efl_gesture_tap;
event_prefix: efl;
events {
gesture,tap; [[Event for tap gesture]]
-#include "efl_gesture_private.h"
+#include "efl_canvas_gesture_private.h"
-#define MY_CLASS EFL_GESTURE_TOUCH_CLASS
+#define MY_CLASS EFL_CANVAS_GESTURE_TOUCH_CLASS
typedef struct _Pointer_Data
{
Efl_Pointer_Action action;
} Pointer_Data;
-typedef struct _Efl_Gesture_Touch_Data
+typedef struct _Efl_Canvas_Gesture_Touch_Data
{
- Efl_Gesture_Touch_State state;
+ Efl_Canvas_Gesture_Touch_State state;
Eina_Hash *touch_points;
int touch_down;
Eina_Bool multi_touch;
Eo *target;
-} Efl_Gesture_Touch_Data;
+} Efl_Canvas_Gesture_Touch_Data;
// This event object accumulates all the touch points
}
static inline void
-_touch_points_reset(Efl_Gesture_Touch_Data *pd)
+_touch_points_reset(Efl_Canvas_Gesture_Touch_Data *pd)
{
eina_hash_free(pd->touch_points);
pd->touch_points = eina_hash_int32_new(EINA_FREE_CB(_hash_free_cb));
}
EOLIAN static Efl_Object *
-_efl_gesture_touch_efl_object_constructor(Eo *obj, Efl_Gesture_Touch_Data *pd)
+_efl_canvas_gesture_touch_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Touch_Data *pd)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
_touch_points_reset(pd);
}
EOLIAN static void
-_efl_gesture_touch_efl_object_destructor(Eo *obj, Efl_Gesture_Touch_Data *pd)
+_efl_canvas_gesture_touch_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Touch_Data *pd)
{
eina_hash_free(pd->touch_points);
efl_destructor(efl_super(obj, MY_CLASS));
}
-EOLIAN static Efl_Gesture_Touch_State
-_efl_gesture_touch_state_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd)
+EOLIAN static Efl_Canvas_Gesture_Touch_State
+_efl_canvas_gesture_touch_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
{
return pd->state;
}
EOLIAN static void
-_efl_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd,
+_efl_canvas_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd,
int id, Eina_Vector2 pos, double timestamp, Efl_Pointer_Action action)
{
Pointer_Data *point = eina_hash_find(pd->touch_points, &id);
}
EOLIAN static Eina_Bool
-_efl_gesture_touch_multi_touch_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd)
+_efl_canvas_gesture_touch_multi_touch_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
{
return pd->multi_touch;
}
EOLIAN static Eina_Vector2
-_efl_gesture_touch_start_point_get(Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd)
+_efl_canvas_gesture_touch_start_point_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
{
int tool = 0;
Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
}
EOLIAN static Eina_Vector2
-_efl_gesture_touch_delta(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd, int tool)
+_efl_canvas_gesture_touch_delta(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd, int tool)
{
Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
Eina_Vector2 vec = { 0, 0 };
}
EOLIAN static Eina_Vector2
-_efl_gesture_touch_distance(const Eo *obj EINA_UNUSED, Efl_Gesture_Touch_Data *pd, int tool)
+_efl_canvas_gesture_touch_distance(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd, int tool)
{
Pointer_Data *point = eina_hash_find(pd->touch_points, &tool);
Eina_Vector2 vec = { 0, 0 };
return vec;
}
-#include "efl_gesture_touch.eo.c"
+#include "efl_canvas_gesture_touch.eo.c"
-import efl_gesture_types;
+import efl_canvas_gesture_types;
import efl_input_types;
/* FIXME: This class lacks a lot of useful helpers. */
-class Efl.Gesture.Touch(Efl.Object)
+class Efl.Canvas.Gesture.Touch(Efl.Object)
{
[[EFL Gesture Touch class]]
+ eo_prefix: efl_gesture_touch;
methods {
point_record {
[[Touch point record method]]
@property state {
[[This property holds the state of the touch event.]]
get {
- return : Efl.Gesture.Touch.State; [[touch event state]]
+ return : Efl.Canvas.Gesture.Touch.State; [[touch event state]]
}
}
/* FIXME: finger_list was broken by design - TODO */
-enum Efl.Gesture.Touch.State
+enum Efl.Canvas.Gesture.Touch.State
{
[[ This enum type describes the state of a touch event. ]]
legacy: efl_gesture_touch;
end, [[Last fingure touch up]]
}
-enum Efl.Gesture.State
+enum Efl.Canvas.Gesture.State
{
[[ This enum type describes the state of a gesture. ]]
legacy: efl_gesture;
canceled, [[A gesture was canceled.]]
}
-enum Efl.Gesture.Recognizer_Result
+enum Efl.Canvas.Gesture.Recognizer_Result
{
[[ This enum type describes the state of a gesture recognizer. ]]
legacy: efl_gesture;
+++ /dev/null
-#include "efl_gesture_private.h"
-
-#define MY_CLASS EFL_GESTURE_CLASS
-
-EOLIAN static const Efl_Event_Description *
- _efl_gesture_type_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
-{
- return pd->type;
-}
-
-EOLIAN static Efl_Gesture_State
-_efl_gesture_state_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
-{
- return pd->state;
-}
-
-EOLIAN static void
-_efl_gesture_state_set(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd, Efl_Gesture_State state)
-{
- pd->state = state;
-}
-
-EOLIAN static void
-_efl_gesture_hotspot_set(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd, Eina_Vector2 hotspot)
-{
- pd->hotspot = hotspot;
-}
-
-
-EOLIAN static Eina_Vector2
-_efl_gesture_hotspot_get(Eo *obj EINA_UNUSED, Efl_Gesture_Data *pd)
-{
- return pd->hotspot;
-}
-
-#include "efl_gesture.eo.c"
\ No newline at end of file
+++ /dev/null
-#include "efl_gesture_private.h"
-
-#define MY_CLASS EFL_GESTURE_LONG_TAP_CLASS
-
-
-EOLIAN static Efl_Object *
-_efl_gesture_long_tap_efl_object_constructor(Eo *obj, Efl_Gesture_Long_Tap_Data *pd EINA_UNUSED)
-{
- Efl_Gesture_Data *gd;
-
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- gd = efl_data_scope_get(obj, EFL_GESTURE_CLASS);
- gd->type = EFL_EVENT_GESTURE_LONG_TAP;
-
- return obj;
-}
-
-EOLIAN static void
-_efl_gesture_long_tap_efl_object_destructor(Eo *obj, Efl_Gesture_Long_Tap_Data *pd)
-{
- if (pd->timeout)
- ecore_timer_del(pd->timeout);
-
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-#include "efl_gesture_long_tap.eo.c"
+++ /dev/null
-#ifndef EFL_GESTURE_PRIVATE_H_
-#define EFL_GESTURE_PRIVATE_H_
-
-#include "evas_common_private.h"
-#include "evas_private.h"
-#define EFL_INTERNAL_UNSTABLE
-#include "interfaces/efl_common_internal.h"
-
-#include <Ecore.h>
-
-//private gesture classes
-#include "efl_gesture_recognizer_tap.eo.h"
-#include "efl_gesture_recognizer_long_tap.eo.h"
-
-typedef struct _Efl_Gesture_Recognizer_Data Efl_Gesture_Recognizer_Data;
-typedef struct _Efl_Gesture_Data Efl_Gesture_Data;
-typedef struct _Efl_Gesture_Tap_Data Efl_Gesture_Tap_Data;
-typedef struct _Efl_Gesture_Long_Tap_Data Efl_Gesture_Long_Tap_Data;
-
-struct _Efl_Gesture_Recognizer_Data
-{
- Eo *manager; // keeps a reference of the manager
-};
-
-struct _Efl_Gesture_Data
-{
- const Efl_Event_Description *type;
- Efl_Gesture_State state;
- Eina_Vector2 hotspot;
-};
-
-struct _Efl_Gesture_Tap_Data
-{
-};
-
-struct _Efl_Gesture_Long_Tap_Data
-{
- Ecore_Timer *timeout;
- Eina_Bool is_timeout;
-};
-
-#endif
+++ /dev/null
-#include "efl_gesture_private.h"
-
-#define MY_CLASS EFL_GESTURE_RECOGNIZER_CLASS
-
-EOLIAN static Eina_Value *
-_efl_gesture_recognizer_config_get(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd, const char *name)
-{
- return efl_gesture_manager_config_get(pd->manager, name);
-}
-
-EOLIAN static void
-_efl_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Gesture_Recognizer_Data *pd EINA_UNUSED,
- Efl_Gesture *gesture EINA_UNUSED)
-{
-
-}
-
-#include "efl_gesture_recognizer.eo.c"
+++ /dev/null
-class Efl.Gesture.Recognizer_Long_Tap (Efl.Gesture.Recognizer)
-{
- [[EFL Gesture Recognizer Long Tap class]]
- data: null;
- implements {
- Efl.Gesture.Recognizer.create;
- Efl.Gesture.Recognizer.recognize;
- Efl.Gesture.Recognizer.reset;
- }
-}
+++ /dev/null
-class Efl.Gesture.Recognizer_Tap (Efl.Gesture.Recognizer)
-{
- [[EFL Gesture Recognizer Tap class]]
- data: null;
- implements {
- Efl.Gesture.Recognizer.create;
- Efl.Gesture.Recognizer.recognize;
- }
-}
+++ /dev/null
-#include "efl_gesture_private.h"
-
-#define MY_CLASS EFL_GESTURE_TAP_CLASS
-
-
-EOLIAN static Efl_Object *
-_efl_gesture_tap_efl_object_constructor(Eo *obj, Efl_Gesture_Tap_Data *pd EINA_UNUSED)
-{
- Efl_Gesture_Data *gd;
-
- obj = efl_constructor(efl_super(obj, MY_CLASS));
-
- gd = efl_data_scope_get(obj, EFL_GESTURE_CLASS);
- gd->type = EFL_EVENT_GESTURE_TAP;
-
- return obj;
-}
-
-#include "efl_gesture_tap.eo.c"
void efl_canvas_output_info_get(Evas_Public_Data *e, Efl_Canvas_Output *output);
// Gesture Manager
-void _efl_gesture_manager_filter_event(Eo *gesture_manager, Eo *target, void *event);
-void _efl_gesture_manager_callback_del_hook(Eo *gesture_manager, Eo *target, const Efl_Event_Description *type);
-void _efl_gesture_manager_callback_add_hook(Eo *gesture_manager, Eo *target, const Efl_Event_Description *type);
+void _efl_canvas_gesture_manager_filter_event(Eo *gesture_manager, Eo *target, void *event);
+void _efl_canvas_gesture_manager_callback_del_hook(Eo *gesture_manager, Eo *target, const Efl_Event_Description *type);
+void _efl_canvas_gesture_manager_callback_add_hook(Eo *gesture_manager, Eo *target, const Efl_Event_Description *type);
extern Eina_Cow *evas_object_proxy_cow;