5#ifndef DWINDOWMANAGERHELPER_H
6#define DWINDOWMANAGERHELPER_H
8#include <dtkgui_global.h>
21 Q_PROPERTY(
bool hasBlurWindow READ hasBlurWindow NOTIFY hasBlurWindowChanged)
22 Q_PROPERTY(
bool hasComposite READ hasComposite NOTIFY hasCompositeChanged)
23 Q_PROPERTY(
bool hasNoTitlebar READ hasNoTitlebar NOTIFY hasNoTitlebarChanged)
24 Q_PROPERTY(
bool hasWallpaperEffect READ hasWallpaperEffect NOTIFY hasWallpaperEffectChanged)
28 FUNC_RESIZE = (1L << 1),
29 FUNC_MOVE = (1L << 2),
30 FUNC_MINIMIZE = (1L << 3),
31 FUNC_MAXIMIZE = (1L << 4),
32 FUNC_CLOSE = (1L << 5),
33 FUNC_ALL = FUNC_RESIZE | FUNC_MOVE | FUNC_MINIMIZE | FUNC_MAXIMIZE | FUNC_CLOSE
36 Q_DECLARE_FLAGS(MotifFunctions, MotifFunction)
37 Q_FLAG(MotifFunctions)
39 enum MotifDecoration {
40 DECOR_BORDER = (1L << 1),
41 DECOR_RESIZEH = (1L << 2),
42 DECOR_TITLE = (1L << 3),
43 DECOR_MENU = (1L << 4),
44 DECOR_MINIMIZE = (1L << 5),
45 DECOR_MAXIMIZE = (1L << 6),
46 DECOR_ALL = DECOR_BORDER | DECOR_RESIZEH | DECOR_TITLE | DECOR_MENU | DECOR_MINIMIZE | DECOR_MAXIMIZE
48 Q_ENUM(MotifDecoration)
49 Q_DECLARE_FLAGS(MotifDecorations, MotifDecoration)
50 Q_FLAG(MotifDecorations)
60 UnknowWindowType = 0x000000,
61 NormalType = 0x000001,
62 DesktopType = 0x000002,
64 ToolbarType = 0x000008,
66 UtilityType = 0x000020,
67 SplashType = 0x000040,
68 DialogType = 0x000080,
69 DropDownMenuType = 0x000100,
70 PopupMenuType = 0x000200,
71 TooltipType = 0x000400,
72 NotificationType = 0x000800,
75 KdeOverrideType = 0x004000
78 Q_DECLARE_FLAGS(WmWindowTypes, WmWindowType)
85 static void setMotifFunctions(
const QWindow *window, MotifFunctions hints);
86 static MotifFunctions setMotifFunctions(
const QWindow *window, MotifFunctions hints,
bool on);
87 static MotifFunctions getMotifFunctions(
const QWindow *window);
88 static void setMotifDecorations(
const QWindow *window, MotifDecorations hints);
89 static MotifDecorations setMotifDecorations(
const QWindow *window, MotifDecorations hints,
bool on);
90 static MotifDecorations getMotifDecorations(
const QWindow *window);
91 static void setWmWindowTypes(QWindow *window, WmWindowTypes types);
92 static void setWmClassName(
const QByteArray &name);
94 static void popupSystemWindowMenu(
const QWindow *window);
96 bool hasBlurWindow()
const;
97 bool hasComposite()
const;
98 bool hasNoTitlebar()
const;
99 bool hasWallpaperEffect()
const;
100 QString windowManagerNameString()
const;
101 WMName windowManagerName()
const;
106 quint32 windowFromPoint(
const QPoint &p);
126Q_DECLARE_OPERATORS_FOR_FLAGS(DTK_GUI_NAMESPACE::DWindowManagerHelper::MotifFunctions)
127Q_DECLARE_OPERATORS_FOR_FLAGS(DTK_GUI_NAMESPACE::DWindowManagerHelper::MotifDecorations)
128Q_DECLARE_OPERATORS_FOR_FLAGS(DTK_GUI_NAMESPACE::DWindowManagerHelper::WmWindowTypes)
一个用于获取本地窗口信息的类.
Definition: dforeignwindow.h:17
Definition: dwindowmanagerhelper.cpp:125
提供与窗口管理器交互的接口,同 DPlatformWindowHandle 依赖 dxcb 插件.
Definition: dwindowmanagerhelper.h:18
void hasCompositeChanged()
信号会在 hasComposite 属性的值改变时被发送.
void windowMotifWMHintsChanged(quint32 winId)
信号会在窗口功能或修饰标志改变时被发送.
void hasWallpaperEffectChanged()
信号会在 hasWallpaperEffect 属性的值改变时被发送.
void windowListChanged()
信号会在当前环境本地窗口列表变化时被发送。包含打开新窗口、关闭窗口、改变窗口的 层叠顺序.
void windowManagerChanged()
信号会在当前环境窗口管理器变化时被发送.
void hasBlurWindowChanged()
信号会在 hasBlurWindow 属性的值改变时被发送.
void hasNoTitlebarChanged()
信号会在 hasNoTitlebar 属性的值改变时被发送.