|
Size: 1456
Comment: in progress
|
Size: 1929
Comment: update content - w/ Sam (in progress)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| A structure that contains mouse motion event ,,structure,, ^information^ (event.motion.*). | A structure that contains mouse motion event information. |
| Line 11: | Line 11: |
| ||Uint8||'''type'''||SDL_MOUSEMOTION|| | ||Uint32||'''type'''||SDL_MOUSEMOTION|| |
| Line 13: | Line 13: |
| ||Uint8||'''which'''||the mouse device index|| | |
| Line 15: | Line 14: |
| ||int||'''x'''||x coordinate, relative to window|| ||int||'''y'''||y coordinate, relative to window|| ||int||'''z'''||z coordinate, for future use|| ||int||'''pressure'''||pressure reported by tablets|| ||int||'''pressure_max'''||maximum value of the pressure reported by the device|| ||int||'''pressure_min'''||minimum value of the pressure reported by the device|| ||int||'''rotation'''||for future use|| ||int||'''tilt_x'''||for future use|| ||int||'''tilt_y'''||for future use|| ||int||'''field'''||description|| ||int||'''field'''||description|| ||int||'''field'''||description|| |
||int||'''x'''||X coordinate, relative to window|| ||int||'''y'''||Y coordinate, relative to window|| ||int||'''xrel'''||relative motion in the X direction|| ||int||'''yrel'''||relative motion in the Y direction|| |
| Line 35: | Line 26: |
| ''You can add useful comments here'' | <<Color2(green,The following was taken from the old 1.2 wiki and may not be applicable to 1.3.)>> [[SDL_MouseMotionEvent]] is a member of the [[SDL_Event]] structure and is used when an event of type SDL_MOUSEMOTION is reported. An SDL_MOUSEMOTION event occurs whenever a user moves the mouse within the application window or when [[SDL_WarpMouseInWindow]]() is called. 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. <<Color2(green,There are currently no pages for SDL_!WarpMouse or SDL_WM_!GrabInput. Do they still exist in 1.3? Is [[SDL_WarpMouseInWindow]] the appropriate replacement for SDL_!WarpMouse? If it is should it be listed in RFs also?)>> |
| Line 38: | Line 39: |
| .[[SDL_EnumerationRemoveSectionIfEmpty]] | .[[SDL_EventType]] |
| Line 41: | Line 42: |
| .[[SDL_StructureRemoveSectionIfEmpty]] | .[[SDL_MouseButtonEvent]] .[[SDL_MouseWheelEvent]] |
| Line 44: | Line 46: |
| .[[SDL_FunctionLeaveSectionIfEmpty]] | |
| Line 47: | Line 48: |
| [[CategoryStruct]] | [[CategoryStruct]], [[CategoryEvents]] |
DRAFT |
SDL_MouseMotionEvent
A structure that contains mouse motion event information.
Contents
Data Fields
Uint32 |
type |
SDL_MOUSEMOTION |
Uint32 |
windowID |
the window with mouse focus, if any |
Uint8 |
state |
the current button state |
int |
x |
X coordinate, relative to window |
int |
y |
Y coordinate, relative to window |
int |
xrel |
relative motion in the X direction |
int |
yrel |
relative motion in the Y direction |
Code Examples
You can add your code example here
Remarks
green
SDL_MouseMotionEvent is a member of the SDL_Event structure and is used when an event of type SDL_MOUSEMOTION is reported.
An SDL_MOUSEMOTION event occurs whenever a user moves the mouse within the application window or when SDL_WarpMouseInWindow() is called.
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.
green
Related Enumerations
Related Structures
