Commit e53ba7243acb512e974ae125a24a137b9add871c
1 parent
0bf059d7
Exists in
master
and in
2 other branches
Adding 'editable' property.
Showing
3 changed files
with
13 additions
and
0 deletions
Show diff stats
src/core/properties/boolean.c
... | ... | @@ -55,6 +55,10 @@ LIB3270_EXPORT int lib3270_ssl_get_crl_download(const H3270 *hSession) { |
55 | 55 | return hSession->ssl.download_crl; |
56 | 56 | } |
57 | 57 | |
58 | +LIB3270_EXPORT int lib3270_is_editable(const H3270 *hSession) { | |
59 | + return (hSession->pointer & 0x03) == LIB3270_POINTER_UNLOCKED; | |
60 | +} | |
61 | + | |
58 | 62 | const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { |
59 | 63 | |
60 | 64 | static const LIB3270_INT_PROPERTY properties[] = { |
... | ... | @@ -194,6 +198,13 @@ const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { |
194 | 198 | }, |
195 | 199 | |
196 | 200 | { |
201 | + .name = "editable", // Property name. | |
202 | + .description = N_( "Non zero if the terminal is editable" ), // Property description. | |
203 | + .get = lib3270_is_editable, // Get value. | |
204 | + .set = NULL // Set value. | |
205 | + }, | |
206 | + | |
207 | + { | |
197 | 208 | .name = "crl_download", // Property name. |
198 | 209 | .description = N_( "Non zero if the download of CRL is enabled" ), // Property description. |
199 | 210 | .get = lib3270_ssl_get_crl_download, // Get value. | ... | ... |
src/core/screen.c
src/include/lib3270.h
... | ... | @@ -994,6 +994,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h); |
994 | 994 | |
995 | 995 | LIB3270_EXPORT int lib3270_is_ready(const H3270 *h); |
996 | 996 | LIB3270_EXPORT int lib3270_is_secure(const H3270 *h); |
997 | +LIB3270_EXPORT int lib3270_is_editable(const H3270 *h); | |
997 | 998 | |
998 | 999 | LIB3270_EXPORT LIB3270_MESSAGE lib3270_get_lock_status(const H3270 *h); |
999 | 1000 | ... | ... |