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;
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)
void setNativeWindowSurface(::OHNativeWindow *nativeWindow, const QOhosOptional< QSize > &optSurfaceSize)
QOhosOptional< QSize > surfaceResolution() const
::OHNativeWindow * nativeWindow() const
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)
EGLSurface tryGetOrCreateEGLWindowSurface(EGLDisplay display, EGLConfig config, bool swappingBuffers)
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()
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhos::enums::kit::ShareKit::systemShare::SelectionMode))
std::nullopt_t makeEmptyQOhosOptional()
void setQOhosPropertyOnQObject(QObject *qObject, T propertyValue)
QOhosOptional< T > tryGetQOhosPropertyFromQObject(QObject *qObject)