6#include <QLatin1StringView>
82 return QStringLiteral(
"unknown");
84 return QStringLiteral(
"normal");
86 return QStringLiteral(
"dialog");
88 return QStringLiteral(
"utility");
90 return QStringLiteral(
"toolbar");
92 return QStringLiteral(
"splash");
94 return QStringLiteral(
"menu");
96 return QStringLiteral(
"tooltip");
98 return QStringLiteral(
"notification");
100 return QStringLiteral(
"dock");
102 return QStringLiteral(
"desktop");
104 return QStringLiteral(
"onscreendisplay");
106 return QStringLiteral(
"popup");
108 return QStringLiteral(
"appletpopup");
110 return QStringLiteral(
"unknown");
117 static constexpr std::pair<QLatin1StringView, WindowType> kTable[] = {
133 for (
const auto& [token, type] : kTable) {
134 if (s.compare(token, Qt::CaseInsensitive) == 0) {
D-Bus marshalling for the shared tiling-family value types (see AutotileTypes.h; the file names preda...
Definition AutotileMarshalling.h:19
WindowType
Window-type vocabulary shared by the compositor effect, the daemon's WindowRegistry,...
Definition WindowTypeEnum.h:23
@ Popup
generic override-redirect popup
@ Unknown
type could not be determined
@ Normal
ordinary application toplevel
@ Menu
menu / popup menu / dropdown menu
@ AppletPopup
A Plasma applet's popup: Kickoff, the system-tray flyouts, any widget's expanded view.
constexpr WindowType windowTypeFromInt(int value)
Cast an int that crossed D-Bus to a WindowType; out-of-range values (version skew,...
Definition WindowTypeEnum.h:66
QString windowTypeToString(WindowType type)
Canonical lowercase wire string for a WindowType.
Definition WindowTypeEnum.h:78
constexpr bool isValidWindowType(int value)
True if value is a valid WindowType underlying value.
Definition WindowTypeEnum.h:59
std::optional< WindowType > windowTypeFromString(QStringView s)
Strict parse: an unknown token returns nullopt so callers can drop the input rather than silently coe...
Definition WindowTypeEnum.h:115
constexpr int windowTypeMaxValue
Definition WindowTypeEnum.h:56
constexpr int windowTypeMinValue
Inclusive bounds of the valid WindowType underlying values — used to range-check an int that crossed ...
Definition WindowTypeEnum.h:55