29 Q_DECLARE_PRIVATE(QWaylandOutput)
30 Q_PROPERTY(QWaylandCompositor *compositor READ compositor WRITE setCompositor NOTIFY compositorChanged)
31 Q_PROPERTY(QWindow *window READ window WRITE setWindow NOTIFY windowChanged)
32 Q_PROPERTY(QString manufacturer READ manufacturer WRITE setManufacturer NOTIFY manufacturerChanged)
33 Q_PROPERTY(QString model READ model WRITE setModel NOTIFY modelChanged)
34 Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
35 Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged)
36 Q_PROPERTY(QRect availableGeometry READ availableGeometry WRITE setAvailableGeometry NOTIFY availableGeometryChanged)
37 Q_PROPERTY(QSize physicalSize READ physicalSize WRITE setPhysicalSize NOTIFY physicalSizeChanged)
38 Q_PROPERTY(QWaylandOutput::Subpixel subpixel READ subpixel WRITE setSubpixel NOTIFY subpixelChanged)
39 Q_PROPERTY(QWaylandOutput::Transform transform READ transform WRITE setTransform NOTIFY transformChanged)
40 Q_PROPERTY(
int scaleFactor READ scaleFactor WRITE setScaleFactor NOTIFY scaleFactorChanged)
41 Q_PROPERTY(
bool sizeFollowsWindow READ sizeFollowsWindow WRITE setSizeFollowsWindow NOTIFY sizeFollowsWindowChanged)
43 QML_NAMED_ELEMENT(WaylandOutputBase)
44 QML_ADDED_IN_VERSION(1, 0)
45 QML_UNCREATABLE(
"Cannot create instance of WaylandOutputBase, use WaylandOutput instead")
50 SubpixelHorizontalRgb,
51 SubpixelHorizontalBgr,
70 QWaylandOutput(QWaylandCompositor *compositor, QWindow *window);
71 ~QWaylandOutput() override;
73 static QWaylandOutput *fromResource(wl_resource *resource);
74 struct ::wl_resource *resourceForClient(QWaylandClient *client)
const;
76 QWaylandCompositor *compositor()
const;
77 void setCompositor(QWaylandCompositor *compositor);
79 QWindow *window()
const;
80 void setWindow(QWindow *window);
82 QString manufacturer()
const;
83 void setManufacturer(
const QString &manufacturer);
85 QString model()
const;
86 void setModel(
const QString &model);
88 QPoint position()
const;
89 void setPosition(
const QPoint &pt);
91 QList<QWaylandOutputMode> modes()
const;
93 void addMode(
const QWaylandOutputMode &mode,
bool preferred =
false);
95 QWaylandOutputMode currentMode()
const;
96 void setCurrentMode(
const QWaylandOutputMode &mode);
98 QRect geometry()
const;
100 QRect availableGeometry()
const;
101 void setAvailableGeometry(
const QRect &availableGeometry);
103 QSize physicalSize()
const;
104 void setPhysicalSize(
const QSize &size);
106 Subpixel subpixel()
const;
107 void setSubpixel(
const Subpixel &subpixel);
109 Transform transform()
const;
110 void setTransform(
const Transform &transform);
112 int scaleFactor()
const;
113 void setScaleFactor(
int scale);
115 bool sizeFollowsWindow()
const;
116 void setSizeFollowsWindow(
bool follow);
118 bool physicalSizeFollowsSize()
const;
119 void setPhysicalSizeFollowsSize(
bool follow);
122 void sendFrameCallbacks();
124 void surfaceEnter(QWaylandSurface *surface);
125 void surfaceLeave(QWaylandSurface *surface);
127 virtual void update();
130 void compositorChanged();
131 void windowChanged();
132 void positionChanged();
133 void geometryChanged();
135 void currentModeChanged();
136 void availableGeometryChanged();
137 void physicalSizeChanged();
138 void scaleFactorChanged();
139 void subpixelChanged();
140 void transformChanged();
141 void sizeFollowsWindowChanged();
142 void physicalSizeFollowsSizeChanged();
143 void manufacturerChanged();
145 void windowDestroyed();
148 bool event(QEvent *event) override;
150 virtual void initialize();
153 Q_PRIVATE_SLOT(d_func(),
void _q_handleMaybeWindowPixelSizeChanged())
154 Q_PRIVATE_SLOT(d_func(),
void _q_handleWindowDestroyed())