40 lines
931 B
C
40 lines
931 B
C
#ifndef SC_MOUSE_PROCESSOR_H
|
|
#define SC_MOUSE_PROCESSOR_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <assert.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "input_events.h"
|
|
|
|
/**
|
|
* Mouse processor trait.
|
|
*
|
|
* Component able to process and inject mouse events should implement this
|
|
* trait.
|
|
*/
|
|
struct sc_mouse_processor {
|
|
const struct sc_mouse_processor_ops *ops;
|
|
};
|
|
|
|
struct sc_mouse_processor_ops {
|
|
void
|
|
(*process_mouse_motion)(struct sc_mouse_processor *mp,
|
|
const struct sc_mouse_motion_event *event);
|
|
|
|
void
|
|
(*process_mouse_click)(struct sc_mouse_processor *mp,
|
|
const struct sc_mouse_click_event *event);
|
|
|
|
void
|
|
(*process_mouse_scroll)(struct sc_mouse_processor *mp,
|
|
const struct sc_mouse_scroll_event *event);
|
|
|
|
void
|
|
(*process_touch)(struct sc_mouse_processor *mp,
|
|
const struct sc_touch_event *event);
|
|
};
|
|
|
|
#endif
|