From cd358ad9820eaedf33abc3e985e14c3932250f91 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Thu, 19 Dec 2013 15:57:36 +0000 Subject: [PATCH] Incluindo notificação do estado do bloco selecionado --- selection.c | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/selection.c b/selection.c index 4e5d670..9b0dfe9 100644 --- a/selection.c +++ b/selection.c @@ -572,8 +572,16 @@ LIB3270_EXPORT char * lib3270_get_field_at(H3270 *session, int baddr) return lib3270_get_text(session,first,lib3270_field_length(session,first)+1); } +LIB3270_EXPORT int lib3270_has_selection(H3270 *hSession) +{ + CHECK_SESSION_HANDLE(hSession); + return hSession->selected != 0; +} + LIB3270_EXPORT char * lib3270_get_selected(H3270 *hSession) { + CHECK_SESSION_HANDLE(hSession); + if(!hSession->selected || hSession->select.start == hSession->select.end) return NULL; -- libgit2 0.21.2