SDL_TouchFingerEvent (SDL2)

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

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 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

I think he may want to know on what window the touch events happen
(e.g. on which window the fingers started the gesture). This would
matter if you have multiple windows opened.

2013/3/23, Sam Lantinga :> 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 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

Yes that that is the exact reason. And it was there before, no idea why it was removed.

Now the coordinates of such event are in global coordinates or some window local coordinates? What window did they occur in?

This is not a problem on a mobile device, since there’s only one window, but on other operating systems where touch is supported this should report a window…

PavelOn 24.3.2013, at 1:11, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

I think he may want to know on what window the touch events happen
(e.g. on which window the fingers started the gesture). This would
matter if you have multiple windows opened.

2013/3/23, Sam Lantinga :

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 <@Pavel_Kanzelsberger>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


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The touch coordinates are in the 0…1 range in the horizontal and vertical
axes across the touch device. This typically means across the entire
screen in global coordinates.On Mon, Mar 25, 2013 at 3:20 AM, Pavel Kanzelsberger wrote:

Yes that that is the exact reason. And it was there before, no idea why it
was removed.

Now the coordinates of such event are in global coordinates or some window
local coordinates? What window did they occur in?

This is not a problem on a mobile device, since there’s only one window,
but on other operating systems where touch is supported this should report
a window…

Pavel

On 24.3.2013, at 1:11, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

I think he may want to know on what window the touch events happen
(e.g. on which window the fingers started the gesture). This would
matter if you have multiple windows opened.

2013/3/23, Sam Lantinga <@slouken>:

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 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


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org