org.gnu.gdk

Class Device


public class Device
extends GObject

In addition to the normal keyboard and mouse input devices, GTK+ also contains support for extended input devices. In particular, this support is targeted at graphics tablets. Graphics tablets typically return sub-pixel positioning information and possibly information about the pressure and tilt of the stylus. Under X, the support for extended devices is done through the XInput extension. This class represents a generic device, allowing the programmer to configure various aspects of each device.

Constructor Summary

Device(Handle handle)

Method Summary

static Device
getCorePointer()
Returns the device for the core pointer.
static List
getDevices()
Returns the list of available input devices for the default display.
static List
getDevicesList()
Deprecated. Use getDevices() instead.
InputMode
getMode()
Returns the mode of an input device.
String
getName()
Returns the name of this device.
InputSource
getSource()
Returns the type of this device.
boolean
hasCursor()
TRUE if the X pointer follows device motion.
void
setAxisUse(int axisIndex, AxisUse use)
Specifies how an axis of a device is used.
void
setKeyValue(int btnIndex, int keyVal, ModifierType modifier)
Specifies the X key event to generate when a macro button of a device is pressed.
void
setMode(InputMode mode)
Sets a the mode of an input device.
void
setSource(InputSource source)
Sets the source type for an input device.

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

Device

public Device(Handle handle)

Method Details

getCorePointer

public static Device getCorePointer()
Returns the device for the core pointer.

getDevices

public static List getDevices()
Returns the list of available input devices for the default display.
Returns:
A java.util.List containing the available input Device instances.

getDevicesList

public static List getDevicesList()

Deprecated. Use getDevices() instead.


getMode

public InputMode getMode()
Returns the mode of an input device.

getName

public String getName()
Returns the name of this device.

getSource

public InputSource getSource()
Returns the type of this device.

hasCursor

public boolean hasCursor()
TRUE if the X pointer follows device motion.

setAxisUse

public void setAxisUse(int axisIndex,
                       AxisUse use)
Specifies how an axis of a device is used.

setKeyValue

public void setKeyValue(int btnIndex,
                        int keyVal,
                        ModifierType modifier)
Specifies the X key event to generate when a macro button of a device is pressed.

setMode

public void setMode(InputMode mode)
Sets a the mode of an input device. The mode controls if the device is active and whether the device's range is mapped to the entire screen or to a single window.

setSource

public void setSource(InputSource source)
Sets the source type for an input device.