diff --git a/lib3270.cbp b/lib3270.cbp
index 69bd884..51b0c27 100644
--- a/lib3270.cbp
+++ b/lib3270.cbp
@@ -214,8 +214,6 @@
-
-
diff --git a/src/core/actions/actions.c b/src/core/actions/actions.c
index 84e8a42..c06bd16 100644
--- a/src/core/actions/actions.c
+++ b/src/core/actions/actions.c
@@ -46,13 +46,15 @@ LIB3270_EXPORT int lib3270_action(H3270 *hSession, const char *name)
const LIB3270_ACTION_ENTRY *actions = lib3270_get_action_table();
size_t f;
- CHECK_SESSION_HANDLE(hSession);
-
for(f=0; actions[f].name; f++)
{
if(!strcasecmp(name,actions[f].name))
{
- lib3270_trace_event(hSession,"Action: %s\n",actions[f].name);
+ lib3270_trace_event(hSession,"Action(%s): %s\n",actions[f].name, (actions[f].label ? actions[f].label : ""));
+
+ if(!actions[f].enabled(hSession))
+ return errno = EPERM;
+
return actions[f].call(hSession);
}
diff --git a/src/core/actions/table.c b/src/core/actions/table.c
index bf32ef0..49f34cd 100644
--- a/src/core/actions/table.c
+++ b/src/core/actions/table.c
@@ -18,7 +18,7 @@
* programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA, 02111-1307, USA
*
- * Este programa está nomeado como actions.c e possui - linhas de código.
+ * Este programa está nomeado como - e possui - linhas de código.
*
* Contatos:
*
@@ -27,6 +27,11 @@
*
*/
+/**
+ * @brief Implements the action table.
+ *
+ */
+
#include
#include
#include
@@ -39,14 +44,19 @@
return lib3270_save_all(hSession,NULL);
}
- static int paste_file(H3270 *hSession)
+ static int save_selected(H3270 *hSession)
{
- return lib3270_load(hSession,NULL);
+ return lib3270_save_selected(hSession,NULL);
}
- static int print(H3270 *hSession)
+ static int save_copy(H3270 *hSession)
{
- return lib3270_print(hSession);
+ return lib3270_save_copy(hSession,NULL);
+ }
+
+ static int paste_file(H3270 *hSession)
+ {
+ return lib3270_load(hSession,NULL);
}
static int connect_host(H3270 *hSession)
@@ -72,7 +82,8 @@
"connect",
NULL,
N_( "Connect to host." ),
- connect_host
+ connect_host,
+ lib3270_is_disconnected
},
{
@@ -81,7 +92,8 @@
"disconnect",
NULL,
N_( "Disconnect from host." ),
- lib3270_disconnect
+ lib3270_disconnect,
+ lib3270_is_connected
},
//
@@ -93,7 +105,8 @@
NULL,
NULL,
N_( "Cursor up 1 position." ),
- lib3270_cursor_up
+ lib3270_cursor_up,
+ lib3270_is_connected
},
{
@@ -102,7 +115,8 @@
NULL,
NULL,
N_( "Cursor down 1 position." ),
- lib3270_cursor_down
+ lib3270_cursor_down,
+ lib3270_is_connected
},
{
@@ -111,7 +125,8 @@
NULL,
NULL,
N_( "Cursor left 1 position." ),
- lib3270_cursor_left
+ lib3270_cursor_left,
+ lib3270_is_connected
},
{
@@ -120,7 +135,8 @@
NULL,
NULL,
N_( "Cursor right 1 position." ),
- lib3270_cursor_right
+ lib3270_cursor_right,
+ lib3270_is_connected
},
{
@@ -129,7 +145,8 @@
NULL,
NULL,
N_( "Cursor to first field on next line or any lines after that." ),
- lib3270_newline
+ lib3270_newline,
+ lib3270_is_connected
},
{
@@ -138,7 +155,8 @@
NULL,
NULL,
N_( "Cursor to previous word." ),
- lib3270_previousword
+ lib3270_previousword,
+ lib3270_is_connected
},
{
@@ -147,7 +165,8 @@
NULL,
NULL,
N_( "Cursor to next unprotected word." ),
- lib3270_nextword
+ lib3270_nextword,
+ lib3270_is_connected
},
//
@@ -159,7 +178,28 @@
"document-save",
NULL,
N_( "Save screen." ),
- save_all
+ save_all,
+ lib3270_is_connected
+ },
+
+ {
+ "saveselected",
+ NULL,
+ NULL,
+ NULL,
+ N_( "Save selected area." ),
+ save_selected,
+ lib3270_has_selection
+ },
+
+ {
+ "savecopy",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ save_copy,
+ lib3270_is_connected
},
{
@@ -168,7 +208,8 @@
"document-load",
NULL,
N_( "Paste file." ),
- paste_file
+ paste_file,
+ lib3270_is_connected
},
//
@@ -180,16 +221,8 @@
"edit-select-all",
NULL,
NULL,
- lib3270_select_all
- },
-
- {
- "select_field",
- "f",
- NULL,
- NULL,
- N_( "Select Field" ),
- lib3270_select_field
+ lib3270_select_all,
+ lib3270_is_connected
},
{
@@ -198,7 +231,8 @@
NULL,
NULL,
N_( "Remove selection" ),
- lib3270_unselect
+ lib3270_unselect,
+ lib3270_has_selection
},
{
@@ -207,20 +241,32 @@
NULL,
NULL,
N_( "Reselect"),
- lib3270_reselect
+ lib3270_reselect,
+ lib3270_is_connected
},
-
//
// Field actions.
//
{
+ "select_field",
+ "f",
+ NULL,
+ NULL,
+ N_( "Select Field" ),
+ lib3270_select_field,
+ lib3270_is_formatted
+ },
+
+
+ {
"fieldend",
NULL,
NULL,
NULL,
N_( "Move the cursor to the first blank after the last nonblank in the field." ),
- lib3270_fieldend
+ lib3270_fieldend,
+ lib3270_is_formatted
},
{
@@ -229,7 +275,8 @@
"go-first",
NULL,
N_( "Move to first unprotected field on screen." ),
- lib3270_firstfield
+ lib3270_firstfield,
+ lib3270_is_formatted
},
{
@@ -238,7 +285,8 @@
"go-next",
NULL,
N_( "Tab forward to next field." ),
- lib3270_nextfield
+ lib3270_nextfield,
+ lib3270_is_formatted
},
{
@@ -247,7 +295,8 @@
"go-previous",
NULL,
N_( "Tab backward to previous field." ),
- lib3270_previousfield
+ lib3270_previousfield,
+ lib3270_is_formatted
},
@@ -260,7 +309,8 @@
NULL,
NULL,
N_( "Backspaces the cursor until it hits the front of a word." ),
- lib3270_deleteword
+ lib3270_deleteword,
+ lib3270_is_connected
},
{
@@ -269,7 +319,8 @@
NULL,
NULL,
N_( "Delete field" ),
- lib3270_deletefield
+ lib3270_deletefield,
+ lib3270_is_formatted
},
@@ -279,7 +330,8 @@
NULL,
NULL,
NULL,
- lib3270_eraseinput
+ lib3270_eraseinput,
+ lib3270_is_connected
},
{
@@ -288,7 +340,8 @@
NULL,
NULL,
N_( "Erase End Of Field Key." ),
- lib3270_eraseeof
+ lib3270_eraseeof,
+ lib3270_is_formatted
},
{
@@ -297,7 +350,8 @@
NULL,
NULL,
N_( "Erase End Of Line Key." ),
- lib3270_eraseeol
+ lib3270_eraseeol,
+ lib3270_is_connected
},
{
@@ -306,7 +360,8 @@
NULL,
NULL,
NULL,
- lib3270_erase
+ lib3270_erase,
+ lib3270_is_connected
},
//
@@ -318,7 +373,8 @@
NULL,
NULL,
N_( "Send an \"Enter\" action." ),
- lib3270_enter
+ lib3270_enter,
+ lib3270_is_connected
},
@@ -328,7 +384,8 @@
NULL,
NULL,
NULL,
- lib3270_kybdreset
+ lib3270_kybdreset,
+ lib3270_is_connected
},
{
@@ -337,7 +394,8 @@
NULL,
NULL,
N_( "Clear AID key" ),
- lib3270_clear
+ lib3270_clear,
+ lib3270_is_connected
},
@@ -347,7 +405,8 @@
NULL,
NULL,
NULL,
- lib3270_delete
+ lib3270_delete,
+ lib3270_is_connected
},
{
@@ -356,7 +415,8 @@
NULL,
NULL,
N_( "DUP key" ),
- lib3270_dup
+ lib3270_dup,
+ lib3270_is_connected
},
{
@@ -365,7 +425,8 @@
NULL,
NULL,
N_( "FM key" ),
- lib3270_fieldmark
+ lib3270_fieldmark,
+ lib3270_is_connected
},
{
@@ -374,7 +435,8 @@
NULL,
NULL,
N_( "3270-style backspace." ),
- lib3270_backspace
+ lib3270_backspace,
+ lib3270_is_connected
},
{
@@ -382,8 +444,9 @@
"Escape",
NULL,
NULL,
- "ATTN key, per RFC 2355. Sends IP, regardless.",
- lib3270_attn
+ N_( "ATTN key, per RFC 2355. Sends IP, regardless." ),
+ lib3270_attn,
+ lib3270_is_connected
},
{
@@ -392,7 +455,8 @@
NULL,
NULL,
NULL,
- lib3270_break
+ lib3270_break,
+ lib3270_is_connected
},
{
@@ -401,7 +465,8 @@
NULL,
NULL,
NULL,
- lib3270_paste_next
+ lib3270_paste_next,
+ lib3270_is_connected
},
{
@@ -410,7 +475,8 @@
NULL,
NULL,
NULL,
- lib3270_sysreq
+ lib3270_sysreq,
+ lib3270_is_connected
},
//
@@ -421,8 +487,39 @@
"Print",
"document-print",
NULL,
+ N_("If the terminal has selected area print tje selected area, if not, print all contents."),
+ lib3270_print,
+ lib3270_is_connected
+ },
+
+ {
+ "printall",
+ NULL,
+ NULL,
+ NULL,
+ N_("Print screen contents"),
+ lib3270_print_all,
+ lib3270_is_connected
+ },
+
+ {
+ "printselected",
+ NULL,
+ NULL,
NULL,
- print
+ N_( "Print selected area." ),
+ lib3270_print_selected,
+ lib3270_has_selection
+ },
+
+ {
+ "printcopy",
+ NULL,
+ NULL,
+ NULL,
+ N_("Print copy (if available)"),
+ lib3270_print_copy,
+ lib3270_is_connected
},
//
@@ -435,7 +532,8 @@
NULL,
NULL,
NULL,
- lib3270_testpattern
+ lib3270_testpattern,
+ lib3270_is_disconnected
},
{
@@ -444,7 +542,8 @@
NULL,
NULL,
NULL,
- lib3270_charsettable
+ lib3270_charsettable,
+ lib3270_is_disconnected
},
{
@@ -453,6 +552,7 @@
NULL,
NULL,
NULL,
+ NULL,
NULL
}
};
diff --git a/src/core/ctlr.c b/src/core/ctlr.c
index 77abdfd..4240e4d 100644
--- a/src/core/ctlr.c
+++ b/src/core/ctlr.c
@@ -318,10 +318,10 @@ static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UN
hSession->crm_nattr = 0;
}
-LIB3270_EXPORT int lib3270_get_is_formatted(const H3270 *hSession)
+LIB3270_EXPORT int lib3270_is_formatted(const H3270 *hSession)
{
if(check_online_session(hSession))
- return -1;
+ return 0;
return hSession->formatted ? 1 : 0;
}
diff --git a/src/core/properties/boolean.c b/src/core/properties/boolean.c
index 3f6cf52..5e84843 100644
--- a/src/core/properties/boolean.c
+++ b/src/core/properties/boolean.c
@@ -151,7 +151,7 @@
{
"formatted", // Property name.
N_( "Formatted screen" ), // Property description.
- lib3270_get_is_formatted, // Get value.
+ lib3270_is_formatted, // Get value.
NULL // Set value.
},
diff --git a/src/core/state.c b/src/core/state.c
index 048ec3c..a7bbe1b 100644
--- a/src/core/state.c
+++ b/src/core/state.c
@@ -51,7 +51,7 @@ LIB3270_EXPORT int lib3270_connected(const H3270 *h)
return ((int) h->cstate >= (int)LIB3270_CONNECTED_INITIAL);
}
-LIB3270_EXPORT int lib3270_disconnected(const H3270 *h)
+LIB3270_EXPORT int lib3270_is_disconnected(const H3270 *h)
{
return ((int) h->cstate == (int)LIB3270_NOT_CONNECTED);
}
diff --git a/src/include/action_table.h b/src/include/action_table.h
new file mode 100644
index 0000000..d303c32
--- /dev/null
+++ b/src/include/action_table.h
@@ -0,0 +1,95 @@
+/*
+ * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
+ * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
+ * aplicativos mainframe. Registro no INPI sob o nome G3270.
+ *
+ * Copyright (C) <2008>
+ *
+ * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
+ * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
+ * Free Software Foundation.
+ *
+ * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
+ * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
+ * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
+ * obter mais detalhes.
+ *
+ * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
+ * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
+ * St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Este programa está nomeado como actions.h e possui - linhas de código.
+ *
+ * Contatos:
+ *
+ * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
+ * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
+ * licinio@bb.com.br (Licínio Luis Branco)
+ * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
+ *
+ */
+
+ #error Deprecated
+
+ /*
+ * Action call table.
+ *
+ * Usually this definitions are used to declare lib3270's action table but,
+ * if you redefine the creation macros it can be used to build a callback
+ * table for g_object_connect calls.
+ *
+ */
+
+ /* Keyboard actions */
+ DECLARE_LIB3270_KEY_ACTION( enter, "Send an \"Enter\" action." )
+
+ DECLARE_LIB3270_FKEY_ACTION( pfkey, "" )
+ DECLARE_LIB3270_FKEY_ACTION( pakey, "" )
+
+ /* Cursor movement */
+ DECLARE_LIB3270_CURSOR_ACTION( up, "Cursor up 1 position." )
+ DECLARE_LIB3270_CURSOR_ACTION( down, "Cursor down 1 position." )
+ DECLARE_LIB3270_CURSOR_ACTION( left, "Cursor left 1 position." )
+ DECLARE_LIB3270_CURSOR_ACTION( right, "Cursor right 1 position." )
+
+ DECLARE_LIB3270_ACTION( newline, "Cursor to first field on next line or any lines after that." )
+
+ /* Misc actions */
+ DECLARE_LIB3270_ACTION( kybdreset, "" )
+ DECLARE_LIB3270_ACTION( clear, "Clear AID key" )
+ DECLARE_LIB3270_ACTION( eraseinput, "" )
+
+ DECLARE_LIB3270_ACTION( select_field, "" )
+ DECLARE_LIB3270_ACTION( select_all, "" )
+ DECLARE_LIB3270_ACTION( unselect, "" )
+ DECLARE_LIB3270_ACTION( reselect, "" )
+
+ DECLARE_LIB3270_ACTION( eraseeof, "Erase End Of Field Key." )
+ DECLARE_LIB3270_ACTION( eraseeol, "Erase End Of Line Key." )
+ DECLARE_LIB3270_ACTION( erase, "" )
+ DECLARE_LIB3270_ACTION( delete, "" )
+ DECLARE_LIB3270_ACTION( dup, "DUP key" )
+ DECLARE_LIB3270_ACTION( fieldmark, "FM key" )
+
+ DECLARE_LIB3270_ACTION( backspace, "3270-style backspace." )
+
+ DECLARE_LIB3270_ACTION( previousword, "Cursor to previous word." )
+ DECLARE_LIB3270_ACTION( nextword, "Cursor to next unprotected word." )
+ DECLARE_LIB3270_ACTION( fieldend, "Move the cursor to the first blank after the last nonblank in the field." )
+
+ DECLARE_LIB3270_ACTION( firstfield, "Move to first unprotected field on screen." )
+ DECLARE_LIB3270_ACTION( nextfield, "" )
+ DECLARE_LIB3270_ACTION( previousfield, "Tab backward to previous field." )
+
+ DECLARE_LIB3270_ACTION( attn, "ATTN key, per RFC 2355. Sends IP, regardless." )
+ DECLARE_LIB3270_ACTION( break, "" )
+ DECLARE_LIB3270_ACTION( pastenext, "" )
+
+ DECLARE_LIB3270_ACTION( deleteword, "Backspaces the cursor until it hits the front of a word (does a ^W)." )
+ DECLARE_LIB3270_ACTION( deletefield, "Delete field key (does a ^U)." )
+ DECLARE_LIB3270_ACTION( sysreq, "" )
+
+ DECLARE_LIB3270_ACTION( testpattern, "" )
+ DECLARE_LIB3270_ACTION( charsettable, "" )
+
+
diff --git a/src/include/lib3270.h b/src/include/lib3270.h
index f99ff41..e8adb8e 100644
--- a/src/include/lib3270.h
+++ b/src/include/lib3270.h
@@ -983,14 +983,15 @@
LIB3270_EXPORT int lib3270_set_luname(H3270 *hSession, const char *luname);
+ LIB3270_EXPORT int lib3270_is_connected(const H3270 *h);
+ LIB3270_EXPORT int lib3270_is_disconnected(const H3270 *h);
+
LIB3270_EXPORT int lib3270_has_active_script(const H3270 *h);
LIB3270_EXPORT int lib3270_get_typeahead(const H3270 *h);
LIB3270_EXPORT int lib3270_get_undera(const H3270 *h);
LIB3270_EXPORT int lib3270_get_oia_box_solid(const H3270 *h);
LIB3270_EXPORT int lib3270_pconnected(const H3270 *h);
LIB3270_EXPORT int lib3270_half_connected(const H3270 *h);
- LIB3270_EXPORT int lib3270_connected(const H3270 *h);
- LIB3270_EXPORT int lib3270_disconnected(const H3270 *h);
LIB3270_EXPORT int lib3270_in_neither(const H3270 *h);
LIB3270_EXPORT int lib3270_in_ansi(const H3270 *h);
LIB3270_EXPORT int lib3270_in_3270(const H3270 *h);
@@ -1189,7 +1190,7 @@
* @retval 0 Screen is not formatted.
* @retval 1 Screen is formatted.
*/
- LIB3270_EXPORT int lib3270_get_is_formatted(const H3270 *hSession);
+ LIB3270_EXPORT int lib3270_is_formatted(const H3270 *hSession);
/**
* @brief Get Check if the screen position is protected.
diff --git a/src/include/lib3270/action_table.h b/src/include/lib3270/action_table.h
deleted file mode 100644
index d303c32..0000000
--- a/src/include/lib3270/action_table.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
- * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
- * aplicativos mainframe. Registro no INPI sob o nome G3270.
- *
- * Copyright (C) <2008>
- *
- * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
- * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
- * Free Software Foundation.
- *
- * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
- * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
- * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
- * obter mais detalhes.
- *
- * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
- * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
- * St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Este programa está nomeado como actions.h e possui - linhas de código.
- *
- * Contatos:
- *
- * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
- * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça)
- * licinio@bb.com.br (Licínio Luis Branco)
- * kraucer@bb.com.br (Kraucer Fernandes Mazuco)
- *
- */
-
- #error Deprecated
-
- /*
- * Action call table.
- *
- * Usually this definitions are used to declare lib3270's action table but,
- * if you redefine the creation macros it can be used to build a callback
- * table for g_object_connect calls.
- *
- */
-
- /* Keyboard actions */
- DECLARE_LIB3270_KEY_ACTION( enter, "Send an \"Enter\" action." )
-
- DECLARE_LIB3270_FKEY_ACTION( pfkey, "" )
- DECLARE_LIB3270_FKEY_ACTION( pakey, "" )
-
- /* Cursor movement */
- DECLARE_LIB3270_CURSOR_ACTION( up, "Cursor up 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( down, "Cursor down 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( left, "Cursor left 1 position." )
- DECLARE_LIB3270_CURSOR_ACTION( right, "Cursor right 1 position." )
-
- DECLARE_LIB3270_ACTION( newline, "Cursor to first field on next line or any lines after that." )
-
- /* Misc actions */
- DECLARE_LIB3270_ACTION( kybdreset, "" )
- DECLARE_LIB3270_ACTION( clear, "Clear AID key" )
- DECLARE_LIB3270_ACTION( eraseinput, "" )
-
- DECLARE_LIB3270_ACTION( select_field, "" )
- DECLARE_LIB3270_ACTION( select_all, "" )
- DECLARE_LIB3270_ACTION( unselect, "" )
- DECLARE_LIB3270_ACTION( reselect, "" )
-
- DECLARE_LIB3270_ACTION( eraseeof, "Erase End Of Field Key." )
- DECLARE_LIB3270_ACTION( eraseeol, "Erase End Of Line Key." )
- DECLARE_LIB3270_ACTION( erase, "" )
- DECLARE_LIB3270_ACTION( delete, "" )
- DECLARE_LIB3270_ACTION( dup, "DUP key" )
- DECLARE_LIB3270_ACTION( fieldmark, "FM key" )
-
- DECLARE_LIB3270_ACTION( backspace, "3270-style backspace." )
-
- DECLARE_LIB3270_ACTION( previousword, "Cursor to previous word." )
- DECLARE_LIB3270_ACTION( nextword, "Cursor to next unprotected word." )
- DECLARE_LIB3270_ACTION( fieldend, "Move the cursor to the first blank after the last nonblank in the field." )
-
- DECLARE_LIB3270_ACTION( firstfield, "Move to first unprotected field on screen." )
- DECLARE_LIB3270_ACTION( nextfield, "" )
- DECLARE_LIB3270_ACTION( previousfield, "Tab backward to previous field." )
-
- DECLARE_LIB3270_ACTION( attn, "ATTN key, per RFC 2355. Sends IP, regardless." )
- DECLARE_LIB3270_ACTION( break, "" )
- DECLARE_LIB3270_ACTION( pastenext, "" )
-
- DECLARE_LIB3270_ACTION( deleteword, "Backspaces the cursor until it hits the front of a word (does a ^W)." )
- DECLARE_LIB3270_ACTION( deletefield, "Delete field key (does a ^U)." )
- DECLARE_LIB3270_ACTION( sysreq, "" )
-
- DECLARE_LIB3270_ACTION( testpattern, "" )
- DECLARE_LIB3270_ACTION( charsettable, "" )
-
-
diff --git a/src/include/lib3270/actions.h b/src/include/lib3270/actions.h
index 414d31a..877e60d 100644
--- a/src/include/lib3270/actions.h
+++ b/src/include/lib3270/actions.h
@@ -35,12 +35,13 @@
typedef struct _lib3270_action_entry
{
- const char *name; ///< @brief Action name.
- const char *key; ///< @brief Default key (or NULL if no default).
- const char *icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
- const char *label; ///< @brief Label (or NULL).
- const char *tooltip; ///< @brief Description (or NULL).
- int (*call)(H3270 *hSession); ///< @brief lib3270 associated method.
+ const char *name; ///< @brief Action name.
+ const char *key; ///< @brief Default key (or NULL if no default).
+ const char *icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
+ const char *label; ///< @brief Button label (or NULL).
+ const char *summary; ///< @brief Short description (or NULL).
+ int (*call)(H3270 *hSession); ///< @brief lib3270 associated method.
+ int (*enabled)(const H3270 *hSession); ///< @brief Is the action enabled?
} LIB3270_ACTION_ENTRY;
/**
@@ -457,6 +458,10 @@
* @param hSession TN3270 Session handle.
* @param name Name of the action to call.
*
+ * @return The action return code.
+ *
+ * @retval EPERM Action is disabled.
+ *
*/
LIB3270_EXPORT int lib3270_action(H3270 *hSession, const char *name);
--
libgit2 0.21.2