8#include <EGL/eglplatform.h>
9#include <QtCore/private/qohoscommon_p.h>
10#include <QtCore/qglobal.h>
11#include <QtCore/qsize.h>
12#include <QtGui/qimage.h>
14#include <native_buffer/native_buffer.h>
15#include <native_window/external_window.h>
16#include <qohosplugincore.h>
17#include <render/qohosegl.h>
20#include <render/qohosvulkansurface.h>
26class QOhosSurface
final
41 std::function<std::vector<::Region::Rect>(QImage &, ::BufferHandle *)> paintFunc,
42 std::function<
void(::BufferHandle *)> onFlushSuccessFunc);
48 VkSurfaceKHR *tryGetOrCreateVulkanWindowSurface(QVulkanInstance *instance);
52 ::OHNativeWindow *m_nativeWindow;
53 std::unique_ptr<QOhosEGLSurface> m_eglSurface;
55 std::unique_ptr<QOhosVulkanSurface> m_vulkanSurface;
std::enable_if_t< qohosplugincore_h_detail::isQOhosOptional< QOhosInvokeResult< Func, T > >, QOhosInvokeResult< Func, T > > andThen(Func &&func) const
QOhosPropertiesProvider(QOhosPropertiesStore &store)
QOhosOptional< T > tryGetProperty() const
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
QOhosPropertiesStore(QObject *qObject)
std::shared_ptr< void > addPropertyWriteCallback(QOhosConsumer< T > propertyWriteCallback)
void notifyPropertyWrite(const QByteArray &propertyName)
QOhosOptional< T > tryGetProperty() const
void setExtraUsageBitsForNativeWindowBuffer(std::uint64_t usageSetBits)
EGLSurface tryGetOrCreateEGLWindowSurface(EGLDisplay display, EGLConfig config)
QOhosOptional< QSize > surfaceResolution() const
::OHNativeWindow * nativeWindow() const
void setNativeWindowSurface(::OHNativeWindow *nativeWindow)
static constexpr ::OH_NativeBuffer_Format bufferFormat
void paintOnNativeWindowSurface(std::function< std::vector<::Region::Rect >(QImage &, ::BufferHandle *)> paintFunc, std::function< void(::BufferHandle *)> onFlushSuccessFunc)
static QImage::Format mapNativeBufferFormatToQImageFormatOrFail(std::int32_t format)
static QOhosOptional< QSize > tryGetBufferGeometryForWindow(::OHNativeWindow *nativeWindow)
QOhosSurface(::OHNativeWindow *nativeWindow)
void clearNativeWindowSurface()
bool sendEvent(WindowSystemEvent *event) override
Combined button and popup list for selecting options.
@ ForwardToGuiApplication
QOhosView * mapQWindowToViewOrNull(QWindow *window)
std::string makeQObjectOhosPropertyName()
QOhosOptional< T > tryMapFromQVariant(QVariant variant)
const char * qObjectOhosPropertyName()
std::shared_ptr< QWindowSystemEventHandler > makeApplicationStateTracker()
QOhosOptional< void > makeEmptyQOhosOptional()
void setQOhosPropertyOnQObject(QObject *qObject, T propertyValue)
QOhosOptional< T > tryGetQOhosPropertyFromQObject(QObject *qObject)