mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-28 05:08:22 +00:00
generic mouse interface
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define MAJOR_FB 5
|
||||
#define MAJOR_KB 6
|
||||
#define MAJOR_E9OUT 7
|
||||
#define MAJOR_MOUSE 8
|
||||
|
||||
typedef struct{
|
||||
int (*read)(int* error, int minor, void* buff, size_t count, size_t offset);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef _MOUSE_H_INCLUDE
|
||||
#define _MOUSE_H_INCLUDE
|
||||
|
||||
#define MOUSE_FLAG_RB 1
|
||||
#define MOUSE_FLAG_MB 2
|
||||
#define MOUSE_FLAG_LB 4
|
||||
#define MOUSE_FLAG_B4 8
|
||||
#define MOUSE_FLAG_B5 16
|
||||
|
||||
#include <ringbuffer.h>
|
||||
#include <kernel/event.h>
|
||||
|
||||
typedef struct {
|
||||
int flags;
|
||||
int x,y,z;
|
||||
} mousepacket_t;
|
||||
|
||||
typedef struct {
|
||||
ringbuffer_t buffer;
|
||||
event_t event;
|
||||
int flags;
|
||||
} mouse_t;
|
||||
|
||||
void mouse_init();
|
||||
int mouse_getnew();
|
||||
void mouse_packet(int, mousepacket_t);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user