diff options
Diffstat (limited to 'src/multimediaquick/qtmultimediaquicktypes_p.h')
-rw-r--r-- | src/multimediaquick/qtmultimediaquicktypes_p.h | 113 |
1 files changed, 70 insertions, 43 deletions
diff --git a/src/multimediaquick/qtmultimediaquicktypes_p.h b/src/multimediaquick/qtmultimediaquicktypes_p.h index 18ee97bfa..80133c203 100644 --- a/src/multimediaquick/qtmultimediaquicktypes_p.h +++ b/src/multimediaquick/qtmultimediaquicktypes_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2022 The Qt Company -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2022 The Qt Company +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTMULTIMEDIAQUICKTYPES_H #define QTMULTIMEDIAQUICKTYPES_H @@ -74,8 +38,22 @@ struct QCameraForeign struct QImageCaptureForeign { Q_GADGET + QML_ANONYMOUS QML_FOREIGN(QImageCapture) - QML_NAMED_ELEMENT(ImageCapture) +}; + +struct QScreenCaptureForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QScreenCapture) +}; + +struct QScreenForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QScreen) }; struct QMediaRecorderForeign @@ -92,10 +70,17 @@ struct QMediaMetaDataForeign QML_NAMED_ELEMENT(mediaMetaData) }; +// To prevent the same type from being exported twice into qmltypes +// (for value type and for the enums) +struct QMediaMetaDataDerived : public QMediaMetaData +{ + Q_GADGET +}; + namespace QMediaMetaDataNamespaceForeign { Q_NAMESPACE - QML_FOREIGN_NAMESPACE(QMediaMetaData) + QML_FOREIGN_NAMESPACE(QMediaMetaDataDerived) QML_NAMED_ELEMENT(MediaMetaData) }; @@ -127,10 +112,17 @@ struct QAudioDeviceForeign QML_NAMED_ELEMENT(audioDevice) }; +// To prevent the same type from being exported twice into qmltypes +// (for value type and for the enums) +struct QAudioDeviceDerived : public QAudioDevice +{ + Q_GADGET +}; + namespace QAudioDeviceNamespaceForeign { Q_NAMESPACE - QML_FOREIGN_NAMESPACE(QAudioDevice) + QML_FOREIGN_NAMESPACE(QAudioDeviceDerived) QML_NAMED_ELEMENT(AudioDevice) }; @@ -141,10 +133,17 @@ struct QCameraDeviceForeign QML_NAMED_ELEMENT(cameraDevice) }; +// To prevent the same type from being exported twice into qmltypes +// (for value type and for the enums) +struct QCameraDeviceDerived : public QCameraDevice +{ + Q_GADGET +}; + namespace QCameraDeviceNamespaceForeign { Q_NAMESPACE - QML_FOREIGN_NAMESPACE(QCameraDevice) + QML_FOREIGN_NAMESPACE(QCameraDeviceDerived) QML_NAMED_ELEMENT(CameraDevice) }; @@ -155,10 +154,17 @@ struct QMediaFormatForeign QML_NAMED_ELEMENT(mediaFormat) }; +// To prevent the same type from being exported twice into qmltypes +// (for value type and for the enums) +struct QMediaFormatDerived : public QMediaFormat +{ + Q_GADGET +}; + namespace QMediaFormatNamespaceForeign { Q_NAMESPACE - QML_FOREIGN_NAMESPACE(QMediaFormat) + QML_FOREIGN_NAMESPACE(QMediaFormatDerived) QML_NAMED_ELEMENT(MediaFormat) }; @@ -169,6 +175,27 @@ struct QCameraFormatForeign QML_NAMED_ELEMENT(cameraFormat) }; +struct QVideoSinkForeign +{ + Q_GADGET + QML_FOREIGN(QVideoSink) + QML_NAMED_ELEMENT(VideoSink) +}; + +struct QCapturableWindowForeign +{ + Q_GADGET + QML_FOREIGN(QCapturableWindow) + QML_NAMED_ELEMENT(capturableWindow) +}; + +struct QWindowCaptureForeign +{ + Q_GADGET + QML_FOREIGN(QWindowCapture) + QML_NAMED_ELEMENT(WindowCapture) +}; + QT_END_NAMESPACE #endif |