Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
WindowTypeEnum.h File Reference
#include <QLatin1StringView>
#include <QString>
#include <QStringView>
#include <optional>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  PhosphorProtocol
 D-Bus marshalling for the shared tiling-family value types (see AutotileTypes.h; the file names predate the autotile-to-tiling generalization and are load-bearing across the build, so only the docs moved with the split).
 

Enumerations

enum class  PhosphorProtocol::WindowType : int {
  PhosphorProtocol::Unknown = 0 , PhosphorProtocol::Normal = 1 , PhosphorProtocol::Dialog = 2 , PhosphorProtocol::Utility = 3 ,
  PhosphorProtocol::Toolbar = 4 , PhosphorProtocol::Splash = 5 , PhosphorProtocol::Menu = 6 , PhosphorProtocol::Tooltip = 7 ,
  PhosphorProtocol::Notification = 8 , PhosphorProtocol::Dock = 9 , PhosphorProtocol::Desktop = 10 , PhosphorProtocol::OnScreenDisplay = 11 ,
  PhosphorProtocol::Popup = 12 , PhosphorProtocol::AppletPopup = 13
}
 Window-type vocabulary shared by the compositor effect, the daemon's WindowRegistry, and (from the window-rule refactor onward) the window-rule match engine. More...
 

Functions

constexpr bool PhosphorProtocol::isValidWindowType (int value)
 True if value is a valid WindowType underlying value.
 
constexpr WindowType PhosphorProtocol::windowTypeFromInt (int value)
 Cast an int that crossed D-Bus to a WindowType; out-of-range values (version skew, a malformed caller) fall back to WindowType::Unknown.
 
QString PhosphorProtocol::windowTypeToString (WindowType type)
 Canonical lowercase wire string for a WindowType.
 
std::optional< WindowTypePhosphorProtocol::windowTypeFromString (QStringView s)
 Strict parse: an unknown token returns nullopt so callers can drop the input rather than silently coercing typos / future values to a default.
 

Variables

constexpr int PhosphorProtocol::windowTypeMinValue = static_cast<int>(WindowType::Unknown)
 Inclusive bounds of the valid WindowType underlying values — used to range-check an int that crossed D-Bus before casting it back.
 
constexpr int PhosphorProtocol::windowTypeMaxValue = static_cast<int>(WindowType::AppletPopup)