Commit 3f54fda911a1bba1696d1d1326cc82017cd644ac

Authored by Perry Werneck
1 parent 62f1e686
Exists in master

Iniciando reimplementação do módulo ooRexx.

pw3270-rexx.cbp
@@ -35,12 +35,15 @@ @@ -35,12 +35,15 @@
35 </Build> 35 </Build>
36 <Compiler> 36 <Compiler>
37 <Add option="-Wall" /> 37 <Add option="-Wall" />
  38 + <Add option="`pkg-config --cflags gtk+-3.0`" />
38 </Compiler> 39 </Compiler>
39 <Linker> 40 <Linker>
  41 + <Add option="`pkg-config --libs gtk+-3.0`" />
40 <Add library="pw3270cpp" /> 42 <Add library="pw3270cpp" />
41 </Linker> 43 </Linker>
  44 + <Unit filename="src/plugin.cc" />
  45 + <Unit filename="src/private.h" />
42 <Unit filename="src/rexx_methods.cc" /> 46 <Unit filename="src/rexx_methods.cc" />
43 - <Unit filename="src/rx3270.h" />  
44 <Unit filename="src/typed_routines.cc" /> 47 <Unit filename="src/typed_routines.cc" />
45 <Extensions> 48 <Extensions>
46 <code_completion /> 49 <code_completion />
src/private.h 0 → 100644
@@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
  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.
  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 private.h 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 +#ifndef RX3270_H_INCLUDED
  31 +
  32 + #define RX3270_H_INCLUDED 1
  33 +
  34 + #define ENABLE_NLS
  35 + #define GETTEXT_PACKAGE "pw3270"
  36 +
  37 + #include <libintl.h>
  38 + #include <glib/gi18n.h>
  39 + #include <gtk/gtk.h>
  40 +
  41 + #include <stdint.h>
  42 + #include <errno.h>
  43 + #include <stdio.h>
  44 + #include <stdarg.h>
  45 + #include <pw3270cpp.h>
  46 + #include <oorexxapi.h>
  47 +
  48 +/*---[ Rexx entry points ]-----------------------------------------------------------------------------------*/
  49 +
  50 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270version);
  51 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270QueryCState);
  52 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Disconnect);
  53 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Connect);
  54 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270isConnected);
  55 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForEvents);
  56 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Sleep);
  57 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendENTERKey);
  58 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendPFKey);
  59 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendPAKey);
  60 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForTerminalReady);
  61 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForStringAt);
  62 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270GetStringAt);
  63 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsTerminalReady);
  64 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270queryStringAt);
  65 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SetStringAt);
  66 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270CloseApplication);
  67 + REXX_TYPED_ROUTINE_PROTOTYPE(ebc2asc);
  68 + REXX_TYPED_ROUTINE_PROTOTYPE(asc2ebc);
  69 +
  70 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Erase);
  71 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseEOF);
  72 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseEOL);
  73 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseInput);
  74 +
  75 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsProtected);
  76 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsProtectedAt);
  77 + REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SetUnlockDelay);
  78 +
  79 + REXX_METHOD_PROTOTYPE(rx3270_method_version);
  80 + REXX_METHOD_PROTOTYPE(rx3270_method_revision);
  81 + REXX_METHOD_PROTOTYPE(rx3270_method_init);
  82 + REXX_METHOD_PROTOTYPE(rx3270_method_uninit);
  83 + REXX_METHOD_PROTOTYPE(rx3270_method_connect);
  84 + REXX_METHOD_PROTOTYPE(rx3270_method_disconnect);
  85 + REXX_METHOD_PROTOTYPE(rx3270_method_sleep);
  86 + REXX_METHOD_PROTOTYPE(rx3270_method_is_connected);
  87 + REXX_METHOD_PROTOTYPE(rx3270_method_is_ready);
  88 + REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_ready);
  89 + REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor);
  90 + REXX_METHOD_PROTOTYPE(rx3270_method_get_cursor_addr);
  91 + REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor_addr);
  92 + REXX_METHOD_PROTOTYPE(rx3270_method_enter);
  93 + REXX_METHOD_PROTOTYPE(rx3270_method_erase);
  94 + REXX_METHOD_PROTOTYPE(rx3270_method_erase_eof);
  95 + REXX_METHOD_PROTOTYPE(rx3270_method_erase_eol);
  96 + REXX_METHOD_PROTOTYPE(rx3270_method_erase_input);
  97 + REXX_METHOD_PROTOTYPE(rx3270_method_pfkey);
  98 + REXX_METHOD_PROTOTYPE(rx3270_method_pakey);
  99 + REXX_METHOD_PROTOTYPE(rx3270_method_get_text);
  100 + REXX_METHOD_PROTOTYPE(rx3270_method_get_text_at);
  101 + REXX_METHOD_PROTOTYPE(rx3270_method_set_text_at);
  102 + REXX_METHOD_PROTOTYPE(rx3270_method_cmp_text_at);
  103 + REXX_METHOD_PROTOTYPE(rx3270_method_event_trace);
  104 + REXX_METHOD_PROTOTYPE(rx3270_method_screen_trace);
  105 + REXX_METHOD_PROTOTYPE(rx3270_method_ds_trace);
  106 + REXX_METHOD_PROTOTYPE(rx3270_method_set_option);
  107 + REXX_METHOD_PROTOTYPE(rx3270_method_test);
  108 + REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_text_at);
  109 + REXX_METHOD_PROTOTYPE(rx3270_method_get_field_len);
  110 + REXX_METHOD_PROTOTYPE(rx3270_method_get_field_start);
  111 + REXX_METHOD_PROTOTYPE(rx3270_method_get_next_unprotected);
  112 + REXX_METHOD_PROTOTYPE(rx3270_method_get_is_protected);
  113 + REXX_METHOD_PROTOTYPE(rx3270_method_get_is_protected_at);
  114 + REXX_METHOD_PROTOTYPE(rx3270_method_get_selection);
  115 + REXX_METHOD_PROTOTYPE(rx3270_method_set_selection);
  116 + REXX_METHOD_PROTOTYPE(rx3270_method_get_clipboard);
  117 + REXX_METHOD_PROTOTYPE(rx3270_method_set_clipboard);
  118 + REXX_METHOD_PROTOTYPE(rx3270_method_popup);
  119 + REXX_METHOD_PROTOTYPE(rx3270_method_get_filename);
  120 + REXX_METHOD_PROTOTYPE(rx3270_method_get_cursor_addr);
  121 + REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor_addr);
  122 + REXX_METHOD_PROTOTYPE(rx3270_method_input_text);
  123 + REXX_METHOD_PROTOTYPE(rx3270_method_get_display_charset);
  124 + REXX_METHOD_PROTOTYPE(rx3270_method_set_display_charset);
  125 + REXX_METHOD_PROTOTYPE(rx3270_method_get_host_charset);
  126 + REXX_METHOD_PROTOTYPE(rx3270_method_set_host_charset);
  127 + REXX_METHOD_PROTOTYPE(rx3270_method_set_unlock_delay);
  128 +
  129 +/*---[ Globals ]---------------------------------------------------------------------------------------------*/
  130 +
  131 +/*--[ 3270 Session ]-----------------------------------------------------------------------------------------*/
  132 +
  133 +#ifdef __cplusplus
  134 + extern "C" {
  135 +#endif
  136 +
  137 + LIB3270_EXPORT void rx3270_set_package_option(RexxOption *option);
  138 +
  139 +#ifdef __cplusplus
  140 + }
  141 +#endif
  142 +
  143 +#endif // RX3270_H_INCLUDED
src/rexx_methods.cc
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 * 32 *
33 */ 33 */
34 34
35 - #include "rx3270.h" 35 + #include "private.h"
36 #include <time.h> 36 #include <time.h>
37 #include <string.h> 37 #include <string.h>
38 #include <ctype.h> 38 #include <ctype.h>
src/rx3270.h
@@ -1,136 +0,0 @@ @@ -1,136 +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.  
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 pluginmain.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 -#ifndef RX3270_H_INCLUDED  
31 -  
32 - #define RX3270_H_INCLUDED 1  
33 -  
34 - #include <stdint.h>  
35 - #include <errno.h>  
36 - #include <stdio.h>  
37 - #include <stdarg.h>  
38 - #include <pw3270cpp.h>  
39 - #include <oorexxapi.h>  
40 -  
41 -/*---[ Rexx entry points ]-----------------------------------------------------------------------------------*/  
42 -  
43 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270version);  
44 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270QueryCState);  
45 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Disconnect);  
46 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Connect);  
47 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270isConnected);  
48 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForEvents);  
49 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Sleep);  
50 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendENTERKey);  
51 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendPFKey);  
52 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SendPAKey);  
53 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForTerminalReady);  
54 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270WaitForStringAt);  
55 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270GetStringAt);  
56 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsTerminalReady);  
57 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270queryStringAt);  
58 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SetStringAt);  
59 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270CloseApplication);  
60 - REXX_TYPED_ROUTINE_PROTOTYPE(ebc2asc);  
61 - REXX_TYPED_ROUTINE_PROTOTYPE(asc2ebc);  
62 -  
63 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270Erase);  
64 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseEOF);  
65 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseEOL);  
66 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270EraseInput);  
67 -  
68 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsProtected);  
69 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270IsProtectedAt);  
70 - REXX_TYPED_ROUTINE_PROTOTYPE(rx3270SetUnlockDelay);  
71 -  
72 - REXX_METHOD_PROTOTYPE(rx3270_method_version);  
73 - REXX_METHOD_PROTOTYPE(rx3270_method_revision);  
74 - REXX_METHOD_PROTOTYPE(rx3270_method_init);  
75 - REXX_METHOD_PROTOTYPE(rx3270_method_uninit);  
76 - REXX_METHOD_PROTOTYPE(rx3270_method_connect);  
77 - REXX_METHOD_PROTOTYPE(rx3270_method_disconnect);  
78 - REXX_METHOD_PROTOTYPE(rx3270_method_sleep);  
79 - REXX_METHOD_PROTOTYPE(rx3270_method_is_connected);  
80 - REXX_METHOD_PROTOTYPE(rx3270_method_is_ready);  
81 - REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_ready);  
82 - REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor);  
83 - REXX_METHOD_PROTOTYPE(rx3270_method_get_cursor_addr);  
84 - REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor_addr);  
85 - REXX_METHOD_PROTOTYPE(rx3270_method_enter);  
86 - REXX_METHOD_PROTOTYPE(rx3270_method_erase);  
87 - REXX_METHOD_PROTOTYPE(rx3270_method_erase_eof);  
88 - REXX_METHOD_PROTOTYPE(rx3270_method_erase_eol);  
89 - REXX_METHOD_PROTOTYPE(rx3270_method_erase_input);  
90 - REXX_METHOD_PROTOTYPE(rx3270_method_pfkey);  
91 - REXX_METHOD_PROTOTYPE(rx3270_method_pakey);  
92 - REXX_METHOD_PROTOTYPE(rx3270_method_get_text);  
93 - REXX_METHOD_PROTOTYPE(rx3270_method_get_text_at);  
94 - REXX_METHOD_PROTOTYPE(rx3270_method_set_text_at);  
95 - REXX_METHOD_PROTOTYPE(rx3270_method_cmp_text_at);  
96 - REXX_METHOD_PROTOTYPE(rx3270_method_event_trace);  
97 - REXX_METHOD_PROTOTYPE(rx3270_method_screen_trace);  
98 - REXX_METHOD_PROTOTYPE(rx3270_method_ds_trace);  
99 - REXX_METHOD_PROTOTYPE(rx3270_method_set_option);  
100 - REXX_METHOD_PROTOTYPE(rx3270_method_test);  
101 - REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_text_at);  
102 - REXX_METHOD_PROTOTYPE(rx3270_method_get_field_len);  
103 - REXX_METHOD_PROTOTYPE(rx3270_method_get_field_start);  
104 - REXX_METHOD_PROTOTYPE(rx3270_method_get_next_unprotected);  
105 - REXX_METHOD_PROTOTYPE(rx3270_method_get_is_protected);  
106 - REXX_METHOD_PROTOTYPE(rx3270_method_get_is_protected_at);  
107 - REXX_METHOD_PROTOTYPE(rx3270_method_get_selection);  
108 - REXX_METHOD_PROTOTYPE(rx3270_method_set_selection);  
109 - REXX_METHOD_PROTOTYPE(rx3270_method_get_clipboard);  
110 - REXX_METHOD_PROTOTYPE(rx3270_method_set_clipboard);  
111 - REXX_METHOD_PROTOTYPE(rx3270_method_popup);  
112 - REXX_METHOD_PROTOTYPE(rx3270_method_get_filename);  
113 - REXX_METHOD_PROTOTYPE(rx3270_method_get_cursor_addr);  
114 - REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor_addr);  
115 - REXX_METHOD_PROTOTYPE(rx3270_method_input_text);  
116 - REXX_METHOD_PROTOTYPE(rx3270_method_get_display_charset);  
117 - REXX_METHOD_PROTOTYPE(rx3270_method_set_display_charset);  
118 - REXX_METHOD_PROTOTYPE(rx3270_method_get_host_charset);  
119 - REXX_METHOD_PROTOTYPE(rx3270_method_set_host_charset);  
120 - REXX_METHOD_PROTOTYPE(rx3270_method_set_unlock_delay);  
121 -  
122 -/*---[ Globals ]---------------------------------------------------------------------------------------------*/  
123 -  
124 -/*--[ 3270 Session ]-----------------------------------------------------------------------------------------*/  
125 -  
126 -#ifdef __cplusplus  
127 - extern "C" {  
128 -#endif  
129 -  
130 - LIB3270_EXPORT void rx3270_set_package_option(RexxOption *option);  
131 -  
132 -#ifdef __cplusplus  
133 - }  
134 -#endif  
135 -  
136 -#endif // RX3270_H_INCLUDED  
src/typed_routines.cc
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 * 27 *
28 */ 28 */
29 29
30 - #include "rx3270.h" 30 + #include "private.h"
31 #include <time.h> 31 #include <time.h>
32 #include <string.h> 32 #include <string.h>
33 #include <exception> 33 #include <exception>