appres.h
4.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/*
* Modifications Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002,
* 2003, 2004, 2005, 2007 by Paul Mattes.
* Copyright 1990 by Jeff Sparkes.
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation.
*
* x3270, c3270, s3270 and tcl3270 are distributed in the hope that they will
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE
* for more details.
*/
/*
* appres.h
* Application resource definitions for x3270, c3270, s3270 and
* tcl3270.
*/
#include "toggle.h"
/* Toggles */
struct toggle {
char value; /* toggle value */
// char changed; /* has the value changed since init */
// Widget w[2]; /* the menu item widgets */
// const char *label[2]; /* labels */
void (*upcall)(H3270 *, struct toggle *, LIB3270_TOGGLE_TYPE); /* change value */
void (*callback)(H3270 *, int, LIB3270_TOGGLE_TYPE);
};
#define toggled(ix) (appres.toggle[ix].value)
#define toggle_toggle(t) \
{ (t)->value = !(t)->value; }
/* Application resources */
typedef struct {
/* Basic colors */
// #if defined(X3270_DISPLAY) /*[*/
// Pixel foreground;
// Pixel background;
// #endif /*]*/
/* Options (not toggles) */
char mono;
char extended;
char m3279;
char modified_sel;
// char once;
//#if defined(X3270_DISPLAY) /*[*/
// char visual_bell;
// char menubar;
// char active_icon;
// char label_icon;
// char invert_kpshift;
// char use_cursor_color;
// char allow_resize;
// char no_other;
// char do_confirms;
// #if !defined(G3270)
// char reconnect;
// #endif
// char visual_select;
// char suppress_host;
// char suppress_font_menu;
//# if defined(X3270_KEYPAD) /*[*/
// char keypad_on;
//# endif /*]*/
//#endif /*]*/
//#if defined(C3270) /*[*/
// char all_bold_on;
// char curses_keypad;
// char cbreak_mode;
//#endif /*]*/
char apl_mode;
// char scripted;
char numeric_lock;
char secure;
char oerr_lock;
char typeahead;
char debug_tracing;
char disconnect_clear;
char highlight_bold;
char color8;
char bsd_tm;
char unlock_delay;
#if defined(X3270_SCRIPT) /*[*/
char socket;
#endif /*]*/
#if defined(C3270) && defined(_WIN32) /*[*/
char highlight_underline;
#endif /*]*/
/* Named resources */
#if defined(X3270_KEYPAD) /*[*/
char *keypad;
#endif /*]*/
#if defined(X3270_DISPLAY) || defined(C3270) /*[*/
// char *key_map;
char *compose_map;
char *printer_lu;
#endif /*]*/
/*
#if defined(X3270_DISPLAY)
char *efontname;
char *fixed_size;
char *debug_font;
char *icon_font;
char *icon_label_font;
int save_lines;
char *normal_name;
char *select_name;
char *bold_name;
char *colorbg_name;
char *keypadbg_name;
char *selbg_name;
char *cursor_color_name;
char *color_scheme;
int bell_volume;
char *char_class;
int modified_sel_color;
int visual_select_color;
#if defined(X3270_DBCS)
char *input_method;
char *preedit_type;
#endif
#endif
*/
#if defined(X3270_DBCS) /*[*/
char *local_encoding;
#endif /*]*/
#if defined(C3270) /*[*/
char *meta_escape;
char *all_bold;
// char *altscreen;
// char *defscreen;
#endif /*]*/
char *conf_dir;
char *model;
char *hostsfile;
char *port;
char *charset;
char *termname;
char *login_macro;
char *macros;
#if defined(X3270_TRACE) /*[*/
#if !defined(_WIN32) /*[*/
char *trace_dir;
#endif /*]*/
char *trace_file;
char *screentrace_file;
char *trace_file_size;
#if defined(X3270_DISPLAY) || defined(WC3270) /*[*/
char trace_monitor;
#endif /*]*/
#endif /*]*/
char *oversize;
#if defined(X3270_FT) /*[*/
char *ft_command;
int dft_buffer_size;
#endif /*]*/
char *connectfile_name;
char *idle_command;
char idle_command_enabled;
char *idle_timeout;
#if defined(X3270_SCRIPT) /*[*/
char *plugin_command;
#endif /*]*/
#if defined(HAVE_LIBSSL) /*[*/
char *cert_file;
#endif /*]*/
char *proxy;
/* Toggles */
struct toggle toggle[N_TOGGLES];
/*
#if defined(X3270_DISPLAY)
// Simple widget resources
Cursor normal_mcursor;
Cursor wait_mcursor;
Cursor locked_mcursor;
#endif
*/
#if defined(X3270_ANSI) /*[*/
/* Line-mode TTY parameters */
char icrnl;
char inlcr;
char onlcr;
char *erase;
char *kill;
char *werase;
char *rprnt;
char *lnext;
char *intr;
char *quit;
char *eof;
#endif /*]*/
#if defined(WC3270) /*[*/
char *hostname;
#endif
#if defined(WC3270) /*[*/
char *title;
#endif /*]*/
#if defined(USE_APP_DEFAULTS) /*[*/
/* App-defaults version */
char *ad_version;
#endif /*]*/
} AppRes, *AppResptr;
LIB3270_INTERNAL AppRes appres;
// FIXME (perry#2#): Check for right implementation
#if defined(LIB3270)
#define _( x ) x
#define N_( x ) x
#define MSG_( c, s ) s
#else
#define _( x ) x
#define N_( x ) x
#define MSG_( c, s ) get_message(c)
#endif