org.gnu.gdk
Class Device

java.lang.Object
  extended byorg.gnu.glib.GObject
      extended byorg.gnu.gdk.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.


Field Summary
 
Fields inherited from class org.gnu.glib.GObject
eventsInitialized
 
Constructor Summary
Device(Handle handle)
           
 
Method Summary
protected static boolean gdk_device_get_axis(Handle device, double[] axes, int use, double[] value)
           
protected static Handle gdk_device_get_core_pointer()
           
protected static int gdk_device_get_type()
           
protected static void gdk_device_set_axis_use(Handle device, int index, int use)
           
protected static void gdk_device_set_key(Handle device, int index, int keyval, int modifiers)
           
protected static void gdk_device_set_mode(Handle device, int mode)
           
protected static void gdk_device_set_source(Handle device, int source)
           
protected static Handle gdk_devices_list()
           
static Device getCorePointer()
          Returns the device for the core pointer.
static List getDevicesList()
           
protected static boolean getHasCursor(Handle obj)
           
 InputMode getMode()
          Returns the mode of an input device.
protected static int getMode(Handle obj)
           
 java.lang.String getName()
          Returns the name of this device.
protected static java.lang.String getName(Handle obj)
          BEGINNING OF JNI CODE
 InputSource getSource()
          Returns the type of this device.
protected static int getSource(Handle obj)
           
 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, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hashCode, hasProperty, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Device

public Device(Handle handle)
Method Detail

getName

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


getSource

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


getMode

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


hasCursor

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


getDevicesList

public static List getDevicesList()

setSource

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


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.


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.


setAxisUse

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


getCorePointer

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


getName

protected static final java.lang.String getName(Handle obj)
BEGINNING OF JNI CODE


getSource

protected static final int getSource(Handle obj)

getMode

protected static final int getMode(Handle obj)

getHasCursor

protected static final boolean getHasCursor(Handle obj)

gdk_device_get_type

protected static final int gdk_device_get_type()

gdk_devices_list

protected static final Handle gdk_devices_list()

gdk_device_set_source

protected static final void gdk_device_set_source(Handle device,
                                                  int source)

gdk_device_set_mode

protected static final void gdk_device_set_mode(Handle device,
                                                int mode)

gdk_device_set_key

protected static final void gdk_device_set_key(Handle device,
                                               int index,
                                               int keyval,
                                               int modifiers)

gdk_device_set_axis_use

protected static final void gdk_device_set_axis_use(Handle device,
                                                    int index,
                                                    int use)

gdk_device_get_axis

protected static final boolean gdk_device_get_axis(Handle device,
                                                   double[] axes,
                                                   int use,
                                                   double[] value)

gdk_device_get_core_pointer

protected static final Handle gdk_device_get_core_pointer()