Paving the way to Efl.Pointer.Event...
@property device {
[[Pointing device that originated this event.]]
values {
- dev: Efl.Input.Device*;
+ dev: Efl.Input.Device;
}
}
@property source {
propagation or repetition of the event.
]]
values {
- src: Efl.Gfx*;
+ src: Efl.Gfx;
}
}
/* FIXME: why not double_click() and triple_click() */
* out on new objects if the state change demands it.
*/
EAPI void evas_event_thaw_eval(Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Mouse move event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * is moved from its last position. It prepares information to be treated by
+ * the callback function.
+ *
+ * @param[in] y The vertical position of the mouse pointer.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_move(Evas *obj, int x, int y, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse move event feed from input.
+ *
+ * Similar to the @ref evas_event_feed_mouse_move, this function will inform
+ * Evas about mouse move events which were received by the input system,
+ * relative to the 0,0 of the window, not to the canvas 0,0. It will take care
+ * of doing any special transformation like adding the framespace offset to the
+ * mouse event.
+ *
+ * @param[in] y The vertical position of the mouse pointer relative to the 0,0
+ * of the window/surface.
+ * @param[in] timestamp The timestamp of the mouse move event.
+ * @param[in] data The data for canvas.
+ *
+ * @since 1.8
+ */
+EAPI void evas_event_input_mouse_move(Evas *obj, int x, int y, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse up event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * button is released. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] flags Evas button flags.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_up(Evas *obj, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse down event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * button is pressed. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] flags Evas button flags.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_down(Evas *obj, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse wheel event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * wheel is scrolled up or down. It prepares information to be treated by the
+ * callback function.
+ *
+ * @param[in] z How much mouse wheel was scrolled up or down.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_wheel(Evas *obj, int direction, int z, unsigned int timestamp, const void *data);
+
/**
* @}
*/
any host system's pointing device abilities.
A canvas by default begins with no mouse buttons being
- pressed and only calls to @.event_feed_mouse_down
- and @.event_feed_mouse_up will alter that.
+ pressed and only calls to @.event_feed can alter that.
The least significant bit corresponds to the first mouse
button (button 1) and the most significant bit corresponds
@in y: int; [[The vertical coordinate of the position.]]
}
}
- event_feed_mouse_wheel {
- [[Mouse wheel event feed.
-
- This function will set some evas properties that is necessary
- when the mouse wheel is scrolled up or down. It prepares
- information to be treated by the callback function.
- ]]
- params {
- @in direction: int; [[The wheel mouse direction.]]
- @in z: int; [[How much mouse wheel was scrolled up or down.]]
- @in timestamp: uint; [[The timestamp of the mouse up event.]]
- @in data: const(void)*; [[The data for canvas.]]
- }
- }
key_lock_on {
[[Enables or turns on programmatically the lock key with name
$keyname.
@in data: const(void)*; [[The data for canvas.]]
}
}
- event_feed_mouse_move {
- [[Mouse move event feed.
-
- This function will set some evas properties that is necessary
- when the mouse is moved from its last position. It prepares
- information to be treated by the callback function.
- ]]
- params {
- @in x: int; [[The horizontal position of the mouse pointer.]]
- @in y: int; [[The vertical position of the mouse pointer.]]
- @in timestamp: uint; [[The timestamp of the mouse up event.]]
- @in data: const(void)*; [[The data for canvas.]]
- }
- }
event_feed_key_up {
[[Key up event feed.
focus_out {
[[Inform to the evas that it lost the focus.]]
}
- event_input_mouse_move {
- [[Mouse move event feed from input.
-
- Similar to the @.event_feed_mouse_move, this function will
- inform Evas about mouse move events which were received by
- the input system, relative to the 0,0 of the window, not to the
- canvas 0,0. It will take care of doing any special transformation
- like adding the framespace offset to the mouse event.
-
- @since 1.8
- ]]
- params {
- @in x: int; [[The horizontal position of the mouse pointer
- relative to the 0,0 of the window/surface.]]
- @in y: int; [[The vertical position of the mouse pointer
- relative to the 0,0 of the window/surface.]]
- @in timestamp: uint; [[The timestamp of the mouse move event.]]
- @in data: const(void)*; [[The data for canvas.]]
- }
- }
norender {
[[Update the canvas internal objects but not triggering immediate
renderization.
@in keyname: const(char)* @nonull; [[The name of the modifier to enable.]]
}
}
- event_feed_mouse_up {
- [[Mouse up event feed.
-
- This function will set some evas properties that is necessary
- when the mouse button is released. It prepares information to
- be treated by the callback function.
- ]]
- params {
- @in b: int; [[The button number.]]
- @in flags: Evas.Button_Flags; [[Evas button flags.]]
- @in timestamp: uint; [[The timestamp of the mouse up event.]]
- @in data: const(void)*; [[The data for canvas.]]
- }
- }
- event_feed_mouse_down {
- [[Mouse down event feed.
-
- This function will set some evas properties that is necessary
- when the mouse button is pressed. It prepares information to
- be treated by the callback function.
- ]]
- params {
- @in b: int; [[The button number.]]
- @in flags: Evas.Button_Flags; [[Evas button flags.]]
- @in timestamp: uint; [[The timestamp of the mouse up event.]]
- @in data: const(void)*; [[The data for canvas.]]
- }
- }
event_refeed_event {
[[Re feed event.
event_feed_mouse_cancel {
[[Mouse cancel event feed.
- This function will call @.event_feed_mouse_up when a
- mouse cancel event happens.
+ This function will call generate a mouse up event.
]]
params {
@in timestamp: uint; [[The timestamp of the mouse up event.]]
@in data: const(void)*; [[Data for canvas.]]
}
}
+ event_feed {
+ [[Feed an input event.]]
+ legacy: null;
+ params {
+ event: const(Efl.Pointer.Event);
+ }
+ }
}
implements {
Eo.Base.constructor;
#include "evas_common_private.h"
#include "evas_private.h"
+#define EFL_INTERNAL_UNSTABLE
+#include "interfaces/efl_common_internal.h"
+
static Eina_List *
_evas_event_object_list_in_get(Evas *eo_e, Eina_List *in,
const Eina_Inlist *list, Evas_Object *stop,
}
}
-EOLIAN void
-_evas_canvas_event_feed_mouse_down(Eo *eo_e, Evas_Public_Data *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
+EAPI void
+evas_event_feed_mouse_down(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
+ Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Eina_List *l, *copy;
Evas_Event_Mouse_Down ev;
Evas_Object *eo_obj;
return post_called;
}
-EOLIAN void
-_evas_canvas_event_feed_mouse_up(Eo *eo_e, Evas_Public_Data *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
+EAPI void
+evas_event_feed_mouse_up(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
+ Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Eina_List *l, *copy;
INF("ButtonEvent:up time=%u x=%d y=%d button=%d downs=%d", timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs);
_evas_unwalk(e);
}
-EOLIAN void
-_evas_canvas_event_feed_mouse_wheel(Eo *eo_e, Evas_Public_Data *e, int direction, int z, unsigned int timestamp, const void *data)
+EAPI void
+evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timestamp, const void *data)
{
+ Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Eina_List *l, *copy;
Evas_Event_Mouse_Wheel ev;
Evas_Object *eo_obj;
_evas_unwalk(e);
}
-EOLIAN void
-_evas_canvas_event_input_mouse_move(Eo *eo_e, Evas_Public_Data *e, int x, int y, unsigned int timestamp, const void *data)
+EAPI void
+evas_event_input_mouse_move(Eo *eo_e, int x, int y, unsigned int timestamp, const void *data)
{
+ Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
_canvas_event_feed_mouse_move_internal(eo_e, e, x - e->framespace.x, y - e->framespace.y, timestamp, data);
}
-EOLIAN void
-_evas_canvas_event_feed_mouse_move(Eo *eo_e, Evas_Public_Data *e, int x, int y, unsigned int timestamp, const void *data)
+EAPI void
+evas_event_feed_mouse_move(Eo *eo_e, int x, int y, unsigned int timestamp, const void *data)
{
+ Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
_canvas_event_feed_mouse_move_internal(eo_e, e, x, y, timestamp, data);
}
EOLIAN void
_evas_canvas_event_feed_mouse_out(Eo *eo_e, Evas_Public_Data *e, unsigned int timestamp, const void *data)
{
-
Evas_Event_Mouse_Out ev;
int event_id = 0;
{
return e->pointer.downs;
}
+
+EOLIAN void
+_evas_canvas_event_feed(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const Efl_Pointer_Event *event)
+{
+ Efl_Pointer_Event_Data *ev = eo_data_scope_get(event, EFL_POINTER_EVENT_CLASS);
+ /* TODO */
+}