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
qsurface.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 QSURFACE_H
5#define QSURFACE_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qnamespace.h>
9#include <QtGui/qsurfaceformat.h>
10#include <QtCore/qmetatype.h>
11#include <QtCore/qsize.h>
12
14
15
17
18class QSurfacePrivate;
19
20class Q_GUI_EXPORT QSurface
21{
23public:
26 Offscreen
27 };
28 Q_ENUM(SurfaceClass)
29
39 Q_ENUM(SurfaceType)
40
41 virtual ~QSurface();
42
43 SurfaceClass surfaceClass() const;
44
45 virtual QSurfaceFormat format() const = 0;
46 virtual QPlatformSurface *surfaceHandle() const = 0;
47
48 virtual SurfaceType surfaceType() const = 0;
49 bool supportsOpenGL() const;
50
51 virtual QSize size() const = 0;
52
53protected:
54 explicit QSurface(SurfaceClass type);
55
57
58 QSurfacePrivate *m_reserved;
59};
60
62
63QT_DECL_METATYPE_EXTERN_TAGGED(QSurface*, QSurface_ptr, Q_GUI_EXPORT)
64
65#endif //QSURFACE_H
The QPlatformSurface class provides an abstraction for a surface.
\inmodule QtCore
Definition qsize.h:25
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qsurface.h:21
virtual QPlatformSurface * surfaceHandle() const =0
Returns a handle to the platform-specific implementation of the surface.
virtual SurfaceType surfaceType() const =0
Returns the type of the surface.
SurfaceType
The SurfaceType enum describes what type of surface this is.
Definition qsurface.h:30
@ OpenVGSurface
Definition qsurface.h:34
@ RasterGLSurface
Definition qsurface.h:33
@ RasterSurface
Definition qsurface.h:31
@ OpenGLSurface
Definition qsurface.h:32
@ MetalSurface
Definition qsurface.h:36
@ VulkanSurface
Definition qsurface.h:35
virtual QSize size() const =0
Returns the size of the surface in pixels.
SurfaceClass m_type
Definition qsurface.h:56
SurfaceClass
The SurfaceClass enum describes the actual subclass of the surface.
Definition qsurface.h:24
QSurfacePrivate * m_reserved
Definition qsurface.h:58
virtual QSurfaceFormat format() const =0
Returns the format of the surface.
Combined button and popup list for selecting options.
#define QT_DECL_METATYPE_EXTERN_TAGGED(TYPE, TAG, EXPORT)
Definition qmetatype.h:1376
GLenum type
#define Q_ENUM(x)
#define Q_GADGET