From 1acadb9cdfc2025b65b190c872e420b199827655 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 14:03:09 +0100 Subject: use concrete errors --- src/window.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/window.h') diff --git a/src/window.h b/src/window.h index 2cfa36e..305956b 100644 --- a/src/window.h +++ b/src/window.h @@ -6,6 +6,13 @@ struct eventloop_s; typedef u32 window_id_t; +enum window_error_e : u8 { + WINDOW_ERROR_NONE = 0, + WINDOW_ERROR_CREATION_WL_SURFACE, + WINDOW_ERROR_CREATION_XDG_SURFACE, + WINDOW_ERROR_CREATION_XDG_TOPLEVEL, +}; + struct window_s { struct eventloop_s* loop; window_id_t id; @@ -15,7 +22,7 @@ struct window_s { xdg_toplevel_t xdg_toplevel; }; -bool wayc_window_init(struct window_s* window, const char* name, - struct eventloop_s* loop); +enum window_error_e wayc_window_init(struct window_s* window, const char* name, + struct eventloop_s* loop); void wayc_window_deinit(struct window_s* window); void wayc_window_redraw(struct window_s* window, struct eventloop_s* loop); -- cgit v1.2.3