return ret;
}
+
+E_API Eina_Bool
+e_input_device_is_virtual(E_Input_Device *dev, const char *device_path, Ecore_Device_Class clas)
+{
+ Eina_Bool ret = EINA_FALSE;
+ Ecore_Device *ecore_dev = NULL;
+ E_Device *e_dev = NULL;
+ Ecore_Device_Subclass subclas = ECORE_DEVICE_SUBCLASS_NONE;
+
+ if (!e_input_thread_mode_get())
+ {
+ ecore_dev = e_input_evdev_get_ecore_device(device_path, clas);
+ if (!ecore_dev)
+ {
+ ERR("Failed to find input device: %s", device_path);
+ return EINA_FALSE;
+ }
+ subclas = ecore_device_subclass_get(ecore_dev);
+ }
+ else
+ {
+ e_dev = e_input_evdev_get_e_device(device_path, clas);
+ if (!e_dev)
+ {
+ ERR("Failed to find input device: %s", device_path);
+ return EINA_FALSE;
+ }
+ subclas = e_device_subclass_get(e_dev);
+ }
+ if (clas == ECORE_DEVICE_CLASS_MOUSE)
+ {
+ if (subclas == ECORE_DEVICE_SUBCLASS_VIRTUAL_MOUSE)
+ ret = EINA_TRUE;
+ }
+ else if (clas == ECORE_DEVICE_CLASS_KEYBOARD)
+ {
+ if (subclas == ECORE_DEVICE_SUBCLASS_VIRTUAL_REMOCON)
+ ret = EINA_TRUE;
+ }
+ INF("device(%s) device_is_virtual %s (clas:%d, subclas:%d)",
+ device_path, ret ? "True" : "False", clas, subclas);
+
+ return ret;
+}
_e_input_ecore_device_event(dev, edev->seat ? edev->seat->name : NULL, EINA_TRUE);
- INF("[Add Device] device name(%s), identifier(%s), class(%s)", e_device_name_get(e_dev), edev->path, _e_input_ecore_device_class_to_string(clas));
+ INF("[Add Device] device name(%s), identifier(%s), class(%s) subclas(%d)", e_device_name_get(e_dev), edev->path, _e_input_ecore_device_class_to_string(clas), subclas);
return EINA_TRUE;
}
E_API Eina_Bool e_input_device_mouse_accel_speed_set(E_Input_Device *dev, double speed);
E_API Eina_Bool e_input_device_mouse_accel_enable_set(const char *device_name, Eina_Bool enable);
E_API Eina_Bool e_input_device_keyboard_has_key(E_Input_Device *dev, const char *device_path, uint32_t code);
+E_API Eina_Bool e_input_device_is_virtual(E_Input_Device *dev, const char *device_path, Ecore_Device_Class clas);
E_API unsigned int e_input_touch_max_count_get();