Rename {keyboard,mouse}_inject to {keyboard,mouse}_sdk. All implementations "inject" key events and mouse events, what differs is the mechanism. For these implementations, the Android SDK API is used to inject events. Note that the input mode enum variants were already renamed (SC_KEYBOARD_INPUT_MODE_SDK and SC_MOUSE_INPUT_MODE_SDK). PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473>
32 lines
782 B
C
32 lines
782 B
C
#ifndef SC_KEYBOARD_SDK_H
|
|
#define SC_KEYBOARD_SDK_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "controller.h"
|
|
#include "options.h"
|
|
#include "trait/key_processor.h"
|
|
|
|
struct sc_keyboard_sdk {
|
|
struct sc_key_processor key_processor; // key processor trait
|
|
|
|
struct sc_controller *controller;
|
|
|
|
// SDL reports repeated events as a boolean, but Android expects the actual
|
|
// number of repetitions. This variable keeps track of the count.
|
|
unsigned repeat;
|
|
|
|
enum sc_key_inject_mode key_inject_mode;
|
|
bool forward_key_repeat;
|
|
};
|
|
|
|
void
|
|
sc_keyboard_sdk_init(struct sc_keyboard_sdk *kb,
|
|
struct sc_controller *controller,
|
|
enum sc_key_inject_mode key_inject_mode,
|
|
bool forward_key_repeat);
|
|
|
|
#endif
|