mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 05:54:20 +01:00
Improved manually with the help of neovim LSP warnings and iwyu:
iwyu -Ibuilddir/app/ -Iapp/src/ app/src/XXX.c
57 lines
1.3 KiB
C
57 lines
1.3 KiB
C
#ifndef SC_GAMEPAD_PROCESSOR_H
|
|
#define SC_GAMEPAD_PROCESSOR_H
|
|
|
|
#include "common.h"
|
|
|
|
#include "input_events.h"
|
|
|
|
/**
|
|
* Gamepad processor trait.
|
|
*
|
|
* Component able to handle gamepads devices and inject buttons and axis events.
|
|
*/
|
|
struct sc_gamepad_processor {
|
|
const struct sc_gamepad_processor_ops *ops;
|
|
};
|
|
|
|
struct sc_gamepad_processor_ops {
|
|
|
|
/**
|
|
* Process a gamepad device added event
|
|
*
|
|
* This function is mandatory.
|
|
*/
|
|
void
|
|
(*process_gamepad_added)(struct sc_gamepad_processor *gp,
|
|
const struct sc_gamepad_device_event *event);
|
|
|
|
/**
|
|
* Process a gamepad device removed event
|
|
*
|
|
* This function is mandatory.
|
|
*/
|
|
void
|
|
(*process_gamepad_removed)(struct sc_gamepad_processor *gp,
|
|
const struct sc_gamepad_device_event *event);
|
|
|
|
/**
|
|
* Process a gamepad axis event
|
|
*
|
|
* This function is mandatory.
|
|
*/
|
|
void
|
|
(*process_gamepad_axis)(struct sc_gamepad_processor *gp,
|
|
const struct sc_gamepad_axis_event *event);
|
|
|
|
/**
|
|
* Process a gamepad button event
|
|
*
|
|
* This function is mandatory.
|
|
*/
|
|
void
|
|
(*process_gamepad_button)(struct sc_gamepad_processor *gp,
|
|
const struct sc_gamepad_button_event *event);
|
|
};
|
|
|
|
#endif
|