Extract mouse processor trait

Mainly for consistency with the keyboard processor trait.

This could allow to provide alternative mouse processors.
This commit is contained in:
Romain Vimont 2021-10-03 17:44:14 +02:00
commit f7d1efdf1d
9 changed files with 298 additions and 184 deletions

View file

@ -12,12 +12,14 @@
#include "scrcpy.h"
#include "screen.h"
#include "trait/key_processor.h"
#include "trait/mouse_processor.h"
struct input_manager {
struct controller *controller;
struct screen *screen;
struct sc_key_processor *kp;
struct sc_mouse_processor *mp;
bool control;
bool forward_all_clicks;
@ -41,6 +43,7 @@ struct input_manager {
void
input_manager_init(struct input_manager *im, struct controller *controller,
struct screen *screen, struct sc_key_processor *kp,
struct sc_mouse_processor *mp,
const struct scrcpy_options *options);
bool