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
qeglfswindow_p.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// Qt-Security score:significant reason:default
4
5#ifndef QEGLFSWINDOW_H
6#define QEGLFSWINDOW_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qeglfsglobal_p.h"
21#include "qeglfsscreen_p.h"
22
23#include <qpa/qplatformwindow.h>
24#ifndef QT_NO_OPENGL
25# include <QtOpenGL/private/qopenglcompositor_p.h>
26#endif
27
29
30class QOpenGLCompositorBackingStore;
31class QPlatformTextureList;
32
33#ifndef QT_NO_OPENGL
34class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow, public QOpenGLCompositorWindow
35#else
36class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow
37#endif
38{
39public:
40 QEglFSWindow(QWindow *w);
41 ~QEglFSWindow();
42
43 void create();
44 void destroy();
45
46 void setGeometry(const QRect &) override;
47 QRect geometry() const override;
48 void setVisible(bool visible) override;
49 void requestActivateWindow() override;
50 void raise() override;
51 void lower() override;
52
53 void propagateSizeHints() override { }
54 void setMask(const QRegion &) override { }
55 bool setKeyboardGrabEnabled(bool) override { return false; }
56 bool setMouseGrabEnabled(bool) override { return false; }
57 void setOpacity(qreal) override;
58 WId winId() const override;
59
60 QSurfaceFormat format() const override;
61
62 EGLNativeWindowType eglWindow() const;
63 EGLSurface surface() const;
64 QEglFSScreen *screen() const override;
65
66 bool hasNativeWindow() const { return m_flags.testFlag(HasNativeWindow); }
67
68 void invalidateSurface() override;
69 virtual void resetSurface();
70
71 bool isRaster() const;
72
73#ifndef QT_NO_OPENGL
74 QOpenGLCompositorBackingStore *backingStore() const override { return m_backingStore; }
75 void setBackingStore(QOpenGLCompositorBackingStore *backingStore) override;
76 QWindow *sourceWindow() const override;
77 const QPlatformTextureList *textures() const override;
78 void endCompositing() override;
79#endif
80
81protected:
82#ifndef QT_NO_OPENGL
83 QOpenGLCompositorBackingStore *m_backingStore;
84 QOpenGLContext *m_rasterCompositingContext;
85#endif
86 WId m_winId;
87
88 EGLSurface m_surface;
89 EGLNativeWindowType m_window;
90
91 EGLConfig m_config;
92 QSurfaceFormat m_format;
93
94 enum Flag {
95 Created = 0x01,
96 HasNativeWindow = 0x02
97 };
98 Q_DECLARE_FLAGS(Flags, Flag)
99 Flags m_flags;
100};
101
102QT_END_NAMESPACE
103
104#endif // QEGLFSWINDOW_H
\inmodule QtSql
Combined button and popup list for selecting options.
#define Q_EGLFS_EXPORT