sfml 0.25.1

Rust binding for sfml
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "System/Vector2.hpp"
#include <SFML/Window/Touch.hpp>
#include <SFML/Window/Window.hpp>

extern "C" bool sfTouch_isDown(unsigned int finger) {
    return sf::Touch::isDown(finger);
}

extern "C" sfVector2i sfTouch_getPosition(unsigned int finger) {
    sf::Vector2i pos = sf::Touch::getPosition(finger);
    return {pos.x, pos.y};
}

extern "C" sfVector2i sfTouch_getPositionRelativeTo(unsigned int finger, const sf::Window *relativeTo) {
    sf::Vector2i pos = sf::Touch::getPosition(finger, *relativeTo);
    return {pos.x, pos.y};
}