Changeset View
Changeset View
Standalone View
Standalone View
abstract_wayland_output.h
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 58 | public: | |||
---|---|---|---|---|---|
82 | 82 | | |||
83 | /** | 83 | /** | ||
84 | * The geometry of this output in global compositor co-ordinates (i.e scaled) | 84 | * The geometry of this output in global compositor co-ordinates (i.e scaled) | ||
85 | */ | 85 | */ | ||
86 | QRect geometry() const override; | 86 | QRect geometry() const override; | ||
87 | QSize physicalSize() const override; | 87 | QSize physicalSize() const override; | ||
88 | 88 | | |||
89 | /** | 89 | /** | ||
90 | * Returns the orientation of this output. | ||||
91 | * | ||||
92 | * - Flipped along the vertical axis is landscape + inv. portrait. | ||||
93 | * - Rotated 90° and flipped along the horizontal axis is portrait + inv. landscape | ||||
94 | * - Rotated 180° and flipped along the vertical axis is inv. landscape + inv. portrait | ||||
95 | * - Rotated 270° and flipped along the horizontal axis is inv. portrait + inv. landscape + | ||||
96 | * portrait | ||||
97 | */ | ||||
98 | Transform transform() const; | ||||
99 | | ||||
100 | /** | ||||
90 | * Current refresh rate in 1/ms. | 101 | * Current refresh rate in 1/ms. | ||
91 | */ | 102 | */ | ||
92 | int refreshRate() const override; | 103 | int refreshRate() const override; | ||
93 | 104 | | |||
94 | bool isInternal() const override { | 105 | bool isInternal() const override { | ||
95 | return m_internal; | 106 | return m_internal; | ||
96 | } | 107 | } | ||
97 | 108 | | |||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 164 | virtual void updateTransform(Transform transform) { | |||
154 | Q_UNUSED(transform); | 165 | Q_UNUSED(transform); | ||
155 | } | 166 | } | ||
156 | 167 | | |||
157 | void setWaylandMode(const QSize &size, int refreshRate); | 168 | void setWaylandMode(const QSize &size, int refreshRate); | ||
158 | void setTransform(Transform transform); | 169 | void setTransform(Transform transform); | ||
159 | 170 | | |||
160 | QSize orientateSize(const QSize &size) const; | 171 | QSize orientateSize(const QSize &size) const; | ||
161 | 172 | | |||
162 | /** | | |||
163 | * Returns the orientation of this output. | | |||
164 | * | | |||
165 | * - Flipped along the vertical axis is landscape + inv. portrait. | | |||
166 | * - Rotated 90° and flipped along the horizontal axis is portrait + inv. landscape | | |||
167 | * - Rotated 180° and flipped along the vertical axis is inv. landscape + inv. portrait | | |||
168 | * - Rotated 270° and flipped along the horizontal axis is inv. portrait + inv. landscape + | | |||
169 | * portrait | | |||
170 | */ | | |||
171 | Transform transform() const; | | |||
172 | | ||||
173 | private: | 173 | private: | ||
174 | void createWaylandOutput(); | 174 | void createWaylandOutput(); | ||
175 | void createXdgOutput(); | 175 | void createXdgOutput(); | ||
176 | 176 | | |||
177 | void setTransform(KWayland::Server::OutputDeviceInterface::Transform transform); | 177 | void setTransform(KWayland::Server::OutputDeviceInterface::Transform transform); | ||
178 | 178 | | |||
179 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | 179 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | ||
180 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | 180 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | ||
Show All 11 Lines |