3 typedef struct _E_Input E_Input;
5 E_API extern int E_INPUT_EVENT_SEAT_ADD;
6 E_API extern int E_EVENT_INPUT_ENABLED;
7 E_API extern int E_EVENT_INPUT_DISABLED;
14 #define E_INPUT_TYPE (int)0xE0b0beaf
16 #define E_INPUT_REQUEST_SERVER ((void *)0x1)
18 #include <xkbcommon/xkbcommon.h>
20 typedef enum _E_Input_Seat_Capabilities
22 E_INPUT_SEAT_POINTER = (1 << 0),
23 E_INPUT_SEAT_KEYBOARD = (1 << 1),
24 E_INPUT_SEAT_TOUCH = (1 << 2),
25 } E_Input_Seat_Capabilities;
27 typedef enum _E_Input_Libinput_Backend
29 E_INPUT_LIBINPUT_BACKEND_UDEV = 1,
30 E_INPUT_LIBINPUT_BACKEND_PATH
31 } E_Input_Libinput_Backend;
33 typedef struct _E_Input_Device E_Input_Device;
34 typedef struct _E_Input_Backend E_Input_Backend;
35 typedef struct _E_Input_Evdev E_Input_Evdev;
36 typedef struct _E_Input_Seat E_Input_Seat;
37 typedef struct _E_Input_Coord E_Input_Coord;
44 const char *input_base_dir;
47 Eina_Bool use_thread : 1;
48 unsigned int touch_max_count;
49 unsigned int touch_device_count;
52 struct _E_Input_Device
60 struct xkb_context *xkb_ctx;
62 Eina_Bool left_handed : 1;
66 unsigned int server_blocked;
69 EINTERN int e_input_init(Ecore_Evas *ee);
70 EINTERN int e_input_shutdown(void);
71 EINTERN const char *e_input_base_dir_get(void);
72 EINTERN Eina_Bool e_input_thread_enabled_get(void);
73 EINTERN E_Input *e_input_get(void);
74 EINTERN Ecore_Evas *e_input_ecore_evas_get(E_Input *ei);
76 EINTERN E_Input_Device *e_input_device_open(void);
77 EINTERN Eina_Bool e_input_device_close(E_Input_Device *dev);
78 EINTERN void e_input_device_keyboard_cached_context_set(struct xkb_context *ctx);
79 EINTERN void e_input_device_keyboard_cached_keymap_set(struct xkb_keymap *map);
80 EINTERN Eina_Bool e_input_device_input_backend_create(E_Input_Device *dev, E_Input_Libinput_Backend backend);
81 EINTERN Eina_Bool e_input_device_input_create_libinput_udev(E_Input_Device *dev);
82 EINTERN Eina_Bool e_input_device_input_create_libinput_path(E_Input_Device *dev);
83 EINTERN void e_input_device_window_set(E_Input_Device *dev, Ecore_Window window);
84 EINTERN void e_input_device_pointer_xy_get(E_Input_Device *dev, int *x, int *y);
85 EINTERN Eina_Bool e_input_device_pointer_left_handed_set(E_Input_Device *dev, Eina_Bool left_handed);
86 EINTERN Eina_Bool e_input_device_pointer_rotation_set(E_Input_Device *dev, int rotation);
87 EINTERN Eina_Bool e_input_device_touch_rotation_set(E_Input_Device *dev, unsigned int rotation);
88 EINTERN void e_input_device_rotation_set(E_Input_Device *dev, unsigned int rotation);
89 EINTERN Eina_Bool e_input_device_touch_transformation_set(E_Input_Device *dev, int offset_x, int offset_y, int w, int h);
91 EINTERN Eina_Bool e_input_enable_input(E_Input_Backend *input);
92 EINTERN void e_input_disable_input(E_Input_Backend *input);
94 EINTERN void e_input_evdev_axis_size_set(E_Input_Evdev *edev, int w, int h);
95 EINTERN const char *e_input_evdev_sysname_get(E_Input_Evdev *evdev);
96 EINTERN Eina_Bool e_input_evdev_key_remap_enable(E_Input_Evdev *edev, Eina_Bool enable);
97 EINTERN Eina_Bool e_input_evdev_key_remap_set(E_Input_Evdev *edev, int *from_keys, int *to_keys, int num);
98 EINTERN Eina_Bool e_input_evdev_touch_calibration_set(E_Input_Evdev *edev, float matrix[6]);
99 EINTERN Eina_Bool e_input_evdev_mouse_accel_speed_set(E_Input_Evdev *edev, double speed);
100 EINTERN Eina_Bool e_input_evdev_mouse_accel_enable(E_Input_Evdev *edev, Eina_Bool enable);
101 EINTERN unsigned int e_input_evdev_touch_pressed_get(E_Input_Evdev *edev);
103 E_API const Eina_List *e_input_devices_get(void);
104 E_API Eina_Bool e_input_device_pointer_warp(E_Input_Device *dev, int x, int y);
105 E_API Eina_Bool e_input_device_mouse_accel_speed_set(E_Input_Device *dev, double speed);
107 E_API const char *e_input_evdev_name_get(E_Input_Evdev *evdev);
108 E_API Eina_List *e_input_seat_evdev_list_get(E_Input_Seat *seat);
109 E_API int e_input_evdev_wheel_click_angle_get(E_Input_Evdev *dev);
110 E_API Ecore_Device *e_input_evdev_get_ecore_device(const char *path, Ecore_Device_Class clas);
112 E_API unsigned int e_input_device_touch_pressed_get(E_Input_Device *dev);
113 E_API Eina_Bool e_input_device_keyboard_remap_set(E_Input_Device *dev, int *from_keys, int *to_keys, int num);
115 E_API unsigned int e_input_touch_max_count_get();
116 E_API void e_input_touch_max_count_set(unsigned int max_count);
118 EINTERN Eina_Bool e_input_device_block(E_Input_Device *dev, unsigned int type, void *client);
119 EINTERN Eina_Bool e_input_device_unblock(E_Input_Device *dev, void *client);
120 EINTERN Eina_Bool e_input_device_output_name_set(E_Input_Device *dev, const char *input, const char *output);
121 EINTERN const char *e_input_device_output_name_get(E_Input_Device *dev, const char *input);
123 EINTERN Eina_Bool e_input_device_seat_name_set(E_Input_Device *dev, const char *input, const char *seat_name);