device: Add more accessors for properties

Allow using real accessor methods for getting the ClutterInputDevice
properties set on construction.
This commit is contained in:
Emmanuele Bassi 2011-01-18 17:33:22 +00:00
parent ad06f1b20f
commit dd5f6ca7e1
3 changed files with 42 additions and 0 deletions

View File

@ -732,6 +732,44 @@ clutter_input_device_get_device_name (ClutterInputDevice *device)
return device->device_name;
}
/**
* clutter_input_device_get_has_cursor:
* @device: a #ClutterInputDevice
*
* Retrieves whether @device has a pointer that follows the
* device motion.
*
* Return value: %TRUE if the device has a cursor
*
* Since: 1.6
*/
gboolean
clutter_input_device_get_has_cursor (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
return device->has_cursor;
}
/**
* clutter_input_device_get_device_mode:
* @device: a #ClutterInputDevice
*
* Retrieves the #ClutterInputMode of @device.
*
* Return value: the device mode
*
* Since: 1.6
*/
ClutterInputMode
clutter_input_device_get_device_mode (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device),
CLUTTER_INPUT_MODE_FLOATING);
return device->device_mode;
}
/**
* clutter_input_device_update_from_event:
* @device: a #ClutterInputDevice

View File

@ -136,6 +136,8 @@ void clutter_input_device_get_device_coords (ClutterInputDev
ClutterActor * clutter_input_device_get_pointer_actor (ClutterInputDevice *device);
ClutterStage * clutter_input_device_get_pointer_stage (ClutterInputDevice *device);
G_CONST_RETURN gchar * clutter_input_device_get_device_name (ClutterInputDevice *device);
ClutterInputMode clutter_input_device_get_device_mode (ClutterInputDevice *device);
gboolean clutter_input_device_get_has_cursor (ClutterInputDevice *device);
guint clutter_input_device_get_n_axes (ClutterInputDevice *device);
ClutterInputAxis clutter_input_device_get_axis (ClutterInputDevice *device,

View File

@ -1080,6 +1080,8 @@ ClutterInputDevice
clutter_input_device_get_device_id
clutter_input_device_get_device_type
clutter_input_device_get_device_name
clutter_input_device_get_device_mode
clutter_input_device_get_has_cursor
clutter_input_device_get_device_coords
clutter_input_device_get_pointer_actor
clutter_input_device_get_pointer_stage