1 | // Copyright (C) 2022 The Qt Company |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QTMULTIMEDIAQUICKTYPES_H |
5 | #define QTMULTIMEDIAQUICKTYPES_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtQml/qqml.h> |
19 | #include <QtMultimedia/QtMultimedia> |
20 | #include <private/qtmultimediaquickglobal_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | struct QMediaCaptureSessionForeign |
25 | { |
26 | Q_GADGET |
27 | QML_FOREIGN(QMediaCaptureSession) |
28 | QML_NAMED_ELEMENT(CaptureSession) // ### MediaCaptureSession? |
29 | }; |
30 | |
31 | struct QCameraForeign |
32 | { |
33 | Q_GADGET |
34 | QML_FOREIGN(QCamera) |
35 | QML_NAMED_ELEMENT(Camera) |
36 | }; |
37 | |
38 | struct QImageCaptureForeign |
39 | { |
40 | Q_GADGET |
41 | QML_ANONYMOUS |
42 | QML_FOREIGN(QImageCapture) |
43 | }; |
44 | |
45 | struct QScreenCaptureForeign |
46 | { |
47 | Q_GADGET |
48 | QML_ANONYMOUS |
49 | QML_FOREIGN(QScreenCapture) |
50 | }; |
51 | |
52 | struct QMediaRecorderForeign |
53 | { |
54 | Q_GADGET |
55 | QML_FOREIGN(QMediaRecorder) |
56 | QML_NAMED_ELEMENT(MediaRecorder) |
57 | }; |
58 | |
59 | struct QMediaMetaDataForeign |
60 | { |
61 | Q_GADGET |
62 | QML_FOREIGN(QMediaMetaData) |
63 | QML_NAMED_ELEMENT(mediaMetaData) |
64 | }; |
65 | |
66 | // To prevent the same type from being exported twice into qmltypes |
67 | // (for value type and for the enums) |
68 | struct QMediaMetaDataDerived : public QMediaMetaData |
69 | { |
70 | Q_GADGET |
71 | }; |
72 | |
73 | namespace QMediaMetaDataNamespaceForeign |
74 | { |
75 | Q_NAMESPACE |
76 | QML_FOREIGN_NAMESPACE(QMediaMetaDataDerived) |
77 | QML_NAMED_ELEMENT(MediaMetaData) |
78 | }; |
79 | |
80 | struct QMediaDevicesForeign |
81 | { |
82 | Q_GADGET |
83 | QML_FOREIGN(QMediaDevices) |
84 | QML_NAMED_ELEMENT(MediaDevices) |
85 | }; |
86 | |
87 | struct QAudioInputForeign |
88 | { |
89 | Q_GADGET |
90 | QML_FOREIGN(QAudioInput) |
91 | QML_NAMED_ELEMENT(AudioInput) |
92 | }; |
93 | |
94 | struct QAudioOutputForeign |
95 | { |
96 | Q_GADGET |
97 | QML_FOREIGN(QAudioOutput) |
98 | QML_NAMED_ELEMENT(AudioOutput) |
99 | }; |
100 | |
101 | struct QAudioDeviceForeign |
102 | { |
103 | Q_GADGET |
104 | QML_FOREIGN(QAudioDevice) |
105 | QML_NAMED_ELEMENT(audioDevice) |
106 | }; |
107 | |
108 | // To prevent the same type from being exported twice into qmltypes |
109 | // (for value type and for the enums) |
110 | struct QAudioDeviceDerived : public QAudioDevice |
111 | { |
112 | Q_GADGET |
113 | }; |
114 | |
115 | namespace QAudioDeviceNamespaceForeign |
116 | { |
117 | Q_NAMESPACE |
118 | QML_FOREIGN_NAMESPACE(QAudioDeviceDerived) |
119 | QML_NAMED_ELEMENT(AudioDevice) |
120 | }; |
121 | |
122 | struct QCameraDeviceForeign |
123 | { |
124 | Q_GADGET |
125 | QML_FOREIGN(QCameraDevice) |
126 | QML_NAMED_ELEMENT(cameraDevice) |
127 | }; |
128 | |
129 | // To prevent the same type from being exported twice into qmltypes |
130 | // (for value type and for the enums) |
131 | struct QCameraDeviceDerived : public QCameraDevice |
132 | { |
133 | Q_GADGET |
134 | }; |
135 | |
136 | namespace QCameraDeviceNamespaceForeign |
137 | { |
138 | Q_NAMESPACE |
139 | QML_FOREIGN_NAMESPACE(QCameraDeviceDerived) |
140 | QML_NAMED_ELEMENT(CameraDevice) |
141 | }; |
142 | |
143 | struct QMediaFormatForeign |
144 | { |
145 | Q_GADGET |
146 | QML_FOREIGN(QMediaFormat) |
147 | QML_NAMED_ELEMENT(mediaFormat) |
148 | }; |
149 | |
150 | // To prevent the same type from being exported twice into qmltypes |
151 | // (for value type and for the enums) |
152 | struct QMediaFormatDerived : public QMediaFormat |
153 | { |
154 | Q_GADGET |
155 | }; |
156 | |
157 | namespace QMediaFormatNamespaceForeign |
158 | { |
159 | Q_NAMESPACE |
160 | QML_FOREIGN_NAMESPACE(QMediaFormatDerived) |
161 | QML_NAMED_ELEMENT(MediaFormat) |
162 | }; |
163 | |
164 | struct QCameraFormatForeign |
165 | { |
166 | Q_GADGET |
167 | QML_FOREIGN(QCameraFormat) |
168 | QML_NAMED_ELEMENT(cameraFormat) |
169 | }; |
170 | |
171 | struct QVideoSinkForeign |
172 | { |
173 | Q_GADGET |
174 | QML_FOREIGN(QVideoSink) |
175 | QML_NAMED_ELEMENT(VideoSink) |
176 | }; |
177 | |
178 | struct QCapturableWindowForeign |
179 | { |
180 | Q_GADGET |
181 | QML_FOREIGN(QCapturableWindow) |
182 | QML_NAMED_ELEMENT(capturableWindow) |
183 | }; |
184 | |
185 | struct QWindowCaptureForeign |
186 | { |
187 | Q_GADGET |
188 | QML_FOREIGN(QWindowCapture) |
189 | QML_NAMED_ELEMENT(WindowCapture) |
190 | }; |
191 | |
192 | QT_END_NAMESPACE |
193 | |
194 | #endif |
195 |