You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
931 B

#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