Inherits WindowRequestBus::Handler.
|
| AZ_CLASS_ALLOCATOR (NativeWindow, AZ::SystemAllocator) |
|
| NativeWindow (const AZStd::string &title, const WindowGeometry &geometry, const WindowStyleMasks styleMasks={}) |
|
void | Activate () |
|
void | Deactivate () |
|
bool | IsActive () const |
|
NativeWindowHandle | GetWindowHandle () const |
| Get the native window handle. This is used as the bus id for the WindowRequestBus and WindowNotificationBus.
|
|
void | SetWindowTitle (const AZStd::string &title) override |
|
WindowSize | GetClientAreaSize () const override |
|
WindowSize | GetMaximumClientAreaSize () const override |
|
void | ResizeClientArea (WindowSize clientAreaSize, const WindowPosOptions &options) override |
|
bool | SupportsClientAreaResize () const override |
|
void | SetEnableCustomizedResolution (bool enable) override |
|
bool | IsCustomizedResolutionEnabled () const override |
|
WindowSize | GetRenderResolution () const override |
|
void | SetRenderResolution (WindowSize resolution) override |
|
bool | GetFullScreenState () const override |
|
void | SetFullScreenState (bool fullScreenState) override |
|
bool | CanToggleFullScreenState () const override |
|
void | ToggleFullScreenState () override |
|
float | GetDpiScaleFactor () const override |
|
uint32_t | GetSyncInterval () const override |
|
bool | SetSyncInterval (uint32_t newSyncInterval) override |
|
uint32_t | GetDisplayRefreshRate () const override |
|
Provides a basic window.
This is mainly designed to be used as a base window for rendering. The window provides just a simple surface and handles implementation details for each platform.
Window events are pumped via the AzFramework's application. No event messaging or message translation/dispatch needs to be handled by the underlying implementation.
Multiple NativeWindows are supported by this system. This is impractical for most standalone game applications, and unnecessary for some platforms, but still possible.
The Window implementation will be created when the NativeWindow is constructed and the platform specific native window will be created (if it doesn't already exist). On platforms that support it, the window will become visible when Activate is called and hidden when Deactivate is called. On other platforms the window becomes visible on construction and hidden on destruction. To provide a consistent API to the client across platforms:
- Calling Activate (when not active) will result in the OnWindowResized notification
- Calling Deactivate (when active) will result in the OnWindowClosed notification
- destroying the NativeWindow when active will result in Deactivate being called