Aufgabe 2: Unterbrechungen
Mouse Class Reference
Handles mouse movements and clicks. More...
#include <device/mouse.h>
Inheritance diagram for Mouse:
Collaboration diagram for Mouse:
Public Member Functions | |
Mouse (unsigned max_x, unsigned max_y) | |
Constructor. More... | |
void | getPos (unsigned &x, unsigned &y) const |
Retrieve the current mouse position. More... | |
bool | isPressed (MouseButton btn) const |
Check if a given mouse button is pressed. More... | |
void | plugin () |
Initialization of the mouse. More... | |
void | trigger () |
Handling of mouse interrupts. More... | |
Public Member Functions inherited from Gate | |
Gate () | |
Constructor. | |
virtual | ~Gate () |
Destructor. More... | |
virtual void | trigger ()=0 |
Device-specific interrupt handler. More... | |
Public Attributes | |
const unsigned | MAX_X |
Maximum X position of the mouse. | |
const unsigned | MAX_Y |
Maximum Y position of the mouse. | |
Detailed Description
Handles mouse movements and clicks.
This class ensures correct initialization of the mouse and, above all, its interrupt handling.
Constructor & Destructor Documentation
|
inlineexplicit |
Constructor.
Defines a virtual window for the mouse.
- Parameters
-
max_x Maximum X position (excluding) for the mouse max_y Maximum Y position (excluding) for the mouse
Member Function Documentation
|
inline |
|
inline |
Check if a given mouse button is pressed.
- Parameters
-
btn Button to check for press
- Returns
true
if button is currently pressed
- Optional:
- Implement method
void Mouse::plugin | ( | ) |
Initialization of the mouse.
Initialization of the mouse and activation of the specific interrupt handling: The object will register itself at the Plugbox and configure the IOAPIC to receive the corresponding interrupts.
- Note
- The mouse interrupts should be configured as level triggered.
- Optional:
- Implement method
|
virtual |
The documentation for this class was generated from the following files:
- device/mouse.h
- device/mouse.cc