Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandidleinhibitv1_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:critical reason:network-protocol
4
5#ifndef QWAYLANDIDLEINHIBITV1_P_H
6#define QWAYLANDIDLEINHIBITV1_P_H
7
8#include <QtWaylandCompositor/QWaylandSurface>
9#include <QtWaylandCompositor/QWaylandIdleInhibitManagerV1>
10#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
11#include <QtWaylandCompositor/private/qwayland-server-idle-inhibit-unstable-v1.h>
12
13#include <QtCore/qpointer.h>
14
15//
16// W A R N I N G
17// -------------
18//
19// This file is not part of the Qt API. It exists purely as an
20// implementation detail. This header file may change from version to
21// version without notice, or even be removed.
22//
23// We mean it.
24//
25
27
29 : public QWaylandCompositorExtensionPrivate
30 , public QtWaylandServer::zwp_idle_inhibit_manager_v1
31{
32 Q_DECLARE_PUBLIC(QWaylandIdleInhibitManagerV1)
33public:
34 explicit QWaylandIdleInhibitManagerV1Private() = default;
35
36 class Q_WAYLANDCOMPOSITOR_EXPORT Inhibitor
37 : public QtWaylandServer::zwp_idle_inhibitor_v1
38 {
39 public:
40 explicit Inhibitor(QWaylandSurface *surface, wl_client *client, quint32 id, quint32 version);
41
42 protected:
43 void zwp_idle_inhibitor_v1_destroy_resource(Resource *resource) override;
44 void zwp_idle_inhibitor_v1_destroy(Resource *resource) override;
45
46 private:
47 QPointer<QWaylandSurface> m_surface;
48 };
49
50 static QWaylandIdleInhibitManagerV1Private *get(QWaylandIdleInhibitManagerV1 *manager) { return manager ? manager->d_func() : nullptr; }
51
52protected:
53 void zwp_idle_inhibit_manager_v1_create_inhibitor(Resource *resource, uint32_t id, wl_resource *surfaceResource) override;
54};
55
56QT_END_NAMESPACE
57
58#endif // QWAYLANDIDLEINHIBITV1_P_H
Combined button and popup list for selecting options.