1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QXCBXSETTINGS_H |
5 | #define QXCBXSETTINGS_H |
6 | |
7 | #include "qxcbscreen.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QXcbXSettingsPrivate; |
12 | |
13 | class QXcbXSettings : public QXcbWindowEventListener |
14 | { |
15 | Q_DECLARE_PRIVATE(QXcbXSettings) |
16 | public: |
17 | QXcbXSettings(QXcbVirtualDesktop *screen); |
18 | ~QXcbXSettings(); |
19 | bool initialized() const; |
20 | |
21 | QVariant setting(const QByteArray &property) const; |
22 | |
23 | typedef void (*PropertyChangeFunc)(QXcbVirtualDesktop *screen, const QByteArray &name, const QVariant &property, void *handle); |
24 | void registerCallbackForProperty(const QByteArray &property, PropertyChangeFunc func, void *handle); |
25 | void removeCallbackForHandle(const QByteArray &property, void *handle); |
26 | void removeCallbackForHandle(void *handle); |
27 | |
28 | void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override; |
29 | private: |
30 | QXcbXSettingsPrivate *d_ptr; |
31 | }; |
32 | |
33 | QT_END_NAMESPACE |
34 | |
35 | #endif // QXCBXSETTINGS_H |
36 |