xbmc
Public Member Functions | List of all members
KODI::WINDOWING::WAYLAND::CSeat Class Reference

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

#include <Seat.h>

Public Member Functions

 CSeat (std::uint32_t globalName, wayland::seat_t const &seat, CConnection &connection)
 Construct seat handler. More...
 
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 ()
 Get the wl_seat underlying this seat. More...
 
void SetCursor (std::uint32_t serial, wayland::surface_t const &surface, std::int32_t hotspotX, std::int32_t hotspotY)
 Set the cursor of the pointer of this seat. More...
 

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

Member Function Documentation

◆ 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.

◆ SetCursor()

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

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.


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