| 1 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 2 |
|
| 3 |
#pragma once |
| 4 |
|
| 5 |
|
| 6 |
#include "platform/platformnativeinterface.h" |
| 7 |
|
| 8 |
#include <QKeyEvent> |
| 9 |
#include <QString> |
| 10 |
|
| 11 |
class MacPlatform final : public PlatformNativeInterface |
| 12 |
{ |
| 13 |
public: |
| 14 |
MacPlatform(); |
| 15 |
|
| 16 |
PlatformWindowPtr getWindow(WId winId) override; |
| 17 |
PlatformWindowPtr getCurrentWindow() override; |
| 18 |
|
| 19 |
bool canGetWindowTitle() override { return true; } |
| 20 |
bool canAutostart() override { return true; } |
| 21 |
bool isAutostartEnabled() override; |
| 22 |
void setAutostartEnabled(bool) override; |
| 23 |
bool setPreventScreenCapture(WId, bool) override { return false; } |
| 24 |
bool canPreventScreenCapture() override { return false; } |
| 25 |
|
| 26 |
QCoreApplication *createConsoleApplication(int &argc, char **argv) override; |
| 27 |
|
| 28 |
QApplication *createServerApplication(int &argc, char **argv) override; |
| 29 |
|
| 30 |
QGuiApplication *createClipboardProviderApplication(int &argc, char **argv) override; |
| 31 |
|
| 32 |
QCoreApplication *createClientApplication(int &argc, char **argv) override; |
| 33 |
|
| 34 |
QGuiApplication *createTestApplication(int &argc, char **argv) override; |
| 35 |
|
| 36 |
PlatformClipboardPtr clipboard() override; |
| 37 |
|
| 38 |
QStringList getCommandLineArguments(int argc, char **argv) override; |
| 39 |
|
| 40 |
bool findPluginDir(QDir *pluginsDir) override; |
| 41 |
|
| 42 |
QString defaultEditorCommand() override; |
| 43 |
|
| 44 |
QString translationPrefix() override; |
| 45 |
|
| 46 |
QString themePrefix() override; |
| 47 |
|
| 48 |
qint64 processResidentMemoryBytes(qint64 pid) override; |
| 49 |
}; |