From 140a8861a63dea5c36a3e9d6d19b5382bdd8ddce Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 29 Jun 2023 15:36:33 +0200 Subject: c++,window: Progress save. Reworking from old style to more public one --- src/window/xcb.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/window/xcb.h') diff --git a/src/window/xcb.h b/src/window/xcb.h index bbdf1ed..e2928b6 100644 --- a/src/window/xcb.h +++ b/src/window/xcb.h @@ -12,7 +12,7 @@ namespace gfx { class window; template<> -class device final { +class device final { private: ::Display *display_; int screen_; @@ -35,11 +35,13 @@ public: void xcb_window_was_destroyed(xcb_window_t window_id); void handle_events(); - own create_window(const video_mode& vid_mod, std::string_view title_view); + window create_window(const video_mode& vid_mod, std::string_view title_view); void flush(); }; +error_or> create_xcb_device(); + class window { private: device *device_; @@ -65,7 +67,7 @@ public: void resize(uint64_t width, uint64_t height); - conveyor on_event(); + conveyor> on_event(); void resize_event(uint64_t x, uint64_t y, uint64_t width, uint64_t height); void mouse_event(int16_t x, int16_t y, uint16_t state, bool pressed); -- cgit v1.2.3