Wiki Page Content

Differences between revisions 4 and 5
Revision 4 as of 2010-07-28 04:52:32
Size: 2943
Editor: SheenaSmith
Comment: update content - changeset 4568
Revision 5 as of 2010-08-13 01:15:56
Size: 2099
Editor: SheenaSmith
Comment: update content
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
<<Color2(green,I think the remainder of these are to be deleted but want to be sure first.)>>

||<style="color: #808080;">int||<style="color: #808080;">'''z'''||<style="color: #808080;">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||
||<style="color: #808080;">int||<style="color: #808080;">'''rotation'''||<style="color: #808080;">for future use||
||<style="color: #808080;">int||<style="color: #808080;">'''tilt_x'''||<style="color: #808080;">for future use||
||<style="color: #808080;">int||<style="color: #808080;">'''tilt_y'''||<style="color: #808080;">for future use||
||int||'''cursor'''||the cursor being used in the event||

DRAFT

SDL_MouseMotionEvent

A structure that contains mouse motion event structure information (event.motion.*).

Data Fields

Uint32

type

SDL_MOUSEMOTION

Uint32

windowID

the window with mouse focus, if any

Uint8

state

the current button state

Uint8

padding1

Uint8

padding2

Uint8

padding3

int

x

X coordinate, relative to window

int

y

Y coordinate, relative to window

int

xrel

the relative motion in the X direction

int

yrel

the 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 union and is used when an event of type SDL_MOUSEMOTION is reported.

  • Simply put, a SDL_MOUSEMOTION type event occurs when a user moves the mouse within the application window or when SDL_WarpMouse^InWindow^???() 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.

green


CategoryStruct

None: SDL_MouseMotionEvent (last edited 2013-09-05 20:20:21 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit