MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_touch_delegate_event.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_TOUCH_DELEGATE_EVENT_H_1613414551
12#define INCGUARD_MGL_TOUCH_DELEGATE_EVENT_H_1613414551
13
14#include <mgl/mgl_environment.h>
15#if defined(MGL_TOUCH_DELEGATE_ENABLE_EVENT)
16
17#include <type_traits>
18
19#include <mgl/event/mgl_event.h>
21
22namespace MGL::Input
23{
25enum class TouchEventType : uint8_t
26{
27 None,
28 Begin,
29 Move,
30 End,
31};
32
34struct TouchEventArgument
35{
36 TouchEventType type{TouchEventType::None};
37 Vector2 position;
38 uint64_t deviceID{0};
39};
40
42class EventTouchDelegate : public TouchDelegate
43{
44public:
45 EventTouchDelegate() noexcept;
46
47 void UpdateState(TouchStateArray &stateArray) noexcept override;
48
49private:
50 static void OnEventInputTouch(void *callbackArg, void *notifyArg) noexcept;
51
52 void OnBegin(uint64_t deviceID, const Vector2 &position) noexcept;
53 void OnMove(uint64_t deviceID, const Vector2 &position) noexcept;
54 void OnEnd(uint64_t deviceID) noexcept;
55
56 Event::Handle _event;
57 TouchStateArray _stateArray;
58
59 TouchID _currentTouchID;
60};
61
62} // namespace MGL::Input
63
64#endif // MGL_TOUCH_DELEGATE_ENABLE_EVENT
65#endif // INCGUARD_MGL_TOUCH_DELEGATE_EVENT_H_1613414551
66
67// vim: et ts=4 sw=4 sts=4
MGL 環境定義
MGL イベント
Result Move(const PathView &sourcePath, const PathView &destPath) noexcept
ファイルの移動・リネーム
Definition mgl_file_accessor.cc:463
@ End
末尾から
MGL タッチ入力デリゲート基底クラス