Kanzi  3.9.5
Kanzi Engine API
kanzi::LegacyGraphicsOutput Class Reference

LegacyGraphicsOutput class. More...

#include <kanzi/core.ui/platform/graphics_output/legacy/legacy_graphics_output.hpp>

Inheritance diagram for kanzi::LegacyGraphicsOutput:
[legend]

Public Member Functions

bool bringToFront () noexcept override
 WindowedGraphicsOutput::bringToFront() implementation. More...
 
optional< void * > createImage (int target, void *data, int *attributes) noexcept override
 GLGraphicsOutput::createImage() implementation. More...
 
bool destroyImage (void *image) noexcept override
 GLGraphicsOutput::destroyImage() implementation. More...
 
optional< SurfaceColorSpacegetColorSpace () const noexcept override
 GLGraphicsOutput::getColorSpace() implementation. More...
 
struct KzsDesktopgetDesktop () const
 Gets associated legacy desktop. More...
 
struct KzsDisplaygetDisplay (size_t index) const
 Access associated legacy display by index. More...
 
optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 GLGraphicsOutput::getGraphicsContextAPI() implementation. More...
 
optional< void * > getNativeContextHandle () const noexcept override
 GLGraphicsOutput::getNativeContextHandle() implementation. More...
 
optional< void * > getNativeDisplayHandle () const noexcept override
 GLGraphicsOutput::getNativeDisplayHandle() implementation. More...
 
NativeInputHandle getNativeInputHandle ()
 Gets the associated native input handle. More...
 
optional< void * > getNativeSurfaceHandle () const noexcept override
 GLGraphicsOutput::getNativeSurfaceHandle() implementation. More...
 
optional< NativeWindowHandle > getNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation. More...
 
KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle getOrientationAngle () const
 Gets legacy orientation angle. More...
 
GLGraphicsOutput::GLProcPointer getProcAddress (string_view functionName) override
 GLGraphicsOutput::getProcAddress() implementation. More...
 
struct KzsSurfacegetSurface () const
 Gets associated legacy surface. More...
 
optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 GLGraphicsOutput::getSurfaceClientAPI() implementation. More...
 
Matrix4x4 getTargetTransformation () const noexcept override
 GLGraphicsOutput::getTargetTransformation() implementation. More...
 
struct KzsWindowgetWindow () const
 Gets associated legacy window. More...
 
optional< unsigned int > getWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation. More...
 
optional< int > getWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation. More...
 
optional< int > getWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation. More...
 
optional< string > getWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation. More...
 
optional< unsigned int > getWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation. More...
 
void handleEvents (EventQueue &eventQueue)
 Handles the window resize event. More...
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation. More...
 
 LegacyGraphicsOutput (const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties)
 Constructor. More...
 
 LegacyGraphicsOutput (NativeWindowHandle handle, const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties)
 Constructor. More...
 
void logExtensions () const
 Logs the extensions of the graphics context. More...
 
void logProperties () const
 Logs the properties of the graphics output. More...
 
bool makeCurrent () override
 GLGraphicsOutput::makeCurrent() implementation. More...
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation. More...
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation. More...
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation. More...
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation. More...
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation. More...
 
bool releaseCurrent () override
 GLGraphicsOutput::releaseCurrent() implementation. More...
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation. More...
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation. More...
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation. More...
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation. More...
 
bool swapBuffers () override
 GLGraphicsOutput::swapBuffers() implementation. More...
 
bool swapInterval (int interval) override
 GLGraphicsOutput::swapInterval() implementation. More...
 
 ~LegacyGraphicsOutput () override
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GraphicsOutput
KZ_NO_DISCARD Vector2 getDpi () const noexcept
 Returns the resolution of the target coordinate system in dots per inch. More...
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system. More...
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system. More...
 
virtual ~GraphicsOutput ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GLGraphicsOutput
virtual ~GLGraphicsOutput ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor. More...
 

Protected Member Functions

virtual EventQueue::ProcessingResult handleEvent (InputEvent *event)
 Handles a single event from a queue. More...
 
void setTargetTransformation (Matrix4x4 targetTransformation)
 Sets the target transformation. More...
 
void updateCachedValues (unsigned int width, unsigned int height)
 Updates all cached values from given layout size. More...
 
void updateSurfaceSize (unsigned int width, unsigned int height)
 Resizes the surface to match given layout size. More...
 
void updateTargetTransformation (unsigned int width, unsigned int height)
 Modifies the target transformation to match given layout size. More...
 
virtual void windowResizedOverride (unsigned int width, unsigned int height)
 Called whenever window size has changed. More...
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution. More...
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size. More...
 

Protected Attributes

struct KzsDesktopm_desktop
 Legacy desktop for application. More...
 
struct KzsSurfacem_surface
 System-dependent surface implementation. More...
 
struct KzsWindowm_window
 System-dependent window implementation. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer = void(*)()
 Pointer to GL function. More...
 

Detailed Description

LegacyGraphicsOutput class.

A graphics output implementation that provides basic GL rendering output.

Constructor & Destructor Documentation

◆ LegacyGraphicsOutput() [1/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( const struct KzsSurfaceProperties surfaceProperties,
const NativeWindowProperties windowProperties 
)
explicit

Constructor.

Parameters
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the associated window.

◆ LegacyGraphicsOutput() [2/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( NativeWindowHandle  handle,
const struct KzsSurfaceProperties surfaceProperties,
const NativeWindowProperties windowProperties 
)
explicit

Constructor.

Parameters
handleHandle to an existing window.
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the window.

◆ ~LegacyGraphicsOutput()

kanzi::LegacyGraphicsOutput::~LegacyGraphicsOutput ( )
override

Destructor.

Member Function Documentation

◆ getProcAddress()

GLGraphicsOutput::GLProcPointer kanzi::LegacyGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual

◆ makeCurrent()

bool kanzi::LegacyGraphicsOutput::makeCurrent ( )
overridevirtual

◆ releaseCurrent()

bool kanzi::LegacyGraphicsOutput::releaseCurrent ( )
overridevirtual

◆ swapBuffers()

bool kanzi::LegacyGraphicsOutput::swapBuffers ( )
overridevirtual

◆ swapInterval()

bool kanzi::LegacyGraphicsOutput::swapInterval ( int  interval)
overridevirtual

◆ getTargetTransformation()

Matrix4x4 kanzi::LegacyGraphicsOutput::getTargetTransformation ( ) const
inlineoverridevirtualnoexcept

◆ getNativeDisplayHandle()

optional<void*> kanzi::LegacyGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept

◆ getNativeContextHandle()

optional<void*> kanzi::LegacyGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept

◆ getNativeSurfaceHandle()

optional<void*> kanzi::LegacyGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

GLGraphicsOutput::getNativeSurfaceHandle() implementation.

Returns nullopt.

Implements kanzi::GLGraphicsOutput.

◆ createImage()

optional<void*> kanzi::LegacyGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
overridevirtualnoexcept

◆ destroyImage()

bool kanzi::LegacyGraphicsOutput::destroyImage ( void *  image)
overridevirtualnoexcept

◆ getGraphicsContextAPI()

optional<GraphicsContextAPI> kanzi::LegacyGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept

◆ getSurfaceClientAPI()

optional<SurfaceClientAPI> kanzi::LegacyGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept

◆ getColorSpace()

optional<SurfaceColorSpace> kanzi::LegacyGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept

◆ getOrientationAngle()

KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle kanzi::LegacyGraphicsOutput::getOrientationAngle ( ) const

Gets legacy orientation angle.

New code should use GLGraphicsOutput::getTargetTransformation() instead.

Returns
Display orientation angle.

◆ handleEvents()

void kanzi::LegacyGraphicsOutput::handleEvents ( EventQueue eventQueue)

Handles the window resize event.

Parameters
eventQueueQueue holding the events to handle.

◆ logProperties()

void kanzi::LegacyGraphicsOutput::logProperties ( ) const

Logs the properties of the graphics output.

◆ logExtensions()

void kanzi::LegacyGraphicsOutput::logExtensions ( ) const

Logs the extensions of the graphics context.

◆ getNativeInputHandle()

NativeInputHandle kanzi::LegacyGraphicsOutput::getNativeInputHandle ( )

Gets the associated native input handle.

Returns
Native input handle.

◆ getDesktop()

struct KzsDesktop* kanzi::LegacyGraphicsOutput::getDesktop ( ) const

Gets associated legacy desktop.

Returns
Desktop.

◆ getWindow()

struct KzsWindow* kanzi::LegacyGraphicsOutput::getWindow ( ) const

Gets associated legacy window.

Returns
Window.

◆ getSurface()

struct KzsSurface* kanzi::LegacyGraphicsOutput::getSurface ( ) const

Gets associated legacy surface.

Returns
Surface.

◆ getDisplay()

struct KzsDisplay* kanzi::LegacyGraphicsOutput::getDisplay ( size_t  index) const

Access associated legacy display by index.

Parameters
indexDisplay index to access.
Returns
Display at given index or nullptr.

◆ resize()

bool kanzi::LegacyGraphicsOutput::resize ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept

◆ setWindowTitle()

bool kanzi::LegacyGraphicsOutput::setWindowTitle ( string_view  title)
overridevirtualnoexcept

◆ getWindowTitle()

optional<string> kanzi::LegacyGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ resizeWindow()

bool kanzi::LegacyGraphicsOutput::resizeWindow ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept

WindowedGraphicsOutput::resizeWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowWidth()

optional<unsigned int> kanzi::LegacyGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

◆ getWindowHeight()

optional<unsigned int> kanzi::LegacyGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

◆ moveWindow()

bool kanzi::LegacyGraphicsOutput::moveWindow ( int  positionX,
int  positionY 
)
overridevirtualnoexcept

◆ getWindowPositionX()

optional<int> kanzi::LegacyGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

optional<int> kanzi::LegacyGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::LegacyGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeRegular()

bool kanzi::LegacyGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeRegular() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMaximized()

bool kanzi::LegacyGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMaximized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMinimized()

bool kanzi::LegacyGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMinimized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ showWindow()

bool kanzi::LegacyGraphicsOutput::showWindow ( )
overridevirtualnoexcept

◆ hideWindow()

bool kanzi::LegacyGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::hideWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ bringToFront()

bool kanzi::LegacyGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

WindowedGraphicsOutput::bringToFront() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getNativeWindowHandle()

optional<NativeWindowHandle> kanzi::LegacyGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

◆ setTargetTransformation()

void kanzi::LegacyGraphicsOutput::setTargetTransformation ( Matrix4x4  targetTransformation)
inlineprotected

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.

◆ updateTargetTransformation()

void kanzi::LegacyGraphicsOutput::updateTargetTransformation ( unsigned int  width,
unsigned int  height 
)
protected

Modifies the target transformation to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateSurfaceSize()

void kanzi::LegacyGraphicsOutput::updateSurfaceSize ( unsigned int  width,
unsigned int  height 
)
protected

Resizes the surface to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateCachedValues()

void kanzi::LegacyGraphicsOutput::updateCachedValues ( unsigned int  width,
unsigned int  height 
)
inlineprotected

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ windowResizedOverride()

virtual void kanzi::LegacyGraphicsOutput::windowResizedOverride ( unsigned int  width,
unsigned int  height 
)
inlineprotectedvirtual

Called whenever window size has changed.

Parameters
widthNew window content area width in pixels.
heightNew window content area height in pixels.

◆ handleEvent()

virtual EventQueue::ProcessingResult kanzi::LegacyGraphicsOutput::handleEvent ( InputEvent event)
protectedvirtual

Handles a single event from a queue.

Parameters
eventEvent to handle.
Returns
Processing result.

Member Data Documentation

◆ m_desktop

struct KzsDesktop* kanzi::LegacyGraphicsOutput::m_desktop
protected

Legacy desktop for application.

◆ m_window

struct KzsWindow* kanzi::LegacyGraphicsOutput::m_window
protected

System-dependent window implementation.

◆ m_surface

struct KzsSurface* kanzi::LegacyGraphicsOutput::m_surface
protected

System-dependent surface implementation.


The documentation for this class was generated from the following file: