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
qandroidplatformvulkanwindow.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QANDROIDPLATFORMVULKANWINDOW_H
5#define QANDROIDPLATFORMVULKANWINDOW_H
6
7#if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_ANDROID_KHR)
8#error "vulkan.h included without Android WSI"
9#endif
10
11#define VK_USE_PLATFORM_ANDROID_KHR
12
15
16#include <QWaitCondition>
17#include <QtCore/QJniEnvironment>
18#include <QtCore/QJniObject>
19
21
23{
24public:
27
28 void setGeometry(const QRect &rect) override;
29 QSurfaceFormat format() const override;
31
32 VkSurfaceKHR *vkSurface();
33
34private:
35 void clearSurface();
36 void destroyAndClearSurface();
37
38 ANativeWindow *m_nativeWindow;
39 QSurfaceFormat m_format;
40 QRect m_oldGeometry;
41 VkSurfaceKHR m_vkSurface;
42 PFN_vkCreateAndroidSurfaceKHR m_createVkSurface;
43 PFN_vkDestroySurfaceKHR m_destroyVkSurface;
44};
45
47
48#endif // QANDROIDPLATFORMVULKANWINDOW_H
void applicationStateChanged(Qt::ApplicationState) override
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QSurfaceFormat format() const override
Returns the actual surface format of the window.
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
\inmodule QtCore\reentrant
Definition qrect.h:30
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
ApplicationState
Definition qnamespace.h:262