Debian Codegraph @

xcb/libqt5xcbqpa-dev/5.15.4/qxcbobject.h

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QXCBOBJECT_H
6 #define QXCBOBJECT_H
7
8 #include "qxcbconnection.h"
9
10 QT_BEGIN_NAMESPACE
11
12 class QXcbObject
13 {
14 public:
15 QXcbObject(QXcbConnection *connection = nullptr) : m_connection(connection) {}
16
17 void setConnection(QXcbConnection *connection) { m_connection = connection; }
18 QXcbConnection *connection() const { return m_connection; }
19
20 xcb_atom_t atom(QXcbAtom::Atom atom) const { return m_connection->atom(atom); }
21 xcb_connection_t *xcb_connection() const { return m_connection->xcb_connection(); }
22
23 private:
24 QXcbConnection *m_connection;
25 };
26
27 QT_END_NAMESPACE
28
29 #endif