Commit 8b490b0d0fa1110ba4ff6c695f4d6c17e8179369

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

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

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