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
@ Dock
panels
Definition WindowTypeEnum.h:33
@ Popup
generic override-redirect popup
Definition WindowTypeEnum.h:36
@ Desktop
Definition WindowTypeEnum.h:34
@ Splash
Definition WindowTypeEnum.h:29
@ Unknown
type could not be determined
Definition WindowTypeEnum.h:24
@ Utility
Definition WindowTypeEnum.h:27
@ Normal
ordinary application toplevel
Definition WindowTypeEnum.h:25
@ Notification
Definition WindowTypeEnum.h:32
@ Menu
menu / popup menu / dropdown menu
Definition WindowTypeEnum.h:30
@ Tooltip
Definition WindowTypeEnum.h:31
@ OnScreenDisplay
Definition WindowTypeEnum.h:35
@ Dialog
Definition WindowTypeEnum.h:26
@ Toolbar
Definition WindowTypeEnum.h:28
@ AppletPopup
A Plasma applet's popup: Kickoff, the system-tray flyouts, any widget's expanded view.
Definition WindowTypeEnum.h:48
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