forked from enlightenment/efl
ecore-wl2: add ecore_wl2_display_input_find_by_name()
@feature
This commit is contained in:
parent
01d3edef00
commit
871e0c8de8
|
@ -530,6 +530,15 @@ EAPI Eina_Iterator *ecore_wl2_display_inputs_get(Ecore_Wl2_Display *display);
|
||||||
*/
|
*/
|
||||||
EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find(const Ecore_Wl2_Display *display, unsigned int id);
|
EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find(const Ecore_Wl2_Display *display, unsigned int id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find a seat for a given display object using the seat id
|
||||||
|
* @param display The display
|
||||||
|
* @param name The seat name
|
||||||
|
* @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_by_name(const Ecore_Wl2_Display *display, const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an Ecore_Wl2_Window based on id
|
* Find an Ecore_Wl2_Window based on id
|
||||||
*
|
*
|
||||||
|
|
|
@ -979,6 +979,18 @@ ecore_wl2_display_input_find(const Ecore_Wl2_Display *display, unsigned int id)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Wl2_Input *
|
||||||
|
ecore_wl2_display_input_find_by_name(const Ecore_Wl2_Display *display, const char *name)
|
||||||
|
{
|
||||||
|
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 (eina_streq(input->name, name)) return input;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display)
|
ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue