37 ,
public QAbstractNativeEventFilter
41 xcb_connection_t *
const Conn_;
45 QHash<QByteArray, Atom> Atoms_;
47 struct PrivateCtor {
explicit PrivateCtor () =
default; };
58 static std::optional<XWrapper&> Instance ();
60 xcb_connection_t* GetConnection ()
const;
62 Window GetRootWindow ()
const;
64 bool nativeEventFilter (
const QByteArray& eventType,
void *message, qintptr *result)
override;
69 QString GetWindowTitle (
Window);
70 QIcon GetWindowIcon (
Window);
71 WinStateFlags GetWindowState (
Window);
72 AllowedActionFlags GetWindowActions (
Window);
81 void SetStrut (QWidget*, Qt::ToolBarArea);
82 void ClearStrut (QWidget*);
84 ulong left, ulong right, ulong top, ulong bottom,
85 ulong leftStartY, ulong leftEndY,
86 ulong rightStartY, ulong rightEndY,
87 ulong topStartX, ulong topEndX,
88 ulong bottomStartX, ulong bottomEndX);
91 void MinimizeWindow (
Window);
92 void MaximizeWindow (
Window);
93 void UnmaximizeWindow (
Window);
95 void UnshadeWindow (
Window);
96 void MoveWindowTo (
Window, Layer);
99 void ResizeWindow (
Window,
int,
int);
101 int GetDesktopCount ();
102 int GetCurrentDesktop ();
103 void SetCurrentDesktop (
int);
104 QStringList GetDesktopNames ();
105 QString GetDesktopName (
int,
const QString& = QString ());
106 int GetWindowDesktop (
Window);
107 void MoveWindowToDesktop (
Window,
int);
109 QRect GetAvailableGeometry (QScreen&);
110 QRect GetAvailableGeometry (QWidget*);
120 Atom GetAtom (std::string_view str);
123 void HandlePropNotify (T);
125 template<
typename Flag>
126 QFlags<Flag> GetFlagsList (
Window wid, Atom property,
const QHash<Atom, Flag>& atom2flag)
const;
128 Window GetActiveWindow ();
130 bool GetWinProp (
Window, Atom, ulong*, uchar**, Atom =
static_cast<Atom
> (0))
const;
131 bool GetRootWinProp (Atom, ulong*, uchar**, Atom =
static_cast<Atom
> (0))
const;
134 bool SendMessage (
Window, Atom, ulong, ulong = 0, ulong = 0, ulong = 0, ulong = 0);