Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
platf::virtualhid::input_context_t Struct Reference

Runtime and virtual devices owned by one platform input context. More...

#include <src/platform/virtualhid_input.h>

Public Member Functions

 input_context_t ()
 Construct the libvirtualhid input context using the platform-default backend.
 input_context_t (lvh::BackendKind backend)
 Construct the libvirtualhid input context using a selected backend.
void refresh_keyboard ()
 Recreate the shared keyboard using the runtime's current driver and license state.
void refresh_mouse ()
 Recreate the shared mouse using the runtime's current driver and license state.
void refresh_mouse (const lvh::PointerViewport &desktop, const lvh::PointerViewport &viewport)
 Recreate the shared mouse for a virtual desktop and target viewport.
void update_mouse_viewport (const touch_port_t &touch_port)
 Retarget the shared mouse when streamed display geometry changes.

Public Attributes

std::vector< std::shared_ptr< struct gamepad_context_t > > gamepads {static_cast<std::size_t>(MAX_GAMEPADS)}
 Virtual gamepad slots.
std::unique_ptr< lvh::Keyboard > keyboard
 Shared virtual keyboard.
std::unique_ptr< lvh::Mouse > mouse
 Shared virtual mouse.
lvh::PointerViewport mouse_desktop
 Virtual-desktop bounds used to create the shared mouse.
lvh::PointerViewport mouse_viewport
 Streamed display bounds used to create the shared mouse.
std::unique_ptr< lvh::Runtime > runtime
 libvirtualhid runtime.

Detailed Description

Runtime and virtual devices owned by one platform input context.

Constructor & Destructor Documentation

◆ input_context_t()

platf::virtualhid::input_context_t::input_context_t ( lvh::BackendKind backend)
explicit

Construct the libvirtualhid input context using a selected backend.

Parameters
backendBackend used to create the libvirtualhid runtime.

Member Function Documentation

◆ refresh_mouse()

void platf::virtualhid::input_context_t::refresh_mouse ( const lvh::PointerViewport & desktop,
const lvh::PointerViewport & viewport )

Recreate the shared mouse for a virtual desktop and target viewport.

Parameters
desktopFull native virtual-desktop bounds.
viewportNative bounds of the streamed display.

◆ update_mouse_viewport()

void platf::virtualhid::input_context_t::update_mouse_viewport ( const touch_port_t & touch_port)

Retarget the shared mouse when streamed display geometry changes.

Parameters
touch_portDesktop and viewport geometry for pointer input.

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