4#ifndef QWAYLANDCOMPOSITORQUICKEXTENSIONS_P_H
5#define QWAYLANDCOMPOSITORQUICKEXTENSIONS_P_H
18#include <QtQml/qqml.h>
19#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
20#include <QtWaylandCompositor/qwaylandquickextension.h>
22#include <QtWaylandCompositor/qwaylandcompositor.h>
23#include <QtWaylandCompositor/qwaylandquickcompositor.h>
24#include <QtWaylandCompositor/qwaylandqtwindowmanager.h>
25#include <QtWaylandCompositor/qwaylandtextinputmanager.h>
26#include <QtCore/private/qglobal_p.h>
27#include <QtWaylandCompositor/qwaylandtextinputmanagerv3.h>
28#include <QtWaylandCompositor/qwaylandqttextinputmethodmanager.h>
29#include <QtWaylandCompositor/qwaylandidleinhibitv1.h>
36 Q_PROPERTY(QQmlListProperty<QWaylandCompositorExtension> extensions READ extensions)
37 Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE
false)
38 Q_CLASSINFO(
"DefaultProperty",
"data")
39 QML_NAMED_ELEMENT(WaylandCompositor)
40 QML_ADDED_IN_VERSION(1, 0)
42 QQmlListProperty<QObject> data()
44 return QQmlListProperty<QObject>(
this, &m_objects);
47 QQmlListProperty<QWaylandCompositorExtension> extensions()
49 return QQmlListProperty<QWaylandCompositorExtension>(
this,
this,
56 static qsizetype countFunction(QQmlListProperty<QWaylandCompositorExtension> *list)
58 return static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.size();
61 static QWaylandCompositorExtension *atFunction(QQmlListProperty<QWaylandCompositorExtension> *list, qsizetype index)
63 return static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.at(index);
66 static void append_extension(QQmlListProperty<QWaylandCompositorExtension> *list, QWaylandCompositorExtension *extension)
68 QWaylandQuickCompositorQuickExtensionContainer *quickExtObj =
static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data);
69 extension->setExtensionContainer(quickExtObj);
72 static void clearFunction(QQmlListProperty<QWaylandCompositorExtension> *list)
74 static_cast<QWaylandQuickCompositorQuickExtensionContainer *>(list->data)->extension_vector.clear();
78 QList<QObject *> m_objects;
83Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandQtWindowManager, QtWindowManager, 1, 0)
84Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandIdleInhibitManagerV1,
85 IdleInhibitManagerV1, 1, 0)
86Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandTextInputManager, TextInputManager, 1, 0)
87Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandTextInputManagerV3, TextInputManagerV3,
89Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(QWaylandQtTextInputMethodManager,
90 QtTextInputMethodManager, 1, 0)