Kanzi 4.0.0
kanzi::macos::DefaultMacosGraphicsOutput Class Reference

Class that represents the default MacOS graphics output. More...

#include <kanzi/platform/platform/graphics_output/macos/default_macos_graphics_output.hpp>

Inheritance diagram for kanzi::macos::DefaultMacosGraphicsOutput:
[legend]

Public Member Functions

bool bringToFront () noexcept override
 WindowedGraphicsOutput::bringToFront() implementation.
 
 DefaultMacosGraphicsOutput (const DefaultMacosGraphicsOutput &)=delete
 Delete copy and move constructors and operators.
 
 DefaultMacosGraphicsOutput (const DefaultMacosGraphicsOutputProperties &properties)
 Constructor.
 
 DefaultMacosGraphicsOutput (DefaultMacosGraphicsOutput &&) noexcept=delete
 
void gatherEvents (EventQueue &queue) override
 EventSource::gatherEvents() implementation.
 
KZ_NO_DISCARD EventQueuegetEventQueue () noexcept
 Get the internal event queue.
 
KZ_NO_DISCARD optional< NativeEventHandlegetNativeEventHandle () const noexcept override
 WakeupSignalSource::getNativeEventHandle() implementation.
 
KZ_NO_DISCARD uintptr_t getNativeFramebufferHandle (platform::APIBackend backend) const noexcept override
 FramebufferGraphicsOutput::getNativeFramebufferHandle() implementation.
 
KZ_NO_DISCARD optional< NativeWindowHandlegetNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation.
 
KZ_NO_DISCARD Matrix4x4 getTargetTransformation () const noexcept override
 FramebufferGraphicsOutput::getTargetTransformation() implementation.
 
KZ_NO_DISCARD optional< unsigned intgetWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation.
 
KZ_NO_DISCARD optional< intgetWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation.
 
KZ_NO_DISCARD optional< intgetWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation.
 
KZ_NO_DISCARD optional< string > getWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation.
 
KZ_NO_DISCARD optional< unsigned intgetWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation.
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation.
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation.
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation.
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation.
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation.
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation.
 
DefaultMacosGraphicsOutputoperator= (const DefaultMacosGraphicsOutput &)=delete
 
DefaultMacosGraphicsOutputoperator= (DefaultMacosGraphicsOutput &&) noexcept=delete
 
void perFrameCallback ()
 Called by Objective-C++ code to pass per frame signal from view.
 
void registerFrameCallback (function< void()> callback)
 Registers a frame callback to call each frame.
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation.
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation.
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation.
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation.
 
 ~DefaultMacosGraphicsOutput () override
 Destructor.
 
- 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.
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system.
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system.
 
virtual ~GraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::EventSource
virtual ~EventSource ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WakeupSignalSource
WakeupSignalSourceoperator= (const WakeupSignalSource &)=default
 Copy assignment operator.
 
WakeupSignalSourceoperator= (WakeupSignalSource &&) noexcept=default
 Move assignment operator.
 
 WakeupSignalSource ()=default
 Constructor.
 
 WakeupSignalSource (const WakeupSignalSource &)=default
 Copy constructor.
 
 WakeupSignalSource (WakeupSignalSource &&) noexcept=default
 Move constructor.
 
virtual ~WakeupSignalSource ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::FramebufferGraphicsOutput
 FramebufferGraphicsOutput () noexcept
 Constructor.
 
template<typename FramebufferT , typename = enable_if_t<is_base_of_v<FramebufferBase, FramebufferT>>>
KZ_NO_DISCARD FramebufferTgetFramebuffer () const noexcept
 Returns the framebuffer for the graphics output.
 
template<typename FramebufferT , typename >
FramebufferTgetFramebuffer () const noexcept
 
void invalidate () noexcept
 Invalidates underlying framebuffer.
 
void setFramebuffer (unique_ptr< FramebufferBase > framebuffer) noexcept
 Sets framebuffer for the graphics output.
 
virtual ~FramebufferGraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor.
 

Protected Member Functions

void updateCache (uint32_t width, uint32_t height)
 Updates the target layout area size.
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution.
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size.
 

Detailed Description

Class that represents the default MacOS graphics output.

Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ DefaultMacosGraphicsOutput() [1/3]

kanzi::macos::DefaultMacosGraphicsOutput::DefaultMacosGraphicsOutput ( const DefaultMacosGraphicsOutputProperties & properties)
explicit

Constructor.

Parameters
propertiesSpecifies properties to request for the graphics output.

◆ ~DefaultMacosGraphicsOutput()

kanzi::macos::DefaultMacosGraphicsOutput::~DefaultMacosGraphicsOutput ( )
override

Destructor.

◆ DefaultMacosGraphicsOutput() [2/3]

kanzi::macos::DefaultMacosGraphicsOutput::DefaultMacosGraphicsOutput ( const DefaultMacosGraphicsOutput & )
delete

Delete copy and move constructors and operators.

◆ DefaultMacosGraphicsOutput() [3/3]

kanzi::macos::DefaultMacosGraphicsOutput::DefaultMacosGraphicsOutput ( DefaultMacosGraphicsOutput && )
deletenoexcept

Member Function Documentation

◆ gatherEvents()

void kanzi::macos::DefaultMacosGraphicsOutput::gatherEvents ( EventQueue & queue)
overridevirtual

EventSource::gatherEvents() implementation.

Implements kanzi::EventSource.

◆ getNativeEventHandle()

KZ_NO_DISCARD optional< NativeEventHandle > kanzi::macos::DefaultMacosGraphicsOutput::getNativeEventHandle ( ) const
overridevirtualnoexcept

◆ getTargetTransformation()

KZ_NO_DISCARD Matrix4x4 kanzi::macos::DefaultMacosGraphicsOutput::getTargetTransformation ( ) const
overridevirtualnoexcept

◆ resize()

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

◆ setWindowTitle()

bool kanzi::macos::DefaultMacosGraphicsOutput::setWindowTitle ( string_view title)
overridevirtualnoexcept

◆ getWindowTitle()

KZ_NO_DISCARD optional< string > kanzi::macos::DefaultMacosGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

◆ resizeWindow()

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

◆ getWindowWidth()

KZ_NO_DISCARD optional< unsigned int > kanzi::macos::DefaultMacosGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

◆ getWindowHeight()

KZ_NO_DISCARD optional< unsigned int > kanzi::macos::DefaultMacosGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

◆ moveWindow()

bool kanzi::macos::DefaultMacosGraphicsOutput::moveWindow ( int positionX,
int positionY )
overridevirtualnoexcept

◆ getWindowPositionX()

KZ_NO_DISCARD optional< int > kanzi::macos::DefaultMacosGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

KZ_NO_DISCARD optional< int > kanzi::macos::DefaultMacosGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::macos::DefaultMacosGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

◆ makeRegular()

bool kanzi::macos::DefaultMacosGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

◆ makeMaximized()

bool kanzi::macos::DefaultMacosGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

◆ makeMinimized()

bool kanzi::macos::DefaultMacosGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

◆ showWindow()

bool kanzi::macos::DefaultMacosGraphicsOutput::showWindow ( )
overridevirtualnoexcept

◆ hideWindow()

bool kanzi::macos::DefaultMacosGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

◆ bringToFront()

bool kanzi::macos::DefaultMacosGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

◆ getNativeWindowHandle()

KZ_NO_DISCARD optional< NativeWindowHandle > kanzi::macos::DefaultMacosGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

◆ getNativeFramebufferHandle()

KZ_NO_DISCARD uintptr_t kanzi::macos::DefaultMacosGraphicsOutput::getNativeFramebufferHandle ( platform::APIBackend backend) const
overridevirtualnoexcept

◆ registerFrameCallback()

void kanzi::macos::DefaultMacosGraphicsOutput::registerFrameCallback ( function< void()> callback)

Registers a frame callback to call each frame.

Used from Objective-C++ code to register frame callback to run Kanzi main loop.

Parameters
callbackCallback function to call each frame.

◆ getEventQueue()

KZ_NO_DISCARD EventQueue & kanzi::macos::DefaultMacosGraphicsOutput::getEventQueue ( )
inlinenoexcept

Get the internal event queue.

Used internally from Objective-C++ code to add input events.

Returns
Event qeueue

◆ perFrameCallback()

void kanzi::macos::DefaultMacosGraphicsOutput::perFrameCallback ( )

Called by Objective-C++ code to pass per frame signal from view.

◆ operator=() [1/2]

DefaultMacosGraphicsOutput & kanzi::macos::DefaultMacosGraphicsOutput::operator= ( const DefaultMacosGraphicsOutput & )
delete

◆ operator=() [2/2]

DefaultMacosGraphicsOutput & kanzi::macos::DefaultMacosGraphicsOutput::operator= ( DefaultMacosGraphicsOutput && )
deletenoexcept

◆ updateCache()

void kanzi::macos::DefaultMacosGraphicsOutput::updateCache ( uint32_t width,
uint32_t height )
protected

Updates the target layout area size.

Parameters
widthThe layout width in pixels.
heightThe layout height in pixels.

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