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