Debian Codegraph @

src/platform/mac/macplatformwindow.h

raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #pragma once
4
5 #include "objcstrong.h"
6
7 #include "platform/platformwindow.h"
8
9 // For WId
10 #include <QWidget>
11
12 @class NSWindow;
13 @class NSRunningApplication;
14
15 class MacPlatformWindow final : public PlatformWindow
16 {
17 public:
18 MacPlatformWindow();
19 explicit MacPlatformWindow(WId wid);
20 explicit MacPlatformWindow(NSRunningApplication *runningApplication);
21
22 virtual ~MacPlatformWindow();
23
24 /**
25 * Return window title text of current window.
26 *
27 * On OS X, this gets the title of the application instead of the window.
28 */
29 QString getTitle() override;
30
31 void raise() override;
32 bool pasteFromClipboard() override;
33 bool copyToClipboard() override;
34 bool matchesWidget(const QWidget *widget) const override;
35
36 private:
37 // Don't allow copies
38 Q_DISABLE_COPY(MacPlatformWindow)
39
40 long int m_windowNumber = -1;
41 ObjCStrong<NSWindow> m_window;
42 ObjCStrong<NSRunningApplication> m_runningApplication;
43 };