forked from enlightenment/efl
ecore-wl2: add ecore_wl2_display_input_find()
for finding seat using hw id @feature
This commit is contained in:
parent
2c291f5bb8
commit
047118c6e2
|
@ -521,6 +521,15 @@ EAPI void ecore_wl2_display_screen_size_get(Ecore_Wl2_Display *display, int *w,
|
|||
*/
|
||||
EAPI Eina_Iterator *ecore_wl2_display_inputs_get(Ecore_Wl2_Display *display);
|
||||
|
||||
/**
|
||||
* Find a seat for a given display object using the seat id
|
||||
* @param display The display
|
||||
* @param id The seat id
|
||||
* @return The corresponding Ecore_Wl2_Input object or @c NULL if no match is found
|
||||
* @since 1.20
|
||||
*/
|
||||
EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find(const Ecore_Wl2_Display *display, unsigned int id);
|
||||
|
||||
/**
|
||||
* Find an Ecore_Wl2_Window based on id
|
||||
*
|
||||
|
|
|
@ -962,6 +962,18 @@ ecore_wl2_display_inputs_get(Ecore_Wl2_Display *display)
|
|||
return eina_inlist_iterator_new(display->inputs);
|
||||
}
|
||||
|
||||
EAPI Ecore_Wl2_Input *
|
||||
ecore_wl2_display_input_find(const Ecore_Wl2_Display *display, unsigned int id)
|
||||
{
|
||||
Ecore_Wl2_Input *input;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(display->pid, NULL);
|
||||
EINA_INLIST_FOREACH(display->inputs, input)
|
||||
if (input->id == id) return input;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue