FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
ps2-mouse.h
Go to the documentation of this file.
1
11
12#include <basics.h>
13#include <stdbool.h>
14#include <hal.h>
15#include <debugger.h>
16#include <opengl/glbackend.h>
17#include <isr.h>
18#include <hal.h>
19
20#define PS2_left_button 0x01U
21#define PS2_middle_button 0x04U
22#define PS2_right_button 0x02U
23#define PS2_x 0x10U
24#define PS2_y 0x20U
25#define PS2_x_overflow 0x40U
26#define PS2_y_overflow 0x80U
27
28#define MOUSE_BUTTON_LEFT PS2_left_button
29#define MOUSE_BUTTON_RIGHT PS2_right_button
30#define MOUSE_BUTTON_MIDDLE PS2_middle_button
31
32#define MOUSE_BUTTON_PRESS 1
33#define MOUSE_BUTTON_RELEASE 0
34
35extern const bool mouse_cursor[];
36
40typedef void(*MouseMovementHandler)(int64_t xRel, int64_t yRel);
41
45typedef void(*MouseButtonHandler)(uint8_t button, uint8_t action);
46
55
64
72ivec2 GetMousePosition(void);
73
82
89void init_ps2_mouse(void);
This is a basic header files with FrostWing specific short forms and basically a good for life header...
The headers files for E9 hack.
Header file for Hardware Abstraction Layer -> Source from GoGX OS.
Interrupts handler header.
void SetMouseMovementHandler(MouseMovementHandler handler)
Set the mouse movement handler function.
void process_mouse(InterruptFrame *frame)
Handles the mouse's.
void(* MouseMovementHandler)(int64_t xRel, int64_t yRel)
Type definition for mouse movement handler functions.
Definition ps2-mouse.h:40
ivec2 GetMousePosition(void)
Get the mouse position.
void(* MouseButtonHandler)(uint8_t button, uint8_t action)
Type definition for mouse button handler functions.
Definition ps2-mouse.h:45
void SetMouseButtonHandler(MouseButtonHandler handler)
Set the mouse button handler function.
ivec2 GetLastMousePosition(void)
Get the last mouse position.