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
This commit is contained in:
Carlos Garnacho 2016-07-11 18:39:32 +02:00
parent 27a77fa115
commit 3c8b1462bc
4 changed files with 27 additions and 3 deletions

View File

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

View File

@ -437,6 +437,15 @@ _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)

View File

@ -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)
{

View File

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