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:
Rob Bradford
2012-02-10 16:46:45 +00:00
parent 84362a8257
commit cf735b54df
4 changed files with 139 additions and 0 deletions

View File

@ -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;
}