Commit e53ba7243acb512e974ae125a24a137b9add871c

Authored by Perry Werneck
1 parent 0bf059d7
Exists in master and in 2 other branches develop, macos

Adding 'editable' property.

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
... ... @@ -672,6 +672,7 @@ static void status_3270_mode(H3270 *hSession, int GNUC_UNUSED(ignored), void GNU
672 672 }
673 673  
674 674 void mcursor_set(H3270 *hSession,LIB3270_POINTER m) {
  675 +
675 676 if(hSession->pointer != ((unsigned short) m)) {
676 677  
677 678 // Pointer changed
... ...
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  
... ...