42 #ifndef QXCBCONNECTION_H 43 #define QXCBCONNECTION_H 234 const char *
displayName()
const {
return m_displayName.constData(); }
241 void *xlib_display()
const {
return m_xlib_display; }
245 bool hasSupportForDri2()
const;
246 QByteArray dri2DeviceName()
const {
return m_dri2_device_name; }
251 #if defined(XCB_USE_EGL) || defined(XCB_USE_DRI2) 252 void *egl_display()
const {
return m_egl_display; }
256 void handleXcbError(xcb_generic_error_t *
error);
259 void processXcbEvents();
262 void initializeAllAtoms();
265 void initializeDri2();
280 #if defined(XCB_USE_XLIB) 281 void *m_xlib_display;
285 uint32_t m_dri2_major;
286 uint32_t m_dri2_minor;
287 bool m_dri2_support_probed;
288 bool m_has_support_for_dri2;
291 #if defined(XCB_USE_EGL) || defined(XCB_USE_DRI2) 302 void log(
const char *file,
int line,
int sequence);
303 template <
typename cookie_t>
308 #define DISPLAY_FROM_XCB(object) ((Display *)(object->connection()->xlib_display())) 311 template <
typename cookie_t>
314 connection->
log(file, line, cookie.sequence);
317 #define Q_XCB_CALL(x) q_xcb_call_template(x, connection(), __FILE__, __LINE__) 318 #define Q_XCB_CALL2(x, connection) q_xcb_call_template(x, connection, __FILE__, __LINE__) 319 #define Q_XCB_NOOP(c) q_xcb_call_template(xcb_no_operation(c->xcb_connection()), c, __FILE__, __LINE__); 321 #define Q_XCB_CALL(x) x 322 #define Q_XCB_CALL2(x, connection) x 323 #define Q_XCB_NOOP(c) 327 #if defined(XCB_USE_DRI2) || defined(XCB_USE_EGL) 328 #define EGL_DISPLAY_FROM_XCB(object) ((EGLDisplay)(object->connection()->egl_display())) 329 #endif //endifXCB_USE_DRI2
QVector< CallInfo > m_callLog
The QByteArray class provides an array of bytes.
xcb_connection_t * xcb_connection() const
void log(const char *file, int line, int sequence)
The QVector class is a template class that provides a dynamic array.
The QObject class is the base class of all Qt objects.
const char * displayName() const
QList< QXcbScreen * > screens() const
int primaryScreen() const
QXcbKeyboard * keyboard() const
QXcbKeyboard * m_keyboard
QXcbConnection * connection() const
xcb_connection_t * m_connection
const xcb_setup_t * m_setup
cookie_t q_xcb_call_template(const cookie_t &cookie, QXcbConnection *connection, const char *file, int line)
QList< QXcbScreen * > m_screens
The QList class is a template class that provides lists.