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 <QString>
9#include <QVersionNumber>
10
11#include <functional>
12
13QT_BEGIN_NAMESPACE
14class QQmlEngine;
15class QVulkanInstance;
16QT_END_NAMESPACE
17
18namespace PhosphorLayer {
19class SurfaceFactory;
20}
21
22namespace PhosphorSurfaces {
23
24struct PHOSPHORSURFACES_EXPORT SurfaceManagerConfig
25{
26 PhosphorLayer::SurfaceFactory* surfaceFactory = nullptr;
27
28 std::function<void(QQmlEngine&)> engineConfigurator;
29
31
32 // Caller-owned Vulkan instance. When non-null, every window created by
33 // SurfaceManager will have setVulkanInstance() called with this pointer.
34 // When null and the active Qt graphics API is Vulkan, SurfaceManager
35 // creates and owns a fallback instance internally.
36 QVulkanInstance* vulkanInstance = nullptr;
37
38 // Vulkan API version for the fallback instance (only used when
39 // vulkanInstance is null and the graphics API is Vulkan).
40 QVersionNumber vulkanApiVersion = QVersionNumber(1, 1);
41};
42
43} // namespace PhosphorSurfaces
Stateless constructor for Surfaces.
Definition SurfaceFactory.h:35
Definition SurfaceAnimator.h:26
Definition SurfaceManager.h:23
Definition SurfaceManagerConfig.h:25
QString pipelineCachePath
Definition SurfaceManagerConfig.h:30
std::function< void(QQmlEngine &)> engineConfigurator
Definition SurfaceManagerConfig.h:28