diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-12-28 22:56:43 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-12-28 22:56:43 +0100 |
| commit | fb0a1cabe8d61d3305d9d14acc4754a1b6151b8c (patch) | |
| tree | 8752b2189e25f1638f18b3450d02b512d6e715bc /src/pane.h | |
| parent | fee76b1e3d8da5152e44d67293165ae0c5651d25 (diff) | |
| download | tmus-fb0a1cabe8d61d3305d9d14acc4754a1b6151b8c.tar.gz tmus-fb0a1cabe8d61d3305d9d14acc4754a1b6151b8c.zip | |
Refactor for readability, use static line buffer for statusline etc
Diffstat (limited to 'src/pane.h')
| -rw-r--r-- | src/pane.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pane.h b/src/pane.h new file mode 100644 index 0000000..e58cfd0 --- /dev/null +++ b/src/pane.h @@ -0,0 +1,25 @@ +#pragma once + +#include "ncurses.h" + +#include <wchar.h> + +struct pane; + +typedef int (*pane_handler)(wint_t c); +typedef void (*pane_updater)(struct pane *pane, int sel); + +struct pane { + WINDOW *win; + int sx, sy, ex, ey; + int w, h; + int active; + + pane_handler handle; + pane_updater update; +}; + +void pane_init(struct pane *pane, pane_handler handle, pane_updater update); +void pane_resize(struct pane *pane, int sx, int sy, int ex, int ey); +void pane_free(struct pane *p); + |
