PatchworkOS
Loading...
Searching...
No Matches
mouse.h
Go to the documentation of this file.
1
#ifndef _SYS_MOUSE_H
2
#define _SYS_MOUSE_H 1
3
4
#include <
stdint.h
>
5
6
#if defined(__cplusplus)
7
extern
"C"
8
{
9
#endif
10
11
#include "
_internal/clock_t.h
"
12
30
typedef
enum
31
{
32
MOUSE_NONE
= 0,
33
MOUSE_RIGHT
= (1 << 0),
34
MOUSE_MIDDLE
= (1 << 1),
35
MOUSE_LEFT
= (1 << 2)
36
}
mouse_buttons_t
;
37
44
typedef
struct
45
{
46
clock_t
time
;
47
mouse_buttons_t
buttons
;
48
int64_t
deltaX
;
49
int64_t
deltaY
;
50
}
mouse_event_t
;
51
52
#if defined(__cplusplus)
53
}
54
#endif
55
56
#endif
57
clock_t.h
mouse_buttons_t
mouse_buttons_t
Mouse buttons enum.
Definition
mouse.h:31
MOUSE_RIGHT
@ MOUSE_RIGHT
Right mouse button.
Definition
mouse.h:33
MOUSE_NONE
@ MOUSE_NONE
None.
Definition
mouse.h:32
MOUSE_MIDDLE
@ MOUSE_MIDDLE
Middle mouse button.
Definition
mouse.h:34
MOUSE_LEFT
@ MOUSE_LEFT
Left mouse button.
Definition
mouse.h:35
clock_t
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition
clock_t.h:13
stdint.h
int64_t
__INT64_TYPE__ int64_t
Definition
stdint.h:16
mouse_event_t
Mouse event structure.
Definition
mouse.h:45
mouse_event_t::buttons
mouse_buttons_t buttons
Which buttons were held down durring the event.
Definition
mouse.h:47
mouse_event_t::time
clock_t time
Clock ticks since boot when the event happened.
Definition
mouse.h:46
mouse_event_t::deltaY
int64_t deltaY
Change in Y coordinate.
Definition
mouse.h:49
mouse_event_t::deltaX
int64_t deltaX
Change in X coordinate.
Definition
mouse.h:48
include
libstd
sys
mouse.h
Generated by
1.9.8