QtBase  v6.3.1
qoffscreensurface.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2020 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtGui module 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 QOFFSCREENSURFACE_H
41 #define QOFFSCREENSURFACE_H
42 
43 #include <QtGui/qtguiglobal.h>
44 #include <QtCore/QObject>
45 #include <QtCore/qnativeinterface.h>
46 #include <QtGui/qsurface.h>
48 
50 
52 
53 class QScreen;
55 
56 class Q_GUI_EXPORT QOffscreenSurface : public QObject, public QSurface
57 {
58  Q_OBJECT
59  Q_DECLARE_PRIVATE(QOffscreenSurface)
60 
61 public:
62  explicit QOffscreenSurface(QScreen *screen = nullptr, QObject *parent = nullptr);
64 
65  SurfaceType surfaceType() const override;
66 
67  void create();
68  void destroy();
69 
70  bool isValid() const;
71 
72  void setFormat(const QSurfaceFormat &format);
73  QSurfaceFormat format() const override;
74  QSurfaceFormat requestedFormat() const;
75 
76  QSize size() const override;
77 
78  QScreen *screen() const;
79  void setScreen(QScreen *screen);
80 
82 
84 
85 Q_SIGNALS:
87 
88 private Q_SLOTS:
89  void screenDestroyed(QObject *screen);
90 
91 private:
92 
93  QPlatformSurface *surfaceHandle() const override;
94 
96 };
97 
99 
100 #include <QtGui/qoffscreensurface_platform.h>
101 
102 #endif // QOFFSCREENSURFACE_H
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
The QOffscreenSurface class represents an offscreen surface in the underlying platform.
void screenChanged(QScreen *screen)
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition: qscreen.h:68
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:55
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
The QSurface class is an abstraction of renderable surfaces in Qt.
Definition: qsurface.h:57
SurfaceType
Definition: qsurface.h:66
widget setFormat(format)
#define Q_DISABLE_COPY(Class)
Definition: qglobal.h:515
#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
#define Q_OBJECT
Definition: qtmetamacros.h:158
#define Q_SLOTS
Definition: qtmetamacros.h:80
#define Q_MOC_INCLUDE(...)
Definition: qtmetamacros.h:115
#define Q_SIGNALS
Definition: qtmetamacros.h:81
HB_EXTERN hb_font_get_glyph_func_t void hb_destroy_func_t destroy
QScreen * screen
[1]
Definition: main.cpp:76
view create()
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent