cluttermm: Clutter::InputDevice Class Reference
Public Member Functions | |
virtual | ~InputDevice () |
ClutterInputDevice* | gobj () |
Provides access to the underlying C GObject. More... | |
const ClutterInputDevice* | gobj () const |
Provides access to the underlying C GObject. More... | |
ClutterInputDevice* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
int | get_device_id () const |
Retrieves the unique identifier of device. More... | |
bool | get_coords (ClutterEventSequence*sequence, Point& point) const |
Retrieves the latest coordinates of a pointer or touch point of device. More... | |
bool | get_coords (Point& point) const |
A get_coords() convenience overload. More... | |
ModifierType | get_modifier_state () const |
Retrieves the current modifiers state of the device, as seen by the last event Clutter processed. More... | |
InputDeviceType | get_device_type () const |
Retrieves the type of device. More... | |
Glib::ustring | get_device_name () const |
Retrieves the name of the device. More... | |
void | get_device_coords (int& x, int& y) const |
Retrieves the latest coordinates of the pointer of device. More... | |
InputMode | get_device_mode () const |
Retrieves the Clutter::InputMode of device. More... | |
bool | get_has_cursor () const |
Retrieves whether device has a pointer that follows the device motion. More... | |
void | set_enabled (bool enabled=true) |
Enables or disables a Clutter::InputDevice. More... | |
bool | get_enabled () const |
Retrieves whether device is enabled. More... | |
Glib::RefPtr< InputDevice > | get_associated_device () |
Retrieves a pointer to the Clutter::InputDevice that has been associated to device. More... | |
Glib::RefPtr< const InputDevice > | get_associated_device () const |
Retrieves a pointer to the Clutter::InputDevice that has been associated to device. More... | |
bool | keycode_to_evdev (guint hardware_keycode, guint& evdev_keycode) const |
Translates a hardware keycode from a Clutter::KeyEvent to the equivalent evdev keycode. More... | |
bool | get_n_keys () const |
Retrieves the number of keys registered for device. More... | |
void | set_key (guint index, guint keyval, ModifierType modifiers) |
Sets the keyval and modifiers at the given index for device. More... | |
bool | get_key (guint index, guint& keyval, ModifierType& modifiers) const |
Retrieves the key set using set_key() More... | |
guint | get_n_axes () |
Retrieves the number of axes available on device. More... | |
InputAxis | get_axis (guint index_) |
Retrieves the type of axis on device at the given index. More... | |
Glib::RefPtr< Actor > | get_pointer_actor () |
Retrieves the Clutter::Actor underneath the pointer of device. More... | |
Glib::RefPtr< const Actor > | get_pointer_actor () const |
Retrieves the Clutter::Actor underneath the pointer of device. More... | |
Glib::RefPtr< Stage > | get_pointer_stage () |
Retrieves the Clutter::Stage underneath the pointer of device. More... | |
Glib::RefPtr< const Stage > | get_pointer_stage () const |
Retrieves the Clutter::Stage underneath the pointer of device. More... | |
void | grab (const Glib::RefPtr< const Actor >& actor) |
Acquires a grab on actor for the given device. More... | |
void | ungrab () |
Releases the grab on the device, if one is in place. More... | |
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Backend > > | property_backend () const |
The backend instance. More... | |
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< DeviceManager > > | property_device_manager () const |
The device manager instance. More... | |
Glib::PropertyProxy_ReadOnly < InputMode > | property_device_mode () const |
The mode of the device. More... | |
Glib::PropertyProxy_ReadOnly < InputDeviceType > | property_device_type () const |
The type of the device. More... | |
Glib::PropertyProxy< bool > | property_enabled () |
Whether the device is enabled. More... | |
Glib::PropertyProxy_ReadOnly < bool > | property_enabled () const |
Whether the device is enabled. More... | |
Glib::PropertyProxy_ReadOnly < bool > | property_has_cursor () const |
Whether the device has a cursor. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_id () const |
Unique identifier of the device. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_n_axes () const |
The number of axes on the device. More... | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_name () const |
The name of the device. More... | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
InputDevice () | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr < Clutter::InputDevice > | wrap (ClutterInputDevice* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Constructor & Destructor Documentation
|
virtual |
|
protected |
Member Function Documentation
Glib::RefPtr<InputDevice> Clutter::InputDevice::get_associated_device | ( | ) |
Retrieves a pointer to the Clutter::InputDevice that has been associated to device.
If the Clutter::InputDevice::property_device_mode() property of device is set to Clutter::INPUT_MODE_MASTER, this function will return 0
.
- Returns
- A Clutter::InputDevice, or
0
.
Glib::RefPtr<const InputDevice> Clutter::InputDevice::get_associated_device | ( | ) | const |
Retrieves a pointer to the Clutter::InputDevice that has been associated to device.
If the Clutter::InputDevice::property_device_mode() property of device is set to Clutter::INPUT_MODE_MASTER, this function will return 0
.
- Returns
- A Clutter::InputDevice, or
0
.
InputAxis Clutter::InputDevice::get_axis | ( | guint | index_) |
Retrieves the type of axis on device at the given index.
- Parameters
-
index The index of the axis.
- Returns
- The axis type.
bool Clutter::InputDevice::get_coords | ( | ClutterEventSequence * | sequence, |
Point& | point | ||
) | const |
Retrieves the latest coordinates of a pointer or touch point of device.
- Parameters
-
sequence A Clutter::EventSequence, or 0
if the device is not touch-based.point Return location for the pointer or touch point.
- Returns
false
if the device's sequence hasn't been found, andtrue
otherwise.
bool Clutter::InputDevice::get_coords | ( | Point& | point) | const |
A get_coords() convenience overload.
void Clutter::InputDevice::get_device_coords | ( | int & | x, |
int & | y | ||
) | const |
Retrieves the latest coordinates of the pointer of device.
Deprecated: 1.12: Use get_coords() instead.
- Deprecated:
- Use get_coords() instead.
- Parameters
-
x Return location for the X coordinate. y Return location for the Y coordinate.
int Clutter::InputDevice::get_device_id | ( | ) | const |
Retrieves the unique identifier of device.
- Returns
- The identifier of the device.
InputMode Clutter::InputDevice::get_device_mode | ( | ) | const |
Glib::ustring Clutter::InputDevice::get_device_name | ( | ) | const |
Retrieves the name of the device.
- Returns
- The name of the device, or
0
. The returned string is owned by the Clutter::InputDevice and should never be modified or freed.
InputDeviceType Clutter::InputDevice::get_device_type | ( | ) | const |
bool Clutter::InputDevice::get_enabled | ( | ) | const |
bool Clutter::InputDevice::get_has_cursor | ( | ) | const |
Retrieves whether device has a pointer that follows the device motion.
- Returns
true
if the device has a cursor.
bool Clutter::InputDevice::get_key | ( | guint | index, |
guint & | keyval, | ||
ModifierType& | modifiers | ||
) | const |
Retrieves the key set using set_key()
- Parameters
-
index The index of the key. keyval Return location for the keyval at index. modifiers Return location for the modifiers at index.
- Returns
true
if a key was set at the given index.
ModifierType Clutter::InputDevice::get_modifier_state | ( | ) | const |
Retrieves the current modifiers state of the device, as seen by the last event Clutter processed.
- Returns
- The last known modifier state.
guint Clutter::InputDevice::get_n_axes | ( | ) |
Retrieves the number of axes available on device.
- Returns
- The number of axes on the device.
bool Clutter::InputDevice::get_n_keys | ( | ) | const |
Retrieves the number of keys registered for device.
- Returns
- The number of registered keys.
Glib::RefPtr<Actor> Clutter::InputDevice::get_pointer_actor | ( | ) |
Retrieves the Clutter::Actor underneath the pointer of device.
- Returns
- A pointer to the Clutter::Actor or
0
.
Glib::RefPtr<const Actor> Clutter::InputDevice::get_pointer_actor | ( | ) | const |
Retrieves the Clutter::Actor underneath the pointer of device.
- Returns
- A pointer to the Clutter::Actor or
0
.
Glib::RefPtr<Stage> Clutter::InputDevice::get_pointer_stage | ( | ) |
Retrieves the Clutter::Stage underneath the pointer of device.
- Returns
- A pointer to the Clutter::Stage or
0
.
Glib::RefPtr<const Stage> Clutter::InputDevice::get_pointer_stage | ( | ) | const |
Retrieves the Clutter::Stage underneath the pointer of device.
- Returns
- A pointer to the Clutter::Stage or
0
.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
ClutterInputDevice* Clutter::InputDevice::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void Clutter::InputDevice::grab | ( | const Glib::RefPtr< const Actor >& | actor) |
Acquires a grab on actor for the given device.
Any event coming from device will be delivered to actor, bypassing the usual event delivery mechanism, until the grab is released by calling ungrab().
The grab is client-side: even if the windowing system used by the Clutter backend has the concept of "device grabs", Clutter will not use them.
Only Clutter::InputDevice of types Clutter::POINTER_DEVICE and Clutter::KEYBOARD_DEVICE can hold a grab.
- Parameters
-
actor A Clutter::Actor.
bool Clutter::InputDevice::keycode_to_evdev | ( | guint | hardware_keycode, |
guint & | evdev_keycode | ||
) | const |
Translates a hardware keycode from a Clutter::KeyEvent to the equivalent evdev keycode.
Note that depending on the input backend used by Clutter this function can fail if there is no obvious mapping between the key codes. The hardware keycode can be taken from the Clutter::KeyEvent.hardware_keycode member of Clutter::KeyEvent.
- Parameters
-
hardware_keycode The hardware keycode from a Clutter::KeyEvent. evdev_keycode The return location for the evdev keycode.
- Returns
true
if the conversion succeeded,false
otherwise.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Backend> > Clutter::InputDevice::property_backend | ( | ) | const |
The backend instance.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DeviceManager> > Clutter::InputDevice::property_device_manager | ( | ) | const |
The device manager instance.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< InputMode > Clutter::InputDevice::property_device_mode | ( | ) | const |
The mode of the device.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< InputDeviceType > Clutter::InputDevice::property_device_type | ( | ) | const |
The type of the device.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< bool > Clutter::InputDevice::property_enabled | ( | ) |
Whether the device is enabled.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< bool > Clutter::InputDevice::property_enabled | ( | ) | const |
Whether the device is enabled.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< bool > Clutter::InputDevice::property_has_cursor | ( | ) | const |
Whether the device has a cursor.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Clutter::InputDevice::property_id | ( | ) | const |
Unique identifier of the device.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Clutter::InputDevice::property_n_axes | ( | ) | const |
The number of axes on the device.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Clutter::InputDevice::property_name | ( | ) | const |
The name of the device.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
void Clutter::InputDevice::set_enabled | ( | bool | enabled = true ) |
Enables or disables a Clutter::InputDevice.
Only devices with a Clutter::InputDevice::property_device_mode() property set to Clutter::INPUT_MODE_SLAVE or Clutter::INPUT_MODE_FLOATING can be disabled.
- Parameters
-
enabled true
to enable the device.
void Clutter::InputDevice::set_key | ( | guint | index, |
guint | keyval, | ||
ModifierType | modifiers | ||
) |
Sets the keyval and modifiers at the given index for device.
Clutter will use the keyval and modifiers set when filling out an event coming from the same input device.
- Parameters
-
index The index of the key. keyval The keyval. modifiers A bitmask of modifiers.
void Clutter::InputDevice::ungrab | ( | ) |
Releases the grab on the device, if one is in place.
Friends And Related Function Documentation
|
related |
A Glib::wrap() method for this object.
- Parameters
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- cluttermm/input-device.h