]> ncurses.scripts.mit.edu Git - ncurses.git/blob - panel/panel.priv.h
ncurses 4.2
[ncurses.git] / panel / panel.priv.h
1 /* $Id: panel.priv.h,v 1.8 1997/10/21 10:19:37 juergen Exp $ */
2
3 #ifndef _PANEL_PRIV_H
4 #define _PANEL_PRIV_H
5
6 #if HAVE_CONFIG_H
7 #  include <ncurses_cfg.h>
8 #endif
9
10 #include <stdlib.h>
11 #include <string.h>
12 #include <assert.h>
13
14 #if HAVE_LIBDMALLOC
15 #  include <dmalloc.h>    /* Gray Watson's library */
16 #endif
17
18 #if HAVE_LIBDBMALLOC
19 #  include <dbmalloc.h>   /* Conor Cahill's library */
20 #endif
21
22 #include <nc_panel.h>
23 #include "panel.h"
24
25 #if ( CC_HAS_INLINE_FUNCS && !defined(TRACE) )
26 #  define INLINE inline
27 #else
28 #  define INLINE
29 #endif
30
31 typedef struct panelcons
32 {
33   struct panelcons *above;
34   struct panel *pan;
35 } PANELCONS;
36
37 #ifdef USE_RCS_IDS
38 #  define MODULE_ID(id) static const char Ident[] = id;
39 #else
40 #  define MODULE_ID(id) /*nothing*/
41 #endif
42
43 #define P_TOUCH  (0)
44 #define P_UPDATE (1)
45
46 #ifdef TRACE
47    extern const char *_nc_my_visbuf(const void *);
48 #  ifdef TRACE_TXT
49 #    define USER_PTR(ptr) _nc_visbuf((const char *)ptr)
50 #  else
51 #    define USER_PTR(ptr) _nc_my_visbuf((const char *)ptr)
52 #  endif
53
54    extern void _nc_dPanel(const char*, const PANEL*);
55    extern void _nc_dStack(const char*, int, const PANEL*);
56    extern void _nc_Wnoutrefresh(const PANEL*);
57    extern void _nc_Touchpan(const PANEL*);
58    extern void _nc_Touchline(const PANEL*, int, int);
59
60 #  define dBug(x) _tracef x
61 #  define dPanel(text,pan) _nc_dPanel(text,pan)
62 #  define dStack(fmt,num,pan) _nc_dStack(fmt,num,pan)
63 #  define Wnoutrefresh(pan) _nc_Wnoutrefresh(pan)
64 #  define Touchpan(pan) _nc_Touchpan(pan)
65 #  define Touchline(pan,start,count) _nc_Touchline(pan,start,count)
66 #else /* !TRACE */
67 #  define dBug(x)
68 #  define dPanel(text,pan)
69 #  define dStack(fmt,num,pan)
70 #  define Wnoutrefresh(pan) wnoutrefresh((pan)->win)
71 #  define Touchpan(pan) touchwin((pan)->win)
72 #  define Touchline(pan,start,count) touchline((pan)->win,start,count)
73 #endif
74
75 #define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel
76 #define _nc_top_panel _nc_panelhook()->top_panel
77 #define _nc_bottom_panel _nc_panelhook()->bottom_panel
78
79 extern void _nc_panel_link_bottom(PANEL*);
80 extern bool _nc_panel_is_linked(const PANEL*);
81 extern void _nc_calculate_obscure(void);
82 extern void _nc_free_obscure(PANEL*);
83 extern void _nc_override(const PANEL*,int);
84
85 #endif /* _PANEL_PRIV_H */