From 44d2c241f0c0158679a3633eecba050b8b5f47a4 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Tue, 17 Dec 2013 19:02:12 +0000 Subject: [PATCH] Implementando propriedades no widget 3270 --- toggles.c | 67 +++++++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/toggles.c b/toggles.c index 28be59d..e7371ab 100644 --- a/toggles.c +++ b/toggles.c @@ -55,35 +55,39 @@ #include "togglesc.h" #include "api.h" -static const char *toggle_names[LIB3270_TOGGLE_COUNT] = +static const struct _toggle { - "monocase", - "cursorblink", - "showtiming", - "cursorpos", - "dstrace", - "linewrap", - "blankfill", - "screentrace", - "eventtrace", - "marginedpaste", - "rectselect", - "crosshair", - "fullscreen", - "reconnect", - "insert", - "smartpaste", - "bold", - "keepselected", - "underline", - "autoconnect", - "kpalternative", /**< Keypad +/- move to next/previous field */ - "beep", /**< Beep on errors */ - "fieldattr", /**< View Field attribute */ - "altscreen", /**< auto resize on altscreen */ - "keepalive", /**< Enable network keep-alive with SO_KEEPALIVE */ - "nettrace", /**< Enable network in/out trace */ - + const char *name; + const char *descr; +} +toggle_info[LIB3270_TOGGLE_COUNT] = +{ + { "monocase", "" }, + { "cursorblink", "" }, + { "showtiming", "" }, + { "cursorpos", "" }, + { "dstrace", "" }, + { "linewrap", "" }, + { "blankfill", "" }, + { "screentrace", "" }, + { "eventtrace", "" }, + { "marginedpaste", "" }, + { "rectselect", "" }, + { "crosshair", "" }, + { "fullscreen", "" }, + { "reconnect", "" }, + { "insert", "" }, + { "smartpaste", "" }, + { "bold", "" }, + { "keepselected", "" }, + { "underline", "" }, + { "autoconnect", "" }, + { "kpalternative", "" }, /**< Keypad +/- move to next/previous field */ + { "beep", "" }, /**< Beep on errors */ + { "fieldattr", "" }, /**< View Field attribute */ + { "altscreen", "" }, /**< auto resize on altscreen */ + { "keepalive", "" }, /**< Enable network keep-alive with SO_KEEPALIVE */ + { "nettrace", "" }, /**< Enable network in/out trace */ }; LIB3270_EXPORT unsigned char lib3270_get_toggle(H3270 *session, LIB3270_TOGGLE ix) @@ -237,6 +241,13 @@ void shutdown_toggles(H3270 *session) #endif } +LIB3270_EXPORT const char * lib3270_get_toggle_description(LIB3270_TOGGLE_ID ix) +{ + if(ix < N_TOGGLES) + return toggle_names[ix]; + return ""; +} + LIB3270_EXPORT const char * lib3270_get_toggle_name(LIB3270_TOGGLE_ID ix) { if(ix < N_TOGGLES) -- libgit2 0.21.2