diff --git a/src/java/terminal.java b/src/java/terminal.java index 97bece0..e4f96a3 100644 --- a/src/java/terminal.java +++ b/src/java/terminal.java @@ -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 lib3270.java e possui - linhas de código. + * Este programa está nomeado como terminal.java e possui - linhas de código. * * Contatos: * @@ -46,6 +46,9 @@ public class terminal * ready for reading. * * @param seconds Maximum time (in seconds) to wait for. + * + * @return 0 for success, error code if not. + * */ public native int wait_for_ready(int seconds); @@ -98,23 +101,115 @@ public class terminal */ public native String get_string_at(int row, int col, int sz); + /** + * Set terminal contents at position. + * + * @param row Row for starting of change. + * @param col Column for starting of change. + * @param str Text to set. + * + * @return 0 if ok, error code if not. + * + */ public native int set_string_at(int row, int col, String str); + + /** + * Compare terminal contents. + * + * @param row Row for text to compare. + * @param col Column for text to compare. + * @param text String to compare. + * + * @return result of strcmp() from text and terminal contents. + * + */ public native int cmp_string_at(int row, int col, String text); + + public native int input_string(String str); // Cursor management + + /** + * Move cursor to selected position. + * + * @param row Row of the new cursor position. + * @param col Column of the new cursor position. + * + * @return Address of current cursor position. + * + */ public native int set_cursor_position(int row, int col); + + /** + * Set cursor offset in the terminal buffer. + * + * @param addr New cursor offset. + * + * @return Original cursor offset. + * + */ public native int set_cursor_addr(int addr); + + /** + * Get cursor offset + * + * @return Current cursor offset. + * + */ public native int get_cursor_addr(); // Keyboard actions + + /** + * Send an "ENTER" action. + * + * @return reserved. + * + */ public native int enter(); + + /** + * Send a pfkey to host. + * + * @param key PFkey number. + * + * @return reserved. + * + */ public native int pfkey(int key); + + /** + * Send a pakey to host. + * + * @param key PFkey number. + * + * @return reserved. + * + */ public native int pakey(int key); // Actions + + /** + * quit remote pw3270 window. + *

+ * Only valid if connected to a remote window + * + * @return reserved. + * + */ public native int quit(); + + /** + * Erase from cursor position until the end of the field. + * + * @return reserved. + * + */ public native int erase_eof(); + + public native int print(); // Connect/Disconnect @@ -133,12 +228,16 @@ public class terminal * @param host Host URI. * @param seconds How many seconds to wait for a connection. * + * @return 0 if ok, error code if not. + * */ public native int connect(String host, int seconds); /** * Disconnect from host. * + * @return 0 if ok, error code if not. + * */ public native int disconnect(); -- libgit2 0.21.2