You.i Engine
CYIAccessibilityEvent Class Reference

Detailed Description

Accessibility related events.

Accessibility events arise in circumstances where platform screen reading technologies are being used to interact with the application. The events can result in spoken announcements from the platform or changes to the accessibility focus context. As a result, some of these events resemble CYIFocusEvent in nature.

Accessibility events can spawn other accessibility events when not explicitly handled by a user-provided event handler. For example, an CYIEvent::Type::AccessibilityFocusNext event that is allowed to bubble up unhandled may result in an CYIEvent::Type::AccessibilityFocusIn and ultimately an CYIEvent::Type::AccessibilityAnnounce.

#include <accessibility/YiAccessibilityEvent.h>

Inheritance diagram for CYIAccessibilityEvent:

Public Types

enum  InteractionContext {
  InteractionContext::Touch,
  InteractionContext::DirectEvent,
  InteractionContext::FocusNavigation,
  InteractionContext::ScreenReading,
  InteractionContext::Silent
}
 The type of interaction which triggered the accessibiltiy event. More...
 
- Public Types inherited from CYIEvent
enum  Type : uint8_t {
  Type::None = 0,
  Type::ActionMove,
  Type::ActionDown,
  Type::ActionDelayedDown,
  Type::ActionUp,
  Type::ActionWheel,
  Type::ActionWheelHorizontal,
  Type::ActionWheelVertical,
  Type::ActionClick,
  Type::ActionOut,
  Type::ActionIn,
  Type::ActionEnter,
  Type::ActionLeave,
  Type::ActionPick,
  Type::ActionLongPress,
  Type::ActionSuppressedMove,
  Type::KeyDown,
  Type::KeyUp,
  Type::KeyInput,
  Type::SignalEmit,
  Type::StateMachineWrapped,
  Type::StateMachineSignal,
  Type::GPUGenerateHandle,
  Type::GPULoadBuffer,
  Type::GPUUnloadBuffer,
  Type::GPUFreeHandle,
  Type::GPUInvalidateHandle,
  Type::FocusIn,
  Type::FocusOut,
  Type::TrackpadDown,
  Type::TrackpadMove,
  Type::TrackpadUp,
  Type::DeferredDeletion,
  Type::Task,
  Type::AccessibilityAnnounce,
  Type::AccessibilityFocusIn,
  Type::AccessibilityFocusOut,
  Type::AccessibilityFocusNext,
  Type::AccessibilityFocusPrevious,
  Type::GestureTap,
  Type::GestureDoubleTap,
  Type::GestureSwipe,
  Type::GestureDrag,
  Type::GestureScrub,
  Type::TypesCount
}
 The event type of the CYIEvent class instance. More...
 
enum  Phase : uint8_t {
  Phase::None = 0,
  Phase::Capture,
  Phase::AtTarget,
  Phase::Bubble,
  Phase::Broadcast
}
 The current processing phase of the event. More...
 
enum  Priority {
  Priority::Highest = 2,
  Priority::High = 1,
  Priority::Normal = 0,
  Priority::Low = -1,
  Priority::Lowest = -2,
  Priority::Default = Normal
}
 Priority of the event in the event queue. More...
 

Public Member Functions

 CYIAccessibilityEvent (CYIEvent::Type eventType)
 
 CYIAccessibilityEvent (const CYIAccessibilityEvent &other)=default
 
virtual std::unique_ptr< CYIEventClone () const
 
- Public Member Functions inherited from CYIEvent
 CYIEvent (CYIEvent::Type eventType)
 
 CYIEvent (const CYIEvent &rOther)
 
virtual ~CYIEvent ()
 
const CYIStringGetName () const
 
CYIEvent::Type GetType () const
 
void SetType (CYIEvent::Type eventType)
 
bool IsActionEvent () const
 
std::unique_ptr< CYIActionEventCloneAsActionEvent () const
 
bool IsKeyEvent () const
 
std::unique_ptr< CYIKeyEventCloneAsKeyEvent () const
 
bool IsFocusEvent () const
 
std::unique_ptr< CYIFocusEventCloneAsFocusEvent () const
 
bool IsTrackpadEvent () const
 
std::unique_ptr< CYITrackpadEventCloneAsTrackpadEvent () const
 
bool IsAccessibilityEvent () const
 
std::unique_ptr< CYIAccessibilityEventCloneAsAccessibilityEvent () const
 
bool IsGestureEvent () const
 
std::unique_ptr< CYIGestureEventCloneAsGestureEvent () const
 
bool IsSwipeGestureEvent () const
 
bool IsScrubGestureEvent () const
 
std::unique_ptr< CYISwipeGestureEventCloneAsSwipeGestureEvent () const
 
void SetTarget (CYIEventTarget *pTarget)
 
CYIEventTargetGetTarget () const
 
const std::shared_ptr< CYIEventTargetProxy > & GetTargetProxy () const
 
void SetCurrentTarget (CYIEventTarget *pTarget)
 
const CYIEventTargetGetCurrentTarget () const
 
CYIEventTargetGetCurrentTarget ()
 
const std::shared_ptr< CYIEventTargetProxy > & GetCurrentTargetProxy () const
 

Public Attributes

InteractionContext m_interactionContext
 
CYIString m_text
 
std::shared_ptr< CYISceneNodeProxym_pAccessibilityTarget
 
std::shared_ptr< CYISceneNodeProxym_pRelatedAccessibilityTarget
 
- Public Attributes inherited from CYIEvent
uint64_t m_eventTimeMs
 
Phase m_phase
 
bool m_canCancel
 
bool m_canBubble
 
bool m_canCapture
 
bool m_stopPropagation
 
bool m_handled
 

Member Enumeration Documentation

◆ InteractionContext

The type of interaction which triggered the accessibiltiy event.

Enumerator
Touch 

Triggered by touch event

DirectEvent 

Triggered by application directly

FocusNavigation 

Triggered by focus navigation events

ScreenReading 

Triggered by screen reading

Silent 

Used to perform the accessibility event silently. Silent CYIEvent::Type::AccessibilityAnnounce will trigger an assertion in debug builds.

Constructor & Destructor Documentation

◆ CYIAccessibilityEvent() [1/2]

CYIAccessibilityEvent::CYIAccessibilityEvent ( CYIEvent::Type  eventType)

◆ CYIAccessibilityEvent() [2/2]

CYIAccessibilityEvent::CYIAccessibilityEvent ( const CYIAccessibilityEvent other)
default

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<CYIEvent> CYIAccessibilityEvent::Clone ( ) const
virtual

Reimplemented from CYIEvent.

Member Data Documentation

◆ m_interactionContext

InteractionContext CYIAccessibilityEvent::m_interactionContext

The interaction context that describes how the event occurred.

◆ m_pAccessibilityTarget

std::shared_ptr<CYISceneNodeProxy> CYIAccessibilityEvent::m_pAccessibilityTarget

Represents the main target of the accessibility event. For AccessibilityFocusIn this is the newly focused element, for AccessibilityFocusOut it is the element losing focus, for AccessibilityFocusNext and AccessibilityFocusPrevious it is the element from which the search will be performed.

◆ m_pRelatedAccessibilityTarget

std::shared_ptr<CYISceneNodeProxy> CYIAccessibilityEvent::m_pRelatedAccessibilityTarget

Represents the secondary target of the accessibility event. For AccessibilityFocusIn this is the previously focused element, for AccessibilityFocusOut it is the element which is gaining focus, for AccessibilityFocusNext and AccessibilityFocusPrevious it is unused.

◆ m_text

CYIString CYIAccessibilityEvent::m_text

The text to be spoken if this is an CYIEvent::Type::AccessibilityAnnounce. Otherwise unused. >


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