6#include <QLatin1StringView>
61 return QStringLiteral(
"unknown");
63 return QStringLiteral(
"normal");
65 return QStringLiteral(
"dialog");
67 return QStringLiteral(
"utility");
69 return QStringLiteral(
"toolbar");
71 return QStringLiteral(
"splash");
73 return QStringLiteral(
"menu");
75 return QStringLiteral(
"tooltip");
77 return QStringLiteral(
"notification");
79 return QStringLiteral(
"dock");
81 return QStringLiteral(
"desktop");
83 return QStringLiteral(
"onscreendisplay");
85 return QStringLiteral(
"popup");
87 return QStringLiteral(
"unknown");
94 static constexpr std::pair<QLatin1StringView, WindowType> kTable[] = {
109 for (
const auto& [token, type] : kTable) {
110 if (s.compare(token, Qt::CaseInsensitive) == 0) {
D-Bus marshalling for the autotile value types (see AutotileTypes.h).
Definition AutotileMarshalling.h:16
WindowType windowTypeFromInt(int value)
Cast an int that crossed D-Bus to a WindowType; out-of-range values (version skew,...
Definition WindowTypeEnum.h:51
WindowType
Window-type vocabulary shared by the compositor effect, the daemon's WindowRegistry,...
Definition WindowTypeEnum.h:22
@ Popup
generic override-redirect popup
@ Unknown
type could not be determined
@ Normal
ordinary application toplevel
@ Menu
menu / popup menu / dropdown menu
bool isValidWindowType(int value)
True if value is a valid WindowType underlying value.
Definition WindowTypeEnum.h:44
QString windowTypeToString(WindowType type)
Canonical lowercase wire string for a WindowType.
Definition WindowTypeEnum.h:57
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:92
constexpr int windowTypeMaxValue
Definition WindowTypeEnum.h:41
constexpr int windowTypeMinValue
Inclusive bounds of the valid WindowType underlying values — used to range-check an int that crossed ...
Definition WindowTypeEnum.h:40