net.dzzd.access
Interface IDirectInput


public interface IDirectInput

Used for accessing keyboard and mouse at anytime.

Since:
1.0
Version:
1.0, 01/01/04
Author:
Bruno Augier
See Also:
IRender3D

Method Summary
 int getMouseDragX()
          Gets the mouse x position relative to this DirectInput component.
 int getMouseDragY()
          Gets the mouse y position relative to this DirectInput component.
 int getMouseX()
          Gets the mouse x position relative to this DirectInput component.
 int getMouseY()
          Gets the mouse y position relative to this DirectInput component.
 boolean isKey(int num)
          Gets a key state
 boolean isKey(int num, long maxTime)
          Gets a key state within a specified ms range
 boolean isMouseB1()
          Gets the mouse first button state.
 boolean isMouseB1Click(long time)
          Gets the mouse first button click state within the given time range.
 boolean isMouseB2()
          Gets the mouse second button state.
 boolean isMouseB2Click(long time)
          Gets the mouse second button click state within the given time range.
 boolean isMouseB3()
          Gets the mouse third button state.
 boolean isMouseB3Click(long time)
          Gets the mouse third button click state within the given time range.
 boolean isMouseDrag()
          Gets the mouse dragging state.
 

Method Detail

getMouseX

public int getMouseX()
Gets the mouse x position relative to this DirectInput component.

Returns:
mouse pos x

getMouseY

public int getMouseY()
Gets the mouse y position relative to this DirectInput component.

Returns:
mouse pos y

isMouseB1

public boolean isMouseB1()
Gets the mouse first button state.

Returns:
true if first mouse button is pressed

isMouseB2

public boolean isMouseB2()
Gets the mouse second button state.

Returns:
true if seconde mouse button is pressed

isMouseB3

public boolean isMouseB3()
Gets the mouse third button state.

Returns:
true if third mouse button is pressed

isMouseB1Click

public boolean isMouseB1Click(long time)
Gets the mouse first button click state within the given time range.

Parameters:
time - time range in ms
Returns:
true if first mouse button was clicked in the given ms time range

isMouseB2Click

public boolean isMouseB2Click(long time)
Gets the mouse second button click state within the given time range.

Parameters:
time - time range in ms
Returns:
true if seconde mouse button was clicked in the given ms time range

isMouseB3Click

public boolean isMouseB3Click(long time)
Gets the mouse third button click state within the given time range.

Parameters:
time - time range in ms
Returns:
true if third mouse button was clicked in the given ms time range

isMouseDrag

public boolean isMouseDrag()
Gets the mouse dragging state.

Returns:
true if user is dragging

isKey

public boolean isKey(int num)
Gets a key state

Parameters:
num - keycode of the key to return state.
Returns:
true if key n is pressed

isKey

public boolean isKey(int num,
                     long maxTime)
Gets a key state within a specified ms range

Parameters:
num - keycode of the key to return state.
maxTime - time range in ms.
Returns:
true if key n was pressed in the last maxTime range

getMouseDragX

public int getMouseDragX()
Gets the mouse x position relative to this DirectInput component.

Returns:
mouse pos x

getMouseDragY

public int getMouseDragY()
Gets the mouse y position relative to this DirectInput component.

Returns:
mouse pos y