[mutter/wip/garnacho/virtual-input-device: 87/94] clutter: Make ClutterVirtualInputDevice public
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/garnacho/virtual-input-device: 87/94] clutter: Make ClutterVirtualInputDevice public
- Date: Wed, 20 Jul 2016 16:33:42 +0000 (UTC)
commit 6912603abf489a2a36033d4799729080d9164753
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jul 11 18:39:32 2016 +0200
clutter: Make ClutterVirtualInputDevice public
This includes adding documentation and introspection annotations,
and marking the functions as extern.
clutter/clutter/Makefile.am | 2 +-
clutter/clutter/clutter-device-manager.c | 13 +++++++++++--
clutter/clutter/clutter-virtual-input-device.c | 8 ++++++++
clutter/clutter/clutter-virtual-input-device.h | 7 +++++++
4 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am
index b332df7..2f7e6c3 100644
--- a/clutter/clutter/Makefile.am
+++ b/clutter/clutter/Makefile.am
@@ -123,6 +123,7 @@ source_h = \
clutter-transition.h \
clutter-types.h \
clutter-units.h \
+ clutter-virtual-input-device.h \
clutter-zoom-action.h \
$(NULL)
@@ -240,7 +241,6 @@ source_h_priv = \
clutter-stage-manager-private.h \
clutter-stage-private.h \
clutter-stage-window.h \
- clutter-virtual-input-device.h \
$(NULL)
# private source code; these should not be introspected
diff --git a/clutter/clutter/clutter-device-manager.c b/clutter/clutter/clutter-device-manager.c
index e532bbe..c30bc8e 100644
--- a/clutter/clutter/clutter-device-manager.c
+++ b/clutter/clutter/clutter-device-manager.c
@@ -437,9 +437,18 @@ _clutter_device_manager_get_backend (ClutterDeviceManager *manager)
return manager->priv->backend;
}
+/**
+ * clutter_device_manager_create_virtual_device:
+ * @device_manager: a #ClutterDeviceManager
+ * @device_type: the type of the virtual device
+ *
+ * Creates a virtual input device.
+ *
+ * Returns: (transfer full): a newly created virtual device
+ **/
ClutterVirtualInputDevice *
-clutter_device_manager_create_virtual_device (ClutterDeviceManager *device_manager,
- ClutterInputDeviceType device_type)
+clutter_device_manager_create_virtual_device (ClutterDeviceManager *device_manager,
+ ClutterInputDeviceType device_type)
{
ClutterDeviceManagerClass *manager_class;
diff --git a/clutter/clutter/clutter-virtual-input-device.c b/clutter/clutter/clutter-virtual-input-device.c
index ab19e65..4e40dea 100644
--- a/clutter/clutter/clutter-virtual-input-device.c
+++ b/clutter/clutter/clutter-virtual-input-device.c
@@ -103,6 +103,14 @@ clutter_virtual_input_device_notify_key (ClutterVirtualInputDevice *virtual_devi
klass->notify_key (virtual_device, time_us, key, key_state);
}
+/**
+ * clutter_virtual_input_device_get_manager:
+ * @virtual_device: a virtual device
+ *
+ * Gets the device manager of this virtual device.
+ *
+ * Returns: (transfer none): The #ClutterDeviceManager of this virtual device
+ **/
ClutterDeviceManager *
clutter_virtual_input_device_get_manager (ClutterVirtualInputDevice *virtual_device)
{
diff --git a/clutter/clutter/clutter-virtual-input-device.h b/clutter/clutter/clutter-virtual-input-device.h
index 976c123..e2ca93e 100644
--- a/clutter/clutter/clutter-virtual-input-device.h
+++ b/clutter/clutter/clutter-virtual-input-device.h
@@ -30,6 +30,8 @@
#include "clutter-device-manager.h"
#define CLUTTER_TYPE_VIRTUAL_INPUT_DEVICE (clutter_virtual_input_device_get_type ())
+
+CLUTTER_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (ClutterVirtualInputDevice,
clutter_virtual_input_device,
CLUTTER, VIRTUAL_INPUT_DEVICE,
@@ -72,26 +74,31 @@ struct _ClutterVirtualInputDeviceClass
ClutterKeyState key_state);
};
+CLUTTER_AVAILABLE_IN_ALL
void clutter_virtual_input_device_notify_relative_motion (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
double dx,
double dy);
+CLUTTER_AVAILABLE_IN_ALL
void clutter_virtual_input_device_notify_absolute_motion (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
double x,
double y);
+CLUTTER_AVAILABLE_IN_ALL
void clutter_virtual_input_device_notify_button (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
uint32_t button,
ClutterButtonState button_state);
+CLUTTER_AVAILABLE_IN_ALL
void clutter_virtual_input_device_notify_key (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
uint32_t key,
ClutterKeyState key_state);
+CLUTTER_AVAILABLE_IN_ALL
ClutterDeviceManager * clutter_virtual_input_device_get_manager (ClutterVirtualInputDevice *virtual_device);
int clutter_virtual_input_device_get_device_type (ClutterVirtualInputDevice *virtual_device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]