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
parent bcf5a9750f
commit f7d1efdf1d
9 changed files with 298 additions and 184 deletions

24
app/src/mouse_inject.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef SC_MOUSE_INJECT_H
#define SC_MOUSE_INJECT_H
#include "common.h"
#include <stdbool.h>
#include "controller.h"
#include "scrcpy.h"
#include "screen.h"
#include "trait/mouse_processor.h"
struct sc_mouse_inject {
struct sc_mouse_processor mouse_processor; // mouse processor trait
struct controller *controller;
struct screen *screen;
};
void
sc_mouse_inject_init(struct sc_mouse_inject *mi, struct controller *controller,
struct screen *screen);
#endif