2025-09-13 10:58:31 +10:00
|
|
|
#ifndef CURSETREE_NCRSWRAP_H
|
|
|
|
|
#define CURSETREE_NCRSWRAP_H
|
2025-09-10 22:49:05 +10:00
|
|
|
|
2025-09-13 12:44:58 +10:00
|
|
|
#include "dims.h"
|
|
|
|
|
|
2025-09-13 23:45:56 +10:00
|
|
|
#ifndef __NCURSES_H
|
2025-09-13 12:44:58 +10:00
|
|
|
typedef struct _win_st WINDOW;
|
2025-09-13 23:45:56 +10:00
|
|
|
#endif /* __NCURSES_H */
|
2025-09-10 22:49:05 +10:00
|
|
|
|
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-11 17:37:01 +10:00
|
|
|
int termmode(const enum crs_termmode mode);
|
2025-09-13 12:44:58 +10:00
|
|
|
void termsize(int *const width, int *const height);
|
2025-09-13 23:45:56 +10:00
|
|
|
struct ct_dims *termdims(void);
|
2025-09-11 17:37:01 +10:00
|
|
|
|
2025-09-10 22:49:05 +10:00
|
|
|
void init_ncurses(void);
|
2025-09-13 23:45:56 +10:00
|
|
|
void end_ncurses(void);
|
2025-09-13 12:44:58 +10:00
|
|
|
|
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-13 12:44:58 +10:00
|
|
|
WINDOW *new_window_fs(void);
|
|
|
|
|
void destroy_window(WINDOW *);
|
|
|
|
|
|
2025-09-16 16:48:02 +10:00
|
|
|
// #define winpos(win, x, y) (x = winposx(win), y = winposy(win))
|
|
|
|
|
// #define winsize(win, width, height) \
|
|
|
|
|
// (width = winwidth(win), height = winheight(win))
|
|
|
|
|
// int winposx(WINDOW *const);
|
|
|
|
|
// int winposy(WINDOW *const);
|
|
|
|
|
// int winwidth(WINDOW *const);
|
|
|
|
|
// int winheight(WINDOW *const);
|
|
|
|
|
// struct ct_dims *windims(WINDOW *win);
|
2025-09-10 22:49:05 +10:00
|
|
|
|
2025-09-13 23:45:56 +10:00
|
|
|
int resizemv_window(WINDOW *const win, const int x, const int y,
|
|
|
|
|
const int width, const int height);
|
2025-09-11 17:40:25 +10:00
|
|
|
|
2025-09-13 10:58:31 +10:00
|
|
|
#endif /* CURSETREE_NCRSWRAP_H */
|