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. | |
KZ_NO_DISCARD optional< void * > | createImage (int target, void *data, int *attributes) noexcept override |
Not implemented on WGL. | |
DefaultWin32WGLGraphicsOutput (const kanzi::win32::DefaultWin32WGLGraphicsOutputProperties &properties) | |
Constructor. | |
bool | destroyImage (void *image) noexcept override |
Not implemented on WGL. | |
void | displayWindow () noexcept |
Displays and activates the window. | |
KZ_NO_DISCARD unsigned int | findWindowZOrder () const noexcept |
Finds the z ordering for the active window related to all other windows currently visible. | |
void | gatherEvents (EventQueue &queue) override |
Amends the given event queue with events received so far. | |
virtual KZ_NO_DISCARD optional< SurfaceColorSpace > | getColorSpace () const noexcept override |
Gets the color space used by the associated graphics context. | |
virtual KZ_NO_DISCARD optional< GraphicsContextAPI > | getGraphicsContextAPI () const noexcept override |
Gets the API used by the associated graphics context. | |
KZ_NO_DISCARD optional< void * > | getNativeContextHandle () const noexcept override |
Gets the associated native GL context handle. | |
KZ_NO_DISCARD optional< void * > | getNativeDisplayHandle () const noexcept override |
Gets the associated native GL display handle. | |
KZ_NO_DISCARD optional< NativeEventHandle > | getNativeEventHandle () const noexcept override |
Returns a waitable event handle for this event source, if available. | |
KZ_NO_DISCARD optional< void * > | getNativeSurfaceHandle () const noexcept override |
Gets the associated native GL surface handle. | |
KZ_NO_DISCARD optional< NativeWindowHandle > | getNativeWindowHandle () const noexcept override |
Gets the associated window handle. | |
KZ_NO_DISCARD GLProcPointer | getProcAddress (string_view functionName) noexcept override |
Retrieves the pointer to a GL function. | |
virtual KZ_NO_DISCARD optional< SurfaceClientAPI > | getSurfaceClientAPI () const noexcept override |
Gets the type of the associated graphics surface. | |
KZ_NO_DISCARD Matrix4x4 | getTargetTransformation () const noexcept override |
Returns the target transformation. | |
KZ_NO_DISCARD optional< unsigned int > | getWindowHeight () const noexcept override |
Returns the height of the active window. | |
KZ_NO_DISCARD optional< int > | getWindowPositionX () const noexcept override |
Returns the x position of a window. | |
KZ_NO_DISCARD optional< int > | getWindowPositionY () const noexcept override |
Returns the y position of a window. | |
KZ_NO_DISCARD optional< string > | getWindowTitle () const noexcept override |
Gets the title of the window. | |
KZ_NO_DISCARD optional< unsigned int > | getWindowWidth () const noexcept override |
Returns the width of the active window. | |
bool | hideWindow () noexcept override |
Schedules to make a window invisible. | |
void | logClientWindowSize () const noexcept |
Prints the active client window size to log. | |
void | logDisplayCount () const noexcept |
Prints the number of active displays in the current session. | |
void | logMousePosition () const noexcept |
Prints the active mouse position to log. | |
void | logWindowPosition () const noexcept |
Prints the active window position to log. | |
void | logWindowSize () const noexcept |
Prints the active window size to log. | |
bool | makeCurrent () noexcept override |
Activates the WGL context for the current thread. | |
bool | makeFullscreen () noexcept override |
Schedules to make a window full-screen. | |
bool | makeMaximized () noexcept override |
Schedules to maximize a window. | |
bool | makeMinimized () noexcept override |
Schedules to minimize a window. | |
bool | makeRegular () noexcept override |
Schedules to make a window regular. | |
bool | moveWindow (int positionX, int positionY) noexcept override |
Schedules a window move. | |
bool | releaseCurrent () noexcept override |
Deactivates the WGL context for the current thread. | |
bool | resize (unsigned int width, unsigned int height) noexcept override |
Schedules a resize of the target layout area. | |
bool | resizeWindow (unsigned int width, unsigned int height) noexcept override |
Schedules the resizing of the active window. | |
bool | setWindowTitle (string_view title) noexcept override |
Sets the title of the window. | |
bool | showWindow () noexcept override |
Schedules to make a window visible. | |
bool | swapBuffers () noexcept override |
Posts rendering results. | |
bool | swapInterval (int interval) noexcept override |
Sets the minimum number of displayed video frames before a buffer swap. | |
void | updateWindow () noexcept |
Updates the client area of the window. | |
~DefaultWin32WGLGraphicsOutput () | |
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::GLGraphicsOutput | |
virtual | ~GLGraphicsOutput ()=default |
Destructor. | |
Public Member Functions inherited from kanzi::WindowedGraphicsOutput | |
virtual | ~WindowedGraphicsOutput ()=default |
Destructor. | |
Protected Member Functions | |
bool | recallWindowPlacement () noexcept |
Restores the position and size of the previously stored window. | |
void | setTargetTransformation (Matrix4x4 targetTransformation) noexcept |
Sets the target transformation. | |
bool | storeWindowPlacement () noexcept |
Stores the position and size of the current window. | |
void | updateTargetLayoutArea () noexcept |
Updates the render target size for the client window. | |
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. | |
Additional Inherited Members | |
Public Types inherited from kanzi::GLGraphicsOutput | |
using | GLProcPointer |
Pointer to GL function. | |
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 |
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. |