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::RawInputNotificationsIos Class Reference

#include <RawInputNotificationBus_iOS.h>

Inherits AZ::EBusTraits.

Public Member Functions

virtual ~RawInputNotificationsIos ()=default
 Default destructor.
 
virtual void OnRawTouchEventBegan (const UITouch *)
 
virtual void OnRawTouchEventMoved (const UITouch *)
 
virtual void OnRawTouchEventEnded (const UITouch *)
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 EBus Trait: raw input notifications are addressed to a single address.
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple
 EBus Trait: raw input notifications can be handled by multiple listeners.
 

Detailed Description

EBus interface used to listen for raw ios input events broadcast by the system. Applications that want raw ios events to be processed by the AzFramework input system must broadcast all input events received by a UIResponder instance, which is the lowest level we can get input.

Input events should only be broadcast by a single UIResponder object, ideally from a custom UIApplication object (which is guaranteed to be the last object in the ios responder chain). This ensures that any Cocoa/UIKit controls that might be active are allowed the opportunity to process input events before the engine (even though this scenario is unlikely for a game).

It's possible to receive multiple touch events per index (finger) per frame, and while it is possible to pump the ios event loop from any thread it is only possible to process raw touch events received by a UIResponder instance, which is guaranteed to happen on the main thread.

This EBus is intended primarily for the AzFramework input system to process ios input events. Most systems that need to process input should use the generic AzFramework input interfaces, but if necessary it is perfectly valid to connect directly to this EBus for raw ios events.

Member Function Documentation

◆ OnRawTouchEventBegan()

virtual void AzFramework::RawInputNotificationsIos::OnRawTouchEventBegan ( const UITouch *  )
inlinevirtual

Process raw touch events (that will always be dispatched on the main thread)

Parameters
[in]uiTouchThe raw touch data

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