ClutterInputDevice

ClutterInputDevice — An input device managed by Clutter

Synopsis

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

Object Hierarchy

  GObject
   +----ClutterInputDevice

Properties

  "device-type"              ClutterInputDeviceType  : Read / Write / Construct Only
  "id"                       gint                  : Read / Write / Construct Only
  "name"                     gchar*                : Read / Write / Construct Only

Description

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.

Details

enum ClutterInputDeviceType

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.

CLUTTER_POINTER_DEVICE

A pointer device

CLUTTER_KEYBOARD_DEVICE

A keyboard device

CLUTTER_EXTENSION_DEVICE

A generic extension device

CLUTTER_N_DEVICE_TYPES

The number of device types

Since 1.0


ClutterInputDevice

typedef struct _ClutterInputDevice ClutterInputDevice;

Generic representation of an input device. The actual contents of this structure depend on the backend used.


ClutterInputDeviceClass

typedef struct {
} ClutterInputDeviceClass;

The ClutterInputDeviceClass structure contains only private data and should not be accessed directly

Since 1.2


clutter_input_device_get_device_id ()

gint                clutter_input_device_get_device_id  (ClutterInputDevice *device);

Retrieves the unique identifier of device

device :

a ClutterInputDevice

Returns :

the identifier of the device

Since 1.0


clutter_input_device_get_device_type ()

ClutterInputDeviceType  clutter_input_device_get_device_type
                                                        (ClutterInputDevice *device);

Retrieves the type of device

device :

a ClutterInputDevice

Returns :

the type of the device

Since 1.0


clutter_input_device_get_device_name ()

const gchar *       clutter_input_device_get_device_name
                                                        (ClutterInputDevice *device);

Retrieves the name of the device

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


clutter_input_device_get_device_coords ()

void                clutter_input_device_get_device_coords
                                                        (ClutterInputDevice *device,
                                                         gint *x,
                                                         gint *y);

Retrieves the latest coordinates of the pointer of device

device :

a ClutterInputDevice of type CLUTTER_POINTER_DEVICE

x :

return location for the X coordinate. out.

y :

return location for the Y coordinate. out.

Since 1.2


clutter_input_device_get_pointer_actor ()

ClutterActor *      clutter_input_device_get_pointer_actor
                                                        (ClutterInputDevice *device);

Retrieves the ClutterActor underneath the pointer of device

device :

a ClutterInputDevice of type CLUTTER_POINTER_DEVICE

Returns :

a pointer to the ClutterActor or NULL. transfer none.

Since 1.2

Property Details

The "device-type" property

  "device-type"              ClutterInputDeviceType  : Read / Write / Construct Only

The type of the device

Default value: CLUTTER_POINTER_DEVICE

Since 1.2


The "id" property

  "id"                       gint                  : Read / Write / Construct Only

The unique identifier of the device

Allowed values: >= -1

Default value: 0

Since 1.2


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

The name of the device

Default value: NULL

Since 1.2