NcEngine
Window.h File Reference
#include "ncengine/module/Module.h"
#include "ncengine/type/EngineId.h"
#include "ncengine/utility/Signal.h"
#include "ncengine/window/IOnResizeReceiver.h"
#include "ncmath/Vector.h"

Go to the source code of this file.

Classes

struct  nc::window::WindowInfo
 The window's create info. More...
 
class  nc::window::NcWindow
 Window module interface. More...
 

Functions

auto nc::window::GetDimensions () -> Vector2
 Get the window dimensions.
 
auto nc::window::GetScreenExtent () -> Vector2
 Get the dimensions of the screen after aspect ratio transformations.
 
auto nc::window::GetContentScale () -> Vector2
 Get the current DPI.
 
auto nc::window::ToNormalizedDeviceCoordinates (const Vector2 &screenCoordinates) -> Vector2
 Convert screen space coordinates to normalized device coordinates (in the range [-1, 1]).
 
void nc::window::RegisterOnResizeReceiver (IOnResizeReceiver *receiver)
 Allow an object to receive window resize events. Receivers must be unregistered before they are destroyed. More...
 
void nc::window::UnregisterOnResizeReceiver (IOnResizeReceiver *receiver) noexcept
 Unregister an object from receiving window resize events. More...
 
auto nc::window::BuildWindowModule (const config::ProjectSettings &projectSettings, bool isGraphicsEnabled, Signal<> &quit) -> std::unique_ptr< NcWindow >
 Build an NcWindow module instance.
 

Detailed Description

Function Documentation

◆ RegisterOnResizeReceiver()

void nc::window::RegisterOnResizeReceiver ( IOnResizeReceiver receiver)

Allow an object to receive window resize events. Receivers must be unregistered before they are destroyed.

Deprecated:
Prefer using NcWindow::OnResize().

◆ UnregisterOnResizeReceiver()

void nc::window::UnregisterOnResizeReceiver ( IOnResizeReceiver receiver)
noexcept

Unregister an object from receiving window resize events.

Deprecated:
Prefer using NcWindow::OnResize().