ev->event_window = e_comp->ee_win;
ev->root_window = e_comp->ee_win;
ev->same_screen = 1;
- ev->dev = _get_device();
+ ev->dev = _get_device(ECORE_DEVICE_CLASS_TOUCH);
ev->multi.radius = 1;
ev->multi.radius_x = 1;
ev->event_window = e_comp->ee_win;
ev->root_window = e_comp->ee_win;
ev->same_screen = 1;
- ev->dev = _get_device();
+ ev->dev = _get_device(ECORE_DEVICE_CLASS_TOUCH);
ev->multi.radius = 1;
ev->multi.radius_x = 1;
ev->event_window = e_comp->ee_win;
ev->root_window = e_comp->ee_win;
ev->same_screen = 1;
- ev->dev = _get_device();
+ ev->dev = _get_device(ECORE_DEVICE_CLASS_TOUCH);
ev->multi.radius = 1;
ev->multi.radius_x = 1;
ev->event_window = e_comp->ee_win;
ev->root_window = e_comp->ee_win;
ev->same_screen = 1;
- ev->dev = _get_device();
+ ev->dev = _get_device(ECORE_DEVICE_CLASS_KEYBOARD);
ev->keycode = ked->keycode;
return ev;
ev->root.x = CONST_COORDINATE;
ev->root.y = CONST_COORDINATE;
- ev->dev = _get_device();
+ Ecore_Device *dev = _get_device(ECORE_DEVICE_CLASS_NONE);
+ if (!dev)
+ dev = _get_device(ECORE_DEVICE_CLASS_MOUSE);
+
+ ev->dev = dev;
return ev;
}
}
}
-//FIXME: return proper device according to required type
-Ecore_Device * _get_device()
+Ecore_Device * _get_device(Ecore_Device_Class klass)
{
- Ecore_Device *ret = NULL;
const Eina_List *dev_list = ecore_device_list();
if (!dev_list) return NULL;
const char *identifier = ecore_device_identifier_get(dev);
if (!identifier) continue;
- //FIXME: ECORE_DEVICE_CLASS_NONE is used on emulator
- if (ecore_device_class_get(dev) == ECORE_DEVICE_CLASS_MOUSE || ecore_device_class_get(dev) == ECORE_DEVICE_CLASS_NONE)
- ret = dev;
+ if (ecore_device_class_get(dev) == klass)
+ return dev;
}
- return ret;
+ return NULL;
}
typedef struct _keycode_map_entry{
int _get_window_angle(void);
void _transform_coordinates(int *ax, int *ay);
-Ecore_Device * _get_device();
+Ecore_Device * _get_device(Ecore_Device_Class klass);
int _get_keycode_from_string(const char *key);
#endif