Class that represents the default Win32 WGL graphics output. More...
#include <kanzi/core.ui/platform/graphics_output/win32_wgl/default_win32_wgl_graphics_output.hpp>
Public Member Functions | |
bool | bringToFront () noexcept override |
Schedules to bring a window to front. More... | |
KZ_NO_DISCARD optional< void * > | createImage (int target, void *data, int *attributes) noexcept override |
Not implemented on WGL. More... | |
DefaultWin32WGLGraphicsOutput (const kanzi::win32::DefaultWin32WGLGraphicsOutputProperties &properties) | |
Constructor. More... | |
bool | destroyImage (void *image) noexcept override |
Not implemented on WGL. More... | |
void | displayWindow () noexcept |
Displays and activates the window. More... | |
KZ_NO_DISCARD unsigned int | findWindowZOrder () const noexcept |
Finds the z ordering for the active window related to all other windows currently visible. More... | |
void | gatherEvents (EventQueue &queue) override |
Amends the given event queue with events received so far. More... | |
virtual KZ_NO_DISCARD optional< SurfaceColorSpace > | getColorSpace () const noexcept override |
Gets the color space used by the associated graphics context. More... | |
virtual KZ_NO_DISCARD optional< GraphicsContextAPI > | getGraphicsContextAPI () const noexcept override |
Gets the API used by the associated graphics context. More... | |
KZ_NO_DISCARD optional< void * > | getNativeContextHandle () const noexcept override |
Gets the associated native GL context handle. More... | |
KZ_NO_DISCARD optional< void * > | getNativeDisplayHandle () const noexcept override |
Gets the associated native GL display handle. More... | |
KZ_NO_DISCARD optional< NativeEventHandle > | getNativeEventHandle () const noexcept override |
Returns a waitable event handle for this event source, if available. More... | |
KZ_NO_DISCARD optional< void * > | getNativeSurfaceHandle () const noexcept override |
Gets the associated native GL surface handle. More... | |
KZ_NO_DISCARD optional< NativeWindowHandle > | getNativeWindowHandle () const noexcept override |
Gets the associated window handle. More... | |
KZ_NO_DISCARD GLProcPointer | getProcAddress (string_view functionName) noexcept override |
Retrieves the pointer to a GL function. More... | |
virtual KZ_NO_DISCARD optional< SurfaceClientAPI > | getSurfaceClientAPI () const noexcept override |
Gets the type of the associated graphics surface. More... | |
KZ_NO_DISCARD Matrix4x4 | getTargetTransformation () const noexcept override |
Returns the target transformation. More... | |
KZ_NO_DISCARD optional< unsigned int > | getWindowHeight () const noexcept override |
Returns the height of the active window. More... | |
KZ_NO_DISCARD optional< int > | getWindowPositionX () const noexcept override |
Returns the x position of a window. More... | |
KZ_NO_DISCARD optional< int > | getWindowPositionY () const noexcept override |
Returns the y position of a window. More... | |
KZ_NO_DISCARD optional< string > | getWindowTitle () const noexcept override |
Gets the title of the window. More... | |
KZ_NO_DISCARD optional< unsigned int > | getWindowWidth () const noexcept override |
Returns the width of the active window. More... | |
bool | hideWindow () noexcept override |
Schedules to make a window invisible. More... | |
void | logClientWindowSize () const noexcept |
Prints the active client window size to log. More... | |
void | logDisplayCount () const noexcept |
Prints the number of active displays in the current session. More... | |
void | logMousePosition () const noexcept |
Prints the active mouse position to log. More... | |
void | logWindowPosition () const noexcept |
Prints the active window position to log. More... | |
void | logWindowSize () const noexcept |
Prints the active window size to log. More... | |
bool | makeCurrent () noexcept override |
Activates the WGL context for the current thread. More... | |
bool | makeFullscreen () noexcept override |
Schedules to make a window full-screen. More... | |
bool | makeMaximized () noexcept override |
Schedules to maximize a window. More... | |
bool | makeMinimized () noexcept override |
Schedules to minimize a window. More... | |
bool | makeRegular () noexcept override |
Schedules to make a window regular. More... | |
bool | moveWindow (int positionX, int positionY) noexcept override |
Schedules a window move. More... | |
bool | releaseCurrent () noexcept override |
Deactivates the WGL context for the current thread. More... | |
bool | resize (unsigned int width, unsigned int height) noexcept override |
Schedules a resize of the target layout area. More... | |
bool | resizeWindow (unsigned int width, unsigned int height) noexcept override |
Schedules the resizing of the active window. More... | |
bool | setWindowTitle (string_view title) noexcept override |
Sets the title of the window. More... | |
bool | showWindow () noexcept override |
Schedules to make a window visible. More... | |
bool | swapBuffers () noexcept override |
Posts rendering results. More... | |
bool | swapInterval (int interval) noexcept override |
Sets the minimum number of displayed video frames before a buffer swap. More... | |
void | updateWindow () noexcept |
Updates the client area of the window. More... | |
~DefaultWin32WGLGraphicsOutput () | |
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::EventSource | |
virtual | ~EventSource ()=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 | |
bool | recallWindowPlacement () noexcept |
Restores the position and size of the previously stored window. More... | |
void | setTargetTransformation (Matrix4x4 targetTransformation) noexcept |
Sets the target transformation. More... | |
bool | storeWindowPlacement () noexcept |
Stores the position and size of the current window. More... | |
void | updateTargetLayoutArea () noexcept |
Updates the render target size for the client window. 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... | |
Additional Inherited Members | |
Public Types inherited from kanzi::GLGraphicsOutput | |
using | GLProcPointer) = void(*)( |
Pointer to GL function. More... | |
Class that represents the default Win32 WGL graphics output.
To resize the windowed graphics output:
To set a position for the windowed graphics output:
To set a title for the windowed graphics output:
To show and hide the windowed graphics output:
To minimize and maximize the windowed graphics output:
To bring the windowed graphics output to front:
|
explicit |
Constructor.
properties | Specifies properties to request for the graphics output. |
kanzi::win32::DefaultWin32WGLGraphicsOutput::~DefaultWin32WGLGraphicsOutput | ( | ) |
Destructor.
|
noexcept |
Prints the number of active displays in the current session.
|
noexcept |
Prints the active client window size to log.
|
noexcept |
Prints the active window size to log.
|
noexcept |
Prints the active window position to log.
|
noexcept |
Prints the active mouse position to log.
|
noexcept |
Updates the client area of the window.
|
noexcept |
Displays and activates the window.
|
overridevirtual |
Amends the given event queue with events received so far.
queue | Event queue to update. Do not clear and do not assume that the queue is empty. |
Implements kanzi::EventSource.
|
overridevirtualnoexcept |
Returns a waitable event handle for this event source, if available.
nullopt | Getting the event handle failed. |
Implements kanzi::EventSource.
|
overridevirtualnoexcept |
Retrieves the pointer to a GL function.
functionName | Name of the GL function. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Activates the WGL context for the current thread.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Deactivates the WGL context for the current thread.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Posts rendering results.
Implicitly flushes the rendering pipeline and executes all received rendering commands before posting.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Sets the minimum number of displayed video frames before a buffer swap.
interval | Minimum number of video frames to wait before buffer swap. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the associated native GL display handle.
nullopt | Getting the GL display failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the associated native GL context handle.
nullopt | Getting the GL context failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the associated native GL surface handle.
nullopt | Getting the GL surface failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Schedules a resize of the target layout area.
width | New target layout area width in pixels. |
height | New target layout area height in pixels. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Sets the title of the window.
title | The title to set. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Gets the title of the window.
nullopt | Getting the title of the window failed. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules the resizing of the active window.
width | New window width in implementation defined units. |
height | New window height in implementation defined units. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Returns the width of the active window.
nullopt | Failed to get the width of the active window. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Returns the height of the active window.
nullopt | Failed to get the height of the active window. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules a window move.
positionX | New x position of the window in implementation-defined units. |
positionY | New y position of the window in implementation-defined units. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Returns the x position of a window.
nullopt | Failed to get the x position of the window. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Returns the y position of a window.
nullopt | Failed to get the y position of the window. |
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to make a window full-screen.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to make a window regular.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to maximize a window.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to minimize a window.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to make a window visible.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to make a window invisible.
Implements kanzi::WindowedGraphicsOutput.
|
overridevirtualnoexcept |
Schedules to bring a window to front.
Implements kanzi::WindowedGraphicsOutput.
|
noexcept |
Finds the z ordering for the active window related to all other windows currently visible.
|
overridevirtualnoexcept |
Returns the target transformation.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the API used by the associated graphics context.
nullopt | Failed to get the graphics context. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the type of the associated graphics surface.
nullopt | Failed to get the graphics surface. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the color space used by the associated graphics context.
nullopt | Failed to get the color space. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the associated window handle.
nullopt | Failed to get handle for the associated window. |
Implements kanzi::WindowedGraphicsOutput.
|
protectednoexcept |
Updates the render target size for the client window.
|
protectednoexcept |
Stores the position and size of the current window.
|
protectednoexcept |
Restores the position and size of the previously stored window.
|
inlineprotectednoexcept |
Sets the target transformation.
targetTransformation | The target transformation matrix. |