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 | #pragma once |
5 | |
6 | #include "qxcbscreen.h" |
7 | |
8 | QT_BEGIN_NAMESPACE |
9 | |
10 | class QXcbXSettingsPrivate; |
11 | |
12 | class QXcbXSettings : public QXcbWindowEventListener |
13 | { |
14 | Q_DECLARE_PRIVATE(QXcbXSettings) |
15 | public: |
16 | QXcbXSettings(QXcbVirtualDesktop *screen); |
17 | ~QXcbXSettings(); |
18 | bool initialized() const; |
19 | |
20 | QVariant setting(const QByteArray &property) const; |
21 | |
22 | typedef void (*PropertyChangeFunc)(QXcbVirtualDesktop *screen, const QByteArray &name, const QVariant &property, void *handle); |
23 | void registerCallbackForProperty(const QByteArray &property, PropertyChangeFunc func, void *handle); |
24 | void removeCallbackForHandle(const QByteArray &property, void *handle); |
25 | void removeCallbackForHandle(void *handle); |
26 | |
27 | void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override; |
28 | private: |
29 | QXcbXSettingsPrivate *d_ptr; |
30 | }; |
31 | |
32 | QT_END_NAMESPACE |
33 |