Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <Seat.h>
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 () |
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.
CSeat::CSeat | ( | std::uint32_t | globalName, |
wayland::seat_t const & | seat, | ||
CConnection & | connection ) |
Construct seat handler
globalName | Wayland numeric global name of the seat |
seat | bound seat_t instance |
connection | connection for retrieving additional globals |
|
virtualdefaultnoexcept |
void CSeat::AddRawInputHandlerKeyboard | ( | IRawInputHandlerKeyboard * | rawKeyboardHandler | ) |
void CSeat::AddRawInputHandlerPointer | ( | IRawInputHandlerPointer * | rawPointerHandler | ) |
void CSeat::AddRawInputHandlerTouch | ( | IRawInputHandlerTouch * | rawTouchHandler | ) |
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
Reimplemented in KODI::WINDOWING::WAYLAND::CSeatWebOS.
void CSeat::RemoveRawInputHandlerKeyboard | ( | IRawInputHandlerKeyboard * | rawKeyboardHandler | ) |
void CSeat::RemoveRawInputHandlerPointer | ( | IRawInputHandlerPointer * | rawPointerHandler | ) |
void CSeat::RemoveRawInputHandlerTouch | ( | IRawInputHandlerTouch * | rawTouchHandler | ) |
|
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.