diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-26 12:23:19 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-26 12:23:19 +0200 |
| commit | e4a0432383331e013808a97b7c24707e4ddc4726 (patch) | |
| tree | 3ef4465be03bc7b92a0b048f02f76475045404b6 /src/input | |
| parent | 105732dde10b317a81d5a10a3f66b315d6f85015 (diff) | |
| download | srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.tar.gz srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.zip | |
Initial Commit
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/input_handler.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/input/input_handler.h b/src/input/input_handler.h new file mode 100644 index 0000000..2f35608 --- /dev/null +++ b/src/input/input_handler.h @@ -0,0 +1,36 @@ +#ifndef SRDWM_INPUT_HANDLER_H +#define SRDWM_INPUT_HANDLER_H + +#include <memory> + +// Define basic event structures (these will need more detail later) +struct KeyboardEvent { + int key_code; + // Add modifiers, state (press/release) +}; + +struct MouseEvent { + enum class Type { Press, Release, Motion }; + Type type; + int button; // Valid for Press/Release + int x, y; + // Add modifiers +}; + +class InputHandler { +public: + virtual ~InputHandler() = default; + + // Pure virtual methods for handling events + virtual void handle_key_press(const KeyboardEvent& event) = 0; + virtual void handle_key_release(const KeyboardEvent& event) = 0; + virtual void handle_mouse_button_press(const MouseEvent& event) = 0; + virtual void handle_mouse_button_release(const MouseEvent& event) = 0; + virtual void handle_mouse_motion(const MouseEvent& event) = 0; + + // Other potential input-related methods + // virtual void initialize() = 0; + // virtual void shutdown() = 0; +}; + +#endif // SRDWM_INPUT_HANDLER_H |
