From 9bffcafa9ae0c38103a8c64b3482bb099e792869 Mon Sep 17 00:00:00 2001 From: verdant Date: Tue, 28 Jul 2026 18:30:16 +0800 Subject: Move source files to src/ --- src/wm.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/wm.h (limited to 'src/wm.h') diff --git a/src/wm.h b/src/wm.h new file mode 100644 index 0000000..713f2cb --- /dev/null +++ b/src/wm.h @@ -0,0 +1,30 @@ +#ifndef SF_WM_H +#define SF_WM_H + +#include + +#define WINDOWS_MAX 15 + +typedef struct { + WINDOW *win; + char name[32]; + int height; + int width; + int start_x; + int start_y; +} window; + +typedef struct { + window **windows; /* windows[0] is root_win */ + int w_count; /* index of windows */ + int maxy; + int maxx; +} terminal; + +terminal *wm_init(void); +window *wm_create_new_w(terminal *t, const char *name, int height, int width, + int start_y, int start_x); +int wm_fd_w_by_name(terminal *t, const char *name); +void wm_refresh_all(terminal *t); + +#endif /* SF_WM_H */ -- cgit v1.2.3