Commit 8b490b0d0fa1110ba4ff6c695f4d6c17e8179369

Authored by perry.werneck@gmail.com
1 parent 30b1c5d8

Implementando popup menus, atualizando mecanismo de beep, ajustes diversos para a versao 5

@@ -94,7 +94,7 @@ static void DefaultRemoveInput(unsigned long id); @@ -94,7 +94,7 @@ static void DefaultRemoveInput(unsigned long id);
94 94
95 static int DefaultProcessEvents(int block); 95 static int DefaultProcessEvents(int block);
96 96
97 -static void dunno(void) 97 +static void dunno(H3270 *session)
98 { 98 {
99 99
100 } 100 }
@@ -999,9 +999,10 @@ LIB3270_EXPORT int lib3270_wait(seconds) @@ -999,9 +999,10 @@ LIB3270_EXPORT int lib3270_wait(seconds)
999 return 0; 999 return 0;
1000 } 1000 }
1001 1001
1002 -LIB3270_EXPORT void lib3270_ring_bell(void) 1002 +LIB3270_EXPORT void lib3270_ring_bell(H3270 *session)
1003 { 1003 {
1004 - callbacks->ring_bell(); 1004 + CHECK_SESSION_HANDLE(session);
  1005 + callbacks->ring_bell(session);
1005 } 1006 }
1006 1007
1007 1008
@@ -917,7 +917,7 @@ ansi_sgr(int ig1 unused, int ig2 unused) @@ -917,7 +917,7 @@ ansi_sgr(int ig1 unused, int ig2 unused)
917 static enum state 917 static enum state
918 ansi_bell(int ig1 unused, int ig2 unused) 918 ansi_bell(int ig1 unused, int ig2 unused)
919 { 919 {
920 - lib3270_ring_bell(); 920 + lib3270_ring_bell(NULL);
921 return DATA; 921 return DATA;
922 } 922 }
923 923
@@ -383,8 +383,6 @@ @@ -383,8 +383,6 @@
383 const char *description; 383 const char *description;
384 }; 384 };
385 385
386 - LIB3270_EXPORT void lib3270_ring_bell(void);  
387 -  
388 #define new_3270_session(m) lib3270_session_new(m) 386 #define new_3270_session(m) lib3270_session_new(m)
389 387
390 LOCAL_EXTERN const struct lib3270_option * get_3270_option_table(int sz); 388 LOCAL_EXTERN const struct lib3270_option * get_3270_option_table(int sz);
@@ -1871,7 +1871,7 @@ ctlr_write(unsigned char buf[], int buflen, Boolean erase) @@ -1871,7 +1871,7 @@ ctlr_write(unsigned char buf[], int buflen, Boolean erase)
1871 status_syswait(); 1871 status_syswait();
1872 } 1872 }
1873 if (wcc_sound_alarm) 1873 if (wcc_sound_alarm)
1874 - lib3270_ring_bell(); 1874 + lib3270_ring_bell(NULL);
1875 1875
1876 /* Set up the DBCS state. */ 1876 /* Set up the DBCS state. */
1877 if (ctlr_dbcs_postprocess() < 0 && rv == PDS_OKAY_NO_OUTPUT) 1877 if (ctlr_dbcs_postprocess() < 0 && rv == PDS_OKAY_NO_OUTPUT)
@@ -182,7 +182,7 @@ static int enq_chk(void) @@ -182,7 +182,7 @@ static int enq_chk(void)
182 /* If operator error, complain and drop it. */ 182 /* If operator error, complain and drop it. */
183 if (kybdlock & KL_OERR_MASK) 183 if (kybdlock & KL_OERR_MASK)
184 { 184 {
185 - lib3270_ring_bell(); 185 + lib3270_ring_bell(NULL);
186 trace_event(" dropped (operator error)\n"); 186 trace_event(" dropped (operator error)\n");
187 return -1; 187 return -1;
188 } 188 }
@@ -190,7 +190,7 @@ static int enq_chk(void) @@ -190,7 +190,7 @@ static int enq_chk(void)
190 /* If scroll lock, complain and drop it. */ 190 /* If scroll lock, complain and drop it. */
191 if (kybdlock & KL_SCROLLED) 191 if (kybdlock & KL_SCROLLED)
192 { 192 {
193 - lib3270_ring_bell(); 193 + lib3270_ring_bell(NULL);
194 trace_event(" dropped (scrolled)\n"); 194 trace_event(" dropped (scrolled)\n");
195 return -1; 195 return -1;
196 } 196 }
@@ -471,7 +471,7 @@ operator_error(int error_type) @@ -471,7 +471,7 @@ operator_error(int error_type)
471 kybdlock_set((unsigned int)error_type, "operator_error"); 471 kybdlock_set((unsigned int)error_type, "operator_error");
472 (void) flush_ta(); 472 (void) flush_ta();
473 } else { 473 } else {
474 - lib3270_ring_bell(); 474 + lib3270_ring_bell(NULL);
475 } 475 }
476 } 476 }
477 477
@@ -57,8 +57,14 @@ @@ -57,8 +57,14 @@
57 <Add directory="..\include\lib3270" /> 57 <Add directory="..\include\lib3270" />
58 </Compiler> 58 </Compiler>
59 <Unit filename="..\include\lib3270.h" /> 59 <Unit filename="..\include\lib3270.h" />
  60 + <Unit filename="..\include\lib3270\action_table.h" />
  61 + <Unit filename="..\include\lib3270\actions.h" />
60 <Unit filename="..\include\lib3270\config.h.in" /> 62 <Unit filename="..\include\lib3270\config.h.in" />
  63 + <Unit filename="..\include\lib3270\log.h" />
  64 + <Unit filename="..\include\lib3270\macros.h" />
  65 + <Unit filename="..\include\lib3270\popup.h" />
61 <Unit filename="..\include\lib3270\selection.h" /> 66 <Unit filename="..\include\lib3270\selection.h" />
  67 + <Unit filename="..\include\lib3270\session.h" />
62 <Unit filename="3270ds.h" /> 68 <Unit filename="3270ds.h" />
63 <Unit filename="Makefile.in" /> 69 <Unit filename="Makefile.in" />
64 <Unit filename="X11keysym.h" /> 70 <Unit filename="X11keysym.h" />
@@ -205,7 +205,7 @@ LIB3270_EXPORT void lib3270_select_word(H3270 *session, int baddr) @@ -205,7 +205,7 @@ LIB3270_EXPORT void lib3270_select_word(H3270 *session, int baddr)
205 205
206 if(!lib3270_connected(session) || isspace(ea_buf[baddr].chr)) 206 if(!lib3270_connected(session) || isspace(ea_buf[baddr].chr))
207 { 207 {
208 - lib3270_ring_bell(); 208 + lib3270_ring_bell(session);
209 return; 209 return;
210 } 210 }
211 211
@@ -227,15 +227,15 @@ LIB3270_EXPORT int lib3270_select_field(H3270 *session, int baddr) @@ -227,15 +227,15 @@ LIB3270_EXPORT int lib3270_select_field(H3270 *session, int baddr)
227 227
228 if(!lib3270_connected(session)) 228 if(!lib3270_connected(session))
229 { 229 {
230 - lib3270_ring_bell();  
231 - return; 230 + lib3270_ring_bell(session);
  231 + return -1;
232 } 232 }
233 233
234 start = lib3270_field_addr(session,baddr); 234 start = lib3270_field_addr(session,baddr);
235 235
236 if(start < 0) 236 if(start < 0)
237 { 237 {
238 - lib3270_ring_bell(); 238 + lib3270_ring_bell(session);
239 return -1; 239 return -1;
240 } 240 }
241 241