载入中...
搜索中...
未找到
Touch.h
浏览该文件的文档.
1#pragma once
2
3#include "touch/Touch.h"
4
5
6namespace eve::touch::sdl
7{
8
11{
12public:
13 virtual ~Touch() {}
14
15 const std::vector<TouchInfo> &getTouches() const override;
16 const TouchInfo &getTouch(int64_t id) const override;
17
19 void onEvent(uint32_t eventtype, const TouchInfo &info);
20
21private:
22
23 // All current touches.
24 std::vector<TouchInfo> touches;
25
26}; // Touch
27
28} // eve::touch::sdl
29
30
SDL 触摸后端实现(状态由事件驱动更新)。
Definition Touch.h:11
void onEvent(uint32_t eventtype, const TouchInfo &info)
由事件转换器在 SDL 事件回调中更新触点状态(见事件模块)。
Definition Touch.cpp:24
virtual ~Touch()
Definition Touch.h:13
const std::vector< TouchInfo > & getTouches() const override
Gets all currently active touches.
Definition Touch.cpp:14
const TouchInfo & getTouch(int64_t id) const override
Gets a specific touch, using its ID.
Definition Touch.cpp:16