mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
wayland: Add accessor API to permit access to underlying Wayland structures
* clutter_wayland_input_device_get_wl_input_device for the input device * clutter_wayland_stage_get_wl_surface for the Wayland surface * clutter_wayland_stage_get_wl_shell_surface for the shell surface
This commit is contained in:
@ -256,3 +256,32 @@ static void
|
||||
clutter_input_device_wayland_init (ClutterInputDeviceWayland *self)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_wayland_input_device_get_wl_input_device: (skip)
|
||||
*
|
||||
* @device: a #ClutterInputDevice
|
||||
*
|
||||
* Access the underlying data structure representing the Wayland device that is
|
||||
* backing this #ClutterInputDevice.
|
||||
*
|
||||
* Note: this function can only be called when running on the Wayland platform.
|
||||
* Calling this function at any other time will return %NULL.
|
||||
*
|
||||
* Returns: (transfer none): the Wayland input device associated with the
|
||||
* @device
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
struct wl_input_device *
|
||||
clutter_wayland_input_device_get_wl_input_device (ClutterInputDevice *device)
|
||||
{
|
||||
ClutterInputDeviceWayland *wayland_device;
|
||||
|
||||
if (!CLUTTER_INPUT_DEVICE_WAYLAND (device))
|
||||
return NULL;
|
||||
|
||||
wayland_device = CLUTTER_INPUT_DEVICE_WAYLAND (device);
|
||||
|
||||
return wayland_device->input_device;
|
||||
}
|
||||
|
Reference in New Issue
Block a user