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::InputSystemCursorConstraintRequests Class Referenceabstract

EBus interface to request the window or view used to clip and/or normalize the system cursor. More...

#include <InputSystemCursorRequestBus.h>

Inherits AZ::EBusTraits.

Public Member Functions

virtual ~InputSystemCursorConstraintRequests ()=default
 Default destructor.
 
virtual void * GetSystemCursorConstraintWindow () const =0
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 EBus Trait: requests are addressed to a single address.
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 EBus Trait: requests are handled by a single listener.
 

Detailed Description

EBus interface to request the window or view used to clip and/or normalize the system cursor.

Member Function Documentation

◆ GetSystemCursorConstraintWindow()

virtual void * AzFramework::InputSystemCursorConstraintRequests::GetSystemCursorConstraintWindow ( ) const
pure virtual

Get the application window/view that should be used to clip and/or normalize the cursor.

Ideally there should be an abstract cross-platform 'AzFramework::ApplicationWindow/View' class/interface that systems like input and rendering use to interact with the windowing system in a platform agnostic manner, but for now we will make do with returning a void* and depend on the caller to cast it to the appropriate platform specific representation.

Returns
Pointer to a platform specific representation of the application window or view that should be used to clip and/or normalize the system cursor. If nullptr is returned, the default main window/view will be used instead. Return type depends on the platform, as does the fallback main window/view that will be used instead if nullptr is returned:
  • Windows: HWND (fallback ::GetFocus())
  • macOS: NSView (fallback NSApplication.sharedApplication.mainWindow.contentView)

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