Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qminimaleglwindow.cpp
Go to the documentation of this file.
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#include <qpa/qwindowsysteminterface.h>
5
6#include "qminimaleglwindow.h"
7
9
12{
13 static int serialNo = 0;
14 m_winid = ++serialNo;
15#ifdef QEGL_EXTRA_DEBUG
16 qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid));
17#endif
18
19 QRect screenGeometry(screen()->availableGeometry());
20 if (w->geometry() != screenGeometry) {
22 }
23 w->setSurfaceType(QSurface::OpenGLSurface);
24}
25
27{
28 // We only support full-screen windows
29 QRect rect(screen()->availableGeometry());
31
33}
34
36{
37 return m_winid;
38}
39
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
void setGeometry(const QRect &) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QMinimalEglWindow(QWindow *w)
The QPlatformWindow class provides an abstraction for top-level windows.
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
QPlatformScreen * screen() const override
Returns the platform screen handle corresponding to this platform window, or null if the window is no...
virtual void setGeometry(const QRect &rect)
This function is called by Qt whenever a window is moved or resized using the QWindow API.
\inmodule QtCore\reentrant
Definition qrect.h:30
@ OpenGLSurface
Definition qsurface.h:32
static void handleGeometryChange(QWindow *window, const QRect &newRect)
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
#define qWarning
Definition qlogging.h:166
GLfloat GLfloat GLfloat w
[0]
unsigned int uint
Definition qtypes.h:34