|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljava.event.SDLEvent sdljava.event.SDLMouseMotionEvent
public class SDLMouseMotionEvent
Simply put, a SDL_MOUSEMOTION type event occurs when a user moves the mouse within the application window or when SDL_WarpMouse is called. Both the absolute (x and y) and relative (xrel and yrel) coordinates are reported along with the current button states (state). The button state can be interpreted using the SDL_BUTTON macro (see SDL_GetMouseState).
If the cursor is hidden (SDL_ShowCursor(0)) and the input is grabbed (SDL_WM_GrabInput(SDL_GRAB_ON)), then the mouse will give relative motion events even when the cursor reaches the edge of the screen. This is currently only implemented on Windows and Linux/Unix-alikes.
Field Summary | |
---|---|
(package private) SDL_MouseMotionEvent |
swigMouseMotionEvent
Reference to the SWIG generated |
(package private) int |
x
|
(package private) int |
y
|
Constructor Summary | |
---|---|
SDLMouseMotionEvent()
|
Method Summary | |
---|---|
MouseButtonState |
getState()
The current button state |
SDL_MouseMotionEvent |
getSwigMouseMotionEvent()
Gets the value of swigMouseMotionEvent |
int |
getType()
The type of the this event |
int |
getWhich()
Describe getWhich method here. |
int |
getX()
The X co-ordinate |
int |
getXrel()
The relative X motion |
int |
getY()
The Y co-oridante |
int |
getYrel()
THe relative Y motion |
void |
setSwigMouseMotionEvent(SDL_MouseMotionEvent argSwigMouseMotionEvent)
Sets the value of swigMouseMotionEvent |
void |
setX(int newX)
|
void |
setY(int newY)
|
java.lang.String |
toString()
|
Methods inherited from class sdljava.event.SDLEvent |
---|
enableKeyRepeat, enableUNICODE, eventState, getAppState, getKeyName, getModState, getMouseState, getRelativeMouseState, joystickEventState, pollEvent, pollEvent, processEvent, pumpEvents, setModState, waitEvent, waitEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
SDL_MouseMotionEvent swigMouseMotionEvent
int x
int y
Constructor Detail |
---|
public SDLMouseMotionEvent()
Method Detail |
---|
public SDL_MouseMotionEvent getSwigMouseMotionEvent()
public void setSwigMouseMotionEvent(SDL_MouseMotionEvent argSwigMouseMotionEvent)
argSwigMouseMotionEvent
- Value to assign to this.swigMouseMotionEventpublic int getWhich()
getWhich
method here.
short
valuepublic MouseButtonState getState()
short
valuepublic int getX()
int
valuepublic void setX(int newX)
public int getY()
int
valuepublic void setY(int newY)
public int getXrel()
short
valuepublic int getYrel()
short
valuepublic int getType()
getType
in class SDLEvent
public java.lang.String toString()
toString
in class java.lang.Object
String
representation of myself
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |