dzzd
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 isMouseB1()
          Gets the mouse first button state.
 boolean isMouseB2()
          Gets the mouse second button state.
 boolean isMouseB3()
          Gets the mouse third button state.
 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

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

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