![]() |
![]() |
![]() |
Clutter Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum ClutterInputDeviceType; ClutterInputDevice; ClutterInputDeviceClass; gint clutter_input_device_get_device_id (ClutterInputDevice *device); ClutterInputDeviceType clutter_input_device_get_device_type (ClutterInputDevice *device); const gchar * clutter_input_device_get_device_name (ClutterInputDevice *device); void clutter_input_device_get_device_coords (ClutterInputDevice *device, gint *x, gint *y); ClutterActor * clutter_input_device_get_pointer_actor (ClutterInputDevice *device);
"device-type" ClutterInputDeviceType : Read / Write / Construct Only "id" gint : Read / Write / Construct Only "name" gchar* : Read / Write / Construct Only
ClutterInputDevice represents an input device known to Clutter.
The ClutterInputDevice class holds the state of the device, but its contents are usually defined by the Clutter backend in use.
typedef enum { CLUTTER_POINTER_DEVICE, CLUTTER_KEYBOARD_DEVICE, CLUTTER_EXTENSION_DEVICE, CLUTTER_N_DEVICE_TYPES } ClutterInputDeviceType;
The types of input devices available.
The ClutterInputDeviceType enumeration can be extended at later date; not every platform supports every input device type.
A pointer device | |
A keyboard device | |
A generic extension device | |
The number of device types |
Since 1.0
typedef struct _ClutterInputDevice ClutterInputDevice;
Generic representation of an input device. The actual contents of this structure depend on the backend used.
typedef struct { } ClutterInputDeviceClass;
The ClutterInputDeviceClass structure contains only private data and should not be accessed directly
Since 1.2
gint clutter_input_device_get_device_id (ClutterInputDevice *device);
Retrieves the unique identifier of device
|
a ClutterInputDevice |
Returns : |
the identifier of the device |
Since 1.0
ClutterInputDeviceType clutter_input_device_get_device_type (ClutterInputDevice *device);
Retrieves the type of device
|
a ClutterInputDevice |
Returns : |
the type of the device |
Since 1.0
const gchar * clutter_input_device_get_device_name (ClutterInputDevice *device);
Retrieves the name of the device
|
a ClutterInputDevice |
Returns : |
the name of the device, or NULL . The returned string
is owned by the ClutterInputDevice and should never be modified
or freed
|
Since 1.2
void clutter_input_device_get_device_coords (ClutterInputDevice *device, gint *x, gint *y);
Retrieves the latest coordinates of the pointer of device
|
a ClutterInputDevice of type CLUTTER_POINTER_DEVICE
|
|
return location for the X coordinate. out. |
|
return location for the Y coordinate. out. |
Since 1.2
ClutterActor * clutter_input_device_get_pointer_actor (ClutterInputDevice *device);
Retrieves the ClutterActor underneath the pointer of device
|
a ClutterInputDevice of type CLUTTER_POINTER_DEVICE
|
Returns : |
a pointer to the ClutterActor or NULL . transfer none. |
Since 1.2
"device-type"
property"device-type" ClutterInputDeviceType : Read / Write / Construct Only
The type of the device
Default value: CLUTTER_POINTER_DEVICE
Since 1.2
"id"
property"id" gint : Read / Write / Construct Only
The unique identifier of the device
Allowed values: >= -1
Default value: 0
Since 1.2
"name"
property"name" gchar* : Read / Write / Construct Only
The name of the device
Default value: NULL
Since 1.2