CSFML - C binding of the Simple and Fast Multimedia Library

CSFML 3.0.0
Loading...
Searching...
No Matches
Functions
Touch.h File Reference
`#include <CSFML/Window/Export.h>`
`#include <CSFML/System/Vector2.h>`
`#include <CSFML/Window/Types.h>`

Go to the source code of this file.

## Functions
bool | sfTouch_isDown (unsigned int finger)
| Check if a touch event is currently down.
sfVector2i | sfTouch_getPosition (unsigned int finger, const sfWindow *relativeTo)
| Get the current position of a touch in window coordinates.
sfVector2i | sfTouch_getPositionWindowBase (unsigned int finger, const sfWindowBase *relativeTo)
| Get the current position of a touch in window coordinates.

## Function Documentation

## ◆ sfTouch_getPosition()

sfVector2i sfTouch_getPosition | ( | unsigned int | finger,
|  | const sfWindow * | relativeTo )

Get the current position of a touch in window coordinates.

This function returns the current touch position relative to the given window, or desktop if NULL is passed.

Parameters

  finger | Finger index
  relativeTo | Reference window

Returns
  Current position of finger, or undefined if it's not down

## ◆ sfTouch_getPositionWindowBase()

sfVector2i sfTouch_getPositionWindowBase | ( | unsigned int | finger,
|  | const sfWindowBase * | relativeTo )

Get the current position of a touch in window coordinates.

This function returns the current touch position relative to the given window base, or desktop if NULL is passed.

Parameters

  finger | Finger index
  relativeTo | Reference window

Returns
  Current position of finger, or undefined if it's not down

## ◆ sfTouch_isDown()

bool sfTouch_isDown | ( | unsigned int | finger | ) |

Check if a touch event is currently down.

Parameters

  finger | Finger index

Returns
  true if finger is currently touching the screen, false otherwise