Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::WINDOWING::WAYLAND::CSeat Class Reference

#include <Seat.h>

Inheritance diagram for KODI::WINDOWING::WAYLAND::CSeat:
KODI::WINDOWING::WAYLAND::CSeatWebOS

Public Member Functions

 CSeat (std::uint32_t globalName, wayland::seat_t const &seat, CConnection &connection)
 
virtual ~CSeat () noexcept
 
void AddRawInputHandlerKeyboard (IRawInputHandlerKeyboard *rawKeyboardHandler)
 
void RemoveRawInputHandlerKeyboard (IRawInputHandlerKeyboard *rawKeyboardHandler)
 
void AddRawInputHandlerPointer (IRawInputHandlerPointer *rawPointerHandler)
 
void RemoveRawInputHandlerPointer (IRawInputHandlerPointer *rawPointerHandler)
 
void AddRawInputHandlerTouch (IRawInputHandlerTouch *rawTouchHandler)
 
void RemoveRawInputHandlerTouch (IRawInputHandlerTouch *rawTouchHandler)
 
std::uint32_t GetGlobalName () const
 
std::string const & GetName () const
 
bool HasPointerCapability () const
 
bool HasKeyboardCapability () const
 
bool HasTouchCapability () const
 
std::string GetSelectionText () const
 
wayland::seat_t const & GetWlSeat ()
 
virtual void SetCursor (std::uint32_t serial, wayland::surface_t const &surface, std::int32_t hotspotX, std::int32_t hotspotY)
 

Protected Member Functions

virtual void InstallKeyboardRepeatInfo ()
 

Detailed Description

Handle all events and requests related to one seat (including input and selection)

The primary purpose of this class is to act as entry point of Wayland events into the Kodi world and distribute them further as necessary. Input events are forwarded to (potentially multiple) handlers. As the Wayland protocol is not very specific on having multiple wl_seat/wl_pointer instances and how they interact, having one central instance and then handling everything in Kodi with multiple handlers is better than each handler having its own protocol object instance.

Constructor & Destructor Documentation

◆ CSeat()

CSeat::CSeat ( std::uint32_t globalName,
wayland::seat_t const & seat,
CConnection & connection )

Construct seat handler

Parameters
globalNameWayland numeric global name of the seat
seatbound seat_t instance
connectionconnection for retrieving additional globals

◆ ~CSeat()

CSeat::~CSeat ( )
virtualdefaultnoexcept

Member Function Documentation

◆ AddRawInputHandlerKeyboard()

void CSeat::AddRawInputHandlerKeyboard ( IRawInputHandlerKeyboard * rawKeyboardHandler)

◆ AddRawInputHandlerPointer()

void CSeat::AddRawInputHandlerPointer ( IRawInputHandlerPointer * rawPointerHandler)

◆ AddRawInputHandlerTouch()

void CSeat::AddRawInputHandlerTouch ( IRawInputHandlerTouch * rawTouchHandler)

◆ GetGlobalName()

std::uint32_t KODI::WINDOWING::WAYLAND::CSeat::GetGlobalName ( ) const
inline

◆ GetName()

std::string const & KODI::WINDOWING::WAYLAND::CSeat::GetName ( ) const
inline

◆ GetSelectionText()

std::string KODI::WINDOWING::WAYLAND::CSeat::GetSelectionText ( ) const
inline

◆ GetWlSeat()

wayland::seat_t const & KODI::WINDOWING::WAYLAND::CSeat::GetWlSeat ( )
inline

Get the wl_seat underlying this seat

The wl_seat should only be used when strictly necessary, e.g. when starting a move operation with shell interfaces. It may not be used to derive further wl_pointer etc. instances.

◆ HasKeyboardCapability()

bool KODI::WINDOWING::WAYLAND::CSeat::HasKeyboardCapability ( ) const
inline

◆ HasPointerCapability()

bool KODI::WINDOWING::WAYLAND::CSeat::HasPointerCapability ( ) const
inline

◆ HasTouchCapability()

bool KODI::WINDOWING::WAYLAND::CSeat::HasTouchCapability ( ) const
inline

◆ InstallKeyboardRepeatInfo()

void CSeat::InstallKeyboardRepeatInfo ( )
protectedvirtual

◆ RemoveRawInputHandlerKeyboard()

void CSeat::RemoveRawInputHandlerKeyboard ( IRawInputHandlerKeyboard * rawKeyboardHandler)

◆ RemoveRawInputHandlerPointer()

void CSeat::RemoveRawInputHandlerPointer ( IRawInputHandlerPointer * rawPointerHandler)

◆ RemoveRawInputHandlerTouch()

void CSeat::RemoveRawInputHandlerTouch ( IRawInputHandlerTouch * rawTouchHandler)

◆ SetCursor()

void CSeat::SetCursor ( std::uint32_t serial,
wayland::surface_t const & surface,
std::int32_t hotspotX,
std::int32_t hotspotY )
virtual

Set the cursor of the pointer of this seat

Parameters are identical wo wl_pointer.set_cursor(). If the seat does not currently have the pointer capability, this is a no-op.

Reimplemented in KODI::WINDOWING::WAYLAND::CSeatWebOS.


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