Changeset View
Changeset View
Standalone View
Standalone View
src/client/outputdevice.h
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 84 | enum class Transform { | |||
---|---|---|---|---|---|
90 | Flipped90, | 90 | Flipped90, | ||
91 | Flipped180, | 91 | Flipped180, | ||
92 | Flipped270 | 92 | Flipped270 | ||
93 | }; | 93 | }; | ||
94 | enum class Enablement { | 94 | enum class Enablement { | ||
95 | Disabled = 0, | 95 | Disabled = 0, | ||
96 | Enabled = 1 | 96 | Enabled = 1 | ||
97 | }; | 97 | }; | ||
98 | enum class TriggerReason { | ||||
99 | None = 0, | ||||
100 | Explicit = 1 << 0, | ||||
101 | Hotplug = 1 << 1, | ||||
102 | Dpms = 1 << 2, | ||||
103 | Enablement = 1 << 3 | ||||
104 | }; | ||||
105 | enum class TriggerDirection { | ||||
106 | None = 0, | ||||
107 | Up = 1 << 0, | ||||
108 | Down = 1 << 1 | ||||
109 | }; | ||||
98 | struct Mode { | 110 | struct Mode { | ||
99 | enum class Flag { | 111 | enum class Flag { | ||
100 | None = 0, | 112 | None = 0, | ||
101 | Current = 1 << 0, | 113 | Current = 1 << 0, | ||
102 | Preferred = 1 << 1 | 114 | Preferred = 1 << 1 | ||
103 | }; | 115 | }; | ||
104 | Q_DECLARE_FLAGS(Flags, Flag) | 116 | Q_DECLARE_FLAGS(Flags, Flag) | ||
105 | /** | 117 | /** | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | |||||
204 | * Scaling factor of this output. | 216 | * Scaling factor of this output. | ||
205 | * | 217 | * | ||
206 | * A scale larger than 1 means that the compositor will automatically scale surface buffers | 218 | * A scale larger than 1 means that the compositor will automatically scale surface buffers | ||
207 | * by this amount when rendering. This is used for very high resolution displays where | 219 | * by this amount when rendering. This is used for very high resolution displays where | ||
208 | * applications rendering at the native resolution would be too small to be legible. | 220 | * applications rendering at the native resolution would be too small to be legible. | ||
209 | * @since 5.50 | 221 | * @since 5.50 | ||
210 | **/ | 222 | **/ | ||
211 | qreal scaleF() const; | 223 | qreal scaleF() const; | ||
224 | | ||||
212 | /** | 225 | /** | ||
213 | * Subpixel orientation of this OutputDevice. | 226 | * Subpixel orientation of this OutputDevice. | ||
214 | **/ | 227 | **/ | ||
215 | SubPixel subPixel() const; | 228 | SubPixel subPixel() const; | ||
229 | | ||||
216 | /** | 230 | /** | ||
217 | * Transform that maps framebuffer to OutputDevice. | 231 | * Transform that maps framebuffer to OutputDevice. | ||
218 | * | 232 | * | ||
219 | * The purpose is mainly to allow clients render accordingly and tell the compositor, | 233 | * The purpose is mainly to allow clients render accordingly and tell the compositor, | ||
220 | * so that for fullscreen surfaces, the compositor will still be able to scan out | 234 | * so that for fullscreen surfaces, the compositor will still be able to scan out | ||
221 | * directly from client surfaces. | 235 | * directly from client surfaces. | ||
222 | **/ | 236 | **/ | ||
223 | Transform transform() const; | 237 | Transform transform() const; | ||
224 | /** | 238 | /** | ||
225 | * Color curves. | 239 | * Color curves. | ||
226 | * @since 5.50 | 240 | * @since 5.50 | ||
227 | **/ | 241 | **/ | ||
228 | ColorCurves colorCurves() const; | 242 | ColorCurves colorCurves() const; | ||
229 | 243 | | |||
230 | /** | 244 | /** | ||
245 | * @brief The clone group id of this output | ||||
246 | * | ||||
247 | * Returns 0 when the output does not have any clones. | ||||
248 | * | ||||
249 | * @returns Clone group id | ||||
250 | * | ||||
251 | * @since 5.62 | ||||
252 | **/ | ||||
253 | quint32 cloneGroupId() const; | ||||
254 | | ||||
255 | /** | ||||
256 | * @brief The replication source uuid to this output | ||||
257 | * | ||||
258 | * If this output is a replica this returns the uuid of its source. Otherwise a null byte array | ||||
259 | * is returned. | ||||
260 | * | ||||
261 | * @returns Replication source | ||||
262 | * | ||||
263 | * @since 5.62 | ||||
264 | **/ | ||||
265 | QByteArray replicationSource() const; | ||||
266 | | ||||
267 | /** | ||||
231 | * @returns The Modes of this OutputDevice. | 268 | * @returns The Modes of this OutputDevice. | ||
232 | **/ | 269 | **/ | ||
233 | QList<Mode> modes() const; | 270 | QList<Mode> modes() const; | ||
234 | 271 | | |||
235 | KWayland::Client::OutputDevice::Mode currentMode() const; | 272 | KWayland::Client::OutputDevice::Mode currentMode() const; | ||
236 | 273 | | |||
237 | | ||||
238 | /** | 274 | /** | ||
239 | * Sets the @p queue to use for bound proxies. | 275 | * Sets the @p queue to use for bound proxies. | ||
240 | **/ | 276 | **/ | ||
241 | void setEventQueue(EventQueue *queue); | 277 | void setEventQueue(EventQueue *queue); | ||
242 | /** | 278 | /** | ||
243 | * @returns The event queue to use for bound proxies. | 279 | * @returns The event queue to use for bound proxies. | ||
244 | **/ | 280 | **/ | ||
245 | EventQueue *eventQueue() const; | 281 | EventQueue *eventQueue() const; | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 310 | Q_SIGNALS: | |||
300 | * Emitted whenever a Mode changes. | 336 | * Emitted whenever a Mode changes. | ||
301 | * This normally means that the @c Mode::Flag::Current is added or removed. | 337 | * This normally means that the @c Mode::Flag::Current is added or removed. | ||
302 | * @param mode The changed Mode | 338 | * @param mode The changed Mode | ||
303 | **/ | 339 | **/ | ||
304 | void modeChanged(const KWayland::Client::OutputDevice::Mode &mode); | 340 | void modeChanged(const KWayland::Client::OutputDevice::Mode &mode); | ||
305 | /** | 341 | /** | ||
306 | * Emitted whenever the color curves changed. | 342 | * Emitted whenever the color curves changed. | ||
307 | * | 343 | * | ||
308 | * @since 5.TODO | 344 | * @since 5.49 | ||
309 | **/ | 345 | **/ | ||
310 | void colorCurvesChanged(); | 346 | void colorCurvesChanged(); | ||
311 | /** | 347 | /** | ||
348 | * Emitted whenever the replication source changes. | ||||
349 | * | ||||
350 | * @since 5.62 | ||||
351 | **/ | ||||
352 | void replicationSourceChanged(QByteArray source, TriggerReason trigger, | ||||
353 | TriggerDirection direction); | ||||
354 | /** | ||||
312 | * The corresponding global for this interface on the Registry got removed. | 355 | * The corresponding global for this interface on the Registry got removed. | ||
313 | * | 356 | * | ||
314 | * This signal gets only emitted if the OutputDevice got created by | 357 | * This signal gets only emitted if the OutputDevice got created by | ||
315 | * Registry::createOutputDevice | 358 | * Registry::createOutputDevice | ||
316 | * | 359 | * | ||
317 | * @since 5.5 | 360 | * @since 5.5 | ||
318 | **/ | 361 | **/ | ||
319 | void removed(); | 362 | void removed(); | ||
Show All 17 Lines |