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 QXCBOBJECT_H |
5 | #define QXCBOBJECT_H |
6 | |
7 | #include "qxcbconnection.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QXcbObject |
12 | { |
13 | public: |
14 | QXcbObject(QXcbConnection *connection = nullptr) : m_connection(connection) {} |
15 | |
16 | void setConnection(QXcbConnection *connection) { m_connection = connection; } |
17 | QXcbConnection *connection() const { return m_connection; } |
18 | |
19 | xcb_atom_t atom(QXcbAtom::Atom atom) const { return m_connection->atom(qatom: atom); } |
20 | xcb_connection_t *xcb_connection() const { return m_connection->xcb_connection(); } |
21 | |
22 | private: |
23 | QXcbConnection *m_connection; |
24 | }; |
25 | |
26 | QT_END_NAMESPACE |
27 | |
28 | #endif |
29 |