Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9214 | turbocat | 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 |
||
9 | |||
10 | #if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \ |
||
11 | defined(PDC_99) || defined(__WATCOMC__) |
||
12 | # ifndef HAVE_VSSCANF |
||
13 | # define HAVE_VSSCANF /* have vsscanf() */ |
||
14 | # endif |
||
15 | #endif |
||
16 | |||
17 | #if defined(PDC_99) || defined(__WATCOMC__) |
||
18 | # ifndef HAVE_VSNPRINTF |
||
19 | # define HAVE_VSNPRINTF /* have vsnprintf() */ |
||
20 | # endif |
||
21 | #endif |
||
22 | |||
23 | /*----------------------------------------------------------------------*/ |
||
24 | |||
25 | typedef struct /* structure for ripped off lines */ |
||
26 | { |
||
27 | int line; |
||
28 | int (*init)(WINDOW *, int); |
||
29 | } RIPPEDOFFLINE; |
||
30 | |||
31 | /* Window properties */ |
||
32 | |||
33 | #define _SUBWIN 0x01 /* window is a subwindow */ |
||
34 | #define _PAD 0x10 /* X/Open Pad. */ |
||
35 | #define _SUBPAD 0x20 /* X/Open subpad. */ |
||
36 | |||
37 | /* Miscellaneous */ |
||
38 | |||
39 | #define _NO_CHANGE -1 /* flags line edge unchanged */ |
||
40 | |||
41 | #define _ECHAR 0x08 /* Erase char (^H) */ |
||
42 | #define _DWCHAR 0x17 /* Delete Word char (^W) */ |
||
43 | #define _DLCHAR 0x15 /* Delete Line char (^U) */ |
||
44 | |||
45 | /*----------------------------------------------------------------------*/ |
||
46 | |||
47 | /* Platform implementation functions */ |
||
48 | |||
49 | void PDC_beep(void); |
||
50 | bool PDC_can_change_color(void); |
||
51 | int PDC_color_content(short, short *, short *, short *); |
||
52 | bool PDC_check_key(void); |
||
53 | int PDC_curs_set(int); |
||
54 | void PDC_doupdate(void); |
||
55 | void PDC_flushinp(void); |
||
56 | int PDC_get_columns(void); |
||
57 | int PDC_get_cursor_mode(void); |
||
58 | int PDC_get_key(void); |
||
59 | int PDC_get_rows(void); |
||
60 | void PDC_gotoyx(int, int); |
||
61 | bool PDC_has_mouse(void); |
||
62 | int PDC_init_color(short, short, short, short); |
||
63 | int PDC_modifiers_set(void); |
||
64 | int PDC_mouse_set(void); |
||
65 | void PDC_napms(int); |
||
66 | void PDC_reset_prog_mode(void); |
||
67 | void PDC_reset_shell_mode(void); |
||
68 | int PDC_resize_screen(int, int); |
||
69 | void PDC_restore_screen_mode(int); |
||
70 | void PDC_save_screen_mode(int); |
||
71 | #ifdef XCURSES |
||
72 | void PDC_set_args(int, char **); |
||
73 | #endif |
||
74 | void PDC_scr_close(void); |
||
75 | void PDC_scr_free(void); |
||
76 | int PDC_scr_open(void); |
||
77 | void PDC_set_keyboard_binary(bool); |
||
78 | void PDC_transform_line(int, int, int, const chtype *); |
||
79 | const char *PDC_sysname(void); |
||
80 | |||
81 | /* Internal cross-module functions */ |
||
82 | |||
83 | void PDC_init_atrtab(void); |
||
84 | WINDOW *PDC_makelines(WINDOW *); |
||
85 | WINDOW *PDC_makenew(int, int, int, int); |
||
86 | int PDC_mouse_in_slk(int, int); |
||
87 | void PDC_slk_free(void); |
||
88 | void PDC_slk_initialize(void); |
||
89 | void PDC_sync(WINDOW *); |
||
90 | |||
91 | #ifdef PDC_WIDE |
||
92 | int PDC_mbtowc(wchar_t *, const char *, size_t); |
||
93 | size_t PDC_mbstowcs(wchar_t *, const char *, size_t); |
||
94 | size_t PDC_wcstombs(char *, const wchar_t *, size_t); |
||
95 | #endif |
||
96 | |||
97 | #ifdef PDCDEBUG |
||
98 | # define PDC_LOG(x) if (SP && SP->dbfp) PDC_debug x |
||
99 | #else |
||
100 | # define PDC_LOG(x) |
||
101 | #endif |
||
102 | |||
103 | /* Internal macros for attributes */ |
||
104 | |||
105 | #ifndef max |
||
106 | # define max(a,b) (((a) > (b)) ? (a) : (b)) |
||
107 | #endif |
||
108 | #ifndef min |
||
109 | # define min(a,b) (((a) < (b)) ? (a) : (b)) |
||
110 | #endif |
||
111 | |||
112 | #define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor) |
||
113 | |||
114 | #define PDC_CLICK_PERIOD 150 /* time to wait for a click, if |
||
115 | not set by mouseinterval() */ |
||
116 | #define PDC_COLOR_PAIRS 256 |
||
117 | #define PDC_MAXCOL 768 /* maximum possible COLORS; may be less */ |
||
118 | |||
119 | #define _INBUFSIZ 512 /* size of terminal input buffer */ |
||
120 | #define NUNGETCH 256 /* max # chars to ungetch() */ |
||
121 | |||
122 | #endif /* __CURSES_INTERNALS__ */> |