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

Inherits AzFramework::InputDeviceMouse::Implementation, and XcbEventHandlerBus::Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (XcbInputDeviceMouse, AZ::SystemAllocator)
 
 XcbInputDeviceMouse (InputDeviceMouse &inputDevice)
 
virtual ~XcbInputDeviceMouse ()
 Destructor.
 
- Public Member Functions inherited from AzFramework::InputDeviceMouse::Implementation
 AZ_CLASS_ALLOCATOR (Implementation, AZ::SystemAllocator)
 
 Implementation (InputDeviceMouse &inputDevice)
 
 AZ_DISABLE_COPY_MOVE (Implementation)
 
virtual ~Implementation ()
 Destructor.
 
virtual bool IsConnected () const =0
 
virtual void SetSystemCursorState (SystemCursorState systemCursorState)=0
 
virtual SystemCursorState GetSystemCursorState () const =0
 
virtual void SetSystemCursorPositionNormalized (AZ::Vector2 positionNormalized)=0
 
virtual AZ::Vector2 GetSystemCursorPositionNormalized () const =0
 
virtual void TickInputDevice ()=0
 Tick/update the input device to broadcast all input events since the last frame.
 
void SetRawMovementSampleRate (AZ::u32 sampleRateHertz)
 

Static Public Member Functions

static XcbInputDeviceMouse::ImplementationCreate (InputDeviceMouse &inputDevice)
 
- Static Public Member Functions inherited from AzFramework::InputDeviceMouse::Implementation
static ImplementationCreate (InputDeviceMouse &inputDevice)
 

Protected Member Functions

bool IsConnected () const override
 AzFramework::InputDeviceMouse::Implementation::IsConnected
 
void SetSystemCursorState (SystemCursorState systemCursorState) override
 AzFramework::InputDeviceMouse::Implementation::SetSystemCursorState
 
SystemCursorState GetSystemCursorState () const override
 AzFramework::InputDeviceMouse::Implementation::GetSystemCursorState
 
void SetSystemCursorPositionNormalized (AZ::Vector2 positionNormalized) override
 AzFramework::InputDeviceMouse::Implementation::SetSystemCursorPositionNormalized
 
AZ::Vector2 GetSystemCursorPositionNormalized () const override
 AzFramework::InputDeviceMouse::Implementation::GetSystemCursorPositionNormalized
 
void TickInputDevice () override
 AzFramework::InputDeviceMouse::Implementation::TickInputDevice
 
void HandleXcbEvent (xcb_generic_event_t *event) override
 Handle X11 events.
 
void CreateBarriers (xcb_window_t window, bool create)
 Create barriers.
 
void SystemCursorStateToLogic (SystemCursorState systemCursorState, bool &confined, bool &cursorShown)
 Helper function.
 
void ShowCursor (xcb_window_t window, bool show)
 Shows/Hides the cursor.
 
void HandleButtonPressEvents (uint32_t detail, bool pressed)
 Handle button press/release events.
 
void HandleCursorState (xcb_window_t window, SystemCursorState systemCursorState)
 Will set cursor states and confinement modes.
 
void HandleRawInputEvents (const xcb_ge_generic_event_t *event)
 Will handle all raw input events.
 
float fp1616ToFloat (xcb_input_fp1616_t value) const
 Convert XInput fp1616 to float.
 
float fp3232ToFloat (xcb_input_fp3232_t value) const
 Convert XInput fp3232 to float.
 
const InputChannelIdInputChannelFromMouseEvent (xcb_button_t button, bool &isWheel, float &direction) const
 
int16_t Clamp (int16_t value) const
 
- Protected Member Functions inherited from AzFramework::InputDeviceMouse::Implementation
void QueueRawButtonEvent (const InputChannelId &inputChannelId, bool rawButtonState)
 
void QueueRawMovementEvent (const InputChannelId &inputChannelId, float rawMovementDelta)
 
void ProcessRawEventQueues ()
 
void ResetInputChannelStates ()
 Reset the state of all this input device's associated input channels.
 

Static Protected Member Functions

static bool InitializeXFixes ()
 Initialize XFixes extension. Used for barriers.
 
static bool InitializeXInput ()
 Initialize XInput extension. Used for raw input during confinement and showing/hiding the cursor.
 

Additional Inherited Members

- Protected Types inherited from AzFramework::InputDeviceMouse::Implementation
using RawButtonEventQueueByIdMap = AZStd::unordered_map< InputChannelId, AZStd::vector< bool > >
 
using RawMovementEventQueueByIdMap = AZStd::unordered_map< InputChannelId, AZStd::vector< float > >
 

Constructor & Destructor Documentation

◆ XcbInputDeviceMouse()

AzFramework::XcbInputDeviceMouse::XcbInputDeviceMouse ( InputDeviceMouse inputDevice)

Constructor

Parameters
[in]inputDeviceReference to the input device being implemented

Member Function Documentation

◆ GetSystemCursorPositionNormalized()

AZ::Vector2 AzFramework::XcbInputDeviceMouse::GetSystemCursorPositionNormalized ( ) const
overrideprotectedvirtual

◆ GetSystemCursorState()

SystemCursorState AzFramework::XcbInputDeviceMouse::GetSystemCursorState ( ) const
overrideprotectedvirtual

◆ IsConnected()

bool AzFramework::XcbInputDeviceMouse::IsConnected ( ) const
overrideprotectedvirtual

◆ SetSystemCursorPositionNormalized()

void AzFramework::XcbInputDeviceMouse::SetSystemCursorPositionNormalized ( AZ::Vector2  positionNormalized)
overrideprotectedvirtual

◆ SetSystemCursorState()

void AzFramework::XcbInputDeviceMouse::SetSystemCursorState ( SystemCursorState  systemCursorState)
overrideprotectedvirtual

◆ TickInputDevice()

void AzFramework::XcbInputDeviceMouse::TickInputDevice ( )
overrideprotectedvirtual

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