File indexing completed on 2024-06-02 04:50:34
0001 #include "mauimacos.h" 0002 0003 #include <QUrl> 0004 0005 MAUIMacOS::MAUIMacOS(QObject *parent) : AbstractPlatform(parent) 0006 { 0007 0008 } 0009 0010 void MAUIMacOS::removeTitlebarFromWindow(long winId) 0011 { 0012 Q_UNUSED(winId) 0013 0014 // if(winId == -1) 0015 // { 0016 // QWindowList windows = QGuiApplication::allWindows(); 0017 // QWindow* win = windows.first(); 0018 // winId = win->winId(); 0019 // } 0020 0021 // NSView *nativeView = reinterpret_cast<NSView *>(winId); 0022 // NSWindow* nativeWindow = [nativeView window]; 0023 0024 // [nativeWindow setStyleMask:[nativeWindow styleMask] | NSFullSizeContentViewWindowMask | NSWindowTitleHidden ]; 0025 // [nativeWindow setTitlebarAppearsTransparent:YES]; 0026 // [nativeWindow setMovableByWindowBackground:YES]; 0027 } 0028 0029 0030 0031 void MAUIMacOS::runApp(const QString &app, const QList<QUrl> &files) 0032 { 0033 Q_UNUSED(app) 0034 Q_UNUSED(files) 0035 0036 // CFURLRef appUrl = QUrl::fromLocalFile(app).toCFURL(); 0037 0038 // CFMutableArrayRef cfaFiles = 0039 // CFArrayCreateMutable(kCFAllocatorDefault, 0040 // files.count(), 0041 // &kCFTypeArrayCallBacks); 0042 // for (const QUrl &url: files) { 0043 // CFURLRef u = url.toCFURL(); 0044 // CFArrayAppendValue(cfaFiles, u); 0045 // CFRelease(u); 0046 // } 0047 0048 // LSLaunchURLSpec inspec; 0049 // inspec.appURL = appUrl; 0050 // inspec.itemURLs = cfaFiles; 0051 // inspec.asyncRefCon = NULL; 0052 // inspec.launchFlags = kLSLaunchDefaults + kLSLaunchAndDisplayErrors; 0053 // inspec.passThruParams = NULL; 0054 0055 // OSStatus ret; 0056 // ret = LSOpenFromURLSpec(&inspec, NULL); 0057 // CFRelease(appUrl); 0058 } 0059 0060 void MAUIMacOS::shareFiles(const QList<QUrl> &urls) 0061 { 0062 Q_UNUSED(urls) 0063 } 0064 0065 void MAUIMacOS::shareText(const QString &urls) 0066 { 0067 Q_UNUSED(urls) 0068 } 0069 0070 0071 bool MAUIMacOS::hasKeyboard() 0072 { 0073 return true; 0074 } 0075 0076 bool MAUIMacOS::hasMouse() 0077 { 0078 return true; 0079 } 0080