C

SafeWindowInterface Class

class SafeRenderer::SafeWindowInterface

SafeWindow base class and shared functionality. More...

Header: #include <SafeWindowInterface>
Since: QtSafeRenderer 3.0
Inherits: SafeRenderer::QSafeAbstractWindow

Public Functions

SafeWindowInterface(const SafeRenderer::QSafeSize &sizeArg, const SafeRenderer::QSafePoint &positionArg)
virtual ~SafeWindowInterface() = 0
virtual SafeRenderer::quint32 animationTimeoutValue() const

Reimplemented Public Functions

virtual const SafeRenderer::QSafePoint windowPosition() const override
virtual const SafeRenderer::QSafeSize windowSize() const override

Protected Functions

std::size_t dirtyAreaCount() const
const SafeRenderer::SafeWindowInterface::DirtyRectArray &getDirtyAreas() &
bool isFullClearRequired() const

Detailed Description

The SafeWindowInterface is an interface class that platform specific graphics adaptations need to inherit. It contains all shared functionality for graphics adaptations and some pure virtual methods for the adaptation to override. Any adaptation implementations need to inherit this class and implement the required functions with platform specific APIs and coding conventions.

Member Function Documentation

[explicit] SafeWindowInterface::SafeWindowInterface(const SafeRenderer::QSafeSize &sizeArg, const SafeRenderer::QSafePoint &positionArg)

Constructs a SafeWindowInterface object with a sizeArg and positionArg. sizeArg is the size of the target surface. positionArg is the position of the target surface on the screen.

In case of a failure, one of the following exceptions will be thrown:

ExceptionIdDescription
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::UnknownBitmapIdThe bitmap could not found bitmap by given ID.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::UnknownItemThe item could not be found.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::ItemOutOfBoundsThe item's position is out of the layout's boundaries.
SafeRenderer::QSafeRendererExceptionSafeRenderer::QSafeRendererException::RendererException::UnsupportedSurfaceFormatThe bits per pixel value in the window is neither 16 nor 32, or the given framebuffer address is nullptr, or the framebuffer is not 32-bit word aligned.

[pure virtual] SafeWindowInterface::~SafeWindowInterface()

Destructs the SafeWindowInterface instance.

[virtual] SafeRenderer::quint32 SafeWindowInterface::animationTimeoutValue() const

This function returns the animation timeout value in milliseconds. If the default Constraints::ANIMATION_TIMER_TICK_IN_MS value is not preferred by the adaptation, this function should be overwritten to return a wanted value instead.

Returns Animation timeout value in milliseconds.

[protected] std::size_t SafeWindowInterface::dirtyAreaCount() const

Returns the count of current dirty areas. Returns Count of dirty areas that have been set.

[protected] const SafeRenderer::SafeWindowInterface::DirtyRectArray &SafeWindowInterface::getDirtyAreas() &

Returns the dirty rects array.

Returns Array of dirty rects

[protected] bool SafeWindowInterface::isFullClearRequired() const

Is the fullscreen clear required due to dirty areas array being full.

Returns true if fullscreen clear is required, false if not.

[override virtual] const SafeRenderer::QSafePoint SafeWindowInterface::windowPosition() const

Get the position of the window.

Returns Position of the window as QSafePoint.

[override virtual] const SafeRenderer::QSafeSize SafeWindowInterface::windowSize() const

Get the size of the window.

Returns Size of the window as QSafeSize.

Available under certain Qt licenses.
Find out more.