panel.h 1.5 KB

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