Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
Factory.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 <QObject>
7
8#include <memory>
9
10#include "phosphorshortcuts_export.h"
11
13
14class IBackend;
15
23enum class BackendHint {
24 Auto,
27 Portal,
29 Native,
36};
37
51PHOSPHORSHORTCUTS_EXPORT std::unique_ptr<IBackend> createBackend(BackendHint hint = BackendHint::Auto,
52 QObject* parent = nullptr);
53
54} // namespace Phosphor::Shortcuts
Pluggable global shortcut backend.
Definition IBackend.h:29
Definition Factory.h:12
BackendHint
Backend selection hint for createBackend().
Definition Factory.h:23
@ Auto
Detect via session bus service introspection.
@ Portal
Force XDG Desktop Portal GlobalShortcuts.
@ KGlobalAccel
Force KGlobalAccel.
@ Native
Reserved for the future INativeGrabber-backed backend.
@ DBusTrigger
Force D-Bus trigger fallback.
PHOSPHORSHORTCUTS_EXPORT std::unique_ptr< IBackend > createBackend(BackendHint hint=BackendHint::Auto, QObject *parent=nullptr)
Create a backend instance.