Make some mouse processors ops optional

Do not force all mouse processors to implement scroll events or touch
events.
This commit is contained in:
Romain Vimont
2021-12-30 15:08:42 +01:00
parent bc674721dc
commit 57f1655d4b
2 changed files with 32 additions and 0 deletions

View File

@@ -19,18 +19,38 @@ struct sc_mouse_processor {
};
struct sc_mouse_processor_ops {
/**
* Process a mouse motion event
*
* This function is mandatory.
*/
void
(*process_mouse_motion)(struct sc_mouse_processor *mp,
const struct sc_mouse_motion_event *event);
/**
* Process a mouse click event
*
* This function is mandatory.
*/
void
(*process_mouse_click)(struct sc_mouse_processor *mp,
const struct sc_mouse_click_event *event);
/**
* Process a mouse scroll event
*
* This function is optional.
*/
void
(*process_mouse_scroll)(struct sc_mouse_processor *mp,
const struct sc_mouse_scroll_event *event);
/**
* Process a touch event
*
* This function is optional.
*/
void
(*process_touch)(struct sc_mouse_processor *mp,
const struct sc_touch_event *event);