GObject.Object
Clutter.InputDevice
Import line: | Clutter = imports.gi.Clutter; |
GIR File: | Clutter-1.0.gir |
C documentation: | ClutterInputDevice |
Class : | InputDevice |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
device_type : Clutter.InputDeviceType
The type of the device
The type of the device
|
Clutter.InputDevice | |
id : Number
The unique identifier of the device
The unique identifier of the device
|
Clutter.InputDevice | |
name : String
The name of the device
The name of the device
|
Clutter.InputDevice |
Method / Constructor | Defined By | |
---|---|---|
new Clutter.InputDevice
(Object properties)
Create a new Clutter.InputDevice
Create a new Clutter.InputDevice
|
||
get_device_coords
()
:
Object
|
Clutter.InputDevice | |
get_device_id
()
:
Number
Retrieves the unique identifier of device
Retrieves the unique identifier of device
|
Clutter.InputDevice | |
get_device_name
()
:
String
Retrieves the name of the device
Retrieves the name of the device
|
Clutter.InputDevice | |
get_device_type
()
:
Clutter.InputDeviceType
Retrieves the type of device
Retrieves the type of device
|
Clutter.InputDevice | |
get_pointer_actor
()
:
Clutter.Actor
Retrieves the ClutterActor underneath the pointer of device
Retrieves the ClutterActor underneath the pointer of device
|
Clutter.InputDevice | |
get_pointer_stage
()
:
Clutter.Stage
Retrieves the ClutterStage underneath the pointer of device
Retrieves the ClutterStage underneath the pointer of device
|
Clutter.InputDevice | |
Forcibly updates the state of the device using a ClutterEvent for integration with embedding toolkits, like clutter-gtk Embedding toolkits that disable the event collection inside Clutter need to use this function to update the state of input devices depending on a ClutterEvent that they are going to submit to the event handling code in Clutter though clutter_do_event().
Forcibly updates the state of the device using a ClutterEvent for integration with embedding toolkits, like clutter-gtk Embedding toolkits that disable the event collection inside Clutter need to use this function to update the state of input devices depending on a ClutterEvent that they are going to submit to the event handling code in Clutter though clutter_do_event(). Since the input devices hold the state that is going to be used to fill in fields like the ClutterButtonEvent click count, or to emit synthesized events like CLUTTER_ENTER and CLUTTER_LEAVE, it is necessary for embedding toolkits to also be responsible of updating the input device state. For instance, this might be the code to translate an embedding toolkit native motion notification into a Clutter ClutterMotionEvent and ask Clutter to process it: |[ ClutterEvent c_event; translate_native_event_to_clutter (native_event, &c_event); clutter_do_event (&c_event); ]| Before letting clutter_do_event() process the event, it is necessary to call clutter_input_device_update_from_event(): |[ ClutterEvent c_event; ClutterDeviceManager *manager; ClutterInputDevice *device; translate_native_event_to_clutter (native_event, &c_event); /* get the device manager */ manager = clutter_device_manager_get_default (); /* use the default Core Pointer that Clutter * backends register by default */ device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE); /* update the state of the input device */ clutter_input_device_update_from_event (device, &c_event, FALSE); clutter_do_event (&c_event); ]| The update_stage boolean argument should be used when the input device enters and leaves a ClutterStage; it will use the ClutterStage field of the passed event to update the stage associated to the input device.
|
Clutter.InputDevice |
None |
Class / Namespace | Method / Signal / Properties |
---|---|
Clutter
Method |
Retrieves the ClutterInputDevice from its id.
|
Clutter.DeviceManager
Signal |
device_added
(DeviceManager self, InputDevice device)
:
none
The ::device-added signal is emitted each time a device has been added to the ClutterDeviceManager
|
Clutter.DeviceManager
Signal |
device_removed
(DeviceManager self, InputDevice device)
:
none
The ::device-removed signal is emitted each time a device has been removed from the ClutterDeviceManager
|
Clutter.DeviceManager
Method |
get_device
(Number device_id)
:
Clutter.InputDevice
Retrieves the ClutterInputDevice with the given device_id
|
Clutter.DeviceManager
Method |
get_core_device
(InputDeviceType device_type)
:
Clutter.InputDevice
Retrieves the core ClutterInputDevice of type device_type Core devices are devices created automatically by the default Clutter backend
|
Clutter.Event
Method |
get_device
()
:
Clutter.InputDevice
Retrieves the ClutterInputDevice for the event.
|