diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 14:03:09 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 14:03:09 +0100 |
| commit | 1acadb9cdfc2025b65b190c872e420b199827655 (patch) | |
| tree | f220f0adef4795bad340b3ca76031d99c6aa9263 /src/window.h | |
| parent | bce43321ba6d5723e57710bd48bc84c08ec493ff (diff) | |
use concrete errors
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 11 |
1 files changed, 9 insertions, 2 deletions
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); |
