GObject.Object
Clutter.InputDevice
Import line: | Clutter = imports.gi.Clutter; |
GIR File: | Clutter-1.0.gir |
C documentation: | ClutterInputDevice |
Class : | InputDevice |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
backend : Clutter.Backend
|
Clutter.InputDevice | |
device_manager : Clutter.DeviceManager
|
Clutter.InputDevice | |
device_mode : Clutter.InputMode
|
Clutter.InputDevice | |
device_type : Clutter.InputDeviceType
The type of the device
The type of the device
|
Clutter.InputDevice | |
enabled : gboolean
|
Clutter.InputDevice | |
has_cursor : gboolean
|
Clutter.InputDevice | |
id : gint32
The unique identifier of the device
The unique identifier of the device
|
Clutter.InputDevice | |
n_axes : guint32
read only
|
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_associated_device
()
:
Clutter.InputDevice
|
Clutter.InputDevice | |
get_axis
(guint32 index_)
:
Clutter.InputAxis
|
Clutter.InputDevice | |
|
Clutter.InputDevice | |
get_device_coords
()
:
Object
|
Clutter.InputDevice | |
get_device_id
()
:
gint32
Retrieves the unique identifier of device
Retrieves the unique identifier of device
|
Clutter.InputDevice | |
get_device_mode
()
:
Clutter.InputMode
|
Clutter.InputDevice | |
get_device_name
()
:
String
Retrieves the name of the device
is owned by the ClutterInputDevice and should never be modified or freed
Retrieves the name of the device
is owned by the ClutterInputDevice and should never be modified or freed
|
Clutter.InputDevice | |
get_device_type
()
:
Clutter.InputDeviceType
Retrieves the type of device
Retrieves the type of device
|
Clutter.InputDevice | |
get_enabled
()
:
gboolean
|
Clutter.InputDevice | |
get_has_cursor
()
:
gboolean
|
Clutter.InputDevice | |
|
Clutter.InputDevice | |
get_n_axes
()
:
guint32
|
Clutter.InputDevice | |
get_n_keys
()
:
guint32
|
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 | |
get_slave_devices
()
:
Array
|
Clutter.InputDevice | |
set_enabled
(gboolean enabled)
:
none
|
Clutter.InputDevice | |
|
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_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 returned device is owned by the ClutterDeviceManager and should not be modified or freed |
Clutter.DeviceManager
Method |
get_device
(gint32 device_id)
:
Clutter.InputDevice
Retrieves the ClutterInputDevice with the given device_id
returned device is owned by the ClutterDeviceManager and should never be modified or freed |
Clutter.Event
Method |
get_device
()
:
Clutter.InputDevice
Retrieves the ClutterInputDevice for the event.
|
Clutter.Event
Method |
get_source_device
()
:
Clutter.InputDevice
|
Clutter.Event
Method |
set_device
(InputDevice device)
:
none
|