diff options
author | Claudius Holeksa <mail@keldu.de> | 2023-05-23 01:38:07 +0200 |
---|---|---|
committer | Claudius Holeksa <mail@keldu.de> | 2023-05-23 01:38:07 +0200 |
commit | 5f2ca9a01d2e493e222bead7222613e050871928 (patch) | |
tree | cf758b9a91ed13e5f1f100f7111ee3f5ac9e64c8 /src/window/window.h | |
parent | 7f0440cc25fc3ebc711df9fb708a5bffe53bf784 (diff) |
c++: Changing approach to a more exposed variant
Diffstat (limited to 'src/window/window.h')
-rw-r--r-- | src/window/window.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/window/window.h b/src/window/window.h index 216c866..a6baae1 100644 --- a/src/window/window.h +++ b/src/window/window.h @@ -1,7 +1,8 @@ #pragma once #include <forstio/async/async.h> -#include <forstio/common.h> +#include <forstio/core/common.h> +#include <forstio/codec/schema.h> #include <string_view> #include <variant> @@ -9,7 +10,23 @@ #include "video_mode.h" namespace saw { +namespace schema { +using WindowResize = Struct< + NamedMember<UInt32, "width">, + NamedMember<UInt32, "height"> +>; +using WindowEvents = Union< + NamedMember<WindowResize, "resize"> +>; +} +} +#ifdef SAW_UNIX_XCB +#include "xcb.h" +#endif + +/** +namespace saw { class window { public: class event { @@ -47,7 +64,7 @@ public: virtual void show() = 0; virtual void hide() = 0; - virtual const video_mode &videoMode() const = 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; @@ -55,3 +72,4 @@ public: virtual conveyor<variant_event> on_event() = 0; }; } // namespace saw +*/ |