Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
SurfaceManagerConfig.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <PhosphorSurfaces/phosphorsurfaces_export.h>
7
8#include <QByteArrayList>
9#include <QString>
10#include <QVersionNumber>
11
12#include <functional>
13
14QT_BEGIN_NAMESPACE
15class QQmlEngine;
16class QVulkanInstance;
17QT_END_NAMESPACE
18
19namespace PhosphorLayer {
20class SurfaceFactory;
21}
22
23namespace PhosphorSurfaces {
24
25struct PHOSPHORSURFACES_EXPORT SurfaceManagerConfig
26{
27 PhosphorLayer::SurfaceFactory* surfaceFactory = nullptr;
28
29 std::function<void(QQmlEngine&)> engineConfigurator;
30
32
33 // Caller-owned Vulkan instance. When non-null, every window created by
34 // SurfaceManager will have setVulkanInstance() called with this pointer.
35 // When null and the active Qt graphics API is Vulkan, SurfaceManager
36 // creates and owns a fallback instance internally.
37 QVulkanInstance* vulkanInstance = nullptr;
38
39 // Vulkan API version for the fallback instance (only used when
40 // vulkanInstance is null and the graphics API is Vulkan).
41 QVersionNumber vulkanApiVersion = QVersionNumber(1, 1);
42
43 // Extra Vulkan device extensions to request on every window's QRhi device
44 // (via QQuickGraphicsConfiguration::setDeviceExtensions). Qt enables only
45 // those the physical device actually supports, so listing an unsupported
46 // one is harmless. Empty by default; callers that import external buffers
47 // (e.g. dma-buf window thumbnails) populate it with the import extensions.
48 QByteArrayList vulkanDeviceExtensions;
49};
50
51} // namespace PhosphorSurfaces
Stateless constructor for Surfaces.
Definition SurfaceFactory.h:35
Definition SurfaceAnimator.h:26
Definition SurfaceManager.h:23
Definition SurfaceManagerConfig.h:26
QString pipelineCachePath
Definition SurfaceManagerConfig.h:31
QByteArrayList vulkanDeviceExtensions
Definition SurfaceManagerConfig.h:48
std::function< void(QQmlEngine &)> engineConfigurator
Definition SurfaceManagerConfig.h:29