[SDL] SDL_TouchFingerEvent (SDL2)

Sam Lantinga slouken at libsdl.org
Sat Mar 23 17:06:58 PDT 2013


Touch events are not associated with a window, they are associated with a
touch device.

On Sat, Mar 23, 2013 at 12:46 PM, Pavel Kanzelsberger <kanzels at gmail.com>wrote:

> Hello guys,
>
> I pulled the latest version of SDL 2 and my programs won't compile, since
> there's now windowID removed from this structure:
>
> /**
>  *  \brief Touch finger event structure (event.tfinger.*)
>  */
> typedef struct SDL_TouchFingerEvent
> {
>     Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or
> ::SDL_FINGERUP */
>     Uint32 timestamp;
>     SDL_TouchID touchId; /**< The touch device id */
>     SDL_FingerID fingerId;
>     float x;            /**< Normalized in the range 0...1 */
>     float y;            /**< Normalized in the range 0...1 */
>     float dx;           /**< Normalized in the range 0...1 */
>     float dy;           /**< Normalized in the range 0...1 */
>     float pressure;     /**< Normalized in the range 0...1 */
> } SDL_TouchFingerEvent;
>
> However it is present in all other events that has something to do with a
> window. Now how do I know in what window this touch event happened??? On
> iOS this is simple, since there's only one window, but I thought it will
> work on OS X for example too. And there you can have multiple windows.
>
> regards,
> Pavel Kanzelsberger
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130323/9f58dd7a/attachment-0009.htm>


More information about the SDL mailing list