Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::WindowRequests Class Referenceabstract

#include <WindowBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = NativeWindowHandle
 

Public Member Functions

virtual void SetWindowTitle (const AZStd::string &title)=0
 For platforms that support it, set the title of the window.
 
virtual WindowSize GetClientAreaSize () const =0
 
virtual WindowSize GetMaximumClientAreaSize () const
 
virtual void ResizeClientArea (WindowSize clientAreaSize, const WindowPosOptions &options)=0
 
virtual bool SupportsClientAreaResize () const =0
 
virtual void SetEnableCustomizedResolution (bool enable)=0
 
virtual bool IsCustomizedResolutionEnabled () const =0
 If the custom render resolution is enabled.
 
virtual WindowSize GetRenderResolution () const =0
 
virtual void SetRenderResolution (WindowSize resolution)=0
 
virtual bool GetFullScreenState () const =0
 
virtual void SetFullScreenState (bool fullScreenState)=0
 
virtual bool CanToggleFullScreenState () const =0
 
virtual void ToggleFullScreenState ()=0
 Toggle the full screen state of the window.
 
virtual float GetDpiScaleFactor () const =0
 
virtual uint32_t GetSyncInterval () const =0
 Returns the sync interval which tells the drivers the number of v-blanks to synchronize with.
 
virtual bool SetSyncInterval (uint32_t newSyncInterval)=0
 
virtual uint32_t GetDisplayRefreshRate () const =0
 Returns the refresh rate of the main display.
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 

Detailed Description

Bus for sending requests to any kind of window. It could be a NativeWindow or an Editor window.

Member Function Documentation

◆ CanToggleFullScreenState()

virtual bool AzFramework::WindowRequests::CanToggleFullScreenState ( ) const
pure virtual

Can the full screen state of the window be changed/toggled?

Returns
True if the window can enter/exit full screen, false otherwise.

◆ GetClientAreaSize()

virtual WindowSize AzFramework::WindowRequests::GetClientAreaSize ( ) const
pure virtual

Get the client area size. This is the size that can be rendered to. On some platforms this may not be the correct size until Activate is called.

◆ GetDpiScaleFactor()

virtual float AzFramework::WindowRequests::GetDpiScaleFactor ( ) const
pure virtual

Returns a scalar multiplier representing how many dots-per-inch this window has, compared to a "standard" value of 96, the default for Windows in a DPI unaware setting. This can be used to scale user interface elements to ensure legibility on high density displays.

◆ GetFullScreenState()

virtual bool AzFramework::WindowRequests::GetFullScreenState ( ) const
pure virtual

Get the full screen state of the window.

Returns
True if the window is currently in full screen, false otherwise.

◆ GetMaximumClientAreaSize()

virtual WindowSize AzFramework::WindowRequests::GetMaximumClientAreaSize ( ) const
inlinevirtual

Get the maximum supported client area size for this window. This can return different sizes depending on which monitor the window is on. On some platforms this may not be the correct size until Activate is called.

◆ GetRenderResolution()

virtual WindowSize AzFramework::WindowRequests::GetRenderResolution ( ) const
pure virtual

Get the render resolution. If customized resolution is not enabled, it would return client area size

◆ ResizeClientArea()

virtual void AzFramework::WindowRequests::ResizeClientArea ( WindowSize  clientAreaSize,
const WindowPosOptions options 
)
pure virtual

Set the client area size. This is the size that can be rendered to.

Parameters
[in]clientAreaSizeSize of the client area in pixels
[in]optionsOptions for resizing and moving the window.

◆ SetEnableCustomizedResolution()

virtual void AzFramework::WindowRequests::SetEnableCustomizedResolution ( bool  enable)
pure virtual

Enable custom render resolution which is different than client area size. If custom render resolution is disabled, the render resolution is same as client area size

◆ SetFullScreenState()

virtual void AzFramework::WindowRequests::SetFullScreenState ( bool  fullScreenState)
pure virtual

Set the full screen state of the window.

Parameters
[in]fullScreenStateThe full screen state to set.

◆ SetRenderResolution()

virtual void AzFramework::WindowRequests::SetRenderResolution ( WindowSize  resolution)
pure virtual

Set render resolution for the window. It should only be called when customized resolution is enabled.

◆ SetSyncInterval()

virtual bool AzFramework::WindowRequests::SetSyncInterval ( uint32_t  newSyncInterval)
pure virtual

Sets the sync interval which tells the drivers the number of v-blanks to synchronize with Returns if the sync interval was successfully set

◆ SupportsClientAreaResize()

virtual bool AzFramework::WindowRequests::SupportsClientAreaResize ( ) const
pure virtual

Does this platform support window resizing. Generally desktop platforms support resizing, mobile platforms don't.


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