Kanzi  3.9.9
Kanzi Engine C++ 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, const NativeDesktopProperties *desktopProperties)
 Constructor. More...
 
 LegacyGraphicsOutput (NativeWindowHandle handle, const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties, const NativeDesktopProperties *desktopProperties)
 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

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

Constructor.

Parameters
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the associated window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.
kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( NativeWindowHandle  handle,
const struct KzsSurfaceProperties surfaceProperties,
const NativeWindowProperties windowProperties,
const NativeDesktopProperties desktopProperties 
)
explicit

Constructor.

Parameters
handleHandle to an existing window.
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.
kanzi::LegacyGraphicsOutput::~LegacyGraphicsOutput ( )
override

Destructor.

Member Function Documentation

GLGraphicsOutput::GLProcPointer kanzi::LegacyGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual
bool kanzi::LegacyGraphicsOutput::makeCurrent ( )
overridevirtual
bool kanzi::LegacyGraphicsOutput::releaseCurrent ( )
overridevirtual
bool kanzi::LegacyGraphicsOutput::swapBuffers ( )
overridevirtual
bool kanzi::LegacyGraphicsOutput::swapInterval ( int  interval)
overridevirtual
Matrix4x4 kanzi::LegacyGraphicsOutput::getTargetTransformation ( ) const
inlineoverridevirtualnoexcept
optional<void*> kanzi::LegacyGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept
optional<void*> kanzi::LegacyGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept
optional<void*> kanzi::LegacyGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

GLGraphicsOutput::getNativeSurfaceHandle() implementation.

Returns nullopt.

Implements kanzi::GLGraphicsOutput.

optional<void*> kanzi::LegacyGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
overridevirtualnoexcept
bool kanzi::LegacyGraphicsOutput::destroyImage ( void *  image)
overridevirtualnoexcept
optional<GraphicsContextAPI> kanzi::LegacyGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept
optional<SurfaceClientAPI> kanzi::LegacyGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept
optional<SurfaceColorSpace> kanzi::LegacyGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept
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.
void kanzi::LegacyGraphicsOutput::handleEvents ( EventQueue eventQueue)

Handles the window resize event.

Parameters
eventQueueQueue holding the events to handle.
void kanzi::LegacyGraphicsOutput::logProperties ( ) const

Logs the properties of the graphics output.

void kanzi::LegacyGraphicsOutput::logExtensions ( ) const

Logs the extensions of the graphics context.

NativeInputHandle kanzi::LegacyGraphicsOutput::getNativeInputHandle ( )

Gets the associated native input handle.

Returns
Native input handle.
struct KzsDesktop* kanzi::LegacyGraphicsOutput::getDesktop ( ) const

Gets associated legacy desktop.

Returns
Desktop.
struct KzsWindow* kanzi::LegacyGraphicsOutput::getWindow ( ) const

Gets associated legacy window.

Returns
Window.
struct KzsSurface* kanzi::LegacyGraphicsOutput::getSurface ( ) const

Gets associated legacy surface.

Returns
Surface.
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.
bool kanzi::LegacyGraphicsOutput::resize ( unsigned int  width,
unsigned int  height 
)
overridevirtualnoexcept
bool kanzi::LegacyGraphicsOutput::setWindowTitle ( string_view  title)
overridevirtualnoexcept
optional<string> kanzi::LegacyGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

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

WindowedGraphicsOutput::resizeWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

optional<unsigned int> kanzi::LegacyGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept
optional<unsigned int> kanzi::LegacyGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept
bool kanzi::LegacyGraphicsOutput::moveWindow ( int  positionX,
int  positionY 
)
overridevirtualnoexcept
optional<int> kanzi::LegacyGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept
optional<int> kanzi::LegacyGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept
bool kanzi::LegacyGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

bool kanzi::LegacyGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeRegular() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

bool kanzi::LegacyGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMaximized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

bool kanzi::LegacyGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMinimized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

bool kanzi::LegacyGraphicsOutput::showWindow ( )
overridevirtualnoexcept
bool kanzi::LegacyGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::hideWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

bool kanzi::LegacyGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

WindowedGraphicsOutput::bringToFront() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

optional<NativeWindowHandle> kanzi::LegacyGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept
void kanzi::LegacyGraphicsOutput::setTargetTransformation ( Matrix4x4  targetTransformation)
inlineprotected

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.
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.
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.
void kanzi::LegacyGraphicsOutput::updateCachedValues ( unsigned int  width,
unsigned int  height 
)
protected

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.
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.
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

struct KzsDesktop* kanzi::LegacyGraphicsOutput::m_desktop
protected

Legacy desktop for application.

struct KzsWindow* kanzi::LegacyGraphicsOutput::m_window
protected

System-dependent window implementation.

struct KzsSurface* kanzi::LegacyGraphicsOutput::m_surface
protected

System-dependent surface implementation.


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