11#ifndef INCGUARD_MGL_MOUSE_DELEGATE_MACOS_H_1613927027
12#define INCGUARD_MGL_MOUSE_DELEGATE_MACOS_H_1613927027
15#if defined(MGL_MOUSE_DELEGATE_ENABLE_MACOS)
18#include <AppKit/NSWindow.h>
32class MacOSMouseDelegate :
public MouseDelegate
35 MacOSMouseDelegate() noexcept;
37 void UpdateState(MouseState &state) noexcept override;
38 void PostUpdatePosition(const MouseState &state) noexcept override;
40 bool SetCursorMode(CursorMode cursorMode) noexcept override;
41 [[nodiscard]] CursorMode GetCursorMode() const noexcept override;
43 void SetCursorVisibleMode(CursorVisibleMode visibleMode) noexcept override;
44 [[nodiscard]] CursorVisibleMode GetCursorVisibleMode() const noexcept override;
53 [[nodiscard]]
bool IsConnecting() const noexcept
override
59 static void OnEventInputMouse(
void *callbackArg,
void *notifyArg)
noexcept;
60 static void OnEventShouldClearInput(
void *callbackArg,
void *notifyArg)
noexcept;
62 void UpdateButtonState(MouseButton button,
bool isPressed)
noexcept;
63 void UpdatePosition(
const Vector2 &position)
noexcept;
64 void UpdateDeltaMove(
const Vector2 &deltaMove)
noexcept;
65 void UpdateDeltaWheel(
const Vector2 &deltaWheel)
noexcept;
67 void UpdateCursorAutoErase(
const MouseState &state,
float elapsedTime)
noexcept;
68 void SetVisibleCursor(
bool isVisible)
noexcept;
70 void MoveCursorToCenter(
const NSWindow *window)
noexcept;
72 bool ShouldFixCursor(
const NSWindow *window)
const noexcept;
74 Event::Handle _eventInputMouse;
75 Event::Handle _eventShouldClearInput;
88 float _cursorDisplayTime;
89 bool _isVisibleCursor;
CursorVisibleMode
表示設定
Definition mgl_mouse_state.h:75
CursorMode
カーソルモード
Definition mgl_mouse_state.h:67
MGL::EnumBitFlags< MouseButton > MouseButtonFlags
マウスボタンの入力状態のビットフラグ型
Definition mgl_mouse_state.h:39