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


C++ QPlatformWindow类代码示例

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


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

示例1: Q_UNUSED

QPlatformWindow *HeadlessIntegration::createPlatformWindow(QWindow *window) const
{
    Q_UNUSED(window);
    QPlatformWindow *w = new QPlatformWindow(window);
    w->requestActivateWindow();
    return w;
}
开发者ID:MarioJC,项目名称:calibre,代码行数:7,代码来源:headless_integration.cpp

示例2: Q_UNUSED

QPlatformWindow *QOffscreenIntegration::createPlatformWindow(QWindow *window) const
{
    Q_UNUSED(window);
    QPlatformWindow *w = new QOffscreenWindow(window);
    w->requestActivateWindow();
    return w;
}
开发者ID:James-intern,项目名称:Qt,代码行数:7,代码来源:qoffscreenintegration.cpp

示例3: qWarning

QPlatformWindow *QMinimalEglIntegration::createPlatformWindow(QWindow *window) const
{
#ifdef QEGL_EXTRA_DEBUG
    qWarning("QMinimalEglIntegration::createPlatformWindow %p\n",window);
#endif
    QPlatformWindow *w = new QMinimalEglWindow(window);
    w->requestActivateWindow();
    return w;
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:9,代码来源:qminimaleglintegration.cpp

示例4: egl_device_integration

QPlatformWindow *EglFSIntegration::createPlatformWindow(QWindow *window) const
{
    QWindowSystemInterface::flushWindowSystemEvents();

    QPlatformWindow *w = egl_device_integration()->createPlatformWindow(window);
    if (!w) {
        w = new EglFSWindow(window);
        static_cast<EglFSWindow *>(w)->create();
    }

    // Activate only the compositor window for the primary screen in order to
    // make keyboard input work
    if (window->type() != Qt::ToolTip && window->screen() == QGuiApplication::primaryScreen())
        w->requestActivateWindow();

    return w;
}
开发者ID:comicfans,项目名称:greenisland,代码行数:17,代码来源:eglfsintegration.cpp

示例5: swapBuffers

void QKmsContext::swapBuffers(QPlatformSurface *surface)
{
    //Cast context to a window surface and get the screen the context
    //is on and call swapBuffers on that screen.
    QPlatformWindow *window = static_cast<QPlatformWindow *>(surface);
    QKmsScreen *screen = static_cast<QKmsScreen *> (QPlatformScreen::platformScreenForWindow(window->window()));
    screen->swapBuffers();
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:8,代码来源:qkmscontext.cpp

示例6: xcb_translate_coordinates_unchecked

QWindow *QXcbScreen::topLevelAt(const QPoint &p) const
{
    xcb_window_t root = m_screen->root;

    int x = p.x();
    int y = p.y();

    xcb_window_t parent = root;
    xcb_window_t child = root;

    do {
        xcb_translate_coordinates_cookie_t translate_cookie =
            xcb_translate_coordinates_unchecked(xcb_connection(), parent, child, x, y);

        xcb_translate_coordinates_reply_t *translate_reply =
            xcb_translate_coordinates_reply(xcb_connection(), translate_cookie, NULL);

        if (!translate_reply) {
            return 0;
        }

        parent = child;
        child = translate_reply->child;
        x = translate_reply->dst_x;
        y = translate_reply->dst_y;

        free(translate_reply);

        if (!child || child == root)
            return 0;

        QPlatformWindow *platformWindow = connection()->platformWindowFromId(child);
        if (platformWindow)
            return platformWindow->window();
    } while (parent != child);

    return 0;
}
开发者ID:crobertd,项目名称:qtbase,代码行数:38,代码来源:qxcbscreen.cpp

示例7: m_fontDb

QT_BEGIN_NAMESPACE

QMinimalIntegration::QMinimalIntegration() :
    m_fontDb(new QGenericUnixFontDatabase()),
#ifdef Q_OS_WIN
    m_eventDispatcher(new QEventDispatcherWin32())
#else
    m_eventDispatcher(createUnixEventDispatcher())
#endif
{
    QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
    QMinimalScreen *mPrimaryScreen = new QMinimalScreen();

    mPrimaryScreen->mGeometry = QRect(0, 0, 240, 320);
    mPrimaryScreen->mDepth = 32;
    mPrimaryScreen->mFormat = QImage::Format_ARGB32_Premultiplied;

    screenAdded(mPrimaryScreen);
}

bool QMinimalIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
    switch (cap) {
    case ThreadedPixmaps: return true;
    case MultipleWindows: return true;
    default: return QPlatformIntegration::hasCapability(cap);
    }
}

QPlatformWindow *QMinimalIntegration::createPlatformWindow(QWindow *window) const
{
    Q_UNUSED(window);
    QPlatformWindow *w = new QPlatformWindow(window);
    w->requestActivateWindow();
    return w;
}
开发者ID:TheAppsDude,项目名称:phisketeer,代码行数:36,代码来源:qminimalintegration.cpp

示例8: Q_ASSERT

bool QKmsContext::makeCurrent(QPlatformSurface *surface)
{
    Q_ASSERT(surface->surface()->supportsOpenGL());

    EGLDisplay display = m_device->eglDisplay();
    EGLSurface eglSurface;

    if (surface->surface()->surfaceClass() == QSurface::Window) {
        QPlatformWindow *window = static_cast<QPlatformWindow *>(surface);
        QKmsScreen *screen = static_cast<QKmsScreen *>(QPlatformScreen::platformScreenForWindow(window->window()));
        eglSurface = screen->eglSurface();
        screen->waitForPageFlipComplete();
    } else {
        eglSurface = static_cast<QKmsOffscreenWindow *>(surface)->surface();
    }

    bool ok = eglMakeCurrent(display, eglSurface, eglSurface, m_eglContext);
    if (!ok)
        qWarning("QKmsContext::makeCurrent(): eglError: %x, this: %p",
                 eglGetError(), this);

    return true;
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:23,代码来源:qkmscontext.cpp


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