Commit 4ee125ba225bfe3afab219fcee88ee39b76b74a8
1 parent
3de2daaa
Exists in
master
and in
3 other branches
Refactoring action table for use with keyboard preferences dialog.
Showing
13 changed files
with
1226 additions
and
340 deletions
Show diff stats
.gitignore
Makefile.in
... | ... | @@ -33,6 +33,7 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ |
33 | 33 | SOURCES= \ |
34 | 34 | $(wildcard src/core/*.c) \ |
35 | 35 | $(wildcard src/core/keyboard/*.c) \ |
36 | + $(wildcard src/core/actions/*.c) \ | |
36 | 37 | $(wildcard src/core/ft/*.c) \ |
37 | 38 | $(wildcard src/core/@OSNAME@/*.rc) \ |
38 | 39 | $(wildcard src/core/@OSNAME@/*.c) \ |
... | ... | @@ -325,23 +326,6 @@ $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ |
325 | 326 | -c src/core/X3270.xad \ |
326 | 327 | $@ |
327 | 328 | |
328 | -$(BASEDIR)/src/include/lib3270/actions.h: \ | |
329 | - src/include/lib3270/action_table.h \ | |
330 | - $(wildcard src/mkactions/*.c) | |
331 | - | |
332 | - @$(MKDIR) $(dir $@) | |
333 | - @$(MKDIR) $(BINDIR) | |
334 | - @echo $< ... | |
335 | - | |
336 | - @$(HOST_CC) \ | |
337 | - -g \ | |
338 | - -I$(BASEDIR)/src/include \ | |
339 | - -DBUILD_DATE=`date +%Y%m%d` \ | |
340 | - -o $(BINDIR)/mkactions@EXEEXT@ \ | |
341 | - $(wildcard src/mkactions/*.c) | |
342 | - | |
343 | - @$(BINDIR)/mkactions@EXEEXT@ -o $@ | |
344 | - | |
345 | 329 | $(POTDIR)/lib3270.pot: \ |
346 | 330 | $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(LIBNAME)/$(SRC).pot) |
347 | 331 | ... | ... |
lib3270.cbp
... | ... | @@ -41,7 +41,10 @@ |
41 | 41 | <Unit filename="README.md" /> |
42 | 42 | <Unit filename="configure.ac" /> |
43 | 43 | <Unit filename="gitsync.sh" /> |
44 | - <Unit filename="src/core/actions.c"> | |
44 | + <Unit filename="src/core/actions/actions.c"> | |
45 | + <Option compilerVar="CC" /> | |
46 | + </Unit> | |
47 | + <Unit filename="src/core/actions/table.c"> | |
45 | 48 | <Option compilerVar="CC" /> |
46 | 49 | </Unit> |
47 | 50 | <Unit filename="src/core/ansi.c"> |
... | ... | @@ -213,6 +216,7 @@ |
213 | 216 | <Unit filename="src/include/lib3270.h" /> |
214 | 217 | <Unit filename="src/include/lib3270/X11keysym.h" /> |
215 | 218 | <Unit filename="src/include/lib3270/action_table.h" /> |
219 | + <Unit filename="src/include/lib3270/actions.h" /> | |
216 | 220 | <Unit filename="src/include/lib3270/charset.h" /> |
217 | 221 | <Unit filename="src/include/lib3270/filetransfer.h" /> |
218 | 222 | <Unit filename="src/include/lib3270/html.h" /> | ... | ... |
src/core/actions.c
... | ... | @@ -1,96 +0,0 @@ |
1 | -/* | |
2 | - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | |
5 | - * | |
6 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | - * | |
8 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | - * Free Software Foundation. | |
11 | - * | |
12 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | - * obter mais detalhes. | |
16 | - * | |
17 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | - * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | |
19 | - * Place, Suite 330, Boston, MA, 02111-1307, USA | |
20 | - * | |
21 | - * Este programa está nomeado como actions.c e possui - linhas de código. | |
22 | - * | |
23 | - * Contatos: | |
24 | - * | |
25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
26 | - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
27 | - * | |
28 | - */ | |
29 | - | |
30 | -#include <lib3270-internals.h> | |
31 | -#include <lib3270/trace.h> | |
32 | -#include <lib3270/actions.h> | |
33 | - | |
34 | -/*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/ | |
35 | - | |
36 | -/*---[ Statics ]--------------------------------------------------------------------------------------------------------------*/ | |
37 | - | |
38 | -/*---[ Implement ]------------------------------------------------------------------------------------------------------------*/ | |
39 | - | |
40 | -/** | |
41 | - * @brief Get LIB3270 action table; | |
42 | - * | |
43 | - */ | |
44 | - LIB3270_EXPORT const LIB3270_ACTION_ENTRY * lib3270_get_action_table() | |
45 | - { | |
46 | - #undef DECLARE_LIB3270_ACTION | |
47 | - #undef DECLARE_LIB3270_CLEAR_SELECTION_ACTION | |
48 | - #undef DECLARE_LIB3270_KEY_ACTION | |
49 | - #undef DECLARE_LIB3270_CURSOR_ACTION | |
50 | - #undef DECLARE_LIB3270_FKEY_ACTION | |
51 | - | |
52 | - #define DECLARE_LIB3270_ACTION( name, description ) { #name, description, lib3270_ ## name }, | |
53 | - #define DECLARE_LIB3270_CLEAR_SELECTION_ACTION( name, description ) { #name, description, lib3270_ ## name }, | |
54 | - #define DECLARE_LIB3270_KEY_ACTION( name, description ) { #name, description, lib3270_ ## name }, | |
55 | - #define DECLARE_LIB3270_CURSOR_ACTION( name, description ) { #name, description, lib3270_cursor_ ## name }, | |
56 | - #define DECLARE_LIB3270_FKEY_ACTION( name, description ) // name | |
57 | - | |
58 | - static const LIB3270_ACTION_ENTRY actions[] = | |
59 | - { | |
60 | - #include <lib3270/action_table.h> | |
61 | - { NULL, NULL, NULL } | |
62 | - }; | |
63 | - | |
64 | - return actions; | |
65 | - } | |
66 | - | |
67 | - | |
68 | -/** | |
69 | - * @brief Launch an action by name. | |
70 | - * | |
71 | - * @param name Name of the action to launch. | |
72 | - * | |
73 | - * @return 0 if ok, error code if not (sets errno). | |
74 | - * | |
75 | - */ | |
76 | -LIB3270_EXPORT int lib3270_action(H3270 *hSession, const char *name) | |
77 | -{ | |
78 | - const LIB3270_ACTION_ENTRY *actions = lib3270_get_action_table(); | |
79 | - size_t f; | |
80 | - | |
81 | - CHECK_SESSION_HANDLE(hSession); | |
82 | - | |
83 | - for(f=0; actions[f].name; f++) | |
84 | - { | |
85 | - if(!strcasecmp(name,actions[f].name)) | |
86 | - { | |
87 | - lib3270_trace_event(hSession,"Action: %s\n",actions[f].name); | |
88 | - return actions[f].call(hSession); | |
89 | - } | |
90 | - | |
91 | - } | |
92 | - | |
93 | - lib3270_trace_event(hSession,"Unknown action %s\n",name); | |
94 | - return errno = ENOENT; | |
95 | - | |
96 | -} |
... | ... | @@ -0,0 +1,64 @@ |
1 | +/* | |
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | |
5 | + * | |
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | + * | |
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | + * Free Software Foundation. | |
11 | + * | |
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | + * obter mais detalhes. | |
16 | + * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | |
19 | + * Place, Suite 330, Boston, MA, 02111-1307, USA | |
20 | + * | |
21 | + * Este programa está nomeado como actions.c e possui - linhas de código. | |
22 | + * | |
23 | + * Contatos: | |
24 | + * | |
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
27 | + * | |
28 | + */ | |
29 | + | |
30 | +#include <lib3270-internals.h> | |
31 | +#include <lib3270/trace.h> | |
32 | +#include <lib3270/actions.h> | |
33 | + | |
34 | +/*---[ Implement ]------------------------------------------------------------------------------------------------------------*/ | |
35 | + | |
36 | +/** | |
37 | + * @brief Launch an action by name. | |
38 | + * | |
39 | + * @param name Name of the action to launch. | |
40 | + * | |
41 | + * @return 0 if ok, error code if not (sets errno). | |
42 | + * | |
43 | + */ | |
44 | +LIB3270_EXPORT int lib3270_action(H3270 *hSession, const char *name) | |
45 | +{ | |
46 | + const LIB3270_ACTION_ENTRY *actions = lib3270_get_action_table(); | |
47 | + size_t f; | |
48 | + | |
49 | + CHECK_SESSION_HANDLE(hSession); | |
50 | + | |
51 | + for(f=0; actions[f].name; f++) | |
52 | + { | |
53 | + if(!strcasecmp(name,actions[f].name)) | |
54 | + { | |
55 | + lib3270_trace_event(hSession,"Action: %s\n",actions[f].name); | |
56 | + return actions[f].call(hSession); | |
57 | + } | |
58 | + | |
59 | + } | |
60 | + | |
61 | + lib3270_trace_event(hSession,"Unknown action %s\n",name); | |
62 | + return errno = ENOENT; | |
63 | + | |
64 | +} | ... | ... |
... | ... | @@ -0,0 +1,462 @@ |
1 | +/* | |
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | |
5 | + * | |
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | + * | |
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | + * Free Software Foundation. | |
11 | + * | |
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | + * obter mais detalhes. | |
16 | + * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | |
19 | + * Place, Suite 330, Boston, MA, 02111-1307, USA | |
20 | + * | |
21 | + * Este programa está nomeado como actions.c e possui - linhas de código. | |
22 | + * | |
23 | + * Contatos: | |
24 | + * | |
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
27 | + * | |
28 | + */ | |
29 | + | |
30 | +#include <lib3270-internals.h> | |
31 | +#include <lib3270/trace.h> | |
32 | +#include <lib3270/actions.h> | |
33 | +#include <lib3270/toggle.h> | |
34 | + | |
35 | +/*---[ Implement ]------------------------------------------------------------------------------------------------------------*/ | |
36 | + | |
37 | + static int save_all(H3270 *hSession) | |
38 | + { | |
39 | + return lib3270_save_all(hSession,NULL); | |
40 | + } | |
41 | + | |
42 | + static int paste_file(H3270 *hSession) | |
43 | + { | |
44 | + return lib3270_load(hSession,NULL); | |
45 | + } | |
46 | + | |
47 | + static int print(H3270 *hSession) | |
48 | + { | |
49 | + return lib3270_print(hSession); | |
50 | + } | |
51 | + | |
52 | + static int connect_host(H3270 *hSession) | |
53 | + { | |
54 | + return lib3270_reconnect(hSession,0); | |
55 | + } | |
56 | + | |
57 | +/** | |
58 | + * @brief Get LIB3270 action table; | |
59 | + * | |
60 | + */ | |
61 | + LIB3270_EXPORT const LIB3270_ACTION_ENTRY * lib3270_get_action_table() | |
62 | + { | |
63 | + | |
64 | + static const LIB3270_ACTION_ENTRY actions[] = | |
65 | + { | |
66 | + // | |
67 | + // Network actions | |
68 | + // | |
69 | + { | |
70 | + "connect", | |
71 | + NULL, | |
72 | + "connect", | |
73 | + NULL, | |
74 | + N_( "Connect to host." ), | |
75 | + connect_host | |
76 | + }, | |
77 | + | |
78 | + { | |
79 | + "disconnect", | |
80 | + NULL, | |
81 | + "disconnect", | |
82 | + NULL, | |
83 | + N_( "Disconnect from host." ), | |
84 | + lib3270_disconnect | |
85 | + }, | |
86 | + | |
87 | + // | |
88 | + // Navigation actions | |
89 | + // | |
90 | + { | |
91 | + "up", | |
92 | + "Up", | |
93 | + NULL, | |
94 | + NULL, | |
95 | + N_( "Cursor up 1 position." ), | |
96 | + lib3270_cursor_up | |
97 | + }, | |
98 | + | |
99 | + { | |
100 | + "down", | |
101 | + "Down", | |
102 | + NULL, | |
103 | + NULL, | |
104 | + N_( "Cursor down 1 position." ), | |
105 | + lib3270_cursor_down | |
106 | + }, | |
107 | + | |
108 | + { | |
109 | + "left", | |
110 | + "Left", | |
111 | + NULL, | |
112 | + NULL, | |
113 | + N_( "Cursor left 1 position." ), | |
114 | + lib3270_cursor_left | |
115 | + }, | |
116 | + | |
117 | + { | |
118 | + "right", | |
119 | + "Right", | |
120 | + NULL, | |
121 | + NULL, | |
122 | + N_( "Cursor right 1 position." ), | |
123 | + lib3270_cursor_right | |
124 | + }, | |
125 | + | |
126 | + { | |
127 | + "newline", | |
128 | + "Control_R", | |
129 | + NULL, | |
130 | + NULL, | |
131 | + N_( "Cursor to first field on next line or any lines after that." ), | |
132 | + lib3270_newline | |
133 | + }, | |
134 | + | |
135 | + { | |
136 | + "previousword", | |
137 | + NULL, | |
138 | + NULL, | |
139 | + NULL, | |
140 | + N_( "Cursor to previous word." ), | |
141 | + lib3270_previousword | |
142 | + }, | |
143 | + | |
144 | + { | |
145 | + "nextword", | |
146 | + NULL, | |
147 | + NULL, | |
148 | + NULL, | |
149 | + N_( "Cursor to next unprotected word." ), | |
150 | + lib3270_nextword | |
151 | + }, | |
152 | + | |
153 | + // | |
154 | + // Save/load actions | |
155 | + // | |
156 | + { | |
157 | + "saveall", | |
158 | + NULL, | |
159 | + "document-save", | |
160 | + NULL, | |
161 | + N_( "Save screen." ), | |
162 | + save_all | |
163 | + }, | |
164 | + | |
165 | + { | |
166 | + "loadfile", | |
167 | + NULL, | |
168 | + "document-load", | |
169 | + NULL, | |
170 | + N_( "Paste file." ), | |
171 | + paste_file | |
172 | + }, | |
173 | + | |
174 | + // | |
175 | + // Selection actions | |
176 | + // | |
177 | + { | |
178 | + "select_all", | |
179 | + "<ctrl>a", | |
180 | + "edit-select-all", | |
181 | + NULL, | |
182 | + NULL, | |
183 | + lib3270_select_all | |
184 | + }, | |
185 | + | |
186 | + { | |
187 | + "select_field", | |
188 | + "<Ctrl>f", | |
189 | + NULL, | |
190 | + NULL, | |
191 | + N_( "Select Field" ), | |
192 | + lib3270_select_field | |
193 | + }, | |
194 | + | |
195 | + { | |
196 | + "unselect", | |
197 | + NULL, | |
198 | + NULL, | |
199 | + NULL, | |
200 | + N_( "Remove selection" ), | |
201 | + lib3270_unselect | |
202 | + }, | |
203 | + | |
204 | + { | |
205 | + "reselect", | |
206 | + "<Ctrl>r", | |
207 | + NULL, | |
208 | + NULL, | |
209 | + N_( "Reselect"), | |
210 | + lib3270_reselect | |
211 | + }, | |
212 | + | |
213 | + | |
214 | + // | |
215 | + // Field actions. | |
216 | + // | |
217 | + { | |
218 | + "fieldend", | |
219 | + NULL, | |
220 | + NULL, | |
221 | + NULL, | |
222 | + N_( "Move the cursor to the first blank after the last nonblank in the field." ), | |
223 | + lib3270_fieldend | |
224 | + }, | |
225 | + | |
226 | + { | |
227 | + "firstfield", | |
228 | + "Home", | |
229 | + "go-first", | |
230 | + NULL, | |
231 | + N_( "Move to first unprotected field on screen." ), | |
232 | + lib3270_firstfield | |
233 | + }, | |
234 | + | |
235 | + { | |
236 | + "nextfield", | |
237 | + "Tab", | |
238 | + "go-next", | |
239 | + NULL, | |
240 | + N_( "Tab forward to next field." ), | |
241 | + lib3270_nextfield | |
242 | + }, | |
243 | + | |
244 | + { | |
245 | + "previousfield", | |
246 | + "ISO_Left_Tab", | |
247 | + "go-previous", | |
248 | + NULL, | |
249 | + N_( "Tab backward to previous field." ), | |
250 | + lib3270_previousfield | |
251 | + }, | |
252 | + | |
253 | + | |
254 | + // | |
255 | + // Erase actions. | |
256 | + // | |
257 | + { | |
258 | + "deleteword", | |
259 | + "<Ctrl>w", | |
260 | + NULL, | |
261 | + NULL, | |
262 | + N_( "Backspaces the cursor until it hits the front of a word." ), | |
263 | + lib3270_deleteword | |
264 | + }, | |
265 | + | |
266 | + { | |
267 | + "deletefield", | |
268 | + "<Ctrl>u", | |
269 | + NULL, | |
270 | + NULL, | |
271 | + N_( "Delete field" ), | |
272 | + lib3270_deletefield | |
273 | + }, | |
274 | + | |
275 | + | |
276 | + { | |
277 | + "eraseinput", | |
278 | + NULL, | |
279 | + NULL, | |
280 | + NULL, | |
281 | + NULL, | |
282 | + lib3270_eraseinput | |
283 | + }, | |
284 | + | |
285 | + { | |
286 | + "eraseeof", | |
287 | + "End", | |
288 | + NULL, | |
289 | + NULL, | |
290 | + N_( "Erase End Of Field Key." ), | |
291 | + lib3270_eraseeof | |
292 | + }, | |
293 | + | |
294 | + { | |
295 | + "eraseeol", | |
296 | + NULL, | |
297 | + NULL, | |
298 | + NULL, | |
299 | + N_( "Erase End Of Line Key." ), | |
300 | + lib3270_eraseeol | |
301 | + }, | |
302 | + | |
303 | + { | |
304 | + "erase", | |
305 | + "BackSpace", | |
306 | + NULL, | |
307 | + NULL, | |
308 | + NULL, | |
309 | + lib3270_erase | |
310 | + }, | |
311 | + | |
312 | + // | |
313 | + // Keyboard actions | |
314 | + // | |
315 | + { | |
316 | + "enter", | |
317 | + NULL, | |
318 | + NULL, | |
319 | + NULL, | |
320 | + N_( "Send an \"Enter\" action." ), | |
321 | + lib3270_enter | |
322 | + }, | |
323 | + | |
324 | + | |
325 | + { | |
326 | + "kybdreset", | |
327 | + "Escape", | |
328 | + NULL, | |
329 | + NULL, | |
330 | + NULL, | |
331 | + lib3270_kybdreset | |
332 | + }, | |
333 | + | |
334 | + { | |
335 | + "clear", | |
336 | + NULL, | |
337 | + NULL, | |
338 | + NULL, | |
339 | + N_( "Clear AID key" ), | |
340 | + lib3270_clear | |
341 | + }, | |
342 | + | |
343 | + | |
344 | + { | |
345 | + "delete", | |
346 | + "Delete", | |
347 | + NULL, | |
348 | + NULL, | |
349 | + NULL, | |
350 | + lib3270_delete | |
351 | + }, | |
352 | + | |
353 | + { | |
354 | + "dup", | |
355 | + "<Shift>KP_Multiply", | |
356 | + NULL, | |
357 | + NULL, | |
358 | + N_( "DUP key" ), | |
359 | + lib3270_dup | |
360 | + }, | |
361 | + | |
362 | + { | |
363 | + "fieldmark", | |
364 | + NULL, | |
365 | + NULL, | |
366 | + NULL, | |
367 | + N_( "FM key" ), | |
368 | + lib3270_fieldmark | |
369 | + }, | |
370 | + | |
371 | + { | |
372 | + "backspace", | |
373 | + NULL, | |
374 | + NULL, | |
375 | + NULL, | |
376 | + N_( "3270-style backspace." ), | |
377 | + lib3270_backspace | |
378 | + }, | |
379 | + | |
380 | + { | |
381 | + "attn", | |
382 | + "<shift>Escape", | |
383 | + NULL, | |
384 | + NULL, | |
385 | + "ATTN key, per RFC 2355. Sends IP, regardless.", | |
386 | + lib3270_attn | |
387 | + }, | |
388 | + | |
389 | + { | |
390 | + "break", | |
391 | + NULL, | |
392 | + NULL, | |
393 | + NULL, | |
394 | + NULL, | |
395 | + lib3270_break | |
396 | + }, | |
397 | + | |
398 | + { | |
399 | + "pastenext", | |
400 | + "<shift><ctrl>v", | |
401 | + NULL, | |
402 | + NULL, | |
403 | + NULL, | |
404 | + lib3270_paste_next | |
405 | + }, | |
406 | + | |
407 | + { | |
408 | + "sysreq", | |
409 | + "<shift>Print", | |
410 | + NULL, | |
411 | + NULL, | |
412 | + NULL, | |
413 | + lib3270_sysreq | |
414 | + }, | |
415 | + | |
416 | + // | |
417 | + // Misc actions | |
418 | + // | |
419 | + { | |
420 | + "print", | |
421 | + "Print", | |
422 | + "document-print", | |
423 | + NULL, | |
424 | + NULL, | |
425 | ||
426 | + }, | |
427 | + | |
428 | + // | |
429 | + // Test actions | |
430 | + // | |
431 | + | |
432 | + { | |
433 | + "testpattern", | |
434 | + NULL, | |
435 | + NULL, | |
436 | + NULL, | |
437 | + NULL, | |
438 | + lib3270_testpattern | |
439 | + }, | |
440 | + | |
441 | + { | |
442 | + "charsettable", | |
443 | + NULL, | |
444 | + NULL, | |
445 | + NULL, | |
446 | + NULL, | |
447 | + lib3270_charsettable | |
448 | + }, | |
449 | + | |
450 | + { | |
451 | + NULL, | |
452 | + NULL, | |
453 | + NULL, | |
454 | + NULL, | |
455 | + NULL, | |
456 | + NULL | |
457 | + } | |
458 | + }; | |
459 | + | |
460 | + return actions; | |
461 | + } | |
462 | + | ... | ... |
src/core/charset.c
src/core/paste.c
... | ... | @@ -318,7 +318,7 @@ LIB3270_EXPORT int lib3270_set_string(H3270 *hSession, const unsigned char *str, |
318 | 318 | return rc; |
319 | 319 | } |
320 | 320 | |
321 | -LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str) | |
321 | +LIB3270_EXPORT int lib3270_paste_text(H3270 *h, const unsigned char *str) | |
322 | 322 | { |
323 | 323 | int sz; |
324 | 324 | CHECK_SESSION_HANDLE(h); |
... | ... | @@ -356,7 +356,7 @@ LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str) |
356 | 356 | return 0; |
357 | 357 | } |
358 | 358 | |
359 | -LIB3270_EXPORT int lib3270_pastenext(H3270 *hSession) | |
359 | +LIB3270_EXPORT int lib3270_paste_next(H3270 *hSession) | |
360 | 360 | { |
361 | 361 | char * ptr; |
362 | 362 | int rc; |
... | ... | @@ -372,7 +372,7 @@ LIB3270_EXPORT int lib3270_pastenext(H3270 *hSession) |
372 | 372 | ptr = hSession->paste_buffer; |
373 | 373 | hSession->paste_buffer = NULL; |
374 | 374 | |
375 | - rc = lib3270_paste(hSession,(unsigned char *) ptr); | |
375 | + rc = lib3270_paste_text(hSession,(unsigned char *) ptr); | |
376 | 376 | |
377 | 377 | lib3270_free(ptr); |
378 | 378 | return rc; | ... | ... |
... | ... | @@ -0,0 +1,217 @@ |
1 | +/* | |
2 | + * Copyright 1999 by Paul Mattes. | |
3 | + * Permission to use, copy, modify, and distribute this software and its | |
4 | + * documentation for any purpose and without fee is hereby granted, | |
5 | + * provided that the above copyright notice appear in all copies and that | |
6 | + * both that copyright notice and this permission notice appear in | |
7 | + * supporting documentation. | |
8 | + * | |
9 | + * c3270, s3270 and tcl3270 are distributed in the hope that they will | |
10 | + * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE | |
12 | + * for more details. | |
13 | + */ | |
14 | + | |
15 | +/* X11 keysyms used by c3270, s3270 and tcl3270 */ | |
16 | + | |
17 | +#if !defined(_x11_keysym_h) /*[*/ | |
18 | +#define _x11_keysym_h 1 | |
19 | + | |
20 | +/* Latin-1 Keysyms */ | |
21 | +#define XK_space 0x020 | |
22 | +#define XK_exclam 0x021 | |
23 | +#define XK_quotedbl 0x022 | |
24 | +#define XK_numbersign 0x023 | |
25 | +#define XK_dollar 0x024 | |
26 | +#define XK_percent 0x025 | |
27 | +#define XK_ampersand 0x026 | |
28 | +#define XK_apostrophe 0x027 | |
29 | +#define XK_quoteright 0x027 | |
30 | +#define XK_parenleft 0x028 | |
31 | +#define XK_parenright 0x029 | |
32 | +#define XK_asterisk 0x02a | |
33 | +#define XK_plus 0x02b | |
34 | +#define XK_comma 0x02c | |
35 | +#define XK_minus 0x02d | |
36 | +#define XK_period 0x02e | |
37 | +#define XK_slash 0x02f | |
38 | +#define XK_0 0x030 | |
39 | +#define XK_1 0x031 | |
40 | +#define XK_2 0x032 | |
41 | +#define XK_3 0x033 | |
42 | +#define XK_4 0x034 | |
43 | +#define XK_5 0x035 | |
44 | +#define XK_6 0x036 | |
45 | +#define XK_7 0x037 | |
46 | +#define XK_8 0x038 | |
47 | +#define XK_9 0x039 | |
48 | +#define XK_colon 0x03a | |
49 | +#define XK_semicolon 0x03b | |
50 | +#define XK_less 0x03c | |
51 | +#define XK_equal 0x03d | |
52 | +#define XK_greater 0x03e | |
53 | +#define XK_question 0x03f | |
54 | +#define XK_at 0x040 | |
55 | +#define XK_A 0x041 | |
56 | +#define XK_B 0x042 | |
57 | +#define XK_C 0x043 | |
58 | +#define XK_D 0x044 | |
59 | +#define XK_E 0x045 | |
60 | +#define XK_F 0x046 | |
61 | +#define XK_G 0x047 | |
62 | +#define XK_H 0x048 | |
63 | +#define XK_I 0x049 | |
64 | +#define XK_J 0x04a | |
65 | +#define XK_K 0x04b | |
66 | +#define XK_L 0x04c | |
67 | +#define XK_M 0x04d | |
68 | +#define XK_N 0x04e | |
69 | +#define XK_O 0x04f | |
70 | +#define XK_P 0x050 | |
71 | +#define XK_Q 0x051 | |
72 | +#define XK_R 0x052 | |
73 | +#define XK_S 0x053 | |
74 | +#define XK_T 0x054 | |
75 | +#define XK_U 0x055 | |
76 | +#define XK_V 0x056 | |
77 | +#define XK_W 0x057 | |
78 | +#define XK_X 0x058 | |
79 | +#define XK_Y 0x059 | |
80 | +#define XK_Z 0x05a | |
81 | +#define XK_bracketleft 0x05b | |
82 | +#define XK_backslash 0x05c | |
83 | +#define XK_bracketright 0x05d | |
84 | +#define XK_asciicircum 0x05e | |
85 | +#define XK_underscore 0x05f | |
86 | +#define XK_grave 0x060 | |
87 | +#define XK_quoteleft 0x060 | |
88 | +#define XK_a 0x061 | |
89 | +#define XK_b 0x062 | |
90 | +#define XK_c 0x063 | |
91 | +#define XK_d 0x064 | |
92 | +#define XK_e 0x065 | |
93 | +#define XK_f 0x066 | |
94 | +#define XK_g 0x067 | |
95 | +#define XK_h 0x068 | |
96 | +#define XK_i 0x069 | |
97 | +#define XK_j 0x06a | |
98 | +#define XK_k 0x06b | |
99 | +#define XK_l 0x06c | |
100 | +#define XK_m 0x06d | |
101 | +#define XK_n 0x06e | |
102 | +#define XK_o 0x06f | |
103 | +#define XK_p 0x070 | |
104 | +#define XK_q 0x071 | |
105 | +#define XK_r 0x072 | |
106 | +#define XK_s 0x073 | |
107 | +#define XK_t 0x074 | |
108 | +#define XK_u 0x075 | |
109 | +#define XK_v 0x076 | |
110 | +#define XK_w 0x077 | |
111 | +#define XK_x 0x078 | |
112 | +#define XK_y 0x079 | |
113 | +#define XK_z 0x07a | |
114 | +#define XK_braceleft 0x07b | |
115 | +#define XK_bar 0x07c | |
116 | +#define XK_braceright 0x07d | |
117 | +#define XK_asciitilde 0x07e | |
118 | +#define XK_nobreakspace 0x0a0 | |
119 | +#define XK_exclamdown 0x0a1 | |
120 | +#define XK_cent 0x0a2 | |
121 | +#define XK_sterling 0x0a3 | |
122 | +#define XK_currency 0x0a4 | |
123 | +#define XK_yen 0x0a5 | |
124 | +#define XK_brokenbar 0x0a6 | |
125 | +#define XK_section 0x0a7 | |
126 | +#define XK_diaeresis 0x0a8 | |
127 | +#define XK_copyright 0x0a9 | |
128 | +#define XK_ordfeminine 0x0aa | |
129 | +#define XK_guillemotleft 0x0ab | |
130 | +#define XK_notsign 0x0ac | |
131 | +#define XK_hyphen 0x0ad | |
132 | +#define XK_registered 0x0ae | |
133 | +#define XK_macron 0x0af | |
134 | +#define XK_degree 0x0b0 | |
135 | +#define XK_plusminus 0x0b1 | |
136 | +#define XK_twosuperior 0x0b2 | |
137 | +#define XK_threesuperior 0x0b3 | |
138 | +#define XK_acute 0x0b4 | |
139 | +#define XK_mu 0x0b5 | |
140 | +#define XK_paragraph 0x0b6 | |
141 | +#define XK_periodcentered 0x0b7 | |
142 | +#define XK_cedilla 0x0b8 | |
143 | +#define XK_onesuperior 0x0b9 | |
144 | +#define XK_masculine 0x0ba | |
145 | +#define XK_guillemotright 0x0bb | |
146 | +#define XK_onequarter 0x0bc | |
147 | +#define XK_onehalf 0x0bd | |
148 | +#define XK_threequarters 0x0be | |
149 | +#define XK_questiondown 0x0bf | |
150 | +#define XK_Agrave 0x0c0 | |
151 | +#define XK_Aacute 0x0c1 | |
152 | +#define XK_Acircumflex 0x0c2 | |
153 | +#define XK_Atilde 0x0c3 | |
154 | +#define XK_Adiaeresis 0x0c4 | |
155 | +#define XK_Aring 0x0c5 | |
156 | +#define XK_AE 0x0c6 | |
157 | +#define XK_Ccedilla 0x0c7 | |
158 | +#define XK_Egrave 0x0c8 | |
159 | +#define XK_Eacute 0x0c9 | |
160 | +#define XK_Ecircumflex 0x0ca | |
161 | +#define XK_Ediaeresis 0x0cb | |
162 | +#define XK_Igrave 0x0cc | |
163 | +#define XK_Iacute 0x0cd | |
164 | +#define XK_Icircumflex 0x0ce | |
165 | +#define XK_Idiaeresis 0x0cf | |
166 | +#define XK_ETH 0x0d0 | |
167 | +#define XK_Eth 0x0d0 | |
168 | +#define XK_Ntilde 0x0d1 | |
169 | +#define XK_Ograve 0x0d2 | |
170 | +#define XK_Oacute 0x0d3 | |
171 | +#define XK_Ocircumflex 0x0d4 | |
172 | +#define XK_Otilde 0x0d5 | |
173 | +#define XK_Odiaeresis 0x0d6 | |
174 | +#define XK_multiply 0x0d7 | |
175 | +#define XK_Ooblique 0x0d8 | |
176 | +#define XK_Ugrave 0x0d9 | |
177 | +#define XK_Uacute 0x0da | |
178 | +#define XK_Ucircumflex 0x0db | |
179 | +#define XK_Udiaeresis 0x0dc | |
180 | +#define XK_Yacute 0x0dd | |
181 | +#define XK_THORN 0x0de | |
182 | +#define XK_Thorn 0x0de | |
183 | +#define XK_ssharp 0x0df | |
184 | +#define XK_agrave 0x0e0 | |
185 | +#define XK_aacute 0x0e1 | |
186 | +#define XK_acircumflex 0x0e2 | |
187 | +#define XK_atilde 0x0e3 | |
188 | +#define XK_adiaeresis 0x0e4 | |
189 | +#define XK_aring 0x0e5 | |
190 | +#define XK_ae 0x0e6 | |
191 | +#define XK_ccedilla 0x0e7 | |
192 | +#define XK_egrave 0x0e8 | |
193 | +#define XK_eacute 0x0e9 | |
194 | +#define XK_ecircumflex 0x0ea | |
195 | +#define XK_ediaeresis 0x0eb | |
196 | +#define XK_igrave 0x0ec | |
197 | +#define XK_iacute 0x0ed | |
198 | +#define XK_icircumflex 0x0ee | |
199 | +#define XK_idiaeresis 0x0ef | |
200 | +#define XK_eth 0x0f0 | |
201 | +#define XK_ntilde 0x0f1 | |
202 | +#define XK_ograve 0x0f2 | |
203 | +#define XK_oacute 0x0f3 | |
204 | +#define XK_ocircumflex 0x0f4 | |
205 | +#define XK_otilde 0x0f5 | |
206 | +#define XK_odiaeresis 0x0f6 | |
207 | +#define XK_division 0x0f7 | |
208 | +#define XK_oslash 0x0f8 | |
209 | +#define XK_ugrave 0x0f9 | |
210 | +#define XK_uacute 0x0fa | |
211 | +#define XK_ucircumflex 0x0fb | |
212 | +#define XK_udiaeresis 0x0fc | |
213 | +#define XK_yacute 0x0fd | |
214 | +#define XK_thorn 0x0fe | |
215 | +#define XK_ydiaeresis 0x0ff | |
216 | + | |
217 | +#endif /*]*/ | ... | ... |
src/include/lib3270/X11keysym.h
... | ... | @@ -1,217 +0,0 @@ |
1 | -/* | |
2 | - * Copyright 1999 by Paul Mattes. | |
3 | - * Permission to use, copy, modify, and distribute this software and its | |
4 | - * documentation for any purpose and without fee is hereby granted, | |
5 | - * provided that the above copyright notice appear in all copies and that | |
6 | - * both that copyright notice and this permission notice appear in | |
7 | - * supporting documentation. | |
8 | - * | |
9 | - * c3270, s3270 and tcl3270 are distributed in the hope that they will | |
10 | - * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE | |
12 | - * for more details. | |
13 | - */ | |
14 | - | |
15 | -/* X11 keysyms used by c3270, s3270 and tcl3270 */ | |
16 | - | |
17 | -#if !defined(_x11_keysym_h) /*[*/ | |
18 | -#define _x11_keysym_h 1 | |
19 | - | |
20 | -/* Latin-1 Keysyms */ | |
21 | -#define XK_space 0x020 | |
22 | -#define XK_exclam 0x021 | |
23 | -#define XK_quotedbl 0x022 | |
24 | -#define XK_numbersign 0x023 | |
25 | -#define XK_dollar 0x024 | |
26 | -#define XK_percent 0x025 | |
27 | -#define XK_ampersand 0x026 | |
28 | -#define XK_apostrophe 0x027 | |
29 | -#define XK_quoteright 0x027 | |
30 | -#define XK_parenleft 0x028 | |
31 | -#define XK_parenright 0x029 | |
32 | -#define XK_asterisk 0x02a | |
33 | -#define XK_plus 0x02b | |
34 | -#define XK_comma 0x02c | |
35 | -#define XK_minus 0x02d | |
36 | -#define XK_period 0x02e | |
37 | -#define XK_slash 0x02f | |
38 | -#define XK_0 0x030 | |
39 | -#define XK_1 0x031 | |
40 | -#define XK_2 0x032 | |
41 | -#define XK_3 0x033 | |
42 | -#define XK_4 0x034 | |
43 | -#define XK_5 0x035 | |
44 | -#define XK_6 0x036 | |
45 | -#define XK_7 0x037 | |
46 | -#define XK_8 0x038 | |
47 | -#define XK_9 0x039 | |
48 | -#define XK_colon 0x03a | |
49 | -#define XK_semicolon 0x03b | |
50 | -#define XK_less 0x03c | |
51 | -#define XK_equal 0x03d | |
52 | -#define XK_greater 0x03e | |
53 | -#define XK_question 0x03f | |
54 | -#define XK_at 0x040 | |
55 | -#define XK_A 0x041 | |
56 | -#define XK_B 0x042 | |
57 | -#define XK_C 0x043 | |
58 | -#define XK_D 0x044 | |
59 | -#define XK_E 0x045 | |
60 | -#define XK_F 0x046 | |
61 | -#define XK_G 0x047 | |
62 | -#define XK_H 0x048 | |
63 | -#define XK_I 0x049 | |
64 | -#define XK_J 0x04a | |
65 | -#define XK_K 0x04b | |
66 | -#define XK_L 0x04c | |
67 | -#define XK_M 0x04d | |
68 | -#define XK_N 0x04e | |
69 | -#define XK_O 0x04f | |
70 | -#define XK_P 0x050 | |
71 | -#define XK_Q 0x051 | |
72 | -#define XK_R 0x052 | |
73 | -#define XK_S 0x053 | |
74 | -#define XK_T 0x054 | |
75 | -#define XK_U 0x055 | |
76 | -#define XK_V 0x056 | |
77 | -#define XK_W 0x057 | |
78 | -#define XK_X 0x058 | |
79 | -#define XK_Y 0x059 | |
80 | -#define XK_Z 0x05a | |
81 | -#define XK_bracketleft 0x05b | |
82 | -#define XK_backslash 0x05c | |
83 | -#define XK_bracketright 0x05d | |
84 | -#define XK_asciicircum 0x05e | |
85 | -#define XK_underscore 0x05f | |
86 | -#define XK_grave 0x060 | |
87 | -#define XK_quoteleft 0x060 | |
88 | -#define XK_a 0x061 | |
89 | -#define XK_b 0x062 | |
90 | -#define XK_c 0x063 | |
91 | -#define XK_d 0x064 | |
92 | -#define XK_e 0x065 | |
93 | -#define XK_f 0x066 | |
94 | -#define XK_g 0x067 | |
95 | -#define XK_h 0x068 | |
96 | -#define XK_i 0x069 | |
97 | -#define XK_j 0x06a | |
98 | -#define XK_k 0x06b | |
99 | -#define XK_l 0x06c | |
100 | -#define XK_m 0x06d | |
101 | -#define XK_n 0x06e | |
102 | -#define XK_o 0x06f | |
103 | -#define XK_p 0x070 | |
104 | -#define XK_q 0x071 | |
105 | -#define XK_r 0x072 | |
106 | -#define XK_s 0x073 | |
107 | -#define XK_t 0x074 | |
108 | -#define XK_u 0x075 | |
109 | -#define XK_v 0x076 | |
110 | -#define XK_w 0x077 | |
111 | -#define XK_x 0x078 | |
112 | -#define XK_y 0x079 | |
113 | -#define XK_z 0x07a | |
114 | -#define XK_braceleft 0x07b | |
115 | -#define XK_bar 0x07c | |
116 | -#define XK_braceright 0x07d | |
117 | -#define XK_asciitilde 0x07e | |
118 | -#define XK_nobreakspace 0x0a0 | |
119 | -#define XK_exclamdown 0x0a1 | |
120 | -#define XK_cent 0x0a2 | |
121 | -#define XK_sterling 0x0a3 | |
122 | -#define XK_currency 0x0a4 | |
123 | -#define XK_yen 0x0a5 | |
124 | -#define XK_brokenbar 0x0a6 | |
125 | -#define XK_section 0x0a7 | |
126 | -#define XK_diaeresis 0x0a8 | |
127 | -#define XK_copyright 0x0a9 | |
128 | -#define XK_ordfeminine 0x0aa | |
129 | -#define XK_guillemotleft 0x0ab | |
130 | -#define XK_notsign 0x0ac | |
131 | -#define XK_hyphen 0x0ad | |
132 | -#define XK_registered 0x0ae | |
133 | -#define XK_macron 0x0af | |
134 | -#define XK_degree 0x0b0 | |
135 | -#define XK_plusminus 0x0b1 | |
136 | -#define XK_twosuperior 0x0b2 | |
137 | -#define XK_threesuperior 0x0b3 | |
138 | -#define XK_acute 0x0b4 | |
139 | -#define XK_mu 0x0b5 | |
140 | -#define XK_paragraph 0x0b6 | |
141 | -#define XK_periodcentered 0x0b7 | |
142 | -#define XK_cedilla 0x0b8 | |
143 | -#define XK_onesuperior 0x0b9 | |
144 | -#define XK_masculine 0x0ba | |
145 | -#define XK_guillemotright 0x0bb | |
146 | -#define XK_onequarter 0x0bc | |
147 | -#define XK_onehalf 0x0bd | |
148 | -#define XK_threequarters 0x0be | |
149 | -#define XK_questiondown 0x0bf | |
150 | -#define XK_Agrave 0x0c0 | |
151 | -#define XK_Aacute 0x0c1 | |
152 | -#define XK_Acircumflex 0x0c2 | |
153 | -#define XK_Atilde 0x0c3 | |
154 | -#define XK_Adiaeresis 0x0c4 | |
155 | -#define XK_Aring 0x0c5 | |
156 | -#define XK_AE 0x0c6 | |
157 | -#define XK_Ccedilla 0x0c7 | |
158 | -#define XK_Egrave 0x0c8 | |
159 | -#define XK_Eacute 0x0c9 | |
160 | -#define XK_Ecircumflex 0x0ca | |
161 | -#define XK_Ediaeresis 0x0cb | |
162 | -#define XK_Igrave 0x0cc | |
163 | -#define XK_Iacute 0x0cd | |
164 | -#define XK_Icircumflex 0x0ce | |
165 | -#define XK_Idiaeresis 0x0cf | |
166 | -#define XK_ETH 0x0d0 | |
167 | -#define XK_Eth 0x0d0 | |
168 | -#define XK_Ntilde 0x0d1 | |
169 | -#define XK_Ograve 0x0d2 | |
170 | -#define XK_Oacute 0x0d3 | |
171 | -#define XK_Ocircumflex 0x0d4 | |
172 | -#define XK_Otilde 0x0d5 | |
173 | -#define XK_Odiaeresis 0x0d6 | |
174 | -#define XK_multiply 0x0d7 | |
175 | -#define XK_Ooblique 0x0d8 | |
176 | -#define XK_Ugrave 0x0d9 | |
177 | -#define XK_Uacute 0x0da | |
178 | -#define XK_Ucircumflex 0x0db | |
179 | -#define XK_Udiaeresis 0x0dc | |
180 | -#define XK_Yacute 0x0dd | |
181 | -#define XK_THORN 0x0de | |
182 | -#define XK_Thorn 0x0de | |
183 | -#define XK_ssharp 0x0df | |
184 | -#define XK_agrave 0x0e0 | |
185 | -#define XK_aacute 0x0e1 | |
186 | -#define XK_acircumflex 0x0e2 | |
187 | -#define XK_atilde 0x0e3 | |
188 | -#define XK_adiaeresis 0x0e4 | |
189 | -#define XK_aring 0x0e5 | |
190 | -#define XK_ae 0x0e6 | |
191 | -#define XK_ccedilla 0x0e7 | |
192 | -#define XK_egrave 0x0e8 | |
193 | -#define XK_eacute 0x0e9 | |
194 | -#define XK_ecircumflex 0x0ea | |
195 | -#define XK_ediaeresis 0x0eb | |
196 | -#define XK_igrave 0x0ec | |
197 | -#define XK_iacute 0x0ed | |
198 | -#define XK_icircumflex 0x0ee | |
199 | -#define XK_idiaeresis 0x0ef | |
200 | -#define XK_eth 0x0f0 | |
201 | -#define XK_ntilde 0x0f1 | |
202 | -#define XK_ograve 0x0f2 | |
203 | -#define XK_oacute 0x0f3 | |
204 | -#define XK_ocircumflex 0x0f4 | |
205 | -#define XK_otilde 0x0f5 | |
206 | -#define XK_odiaeresis 0x0f6 | |
207 | -#define XK_division 0x0f7 | |
208 | -#define XK_oslash 0x0f8 | |
209 | -#define XK_ugrave 0x0f9 | |
210 | -#define XK_uacute 0x0fa | |
211 | -#define XK_ucircumflex 0x0fb | |
212 | -#define XK_udiaeresis 0x0fc | |
213 | -#define XK_yacute 0x0fd | |
214 | -#define XK_thorn 0x0fe | |
215 | -#define XK_ydiaeresis 0x0ff | |
216 | - | |
217 | -#endif /*]*/ |
src/include/lib3270/action_table.h
... | ... | @@ -0,0 +1,467 @@ |
1 | +/* | |
2 | + * Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | |
5 | + * | |
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | + * | |
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | + * Free Software Foundation. | |
11 | + * | |
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | + * obter mais detalhes. | |
16 | + * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | + * | |
21 | + * Contatos: | |
22 | + * | |
23 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
24 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
25 | + * | |
26 | + */ | |
27 | + | |
28 | +#ifndef LIB3270_ACTIONS_H_INCLUDED | |
29 | + | |
30 | + #define LIB3270_ACTIONS_H_INCLUDED 1 | |
31 | + | |
32 | +#ifdef __cplusplus | |
33 | + extern "C" { | |
34 | +#endif | |
35 | + | |
36 | + typedef struct _lib3270_action_entry | |
37 | + { | |
38 | + const char *name; ///< @brief Action name. | |
39 | + const char *key; ///< @brief Default key (or NULL if no default). | |
40 | + const char *icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) | |
41 | + const char *label; ///< @brief Label (or NULL). | |
42 | + const char *tooltip; ///< @brief Description (or NULL). | |
43 | + int (*call)(H3270 *hSession); ///< @brief lib3270 associated method. | |
44 | + } LIB3270_ACTION_ENTRY; | |
45 | + | |
46 | +/** | |
47 | + * | |
48 | + * @brief Send an "Enter" action. | |
49 | + * | |
50 | + * @param hSession TN3270 Session handle. | |
51 | + * | |
52 | + * @return 0 if Ok, non zero if not (sets errno) | |
53 | + * | |
54 | + */ | |
55 | + LIB3270_EXPORT int lib3270_enter(H3270 *hSession); | |
56 | + | |
57 | +/** | |
58 | + * | |
59 | + * @brief | |
60 | + * | |
61 | + * @param hSession TN3270 Session handle. | |
62 | + * @param keycode Number of the pfkey to activate. | |
63 | + * | |
64 | + * @return 0 if Ok, non zero if not (sets errno) | |
65 | + * | |
66 | + */ | |
67 | + LIB3270_EXPORT int lib3270_pfkey(H3270 *hSession, int keycode); | |
68 | + | |
69 | +/** | |
70 | + * | |
71 | + * @brief | |
72 | + * | |
73 | + * @param hSession TN3270 Session handle. | |
74 | + * @param keycode Number of the pakey to activate. | |
75 | + * | |
76 | + * @return 0 if Ok, non zero if not (sets errno) | |
77 | + * | |
78 | + */ | |
79 | + LIB3270_EXPORT int lib3270_pakey(H3270 *hSession, int keycode); | |
80 | + | |
81 | +/** | |
82 | + * | |
83 | + * @brief Cursor up 1 position. | |
84 | + * | |
85 | + * @param hSession TN3270 Session handle. | |
86 | + * | |
87 | + * @return 0 if Ok, non zero if not (sets errno) | |
88 | + * | |
89 | + */ | |
90 | + LIB3270_EXPORT int lib3270_cursor_up(H3270 *hSession); | |
91 | + | |
92 | +/** | |
93 | + * | |
94 | + * @brief Cursor down 1 position. | |
95 | + * | |
96 | + * @param hSession TN3270 Session handle. | |
97 | + * | |
98 | + * @return 0 if Ok, non zero if not (sets errno) | |
99 | + * | |
100 | + */ | |
101 | + LIB3270_EXPORT int lib3270_cursor_down(H3270 *hSession); | |
102 | + | |
103 | +/** | |
104 | + * | |
105 | + * @brief Cursor left 1 position. | |
106 | + * | |
107 | + * @param hSession TN3270 Session handle. | |
108 | + * | |
109 | + * @return 0 if Ok, non zero if not (sets errno) | |
110 | + * | |
111 | + */ | |
112 | + LIB3270_EXPORT int lib3270_cursor_left(H3270 *hSession); | |
113 | + | |
114 | +/** | |
115 | + * | |
116 | + * @brief Cursor right 1 position. | |
117 | + * | |
118 | + * @param hSession TN3270 Session handle. | |
119 | + * | |
120 | + * @return 0 if Ok, non zero if not (sets errno) | |
121 | + * | |
122 | + */ | |
123 | + LIB3270_EXPORT int lib3270_cursor_right(H3270 *hSession); | |
124 | + | |
125 | +/** | |
126 | + * | |
127 | + * @brief Cursor to first field on next line or any lines after that. | |
128 | + * | |
129 | + * @param hSession TN3270 Session handle. | |
130 | + * | |
131 | + * @return 0 if Ok, non zero if not (sets errno) | |
132 | + * | |
133 | + */ | |
134 | + LIB3270_EXPORT int lib3270_newline(H3270 *hSession); | |
135 | + | |
136 | +/** | |
137 | + * | |
138 | + * @brief | |
139 | + * | |
140 | + * @param hSession TN3270 Session handle. | |
141 | + * | |
142 | + * @return 0 if Ok, non zero if not (sets errno) | |
143 | + * | |
144 | + */ | |
145 | + LIB3270_EXPORT int lib3270_kybdreset(H3270 *hSession); | |
146 | + | |
147 | +/** | |
148 | + * | |
149 | + * @brief Clear AID key | |
150 | + * | |
151 | + * @param hSession TN3270 Session handle. | |
152 | + * | |
153 | + * @return 0 if Ok, non zero if not (sets errno) | |
154 | + * | |
155 | + */ | |
156 | + LIB3270_EXPORT int lib3270_clear(H3270 *hSession); | |
157 | + | |
158 | +/** | |
159 | + * | |
160 | + * @brief | |
161 | + * | |
162 | + * @param hSession TN3270 Session handle. | |
163 | + * | |
164 | + * @return 0 if Ok, non zero if not (sets errno) | |
165 | + * | |
166 | + */ | |
167 | + LIB3270_EXPORT int lib3270_eraseinput(H3270 *hSession); | |
168 | + | |
169 | +/** | |
170 | + * | |
171 | + * @brief | |
172 | + * | |
173 | + * @param hSession TN3270 Session handle. | |
174 | + * | |
175 | + * @return 0 if Ok, non zero if not (sets errno) | |
176 | + * | |
177 | + */ | |
178 | + LIB3270_EXPORT int lib3270_select_field(H3270 *hSession); | |
179 | + | |
180 | +/** | |
181 | + * | |
182 | + * @brief | |
183 | + * | |
184 | + * @param hSession TN3270 Session handle. | |
185 | + * | |
186 | + * @return 0 if Ok, non zero if not (sets errno) | |
187 | + * | |
188 | + */ | |
189 | + LIB3270_EXPORT int lib3270_select_all(H3270 *hSession); | |
190 | + | |
191 | +/** | |
192 | + * | |
193 | + * @brief | |
194 | + * | |
195 | + * @param hSession TN3270 Session handle. | |
196 | + * | |
197 | + * @return 0 if Ok, non zero if not (sets errno) | |
198 | + * | |
199 | + */ | |
200 | + LIB3270_EXPORT int lib3270_unselect(H3270 *hSession); | |
201 | + | |
202 | +/** | |
203 | + * | |
204 | + * @brief | |
205 | + * | |
206 | + * @param hSession TN3270 Session handle. | |
207 | + * | |
208 | + * @return 0 if Ok, non zero if not (sets errno) | |
209 | + * | |
210 | + */ | |
211 | + LIB3270_EXPORT int lib3270_reselect(H3270 *hSession); | |
212 | + | |
213 | +/** | |
214 | + * | |
215 | + * @brief Erase End Of Field Key. | |
216 | + * | |
217 | + * @param hSession TN3270 Session handle. | |
218 | + * | |
219 | + * @return 0 if Ok, non zero if not (sets errno) | |
220 | + * | |
221 | + */ | |
222 | + LIB3270_EXPORT int lib3270_eraseeof(H3270 *hSession); | |
223 | + | |
224 | +/** | |
225 | + * | |
226 | + * @brief Erase End Of Line Key. | |
227 | + * | |
228 | + * @param hSession TN3270 Session handle. | |
229 | + * | |
230 | + * @return 0 if Ok, non zero if not (sets errno) | |
231 | + * | |
232 | + */ | |
233 | + LIB3270_EXPORT int lib3270_eraseeol(H3270 *hSession); | |
234 | + | |
235 | +/** | |
236 | + * | |
237 | + * @brief | |
238 | + * | |
239 | + * @param hSession TN3270 Session handle. | |
240 | + * | |
241 | + * @return 0 if Ok, non zero if not (sets errno) | |
242 | + * | |
243 | + */ | |
244 | + LIB3270_EXPORT int lib3270_erase(H3270 *hSession); | |
245 | + | |
246 | +/** | |
247 | + * | |
248 | + * @brief | |
249 | + * | |
250 | + * @param hSession TN3270 Session handle. | |
251 | + * | |
252 | + * @return 0 if Ok, non zero if not (sets errno) | |
253 | + * | |
254 | + */ | |
255 | + LIB3270_EXPORT int lib3270_delete(H3270 *hSession); | |
256 | + | |
257 | +/** | |
258 | + * | |
259 | + * @brief DUP key | |
260 | + * | |
261 | + * @param hSession TN3270 Session handle. | |
262 | + * | |
263 | + * @return 0 if Ok, non zero if not (sets errno) | |
264 | + * | |
265 | + */ | |
266 | + LIB3270_EXPORT int lib3270_dup(H3270 *hSession); | |
267 | + | |
268 | +/** | |
269 | + * | |
270 | + * @brief FM key | |
271 | + * | |
272 | + * @param hSession TN3270 Session handle. | |
273 | + * | |
274 | + * @return 0 if Ok, non zero if not (sets errno) | |
275 | + * | |
276 | + */ | |
277 | + LIB3270_EXPORT int lib3270_fieldmark(H3270 *hSession); | |
278 | + | |
279 | +/** | |
280 | + * | |
281 | + * @brief 3270-style backspace. | |
282 | + * | |
283 | + * @param hSession TN3270 Session handle. | |
284 | + * | |
285 | + * @return 0 if Ok, non zero if not (sets errno) | |
286 | + * | |
287 | + */ | |
288 | + LIB3270_EXPORT int lib3270_backspace(H3270 *hSession); | |
289 | + | |
290 | +/** | |
291 | + * | |
292 | + * @brief Cursor to previous word. | |
293 | + * | |
294 | + * @param hSession TN3270 Session handle. | |
295 | + * | |
296 | + * @return 0 if Ok, non zero if not (sets errno) | |
297 | + * | |
298 | + */ | |
299 | + LIB3270_EXPORT int lib3270_previousword(H3270 *hSession); | |
300 | + | |
301 | +/** | |
302 | + * | |
303 | + * @brief Cursor to next unprotected word. | |
304 | + * | |
305 | + * @param hSession TN3270 Session handle. | |
306 | + * | |
307 | + * @return 0 if Ok, non zero if not (sets errno) | |
308 | + * | |
309 | + */ | |
310 | + LIB3270_EXPORT int lib3270_nextword(H3270 *hSession); | |
311 | + | |
312 | +/** | |
313 | + * | |
314 | + * @brief Move the cursor to the first blank after the last nonblank in the field. | |
315 | + * | |
316 | + * @param hSession TN3270 Session handle. | |
317 | + * | |
318 | + * @return 0 if Ok, non zero if not (sets errno) | |
319 | + * | |
320 | + */ | |
321 | + LIB3270_EXPORT int lib3270_fieldend(H3270 *hSession); | |
322 | + | |
323 | +/** | |
324 | + * | |
325 | + * @brief Move to first unprotected field on screen. | |
326 | + * | |
327 | + * @param hSession TN3270 Session handle. | |
328 | + * | |
329 | + * @return 0 if Ok, non zero if not (sets errno) | |
330 | + * | |
331 | + */ | |
332 | + LIB3270_EXPORT int lib3270_firstfield(H3270 *hSession); | |
333 | + | |
334 | +/** | |
335 | + * | |
336 | + * @brief | |
337 | + * | |
338 | + * @param hSession TN3270 Session handle. | |
339 | + * | |
340 | + * @return 0 if Ok, non zero if not (sets errno) | |
341 | + * | |
342 | + */ | |
343 | + LIB3270_EXPORT int lib3270_nextfield(H3270 *hSession); | |
344 | + | |
345 | +/** | |
346 | + * | |
347 | + * @brief Tab backward to previous field. | |
348 | + * | |
349 | + * @param hSession TN3270 Session handle. | |
350 | + * | |
351 | + * @return 0 if Ok, non zero if not (sets errno) | |
352 | + * | |
353 | + */ | |
354 | + LIB3270_EXPORT int lib3270_previousfield(H3270 *hSession); | |
355 | + | |
356 | +/** | |
357 | + * | |
358 | + * @brief ATTN key, per RFC 2355. Sends IP, regardless. | |
359 | + * | |
360 | + * @param hSession TN3270 Session handle. | |
361 | + * | |
362 | + * @return 0 if Ok, non zero if not (sets errno) | |
363 | + * | |
364 | + */ | |
365 | + LIB3270_EXPORT int lib3270_attn(H3270 *hSession); | |
366 | + | |
367 | +/** | |
368 | + * | |
369 | + * @brief | |
370 | + * | |
371 | + * @param hSession TN3270 Session handle. | |
372 | + * | |
373 | + * @return 0 if Ok, non zero if not (sets errno) | |
374 | + * | |
375 | + */ | |
376 | + LIB3270_EXPORT int lib3270_break(H3270 *hSession); | |
377 | + | |
378 | +/** | |
379 | + * | |
380 | + * @brief | |
381 | + * | |
382 | + * @param hSession TN3270 Session handle. | |
383 | + * | |
384 | + * @return 0 if Ok, non zero if not (sets errno) | |
385 | + * | |
386 | + */ | |
387 | + LIB3270_EXPORT int lib3270_paste_next(H3270 *hSession); | |
388 | + | |
389 | +/** | |
390 | + * | |
391 | + * @brief Backspaces the cursor until it hits the front of a word (does a ^W). | |
392 | + * | |
393 | + * @param hSession TN3270 Session handle. | |
394 | + * | |
395 | + * @return 0 if Ok, non zero if not (sets errno) | |
396 | + * | |
397 | + */ | |
398 | + LIB3270_EXPORT int lib3270_deleteword(H3270 *hSession); | |
399 | + | |
400 | +/** | |
401 | + * | |
402 | + * @brief Delete field key (does a ^U). | |
403 | + * | |
404 | + * @param hSession TN3270 Session handle. | |
405 | + * | |
406 | + * @return 0 if Ok, non zero if not (sets errno) | |
407 | + * | |
408 | + */ | |
409 | + LIB3270_EXPORT int lib3270_deletefield(H3270 *hSession); | |
410 | + | |
411 | +/** | |
412 | + * | |
413 | + * @brief | |
414 | + * | |
415 | + * @param hSession TN3270 Session handle. | |
416 | + * | |
417 | + * @return 0 if Ok, non zero if not (sets errno) | |
418 | + * | |
419 | + */ | |
420 | + LIB3270_EXPORT int lib3270_sysreq(H3270 *hSession); | |
421 | + | |
422 | +/** | |
423 | + * | |
424 | + * @brief | |
425 | + * | |
426 | + * @param hSession TN3270 Session handle. | |
427 | + * | |
428 | + * @return 0 if Ok, non zero if not (sets errno) | |
429 | + * | |
430 | + */ | |
431 | + LIB3270_EXPORT int lib3270_testpattern(H3270 *hSession); | |
432 | + | |
433 | +/** | |
434 | + * | |
435 | + * @brief | |
436 | + * | |
437 | + * @param hSession TN3270 Session handle. | |
438 | + * | |
439 | + * @return 0 if Ok, non zero if not (sets errno) | |
440 | + * | |
441 | + */ | |
442 | + LIB3270_EXPORT int lib3270_charsettable(H3270 *hSession); | |
443 | + | |
444 | + | |
445 | +/** | |
446 | + * | |
447 | + * @brief Get lib3270 action table. | |
448 | + * | |
449 | + * @return Array with all the supported actions. | |
450 | + */ | |
451 | + LIB3270_EXPORT const LIB3270_ACTION_ENTRY * lib3270_get_action_table(); | |
452 | + | |
453 | +/** | |
454 | + * | |
455 | + * @brief Call lib3270 action by name. | |
456 | + * | |
457 | + * @param hSession TN3270 Session handle. | |
458 | + * @param name Name of the action to call. | |
459 | + * | |
460 | + */ | |
461 | + LIB3270_EXPORT int lib3270_action(H3270 *hSession, const char *name); | |
462 | + | |
463 | +#ifdef __cplusplus | |
464 | + } | |
465 | +#endif | |
466 | + | |
467 | +#endif // LIB3270_ACTIONS_H_INCLUDED | ... | ... |
src/include/lib3270/selection.h
... | ... | @@ -103,24 +103,24 @@ |
103 | 103 | * @param h Session handle. |
104 | 104 | * @param str String to paste. |
105 | 105 | * |
106 | - * @see lib3270_pastenext. | |
106 | + * @see lib3270_paste_next. | |
107 | 107 | * |
108 | 108 | * @return Non 0 if there's more to paste with lib3270_pastenext. |
109 | 109 | * |
110 | 110 | */ |
111 | - LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str); | |
111 | + LIB3270_EXPORT int lib3270_paste_text(H3270 *h, const unsigned char *str); | |
112 | 112 | |
113 | 113 | /** |
114 | 114 | * @brief Paste remaining string. |
115 | 115 | * |
116 | 116 | * @param h Session handle. |
117 | 117 | * |
118 | - * @see lib3270_paste. | |
118 | + * @see lib3270_paste_text. | |
119 | 119 | * |
120 | 120 | * @return Non 0 if there's more to paste. |
121 | 121 | * |
122 | 122 | */ |
123 | - LIB3270_EXPORT int lib3270_pastenext(H3270 *h); | |
123 | + LIB3270_EXPORT int lib3270_paste_next(H3270 *h); | |
124 | 124 | |
125 | 125 | /** |
126 | 126 | * @brief Move selected box 1 char in the selected direction. | ... | ... |