Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qcocoanativeinterface.mm
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
<
AppKit
/
AppKit
.
h
>
6
7
#
include
"qcocoanativeinterface.h"
8
#
include
"qcocoawindow.h"
9
#
include
"qcocoamenu.h"
10
#
include
"qcocoansmenu.h"
11
#
include
"qcocoamenubar.h"
12
#
include
"qcocoahelpers.h"
13
#
include
"qcocoaapplicationdelegate.h"
14
#
include
"qcocoaintegration.h"
15
#
include
"qcocoaeventdispatcher.h"
16
17
#
include
<
qbytearray
.
h
>
18
#
include
<
qwindow
.
h
>
19
#
include
<
qpixmap
.
h
>
20
#
include
<
qpa
/
qplatformwindow
.
h
>
21
#
include
<
QtGui
/
qsurfaceformat
.
h
>
22
#
ifndef
QT_NO_OPENGL
23
#
include
<
qpa
/
qplatformopenglcontext
.
h
>
24
#
include
<
QtGui
/
qopenglcontext
.
h
>
25
#
include
"qcocoaglcontext.h"
26
#
endif
27
#
include
<
QtGui
/
qguiapplication
.
h
>
28
#
include
<
qdebug
.
h
>
29
30
#
include
<
QtGui
/
private
/
qmacmimeregistry_p
.
h
>
31
#
include
<
QtGui
/
private
/
qcoregraphics_p
.
h
>
32
33
#
if
QT_CONFIG
(
vulkan
)
34
#
include
<
MoltenVK
/
mvk_vulkan
.
h
>
35
#
endif
36
37
QT_BEGIN_NAMESPACE
38
39
QCocoaNativeInterface::QCocoaNativeInterface()
40
{
41
}
42
43
void
*
QCocoaNativeInterface
::nativeResourceForWindow(
const
QByteArray
&resourceString, QWindow *window)
44
{
45
if
(!window->handle())
46
return
nullptr
;
47
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();
52
#
if
QT_CONFIG
(
vulkan
)
53
}
else
if
(resourceString ==
"vkSurface"
) {
54
if
(QVulkanInstance *instance = window->vulkanInstance())
55
return
static_cast
<QCocoaVulkanInstance *>(instance->handle())->surface(window);
56
#
endif
57
}
58
return
nullptr
;
59
}
60
61
QPlatformNativeInterface::NativeResourceForIntegrationFunction
QCocoaNativeInterface
::nativeResourceFunctionForIntegration(
const
QByteArray
&resource)
62
{
63
if
(resource.toLower() ==
"registerdraggedtypes"
)
64
return
NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerDraggedTypes));
65
return
nullptr
;
66
}
67
68
void
QCocoaNativeInterface
::clearCurrentThreadCocoaEventDispatcherInterruptFlag()
69
{
70
QCocoaEventDispatcher
::
clearCurrentThreadCocoaEventDispatcherInterruptFlag
(
)
;
71
}
72
73
void
QCocoaNativeInterface
::registerDraggedTypes(
const
QStringList &types)
74
{
75
QMacMimeRegistry::registerDraggedTypes(types);
76
}
77
78
QT_END_NAMESPACE
QByteArray::FromBase64Result
\inmodule QtCore
Definition
qbytearray.h:824
QCocoaEventDispatcher
Definition
qcocoaeventdispatcher.h:46
QCocoaEventDispatcher::clearCurrentThreadCocoaEventDispatcherInterruptFlag
static void clearCurrentThreadCocoaEventDispatcherInterruptFlag()
Definition
qcocoaeventdispatcher.mm:936
QCocoaNativeInterface
Definition
qcocoanativeinterface.h:22
QCocoaWindow
Definition
qcocoawindow.h:74
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
cocoa
qcocoanativeinterface.mm
Generated on
for Qt by
1.18.0