1 /* Public Domain Curses */
2 
3 /*----------------------------------------------------------------------*
4  *                         Panels for PDCurses                          *
5  *----------------------------------------------------------------------*/
6 
7 #ifndef __PDCURSES_PANEL_H__
8 #define __PDCURSES_PANEL_H__ 1
9 
10 #include <curses.h>
11 
12 #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
13 extern "C"
14 {
15 #endif
16 
17 typedef struct panelobs
18 {
19     struct panelobs *above;
20     struct panel *pan;
21 } PANELOBS;
22 
23 typedef struct panel
24 {
25     WINDOW *win;
26     int wstarty;
27     int wendy;
28     int wstartx;
29     int wendx;
30     struct panel *below;
31     struct panel *above;
32     const void *user;
33     struct panelobs *obscure;
34 } PANEL;
35 
36 PDCEX int     bottom_panel(PANEL *pan);
37 PDCEX int     del_panel(PANEL *pan);
38 PDCEX int     hide_panel(PANEL *pan);
39 PDCEX int     move_panel(PANEL *pan, int starty, int startx);
40 PDCEX PANEL  *new_panel(WINDOW *win);
41 PDCEX PANEL  *panel_above(const PANEL *pan);
42 PDCEX PANEL  *panel_below(const PANEL *pan);
43 PDCEX int     panel_hidden(const PANEL *pan);
44 PDCEX const void *panel_userptr(const PANEL *pan);
45 PDCEX WINDOW *panel_window(const PANEL *pan);
46 PDCEX int     replace_panel(PANEL *pan, WINDOW *win);
47 PDCEX int     set_panel_userptr(PANEL *pan, const void *uptr);
48 PDCEX int     show_panel(PANEL *pan);
49 PDCEX int     top_panel(PANEL *pan);
50 PDCEX void    update_panels(void);
51 
52 #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
53 }
54 #endif
55 
56 #endif /* __PDCURSES_PANEL_H__ */
57