Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qminimaleglscreen.h
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#ifndef QMINIMALEGLSCREEN_H
5#define QMINIMALEGLSCREEN_H
6
7#include <qpa/qplatformscreen.h>
8
9#include <QtCore/QTextStream>
10
11#include <QtGui/private/qt_egl_p.h>
12
14
15class QPlatformOpenGLContext;
16
18{
19public:
20 QMinimalEglScreen(EGLNativeDisplayType display);
22
23 QRect geometry() const override;
24 int depth() const override;
25 QImage::Format format() const override;
26#ifndef QT_NO_OPENGL
27 QPlatformOpenGLContext *platformContext() const;
28#endif
29 EGLSurface surface() const { return m_surface; }
30
31private:
32 void createAndSetPlatformContext() const;
33 void createAndSetPlatformContext();
34
35 QRect m_geometry;
36 int m_depth;
37 QImage::Format m_format;
38 QPlatformOpenGLContext *m_platformContext;
39 EGLDisplay m_dpy;
40 EGLSurface m_surface;
41};
42
43QT_END_NAMESPACE
44#endif // QMINIMALEGLSCREEN_H
QMinimalEglScreen(EGLNativeDisplayType display)
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
QPlatformOpenGLContext * platformContext() const
EGLSurface surface() const
int depth() const override
Reimplement in subclass to return current depth of the screen.
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)