30 Q_DECLARE_PRIVATE(QWaylandOutput)
31 Q_PROPERTY(QWaylandCompositor *compositor READ compositor WRITE setCompositor NOTIFY compositorChanged)
32 Q_PROPERTY(QWindow *window READ window WRITE setWindow NOTIFY windowChanged)
33 Q_PROPERTY(QString manufacturer READ manufacturer WRITE setManufacturer NOTIFY manufacturerChanged)
34 Q_PROPERTY(QString model READ model WRITE setModel NOTIFY modelChanged)
35 Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
36 Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged)
37 Q_PROPERTY(QRect availableGeometry READ availableGeometry WRITE setAvailableGeometry NOTIFY availableGeometryChanged)
38 Q_PROPERTY(QSize physicalSize READ physicalSize WRITE setPhysicalSize NOTIFY physicalSizeChanged)
39 Q_PROPERTY(QWaylandOutput::Subpixel subpixel READ subpixel WRITE setSubpixel NOTIFY subpixelChanged)
40 Q_PROPERTY(QWaylandOutput::Transform transform READ transform WRITE setTransform NOTIFY transformChanged)
41 Q_PROPERTY(
int scaleFactor READ scaleFactor WRITE setScaleFactor NOTIFY scaleFactorChanged)
42 Q_PROPERTY(
bool sizeFollowsWindow READ sizeFollowsWindow WRITE setSizeFollowsWindow NOTIFY sizeFollowsWindowChanged)
44 QML_NAMED_ELEMENT(WaylandOutputBase)
45 QML_ADDED_IN_VERSION(1, 0)
46 QML_UNCREATABLE(
"Cannot create instance of WaylandOutputBase, use WaylandOutput instead")
51 SubpixelHorizontalRgb,
52 SubpixelHorizontalBgr,
71 QWaylandOutput(QWaylandCompositor *compositor, QWindow *window);
72 ~QWaylandOutput() override;
74 static QWaylandOutput *fromResource(wl_resource *resource);
75 struct ::wl_resource *resourceForClient(QWaylandClient *client)
const;
77 QWaylandCompositor *compositor()
const;
78 void setCompositor(QWaylandCompositor *compositor);
80 QWindow *window()
const;
81 void setWindow(QWindow *window);
83 QString manufacturer()
const;
84 void setManufacturer(
const QString &manufacturer);
86 QString model()
const;
87 void setModel(
const QString &model);
89 QPoint position()
const;
90 void setPosition(
const QPoint &pt);
92 QList<QWaylandOutputMode> modes()
const;
94 void addMode(
const QWaylandOutputMode &mode,
bool preferred =
false);
96 QWaylandOutputMode currentMode()
const;
97 void setCurrentMode(
const QWaylandOutputMode &mode);
99 QRect geometry()
const;
101 QRect availableGeometry()
const;
102 void setAvailableGeometry(
const QRect &availableGeometry);
104 QSize physicalSize()
const;
105 void setPhysicalSize(
const QSize &size);
107 Subpixel subpixel()
const;
108 void setSubpixel(
const Subpixel &subpixel);
110 Transform transform()
const;
111 void setTransform(
const Transform &transform);
113 int scaleFactor()
const;
114 void setScaleFactor(
int scale);
116 bool sizeFollowsWindow()
const;
117 void setSizeFollowsWindow(
bool follow);
119 bool physicalSizeFollowsSize()
const;
120 void setPhysicalSizeFollowsSize(
bool follow);
123 void sendFrameCallbacks();
125 void surfaceEnter(QWaylandSurface *surface);
126 void surfaceLeave(QWaylandSurface *surface);
128 virtual void update();
131 void compositorChanged();
132 void windowChanged();
133 void positionChanged();
134 void geometryChanged();
136 void currentModeChanged();
137 void availableGeometryChanged();
138 void physicalSizeChanged();
139 void scaleFactorChanged();
140 void subpixelChanged();
141 void transformChanged();
142 void sizeFollowsWindowChanged();
143 void physicalSizeFollowsSizeChanged();
144 void manufacturerChanged();
146 void windowDestroyed();
149 bool event(QEvent *event) override;
151 virtual void initialize();
154 Q_PRIVATE_SLOT(d_func(),
void _q_handleMaybeWindowPixelSizeChanged())
155 Q_PRIVATE_SLOT(d_func(),
void _q_handleWindowDestroyed())