MauiKit Controls

mauimacos.cpp
1#include "mauimacos.h"
2
3#include <QUrl>
4
5MAUIMacOS::MAUIMacOS(QObject *parent) : AbstractPlatform(parent)
6{
7
8}
9
11{
12 Q_UNUSED(winId)
13
14// if(winId == -1)
15// {
16// QWindowList windows = QGuiApplication::allWindows();
17// QWindow* win = windows.first();
18// winId = win->winId();
19// }
20
21// NSView *nativeView = reinterpret_cast<NSView *>(winId);
22// NSWindow* nativeWindow = [nativeView window];
23
24// [nativeWindow setStyleMask:[nativeWindow styleMask] | NSFullSizeContentViewWindowMask | NSWindowTitleHidden ];
25// [nativeWindow setTitlebarAppearsTransparent:YES];
26// [nativeWindow setMovableByWindowBackground:YES];
27}
28
29
30
31void MAUIMacOS::runApp(const QString &app, const QList<QUrl> &files)
32{
33 Q_UNUSED(app)
34 Q_UNUSED(files)
35
36// CFURLRef appUrl = QUrl::fromLocalFile(app).toCFURL();
37
38// CFMutableArrayRef cfaFiles =
39// CFArrayCreateMutable(kCFAllocatorDefault,
40// files.count(),
41// &kCFTypeArrayCallBacks);
42// for (const QUrl &url: files) {
43// CFURLRef u = url.toCFURL();
44// CFArrayAppendValue(cfaFiles, u);
45// CFRelease(u);
46// }
47
48// LSLaunchURLSpec inspec;
49// inspec.appURL = appUrl;
50// inspec.itemURLs = cfaFiles;
51// inspec.asyncRefCon = NULL;
52// inspec.launchFlags = kLSLaunchDefaults + kLSLaunchAndDisplayErrors;
53// inspec.passThruParams = NULL;
54
55// OSStatus ret;
56// ret = LSOpenFromURLSpec(&inspec, NULL);
57// CFRelease(appUrl);
58}
59
60void MAUIMacOS::shareFiles(const QList<QUrl> &urls)
61{
62 Q_UNUSED(urls)
63}
64
65void MAUIMacOS::shareText(const QString &urls)
66{
67Q_UNUSED(urls)
68}
69
70
71bool MAUIMacOS::hasKeyboard()
72{
73return true;
74}
75
76bool MAUIMacOS::hasMouse()
77{
78 return true;
79}
80
The AbstractPlatform class Defines abstract methods and properties that are common to be implemeted b...
static void runApp(const QString &app, const QList< QUrl > &files)
runApp
Definition mauimacos.cpp:31
static void removeTitlebarFromWindow(long winId=-1)
removeTitlebarFromWindow
Definition mauimacos.cpp:10
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.