diff options
Diffstat (limited to 'scripts/kconfig/libcurses/curspriv.h')
-rw-r--r-- | scripts/kconfig/libcurses/curspriv.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/scripts/kconfig/libcurses/curspriv.h b/scripts/kconfig/libcurses/curspriv.h new file mode 100644 index 000000000..5a6ec1550 --- /dev/null +++ b/scripts/kconfig/libcurses/curspriv.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* Private definitions and declarations for use within PDCurses. | ||
2 | These should generally not be referenced by applications. */ | ||
3 | |||
4 | #ifndef __CURSES_INTERNALS__ | ||
5 | #define __CURSES_INTERNALS__ 1 | ||
6 | |||
7 | #define CURSES_LIBRARY | ||
8 | #include "curses.h" | ||
9 | |||
10 | #ifdef __cplusplus | ||
11 | extern "C" { | ||
12 | #endif | ||
13 | |||
14 | #if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \ | ||
15 | defined(PDC_99) || defined(__WATCOMC__) | ||
16 | # ifndef HAVE_VSSCANF | ||
17 | # define HAVE_VSSCANF 1 /* have vsscanf() */ | ||
18 | # endif | ||
19 | #endif | ||
20 | |||
21 | #if defined(PDC_99) || defined(__WATCOMC__) | ||
22 | # ifndef HAVE_SNPRINTF | ||
23 | # define HAVE_SNPRINTF 1 /* have snprintf() */ | ||
24 | # endif | ||
25 | # ifndef HAVE_VSNPRINTF | ||
26 | # define HAVE_VSNPRINTF 1 /* have vsnprintf() */ | ||
27 | # endif | ||
28 | #endif | ||
29 | |||
30 | /*----------------------------------------------------------------------*/ | ||
31 | |||
32 | typedef struct /* structure for ripped off lines */ | ||
33 | { | ||
34 | int line; | ||
35 | int (*init)(WINDOW *, int); | ||
36 | } RIPPEDOFFLINE; | ||
37 | |||
38 | /* Window properties */ | ||
39 | |||
40 | #define _SUBWIN 0x01 /* window is a subwindow */ | ||
41 | #define _PAD 0x10 /* X/Open Pad. */ | ||
42 | #define _SUBPAD 0x20 /* X/Open subpad. */ | ||
43 | |||
44 | /* Miscellaneous */ | ||
45 | |||
46 | #define _NO_CHANGE -1 /* flags line edge unchanged */ | ||
47 | |||
48 | #define _ECHAR 0x08 /* Erase char (^H) */ | ||
49 | #define _DWCHAR 0x17 /* Delete Word char (^W) */ | ||
50 | #define _DLCHAR 0x15 /* Delete Line char (^U) */ | ||
51 | |||
52 | /*----------------------------------------------------------------------*/ | ||
53 | |||
54 | /* Platform implementation functions */ | ||
55 | |||
56 | void PDC_beep(void); | ||
57 | bool PDC_can_change_color(void); | ||
58 | int PDC_color_content(short, short *, short *, short *); | ||
59 | bool PDC_check_key(void); | ||
60 | int PDC_curs_set(int); | ||
61 | void PDC_doupdate(void); | ||
62 | void PDC_flushinp(void); | ||
63 | int PDC_get_columns(void); | ||
64 | int PDC_get_cursor_mode(void); | ||
65 | int PDC_get_key(void); | ||
66 | int PDC_get_rows(void); | ||
67 | void PDC_gotoyx(int, int); | ||
68 | bool PDC_has_mouse(void); | ||
69 | int PDC_init_color(short, short, short, short); | ||
70 | int PDC_modifiers_set(void); | ||
71 | int PDC_mouse_set(void); | ||
72 | void PDC_napms(int); | ||
73 | void PDC_reset_prog_mode(void); | ||
74 | void PDC_reset_shell_mode(void); | ||
75 | int PDC_resize_screen(int, int); | ||
76 | void PDC_restore_screen_mode(int); | ||
77 | void PDC_save_screen_mode(int); | ||
78 | #ifdef XCURSES | ||
79 | void PDC_set_args(int, char **); | ||
80 | #endif | ||
81 | void PDC_scr_close(void); | ||
82 | void PDC_scr_free(void); | ||
83 | int PDC_scr_open(void); | ||
84 | void PDC_set_keyboard_binary(bool); | ||
85 | void PDC_transform_line(int, int, int, const chtype *); | ||
86 | const char *PDC_sysname(void); | ||
87 | |||
88 | /* Internal cross-module functions */ | ||
89 | |||
90 | void PDC_init_atrtab(void); | ||
91 | WINDOW *PDC_makelines(WINDOW *); | ||
92 | WINDOW *PDC_makenew(int, int, int, int); | ||
93 | int PDC_mouse_in_slk(int, int); | ||
94 | void PDC_slk_free(void); | ||
95 | void PDC_slk_initialize(void); | ||
96 | void PDC_sync(WINDOW *); | ||
97 | |||
98 | #ifdef PDC_WIDE | ||
99 | int PDC_mbtowc(wchar_t *, const char *, size_t); | ||
100 | size_t PDC_mbstowcs(wchar_t *, const char *, size_t); | ||
101 | size_t PDC_wcstombs(char *, const wchar_t *, size_t); | ||
102 | #endif | ||
103 | |||
104 | #ifdef PDCDEBUG | ||
105 | # define PDC_LOG(x) if (SP && SP->dbfp) PDC_debug x | ||
106 | #else | ||
107 | # define PDC_LOG(x) | ||
108 | #endif | ||
109 | |||
110 | /* Internal macros for attributes */ | ||
111 | |||
112 | #ifndef max | ||
113 | # define max(a,b) (((a) > (b)) ? (a) : (b)) | ||
114 | #endif | ||
115 | #ifndef min | ||
116 | # define min(a,b) (((a) < (b)) ? (a) : (b)) | ||
117 | #endif | ||
118 | |||
119 | #define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor) | ||
120 | |||
121 | #define PDC_CLICK_PERIOD 150 /* time to wait for a click, if | ||
122 | not set by mouseinterval() */ | ||
123 | #define PDC_COLOR_PAIRS 256 | ||
124 | #define PDC_MAXCOL 768 /* maximum possible COLORS; may be less */ | ||
125 | |||
126 | #define _INBUFSIZ 512 /* size of terminal input buffer */ | ||
127 | #define NUNGETCH 256 /* max # chars to ungetch() */ | ||
128 | |||
129 | #ifdef __cplusplus | ||
130 | } | ||
131 | #endif | ||
132 | |||
133 | #endif /* __CURSES_INTERNALS__ */ | ||