当前位置: 首页>>代码示例>>C++>>正文


C++ QXcbScreen::connection方法代码示例

本文整理汇总了C++中QXcbScreen::connection方法的典型用法代码示例。如果您正苦于以下问题:C++ QXcbScreen::connection方法的具体用法?C++ QXcbScreen::connection怎么用?C++ QXcbScreen::connection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QXcbScreen的用法示例。


在下文中一共展示了QXcbScreen::connection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QGLXContext

QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
#if defined(XCB_USE_GLX)
    return new QGLXContext(screen, context->format(), context->shareHandle());
#elif defined(XCB_USE_EGL)
    return new QEGLXcbPlatformContext(context->format(), context->shareHandle(),
        screen->connection()->egl_display(), screen->connection());
#else
    Q_UNUSED(screen);
    qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");
    return 0;
#endif
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:14,代码来源:qxcbintegration.cpp

示例2: QWindowSurface

QXcbWindowSurface::QXcbWindowSurface(QWidget *widget, bool setDefaultSurface)
    : QWindowSurface(widget, setDefaultSurface)
    , m_image(0)
    , m_syncingResize(false)
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(QPlatformScreen::platformScreenForWidget(widget));
    setConnection(screen->connection());
}
开发者ID:Suneal,项目名称:qt,代码行数:8,代码来源:qxcbwindowsurface.cpp

示例3: QPlatformBackingStore

QXcbBackingStore::QXcbBackingStore(QWindow *window)
    : QPlatformBackingStore(window)
    , m_image(0)
    , m_syncingResize(false)
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());
    setConnection(screen->connection());
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:8,代码来源:qxcbbackingstore.cpp

示例4: defined

void *QXcbNativeInterface::eglDisplayForWidget(QWidget *widget)
{
#if defined(XCB_USE_DRI2) || defined(XCB_USE_EGL)
    QXcbScreen *screen = qPlatformScreenForWidget(widget);
    return screen->connection()->egl_display();
#else
    Q_UNUSED(widget)
    return 0;
#endif
}
开发者ID:sicily,项目名称:qt4.8.4,代码行数:10,代码来源:qxcbnativeinterface.cpp

示例5: qWarning

QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(surface->screen()->handle());
    QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
    if (!glIntegration) {
        qWarning("QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled");
        return Q_NULLPTR;
    }
    return glIntegration->createPlatformOffscreenSurface(surface);
}
开发者ID:OniLink,项目名称:Qt5-Rehost,代码行数:10,代码来源:qxcbintegration.cpp

示例6: QXcbEglContext

QPlatformOpenGLContext *QXcbEglIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
    QXcbEglContext *platformContext = new QXcbEglContext(context->format(),
                                                         context->shareHandle(),
                                                         eglDisplay(),
                                                         screen->connection(),
                                                         context->nativeHandle());
    context->setNativeHandle(platformContext->nativeHandle());
    return platformContext;
}
开发者ID:MarianMMX,项目名称:MarianMMX,代码行数:11,代码来源:qxcbeglintegration.cpp

示例7: QGLXPbuffer

QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
{
#if defined(XCB_USE_GLX)
    return new QGLXPbuffer(surface);
#elif defined(XCB_USE_EGL)
    QXcbScreen *screen = static_cast<QXcbScreen *>(surface->screen()->handle());
    return new QEGLPbuffer(screen->connection()->egl_display(), surface->requestedFormat(), surface);
#else
    Q_UNUSED(surface);
    qWarning("QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled");
    return 0;
#endif
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:13,代码来源:qxcbintegration.cpp

示例8: setAutoRepeatKeys

void QIrrlichtWidget::setAutoRepeatKeys(bool mode)
{
	qDebug() << "QIrrlichtWidget::setAutoRepeatKeys";

	XKeyboardControl control;
	control.auto_repeat_mode = (mode ? 1 : 0);   // Set mode to 1 for
	                                             // autorepeat, 0 to disable
	control.key = -1; // We want to change the behaviour for all keys

	QList<QScreen*> screens = QGuiApplication::screens();
	QXcbScreen *xcbscreen = static_cast<QXcbScreen*>(screens.at(0)->handle());
	Display *display = static_cast<Display*>(xcbscreen->connection()->xlib_display());

	XChangeKeyboardControl(display, KBAutoRepeatMode, &control);
}
开发者ID:KITrokopter,项目名称:GUI-Application,代码行数:15,代码来源:QIrrlichtWidget.cpp

示例9: QXcbWindow

QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
{
    QXcbScreen *screen = static_cast<QXcbScreen *>(window->screen()->handle());
    QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
    if (window->type() != Qt::Desktop) {
        if (glIntegration) {
            QXcbWindow *xcbWindow = glIntegration->createWindow(window);
            xcbWindow->create();
            return xcbWindow;
        }
    }

    Q_ASSERT(window->type() == Qt::Desktop || !window->supportsOpenGL()
             || (!glIntegration && window->surfaceType() == QSurface::RasterGLSurface)); // for VNC
    QXcbWindow *xcbWindow = new QXcbWindow(window);
    xcbWindow->create();
    return xcbWindow;
}
开发者ID:OniLink,项目名称:Qt5-Rehost,代码行数:18,代码来源:qxcbintegration.cpp


注:本文中的QXcbScreen::connection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。