org.gnu.gdk

Class Device

public class Device extends GObject

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may exist in java-gnome 4.0; look out for org.gnome.gdk.Device.

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 DevicegetCorePointer()
Returns the device for the core pointer.
static ListgetDevices()
Returns the list of available input devices for the default display.
static ListgetDevicesList()
InputModegetMode()
Returns the mode of an input device.
StringgetName()
Returns the name of this device.
InputSourcegetSource()
Returns the type of this device.
booleanhasCursor()
TRUE if the X pointer follows device motion.
voidsetAxisUse(int axisIndex, AxisUse use)
Specifies how an axis of a device is used.
voidsetKeyValue(int btnIndex, int keyVal, ModifierType modifier)
Specifies the X key event to generate when a macro button of a device is pressed.
voidsetMode(InputMode mode)
Sets a the mode of an input device.
voidsetSource(InputSource source)
Sets the source type for an input device.

Constructor Detail

Device

public Device(Handle handle)

Method Detail

getCorePointer

public static Device getCorePointer()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the device for the core pointer.

getDevices

public static List getDevices()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

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 Device instead. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

getMode

public InputMode getMode()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the mode of an input device.

getName

public String getName()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the name of this device.

getSource

public InputSource getSource()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the type of this device.

hasCursor

public boolean hasCursor()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

TRUE if the X pointer follows device motion.

setAxisUse

public void setAxisUse(int axisIndex, AxisUse use)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Specifies how an axis of a device is used.

setKeyValue

public void setKeyValue(int btnIndex, int keyVal, ModifierType modifier)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Specifies the X key event to generate when a macro button of a device is pressed.

setMode

public void setMode(InputMode mode)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

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)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the source type for an input device.