MauiKit Controls

linux/windowhelper.h
1/*
2 * Copyright (C) 2021 CutefishOS Team.
3 *
4 * Author: cutefish <cutefishos@foxmail.com>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef WINDOWHELPER_H
21#define WINDOWHELPER_H
22
23#include <QObject>
24#include <QWindow>
25#include <xcb/xcb.h>
26
27class WindowHelper : public QObject
28{
30 Q_PROPERTY(bool compositing READ compositing NOTIFY compositingChanged)
31
32public:
33 explicit WindowHelper(QObject *parent = nullptr);
34
35 bool compositing() const;
36
37 Q_INVOKABLE void startSystemMove(QWindow *w);
38 Q_INVOKABLE void startSystemResize(QWindow *w, Qt::Edges edges);
39
40 Q_INVOKABLE void minimizeWindow(QWindow *w);
41
42signals:
43 void compositingChanged();
44
45private:
46 void doStartSystemMoveResize(QWindow *w, int edges);
47 void onCompositingChanged(bool enabled);
48
49private:
50 xcb_atom_t m_moveResizeAtom;
51 bool m_compositing;
52};
53
54#endif // WINDOWHELPER_H
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QObject * parent() const const
typedef Edges
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.