1 #ifndef NM_NCURSES_H_
2 #define NM_NCURSES_H_
3 
4 #if defined(CURSES_HAVE_NCURSES_CURSES_H)
5 #include <ncurses/curses.h>
6 #include <ncurses/panel.h>
7 #else
8 #include <curses.h>
9 #include <panel.h>
10 #endif
11 
12 typedef WINDOW nm_window_t;
13 typedef PANEL nm_panel_t;
14 
15 typedef struct {
16     int x;
17     int y;
18     int lines;
19     int cols;
20 } nm_cord_t;
21 
22 typedef struct {
23     char **kwds;
24     int count;
25     bool checkcase;
26     bool checkunique;
27 } nm_args_t;
28 
29 #define NM_INIT_POS (nm_cord_t) { 0, 0, 0, 0 }
30 #define NM_SET_POS(l, c, x_, y_) \
31     (nm_cord_t) { .lines  = l, .cols = c, .x = x_, .y = y_ }
32 
33 void nm_ncurses_init(void);
34 void nm_curses_deinit(void);
35 nm_window_t *nm_init_window(const nm_cord_t *pos);
36 void nm_clear_screen(void);
37 
38 #endif /* NM_NCURSES_H_*/
39 /* vim:set ts=4 sw=4: */
40