11 #include "threads/CriticalSection.h" 12 #include "threads/SystemClock.h" 13 #include "threads/Timer.h" 14 #include "windowing/WinSystem.h" 21 typedef struct _CGLContextObject* CGLContextObj;
22 typedef struct CGRect NSRect;
26 @class NSWindowController;
34 struct NSWindowController;
46 bool interlaced{
false};
50 size_t pixelHeight{0};
51 double refreshrate{0.0};
55 void OnTimeout()
override;
58 bool InitWindowSystem()
override;
59 bool DestroyWindowSystem()
override;
60 bool CreateNewWindow(
const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res)
override;
61 bool DestroyWindow()
override;
62 bool ResizeWindow(
int newWidth,
int newHeight,
int newLeft,
int newTop)
override;
63 bool SetFullScreen(
bool fullScreen,
RESOLUTION_INFO& res,
bool blankOtherDisplays)
override;
64 void UpdateResolutions()
override;
65 bool Minimize()
override;
66 bool Restore()
override;
68 bool HasCursor()
override;
69 bool Show(
bool raise =
true)
override;
70 unsigned int GetScreenId(
const std::string& screen)
override;
72 void OnMove(
int x,
int y)
override;
75 bool HasValidResolution()
const;
77 std::string GetClipboardText()
override;
84 void WindowChangedScreen();
86 void AnnounceOnLostDevice();
87 void AnnounceOnResetDevice();
88 void HandleOnResetDevice();
89 void StartLostDeviceTimer();
90 void StopLostDeviceTimer();
92 int CheckDisplayChanging(uint32_t flags);
93 void SetFullscreenWillToggle(
bool toggle) { m_fullscreenWillToggle = toggle; }
94 bool GetFullscreenWillToggle() {
return m_fullscreenWillToggle; }
95 void SignalFullScreenStateChanged(
bool fullscreenState);
97 CGLContextObj GetCGLContextObj();
99 std::vector<std::string> GetConnectedOutputs()
override;
102 bool MessagePump()
override;
104 NSRect GetWindowDimensions();
105 void enableInputEvents();
106 void disableInputEvents();
108 void signalMouseEntered();
109 void signalMouseExited();
110 void SendInputEvent(NSEvent* nsEvent);
113 std::unique_ptr<KODI::WINDOWING::IOSScreenSaver> GetOSScreenSaverImpl()
override;
116 void EnableVSync(
bool enable);
118 void FillInVideoModes();
121 bool DestroyWindowInternal();
123 std::unique_ptr<CWinEventsOSX> m_winEvents;
126 NSWindow* m_appWindow;
128 unsigned long m_lastDisplayNr;
129 double m_refreshRate;
131 CCriticalSection m_resourceSection;
132 std::vector<IDispResource*> m_resources;
134 bool m_delayDispReset;
136 bool m_fullscreenWillToggle;
137 bool m_hasCursor{
false};
140 CCriticalSection m_critSection;
143 NSWindowController* m_appWindowController;
Definition: WinEventsOSX.h:20
std::optional< unsigned long > m_fullScreenMovingToScreen
Set while moving the fullscreen window to another screen. Stores the target screen id...
Definition: WinSystemOSX.h:139
Definition: WinSystemOSX.h:38
Definition: WinSystem.h:49
void MoveToScreen(unsigned int screenIdx) override
Window was requested to move to the given screen.
Definition: WinSystemOSX.mm:1253
Definition: SystemClock.h:31
Definition: OSXGLView.h:13
unsigned int GetScreenId(const std::string &screen) override
Get the screen ID provided the screen name.
Definition: WinSystemOSX.mm:1248
Definition: DispResource.h:14
Provide info of a resolution.
Definition: Resolution.h:66
Definition: WinSystemOSX.h:44
Definition: VideoReferenceClock.h:19
void OnChangeScreen(unsigned int screenIdx) override
Used to signal the windowing system about the change of the current screen.
Definition: WinSystemOSX.mm:1231
Definition: GraphicContext.h:60