2025-09-10 22:49:05 +10:00
|
|
|
#ifndef DORNE_CURSE_H
|
|
|
|
|
#define DORNE_CURSE_H
|
|
|
|
|
|
|
|
|
|
/* libncurses with wide-character support. */
|
|
|
|
|
#include <ncursesw/ncurses.h>
|
|
|
|
|
|
2025-09-10 23:05:07 +10:00
|
|
|
enum crs_termmode {
|
2025-09-10 22:49:05 +10:00
|
|
|
/* tty cbreak mode */
|
2025-09-10 23:05:07 +10:00
|
|
|
TMODE_CBREAK,
|
2025-09-10 22:49:05 +10:00
|
|
|
/* tty raw mode */
|
2025-09-10 23:05:07 +10:00
|
|
|
TMODE_RAW,
|
2025-09-10 22:49:05 +10:00
|
|
|
/* tty cooked mode (ISIG & IXON not modified)*/
|
2025-09-10 23:05:07 +10:00
|
|
|
TMODE_NOCBREAK,
|
2025-09-10 22:49:05 +10:00
|
|
|
/* tty cooked mode (ISIG & IXON set) */
|
2025-09-10 23:05:07 +10:00
|
|
|
TMODE_NORAW,
|
2025-09-10 22:49:05 +10:00
|
|
|
};
|
|
|
|
|
|
2025-09-12 00:17:48 +10:00
|
|
|
#define termsize(width, height) (width=COLS); (height=LINES)
|
|
|
|
|
|
2025-09-11 17:37:01 +10:00
|
|
|
int termmode(const enum crs_termmode mode);
|
|
|
|
|
|
2025-09-10 22:49:05 +10:00
|
|
|
void init_ncurses(void);
|
2025-09-11 19:24:48 +10:00
|
|
|
WINDOW *new_window(const int x, const int y, const int width, const int height);
|
2025-09-10 23:05:07 +10:00
|
|
|
WINDOW *root_window(void);
|
2025-09-10 22:49:05 +10:00
|
|
|
|
2025-09-11 17:40:25 +10:00
|
|
|
int resizemv_window(const int x, const int y, const int width, const int height,
|
|
|
|
|
WINDOW *const win);
|
|
|
|
|
|
2025-09-10 22:49:05 +10:00
|
|
|
#endif /* DORNE_CURSE_H */
|