Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
net.java.games.input.RawDevice Class Reference

Public Member Functions

 RawDevice (RawInputEventQueue queue, long handle, int type)
 
final synchronized void addMouseEvent (long millis, int flags, int button_flags, int button_data, long raw_buttons, long last_x, long last_y, long extra_information)
 
final synchronized void addKeyboardEvent (long millis, int make_code, int flags, int vkey, int message, long extra_information)
 
final synchronized void pollMouse ()
 
final synchronized void pollKeyboard ()
 
final boolean isKeyDown (int vkey)
 
final int getWheel ()
 
final int getEventRelativeX ()
 
final int getEventRelativeY ()
 
final int getRelativeX ()
 
final int getRelativeY ()
 
final synchronized boolean getNextKeyboardEvent (RawKeyboardEvent event)
 
final synchronized boolean getNextMouseEvent (RawMouseEvent event)
 
final boolean getButtonState (int button_id)
 
final void setBufferSize (int size)
 
final int getType ()
 
final long getHandle ()
 
final String getName () throws IOException
 
final RawDeviceInfo getInfo () throws IOException
 

Static Public Attributes

static final int RI_MOUSE_LEFT_BUTTON_DOWN = 0x0001
 
static final int RI_MOUSE_LEFT_BUTTON_UP = 0x0002
 
static final int RI_MOUSE_RIGHT_BUTTON_DOWN = 0x0004
 
static final int RI_MOUSE_RIGHT_BUTTON_UP = 0x0008
 
static final int RI_MOUSE_MIDDLE_BUTTON_DOWN = 0x0010
 
static final int RI_MOUSE_MIDDLE_BUTTON_UP = 0x0020
 
static final int RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN
 
static final int RI_MOUSE_BUTTON_1_UP = RI_MOUSE_LEFT_BUTTON_UP
 
static final int RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN
 
static final int RI_MOUSE_BUTTON_2_UP = RI_MOUSE_RIGHT_BUTTON_UP
 
static final int RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN
 
static final int RI_MOUSE_BUTTON_3_UP = RI_MOUSE_MIDDLE_BUTTON_UP
 
static final int RI_MOUSE_BUTTON_4_DOWN = 0x0040
 
static final int RI_MOUSE_BUTTON_4_UP = 0x0080
 
static final int RI_MOUSE_BUTTON_5_DOWN = 0x0100
 
static final int RI_MOUSE_BUTTON_5_UP = 0x0200
 
static final int RI_MOUSE_WHEEL = 0x0400
 
static final int MOUSE_MOVE_RELATIVE = 0
 
static final int MOUSE_MOVE_ABSOLUTE = 1
 
static final int MOUSE_VIRTUAL_DESKTOP = 0x02
 
static final int MOUSE_ATTRIBUTES_CHANGED = 0x04
 
static final int RIM_TYPEHID = 2
 
static final int RIM_TYPEKEYBOARD = 1
 
static final int RIM_TYPEMOUSE = 0
 
static final int WM_KEYDOWN = 0x0100
 
static final int WM_KEYUP = 0x0101
 
static final int WM_SYSKEYDOWN = 0x0104
 
static final int WM_SYSKEYUP = 0x0105
 

Private Member Functions

final boolean updateButtonState (int button_id, int button_flags, int down_flag, int up_flag)
 
final boolean processKeyboardEvent (RawKeyboardEvent event)
 
final boolean processMouseEvent (RawMouseEvent event)
 

Static Private Member Functions

static final native String nGetName (long handle) throws IOException
 
static final native RawDeviceInfo nGetInfo (RawDevice device, long handle) throws IOException
 

Private Attributes

final RawInputEventQueue queue
 
final long handle
 
final int type
 
DataQueue keyboard_events
 
DataQueue mouse_events
 
DataQueue processed_keyboard_events
 
DataQueue processed_mouse_events
 
final boolean[] button_states = new boolean[5]
 
int wheel
 
int relative_x
 
int relative_y
 
int last_x
 
int last_y
 
int event_relative_x
 
int event_relative_y
 
int event_last_x
 
int event_last_y
 
final boolean[] key_states = new boolean[0xFF]
 

Detailed Description

Java wrapper of RAWDEVICELIST

Author
elias
Version
1.0