Ardour  9.0-pre0-582-g084a23a80d
Gdk::Device Class Reference

#include <device.h>

Inheritance diagram for Gdk::Device:
[legend]

Public Member Functions

virtual ~Device ()
 
GdkDevicegobj ()
 Provides access to the underlying C GObject. More...
 
const GdkDevicegobj () const
 Provides access to the underlying C GObject. More...
 
GdkDevicegobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
void set_source (InputSource source)
 
bool set_mode (InputMode mode)
 
void get_key (guint index, guint &keyval, ModifierType &modifiers) const
 
void set_key (guint index, guint keyval, ModifierType modifiers)
 
AxisUse get_axis_use (guint index) const
 
void set_axis_use (guint index_, AxisUse use)
 
void get_state (const Glib::RefPtr< Window > &window, double &axes, ModifierType &mask)
 
bool get_history (const Glib::RefPtr< Window > &window, guint32 start, guint32 stop, GdkTimeCoord **&events, int &n_events)
 
bool get_axis (double &axes, AxisUse use, double &value) const
 
Glib::ustring get_name () const
 
InputSource get_source () const
 
InputMode get_mode () const
 
bool get_has_cursor () const
 
gint get_n_axes () const
 

Static Public Member Functions

static GType get_type () G_GNUC_CONST
 

Protected Member Functions

 Device ()
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gdk::Devicewrap (GdkDevice *object, bool take_copy=false)
 

Detailed Description

A Gdk::Device instance contains a detailed description of an extended input device.

Definition at line 123 of file device.h.

Constructor & Destructor Documentation

◆ ~Device()

virtual Gdk::Device::~Device ( )
virtual

◆ Device()

Gdk::Device::Device ( )
protected

Member Function Documentation

◆ get_axis()

bool Gdk::Device::get_axis ( double &  axes,
AxisUse  use,
double &  value 
) const

Interprets an array of double as axis values for a given device, and locates the value in the array for a given axis use.

Parameters
axesPointer to an array of axes.
useThe use to look for.
valueLocation to store the found value.
Returns
true if the given axis use was found, otherwise false.

◆ get_axis_use()

AxisUse Gdk::Device::get_axis_use ( guint  index) const

Returns the axis use for index.

Parameters
indexThe index of the axis.
Returns
A Gdk::AxisUse specifying how the axis is used.

◆ get_has_cursor()

bool Gdk::Device::get_has_cursor ( ) const

Determines whether the pointer follows device motion.

Returns
true if the pointer follows device motion.

◆ get_history()

bool Gdk::Device::get_history ( const Glib::RefPtr< Window > &  window,
guint32  start,
guint32  stop,
GdkTimeCoord **&  events,
int &  n_events 
)

Obtains the motion history for a device; given a starting and ending timestamp, return all events in the motion history for the device in the given range of time. Some windowing systems do not support motion history, in which case, false will be returned. (This is not distinguishable from the case where motion history is supported and no events were found.)

Parameters
windowThe window with respect to which which the event coordinates will be reported.
startStarting timestamp for range of events to return.
stopEnding timestamp for the range of events to return.
eventsLocation to store a newly-allocated array of Gdk::TimeCoord, or 0.
n_eventsLocation to store the length of events, or 0.
Returns
true if the windowing system supports motion history and at least one event was found.

◆ get_key()

void Gdk::Device::get_key ( guint  index,
guint &  keyval,
ModifierType modifiers 
) const

If index has a valid keyval, this function will fill in keyval and modifiers with the keyval settings.

Parameters
indexThe index of the macro button to get.
keyvalReturn value for the keyval.
modifiersReturn value for modifiers.

◆ get_mode()

InputMode Gdk::Device::get_mode ( ) const

Determines the mode of the device.

Returns
A Gdk::InputSource.

◆ get_n_axes()

gint Gdk::Device::get_n_axes ( ) const

Gets the number of axes of a device.

Returns
The number of axes of device.

◆ get_name()

Glib::ustring Gdk::Device::get_name ( ) const

Determines the name of the device.

Returns
A name.

◆ get_source()

InputSource Gdk::Device::get_source ( ) const

Determines the type of the device.

Returns
A Gdk::InputSource.

◆ get_state()

void Gdk::Device::get_state ( const Glib::RefPtr< Window > &  window,
double &  axes,
ModifierType mask 
)

Gets the current state of a device.

Parameters
windowA Gdk::Window.
axesAn array of doubles to store the values of the axes of device in, or 0.
maskLocation to store the modifiers, or 0.

◆ get_type()

static GType Gdk::Device::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GdkDevice* Gdk::Device::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 162 of file device.h.

◆ gobj() [2/2]

const GdkDevice* Gdk::Device::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 165 of file device.h.

◆ gobj_copy()

GdkDevice* Gdk::Device::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ set_axis_use()

void Gdk::Device::set_axis_use ( guint  index_,
AxisUse  use 
)

◆ set_key()

void Gdk::Device::set_key ( guint  index,
guint  keyval,
ModifierType  modifiers 
)

◆ set_mode()

bool Gdk::Device::set_mode ( InputMode  mode)

◆ set_source()

void Gdk::Device::set_source ( InputSource  source)

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gdk::Device > wrap ( GdkDevice object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse 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: