}
E_API Eina_Bool
-e_client_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, unsigned int time)
+e_client_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time)
+e_client_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time)
+e_client_touch_update_send(E_Client *ec, int idx, int x, int y, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, unsigned int time)
+e_client_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time)
+e_client_mouse_move_send(E_Client *ec, int x, int y, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, unsigned int time)
+e_client_mouse_wheel_send(E_Client *ec, int direction, int z, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time)
+e_client_mouse_in_send(E_Client *ec, int x, int y, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
}
E_API Eina_Bool
-e_client_mouse_out_send(E_Client *ec, Ecore_Device *dev, unsigned int time)
+e_client_mouse_out_send(E_Client *ec, Evas_Device *dev, unsigned int time)
{
Eina_Bool res;
E_API E_Pixmap *e_client_pixmap_change(E_Client *ec, E_Pixmap *newcp);
E_API void e_client_window_role_set(E_Client *ec, const char *role);
-E_API Eina_Bool e_client_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, unsigned int time);
-E_API Eina_Bool e_client_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
-E_API Eina_Bool e_client_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
+E_API Eina_Bool e_client_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Evas_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
+E_API Eina_Bool e_client_touch_update_send(E_Client *ec, int idx, int x, int y, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
E_API Eina_Bool e_client_touch_cancel_send(E_Client *ec);
-E_API Eina_Bool e_client_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, unsigned int time);
-E_API Eina_Bool e_client_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time);
-E_API Eina_Bool e_client_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, unsigned int time);
-E_API Eina_Bool e_client_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time);
-E_API Eina_Bool e_client_mouse_out_send(E_Client *ec, Ecore_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Evas_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_mouse_move_send(E_Client *ec, int x, int y, Evas_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_mouse_wheel_send(E_Client *ec, int direction, int z, Evas_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_mouse_in_send(E_Client *ec, int x, int y, Evas_Device *dev, unsigned int time);
+E_API Eina_Bool e_client_mouse_out_send(E_Client *ec, Evas_Device *dev, unsigned int time);
E_API Eina_Bool e_client_video_client_has(E_Client *ec);
E_API Eina_Bool e_client_normal_client_has(E_Client *ec);
typedef struct _E_Comp_Wl_Key_Data
{
uint32_t key;
- Ecore_Device *dev;
+ Evas_Device *dev;
} E_Comp_Wl_Key_Data;
static Eina_List *handlers = NULL;
}
static E_Comp_Wl_Input_Device *
-_e_comp_wl_device_last_device_get(Ecore_Device_Class dev_class)
+_e_comp_wl_device_last_device_get(Evas_Device_Class dev_class)
{
switch (dev_class)
{
- case ECORE_DEVICE_CLASS_MOUSE:
+ case EVAS_DEVICE_CLASS_MOUSE:
return e_comp_wl->input_device_manager.last_device_ptr;
- case ECORE_DEVICE_CLASS_KEYBOARD:
+ case EVAS_DEVICE_CLASS_KEYBOARD:
return e_comp_wl->input_device_manager.last_device_kbd;
- case ECORE_DEVICE_CLASS_TOUCH:
+ case EVAS_DEVICE_CLASS_TOUCH:
return e_comp_wl->input_device_manager.last_device_touch;
default:
return NULL;;
}
static void
-_e_comp_wl_device_last_device_set(Ecore_Device_Class dev_class, E_Comp_Wl_Input_Device *device)
+_e_comp_wl_device_last_device_set(Evas_Device_Class dev_class, E_Comp_Wl_Input_Device *device)
{
switch (dev_class)
{
- case ECORE_DEVICE_CLASS_MOUSE:
+ case EVAS_DEVICE_CLASS_MOUSE:
e_comp_wl->input_device_manager.last_device_ptr = device;
break;
- case ECORE_DEVICE_CLASS_KEYBOARD:
+ case EVAS_DEVICE_CLASS_KEYBOARD:
e_comp_wl->input_device_manager.last_device_kbd = device;
break;
- case ECORE_DEVICE_CLASS_TOUCH:
+ case EVAS_DEVICE_CLASS_TOUCH:
e_comp_wl->input_device_manager.last_device_touch = device;
break;
default:
}
static E_Comp_Wl_Input_Device *
-_e_comp_wl_device_client_last_device_get(E_Client *ec, Ecore_Device_Class dev_class)
+_e_comp_wl_device_client_last_device_get(E_Client *ec, Evas_Device_Class dev_class)
{
switch (dev_class)
{
- case ECORE_DEVICE_CLASS_MOUSE:
+ case EVAS_DEVICE_CLASS_MOUSE:
return ec->comp_data->last_device_ptr;
- case ECORE_DEVICE_CLASS_KEYBOARD:
+ case EVAS_DEVICE_CLASS_KEYBOARD:
return ec->comp_data->last_device_kbd;
- case ECORE_DEVICE_CLASS_TOUCH:
+ case EVAS_DEVICE_CLASS_TOUCH:
return ec->comp_data->last_device_touch;
default:
return NULL;;
}
static void
-_e_comp_wl_device_client_last_device_set(E_Client *ec, Ecore_Device_Class dev_class, E_Comp_Wl_Input_Device *device)
+_e_comp_wl_device_client_last_device_set(E_Client *ec, Evas_Device_Class dev_class, E_Comp_Wl_Input_Device *device)
{
switch (dev_class)
{
- case ECORE_DEVICE_CLASS_MOUSE:
+ case EVAS_DEVICE_CLASS_MOUSE:
ec->comp_data->last_device_ptr = device;
break;
- case ECORE_DEVICE_CLASS_KEYBOARD:
+ case EVAS_DEVICE_CLASS_KEYBOARD:
ec->comp_data->last_device_kbd = device;
break;
- case ECORE_DEVICE_CLASS_TOUCH:
+ case EVAS_DEVICE_CLASS_TOUCH:
ec->comp_data->last_device_touch = device;
break;
default:
E_Comp_Wl_Input_Device *last_device, *ec_last_device, *input_dev;
struct wl_resource *dev_res;
const char *dev_name;
- Ecore_Device_Class dev_class;
+ Evas_Device_Class dev_class;
struct wl_client *wc;
uint32_t serial;
Eina_List *l, *ll;
if ((ec->ignored) && (!ec->remote_surface.provider)) return;
if (!ec->comp_data || !ec->comp_data->surface) return;
- dev_class = (Ecore_Device_Class)evas_device_class_get(dev);
+ dev_class = (Evas_Device_Class)evas_device_class_get(dev);
dev_name = evas_device_description_get(dev);
last_device = _e_comp_wl_device_last_device_get(dev_class);
ec_last_device = _e_comp_wl_device_client_last_device_get(ec, dev_class);
}
static void
-_e_comp_wl_device_send_last_event_device(E_Client *ec, Ecore_Device_Class dev_class, uint32_t timestamp)
+_e_comp_wl_device_send_last_event_device(E_Client *ec, Evas_Device_Class dev_class, uint32_t timestamp)
{
E_Comp_Wl_Input_Device *last_device;
struct wl_resource *dev_res;
}
static void
-_e_comp_wl_send_event_device(struct wl_client *wc, uint32_t timestamp, Ecore_Device *dev, uint32_t serial)
+_e_comp_wl_send_event_device(struct wl_client *wc, uint32_t timestamp, Evas_Device *dev, uint32_t serial)
{
E_Comp_Wl_Input_Device *input_dev;
struct wl_resource *dev_res;
EINA_SAFETY_ON_NULL_RETURN(dev);
- dev_name = ecore_device_identifier_get(dev);
+ dev_name = evas_device_description_get(dev);
EINA_LIST_FOREACH(e_comp_wl->input_device_manager.device_list, l, input_dev)
{
if (!eina_streq(input_dev->identifier, dev_name)) continue;
- _e_comp_wl_device_last_device_set(ecore_device_class_get(dev), input_dev);
+ _e_comp_wl_device_last_device_set(evas_device_class_get(dev), input_dev);
EINA_LIST_FOREACH(input_dev->resources, ll, dev_res)
{
EINA_LIST_FOREACH(e_comp_wl->input_device_manager.device_list, l, input_dev)
{
- if ((strcmp(input_dev->identifier, dev_name)) || (input_dev->clas != (Ecore_Device_Class)dev_class)) continue;
+ if ((strcmp(input_dev->identifier, dev_name)) || (input_dev->clas != (Evas_Device_Class)dev_class)) continue;
EINA_LIST_FOREACH(input_dev->resources, ll, dev_res)
{
if (wl_resource_get_client(dev_res) != wc) continue;
if (!e_comp_wl_input_pointer_check(res)) continue;
if (wl_resource_get_client(res) != wc) continue;
- _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
+ _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, ev->timestamp);
wl_pointer_send_enter(res, serial, ec->comp_data->surface,
wl_fixed_from_int(ev->canvas.x - ec->client.x),
if (wl_resource_get_client(res) != wc) continue;
if (ec->pointer_enter_sent == EINA_FALSE) continue;
- _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
+ _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, ev->timestamp);
wl_pointer_send_leave(res, serial, ec->comp_data->surface);
}
Eina_List *l;
uint32_t serial, keycode;
struct wl_client *wc;
- Ecore_Device *last_dev;
+ Evas_Device *last_dev;
E_Comp_Config *comp_conf = NULL;
keycode = (ev->keycode - 8);
}
EINTERN Eina_Bool
-e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, uint32_t time)
+e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Evas_Device *dev, uint32_t time)
{
struct wl_resource *res;
struct wl_client *wc;
{
if (wl_resource_get_client(res) != wc) continue;
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_KEYBOARD, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_KEYBOARD, time);
if (comp_conf && comp_conf->input_log_enable)
INF("[Server] Key %s (time: %d)\n", (state ? "Down" : "Up"), time);
}
EINTERN Eina_Bool
-e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
+e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
{
struct wl_client *wc;
uint32_t serial;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
- if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
+ if (!dev) device = _e_comp_wl_device_last_device_get(EVAS_DEVICE_CLASS_TOUCH);
wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
if (dev)
{
_e_comp_wl_send_event_device(wc, time, dev, serial);
- _e_comp_wl_device_handle_axes(ecore_device_identifier_get(dev), ECORE_DEVICE_CLASS_TOUCH, ec, idx, radius_x, radius_y, pressure, angle);
+ _e_comp_wl_device_handle_axes(evas_device_description_get(dev), EVAS_DEVICE_CLASS_TOUCH, ec, idx, radius_x, radius_y, pressure, angle);
}
else if (device)
{
- _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_TOUCH, time);
+ _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_TOUCH, time);
_e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
}
}
EINTERN Eina_Bool
-e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
+e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time)
{
E_Comp_Wl_Input_Device *device;
uint32_t serial;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data->surface, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
- if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
+ if (!dev) device = _e_comp_wl_device_last_device_get(EVAS_DEVICE_CLASS_TOUCH);
wc = wl_resource_get_client(ec->comp_data->surface);
if (!time) time = (uint32_t)(ecore_time_get() * 1000);
if (dev)
{
_e_comp_wl_send_event_device(wc, time, dev, serial);
- _e_comp_wl_device_handle_axes(ecore_device_identifier_get(dev), ECORE_DEVICE_CLASS_TOUCH, ec, idx, radius_x, radius_y, pressure, angle);
+ _e_comp_wl_device_handle_axes(evas_device_description_get(dev), EVAS_DEVICE_CLASS_TOUCH, ec, idx, radius_x, radius_y, pressure, angle);
}
else if (device)
{
- _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_TOUCH, time);
+ _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_TOUCH, time);
_e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
}
}
EINTERN Eina_Bool
-e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, uint32_t time)
+e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Evas_Device *dev, uint32_t time)
{
uint32_t serial;
struct wl_client *wc;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, time);
if (pressed)
e_comp_wl_evas_handle_mouse_button(ec, time, buttons,
}
EINTERN Eina_Bool
-e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time)
+e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Evas_Device *dev, uint32_t time)
{
uint32_t serial;
struct wl_client *wc;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, time);
x = x + ec->client.x;
y = y + ec->client.y;
}
EINTERN Eina_Bool
-e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, uint32_t time)
+e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Evas_Device *dev, uint32_t time)
{
uint32_t serial;
struct wl_client *wc;
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, time);
_e_comp_wl_mouse_wheel_send(ec, direction, z, time);
}
EINTERN Eina_Bool
-e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time)
+e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Evas_Device *dev, uint32_t time)
{
uint32_t serial;
struct wl_client *wc;
if (wl_resource_get_client(res) != wc) continue;
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, time);
wl_pointer_send_enter(res, serial, ec->comp_data->surface,
wl_fixed_from_int(x),
}
EINTERN Eina_Bool
-e_comp_wl_mouse_out_send(E_Client *ec, Ecore_Device *dev, uint32_t time)
+e_comp_wl_mouse_out_send(E_Client *ec, Evas_Device *dev, uint32_t time)
{
uint32_t serial;
struct wl_client *wc;
if (wl_resource_get_client(res) != wc) continue;
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
- else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
+ else _e_comp_wl_device_send_last_event_device(ec, EVAS_DEVICE_CLASS_MOUSE, time);
wl_pointer_send_leave(res, serial, ec->comp_data->surface);
}
Eina_List *resources;
const char *name;
const char *identifier;
- Ecore_Device_Class clas;
- Ecore_Device_Subclass subclas;
+ Evas_Device_Class clas;
+ Evas_Device_Subclass subclas;
};
struct _E_Comp_Wl_Input_Device_Multi
E_API void e_comp_wl_input_cursor_timer_enable_set(Eina_Bool enabled);
-EINTERN Eina_Bool e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Evas_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Evas_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
EINTERN Eina_Bool e_comp_wl_touch_cancel_send(E_Client *ec);
-EINTERN Eina_Bool e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time);
-EINTERN Eina_Bool e_comp_wl_mouse_out_send(E_Client *ec, Ecore_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Evas_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Evas_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Evas_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Evas_Device *dev, uint32_t time);
+EINTERN Eina_Bool e_comp_wl_mouse_out_send(E_Client *ec, Evas_Device *dev, uint32_t time);
EINTERN void e_comp_wl_mouse_in_renew(E_Client *ec, int buttons, int x, int y, void *data, Evas_Modifier *modifiers, Evas_Lock *locks, unsigned int timestamp, Evas_Event_Flags event_flags, Evas_Device *dev, Evas_Object *event_src);
EINTERN void e_comp_wl_mouse_out_renew(E_Client *ec, int buttons, int x, int y, void *data, Evas_Modifier *modifiers, Evas_Lock *locks, unsigned int timestamp, Evas_Event_Flags event_flags, Evas_Device *dev, Evas_Object *event_src);
static void _remote_surface_ignore_output_transform_send(E_Comp_Wl_Remote_Common *common);
static void _remote_source_save_start(E_Comp_Wl_Remote_Source *source);
-static Ecore_Device *
+static Evas_Device *
_device_get_by_identifier(const char *identifier)
{
- Ecore_Device *dev = NULL;
+ Evas_Device *dev = NULL;
const Eina_List *devices, *l;
- devices = ecore_device_list();
+ devices = evas_device_list();
EINA_LIST_FOREACH(devices, l, dev)
{
- if (!e_util_strcmp(identifier, ecore_device_identifier_get(dev)))
+ if (!e_util_strcmp(identifier, evas_device_description_get(dev)))
return dev;
}
E_Comp_Wl_Remote_Surface *remote_surface;
E_Client *ec;
- Ecore_Device *edev = NULL;
- Ecore_Device_Class eclas = ECORE_DEVICE_CLASS_NONE;
+ Evas_Device *edev = NULL;
+ Evas_Device_Class eclas = EVAS_DEVICE_CLASS_NONE;
double eradx, erady, epressure, eangle;
remote_surface = wl_resource_get_user_data(resource);
/* identify class */
if (clas == TIZEN_INPUT_DEVICE_CLAS_MOUSE)
- eclas = ECORE_DEVICE_CLASS_MOUSE;
+ eclas = EVAS_DEVICE_CLASS_MOUSE;
else if (clas == TIZEN_INPUT_DEVICE_CLAS_TOUCHSCREEN)
- eclas = ECORE_DEVICE_CLASS_TOUCH;
+ eclas = EVAS_DEVICE_CLASS_TOUCH;
else
{
ERR("Not supported device clas(%d) subclas(%d) identifier(%s)",
edev = _device_get_by_identifier(identifier);
if (edev)
{
- eclas = ecore_device_class_get(edev);
+ eclas = evas_device_class_get(edev);
}
/* fixed to */
epressure = wl_fixed_to_double(pressure);
eangle = wl_fixed_to_double(angle);
- if (eclas == ECORE_DEVICE_CLASS_MOUSE)
+ if (eclas == EVAS_DEVICE_CLASS_MOUSE)
{
switch (event_type)
{
break;
}
}
- else if (eclas == ECORE_DEVICE_CLASS_TOUCH)
+ else if (eclas == EVAS_DEVICE_CLASS_TOUCH)
{
switch (event_type)
{
E_Comp_Wl_Remote_Surface *remote_surface;
E_Client *ec;
- Ecore_Device *edev = NULL;
+ Evas_Device *edev = NULL;
remote_surface = wl_resource_get_user_data(resource);
EINA_SAFETY_ON_NULL_RETURN(remote_surface);
E_Comp_Wl_Remote_Surface *remote_surface;
E_Client *ec;
- Ecore_Device *edev = NULL;
- Ecore_Device_Class eclas;
+ Evas_Device *edev = NULL;
+ Evas_Device_Class eclas;
double eradx, erady, epressure, eangle;
remote_surface = wl_resource_get_user_data(resource);
/* identify class */
if (clas == TIZEN_INPUT_DEVICE_CLAS_TOUCHSCREEN)
- eclas = ECORE_DEVICE_CLASS_TOUCH;
+ eclas = EVAS_DEVICE_CLASS_TOUCH;
else
{
ERR("Not supported device clas(%d) subclas(%d identifier(%s)",
edev = _device_get_by_identifier(identifier);
if (edev)
{
- eclas = ecore_device_class_get(edev);
+ eclas = evas_device_class_get(edev);
}
/* fixed to */
epressure = wl_fixed_to_double(pressure);
eangle = wl_fixed_to_double(angle);
- if (eclas == ECORE_DEVICE_CLASS_TOUCH)
+ if (eclas == EVAS_DEVICE_CLASS_TOUCH)
{
switch (event_type)
{
E_Comp_Wl_Remote_Surface *remote_surface;
E_Client *ec;
- Ecore_Device *edev = NULL;
- Ecore_Device_Class eclas;
+ Evas_Device *edev = NULL;
+ Evas_Device_Class eclas;
remote_surface = wl_resource_get_user_data(resource);
EINA_SAFETY_ON_NULL_RETURN(remote_surface);
/* identify class */
if (clas == TIZEN_INPUT_DEVICE_CLAS_KEYBOARD)
- eclas = ECORE_DEVICE_CLASS_KEYBOARD;
+ eclas = EVAS_DEVICE_CLASS_KEYBOARD;
else
{
ERR("Not supported device class(%d) subclass(%d identifier(%s)",
edev = _device_get_by_identifier(identifier);
if (edev)
{
- eclas = ecore_device_class_get(edev);
+ eclas = evas_device_class_get(edev);
}
- if (eclas == ECORE_DEVICE_CLASS_KEYBOARD)
+ if (eclas == EVAS_DEVICE_CLASS_KEYBOARD)
{
switch (event_type)
{
{
i++;
printf("%3d %50s %20s ", i, dev->name, dev->identifier);
- if (dev->clas == ECORE_DEVICE_CLASS_MOUSE) printf("Mouse | ");
- else if (dev->clas == ECORE_DEVICE_CLASS_KEYBOARD) printf("Keyboard | ");
- else if (dev->clas == ECORE_DEVICE_CLASS_TOUCH) printf("Touch | ");
+ if (dev->clas == EVAS_DEVICE_CLASS_MOUSE) printf("Mouse | ");
+ else if (dev->clas == EVAS_DEVICE_CLASS_KEYBOARD) printf("Keyboard | ");
+ else if (dev->clas == EVAS_DEVICE_CLASS_TOUCH) printf("Touch | ");
printf("(0x%x)\n", dev->clas);
}
e_comp_wl_input_seat_caps_set(seat_caps);
}
+ e_input->ee = ee;
e_input->dev = dev;
E_LIST_HANDLER_APPEND(e_input->handlers, E_EVENT_SCREEN_CHANGE, _e_input_cb_screen_change, NULL);
return _e_input_init_count;
}
+
+EINTERN E_Input *
+e_input_get()
+{
+ if (e_input) return e_input;
+ return NULL;
+}
+
+EINTERN Ecore_Evas *
+e_input_get_ecore_evas(E_Input *ei)
+{
+ if (ei) return ei->ee;
+ return NULL;
+}
const char *name; /* descriptive device name */
const char *sysname; /* system name of the input device */
const char *seatname; /* logical name of the seat */
+ const char *identifier; /* unique identifier (e.g. path) */
+
E_Input_Seat_Capabilities caps; /* capabilities on a device */
+ Evas_Device_Class clas; /* class of a device */
+ Evas_Device_Subclass subclas; /* subclass of a device */
};
struct _E_Input_Event_Input_Device_Del
const char *name; /* descriptive device name */
const char *sysname; /* system name of the input device */
const char *seatname; /* logical name of the seat */
+ const char *identifier; /* unique identifier (e.g. path) */
+
E_Input_Seat_Capabilities caps; /* capabilities on a device */
+ Evas_Device_Class clas; /* class of a device */
+ Evas_Device_Subclass subclas; /* subclass of a device */
};
typedef struct _E_Input_Device E_Input_Device;
struct _E_Input
{
Ecore_Window window;
+ Ecore_Evas *ee;
E_Input_Device *dev;
const char *input_base_dir;
Eina_List *handlers;
EINTERN int e_input_shutdown(void);
EINTERN const char *e_input_base_dir_get(void);
EINTERN Eina_Bool e_input_thread_enabled_get(void);
+EINTERN E_Input *e_input_get(void);
+EINTERN Evas *e_input_get_evas(E_Input *ei);
EINTERN E_Input_Device *e_input_device_open(void);
EINTERN Eina_Bool e_input_device_close(E_Input_Device *dev);
E_API const char *e_input_evdev_name_get(E_Input_Evdev *evdev);
E_API Eina_List *e_input_seat_evdev_list_get(E_Input_Seat *seat);
E_API int e_input_evdev_wheel_click_angle_get(E_Input_Evdev *dev);
-E_API Ecore_Device *e_input_evdev_get_ecore_device(const char *path, Ecore_Device_Class clas);
+E_API Evas_Device *e_input_evdev_get_evas_device(const char *path, Evas_Device_Class clas);
#endif
#endif
return code;
}
-E_API Ecore_Device *
-e_input_evdev_get_ecore_device(const char *path, Ecore_Device_Class clas)
+E_API Evas_Device *
+e_input_evdev_get_evas_device(const char *path, Evas_Device_Class clas)
{
const Eina_List *dev_list = NULL;
const Eina_List *l;
- Ecore_Device *dev = NULL;
+ Evas_Device *dev = NULL;
const char *identifier;
if (!path) return NULL;
- dev_list = ecore_device_list();
+ dev_list = evas_device_list();
if (!dev_list) return NULL;
EINA_LIST_FOREACH(dev_list, l, dev)
{
if (!dev) continue;
- identifier = ecore_device_identifier_get(dev);
+ identifier = evas_device_description_get(dev);
if (!identifier) continue;
- if ((ecore_device_class_get(dev) == clas) && !(strcmp(identifier, path)))
+ if ((evas_device_class_get(dev) == clas) && !(strcmp(identifier, path)))
return dev;
}
return NULL;
return;
}
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_KEYBOARD);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
timestamp = libinput_event_keyboard_get_time(event);
code = libinput_event_keyboard_get_key(event);
code = _device_remapped_key_get(edev, code) + 8;
_device_modifiers_update(edev);
e->modifiers = edev->xkb.modifiers;
- e->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_KEYBOARD);
+ e->dev = edev->evas_dev;
if (state)
ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
if (!(input = edev->seat->input)) return;
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_MOUSE);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
if (edev->seat->ptr.ix < edev->mouse.minx)
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
- ev->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_MOUSE);
+ ev->dev = edev->evas_dev;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
}
return;
}
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_MOUSE);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button))))
{
return;
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
- ev->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_MOUSE);
+ ev->dev = edev->evas_dev;
if (state)
{
return;
}
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_MOUSE);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel))))
{
return;
ev->y = edev->seat->ptr.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;
- ev->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_MOUSE);
+ ev->dev = edev->evas_dev;
axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
if (libinput_event_pointer_has_axis(event, axis))
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_TOUCH);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
timestamp = libinput_event_touch_get_time(event);
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
- ev->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_TOUCH);
+ ev->dev = edev->evas_dev;
if (state == ECORE_EVENT_MOUSE_BUTTON_DOWN)
{
if (!edev) return;
if (!(input = edev->seat->input)) return;
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_TOUCH);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ return;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
ev->window = (Ecore_Window)input->dev->window;
ev->multi.y = ev->y;
ev->multi.root.x = ev->x;
ev->multi.root.y = ev->y;
- ev->dev = e_input_evdev_get_ecore_device(edev->path, ECORE_DEVICE_CLASS_TOUCH);
+ ev->dev = edev->evas_dev;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
}
if (!(edev = libinput_device_get_user_data(device))) goto end;
if (!(input = edev->seat->input)) goto end;
+
+ if (!edev->evas_dev)
+ edev->evas_dev = e_input_evdev_get_evas_device(edev->path, EVAS_DEVICE_CLASS_MOUSE);
+
+ if (!edev->evas_dev)
+ {
+ ERR("Failed to get source evas device from event !\n");
+ goto end;
+ }
+
if (!(ev = calloc(1, sizeof(Ecore_Event_Axis_Update))))goto end;
ev->window = (Ecore_Window)input->dev->window;
ev->naxis = 1;
}
ev->axis = axis;
+ ev->dev = edev->evas_dev;
ecore_event_add(ECORE_EVENT_AXIS_UPDATE, ev, _e_input_aux_data_event_free, NULL);
if (edev->xkb.keymap) xkb_map_unref(edev->xkb.keymap);
}
+ if (edev->evas_dev) evas_device_del(edev->evas_device);
if (edev->path) eina_stringshare_del(edev->path);
if (edev->device) libinput_device_unref(edev->device);
if (edev->key_remap_hash) eina_hash_free(edev->key_remap_hash);
_seat_create(E_Input_Backend *input, const char *seat)
{
E_Input_Seat *s;
+ Evas *evs = NULL;
+ E_Input *ei = NULL;
+ Ecore_Evas *ee = NULL;
+ Evas_Device *evas_dev = NULL;
+
+ ei = e_input_get();
+ if (!ei) return NULL;
+
+ ee = e_input_get_ecore_evas(ei);
+ if (!ee) return NULL;
+
+ evs = ecore_evas_get(ee);
+ if (!evs) return NULL;
+
+ /* create an evas device of a seat */
+ evas_dev = evas_device_add_full(evs, "Enlightenment seat", s->name, NULL, NULL,
+ EVAS_DEVICE_CLASS_SEAT, EVAS_DEVICE_SUBCLASS_NONE);
+ if (!evas_dev)
+ {
+ ERR("Failed to create an evas device for a seat !\n");
+ return NULL;
+ }
/* try to allocate space for new seat */
if (!(s = calloc(1, sizeof(E_Input_Seat))))
- return NULL;
+ {
+ evas_device_del(evas_dev);
+ return NULL;
+ }
s->input = input;
s->name = eina_stringshare_add(seat);
+ s->evas_dev = evas_dev;
/* add this new seat to list */
input->dev->seats = eina_list_append(input->dev->seats, s);
eina_stringshare_del(e->name);
eina_stringshare_del(e->sysname);
eina_stringshare_del(e->seatname);
+ eina_stringshare_del(e->identifier);
free(e);
}
eina_stringshare_del(e->name);
eina_stringshare_del(e->sysname);
eina_stringshare_del(e->seatname);
+ eina_stringshare_del(e->identifier);
free(e);
}
free(e);
}
-static Ecore_Device_Class
-_e_input_seat_cap_to_ecore_device_class(unsigned int cap)
+static Evas_Device_Class
+_e_input_seat_cap_to_evas_device_class(unsigned int cap)
{
switch(cap)
{
case E_INPUT_SEAT_POINTER:
- return ECORE_DEVICE_CLASS_MOUSE;
+ return EVAS_DEVICE_CLASS_MOUSE;
case E_INPUT_SEAT_KEYBOARD:
- return ECORE_DEVICE_CLASS_KEYBOARD;
+ return EVAS_DEVICE_CLASS_KEYBOARD;
case E_INPUT_SEAT_TOUCH:
- return ECORE_DEVICE_CLASS_TOUCH;
+ return EVAS_DEVICE_CLASS_TOUCH;
default:
- return ECORE_DEVICE_CLASS_NONE;
+ return EVAS_DEVICE_CLASS_NONE;
}
- return ECORE_DEVICE_CLASS_NONE;
-}
-
-void
-_e_input_send_device_info(unsigned int window, E_Input_Evdev *edev, Ecore_Device_Class clas, Ecore_Device_Subclass subclas, Eina_Bool flag)
-{
- Ecore_Event_Device_Info *e;
-
- if (!(e = calloc(1, sizeof(Ecore_Event_Device_Info)))) return;
-
- e->name = eina_stringshare_add(libinput_device_get_name(edev->device));
- e->identifier = eina_stringshare_add(edev->path);
- e->seatname = eina_stringshare_add(edev->seat->name);
- e->clas = clas;
- e->subclas = subclas;
- e->window = window;
-
- if (flag)
- ecore_event_add(ECORE_EVENT_DEVICE_ADD, e, _ecore_event_device_info_free, NULL);
- else
- ecore_event_add(ECORE_EVENT_DEVICE_DEL, e, _ecore_event_device_info_free, NULL);
+ return EVAS_DEVICE_CLASS_NONE;
}
static Eina_Bool
-_e_input_add_ecore_device(E_Input_Evdev *edev, Ecore_Device_Class clas)
+_e_input_add_evas_device(E_Input_Evdev *edev, Evas_Device_Class clas)
{
const Eina_List *dev_list = NULL;
const Eina_List *l;
- Ecore_Device *dev = NULL;
+ Evas_Device *dev = NULL;
const char *identifier;
- if (!edev->path) return EINA_FALSE;
+ Ecore_Evas *ee = NULL;
+ E_Input *ei = NULL;
+ Evas *evs = NULL;
- dev_list = ecore_device_list();
+ if (!edev || !edev->path) return EINA_FALSE;
+
+ dev_list = evas_device_list();
if (dev_list)
{
EINA_LIST_FOREACH(dev_list, l, dev)
{
if (!dev) continue;
- identifier = ecore_device_identifier_get(dev);
+ identifier = evas_device_description_get(dev);
if (!identifier) continue;
- if ((ecore_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
+ if ((evas_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
return EINA_FALSE;
}
}
- if(!(dev = ecore_device_add())) return EINA_FALSE;
+ ei = e_input_get();
+ if (!ei) return EINA_FALSE;
+
+ ee = e_input_get_ecore_evas(ei);
+ if (!ee) return EINA_FALSE;
+
+ evs = ecore_evas_get(ee);
+ if (!evs) return EINA_FALSE;
+
+ dev = evas_device_add_full(evs,libinput_device_get_name(edev->device),
+ edev->path, edev->seat->evas_dev , NULL, clas, EVAS_DEVICE_SUBCLASS_NONE)
+ if (!dev)
+ {
+ edev->evas_dev = NULL;
+ return EINA_FALSE;
+ }
+
+ edev->evas_dev = dev;
- ecore_device_name_set(dev, libinput_device_get_name(edev->device));
- ecore_device_description_set(dev, libinput_device_get_name(edev->device));
- ecore_device_identifier_set(dev, edev->path);
- ecore_device_class_set(dev, clas);
return EINA_TRUE;
}
static Eina_Bool
-_e_input_remove_ecore_device(E_Input_Evdev *edev, Ecore_Device_Class clas)
+_e_input_remove_evas_device(E_Input_Evdev *edev, Evas_Device_Class clas)
{
const Eina_List *dev_list = NULL;
const Eina_List *l;
- Ecore_Device *dev = NULL;
+ Evas_Device *dev = NULL;
const char *identifier;
if (!edev->path) return EINA_FALSE;
- dev_list = ecore_device_list();
+ dev_list = evas_device_list();
if (!dev_list) return EINA_FALSE;
EINA_LIST_FOREACH(dev_list, l, dev)
{
if (!dev) continue;
- identifier = ecore_device_identifier_get(dev);
+ identifier = evas_device_description_get(dev);
if (!identifier) continue;
- if ((ecore_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
+ if ((evas_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
{
- ecore_device_del(dev);
+ evas_device_del(dev);
+ edev->evas_dev = NULL;
return EINA_TRUE;
}
}
return EINA_FALSE;
}
-void
-_e_input_device_add(unsigned int window, E_Input_Evdev *edev)
+Eina_Bool
+_e_input_device_add(E_Input_Evdev *edev)
{
Eina_Bool ret = EINA_FALSE;
- Ecore_Device_Class clas;
+ Evas_Device_Class clas;
if (edev->caps & E_INPUT_SEAT_POINTER)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
- ret = _e_input_add_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 1);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_POINTER);
+ ret = _e_input_add_evas_device(edev, clas);
}
if (edev->caps & E_INPUT_SEAT_KEYBOARD)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_KEYBOARD);
- ret = _e_input_add_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 1);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_KEYBOARD);
+ ret = _e_input_add_evas_device(edev, clas);
}
if (edev->caps & E_INPUT_SEAT_TOUCH)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_TOUCH);
- ret = _e_input_add_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 1);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_TOUCH);
+ ret = _e_input_add_evas_device(edev, clas);
}
+
+ return ret;
}
void
-_e_input_device_remove(unsigned int window, E_Input_Evdev *edev)
+_e_input_device_remove(E_Input_Evdev *edev)
{
Eina_Bool ret = EINA_FALSE;
- Ecore_Device_Class clas;
+ Evas_Device_Class clas;
if (edev->caps & E_INPUT_SEAT_POINTER)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
- ret = _e_input_remove_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 0);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_POINTER);
+ _e_input_remove_evas_device(edev, clas);
}
if (edev->caps & E_INPUT_SEAT_KEYBOARD)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_KEYBOARD);
- ret = _e_input_remove_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 0);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_KEYBOARD);
+ _e_input_remove_evas_device(edev, clas);
}
if (edev->caps & E_INPUT_SEAT_TOUCH)
{
- clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_TOUCH);
- ret = _e_input_remove_ecore_device(edev, clas);
- if (ret) _e_input_send_device_info(window, edev, clas, ECORE_DEVICE_SUBCLASS_NONE, 0);
+ clas = _e_input_seat_cap_to_evas_device_class(E_INPUT_SEAT_TOUCH);
+ _e_input_remove_evas_device(edev, clas);
}
}
return;
}
+ if (EINA_FALSE == _e_input_device_add(edev))
+ {
+ ERR("Failed to create evas device !\n");
+ return;
+ }
+
ev->name = eina_stringshare_add(libinput_device_get_name(device));
ev->sysname = eina_stringshare_add(edev->path);
ev->seatname = eina_stringshare_add(edev->seat->name);
ev->caps = edev->caps;
+ ev->clas = evas_device_class_get(edev->evas_dev);
+ ev->identifier = eina_stringshare_add(edev->path);
+ ev->subclas = evas_device_subclass_get(edev->evas_dev);
ecore_event_add(E_INPUT_EVENT_INPUT_DEVICE_ADD,
ev,
_e_input_event_input_device_add_free,
NULL);
-
- if (input->dev->window != -1)
- _e_input_device_add(input->dev->window, edev);
}
static void
ev->sysname = eina_stringshare_add(edev->path);
ev->seatname = eina_stringshare_add(edev->seat->name);
ev->caps = edev->caps;
+ ev->clas = evas_device_class_get(edev->evas_dev);
+ ev->identifier = eina_stringshare_add(edev->path);
+ ev->subclas = evas_device_subclass_get(edev->evas_dev);
ecore_event_add(E_INPUT_EVENT_INPUT_DEVICE_DEL,
ev,
_e_input_event_input_device_del_free,
NULL);
- if (input->dev->window != -1)
- _e_input_device_remove(input->dev->window, edev);
+ _e_input_device_remove(edev);
/* remove this evdev from the seat's list of devices */
edev->seat->devices = eina_list_remove(edev->seat->devices, edev);
E_Input_Backend *input;
Eina_List *devices;
struct libinput_seat *seat;
+ Evas_Device *evas_dev;
struct
{
const char *path;
int fd;
+ Evas_Device *evas_dev;
int mt_slot;