![]() |
Heaven v0.1.0-1
C++ global-menu library for Wayland sessions
|
Core class representing a bar application. More...
#include "HNBar.h"


Public Member Functions | |
| HNCompositor * | compositor () const noexcept |
| Returns the currently bound compositor. | |
| HNClient * | activeClient () const noexcept |
| Returns the currently active client. | |
| HNClient * | getClientById (const char *id) const noexcept |
| Retrieves a client by its DBus identifier. | |
Static Public Member Functions | |
| static std::shared_ptr< HNBar > | GetOrMake () noexcept |
| Retrieves the singleton bar instance, creating it if necessary. | |
| static std::shared_ptr< HNBar > | Get () noexcept |
| Retrieves the existing bar instance. | |
Data Fields | |
| CZSignal< HNBar * > | onCompositorChanged |
| Emitted when a compositor connection is established or lost. | |
| CZSignal< HNBar * > | onActiveClientChanged |
| Emitted when the active client changes. | |
| CZSignal< HNClient * > | onClientCreated |
| Emitted when a new client is connected. | |
| CZSignal< HNClient * > | onClientDestroyed |
| Emitted when a client is disconnected. | |
| CZSignal< HNClient * > | onClientNameChanged |
| Emitted when a client changes its application name. | |
| CZSignal< HNClient * > | onClientTopbarChanged |
| Emitted when a client's active top bar changes. | |
| CZSignal< HNObject * > | onObjectCreated |
| Emitted when a client creates a new object. | |
| CZSignal< HNObject * > | onObjectDestroyed |
| Emitted when a client object is destroyed. | |
| CZSignal< HNObject * > | onObjectTitleChanged |
| Emitted when a client object’s title changes. | |
| CZSignal< HNObject * > | onObjectParentChanged |
| Emitted when a client object’s parent changes. | |
| CZSignal< HNObject *, HNObject * > | onObjectInsertedBefore |
| Emitted after an object is inserted before a sibling. | |
Object property change signals | |
| CZSignal< HNObject * > | onObjectIconChanged |
| Emitted when an object's icon changes (objects inheriting the HNWithIcon interface). | |
| CZSignal< HNObject * > | onObjectEnabledChanged |
| Emitted when an object's enabled state changes (objects inheriting the HNWithEnabled interface) | |
| CZSignal< HNObject * > | onObjectShortcutChanged |
| Emitted when an object's shortcut changes (objects inheriting the HNWithShortcut interface). | |
| CZSignal< HNToggle * > | onToggleCheckedChanged |
| Emitted when a toggle object's checked state changes. | |
Core class representing a bar application.
A bar application is responsible for displaying and managing UI bars associated with connected clients. It acts as a bridge between the compositor and multiple clients:
This class also exposes a set of signals to observe lifecycle changes, client state updates, and object hierarchy updates.
|
inlinenoexcept |
Returns the currently active client.
The active client is determined by the compositor.
|
inlinenoexcept |
Returns the currently bound compositor.
|
staticnoexcept |
Retrieves the existing bar instance.
|
noexcept |
Retrieves a client by its DBus identifier.
| id | Null-terminated DBus identifier string. |
|
staticnoexcept |
Retrieves the singleton bar instance, creating it if necessary.
| CZSignal<HNBar*> onActiveClientChanged |
Emitted when the active client changes.
| CZSignal<HNClient*> onClientDestroyed |
Emitted when a client is disconnected.
All objects belonging to the client are destroyed before this signal is emitted.
| CZSignal<HNClient*> onClientTopbarChanged |
Emitted when a client's active top bar changes.
Typically triggered when one of the client’s windows becomes active.
| CZSignal<HNObject*> onObjectCreated |
Emitted when a client creates a new object.
The object's role/type remains constant during its lifetime.
Emitted after an object is inserted before a sibling.
This signal is triggered once obj has been inserted into the hierarchy, immediately preceding sibling.
| obj | The object being inserted. |
| sibling | The sibling before which obj is inserted.
|
| CZSignal<HNObject*> onObjectParentChanged |
Emitted when a client object’s parent changes.
The object is appended to the end of the new parent’s children list. This signal can also indicate that the object has been detached (no parent).
Objects inheriting the HNWithIcon interface.
| CZSignal<HNObject*> onObjectTitleChanged |
Emitted when a client object’s title changes.
Objects inheriting the HNWithTitle interface.