mb/amb/birman*/gpio: remove configuration for VDD_MEM_VID[0,1]
[coreboot2.git] / payloads / libpayload / curses / PDCurses / curspriv.h
blob8b34f010ce71e95f87eb9262a386f754c5e1725b
1 /* Public Domain Curses */
3 /* $Id: curspriv.h,v 1.158 2008/07/13 16:08:16 wmcbrine Exp $ */
5 /* Private definitions and declarations for use within PDCurses.
6 These should generally not be referenced by applications. */
8 #ifndef __CURSES_INTERNALS__
9 #define __CURSES_INTERNALS__ 1
11 #ifdef HAVE_CONFIG_H
12 # include <config.h>
13 #endif
15 #define CURSES_LIBRARY
16 #include <curses.h>
18 #if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \
19 defined(__CYGWIN32__) || defined(__MINGW32__) || \
20 defined(__WATCOMC__) || defined(__PACIFIC__)
21 # ifndef HAVE_VSSCANF
22 # define HAVE_VSSCANF /* have vsscanf() */
23 # endif
24 #endif
26 #if defined(__CYGWIN32__) || defined(__MINGW32__) || \
27 defined(__LCC__) || defined(__WATCOMC__)
28 # ifndef HAVE_VSNPRINTF
29 # define HAVE_VSNPRINTF /* have vsnprintf() */
30 # endif
31 #endif
33 #if defined(_MSC_VER) && defined(_WIN32) && !defined(_CRT_SECURE_NO_DEPRECATE)
34 # define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
35 #endif
37 /*----------------------------------------------------------------------*/
39 typedef struct /* structure for ripped off lines */
41 int line;
42 int (*init)(WINDOW *, int);
43 } RIPPEDOFFLINE;
45 /* Window properties */
47 #define _SUBWIN 0x01 /* window is a subwindow */
48 #define _PAD 0x10 /* X/Open Pad. */
49 #define _SUBPAD 0x20 /* X/Open subpad. */
51 /* Miscellaneous */
53 #define _NO_CHANGE -1 /* flags line edge unchanged */
55 #define _ECHAR 0x08 /* Erase char (^H) */
56 #define _DWCHAR 0x17 /* Delete Word char (^W) */
57 #define _DLCHAR 0x15 /* Delete Line char (^U) */
59 extern WINDOW *pdc_lastscr;
60 extern bool pdc_trace_on; /* tracing flag */
61 extern bool pdc_color_started;
62 extern unsigned long pdc_key_modifiers;
63 extern MOUSE_STATUS pdc_mouse_status;
65 /*----------------------------------------------------------------------*/
67 /* Platform implementation functions */
69 void PDC_beep(void);
70 bool PDC_can_change_color(void);
71 int PDC_color_content(short, short *, short *, short *);
72 bool PDC_check_key(void);
73 int PDC_curs_set(int);
74 void PDC_flushinp(void);
75 int PDC_get_columns(void);
76 int PDC_get_cursor_mode(void);
77 int PDC_get_key(void);
78 int PDC_get_rows(void);
79 void PDC_gotoyx(int, int);
80 int PDC_init_color(short, short, short, short);
81 void PDC_init_pair(short, short, short);
82 int PDC_modifiers_set(void);
83 int PDC_mouse_set(void);
84 void PDC_napms(int);
85 int PDC_pair_content(short, short *, short *);
86 void PDC_reset_prog_mode(void);
87 void PDC_reset_shell_mode(void);
88 int PDC_resize_screen(int, int);
89 void PDC_restore_screen_mode(int);
90 void PDC_save_screen_mode(int);
91 void PDC_scr_close(void);
92 void PDC_scr_free(void);
93 int PDC_scr_open(int, char **);
94 void PDC_set_keyboard_binary(bool);
95 void PDC_transform_line(int, int, int, const chtype *);
96 const char *PDC_sysname(void);
98 /* Internal cross-module functions */
100 void PDC_init_atrtab(void);
101 WINDOW *PDC_makelines(WINDOW *);
102 WINDOW *PDC_makenew(int, int, int, int);
103 int PDC_mouse_in_slk(int, int);
104 void PDC_slk_free(void);
105 void PDC_slk_initialize(void);
106 void PDC_sync(WINDOW *);
108 #ifdef PDC_WIDE
109 int PDC_mbtowc(wchar_t *, const char *, size_t);
110 size_t PDC_mbstowcs(wchar_t *, const char *, size_t);
111 size_t PDC_wcstombs(char *, const wchar_t *, size_t);
112 #endif
114 #ifdef PDCDEBUG
115 # define PDC_LOG(x) if (pdc_trace_on) PDC_debug x
116 # define RCSID(x) static const char *rcsid = x;
117 #else
118 # define PDC_LOG(x)
119 # define RCSID(x)
120 #endif
122 /* Internal macros for attributes */
124 #ifdef CHTYPE_LONG
125 # define PDC_COLOR_PAIRS 256
126 #else
127 # define PDC_COLOR_PAIRS 32
128 #endif
130 #ifndef max
131 # define max(a,b) (((a) > (b)) ? (a) : (b))
132 #endif
133 #ifndef min
134 # define min(a,b) (((a) < (b)) ? (a) : (b))
135 #endif
137 #define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor)
139 #define PDC_CLICK_PERIOD 150 /* time to wait for a click, if
140 not set by mouseinterval() */
142 #endif /* __CURSES_INTERNALS__*/