Wiki Page Content

Differences between revisions 7 and 16 (spanning 9 versions)
Revision 7 as of 2011-11-08 17:37:48
Size: 1473
Editor: SheenaSmith
Comment: update content - remarks (11/7 4d7b69e575f9); description, params
Revision 16 as of 2016-11-20 22:00:55
Size: 1342
Comment: Removed empty Related Functions section.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 12: Line 11:
||Uint32||'''windowID'''||the window with mouse focus, if any||
||SDL_TouchID||'''touchId'''||the touch device ,,id,, ^index^||
||SDL_FingerID||'''fingerId'''||||
||Uint8||'''state'''||the current button state||
||Uint16||'''x'''||^
the x-axis location of the touch event^||
||Uint16
||'''y'''||^the y-axis location of the touch event^||
||Uint16||'''dx'''||^
the distance moved in the x-axis^||
||Uint16
||'''dy'''||^the distance moved in the y-axis^||
||Uint16
||'''pressure'''||^the quantity of pressure applied^||

<<Color2
(green,Note that touchID is described as "the touch device index" in all 3 other similar functions.)>>
||Uint32||'''timestamp'''||timestamp of the event||
||SDL_TouchID||'''touchId'''||the touch device id||
||SDL_FingerID||'''fingerId'''||the finger id||
||float||'''x'''||
the x-axis location of the touch event, normalized (0...1)||
||float
||'''y'''||the y-axis location of the touch event, normalized (0...1)||
||float||'''dx'''||
the distance moved in the x-axis, normalized (-1...1)||
||float
||'''dy'''||the distance moved in the y-axis, normalized (-1...1)||
||float
||'''pressure'''||the quantity of pressure applied, normalized (0...1)||
Line 32: Line 28:

== Version ==
This structure is available since SDL 2.0.0.

Line 37: Line 38:
 .[[SDL_TouchButtonEvent]]
Line 39: Line 39:
== Related Functions ==

SDL_TouchFingerEvent

A structure that contains finger touch event information.

Data Fields

Uint32

type

SDL_FINGERMOTION, SDL_FINGERDOWN, or SDL_FINGERUP

Uint32

timestamp

timestamp of the event

SDL_TouchID

touchId

the touch device id

SDL_FingerID

fingerId

the finger id

float

x

the x-axis location of the touch event, normalized (0...1)

float

y

the y-axis location of the touch event, normalized (0...1)

float

dx

the distance moved in the x-axis, normalized (-1...1)

float

dy

the distance moved in the y-axis, normalized (-1...1)

float

pressure

the quantity of pressure applied, normalized (0...1)

Code Examples

You can add your code example here

Remarks

SDL_TouchFingerEvent is a member of the SDL_Event union and is used when an event of type SDL_FINGERMOTION, SDL_FINGERDOWN, or SDL_FINGERUP is reported. You would access it through the event's tfinger field.

Version

This structure is available since SDL 2.0.0.


CategoryStruct, CategoryEvents

None: SDL_TouchFingerEvent (last edited 2016-11-20 22:00:55 by PhilippWiesemann)

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