Commit 135681d7ccee15fcdebe901a5c8358f5d5c8f3f4
1 parent
dbae2376
Exists in
master
and in
3 other branches
Implementando options na caixa de diálogo de host
Showing
4 changed files
with
18 additions
and
4 deletions
Show diff stats
... | ... | @@ -299,7 +299,8 @@ |
299 | 299 | |
300 | 300 | #define CHAR_ATTR_UNCONVERTED LIB3270_ATTR_CG |
301 | 301 | |
302 | - struct lib3270_option | |
302 | +/* | |
303 | + struct _lib3270_option | |
303 | 304 | { |
304 | 305 | const char *name; |
305 | 306 | enum |
... | ... | @@ -320,7 +321,8 @@ |
320 | 321 | |
321 | 322 | #define new_3270_session(m) lib3270_session_new(m) |
322 | 323 | |
323 | - LOCAL_EXTERN const struct lib3270_option * get_3270_option_table(int sz); | |
324 | + LOCAL_EXTERN const struct _lib3270_option * get_3270_option_table(int sz); | |
325 | +*/ | |
324 | 326 | |
325 | 327 | |
326 | 328 | /* Set/Get screen contents */ | ... | ... |
host.c
session.c
... | ... | @@ -453,3 +453,15 @@ LIB3270_EXPORT void * lib3270_get_widget(H3270 *h) |
453 | 453 | CHECK_SESSION_HANDLE(h); |
454 | 454 | return h->widget; |
455 | 455 | } |
456 | + | |
457 | +LIB3270_EXPORT LIB3270_OPTION lib3270_get_options(H3270 *hSession) | |
458 | +{ | |
459 | + CHECK_SESSION_HANDLE(hSession); | |
460 | + return hSession->options; | |
461 | +} | |
462 | + | |
463 | +LIB3270_EXPORT void lib3270_set_options(H3270 *hSession, LIB3270_OPTION opt) | |
464 | +{ | |
465 | + CHECK_SESSION_HANDLE(hSession); | |
466 | + hSession->options = opt; | |
467 | +} | ... | ... |
... | ... | @@ -820,7 +820,7 @@ static void do_qr_color(H3270 *hSession) |
820 | 820 | |
821 | 821 | trace_ds(hSession,"> QueryReply(Color)\n"); |
822 | 822 | |
823 | - color_max = hSession->color8 ? 8: 16; /* report on 8 or 16 colors */ | |
823 | + color_max = (hSession->options & LIB3270_OPTION_COLOR8) ? 8: 16; /* report on 8 or 16 colors */ | |
824 | 824 | |
825 | 825 | space3270out(hSession,4 + 2*15); |
826 | 826 | *hSession->obptr++ = 0x00; /* no options */ | ... | ... |