ecore_wl2: Add ecore_wl2_input_default_input_get() API.
Summary: Gets default input which created by display. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11132
This commit is contained in:
parent
f174053564
commit
46cfcf7190
|
@ -1485,6 +1485,31 @@ EAPI Eina_Bool ecore_wl2_input_pointer_xy_get(const Ecore_Wl2_Input *input, int
|
|||
*/
|
||||
EAPI void ecore_wl2_input_pointer_set(Ecore_Wl2_Input *input, struct wl_surface *surface, int hot_x, int hot_y);
|
||||
|
||||
/**
|
||||
* Set a specific cursor on a given seat
|
||||
*
|
||||
* @brief This function will try to find a matching cursor inside the existing
|
||||
* cursor theme and set the pointer for the specified seat to be
|
||||
* the specified cursor
|
||||
*
|
||||
* @param input The seat to set the cursor on
|
||||
* @param cursor The name of the cursor to try and set
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Input_Group
|
||||
* @since 1.20
|
||||
*/
|
||||
EAPI void ecore_wl2_input_cursor_from_name_set(Ecore_Wl2_Input *input, const char *cursor);
|
||||
|
||||
/**
|
||||
* Gets default input of a given display
|
||||
*
|
||||
* @param display The display
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Input_Group
|
||||
* @since 1.24
|
||||
*/
|
||||
EAPI Ecore_Wl2_Input *ecore_wl2_input_default_input_get(const Ecore_Wl2_Display *ewd);
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_Wl2_Output_Group Wayland Library Output Functions
|
||||
* @ingroup Ecore_Wl2_Group
|
||||
|
|
|
@ -1871,3 +1871,17 @@ ecore_wl2_input_pointer_xy_get(const Ecore_Wl2_Input *input, int *x, int *y)
|
|||
if (y) *y = input->pointer.sy;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Ecore_Wl2_Input *
|
||||
ecore_wl2_input_default_input_get(const Ecore_Wl2_Display *ewd)
|
||||
{
|
||||
Ecore_Wl2_Input *input;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ewd, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ewd->inputs, NULL);
|
||||
|
||||
input = ecore_wl2_display_input_find_by_name(ewd, "seat0");
|
||||
if (!input) input = ecore_wl2_display_input_find_by_name(ewd, "default");
|
||||
|
||||
return input;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue