5#include <AppKit/AppKit.h>
17#include <qbytearray.h>
20#include <qpa/qplatformwindow.h>
21#include <QtGui/qsurfaceformat.h>
23#include <qpa/qplatformopenglcontext.h>
24#include <QtGui/qopenglcontext.h>
27#include <QtGui/qguiapplication.h>
30#include <QtGui/private/qmacmimeregistry_p.h>
31#include <QtGui/private/qcoregraphics_p.h>
34#include <MoltenVK/mvk_vulkan.h>
39QCocoaNativeInterface::QCocoaNativeInterface()
45 if (!window->handle())
48 if (resourceString ==
"nsview") {
49 return static_cast<
QCocoaWindow *>(window->handle())->m_view;
50 }
else if (resourceString ==
"nswindow") {
51 return static_cast<
QCocoaWindow *>(window->handle())->nativeWindow();
53 }
else if (resourceString ==
"vkSurface") {
54 if (QVulkanInstance *instance = window->vulkanInstance())
55 return static_cast<QCocoaVulkanInstance *>(instance->handle())->surface(window);
63 if (resource.toLower() ==
"registerdraggedtypes")
64 return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerDraggedTypes));
65 if (resource.toLower() ==
"registertouchwindow")
66 return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerTouchWindow));
78 QCocoaMenuBar::updateMenuBarImmediately();
83 QMacMimeRegistry::registerDraggedTypes(types);
91 QCocoaWindow *cocoaWindow =
static_cast<QCocoaWindow *>(window->handle());
93 cocoaWindow->registerTouch(enable);
static void clearCurrentThreadCocoaEventDispatcherInterruptFlag()
Combined button and popup list for selecting options.