1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// license:BSD-3-Clause
// copyright-holders:Aaron Giles, Vas Crabb
/***************************************************************************
uievents.h
OSD UI event interfaces
***************************************************************************/
#ifndef MAME_OSD_INTERFACE_UIEVENTS_H
#define MAME_OSD_INTERFACE_UIEVENTS_H
//**************************************************************************
// FORWARD DECLARATIONS
//**************************************************************************
class render_target;
namespace osd {
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// UI event handler interface
class ui_event_handler
{
protected:
~ui_event_handler() = default;
public:
enum class pointer
{
UNKNOWN,
MOUSE,
PEN,
TOUCH
};
// window events
virtual void push_window_focus_event(render_target *target) = 0;
virtual void push_window_defocus_event(render_target *target) = 0;
// legacy mouse events
virtual void push_mouse_wheel_event(render_target *target, s32 x, s32 y, short delta, int lines) = 0;
// pointer events
virtual void push_pointer_update(render_target *target, pointer type, u16 ptrid, u16 device, s32 x, s32 y, u32 buttons, u32 pressed, u32 released, s16 clicks) = 0;
virtual void push_pointer_leave(render_target *target, pointer type, u16 ptrid, u16 device, s32 x, s32 y, u32 released, s16 clicks) = 0;
virtual void push_pointer_abort(render_target *target, pointer type, u16 ptrid, u16 device, s32 x, s32 y, u32 released, s16 clicks) = 0;
// text input events
virtual void push_char_event(render_target *target, char32_t ch) = 0;
};
} // namespace osd
#endif // MAME_OSD_INTERFACE_UIEVENTS_H
|