SayoriOS 0.3.3

mouse.h
1 #pragma once
2
3 typedef enum {
4 CURSOR_HIDDEN = 0,
5 CURSOR_NORMAL,
6 CURSOR_LOADING
7 } MouseDrawState_t;
8
9 #define MOUSE_RESET 0xFF
10 #define MOUSE_RESEND 0xFE
11 #define MOUSE_DEFAULTS 0xF6
12 #define MOUSE_STREAMING_OFF 0xF5
13 #define MOUSE_STREAMING_ON 0xF4
14 #define MOUSE_SET_SAMPLE_RATE 0xF3
15 #define MOUSE_GET_ID 0xF2
16 #define MOUSE_REQUEST_PACKET 0xEB
17 #define MOUSE_REQUEST_STATUS 0xE9
18 #define MOUSE_SET_RESOLUTION 0xE8
19 #define MOUSE_CONTROL_PORT 0x64
20 #define MOUSE_CMD_SEND 0xD4
21 #define MOUSE_DATA_PORT 0x60
22
23 // Mouse answers
24 #define MOUSE_ACK 0xFA
25
26 extern int mouse_wheel; // change to 0 after each reading
27
28 void mouse_set_show_system_cursor(bool set);
29 bool mouse_get_show_system_cursor();
30
31 uint32_t mouse_get_x();
32 uint32_t mouse_get_y();
33 uint8_t mouse_get_b1();
34 uint8_t mouse_get_b2();
35 uint8_t mouse_get_b3();
36 uint8_t mouse_get_b4();
37 uint8_t mouse_get_b5();
38
39 void mouse_set_state(MouseDrawState_t state);
40 void mouse_install();
mouse_wheel
int mouse_wheel
После каждого чтения меняем на 0.
Definition: mouse.c:32
mouse_install
void mouse_install()
Установщик драйвера мыши
Definition: mouse.c:203