From 1930cc771d3dc7ddc1e8c3f113e73efa7559c08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 17 Sep 2021 21:23:46 +0200 Subject: [PATCH] clutter/virtual-input-device: Add API to get seat Part-of: --- clutter/clutter/clutter-seat.h | 1 - clutter/clutter/clutter-virtual-input-device.c | 14 ++++++++++++++ clutter/clutter/clutter-virtual-input-device.h | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-seat.h b/clutter/clutter/clutter-seat.h index 5195b6c8b..30d176acf 100644 --- a/clutter/clutter/clutter-seat.h +++ b/clutter/clutter/clutter-seat.h @@ -29,7 +29,6 @@ #include "clutter/clutter-types.h" #include "clutter/clutter-keymap.h" -#include "clutter/clutter-virtual-input-device.h" #define CLUTTER_TYPE_SEAT (clutter_seat_get_type ()) diff --git a/clutter/clutter/clutter-virtual-input-device.c b/clutter/clutter/clutter-virtual-input-device.c index ff733a464..0a0f0b679 100644 --- a/clutter/clutter/clutter-virtual-input-device.c +++ b/clutter/clutter/clutter-virtual-input-device.c @@ -202,6 +202,20 @@ clutter_virtual_input_device_get_device_type (ClutterVirtualInputDevice *virtual return priv->device_type; } +/** + * clutter_virtual_input_device_get_seat: + * + * Returns: (transfer none): The seat of the virtual input device + */ +ClutterSeat * +clutter_virtual_input_device_get_seat (ClutterVirtualInputDevice *virtual_device) +{ + ClutterVirtualInputDevicePrivate *priv = + clutter_virtual_input_device_get_instance_private (virtual_device); + + return priv->seat; +} + static void clutter_virtual_input_device_get_property (GObject *object, guint prop_id, diff --git a/clutter/clutter/clutter-virtual-input-device.h b/clutter/clutter/clutter-virtual-input-device.h index fb357af1e..eeceb7a56 100644 --- a/clutter/clutter/clutter-virtual-input-device.h +++ b/clutter/clutter/clutter-virtual-input-device.h @@ -174,4 +174,7 @@ void clutter_virtual_input_device_notify_touch_up (ClutterVirtualInputDevice *vi CLUTTER_EXPORT int clutter_virtual_input_device_get_device_type (ClutterVirtualInputDevice *virtual_device); +CLUTTER_EXPORT +ClutterSeat * clutter_virtual_input_device_get_seat (ClutterVirtualInputDevice *virtual_device); + #endif /* __CLUTTER_VIRTUAL_INPUT_DEVICE_H__ */