[clutter] input: adds internal _clutter_input_device_get_stage api
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] input: adds internal _clutter_input_device_get_stage api
- Date: Thu, 8 Dec 2011 16:41:56 +0000 (UTC)
commit 86f2aed570dcd83becfc91c5a076027c687c0dae
Author: Robert Bragg <robert linux intel com>
Date: Mon Dec 5 13:49:28 2011 +0000
input: adds internal _clutter_input_device_get_stage api
This adds internal api to be able to query the stage currently
associated with a given input device so input backends shouldn't need to
refer to the default stage.
Reviewed-by: Emmanuele Bassi <ebassi linux intel com>
clutter/clutter-device-manager-private.h | 1 +
clutter/clutter-input-device.c | 14 ++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-device-manager-private.h b/clutter/clutter-device-manager-private.h
index 4ae5940..eb8fb12 100644
--- a/clutter/clutter-device-manager-private.h
+++ b/clutter/clutter-device-manager-private.h
@@ -136,6 +136,7 @@ void _clutter_input_device_set_time (ClutterInputDev
guint32 time_);
void _clutter_input_device_set_stage (ClutterInputDevice *device,
ClutterStage *stage);
+ClutterStage * _clutter_input_device_get_stage (ClutterInputDevice *device);
void _clutter_input_device_set_actor (ClutterInputDevice *device,
ClutterActor *actor,
gboolean emit_crossing);
diff --git a/clutter/clutter-input-device.c b/clutter/clutter-input-device.c
index fd6efc2..e9a4218 100644
--- a/clutter/clutter-input-device.c
+++ b/clutter/clutter-input-device.c
@@ -459,6 +459,20 @@ _clutter_input_device_set_stage (ClutterInputDevice *device,
}
/*< private >
+ * clutter_input_device_get_stage:
+ * @device: a #ClutterInputDevice
+ *
+ * Retrieves the stage currently associated with @device.
+ *
+ * Return value: The stage currently associated with @device.
+ */
+ClutterStage *
+_clutter_input_device_get_stage (ClutterInputDevice *device)
+{
+ return device->stage;
+}
+
+/*< private >
* clutter_input_device_set_actor:
* @device: a #ClutterInputDevice
* @actor: a #ClutterActor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]