Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
IOSDFactory.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3#pragma once
4
6#include <PhosphorRegistry/phosphorregistry_export.h>
7
8#include <QtCore/qtclasshelpermacros.h>
9
10QT_BEGIN_NAMESPACE
11class QObject;
12class QQmlEngine;
13class QQuickItem;
14QT_END_NAMESPACE
15
16namespace PhosphorRegistry {
17
18// Factory for one on-screen display surface (volume, mic mute,
19// brightness, caps-lock, num-lock). OSDs are short-lived: the host
20// instantiates the QQuickItem when the OSD is triggered, fades it
21// in, holds for a timeout, fades out, destroys.
22//
23// Phase 1.3 ships this as a documented header; the consuming OSD
24// framework lands in Phase 3.3.
25class PHOSPHORREGISTRY_EXPORT IOSDFactory : public IFactoryBase
26{
27public:
28 IOSDFactory() = default;
29 ~IOSDFactory() override = default;
30 Q_DISABLE_COPY_MOVE(IOSDFactory)
31
32 // Construct an OSD QQuickItem rooted at parent. engine MUST NOT
33 // be null. The OSD host owns the item's lifetime and triggers
34 // its fade-in / fade-out via the standard PopoutHost-style
35 // open/dismissed contract that the OSD framework will define
36 // in Phase 3.3.
37 [[nodiscard]] virtual QQuickItem* createOSD(QQmlEngine* engine, QObject* parent) = 0;
38};
39
40} // namespace PhosphorRegistry
virtual QQuickItem * createOSD(QQmlEngine *engine, QObject *parent)=0
~IOSDFactory() override=default
Definition IBarWidgetFactory.h:16