forked from enlightenment/efl
ecore/fb: Change fb engine input to use ecore_input_evas.
Nothing changes, only making the ecore fb engine to send keyboard and mouse events using ecore_input_evas, instead of its own ecore events. Patch for SiT. SVN revision: 64447
This commit is contained in:
parent
44538e442a
commit
53031cf572
|
@ -1366,6 +1366,28 @@ EAPI Eina_Bool ecore_evas_sticky_get(const Ecore_Evas *ee);
|
||||||
EAPI void ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
|
EAPI void ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
|
||||||
EAPI Eina_Bool ecore_evas_manual_render_get(const Ecore_Evas *ee);
|
EAPI Eina_Bool ecore_evas_manual_render_get(const Ecore_Evas *ee);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
|
||||||
|
*
|
||||||
|
* @param ee The @c Ecore_Evas handle.
|
||||||
|
*
|
||||||
|
* This function calls ecore_event_window_register() with the @p ee as its @c
|
||||||
|
* id argument, @c window argument, and uses its @c Evas too. It is useful when
|
||||||
|
* no @c window information is available on a given @c Ecore_Evas backend.
|
||||||
|
*
|
||||||
|
* @see ecore_evas_input_event_unregister()
|
||||||
|
* @since 1.1
|
||||||
|
*/
|
||||||
|
EAPI void ecore_evas_input_event_register(Ecore_Evas *ee);
|
||||||
|
/**
|
||||||
|
* @brief Unregisters an @c Ecore_Evas receiving events through ecore_input_evas.
|
||||||
|
*
|
||||||
|
* @param ee The @c Ecore_Evas handle.
|
||||||
|
*
|
||||||
|
* @see ecore_evas_input_event_register()
|
||||||
|
* @since 1.1
|
||||||
|
*/
|
||||||
|
EAPI void ecore_evas_input_event_unregister(Ecore_Evas *ee);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Force immediate rendering on a given @c Ecore_Evas window
|
* @brief Force immediate rendering on a given @c Ecore_Evas window
|
||||||
|
|
|
@ -2519,3 +2519,19 @@ ecore_evas_ecore_evas_list_get(void)
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_evas_input_event_register(Ecore_Evas *ee)
|
||||||
|
{
|
||||||
|
ecore_event_window_register((Ecore_Window)ee, ee, ee->evas,
|
||||||
|
(Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
|
||||||
|
(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
|
||||||
|
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
|
||||||
|
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_evas_input_event_unregister(Ecore_Evas *ee)
|
||||||
|
{
|
||||||
|
ecore_event_window_unregister((Ecore_Window)ee);
|
||||||
|
}
|
||||||
|
|
|
@ -20,10 +20,10 @@ static int _ecore_evas_init_count = 0;
|
||||||
|
|
||||||
static char *ecore_evas_default_display = "0";
|
static char *ecore_evas_default_display = "0";
|
||||||
static Eina_List *ecore_evas_input_devices = NULL;
|
static Eina_List *ecore_evas_input_devices = NULL;
|
||||||
static Ecore_Event_Handler *ecore_evas_event_handlers[6] = {NULL, NULL, NULL, NULL, NULL, NULL};
|
static Ecore_Event_Handler *ecore_evas_event_handlers[4] = {NULL, NULL, NULL, NULL};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y, unsigned int timestamp)
|
_ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y)
|
||||||
{
|
{
|
||||||
int fbw, fbh;
|
int fbw, fbh;
|
||||||
|
|
||||||
|
@ -50,14 +50,6 @@ _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y, unsigned int tim
|
||||||
y - ee->prop.cursor.hot.x,
|
y - ee->prop.cursor.hot.x,
|
||||||
(fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
|
(fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
|
||||||
}
|
}
|
||||||
if (ee->rotation == 0)
|
|
||||||
evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL);
|
|
||||||
else if (ee->rotation == 90)
|
|
||||||
evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x, timestamp, NULL);
|
|
||||||
else if (ee->rotation == 180)
|
|
||||||
evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1, timestamp, NULL);
|
|
||||||
else if (ee->rotation == 270)
|
|
||||||
evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, timestamp, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Ecore_Evas *fb_ee = NULL;
|
static Ecore_Evas *fb_ee = NULL;
|
||||||
|
@ -102,90 +94,56 @@ _ecore_evas_fb_gain(void *data __UNUSED__)
|
||||||
ecore_fb_input_device_listen(dev, 1);
|
ecore_fb_input_device_listen(dev, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_ecore_evas_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|
||||||
{
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
Ecore_Fb_Event_Key_Down *e;
|
|
||||||
|
|
||||||
e = event;
|
|
||||||
ee = _ecore_evas_fb_match();
|
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
|
||||||
evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
|
||||||
return EINA_FALSE; /* dont pass it on */
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_ecore_evas_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|
||||||
{
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
Ecore_Fb_Event_Key_Up *e;
|
|
||||||
|
|
||||||
e = event;
|
|
||||||
ee = _ecore_evas_fb_match();
|
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
|
||||||
evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
|
||||||
return EINA_FALSE; /* dont pass it on */
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Fb_Event_Mouse_Button_Down *e;
|
Ecore_Event_Mouse_Button *e;
|
||||||
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
|
|
||||||
|
|
||||||
e = event;
|
e = event;
|
||||||
ee = _ecore_evas_fb_match();
|
ee = _ecore_evas_fb_match();
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
if (!ee) return EINA_TRUE; /* pass on event */
|
||||||
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
|
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
|
||||||
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
|
return EINA_TRUE; /* dont pass it on */
|
||||||
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
|
|
||||||
evas_event_feed_mouse_down(ee->evas, e->button, flags, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
|
||||||
return EINA_FALSE; /* dont pass it on */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Fb_Event_Mouse_Button_Up *e;
|
Ecore_Event_Mouse_Button *e;
|
||||||
|
|
||||||
e = event;
|
e = event;
|
||||||
ee = _ecore_evas_fb_match();
|
ee = _ecore_evas_fb_match();
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
if (!ee) return EINA_TRUE; /* pass on event */
|
||||||
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
|
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
|
||||||
evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
return EINA_TRUE; /* dont pass it on */
|
||||||
return EINA_FALSE; /* dont pass it on */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Fb_Event_Mouse_Move *e;
|
Ecore_Event_Mouse_Move *e;
|
||||||
|
|
||||||
e = event;
|
e = event;
|
||||||
ee = _ecore_evas_fb_match();
|
ee = _ecore_evas_fb_match();
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
if (!ee) return EINA_TRUE; /* pass on event */
|
||||||
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
|
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
|
||||||
return EINA_FALSE; /* dont pass it on */
|
return EINA_TRUE; /* dont pass it on */
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Fb_Event_Mouse_Wheel *e;
|
Ecore_Event_Mouse_Wheel *e;
|
||||||
unsigned long long event_time;
|
|
||||||
|
|
||||||
e = event;
|
e = event;
|
||||||
ee = _ecore_evas_fb_match();
|
ee = _ecore_evas_fb_match();
|
||||||
if (!ee) return EINA_TRUE; /* pass on event */
|
if (!ee) return EINA_TRUE; /* pass on event */
|
||||||
event_time = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
|
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
|
||||||
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y, event_time);
|
return EINA_TRUE; /* dont pass it on */
|
||||||
evas_event_feed_mouse_wheel(ee->evas, e->direction, e->wheel, event_time, NULL);
|
|
||||||
return EINA_FALSE; /* dont pass it on */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -224,12 +182,11 @@ _ecore_evas_fb_render(Ecore_Evas *ee)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_ecore_evas_fb_init(int w, int h)
|
_ecore_evas_fb_init(Ecore_Evas *ee, int w, int h)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Input_Device *device;
|
Ecore_Fb_Input_Device *device;
|
||||||
Ecore_Fb_Input_Device_Cap caps;
|
Ecore_Fb_Input_Device_Cap caps;
|
||||||
int mouse_handled = 0;
|
int mouse_handled = 0;
|
||||||
int keyboard_handled = 0;
|
|
||||||
|
|
||||||
DIR *input_dir;
|
DIR *input_dir;
|
||||||
struct dirent *input_entry;
|
struct dirent *input_entry;
|
||||||
|
@ -237,6 +194,8 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
_ecore_evas_init_count++;
|
_ecore_evas_init_count++;
|
||||||
if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
|
if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
|
||||||
|
|
||||||
|
ecore_event_evas_init();
|
||||||
|
|
||||||
/* register all input devices */
|
/* register all input devices */
|
||||||
input_dir = opendir("/dev/input/");
|
input_dir = opendir("/dev/input/");
|
||||||
if (!input_dir) return _ecore_evas_init_count;
|
if (!input_dir) return _ecore_evas_init_count;
|
||||||
|
@ -249,7 +208,7 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name);
|
snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name);
|
||||||
if (!(device = ecore_fb_input_device_open(device_path)))
|
if (!(device = ecore_fb_input_device_open(ee, device_path)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
caps = ecore_fb_input_device_cap_get(device);
|
caps = ecore_fb_input_device_cap_get(device);
|
||||||
|
@ -266,10 +225,10 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
|
ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
|
||||||
if (!mouse_handled)
|
if (!mouse_handled)
|
||||||
{
|
{
|
||||||
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
|
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
|
||||||
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
|
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
|
||||||
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
|
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
|
||||||
ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_WHEEL, _ecore_evas_event_mouse_wheel, NULL);
|
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _ecore_evas_event_mouse_wheel, NULL);
|
||||||
mouse_handled = 1;
|
mouse_handled = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,12 +237,6 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
{
|
{
|
||||||
ecore_fb_input_device_listen(device,1);
|
ecore_fb_input_device_listen(device,1);
|
||||||
ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
|
ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
|
||||||
if (!keyboard_handled)
|
|
||||||
{
|
|
||||||
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL);
|
|
||||||
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, _ecore_evas_event_key_up, NULL);
|
|
||||||
keyboard_handled = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir(input_dir);
|
closedir(input_dir);
|
||||||
|
@ -292,9 +245,9 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
{
|
{
|
||||||
if (ecore_fb_ts_init())
|
if (ecore_fb_ts_init())
|
||||||
{
|
{
|
||||||
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
|
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
|
||||||
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
|
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
|
||||||
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
|
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
|
||||||
mouse_handled = 1;
|
mouse_handled = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,6 +257,7 @@ _ecore_evas_fb_init(int w, int h)
|
||||||
static void
|
static void
|
||||||
_ecore_evas_fb_free(Ecore_Evas *ee)
|
_ecore_evas_fb_free(Ecore_Evas *ee)
|
||||||
{
|
{
|
||||||
|
ecore_evas_input_event_unregister(ee);
|
||||||
if (fb_ee == ee) fb_ee = NULL;
|
if (fb_ee == ee) fb_ee = NULL;
|
||||||
_ecore_evas_fb_shutdown();
|
_ecore_evas_fb_shutdown();
|
||||||
ecore_fb_shutdown();
|
ecore_fb_shutdown();
|
||||||
|
@ -406,7 +360,7 @@ _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize __UNUSED__)
|
||||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
||||||
else
|
else
|
||||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||||
_ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
|
_ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y);
|
||||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,12 +463,13 @@ _ecore_evas_fb_shutdown(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
if (ecore_evas_event_handlers[i])
|
if (ecore_evas_event_handlers[i])
|
||||||
ecore_event_handler_del(ecore_evas_event_handlers[i]);
|
ecore_event_handler_del(ecore_evas_event_handlers[i]);
|
||||||
}
|
}
|
||||||
ecore_fb_ts_shutdown();
|
ecore_fb_ts_shutdown();
|
||||||
|
ecore_event_evas_shutdown();
|
||||||
}
|
}
|
||||||
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
|
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
|
||||||
return _ecore_evas_init_count;
|
return _ecore_evas_init_count;
|
||||||
|
@ -602,7 +557,7 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
|
||||||
|
|
||||||
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
||||||
|
|
||||||
_ecore_evas_fb_init(w, h);
|
_ecore_evas_fb_init(ee, w, h);
|
||||||
|
|
||||||
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func;
|
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func;
|
||||||
|
|
||||||
|
@ -663,15 +618,8 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
|
||||||
ecore_evas_free(ee);
|
ecore_evas_free(ee);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
evas_key_modifier_add(ee->evas, "Shift");
|
|
||||||
evas_key_modifier_add(ee->evas, "Control");
|
ecore_evas_input_event_register(ee);
|
||||||
evas_key_modifier_add(ee->evas, "Alt");
|
|
||||||
evas_key_modifier_add(ee->evas, "Meta");
|
|
||||||
evas_key_modifier_add(ee->evas, "Hyper");
|
|
||||||
evas_key_modifier_add(ee->evas, "Super");
|
|
||||||
evas_key_lock_add(ee->evas, "Caps_Lock");
|
|
||||||
evas_key_lock_add(ee->evas, "Num_Lock");
|
|
||||||
evas_key_lock_add(ee->evas, "Scroll_Lock");
|
|
||||||
|
|
||||||
ee->engine.func->fn_render = _ecore_evas_fb_render;
|
ee->engine.func->fn_render = _ecore_evas_fb_render;
|
||||||
_ecore_evas_register(ee);
|
_ecore_evas_register(ee);
|
||||||
|
|
|
@ -65,101 +65,12 @@ enum _Ecore_Fb_Input_Device_Cap
|
||||||
*/
|
*/
|
||||||
typedef enum _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
|
typedef enum _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
|
||||||
|
|
||||||
EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
|
|
||||||
EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
|
|
||||||
EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
|
|
||||||
EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
|
|
||||||
EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
|
|
||||||
EAPI extern int ECORE_FB_EVENT_MOUSE_WHEEL; /**< FB Mouse Wheel event */
|
|
||||||
|
|
||||||
typedef struct _Ecore_Fb_Event_Key_Down Ecore_Fb_Event_Key_Down; /**< FB Key Down event */
|
|
||||||
typedef struct _Ecore_Fb_Event_Key_Up Ecore_Fb_Event_Key_Up; /**< FB Key Up event */
|
|
||||||
typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */
|
|
||||||
typedef struct _Ecore_Fb_Event_Mouse_Button_Up Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */
|
|
||||||
typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */
|
|
||||||
typedef struct _Ecore_Fb_Event_Mouse_Wheel Ecore_Fb_Event_Mouse_Wheel; /**< FB Mouse Wheel event */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Key_Down
|
|
||||||
* Framebuffer Key Down event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Key_Down
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
|
|
||||||
char *keyname; /**< The name of the key that was pressed */
|
|
||||||
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
|
||||||
char *key_compose; /**< The UTF-8 string conversion if any */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Key_Up
|
|
||||||
* Framebuffer Key Up event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Key_Up
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
|
|
||||||
char *keyname; /**< The name of the key that was released */
|
|
||||||
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
|
||||||
char *key_compose; /**< The UTF-8 string conversion if any */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Mouse_Button_Down
|
|
||||||
* Framebuffer Mouse Down event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Mouse_Button_Down
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
|
|
||||||
int button; /**< Mouse button that was pressed (1 - 32) */
|
|
||||||
int x; /**< Mouse co-ordinates when mouse button was pressed */
|
|
||||||
int y; /**< Mouse co-ordinates when mouse button was pressed */
|
|
||||||
int double_click : 1; /**< Set if click was a double click */
|
|
||||||
int triple_click : 1; /**< Set if click was a triple click */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Mouse_Button_Up
|
|
||||||
* Framebuffer Mouse Up event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Mouse_Button_Up
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
|
|
||||||
int button; /**< Mouse button that was released (1 - 32) */
|
|
||||||
int x; /**< Mouse co-ordinates when mouse button was raised */
|
|
||||||
int y; /**< Mouse co-ordinates when mouse button was raised */
|
|
||||||
int double_click : 1; /**< Set if click was a double click */
|
|
||||||
int triple_click : 1; /**< Set if click was a triple click */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Mouse_Move
|
|
||||||
* Framebuffer Mouse Move event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Mouse_Move
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
|
|
||||||
int x; /**< Mouse co-ordinates where the mouse cursor moved to */
|
|
||||||
int y; /**< Mouse co-ordinates where the mouse cursor moved to */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @struct _Ecore_Fb_Event_Mouse_Wheel
|
|
||||||
* Framebuffer Mouse Wheel event.
|
|
||||||
*/
|
|
||||||
struct _Ecore_Fb_Event_Mouse_Wheel
|
|
||||||
{
|
|
||||||
Ecore_Fb_Input_Device *dev;
|
|
||||||
int x,y;
|
|
||||||
int direction; /* 0 = vertical, 1 = horizontal */
|
|
||||||
int wheel; /* value 1 (left/up), -1 (right/down) */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ecore_fb_vt.c */
|
/* ecore_fb_vt.c */
|
||||||
EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
|
EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
|
||||||
EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
|
EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
|
||||||
|
|
||||||
/* ecore_fb_li.c */
|
/* ecore_fb_li.c */
|
||||||
EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
|
EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(void *window, const char *dev);
|
||||||
EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
|
EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
|
||||||
EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
|
EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
|
||||||
EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
|
EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
|
||||||
|
|
|
@ -3,6 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/lib/ecore \
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
-I$(top_builddir)/src/lib/ecore \
|
-I$(top_builddir)/src/lib/ecore \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_input \
|
||||||
@TSLIB_CFLAGS@ \
|
@TSLIB_CFLAGS@ \
|
||||||
@EINA_CFLAGS@
|
@EINA_CFLAGS@
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,6 @@
|
||||||
|
|
||||||
static void _ecore_fb_size_get(int *w, int *h);
|
static void _ecore_fb_size_get(int *w, int *h);
|
||||||
|
|
||||||
EAPI int ECORE_FB_EVENT_KEY_DOWN = 0;
|
|
||||||
EAPI int ECORE_FB_EVENT_KEY_UP = 0;
|
|
||||||
EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN = 0;
|
|
||||||
EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_UP = 0;
|
|
||||||
EAPI int ECORE_FB_EVENT_MOUSE_MOVE = 0;
|
|
||||||
EAPI int ECORE_FB_EVENT_MOUSE_WHEEL = 0;
|
|
||||||
|
|
||||||
static int _ecore_fb_init_count = 0;
|
static int _ecore_fb_init_count = 0;
|
||||||
static int _ecore_fb_console_w = 0;
|
static int _ecore_fb_console_w = 0;
|
||||||
static int _ecore_fb_console_h = 0;
|
static int _ecore_fb_console_h = 0;
|
||||||
|
@ -46,12 +39,6 @@ ecore_fb_init(const char *name __UNUSED__)
|
||||||
if (!ecore_fb_vt_init())
|
if (!ecore_fb_vt_init())
|
||||||
return --_ecore_fb_init_count;
|
return --_ecore_fb_init_count;
|
||||||
|
|
||||||
ECORE_FB_EVENT_KEY_DOWN = ecore_event_type_new();
|
|
||||||
ECORE_FB_EVENT_KEY_UP = ecore_event_type_new();
|
|
||||||
ECORE_FB_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
|
|
||||||
ECORE_FB_EVENT_MOUSE_BUTTON_UP = ecore_event_type_new();
|
|
||||||
ECORE_FB_EVENT_MOUSE_MOVE = ecore_event_type_new();
|
|
||||||
ECORE_FB_EVENT_MOUSE_WHEEL = ecore_event_type_new();
|
|
||||||
_ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
|
_ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
|
||||||
|
|
||||||
return _ecore_fb_init_count;
|
return _ecore_fb_init_count;
|
||||||
|
|
|
@ -35,30 +35,6 @@ test_bit(int bit, unsigned long *array)
|
||||||
else long_has_neither_32_nor_64_bits();
|
else long_has_neither_32_nor_64_bits();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_fb_li_event_free_key_down(void *data __UNUSED__, void *ev)
|
|
||||||
{
|
|
||||||
Ecore_Fb_Event_Key_Up *e;
|
|
||||||
|
|
||||||
e = ev;
|
|
||||||
free(e->keyname);
|
|
||||||
if (e->keysymbol) free(e->keysymbol);
|
|
||||||
if (e->key_compose) free(e->key_compose);
|
|
||||||
free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_fb_li_event_free_key_up(void *data __UNUSED__, void *ev)
|
|
||||||
{
|
|
||||||
Ecore_Fb_Event_Key_Up *e;
|
|
||||||
|
|
||||||
e = ev;
|
|
||||||
free(e->keyname);
|
|
||||||
if (e->keysymbol) free(e->keysymbol);
|
|
||||||
if (e->key_compose) free(e->key_compose);
|
|
||||||
free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *iev)
|
_ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *iev)
|
||||||
{
|
{
|
||||||
|
@ -67,38 +43,28 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
/* check for basic keyboard keys */
|
/* check for basic keyboard keys */
|
||||||
if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE))
|
if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE))
|
||||||
{
|
{
|
||||||
|
int offset = 0;
|
||||||
|
char *keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]);
|
||||||
/* check the key table */
|
/* check the key table */
|
||||||
if (iev->value)
|
if (iev->value)
|
||||||
{
|
{
|
||||||
int offset = 0;
|
|
||||||
Ecore_Fb_Event_Key_Down *ev;
|
|
||||||
|
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Key_Down));
|
|
||||||
if (dev->keyboard.shift) offset = 1;
|
|
||||||
else if (dev->keyboard.lock) offset = 2;
|
|
||||||
ev->keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]);
|
|
||||||
|
|
||||||
ev->keysymbol = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]);
|
|
||||||
ev->key_compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]);
|
|
||||||
ev->dev = dev;
|
|
||||||
ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, ev, _ecore_fb_li_event_free_key_down, NULL);
|
|
||||||
/* its a repeated key, dont increment */
|
/* its a repeated key, dont increment */
|
||||||
if (iev->value == 2)
|
if (iev->value == 2)
|
||||||
return;
|
return;
|
||||||
if (!strcmp(ev->keyname, "Control_L"))
|
if (!strcmp(keyname, "Control_L"))
|
||||||
dev->keyboard.ctrl++;
|
dev->keyboard.ctrl++;
|
||||||
else if (!strcmp(ev->keyname, "Control_R"))
|
else if (!strcmp(keyname, "Control_R"))
|
||||||
dev->keyboard.ctrl++;
|
dev->keyboard.ctrl++;
|
||||||
else if (!strcmp(ev->keyname, "Alt_L"))
|
else if (!strcmp(keyname, "Alt_L"))
|
||||||
dev->keyboard.alt++;
|
dev->keyboard.alt++;
|
||||||
else if (!strcmp(ev->keyname, "Alt_R"))
|
else if (!strcmp(keyname, "Alt_R"))
|
||||||
dev->keyboard.alt++;
|
dev->keyboard.alt++;
|
||||||
else if (!strcmp(ev->keyname, "Shift_L"))
|
else if (!strcmp(keyname, "Shift_L"))
|
||||||
dev->keyboard.shift++;
|
dev->keyboard.shift++;
|
||||||
else if (!strcmp(ev->keyname, "Shift_R"))
|
else if (!strcmp(keyname, "Shift_R"))
|
||||||
dev->keyboard.shift++;
|
dev->keyboard.shift++;
|
||||||
else if (!strcmp(ev->keyname, "Caps_Lock"))
|
else if (!strcmp(keyname, "Caps_Lock"))
|
||||||
dev->keyboard.lock++;
|
dev->keyboard.lock = !dev->keyboard.lock;
|
||||||
if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2;
|
if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2;
|
||||||
if (dev->keyboard.alt > 2) dev->keyboard.alt = 2;
|
if (dev->keyboard.alt > 2) dev->keyboard.alt = 2;
|
||||||
if (dev->keyboard.shift > 2) dev->keyboard.shift = 2;
|
if (dev->keyboard.shift > 2) dev->keyboard.shift = 2;
|
||||||
|
@ -106,85 +72,128 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int offset = 0;
|
if (!strcmp(keyname, "Control_L"))
|
||||||
Ecore_Fb_Event_Key_Up *ev;
|
|
||||||
|
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Key_Up));
|
|
||||||
if (dev->keyboard.shift) offset = 1;
|
|
||||||
else if (dev->keyboard.lock) offset = 2;
|
|
||||||
ev->keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]);
|
|
||||||
|
|
||||||
ev->keysymbol = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]);
|
|
||||||
ev->key_compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]);
|
|
||||||
ev->dev = dev;
|
|
||||||
ecore_event_add(ECORE_FB_EVENT_KEY_UP, ev, _ecore_fb_li_event_free_key_up, NULL);
|
|
||||||
if (!strcmp(ev->keyname, "Control_L"))
|
|
||||||
dev->keyboard.ctrl--;
|
dev->keyboard.ctrl--;
|
||||||
else if (!strcmp(ev->keyname, "Control_R"))
|
else if (!strcmp(keyname, "Control_R"))
|
||||||
dev->keyboard.ctrl--;
|
dev->keyboard.ctrl--;
|
||||||
else if (!strcmp(ev->keyname, "Alt_L"))
|
else if (!strcmp(keyname, "Alt_L"))
|
||||||
dev->keyboard.alt--;
|
dev->keyboard.alt--;
|
||||||
else if (!strcmp(ev->keyname, "Alt_R"))
|
else if (!strcmp(keyname, "Alt_R"))
|
||||||
dev->keyboard.alt--;
|
dev->keyboard.alt--;
|
||||||
else if (!strcmp(ev->keyname, "Shift_L"))
|
else if (!strcmp(keyname, "Shift_L"))
|
||||||
dev->keyboard.shift--;
|
dev->keyboard.shift--;
|
||||||
else if (!strcmp(ev->keyname, "Shift_R"))
|
else if (!strcmp(keyname, "Shift_R"))
|
||||||
dev->keyboard.shift--;
|
dev->keyboard.shift--;
|
||||||
else if (!strcmp(ev->keyname, "Caps_Lock"))
|
|
||||||
dev->keyboard.lock--;
|
|
||||||
if (dev->keyboard.ctrl < 0) dev->keyboard.ctrl = 0;
|
if (dev->keyboard.ctrl < 0) dev->keyboard.ctrl = 0;
|
||||||
if (dev->keyboard.alt < 0) dev->keyboard.alt = 0;
|
if (dev->keyboard.alt < 0) dev->keyboard.alt = 0;
|
||||||
if (dev->keyboard.shift < 0) dev->keyboard.shift = 0;
|
if (dev->keyboard.shift < 0) dev->keyboard.shift = 0;
|
||||||
if (dev->keyboard.lock < 0) dev->keyboard.lock = 0;
|
if (dev->keyboard.lock < 0) dev->keyboard.lock = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* sending ecore_input_evas events */
|
||||||
|
Ecore_Event_Key *e;
|
||||||
|
|
||||||
|
if (dev->keyboard.shift) offset = 1;
|
||||||
|
else if (dev->keyboard.lock) offset = 2;
|
||||||
|
|
||||||
|
char *key = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]);
|
||||||
|
char *compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]);
|
||||||
|
|
||||||
|
e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) +
|
||||||
|
strlen(keyname) + (compose ? strlen(compose) : 0) + 3);
|
||||||
|
e->keyname = (char *)(e + 1);
|
||||||
|
e->key = e->keyname + strlen(keyname) + 1;
|
||||||
|
e->compose = (compose) ? e->key + strlen(key) + 1 : NULL;
|
||||||
|
e->string = e->compose;
|
||||||
|
|
||||||
|
strcpy((char *)e->keyname, keyname);
|
||||||
|
strcpy((char *)e->key, key);
|
||||||
|
if (compose)
|
||||||
|
strcpy((char *)e->compose, compose);
|
||||||
|
|
||||||
|
e->modifiers = 0;
|
||||||
|
if (dev->keyboard.shift)
|
||||||
|
e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
|
||||||
|
|
||||||
|
e->timestamp = ecore_time_get();
|
||||||
|
e->window = (Ecore_Window)dev->window;
|
||||||
|
e->event_window = (Ecore_Window)dev->window;
|
||||||
|
e->root_window = (Ecore_Window)dev->window;
|
||||||
|
e->same_screen = 0;
|
||||||
|
|
||||||
|
if (iev->value)
|
||||||
|
ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
|
||||||
|
else
|
||||||
|
ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
/* check for mouse button events */
|
/* check for mouse button events */
|
||||||
else if ((iev->code >= BTN_MOUSE) && (iev->code < BTN_JOYSTICK))
|
else if ((iev->code >= BTN_MOUSE) && (iev->code < BTN_JOYSTICK))
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
|
Ecore_Event_Mouse_Button *e;
|
||||||
|
double current = ecore_time_get();
|
||||||
|
|
||||||
button = ((iev->code & 0x00F) + 1);
|
button = ((iev->code & 0x00F) + 1);
|
||||||
if (iev->value)
|
if (iev->value)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Button_Down *ev;
|
dev->mouse.did_double = EINA_FALSE;
|
||||||
double current;
|
dev->mouse.did_triple = EINA_FALSE;
|
||||||
|
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
|
if (((current - dev->mouse.prev) <= dev->mouse.threshold) &&
|
||||||
ev->dev = dev;
|
(button == dev->mouse.prev_button))
|
||||||
ev->button = button;
|
|
||||||
ev->x = dev->mouse.x;
|
|
||||||
ev->y = dev->mouse.y;
|
|
||||||
|
|
||||||
current = ecore_time_get();
|
|
||||||
if ((current - dev->mouse.prev) <= dev->mouse.threshold)
|
|
||||||
ev->double_click = 1;
|
|
||||||
if ((current - dev->mouse.last) <= (2 * dev->mouse.threshold))
|
|
||||||
{
|
{
|
||||||
ev->triple_click = 1;
|
dev->mouse.did_double = EINA_TRUE;
|
||||||
|
if (((current - dev->mouse.last) <= (2 * dev->mouse.threshold)) &&
|
||||||
|
(button == dev->mouse.last_button))
|
||||||
|
{
|
||||||
|
dev->mouse.did_triple = EINA_TRUE;
|
||||||
/* reset */
|
/* reset */
|
||||||
dev->mouse.prev = 0;
|
dev->mouse.prev = 0;
|
||||||
dev->mouse.last = 0;
|
dev->mouse.last = 0;
|
||||||
current = 0;
|
current = 0;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
|
||||||
/* update values */
|
|
||||||
dev->mouse.last = dev->mouse.prev;
|
dev->mouse.last = dev->mouse.prev;
|
||||||
dev->mouse.prev = current;
|
dev->mouse.prev = current;
|
||||||
|
dev->mouse.last_button = dev->mouse.prev_button;
|
||||||
|
dev->mouse.prev_button = button;
|
||||||
}
|
}
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, ev, NULL ,NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ecore_Fb_Event_Mouse_Button_Up *ev;
|
|
||||||
|
|
||||||
ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Button_Up));
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
|
||||||
ev->dev = dev;
|
if (!e)
|
||||||
ev->button = button;
|
return;
|
||||||
ev->x = dev->mouse.x;
|
|
||||||
ev->y = dev->mouse.y;
|
e->timestamp = current;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, ev, NULL ,NULL);
|
e->window = (Ecore_Window)dev->window;
|
||||||
}
|
e->event_window = (Ecore_Window)dev->window;
|
||||||
|
e->root_window = (Ecore_Window)dev->window;
|
||||||
|
e->same_screen = 0;
|
||||||
|
|
||||||
|
e->modifiers = 0;
|
||||||
|
if (dev->keyboard.shift)
|
||||||
|
e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
|
||||||
|
|
||||||
|
e->x = dev->mouse.x;
|
||||||
|
e->y = dev->mouse.y;
|
||||||
|
e->root.x = e->x;
|
||||||
|
e->root.y = e->y;
|
||||||
|
e->buttons = button;
|
||||||
|
|
||||||
|
if (dev->mouse.did_double)
|
||||||
|
e->double_click = 1;
|
||||||
|
if (dev->mouse.did_triple)
|
||||||
|
e->triple_click = 1;
|
||||||
|
|
||||||
|
if (iev->value)
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
|
||||||
|
else
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +207,7 @@ _ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
case REL_X:
|
case REL_X:
|
||||||
case REL_Y:
|
case REL_Y:
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Move *ev;
|
Ecore_Event_Mouse_Move *e;
|
||||||
if(iev->code == REL_X)
|
if(iev->code == REL_X)
|
||||||
{
|
{
|
||||||
dev->mouse.x += iev->value;
|
dev->mouse.x += iev->value;
|
||||||
|
@ -215,26 +224,64 @@ _ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
else if(dev->mouse.y < 0)
|
else if(dev->mouse.y < 0)
|
||||||
dev->mouse.y = 0;
|
dev->mouse.y = 0;
|
||||||
}
|
}
|
||||||
ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Move));
|
|
||||||
ev->x = dev->mouse.x;
|
|
||||||
ev->y = dev->mouse.y;
|
|
||||||
ev->dev = dev;
|
|
||||||
|
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE,ev,NULL,NULL);
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
|
||||||
|
if (!e)
|
||||||
|
return;
|
||||||
|
|
||||||
|
e->window = (Ecore_Window)dev->window;
|
||||||
|
e->event_window = (Ecore_Window)dev->window;
|
||||||
|
e->root_window = (Ecore_Window)dev->window;
|
||||||
|
e->same_screen = 0;
|
||||||
|
|
||||||
|
e->modifiers = 0;
|
||||||
|
if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
|
||||||
|
|
||||||
|
e->x = dev->mouse.x;
|
||||||
|
e->y = dev->mouse.y;
|
||||||
|
e->root.x = e->x;
|
||||||
|
e->root.y = e->y;
|
||||||
|
|
||||||
|
e->timestamp = ecore_time_get();
|
||||||
|
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case REL_WHEEL:
|
case REL_WHEEL:
|
||||||
case REL_HWHEEL:
|
case REL_HWHEEL:
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Wheel *ev;
|
Ecore_Event_Mouse_Wheel *e;
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Wheel));
|
|
||||||
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Wheel));
|
||||||
|
if (!e)
|
||||||
|
return;
|
||||||
|
|
||||||
|
e->x = dev->mouse.x;
|
||||||
|
e->y = dev->mouse.y;
|
||||||
|
if (iev->code == REL_HWHEEL) e->direction = 1;
|
||||||
|
e->z = iev->value;
|
||||||
|
e->root.x = dev->mouse.x;
|
||||||
|
e->root.y = dev->mouse.y;
|
||||||
|
|
||||||
|
e->window = (Ecore_Window)dev->window;
|
||||||
|
e->event_window = (Ecore_Window)dev->window;
|
||||||
|
e->root_window = (Ecore_Window)dev->window;
|
||||||
|
e->same_screen = 0;
|
||||||
|
|
||||||
|
e->modifiers = 0;
|
||||||
|
if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
|
||||||
|
|
||||||
|
e->timestamp = ecore_time_get();
|
||||||
|
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
|
||||||
|
|
||||||
ev->x = dev->mouse.x;
|
|
||||||
ev->y = dev->mouse.y;
|
|
||||||
if (iev->code == REL_HWHEEL) ev->direction = 1;
|
|
||||||
ev->wheel = iev->value;
|
|
||||||
ev->dev = dev;
|
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -260,7 +307,7 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
if (tmp < 0) dev->mouse.x = 0;
|
if (tmp < 0) dev->mouse.x = 0;
|
||||||
else if (tmp > dev->mouse.w) dev->mouse.x = dev->mouse.w;
|
else if (tmp > dev->mouse.w) dev->mouse.x = dev->mouse.w;
|
||||||
else dev->mouse.x = tmp;
|
else dev->mouse.x = tmp;
|
||||||
dev->mouse.event = ECORE_FB_EVENT_MOUSE_MOVE;
|
dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -273,7 +320,7 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
if (tmp < 0) dev->mouse.y = 0;
|
if (tmp < 0) dev->mouse.y = 0;
|
||||||
else if (tmp > dev->mouse.h) dev->mouse.y = dev->mouse.h;
|
else if (tmp > dev->mouse.h) dev->mouse.y = dev->mouse.h;
|
||||||
else dev->mouse.y = tmp;
|
else dev->mouse.y = tmp;
|
||||||
dev->mouse.event = ECORE_FB_EVENT_MOUSE_MOVE;
|
dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -281,13 +328,13 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
pressure = iev->value;
|
pressure = iev->value;
|
||||||
if ((pressure) && (!prev_pressure))
|
if ((pressure) && (!prev_pressure))
|
||||||
{
|
{
|
||||||
/* DOWN: mouse is down, but was not now */
|
/* DOWN: mouse is down, but was not before */
|
||||||
dev->mouse.event = ECORE_FB_EVENT_MOUSE_BUTTON_DOWN;
|
dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_DOWN;
|
||||||
}
|
}
|
||||||
else if ((!pressure) && (prev_pressure))
|
else if ((!pressure) && (prev_pressure))
|
||||||
{
|
{
|
||||||
/* UP: mouse was down, but is not now */
|
/* UP: mouse was down, but is not now */
|
||||||
dev->mouse.event = ECORE_FB_EVENT_MOUSE_BUTTON_UP;
|
dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_UP;
|
||||||
}
|
}
|
||||||
prev_pressure = pressure;
|
prev_pressure = pressure;
|
||||||
break;
|
break;
|
||||||
|
@ -299,32 +346,39 @@ _ecore_fb_li_device_event_syn(Ecore_Fb_Input_Device *dev, struct input_event *ie
|
||||||
{
|
{
|
||||||
if (!dev->listen) return;
|
if (!dev->listen) return;
|
||||||
|
|
||||||
if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_MOVE)
|
if (dev->mouse.event == ECORE_EVENT_MOUSE_MOVE)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Move *ev;
|
Ecore_Event_Mouse_Move *ev;
|
||||||
ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Move));
|
ev = calloc(1,sizeof(Ecore_Event_Mouse_Move));
|
||||||
ev->x = dev->mouse.x;
|
ev->x = dev->mouse.x;
|
||||||
ev->y = dev->mouse.y;
|
ev->y = dev->mouse.y;
|
||||||
ev->dev = dev;
|
ev->root.x = ev->x;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE, ev, NULL, NULL);
|
ev->root.y = ev->y;
|
||||||
|
ev->timestamp = ecore_time_get();
|
||||||
}
|
}
|
||||||
else if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_BUTTON_DOWN)
|
else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Button_Down *ev;
|
Ecore_Event_Mouse_Button *ev;
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
|
ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
|
||||||
ev->x = dev->mouse.x;
|
ev->x = dev->mouse.x;
|
||||||
ev->y = dev->mouse.y;
|
ev->y = dev->mouse.y;
|
||||||
ev->button = 1;
|
ev->root.x = ev->x;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
|
ev->root.y = ev->y;
|
||||||
|
ev->buttons = 1;
|
||||||
|
ev->timestamp = ecore_time_get();
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
else if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_BUTTON_UP)
|
else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_UP)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Event_Mouse_Button_Up *ev;
|
Ecore_Event_Mouse_Button *ev;
|
||||||
ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Up));
|
ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
|
||||||
ev->x = dev->mouse.x;
|
ev->x = dev->mouse.x;
|
||||||
ev->y = dev->mouse.y;
|
ev->y = dev->mouse.y;
|
||||||
ev->button = 1;
|
ev->root.x = ev->x;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
|
ev->root.y = ev->y;
|
||||||
|
ev->buttons = 1;
|
||||||
|
ev->timestamp = ecore_time_get();
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +393,6 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh __UNUSED__)
|
||||||
dev = (Ecore_Fb_Input_Device*)data;
|
dev = (Ecore_Fb_Input_Device*)data;
|
||||||
/* read up to 64 events at once */
|
/* read up to 64 events at once */
|
||||||
len = read(dev->fd, &ev, sizeof(ev));
|
len = read(dev->fd, &ev, sizeof(ev));
|
||||||
// printf("[ecore_fb_li_device:fd_callback] received %d data\n", len);
|
|
||||||
for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
|
for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
|
||||||
{
|
{
|
||||||
switch(ev[i].type)
|
switch(ev[i].type)
|
||||||
|
@ -408,7 +461,7 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen)
|
||||||
* object for it, or returns @c NULL on failure.
|
* object for it, or returns @c NULL on failure.
|
||||||
*/
|
*/
|
||||||
EAPI Ecore_Fb_Input_Device *
|
EAPI Ecore_Fb_Input_Device *
|
||||||
ecore_fb_input_device_open(const char *dev)
|
ecore_fb_input_device_open(void *ee, const char *dev)
|
||||||
{
|
{
|
||||||
Ecore_Fb_Input_Device *device;
|
Ecore_Fb_Input_Device *device;
|
||||||
unsigned long event_type_bitmask[EV_CNT / 32 + 1];
|
unsigned long event_type_bitmask[EV_CNT / 32 + 1];
|
||||||
|
@ -471,6 +524,8 @@ ecore_fb_input_device_open(const char *dev)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device->window = ee;
|
||||||
_ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
|
_ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
|
||||||
return device;
|
return device;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "Ecore.h"
|
#include "Ecore.h"
|
||||||
#include "ecore_private.h"
|
#include "ecore_private.h"
|
||||||
|
#include "Ecore_Input.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -49,10 +50,14 @@ struct _Ecore_Fb_Input_Device
|
||||||
double last;
|
double last;
|
||||||
double prev;
|
double prev;
|
||||||
double threshold;
|
double threshold;
|
||||||
|
Eina_Bool did_double;
|
||||||
|
Eina_Bool did_triple;
|
||||||
/* absolute axis */
|
/* absolute axis */
|
||||||
int min_w, min_h;
|
int min_w, min_h;
|
||||||
double rel_w, rel_h;
|
double rel_w, rel_h;
|
||||||
int event;
|
int event;
|
||||||
|
int prev_button;
|
||||||
|
int last_button;
|
||||||
} mouse;
|
} mouse;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -61,6 +66,7 @@ struct _Ecore_Fb_Input_Device
|
||||||
int alt;
|
int alt;
|
||||||
int lock;
|
int lock;
|
||||||
} keyboard;
|
} keyboard;
|
||||||
|
void *window;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ecore_fb_ts.c */
|
/* ecore_fb_ts.c */
|
||||||
|
|
|
@ -251,24 +251,26 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
|
||||||
if ((pressure) || (prev_pressure))
|
if ((pressure) || (prev_pressure))
|
||||||
{
|
{
|
||||||
/* MOVE: mouse is down and was */
|
/* MOVE: mouse is down and was */
|
||||||
Ecore_Fb_Event_Mouse_Move *e;
|
Ecore_Event_Mouse_Move *e;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Move));
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
|
||||||
if (!e) goto retry;
|
if (!e) goto retry;
|
||||||
e->x = x;
|
e->x = x;
|
||||||
e->y = y;
|
e->y = y;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE, e, NULL, NULL);
|
e->root.x = x;
|
||||||
|
e->root.y = y;
|
||||||
|
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
if ((pressure) && (!prev_pressure))
|
if ((pressure) && (!prev_pressure))
|
||||||
{
|
{
|
||||||
/* DOWN: mouse is down, but was not now */
|
/* DOWN: mouse is down, but was not now */
|
||||||
Ecore_Fb_Event_Mouse_Button_Down *e;
|
Ecore_Event_Mouse_Button *e;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
|
||||||
if (!e) goto retry;
|
if (!e) goto retry;
|
||||||
e->x = x;
|
e->x = x;
|
||||||
e->y = y;
|
e->y = y;
|
||||||
e->button = 1;
|
e->buttons = 1;
|
||||||
if ((t - last_time) <= _ecore_fb_double_click_time)
|
if ((t - last_time) <= _ecore_fb_double_click_time)
|
||||||
{
|
{
|
||||||
e->double_click = 1;
|
e->double_click = 1;
|
||||||
|
@ -288,23 +290,23 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
|
||||||
{
|
{
|
||||||
did_triple = 0;
|
did_triple = 0;
|
||||||
}
|
}
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
else if ((!pressure) && (prev_pressure))
|
else if ((!pressure) && (prev_pressure))
|
||||||
{
|
{
|
||||||
/* UP: mouse was down, but is not now */
|
/* UP: mouse was down, but is not now */
|
||||||
Ecore_Fb_Event_Mouse_Button_Up *e;
|
Ecore_Event_Mouse_Button *e;
|
||||||
|
|
||||||
e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Up));
|
e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
|
||||||
if (!e) goto retry;
|
if (!e) goto retry;
|
||||||
e->x = prev_x;
|
e->x = prev_x;
|
||||||
e->y = prev_y;
|
e->y = prev_y;
|
||||||
e->button = 1;
|
e->buttons = 1;
|
||||||
if (did_double)
|
if (did_double)
|
||||||
e->double_click = 1;
|
e->double_click = 1;
|
||||||
if (did_triple)
|
if (did_triple)
|
||||||
e->triple_click = 1;
|
e->triple_click = 1;
|
||||||
ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
|
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
if (did_triple)
|
if (did_triple)
|
||||||
{
|
{
|
||||||
|
|
|
@ -300,9 +300,9 @@ _ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, v
|
||||||
|
|
||||||
filter_data = loop_data;
|
filter_data = loop_data;
|
||||||
if (!filter_data) return EINA_TRUE;
|
if (!filter_data) return EINA_TRUE;
|
||||||
if (type == ECORE_FB_EVENT_MOUSE_MOVE)
|
if (type == ECORE_EVENT_MOUSE_MOVE)
|
||||||
{
|
{
|
||||||
if ((filter_data->last_event_type) == ECORE_FB_EVENT_MOUSE_MOVE)
|
if ((filter_data->last_event_type) == ECORE_EVENT_MOUSE_MOVE)
|
||||||
{
|
{
|
||||||
filter_data->last_event_type = type;
|
filter_data->last_event_type = type;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue