2 #include "e_devicemgr_intern.h"
3 #include "e_input_intern.h"
4 #include "e_input_private.h"
5 #include "e_input_event_intern.h"
6 #include "e_keyrouter_intern.h"
7 #include "e_comp_wl_intern.h"
11 static gboolean input_dispatch(GSource *source, GSourceFunc callback, gpointer user_data);
12 static gboolean input_thread_prepare(GSource *source, gint *time);
14 static E_Input_Event_Source *g_input_event_source = NULL;
15 static GList *_key_event_list = NULL;
17 GSourceFuncs input_event_funcs = {
18 .prepare = input_thread_prepare,
20 .dispatch = input_dispatch,
31 _e_input_ecore_device_class_to_string(Ecore_Device_Class clas)
35 case ECORE_DEVICE_CLASS_NONE:
38 case ECORE_DEVICE_CLASS_SEAT:
41 case ECORE_DEVICE_CLASS_KEYBOARD:
44 case ECORE_DEVICE_CLASS_MOUSE:
47 case ECORE_DEVICE_CLASS_TOUCH:
50 case ECORE_DEVICE_CLASS_PEN:
53 case ECORE_DEVICE_CLASS_WAND:
56 case ECORE_DEVICE_CLASS_GAMEPAD:
64 static Ecore_Device_Class
65 _e_input_seat_cap_to_ecore_device_class(unsigned int cap)
69 case E_INPUT_SEAT_POINTER:
70 return ECORE_DEVICE_CLASS_MOUSE;
71 case E_INPUT_SEAT_KEYBOARD:
72 return ECORE_DEVICE_CLASS_KEYBOARD;
73 case E_INPUT_SEAT_TOUCH:
74 return ECORE_DEVICE_CLASS_TOUCH;
76 return ECORE_DEVICE_CLASS_NONE;
78 return ECORE_DEVICE_CLASS_NONE;
82 _e_input_ecore_device_info_free(void *data EINA_UNUSED, void *ev)
84 Ecore_Event_Device_Info *e;
87 eina_stringshare_del(e->name);
88 eina_stringshare_del(e->identifier);
89 eina_stringshare_del(e->seatname);
95 _e_input_ecore_device_event(Ecore_Device *dev, const char* seat_name, Eina_Bool flag)
97 Ecore_Event_Device_Info *e;
99 const char *name, *identifier;
101 ecore_thread_main_loop_begin();
103 if (!(name = ecore_device_name_get(dev))) goto end;
104 if (!(identifier = ecore_device_identifier_get(dev))) goto end;
106 if (!(e = calloc(1, sizeof(Ecore_Event_Device_Info)))) goto end;
108 e_input = e_input_get();
110 e->window = e_input?e_input->window:(Ecore_Window)0;
111 e->name = eina_stringshare_add(name);
112 e->identifier = eina_stringshare_add(identifier);
113 if (seat_name && strlen(seat_name))
114 e->seatname = eina_stringshare_add(seat_name);
116 e->seatname = eina_stringshare_add(name);
117 e->clas = ecore_device_class_get(dev);
118 e->subclas = ecore_device_subclass_get(dev);
121 ecore_event_add(ECORE_EVENT_DEVICE_ADD, e, _e_input_ecore_device_info_free, NULL);
123 ecore_event_add(ECORE_EVENT_DEVICE_DEL, e, _e_input_ecore_device_info_free, NULL);
126 ecore_thread_main_loop_end();
129 static E_Input_Seat *
130 _seat_create(E_Input_Backend *input, const char *seat)
133 Ecore_Device *ecore_dev = NULL;
134 E_Device *e_dev = NULL;
136 ecore_thread_main_loop_begin();
138 /* create an evas device of a seat */
139 ecore_dev = ecore_device_add();
142 ERR("Failed to create an ecore device for a seat !\n");
143 ecore_thread_main_loop_end();
147 ecore_device_name_set(ecore_dev, seat);
148 ecore_device_identifier_set(ecore_dev, "Enlightenment seat");
149 ecore_device_class_set(ecore_dev, ECORE_DEVICE_CLASS_SEAT);
150 ecore_device_subclass_set(ecore_dev, ECORE_DEVICE_SUBCLASS_NONE);
152 /* create an e device of a seat */
153 e_dev = e_device_new();
156 ERR("Failed to create an ecore device for a seat !\n");
157 ecore_thread_main_loop_end();
161 e_device_name_set(e_dev, seat);
162 e_device_identifier_set(e_dev, "Enlightenment seat");
163 e_device_class_set(e_dev, ECORE_DEVICE_CLASS_SEAT);
164 e_device_subclass_set(e_dev, ECORE_DEVICE_SUBCLASS_NONE);
166 /* try to allocate space for new seat */
167 if (!(s = calloc(1, sizeof(E_Input_Seat))))
169 ecore_device_del(ecore_dev);
170 ecore_thread_main_loop_end();
175 s->name = eina_stringshare_add(seat);
176 s->ecore_dev = ecore_dev;
179 /* add this new seat to list */
180 input->dev->seats = eina_list_append(input->dev->seats, s);
183 ecore_event_add(E_INPUT_EVENT_SEAT_ADD, NULL, NULL, NULL);
184 ecore_thread_main_loop_end();
186 _e_input_ecore_device_event(ecore_dev, seat, EINA_TRUE);
191 static E_Input_Seat *
192 _seat_get(E_Input_Backend *input, const char *seat)
197 /* search for this name in existing seats */
198 EINA_LIST_FOREACH(input->dev->seats, l, s)
199 if (!strcmp(s->name, seat))
202 return _seat_create(input, seat);
206 _e_input_add_ecore_device(E_Input_Evdev *edev, Ecore_Device_Class clas)
208 const Eina_List *dev_list = NULL;
210 Ecore_Device *dev = NULL;
211 E_Device *e_dev = NULL;
212 const char *identifier;
214 if (!edev || !edev->path) return EINA_FALSE;
216 dev_list = ecore_device_list();
219 EINA_LIST_FOREACH(dev_list, l, dev)
222 identifier = ecore_device_identifier_get(dev);
223 if (!identifier) continue;
224 if ((ecore_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
226 ERR("Found same device in device list");
232 // create ecore device info
233 dev = ecore_device_add();
236 ERR("Failed to create ecore device");
237 edev->ecore_dev = NULL;
241 ecore_device_name_set(dev, libinput_device_get_name(edev->device));
242 ecore_device_identifier_set(dev, edev->path);
243 ecore_device_class_set(dev, clas);
244 ecore_device_subclass_set(dev, ECORE_DEVICE_SUBCLASS_NONE);
246 if (!edev->ecore_dev)
248 if (!edev->ecore_dev_list || (eina_list_count(edev->ecore_dev_list) == 0))
250 /* 1st Ecore_Device is added */
251 edev->ecore_dev = ecore_device_ref(dev);
255 /* 3rd or more Ecore_Device is added */
256 edev->ecore_dev_list = eina_list_append(edev->ecore_dev_list, ecore_device_ref(dev));
261 /* 2nd Ecore_Device is added */
262 edev->ecore_dev_list = eina_list_append(edev->ecore_dev_list, edev->ecore_dev);
263 edev->ecore_dev = NULL;
265 edev->ecore_dev_list = eina_list_append(edev->ecore_dev_list, ecore_device_ref(dev));
268 const GList *device_list = e_device_list_get();
269 const gchar *device_identifier;
270 for (GList *list = g_list_first((GList *)device_list); list; list = list->next)
272 E_Device *device = (E_Device *)list->data;
273 if (!device) continue;
274 device_identifier = e_device_identifier_get(device);
275 if (!device_identifier) continue;
277 if ((e_device_class_get(device) == clas) && (!strcmp(device_identifier, edev->path)))
286 // create E_Device info
287 e_dev = e_device_new();
290 ERR("Failed to add e device");
296 e_device_name_set(e_dev, libinput_device_get_name(edev->device));
297 e_device_identifier_set(e_dev, edev->path);
298 e_device_class_set(e_dev, clas);
299 e_device_subclass_set(e_dev, ECORE_DEVICE_SUBCLASS_NONE);
303 if (!edev->e_dev_list || (g_list_length(edev->e_dev_list) == 0))
305 /* 1st Ecore_Device is added */
306 edev->e_dev = g_object_ref(e_dev);
310 /* 3rd or more Ecore_Device is added */
311 edev->e_dev_list = g_list_append(edev->e_dev_list, g_object_ref(e_dev));
316 /* 2nd Ecore_Device is added */
317 edev->e_dev_list = g_list_append(edev->e_dev_list, edev->e_dev);
320 edev->e_dev_list = g_list_append(edev->e_dev_list, g_object_ref(e_dev));
323 _e_input_ecore_device_event(dev, edev->seat ? edev->seat->name : NULL, EINA_TRUE);
325 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));
331 _e_input_remove_ecore_device(E_Input_Evdev *edev, Ecore_Device_Class clas)
333 Eina_Bool ret = EINA_FALSE;
334 const Eina_List *dev_list = NULL, *l;
335 const GList *e_dev_list = NULL;
336 Eina_List *ll, *ll_next;
337 Ecore_Device *dev = NULL, *data;
338 const char *identifier;
339 const gchar *device_identifier;
340 const char *device_remove_log = NULL;
342 if (!edev->path) return EINA_FALSE;
344 dev_list = ecore_device_list();
345 if (!dev_list) return EINA_FALSE;
347 EINA_LIST_FOREACH(dev_list, l, dev)
350 identifier = ecore_device_identifier_get(dev);
351 if (!identifier) continue;
352 if ((ecore_device_class_get(dev) == clas) && (!strcmp(identifier, edev->path)))
356 ecore_device_unref(dev);
357 edev->ecore_dev = NULL;
359 else if (edev->ecore_dev_list)
361 EINA_LIST_FOREACH_SAFE(edev->ecore_dev_list, ll, ll_next, data)
365 ecore_device_unref(dev);
366 edev->ecore_dev_list = eina_list_remove_list(edev->ecore_dev_list, ll);
370 _e_input_ecore_device_event(dev, edev->seat ? edev->seat->name : NULL, EINA_FALSE);
371 ecore_device_del(dev);
376 e_dev_list = e_device_list_get();
379 ERR("Failed to get e device list");
383 for (GList *list = g_list_first((GList *)e_dev_list); list; list = list->next)
385 E_Device *device = (E_Device *)list->data;
386 if (!device) continue;
387 device_identifier = e_device_identifier_get(device);
388 if (!device_identifier) continue;
390 if ((e_device_class_get(device) == clas) && (!strcmp(device_identifier, edev->path)))
392 device_remove_log = eina_stringshare_printf("[Remove Device] device name(%s), identifier(%s), class(%s)",
393 e_device_name_get(device),
395 _e_input_ecore_device_class_to_string(clas));
399 g_object_unref(device);
402 else if (edev->e_dev_list)
404 GList *del_list = g_list_find(edev->e_dev_list, device);
407 edev->e_dev_list = g_list_delete_link(edev->e_dev_list, del_list);
414 if (device_remove_log)
416 INF("%s", device_remove_log);
417 eina_stringshare_del(device_remove_log);
424 _e_input_device_add(E_Input_Evdev *edev)
426 Eina_Bool ret = EINA_FALSE;
427 Ecore_Device_Class clas = ECORE_DEVICE_CLASS_NONE;
429 if (edev->caps & E_INPUT_SEAT_POINTER)
431 if (!e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
432 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
433 ret = _e_input_add_ecore_device(edev, clas);
435 if (edev->caps & E_INPUT_SEAT_KEYBOARD)
437 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_KEYBOARD);
438 ret = _e_input_add_ecore_device(edev, clas);
440 if (edev->caps & E_INPUT_SEAT_TOUCH)
442 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_TOUCH);
443 ret = _e_input_add_ecore_device(edev, clas);
450 _e_input_device_remove(E_Input_Evdev *edev)
452 Ecore_Device_Class clas = ECORE_DEVICE_CLASS_NONE;
455 if (edev->caps & E_INPUT_SEAT_POINTER)
457 if (!e_devicemgr_detent_is_detent(libinput_device_get_name(edev->device)))
458 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_POINTER);
459 _e_input_remove_ecore_device(edev, clas);
461 if (edev->caps & E_INPUT_SEAT_KEYBOARD)
463 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_KEYBOARD);
464 _e_input_remove_ecore_device(edev, clas);
466 if (edev->caps & E_INPUT_SEAT_TOUCH)
468 clas = _e_input_seat_cap_to_ecore_device_class(E_INPUT_SEAT_TOUCH);
469 _e_input_remove_ecore_device(edev, clas);
472 if (edev->ecore_dev_list)
474 if (eina_list_count(edev->ecore_dev_list) > 0)
476 EINA_LIST_FREE(edev->ecore_dev_list, data)
478 WRN("Invalid device is left. name: %s, identifier: %s, clas: %s\n",
479 ecore_device_name_get(data), ecore_device_identifier_get(data),
480 _e_input_ecore_device_class_to_string(ecore_device_class_get(data)));
482 ecore_device_unref(data);
483 ecore_device_del(data);
486 edev->ecore_dev_list = NULL;
491 _device_added(E_Input_Backend *input, struct libinput_device *device)
493 struct libinput_seat *libinput_seat;
494 const char *seat_name;
498 ecore_thread_main_loop_begin();
499 libinput_seat = libinput_device_get_seat(device);
500 seat_name = libinput_seat_get_logical_name(libinput_seat);
502 /* try to get a seat */
503 if (!(seat = _seat_get(input, seat_name)))
505 ERR("Could not get matching seat: %s", seat_name);
506 ecore_thread_main_loop_end();
510 /* try to create a new evdev device */
511 if (!(edev = _e_input_evdev_device_create(seat, device)))
513 ERR("Failed to create new evdev device");
514 ecore_thread_main_loop_end();
518 /* append this device to the seat */
519 seat->devices = eina_list_append(seat->devices, edev);
521 if (EINA_FALSE == _e_input_device_add(edev))
523 ERR("Failed to create evas device !\n");
524 ecore_thread_main_loop_end();
528 ecore_thread_main_loop_end();
532 _device_removed(E_Input_Backend *input, struct libinput_device *device)
536 ecore_thread_main_loop_begin();
538 /* try to get the evdev structure */
539 if (!(edev = libinput_device_get_user_data(device)))
541 ecore_thread_main_loop_end();
545 _e_input_device_remove(edev);
547 /* remove this evdev from the seat's list of devices */
548 edev->seat->devices = eina_list_remove(edev->seat->devices, edev);
550 /* destroy this evdev */
551 _e_input_evdev_device_destroy(edev);
553 ecore_thread_main_loop_end();
557 _udev_event_process(struct libinput_event *event)
559 struct libinput *libinput;
560 struct libinput_device *device;
561 E_Input_Backend *input;
562 Eina_Bool ret = EINA_TRUE;
564 libinput = libinput_event_get_context(event);
565 input = libinput_get_user_data(libinput);
566 device = libinput_event_get_device(event);
568 switch (libinput_event_get_type(event))
570 case LIBINPUT_EVENT_DEVICE_ADDED:
571 if (e_config->key_input_ttrace_enable)
573 TRACE_INPUT_BEGIN(_device_added);
574 ELOGF("INPUT", "_device_added|B|", NULL);
577 _device_added(input, device);
579 if (e_config->key_input_ttrace_enable)
582 ELOGF("INPUT", "_device_added|E|", NULL);
585 case LIBINPUT_EVENT_DEVICE_REMOVED:
586 if (e_config->key_input_ttrace_enable)
588 TRACE_INPUT_BEGIN(_device_removed);
589 ELOGF("INPUT", "_device_removed|B|", NULL);
592 _device_removed(input, device);
594 if (e_config->key_input_ttrace_enable)
597 ELOGF("INPUT", "_device_removed|E|", NULL);
608 _input_event_process(struct libinput_event *event)
610 if (_udev_event_process(event)) return;
611 if (_e_input_evdev_event_process(event)) return;
615 _input_events_process(E_Input_Backend *input)
617 struct libinput_event *event;
618 while ((event = libinput_get_event(input->libinput)))
620 _input_event_process(event);
621 libinput_event_destroy(event);
626 _cb_input_dispatch(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
628 E_Input_Backend *input;
630 if (!(input = data)) return EINA_TRUE;
632 if (e_config->key_input_ttrace_enable)
634 TRACE_INPUT_BEGIN(_cb_input_dispatch);
635 ELOGF("INPUT", "_cb_input_dispatch|B|", NULL);
638 if (libinput_dispatch(input->libinput) != 0)
639 ERR("Failed to dispatch libinput events: %m");
641 /* process pending events */
642 _input_events_process(input);
644 if (e_config->key_input_ttrace_enable)
647 ELOGF("INPUT", "_cb_input_dispatch|E|", NULL);
654 _e_input_delayed_key_events_print()
659 clock_gettime(CLOCK_MONOTONIC, &tp);
660 time = (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L);
662 GList *key_list = g_list_first(_key_event_list);
665 Ecore_Event_Key *key = (Ecore_Event_Key *)key_list->data;
668 if (e_config->key_input_time_limit <= (time - key->timestamp))
669 ERR("Delayed key event : keyname(%s), keycode(%u), timestamp(%u), elapsed_time(%u ms)", key->keyname, key->keycode, key->timestamp, time - key->timestamp);
672 eina_stringshare_del(key->keyname);
675 GList *next = key_list->next;
676 _key_event_list = g_list_delete_link(_key_event_list, key_list);
680 _key_event_list = NULL;
684 input_thread_prepare(GSource *source, gint *time)
686 if (e_config->key_input_ttrace_enable)
688 TRACE_INPUT_BEGIN(e_comp_wl_focused_client_flush);
689 ELOGF("INPUT", "e_comp_wl_focused_client_flush|B|", NULL);
692 /* flush only focused client events */
693 e_comp_wl_focused_client_flush();
696 _e_input_delayed_key_events_print();
698 if (e_config->key_input_ttrace_enable)
701 ELOGF("INPUT", "e_comp_wl_focused_client_flush|E|", NULL);
711 input_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
713 InputEventSource *src = (InputEventSource *)source;
714 E_Input_Backend *input = (E_Input_Backend *)user_data;
715 if (!src) return G_SOURCE_REMOVE;
716 if (!input) return G_SOURCE_REMOVE;
718 if (e_config->key_input_ttrace_enable)
720 TRACE_INPUT_BEGIN(input_dispatch);
721 ELOGF("INPUT", "input_dispatch|B|", NULL);
725 cond = g_source_query_unix_fd(source, src->tag);
727 if (cond & G_IO_ERR || cond & G_IO_HUP || cond & G_IO_NVAL)
729 INF("error cond(%d)\n", cond);
730 return G_SOURCE_CONTINUE;
733 if (!input->libinput)
734 return G_SOURCE_REMOVE;
736 if (e_config->key_input_ttrace_enable)
738 TRACE_INPUT_BEGIN(libinput_dispatch);
739 ELOGF("INPUT", "libinput_dispatch|B|", NULL);
742 if (libinput_dispatch(input->libinput) != 0)
743 ERR("Failed to dispatch libinput events: %m");
745 if (e_config->key_input_ttrace_enable)
748 ELOGF("INPUT", "libinput_dispatch|E|", NULL);
751 if (e_config->key_input_ttrace_enable)
753 TRACE_INPUT_BEGIN(_input_events_process);
754 ELOGF("INPUT", "_input_events_process|B|", NULL);
757 /* process pending events */
758 _input_events_process(input);
760 if (e_config->key_input_ttrace_enable)
763 ELOGF("INPUT", "_input_events_process|E|", NULL);
766 ELOGF("INPUT", "input_dispatch|E|", NULL);
769 e_input_event_process((GSource *)input->event_source);
771 return G_SOURCE_CONTINUE;
775 input_thread_start(void *data, Ecore_Thread *th)
778 E_Input_Backend *input;
779 GMainContext *context = NULL;
780 InputEventSource *input_event_source = NULL;
782 if (!(input = data)) return;
784 eina_thread_name_set(eina_thread_self(), "input-thread");
786 e_input_libinput_context_create(input);
788 /* enable this input */
789 if (!e_input_enable_input(input))
791 ERR("Failed to enable input");
795 /* append this input */
797 dev->inputs = eina_list_append(dev->inputs, input);
800 context = g_main_context_new();
801 g_main_context_push_thread_default(context);
803 input_event_source = (InputEventSource *)g_source_new(&input_event_funcs, sizeof(InputEventSource));
804 input_event_source->tag = g_source_add_unix_fd(&input_event_source->gsource, input->fd, G_IO_IN);
806 if (!input->event_source)
807 e_input_create_event_source(input);
810 input->input_thread_loop = g_main_loop_new(context, FALSE);
812 g_source_attach((GSource *)input->event_source, context);
814 //set the callback for this source
815 g_source_set_callback(&input_event_source->gsource, NULL, input, NULL);
816 g_source_attach(&input_event_source->gsource, context);
818 e_keyrouter_input_handler_add();
820 e_input_thread_id_set(gettid());
821 e_input_main_thread_id_set(getpid());
823 _e_input_hook_call(E_INPUT_HOOK_INPUT_THREAD_START, NULL);
825 INF("input thread start tid(%d) pid(%d)", e_input_thread_id_get(), e_input_main_thread_id_get());
827 g_main_loop_run(input->input_thread_loop);
831 input_thread_feedback(void *data, Ecore_Thread *th, void *msgdata)
833 E_Input_Backend *input;
835 INF("input thread start");
837 if (!(input = data)) return;
841 input_thread_end(void *data, Ecore_Thread *th)
843 E_Input_Backend *input;
845 if (!(input = data)) return;
846 INF("input thread complete");
848 e_input_event_source_destroy(input->event_source);
849 input->event_source = NULL;
851 g_main_loop_quit(input->input_thread_loop);
852 g_main_loop_unref(input->input_thread_loop);
853 input->input_thread_loop = NULL;
855 if (th == input->input_thread)
856 input->input_thread = NULL;
860 input_thread_cancel(void *data, Ecore_Thread *th)
862 E_Input_Backend *input;
864 if (!(input = data)) return;
866 INF("input thread cancel");
868 if (th == input->input_thread)
869 input->input_thread = NULL;
873 _e_input_key_event_list_add(Ecore_Event_Key *key)
875 Ecore_Event_Key *clone = NULL;
879 clone = E_NEW(Ecore_Event_Key, 1);
883 clone->keyname = (char *)eina_stringshare_add(key->keyname);
885 clone->keycode = key->keycode;
886 clone->timestamp = key->timestamp;
888 _key_event_list = g_list_append(_key_event_list, clone);
892 e_input_enable_input(E_Input_Backend *input)
894 EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
895 EINA_SAFETY_ON_NULL_RETURN_VAL(input->libinput, EINA_FALSE);
897 input->fd = libinput_get_fd(input->libinput);
899 if (!e_input_thread_mode_get())
904 ecore_main_fd_handler_add(input->fd, ECORE_FD_READ,
905 _cb_input_dispatch, input, NULL, NULL);
909 if (input->suspended)
911 if (libinput_resume(input->libinput) != 0)
914 input->suspended = EINA_FALSE;
916 /* process pending events */
917 _input_events_process(input);
920 input->enabled = EINA_TRUE;
921 input->suspended = EINA_FALSE;
926 input->enabled = EINA_FALSE;
927 if (!e_input_thread_mode_get())
930 ecore_main_fd_handler_del(input->hdlr);
938 e_input_disable_input(E_Input_Backend *input)
940 EINA_SAFETY_ON_NULL_RETURN(input);
941 EINA_SAFETY_ON_TRUE_RETURN(input->suspended);
943 /* suspend this input */
944 libinput_suspend(input->libinput);
946 /* process pending events */
947 _input_events_process(input);
949 input->suspended = EINA_TRUE;
951 if (e_input_thread_mode_get())
953 if (input->input_thread && !ecore_thread_check(input->input_thread))
954 ecore_thread_cancel(input->input_thread);
959 e_input_seat_evdev_list_get(E_Input_Seat *seat)
961 EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
962 return seat->devices;
965 E_API E_Input_Event_Source *
966 e_input_event_source_get()
968 return g_input_event_source;
972 e_input_thread_mode_get()
975 return e_config->input_thread_mode;
981 e_input_create_event_source(E_Input_Backend *input)
983 input->event_source = e_input_event_source_create();
985 g_input_event_source = input->event_source;
988 EINTERN void e_input_thread_run(E_Input_Backend *input)
990 input->input_thread = ecore_thread_feedback_run(input_thread_start, input_thread_feedback, input_thread_end, input_thread_cancel, input, EINA_FALSE);