From dfeb19b0a83b8ce57d28bf94a4f8d129993d1064 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 12 Jan 2026 23:06:20 +0100 Subject: Initial commit --- src/xcb_xkb.hh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/xcb_xkb.hh (limited to 'src/xcb_xkb.hh') diff --git a/src/xcb_xkb.hh b/src/xcb_xkb.hh new file mode 100644 index 0000000..b05ce3b --- /dev/null +++ b/src/xcb_xkb.hh @@ -0,0 +1,30 @@ +#ifndef XCB_XKB_HH +#define XCB_XKB_HH + +#include +#include +#include +#include + +namespace xcb { + +class Keyboard { + public: + virtual ~Keyboard() = default; + + virtual bool handle_event(xcb_connection_t* conn, + xcb_generic_event_t* event) = 0; + + virtual std::string get_utf8(xcb_key_press_event_t* event) = 0; + + static std::unique_ptr create(xcb_connection_t* conn); + + protected: + Keyboard() = default; + Keyboard(Keyboard const&) = delete; + Keyboard& operator=(Keyboard const&) = delete; +}; + +} // namespace xcb + +#endif // XCB_XKB_HH -- cgit v1.2.3-70-g09d2