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
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
4#ifndef QEGLFSWINDOW_H
5#define QEGLFSWINDOW_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qeglfsglobal_p.h"
19#include "qeglfsintegration_p.h"
20#include "qeglfsscreen_p.h"
21
22#include <qpa/qplatformwindow.h>
23#ifndef QT_NO_OPENGL
24# include <QtOpenGL/private/qopenglcompositor_p.h>
25#endif
26
28
31
32#ifndef QT_NO_OPENGL
34#else
36#endif
37{
38public:
41
42 void create();
43 void destroy();
44
45 void setGeometry(const QRect &) override;
46 QRect geometry() const override;
47 void setVisible(bool visible) override;
48 void requestActivateWindow() override;
49 void raise() override;
50 void lower() override;
51
52 void propagateSizeHints() override { }
53 void setMask(const QRegion &) override { }
54 bool setKeyboardGrabEnabled(bool) override { return false; }
55 bool setMouseGrabEnabled(bool) override { return false; }
56 void setOpacity(qreal) override;
57 WId winId() const override;
58
59 QSurfaceFormat format() const override;
60
61 EGLNativeWindowType eglWindow() const;
62 EGLSurface surface() const;
63 QEglFSScreen *screen() const override;
64
65 bool hasNativeWindow() const { return m_flags.testFlag(HasNativeWindow); }
66
67 void invalidateSurface() override;
68 virtual void resetSurface();
69
70 bool isRaster() const;
71
72#ifndef QT_NO_OPENGL
74 void setBackingStore(QOpenGLCompositorBackingStore *backingStore) override;
75 QWindow *sourceWindow() const override;
76 const QPlatformTextureList *textures() const override;
77 void endCompositing() override;
78#endif
79
80protected:
81#ifndef QT_NO_OPENGL
84#endif
86
88 EGLNativeWindowType m_window;
89
90 EGLConfig m_config;
92
93 enum Flag {
94 Created = 0x01,
95 HasNativeWindow = 0x02
96 };
98 Flags m_flags;
99};
100
102
103#endif // QEGLFSWINDOW_H
EGLSurface m_surface
EGLConfig m_config
QEglFSWindow(QWindow *w)
void setMask(const QRegion &) override
Reimplement to be able to let Qt set the mask of a window.
QOpenGLCompositorBackingStore * backingStore() const override
bool hasNativeWindow() const
bool setMouseGrabEnabled(bool) override
QSurfaceFormat m_format
EGLNativeWindowType eglWindow() const
virtual void resetSurface()
QOpenGLContext * m_rasterCompositingContext
EGLNativeWindowType m_window
bool isRaster() const
void propagateSizeHints() override
Reimplement to propagate the size hints of the QWindow.
QOpenGLCompositorBackingStore * m_backingStore
bool setKeyboardGrabEnabled(bool) override
A backing store implementation for OpenGL.
virtual QWindow * sourceWindow() const =0
virtual void setBackingStore(QOpenGLCompositorBackingStore *backingStore)=0
\inmodule QtGui
QSurface * surface() const
The QPlatformWindow class provides an abstraction for top-level windows.
virtual void setVisible(bool visible)
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
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.
virtual QSurfaceFormat format() const override
Returns the actual surface format of the window.
virtual void requestActivateWindow()
Reimplement to let Qt be able to request activation/focus for a window.
virtual void setOpacity(qreal level)
Reimplement to be able to let Qt set the opacity level of a window.
virtual void raise()
Reimplement to be able to let Qt raise windows to the top of the desktop.
virtual QRect geometry() const
Returns the current geometry of a window.
virtual WId winId() const
Reimplement in subclasses to return a handle to the native window.
virtual void invalidateSurface()
Invalidates the window's surface by releasing its surface buffers.
virtual void lower()
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
#define Q_EGLFS_EXPORT
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
Flags
GLfloat GLfloat GLfloat w
[0]
GLuint const GLuint GLuint const GLuint * textures
double qreal
Definition qtypes.h:187
view create()