Debian Codegraph @

xcb/libqt6xcbqpa-dev/6.7.1/qxcbsessionmanager.h

raw
1 // Copyright (C) 2013 Teo Mrnjavac <[email protected]>
2 // Copyright (C) 2016 The Qt Company Ltd.
3 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QXCBSESSIONMANAGER_H
6 #define QXCBSESSIONMANAGER_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is part of the QPA API and is not meant to be used
13 // in applications. Usage of this API may make your code
14 // source and binary incompatible with future versions of Qt.
15 //
16
17 #include <qpa/qplatformsessionmanager.h>
18
19 #ifndef QT_NO_SESSIONMANAGER
20
21 QT_BEGIN_NAMESPACE
22
23 class QEventLoop;
24
25 class QXcbSessionManager : public QPlatformSessionManager
26 {
27 public:
28 QXcbSessionManager(const QString &id, const QString &key);
29 virtual ~QXcbSessionManager();
30
31 void *handle() const;
32
33 void setSessionId(const QString &id) { m_sessionId = id; }
34 void setSessionKey(const QString &key) { m_sessionKey = key; }
35
36 bool allowsInteraction() override;
37 bool allowsErrorInteraction() override;
38 void release() override;
39
40 void cancel() override;
41
42 void setManagerProperty(const QString &name, const QString &value) override;
43 void setManagerProperty(const QString &name, const QStringList &value) override;
44
45 bool isPhase2() const override;
46 void requestPhase2() override;
47
48 void exitEventLoop();
49
50 private:
51 QEventLoop *m_eventLoop;
52 };
53
54 QT_END_NAMESPACE
55
56 #endif //QT_NO_SESSIONMANAGER
57
58 #endif //QXCBSESSIONMANAGER_H