Implement pen and touch support for Windows

This commit is contained in:
Cameron Gutman 2023-06-25 20:47:30 -05:00
commit bd68aebe4c
6 changed files with 914 additions and 34 deletions

View file

@ -1489,7 +1489,7 @@ namespace platf {
/**
* @brief Creates a new virtual gamepad.
* @param input The input context.
* @param input The global input context.
* @param id The gamepad ID.
* @param metadata Controller metadata from client (empty if none provided).
* @param feedback_queue The queue for posting messages back to the client.
@ -1567,9 +1567,42 @@ namespace platf {
libevdev_uinput_write_event(uinput.get(), EV_SYN, SYN_REPORT, 0);
}
/**
* @brief Allocates a context to store per-client input data.
* @param input The global input context.
* @return A unique pointer to a per-client input data context.
*/
std::unique_ptr<client_input_t>
allocate_client_input_context(input_t &input) {
// Unused
return nullptr;
}
/**
* @brief Sends a touch event to the OS.
* @param input The client-specific input context.
* @param touch_port The current viewport for translating to screen coordinates.
* @param touch The touch event.
*/
void
touch(client_input_t *input, const touch_port_t &touch_port, const touch_input_t &touch) {
// Unimplemented feature - platform_caps::pen_touch
}
/**
* @brief Sends a pen event to the OS.
* @param input The client-specific input context.
* @param touch_port The current viewport for translating to screen coordinates.
* @param pen The pen event.
*/
void
pen(client_input_t *input, const touch_port_t &touch_port, const pen_input_t &pen) {
// Unimplemented feature - platform_caps::pen_touch
}
/**
* @brief Sends a gamepad touch event to the OS.
* @param input The input context.
* @param input The global input context.
* @param touch The touch event.
*/
void
@ -1579,7 +1612,7 @@ namespace platf {
/**
* @brief Sends a gamepad motion event to the OS.
* @param input The input context.
* @param input The global input context.
* @param motion The motion event.
*/
void
@ -1589,7 +1622,7 @@ namespace platf {
/**
* @brief Sends a gamepad battery event to the OS.
* @param input The input context.
* @param input The global input context.
* @param battery The battery event.
*/
void