(see input vs. feed: this is "input") */
Evas_Modifier *modifiers;
Evas_Lock *locks;
+ void *legacy; /* DO NOT TOUCH THIS */
Eina_Bool evas_done : 1; /* set by evas */
Eina_Bool fake : 1;
Eina_Bool win_fed : 1;
Evas_Lock *locks;
Efl_Event_Flags event_flags;
Efl_Input_Device *device;
+ void *legacy; /* DO NOT TOUCH THIS */
Eina_Bool evas_done : 1; /* set by evas */
Eina_Bool fake : 1;
Eina_Bool win_fed : 1;
double timestamp;
Efl_Input_Device *device;
void *data;
+ void *legacy; /* DO NOT TOUCH THIS */
Eina_Bool hold : 1;
Eina_Bool evas_done : 1; /* set by evas */
};
Eina_Bool was_hold;
/* FIXME: Avoid this translation to evas struct and use pointer/key events
- * in all of elementary widgets */
+ * in all of elementary widgets
+ * See also: efl_event_key_legacy_info_fill().
+ */
if (event->desc == EFL_EVENT_KEY_DOWN)
{
Efl_Event_Key_Data *ev = efl_data_scope_get(event->info, EFL_EVENT_KEY_CLASS);
Efl.Gfx.Map.map_enable.get;
}
events {
- mouse,in @beta; [[Mouse In Event ]]
- mouse,out @beta; [[Mouse Out Event ]]
- mouse,down @beta; [[Mouse Button Down Event ]]
- mouse,up @beta; [[Mouse Button Up Event ]]
- mouse,move @beta; [[Mouse Move Event ]]
- mouse,wheel @beta; [[Mouse Wheel Event ]]
- multi,down @beta; [[Mouse-touch Down Event ]]
- multi,up @beta; [[Mouse-touch Up Event ]]
- multi,move @beta; [[Multi-touch Move Event ]]
free @beta; [[Object Being Freed (Called after Del) ]]
- key,down @beta; [[Key Press Event ]]
- key,up @beta; [[Key Release Event ]]
focus,in; [[Focus In Event ]]
focus,out; [[Focus Out Event ]]
del @beta; [[Object Being Deleted (called before Free) ]]
- hold @beta; [[Events go on/off hold ]]
}
}
_efl_event_hold_efl_object_constructor(Eo *obj, Efl_Event_Hold_Data *pd)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
- pd->eo = obj;
+ efl_event_reset(obj);
return obj;
}
+static inline void
+_efl_event_hold_free(Efl_Event_Hold_Data *pd)
+{
+ free(pd->legacy);
+}
+
+EOLIAN static void
+_efl_event_hold_efl_object_destructor(Eo *obj, Efl_Event_Hold_Data *pd)
+{
+ _efl_event_hold_free(pd);
+ efl_destructor(efl_super(obj, MY_CLASS));
+}
+
EOLIAN static Efl_Event *
_efl_event_hold_efl_event_instance_get(Eo *klass EINA_UNUSED, void *_pd EINA_UNUSED,
Efl_Object *owner, void **priv)
EOLIAN static void
_efl_event_hold_efl_event_reset(Eo *obj, Efl_Event_Hold_Data *pd)
{
+ _efl_event_hold_free(pd);
memset(pd, 0, sizeof(*pd));
pd->eo = obj;
}
Efl_Event_Hold_Data *ev;
Efl_Event *evt = efl_add(EFL_EVENT_HOLD_CLASS, efl_parent_get(obj));
ev = efl_data_scope_get(evt, MY_CLASS);
- if (ev)
- {
- memcpy(ev, pd, sizeof(*ev));
- ev->eo = evt;
- }
+ if (!ev) return NULL;
+
+ ev->eo = evt;
+ ev->timestamp = pd->timestamp;
+ ev->data = pd->data;
+ ev->hold = pd->hold;
+ ev->device = pd->device; // lacks a proper ref :(
+
return evt;
}
}
implements {
Efl.Object.constructor;
+ Efl.Object.destructor;
Efl.Event.instance_get;
Efl.Event.reset;
Efl.Event.dup;
static inline void
_efl_event_key_free(Efl_Event_Key_Data *pd)
{
+ free(pd->legacy);
eina_stringshare_del(pd->key);
eina_stringshare_del(pd->keyname);
eina_stringshare_del(pd->string);
memcpy(ev, pd, sizeof(*ev));
ev->eo = evt;
+ ev->legacy = NULL;
ev->key = eina_stringshare_add(pd->key);
ev->keyname = eina_stringshare_add(pd->keyname);
ev->string = eina_stringshare_add(pd->string);
EOLIAN static Efl_Object *
_efl_event_pointer_efl_object_constructor(Eo *obj, Efl_Event_Pointer_Data *pd EINA_UNUSED)
{
- efl_constructor(efl_super(obj, MY_CLASS));
+ obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_event_reset(obj);
return obj;
}
+static inline void
+_efl_event_pointer_free(Efl_Event_Pointer_Data *pd)
+{
+ free(pd->legacy);
+}
+
+EOLIAN static void
+_efl_event_pointer_efl_object_destructor(Eo *obj, Efl_Event_Pointer_Data *pd)
+{
+ _efl_event_pointer_free(pd);
+ efl_destructor(efl_super(obj, MY_CLASS));
+}
+
EOLIAN static void
_efl_event_pointer_efl_event_reset(Eo *obj, Efl_Event_Pointer_Data *pd)
{
Eina_Bool fake = pd->fake;
+ _efl_event_pointer_free(pd);
memset(pd, 0, sizeof(*pd));
pd->eo = obj;
pd->wheel.dir = EFL_ORIENT_VERTICAL;
memcpy(ev, pd, sizeof(*ev));
ev->eo = evt;
+ ev->legacy = NULL;
ev->evas_done = 0;
ev->win_fed = 0;
ev->fake = 1;
}
implements {
Efl.Object.constructor;
+ Efl.Object.destructor;
class.destructor;
Efl.Event.instance_get;
Efl.Event.reset;
/**
* Evas events descriptions for Eo.
*/
-#define DEFINE_EVAS_CALLBACKS(LAST, ...) \
- static const Efl_Event_Description *_legacy_evas_callback_table(unsigned int index) \
+#define DEFINE_EVAS_CALLBACKS(FUNC, LAST, ...) \
+ static const Efl_Event_Description *FUNC(unsigned int index) \
{ \
static const Efl_Event_Description *internals[LAST] = { NULL }; \
\
+ if (index >= LAST) return NULL; \
if (internals[0] == NULL) \
{ \
memcpy(internals, \
return internals[index]; \
}
-DEFINE_EVAS_CALLBACKS(EVAS_CALLBACK_LAST,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_IN,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_OUT,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_DOWN,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_UP,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_MOVE,
- EFL_CANVAS_OBJECT_EVENT_MOUSE_WHEEL,
- EFL_CANVAS_OBJECT_EVENT_MULTI_DOWN,
- EFL_CANVAS_OBJECT_EVENT_MULTI_UP,
- EFL_CANVAS_OBJECT_EVENT_MULTI_MOVE,
+DEFINE_EVAS_CALLBACKS(_legacy_evas_callback_table, EVAS_CALLBACK_LAST,
+ EFL_EVENT_POINTER_IN,
+ EFL_EVENT_POINTER_OUT,
+ EFL_EVENT_POINTER_DOWN,
+ EFL_EVENT_POINTER_UP,
+ EFL_EVENT_POINTER_MOVE,
+ EFL_EVENT_POINTER_WHEEL,
+ EFL_EVENT_POINTER_DOWN,
+ EFL_EVENT_POINTER_UP,
+ EFL_EVENT_POINTER_MOVE,
EFL_CANVAS_OBJECT_EVENT_FREE,
- EFL_CANVAS_OBJECT_EVENT_KEY_DOWN,
- EFL_CANVAS_OBJECT_EVENT_KEY_UP,
+ EFL_EVENT_KEY_DOWN,
+ EFL_EVENT_KEY_UP,
EFL_CANVAS_OBJECT_EVENT_FOCUS_IN,
EFL_CANVAS_OBJECT_EVENT_FOCUS_OUT,
EFL_GFX_EVENT_SHOW,
EFL_GFX_EVENT_RESIZE,
EFL_GFX_EVENT_RESTACK,
EFL_CANVAS_OBJECT_EVENT_DEL,
- EFL_CANVAS_OBJECT_EVENT_HOLD,
+ EFL_EVENT_HOLD,
EFL_GFX_EVENT_CHANGE_SIZE_HINTS,
EFL_IMAGE_EVENT_PRELOAD,
EFL_CANVAS_EVENT_FOCUS_IN,
Evas_Object_Event_Cb func;
void *data;
Evas_Callback_Type type;
+ int efl_event_info; // for key, pointer and hold
} _eo_evas_object_cb_info;
typedef struct
Evas_Callback_Type type;
} _eo_evas_cb_info;
+#define EFL_EVENT_TYPE_LEGACY 0
+#define EFL_EVENT_TYPE_POINTER 1
+#define EFL_EVENT_TYPE_KEY 2
+#define EFL_EVENT_TYPE_HOLD 3
+
+static int
+_evas_event_efl_event_info_exists(Evas_Callback_Type type)
+{
+ switch (type)
+ {
+ case EVAS_CALLBACK_MOUSE_IN:
+ case EVAS_CALLBACK_MOUSE_OUT:
+ case EVAS_CALLBACK_MOUSE_DOWN:
+ case EVAS_CALLBACK_MOUSE_UP:
+ case EVAS_CALLBACK_MOUSE_MOVE:
+ case EVAS_CALLBACK_MOUSE_WHEEL:
+ case EVAS_CALLBACK_MULTI_DOWN:
+ case EVAS_CALLBACK_MULTI_UP:
+ case EVAS_CALLBACK_MULTI_MOVE:
+ return EFL_EVENT_TYPE_POINTER;
+ case EVAS_CALLBACK_KEY_DOWN:
+ case EVAS_CALLBACK_KEY_UP:
+ return EFL_EVENT_TYPE_KEY;
+ case EVAS_CALLBACK_HOLD:
+ return EFL_EVENT_TYPE_HOLD;
+ default:
+ return EFL_EVENT_TYPE_LEGACY;
+ }
+}
+
static void
_eo_evas_object_cb(void *data, const Eo_Event *event)
{
+ Evas_Event_Flags *event_flags = NULL, evflags = EVAS_EVENT_FLAG_NONE;
+ Efl_Event *efl_event_info = event->info;
_eo_evas_object_cb_info *info = data;
- Evas *evas = evas_object_evas_get(event->object);
- if (info->func) info->func(info->data, evas, event->object, event->info);
+ void *event_info;
+ Evas *evas;
+
+ evas = evas_object_evas_get(event->object);
+
+ if (!info->func) return;
+ switch (info->efl_event_info)
+ {
+ case EFL_EVENT_TYPE_POINTER:
+ event_info = efl_event_pointer_legacy_info_fill(efl_event_info, &event_flags);
+ break;
+
+ case EFL_EVENT_TYPE_KEY:
+ event_info = efl_event_key_legacy_info_fill(efl_event_info, &event_flags);
+ break;
+
+ case EFL_EVENT_TYPE_HOLD:
+ event_info = efl_event_hold_legacy_info_fill(efl_event_info, &event_flags);
+ break;
+
+ case EFL_EVENT_TYPE_LEGACY:
+ info->func(info->data, evas, event->object, event->info);
+ return;
+
+ default: return;
+ }
+
+ if (!event_info) return;
+ if (event_flags) evflags = *event_flags;
+ info->func(info->data, evas, event->object, event_info);
+ if (event_flags && (evflags != *event_flags))
+ efl_event_flags_set(efl_event_info, *event_flags);
}
static void
break;
}
- /* legacy callbacks - relying on Efl.Canvas.Object events */
- efl_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info);
-
- /* new input events */
- if (efl_event_desc)
+ if (_evas_event_efl_event_info_exists(type))
{
- Efl_Event_Flags *pevflags = NULL;
-
-#define EV_CASE(TYPE, NEWTYPE, Type) \
- case EVAS_CALLBACK_ ## TYPE: \
- pevflags = &(((Evas_Event_ ## Type *) event_info)->event_flags); \
- break
- switch (type)
- {
- EV_CASE(MOUSE_MOVE, POINTER_MOVE, Mouse_Move);
- EV_CASE(MOUSE_OUT, POINTER_OUT, Mouse_Out);
- EV_CASE(MOUSE_IN, POINTER_IN, Mouse_In);
- EV_CASE(MOUSE_DOWN , POINTER_DOWN, Mouse_Down);
- EV_CASE(MOUSE_UP, POINTER_UP, Mouse_Up);
- EV_CASE(MULTI_MOVE, POINTER_MOVE, Multi_Move);
- EV_CASE(MULTI_DOWN, POINTER_DOWN, Multi_Down);
- EV_CASE(MULTI_UP, POINTER_UP, Multi_Up);
- EV_CASE(MOUSE_WHEEL, POINTER_WHEEL, Mouse_Wheel);
- EV_CASE(KEY_DOWN, KEY_DOWN, Key_Down);
- EV_CASE(KEY_UP, KEY_UP, Key_Up);
- default: break;
- }
-#undef EV_CASE
-
- if (pevflags) efl_event_flags_set(efl_event_info, *pevflags);
efl_event_callback_call(eo_obj, efl_event_desc, efl_event_info);
}
+ else
+ {
+ /* legacy callbacks - relying on Efl.Canvas.Object events */
+ efl_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info);
+
+ /* new input events - unlikely */
+ if (efl_event_desc)
+ efl_event_callback_call(eo_obj, efl_event_desc, efl_event_info);
+ }
if (type == EVAS_CALLBACK_MOUSE_DOWN)
{
cb_info->func = func;
cb_info->data = (void *)data;
cb_info->type = type;
+ cb_info->efl_event_info = _evas_event_efl_event_info_exists(type);
const Efl_Event_Description *desc = _legacy_evas_callback_table(type);
efl_event_callback_priority_add(eo_obj, desc, priority, _eo_evas_object_cb, cb_info);
return EINA_TRUE;
}
+void *
+efl_event_pointer_legacy_info_fill(Efl_Event_Key *evt, Evas_Event_Flags **pflags)
+{
+ Efl_Event_Pointer_Data *ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS);
+ if (!ev) return NULL;
+
+#define COORD_DUP(e) do { (e)->output.x = (e)->canvas.x; (e)->output.y = (e)->canvas.y; } while (0)
+
+ switch (ev->action)
+ {
+ case EFL_POINTER_ACTION_IN:
+ {
+ Evas_Event_Mouse_In *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->event_src = ev->source;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ case EFL_POINTER_ACTION_OUT:
+ {
+ Evas_Event_Mouse_Out *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->event_src = ev->source;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ case EFL_POINTER_ACTION_DOWN:
+ if (ev->finger == 0)
+ {
+ Evas_Event_Mouse_Down *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->button = ev->button;
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->flags = ev->button_flags;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->event_src = ev->source;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+ else
+ {
+ Evas_Event_Multi_Down *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->device = ev->finger;
+ e->radius = ev->radius;
+ e->radius_x = ev->radius_x;
+ e->radius_y = ev->radius_y;
+ e->pressure = ev->pressure;
+ e->angle = ev->angle;
+ e->canvas.xsub = ev->cur.x;
+ e->canvas.ysub = ev->cur.y;
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->flags = ev->button_flags;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ case EFL_POINTER_ACTION_UP:
+ if (ev->finger == 0)
+ {
+ Evas_Event_Mouse_Up *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->button = ev->button;
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->flags = ev->button_flags;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->event_src = ev->source;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+ else
+ {
+ Evas_Event_Multi_Up *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->device = ev->finger;
+ e->radius = ev->radius;
+ e->radius_x = ev->radius_x;
+ e->radius_y = ev->radius_y;
+ e->pressure = ev->pressure;
+ e->angle = ev->angle;
+ e->canvas.xsub = ev->cur.x;
+ e->canvas.ysub = ev->cur.y;
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->flags = ev->button_flags;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ case EFL_POINTER_ACTION_MOVE:
+ if (ev->finger == 0)
+ {
+ Evas_Event_Mouse_Move *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->buttons = ev->pressed_buttons;
+ e->cur.canvas.x = ev->cur.x;
+ e->cur.canvas.y = ev->cur.y;
+ COORD_DUP(&e->cur);
+ e->prev.canvas.x = ev->prev.x;
+ e->prev.canvas.y = ev->prev.y;
+ COORD_DUP(&e->prev);
+ e->data = ev->data;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->event_src = ev->source;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+ else
+ {
+ Evas_Event_Multi_Move *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->device = ev->finger;
+ e->radius = ev->radius;
+ e->radius_x = ev->radius_x;
+ e->radius_y = ev->radius_y;
+ e->pressure = ev->pressure;
+ e->angle = ev->angle;
+ e->cur.canvas.xsub = ev->cur.x;
+ e->cur.canvas.ysub = ev->cur.y;
+ e->cur.canvas.x = ev->cur.x;
+ e->cur.canvas.y = ev->cur.y;
+ COORD_DUP(&e->cur);
+ e->data = ev->data;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ case EFL_POINTER_ACTION_WHEEL:
+ {
+ Evas_Event_Mouse_Wheel *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->direction = (ev->wheel.dir == EFL_ORIENT_HORIZONTAL) ? 1 : 0;
+ e->z = ev->wheel.z;
+ e->canvas.x = ev->cur.x;
+ e->canvas.y = ev->cur.y;
+ COORD_DUP(e);
+ e->data = ev->data;
+ e->timestamp = ev->timestamp;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+
+ default:
+ return NULL;
+ }
+}
+
Eina_Bool
efl_event_key_legacy_info_set(Efl_Event_Key *evt, const void *event_info, Evas_Callback_Type type)
{
return EINA_TRUE;
}
+void *
+efl_event_key_legacy_info_fill(Efl_Event_Key *evt, Evas_Event_Flags **pflags)
+{
+ Efl_Event_Key_Data *ev;
+
+ ev = efl_data_scope_get(evt, EFL_EVENT_KEY_CLASS);
+ if (!ev) return NULL;
+
+ if (ev->pressed)
+ {
+ Evas_Event_Key_Down *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->timestamp = ev->timestamp;
+ e->keyname = (char *) ev->keyname;
+ e->key = ev->key;
+ e->string = ev->string;
+ e->compose = ev->compose;
+ e->keycode = ev->keycode;
+ e->data = ev->data;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+ else
+ {
+ Evas_Event_Key_Up *e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->timestamp = ev->timestamp;
+ e->keyname = (char *) ev->keyname;
+ e->key = ev->key;
+ e->string = ev->string;
+ e->compose = ev->compose;
+ e->keycode = ev->keycode;
+ e->data = ev->data;
+ e->modifiers = ev->modifiers;
+ e->locks = ev->locks;
+ e->event_flags = ev->event_flags;
+ e->dev = ev->device;
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+ return e;
+ }
+}
+
Eina_Bool
efl_event_hold_legacy_info_set(Efl_Event_Hold *evt, const void *event_info, Evas_Callback_Type type)
{
return EINA_TRUE;
}
+
+void *
+efl_event_hold_legacy_info_fill(Efl_Event_Hold *evt, Evas_Event_Flags **pflags)
+{
+ Efl_Event_Hold_Data *ev = efl_data_scope_get(evt, EFL_EVENT_HOLD_CLASS);
+ Evas_Event_Hold *e;
+
+ if (!ev) return NULL;
+
+ e = ev->legacy ? ev->legacy : calloc(1, sizeof(*e));
+ e->timestamp = ev->timestamp;
+ e->dev = ev->device;
+ e->hold = ev->hold;
+ e->event_flags = 0; // FIXME?
+ if (pflags) *pflags = &e->event_flags;
+ ev->legacy = e;
+
+ return e;
+}
Eina_Bool efl_event_pointer_legacy_info_set(Efl_Event_Pointer *evt, const void *event_info, Evas_Callback_Type type);
Eina_Bool efl_event_key_legacy_info_set(Efl_Event_Key *evt, const void *event_info, Evas_Callback_Type type);
Eina_Bool efl_event_hold_legacy_info_set(Efl_Event_Hold *evt, const void *event_info, Evas_Callback_Type type);
+void *efl_event_pointer_legacy_info_fill(Efl_Event_Key *evt, Evas_Event_Flags **pflags);
+void *efl_event_key_legacy_info_fill(Efl_Event_Key *evt, Evas_Event_Flags **pflags);
+void *efl_event_hold_legacy_info_fill(Efl_Event_Hold *evt, Evas_Event_Flags **pflags);
Eina_Bool evas_vg_loader_svg(Evas_Object *vg, const Eina_File *f, const char *key EINA_UNUSED);