diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
commit | 8dad985328e2183b224300aa992951131956fdb3 (patch) | |
tree | ceda3d9805335f36f571fb36585444ebdb421a02 /modules/window/c++/window.h | |
parent | a9d2025030d0a7641f4b0701bd4aff7d2db5aeb4 (diff) |
core,codec-json,codec-minecraft,codec-netcdf,codec,io-tls,io,io_codec,window,window-opengl:
Renamed file endings and changed includes
Diffstat (limited to 'modules/window/c++/window.h')
-rw-r--r-- | modules/window/c++/window.h | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/modules/window/c++/window.h b/modules/window/c++/window.h deleted file mode 100644 index 0e8d051..0000000 --- a/modules/window/c++/window.h +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once - -#include "video_mode.h" - -#include <forstio/async/async.h> -#include <forstio/common.h> -#include <forstio/codec/schema.h> - -#include <string_view> -#include <variant> - -namespace saw { -namespace gfx { -namespace schema { -using namespace saw::schema; -using WindowResize = Struct< - Member<UInt32, "width">, - Member<UInt32, "height"> ->; -using WindowEvents = Union< - Member<WindowResize, "resize"> ->; -} - -template<typename T> -class window; -} -} - -#include "linux_xcb.h" - -/** -namespace saw { -class window { -public: - class event { - public: - struct resize { - size_t width; - size_t height; - }; - - struct keyboard { - uint32_t key; - uint32_t scan; - bool pressed; - bool repeat; - }; - - struct mouse { - uint16_t button_mask; - bool pressed; - uint32_t x; - uint32_t y; - }; - - struct mouse_move { - uint32_t x; - uint32_t y; - }; - }; - - using variant_event = std::variant<event::resize, event::keyboard, - event::mouse, event::mouse_move>; - - virtual ~window() = default; - - virtual void show() = 0; - virtual void hide() = 0; - - virtual const video_mode &get_video_mode() const = 0; - virtual const std::string_view title() const = 0; - - virtual void resize(size_t width, size_t height) = 0; - - virtual conveyor<variant_event> on_event() = 0; -}; -} // namespace saw -*/ |