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
8QT_BEGIN_NAMESPACE
9
10class QXcbObject
11{
12public:
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
21private:
22 QXcbConnection *m_connection;
23};
24
25QT_END_NAMESPACE
26

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of qtbase/src/plugins/platforms/xcb/qxcbobject.h