Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <hardware/interrupts.h>
- #include <drivers/driver.h>
- namespace drivers {
- class MouseEventHandler {
- public:
- virtual void onMouseDown(uint8_t button);
- virtual void onMouseUp(uint8_t button);
- virtual void onMouseMove(int x, int y);
- };
- class MouseDriver :public hardware::InterruptHandler, public Driver {
- protected:
- hardware::Port8Bit dataport;
- hardware::Port8Bit commandport;
- uint8_t buffer[3];
- uint8_t offset;
- uint8_t buttons;
- int8_t x, y;
- MouseEventHandler* eventHandler;
- public:
- MouseDriver(hardware::InterruptManager* interruptManager, MouseEventHandler* events);
- uint32_t handleInterrupt(uint32_t esp);
- virtual void activate();
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement