Top |
ClutterDeviceManager is a singleton object, owned by Clutter, which maintains the list of ClutterInputDevice<!-- -->s.
Depending on the backend used by Clutter it is possible to use the “device-added” and “device-removed” to monitor addition and removal of devices.
ClutterDeviceManager is available since Clutter 1.2
ClutterDeviceManager *
clutter_device_manager_get_default (void
);
Retrieves the device manager singleton
the ClutterDeviceManager singleton. The returned instance is owned by Clutter and it should not be modified or freed.
[transfer none]
Since 1.2
GSList *
clutter_device_manager_list_devices (ClutterDeviceManager *device_manager
);
Lists all currently registered input devices
a newly allocated list of ClutterInputDevice objects. Use
g_slist_free()
to deallocate it when done.
[transfer container][element-type Clutter.InputDevice]
Since 1.2
const GSList *
clutter_device_manager_peek_devices (ClutterDeviceManager *device_manager
);
Lists all currently registered input devices
a pointer to the internal list of ClutterInputDevice objects. The returned list is owned by the ClutterDeviceManager and should never be modified or freed.
[transfer none][element-type Clutter.InputDevice]
Since 1.2
ClutterInputDevice * clutter_device_manager_get_device (ClutterDeviceManager *device_manager
,gint device_id
);
Retrieves the ClutterInputDevice with the given device_id
a ClutterInputDevice or NULL
. The
returned device is owned by the ClutterDeviceManager and should
never be modified or freed.
[transfer none]
Since 1.2
ClutterInputDevice * clutter_device_manager_get_core_device (ClutterDeviceManager *device_manager
,ClutterInputDeviceType device_type
);
Retrieves the core ClutterInputDevice of type device_type
Core devices are devices created automatically by the default Clutter backend
a ClutterInputDevice or NULL
. The
returned device is owned by the ClutterDeviceManager and should
not be modified or freed.
[transfer none]
Since 1.2
ClutterInputDevice *
clutter_get_input_device_for_id (gint id_
);
clutter_get_input_device_for_id
has been deprecated since version 1.10 and should not be used in newly-written code.
Use clutter_device_manager_get_device()
instead.
Retrieves the ClutterInputDevice from its id_
. This is a convenience
wrapper for clutter_device_manager_get_device()
and it is functionally
equivalent to:
1 2 3 4 5 |
ClutterDeviceManager *manager; ClutterInputDevice *device; manager = clutter_device_manager_get_default (); device = clutter_device_manager_get_device (manager, id); |
Since 0.8
struct ClutterDeviceManager;
The ClutterDeviceManager structure contains only private data
Since 1.2
struct ClutterDeviceManagerClass { };
The ClutterDeviceManagerClass structure contains only private data
Since 1.2
“backend”
property“backend” ClutterBackend *
The ClutterBackend of the device manager.
Flags: Read / Write / Construct Only
“device-added”
signalvoid user_function (ClutterDeviceManager *manager, ClutterInputDevice *device, gpointer user_data)
The ::device-added signal is emitted each time a device has been added to the ClutterDeviceManager
manager |
the ClutterDeviceManager that emitted the signal |
|
device |
the newly added ClutterInputDevice |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 1.2
“device-removed”
signalvoid user_function (ClutterDeviceManager *manager, ClutterInputDevice *device, gpointer user_data)
The ::device-removed signal is emitted each time a device has been removed from the ClutterDeviceManager
manager |
the ClutterDeviceManager that emitted the signal |
|
device |
the removed ClutterInputDevice |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 1.2