summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2016-07-11 18:39:32 +0200
committerCarlos Garnacho <carlosg@gnome.org>2016-07-26 18:45:26 +0200
commitd940d5e5810536d6f70c7b04402944605b3cd725 (patch)
treecacecf04fbda7750642413f80b56f7a4bf0632e9
parent70f69e5de4f337896afbed81a8e97cc51598d73a (diff)
downloadmutter-d940d5e5810536d6f70c7b04402944605b3cd725.tar.gz
clutter: Make ClutterVirtualInputDevice public
This includes adding documentation and introspection annotations, and marking the functions as extern. https://bugzilla.gnome.org/show_bug.cgi?id=765009
-rw-r--r--clutter/clutter/Makefile.am2
-rw-r--r--clutter/clutter/clutter-device-manager.c13
-rw-r--r--clutter/clutter/clutter-virtual-input-device.c8
-rw-r--r--clutter/clutter/clutter-virtual-input-device.h7
4 files changed, 27 insertions, 3 deletions
diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am
index b332df7ff..2f7e6c372 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 e532bbe7e..c30bc8eef 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 ab19e650a..4e40deabb 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 976c123f9..e2ca93e72 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);