From 2e3adfc5100c4c273529d7e0ed1cba42f184395f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 4 Apr 2025 20:51:28 +0200 Subject: Add option to capture the focused monitor --- include/CursorTracker.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/CursorTracker.hpp (limited to 'include/CursorTracker.hpp') diff --git a/include/CursorTracker.hpp b/include/CursorTracker.hpp new file mode 100644 index 0000000..ff7374f --- /dev/null +++ b/include/CursorTracker.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include +#include +#include + +namespace gsr { + struct CursorInfo { + mgl::vec2i position; + std::string monitor_name; + }; + + class CursorTracker { + public: + CursorTracker() = default; + CursorTracker(const CursorTracker&) = delete; + CursorTracker& operator=(const CursorTracker&) = delete; + virtual ~CursorTracker() = default; + + virtual void update() = 0; + virtual std::optional get_latest_cursor_info() = 0; + }; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2