QtBase  v6.3.1
qeglfsdeviceintegration_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #ifndef QEGLFSDEVICEINTEGRATION_H
41 #define QEGLFSDEVICEINTEGRATION_H
42 
43 //
44 // W A R N I N G
45 // -------------
46 //
47 // This file is not part of the Qt API. It exists purely as an
48 // implementation detail. This header file may change from version to
49 // version without notice, or even be removed.
50 //
51 // We mean it.
52 //
53 
54 #include "qeglfsglobal_p.h"
55 #include <qpa/qplatformintegration.h>
56 #include <qpa/qplatformscreen.h>
57 #include <QtCore/QString>
58 #include <QtGui/QSurfaceFormat>
59 #include <QtGui/QImage>
60 
62 
63 class QPlatformSurface;
64 class QEglFSWindow;
65 
66 #define QEglFSDeviceIntegrationFactoryInterface_iid "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5"
67 
69 {
70 public:
72 
73  virtual void platformInit();
74  virtual void platformDestroy();
75  virtual EGLNativeDisplayType platformDisplay() const;
76  virtual EGLDisplay createDisplay(EGLNativeDisplayType nativeDisplay);
77  virtual bool usesDefaultScreen();
78  virtual void screenInit();
79  virtual void screenDestroy();
80  virtual QSizeF physicalScreenSize() const;
81  virtual QSize screenSize() const;
82  virtual QDpi logicalDpi() const;
83  virtual QDpi logicalBaseDpi() const;
84  virtual Qt::ScreenOrientation nativeOrientation() const;
85  virtual Qt::ScreenOrientation orientation() const;
86  virtual int screenDepth() const;
87  virtual QImage::Format screenFormat() const;
88  virtual qreal refreshRate() const;
89  virtual QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const;
90  virtual EGLint surfaceType() const;
91  virtual QEglFSWindow *createWindow(QWindow *window) const;
92  virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *platformWindow,
93  const QSize &size,
94  const QSurfaceFormat &format);
95  virtual EGLNativeWindowType createNativeOffscreenWindow(const QSurfaceFormat &format);
96  virtual void destroyNativeWindow(EGLNativeWindowType window);
97  virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
98  virtual QPlatformCursor *createCursor(QPlatformScreen *screen) const;
99  virtual bool filterConfig(EGLDisplay display, EGLConfig config) const;
100  virtual void waitForVSync(QPlatformSurface *surface) const;
101  virtual void presentBuffer(QPlatformSurface *surface);
102  virtual QByteArray fbDeviceName() const;
103  virtual int framebufferIndex() const;
104  virtual bool supportsPBuffers() const;
105  virtual bool supportsSurfacelessContexts() const;
106  virtual QFunctionPointer platformFunction(const QByteArray &function) const;
107  virtual void *nativeResourceForIntegration(const QByteArray &name);
108  virtual void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen);
109  virtual void *wlDisplay() const;
110 
111  static EGLConfig chooseConfig(EGLDisplay display, const QSurfaceFormat &format);
112 };
113 
115 {
116  Q_OBJECT
117 
118 public:
120 
121  // the pattern expected by qLoadPlugin calls for a QString argument.
122  // we don't need it, so don't bother subclasses with it:
124 };
125 
127 {
128 public:
129  static QStringList keys();
130  static QEglFSDeviceIntegration *create(const QString &name);
131 };
132 
134 
135 #endif // QEGLDEVICEINTEGRATION_H
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:85
static QStringList keys()
QEglFSDeviceIntegration * create(const QString &)
virtual QEglFSDeviceIntegration * create()=0
Format
Definition: qimage.h:77
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition: qscreen.h:68
The QSizeF class defines the size of a two-dimensional object using floating point precision.
Definition: qsize.h:235
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:55
The QString class provides a Unicode character string.
Definition: qstring.h:388
The QStringList class provides a list of strings.
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
The QWindow class represents a window in the underlying windowing system.
Definition: qwindow.h:99
void createWindow(bool noVSync)
ScreenOrientation
Definition: qnamespace.h:296
#define Q_EGLFS_EXPORT
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
QT_END_INCLUDE_NAMESPACE typedef double qreal
Definition: qglobal.h:341
QPair< qreal, qreal > QDpi
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint name
GLint GLsizei GLsizei GLenum format
GLenum cap
Definition: qopenglext.h:8893
#define Q_OBJECT
Definition: qtmetamacros.h:158
QScreen * screen
[1]
Definition: main.cpp:76
aWidget window() -> setWindowTitle("New Window Title")
[2]
view create()