From: Vladimir Serbinenko Date: Mon, 28 Oct 2013 15:46:36 +0000 (+0100) Subject: Import brltty X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16fba4d65d47c5951af2a5e10fb605438f5fbed5;p=thirdparty%2Fgrub.git Import brltty --- diff --git a/grub-core/braille/brltty/Bindings/Java/Brlapi.java b/grub-core/braille/brltty/Bindings/Java/Brlapi.java new file mode 100644 index 000000000..6a24879b9 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Brlapi.java @@ -0,0 +1,90 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Brlapi extends Native implements Constants { + protected final ConnectionSettings settings; + protected final int fileDescriptor; + + public Brlapi (ConnectionSettings settings) throws Error { + this.settings = new ConnectionSettings(); + fileDescriptor = openConnection(settings, this.settings); + } + + protected void finalize () { + closeConnection(); + } + + public String getHost () { + return settings.host; + } + + public String getAuth () { + return settings.auth; + } + + public int getFileDescriptor () { + return fileDescriptor; + } + + public int enterTtyMode (int tty) throws Error { + return enterTtyMode(tty, null); + } + + public int enterTtyMode (String driver) throws Error { + return enterTtyMode(TTY_DEFAULT, driver); + } + + public int enterTtyMode () throws Error { + return enterTtyMode(null); + } + + public void enterTtyModeWithPath (int ttys[]) throws Error { + enterTtyModeWithPath(ttys, null); + } + + public void writeText (int cursor) throws Error { + writeText(cursor, null); + } + + public void writeText (String text) throws Error { + writeText(CURSOR_OFF, text); + } + + public void writeText (String text, int cursor) throws Error { + writeText(cursor, text); + } + + public void writeText (int cursor, String text) throws Error { + if (text != null) { + DisplaySize size = getDisplaySize(); + int count = size.getWidth() * size.getHeight(); + + { + StringBuffer sb = new StringBuffer(text); + while (sb.length() < count) sb.append(' '); + text = sb.toString(); + } + + text = text.substring(0, count); + } + writeTextNative(cursor, text); + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/ConnectionSettings.java b/grub-core/braille/brltty/Bindings/Java/ConnectionSettings.java new file mode 100644 index 000000000..6fb0cb441 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/ConnectionSettings.java @@ -0,0 +1,38 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class ConnectionSettings { + public String host; + public String auth; + + public ConnectionSettings (String host, String auth) { + this.host = host; + this.auth = auth; + } + + public ConnectionSettings (String host) { + this(host, null); + } + + public ConnectionSettings () { + this(null); + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/Constants.java b/grub-core/braille/brltty/Bindings/Java/Constants.java new file mode 100644 index 000000000..9917ef505 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Constants.java @@ -0,0 +1,426 @@ +package org.a11y.BrlAPI; + +public interface Constants { + int TTY_DEFAULT = -1; + /** */ + int DISPLAY_DEFAULT = -1; + /** */ + int CURSOR_LEAVE = -1; + /** */ + int CURSOR_OFF = 0; + int rangeType_all = 0; + int rangeType_type = 1; + int rangeType_command = 2; + int rangeType_key = 3; + int rangeType_code = 4; + /** */ + int ERROR_SUCCESS = 0; + /** */ + int ERROR_NOMEM = 1; + /** */ + int ERROR_TTYBUSY = 2; + /** */ + int ERROR_DEVICEBUSY = 3; + /** */ + int ERROR_UNKNOWN_INSTRUCTION = 4; + /** */ + int ERROR_ILLEGAL_INSTRUCTION = 5; + /** */ + int ERROR_INVALID_PARAMETER = 6; + /** */ + int ERROR_INVALID_PACKET = 7; + /** */ + int ERROR_CONNREFUSED = 8; + /** */ + int ERROR_OPNOTSUPP = 9; + /** */ + int ERROR_GAIERR = 10; + /** */ + int ERROR_LIBCERR = 11; + /** */ + int ERROR_UNKNOWNTTY = 12; + /** */ + int ERROR_PROTOCOL_VERSION = 13; + /** */ + int ERROR_EOF = 14; + /** */ + int ERROR_EMPTYKEY = 15; + /** */ + int ERROR_DRIVERERROR = 16; + /** */ + int ERROR_AUTHENTICATION = 17; + /** */ + long KEY_MAX = 0xffffffffffffffffL; + /** */ + long KEY_FLAGS_MASK = 0xffffffff00000000L; + /** */ + int KEY_FLAGS_SHIFT = 32; + /** */ + long KEY_TYPE_MASK = 0xe0000000L; + /** */ + int KEY_TYPE_SHIFT = 29; + /** */ + int KEY_TYPE_CMD = 0x20000000; + /** */ + int KEY_TYPE_SYM = 0x0; + /** */ + long KEY_CODE_MASK = 0x1fffffffL; + /** */ + int KEY_CODE_SHIFT = 0; + /** */ + long KEY_CMD_BLK_MASK = 0x1fff0000L; + /** */ + int KEY_CMD_BLK_SHIFT = 16; + /** */ + long KEY_CMD_ARG_MASK = 0xffffL; + /** */ + int KEY_CMD_ARG_SHIFT = 0; + /** */ + int KEY_SYM_BACKSPACE = 0xff08; + /** */ + int KEY_SYM_TAB = 0xff09; + /** */ + int KEY_SYM_LINEFEED = 0xff0d; + /** */ + int KEY_SYM_ESCAPE = 0xff1b; + /** */ + int KEY_SYM_HOME = 0xff50; + /** */ + int KEY_SYM_LEFT = 0xff51; + /** */ + int KEY_SYM_UP = 0xff52; + /** */ + int KEY_SYM_RIGHT = 0xff53; + /** */ + int KEY_SYM_DOWN = 0xff54; + /** */ + int KEY_SYM_PAGE_UP = 0xff55; + /** */ + int KEY_SYM_PAGE_DOWN = 0xff56; + /** */ + int KEY_SYM_END = 0xff57; + /** */ + int KEY_SYM_INSERT = 0xff63; + /** */ + int KEY_SYM_F1 = (0xffbe + 0); + /** */ + int KEY_SYM_F2 = (0xffbe + 1); + /** */ + int KEY_SYM_F3 = (0xffbe + 2); + /** */ + int KEY_SYM_F4 = (0xffbe + 3); + /** */ + int KEY_SYM_F5 = (0xffbe + 4); + /** */ + int KEY_SYM_F6 = (0xffbe + 5); + /** */ + int KEY_SYM_F7 = (0xffbe + 6); + /** */ + int KEY_SYM_F8 = (0xffbe + 7); + /** */ + int KEY_SYM_F9 = (0xffbe + 8); + /** */ + int KEY_SYM_F10 = (0xffbe + 9); + /** */ + int KEY_SYM_F11 = (0xffbe + 10); + /** */ + int KEY_SYM_F12 = (0xffbe + 11); + /** */ + int KEY_SYM_F13 = (0xffbe + 12); + /** */ + int KEY_SYM_F14 = (0xffbe + 13); + /** */ + int KEY_SYM_F15 = (0xffbe + 14); + /** */ + int KEY_SYM_F16 = (0xffbe + 15); + /** */ + int KEY_SYM_F17 = (0xffbe + 16); + /** */ + int KEY_SYM_F18 = (0xffbe + 17); + /** */ + int KEY_SYM_F19 = (0xffbe + 18); + /** */ + int KEY_SYM_F20 = (0xffbe + 19); + /** */ + int KEY_SYM_F21 = (0xffbe + 20); + /** */ + int KEY_SYM_F22 = (0xffbe + 21); + /** */ + int KEY_SYM_F23 = (0xffbe + 22); + /** */ + int KEY_SYM_F24 = (0xffbe + 23); + /** */ + int KEY_SYM_F25 = (0xffbe + 24); + /** */ + int KEY_SYM_F26 = (0xffbe + 25); + /** */ + int KEY_SYM_F27 = (0xffbe + 26); + /** */ + int KEY_SYM_F28 = (0xffbe + 27); + /** */ + int KEY_SYM_F29 = (0xffbe + 28); + /** */ + int KEY_SYM_F30 = (0xffbe + 29); + /** */ + int KEY_SYM_F31 = (0xffbe + 30); + /** */ + int KEY_SYM_F32 = (0xffbe + 31); + /** */ + int KEY_SYM_F33 = (0xffbe + 32); + /** */ + int KEY_SYM_F34 = (0xffbe + 33); + /** */ + int KEY_SYM_F35 = (0xffbe + 34); + /** */ + int KEY_SYM_DELETE = 0xffff; + /** */ + int KEY_SYM_UNICODE = 0x1000000; + /** do nothing */ + int KEY_CMD_NOOP = 0; + /** go up one line */ + int KEY_CMD_LNUP = 1; + /** go down one line */ + int KEY_CMD_LNDN = 2; + /** go up several lines */ + int KEY_CMD_WINUP = 3; + /** go down several lines */ + int KEY_CMD_WINDN = 4; + /** go up to nearest line with different content */ + int KEY_CMD_PRDIFLN = 5; + /** go down to nearest line with different content */ + int KEY_CMD_NXDIFLN = 6; + /** go up to nearest line with different highlighting */ + int KEY_CMD_ATTRUP = 7; + /** go down to nearest line with different highlighting */ + int KEY_CMD_ATTRDN = 8; + /** go to top line */ + int KEY_CMD_TOP = 9; + /** go to bottom line */ + int KEY_CMD_BOT = 10; + /** go to beginning of top line */ + int KEY_CMD_TOP_LEFT = 11; + /** go to beginning of bottom line */ + int KEY_CMD_BOT_LEFT = 12; + /** go up to last line of previous paragraph */ + int KEY_CMD_PRPGRPH = 13; + /** go down to first line of next paragraph */ + int KEY_CMD_NXPGRPH = 14; + /** go up to previous command prompt */ + int KEY_CMD_PRPROMPT = 15; + /** go down to next command prompt */ + int KEY_CMD_NXPROMPT = 16; + /** search backward for cut text */ + int KEY_CMD_PRSEARCH = 17; + /** search forward for cut text */ + int KEY_CMD_NXSEARCH = 18; + /** go left one character */ + int KEY_CMD_CHRLT = 19; + /** go right one character */ + int KEY_CMD_CHRRT = 20; + /** go left half a window */ + int KEY_CMD_HWINLT = 21; + /** go right half a window */ + int KEY_CMD_HWINRT = 22; + /** go left one window */ + int KEY_CMD_FWINLT = 23; + /** go right one window */ + int KEY_CMD_FWINRT = 24; + /** go left to nearest non-blank window */ + int KEY_CMD_FWINLTSKIP = 25; + /** go right to nearest non-blank window */ + int KEY_CMD_FWINRTSKIP = 26; + /** go to beginning of line */ + int KEY_CMD_LNBEG = 27; + /** go to end of line */ + int KEY_CMD_LNEND = 28; + /** go to cursor */ + int KEY_CMD_HOME = 29; + /** go back after cursor tracking */ + int KEY_CMD_BACK = 30; + /** go to cursor or go back after cursor tracking */ + int KEY_CMD_RETURN = 31; + /** freeze/unfreeze screen image */ + int KEY_CMD_FREEZE = 32; + /** toggle display mode attributes/text */ + int KEY_CMD_DISPMD = 33; + /** toggle text style 6-dot/8-dot */ + int KEY_CMD_SIXDOTS = 34; + /** toggle sliding window on/off */ + int KEY_CMD_SLIDEWIN = 35; + /** toggle skipping of lines with identical content on/off */ + int KEY_CMD_SKPIDLNS = 36; + /** toggle skipping of blank windows on/off */ + int KEY_CMD_SKPBLNKWINS = 37; + /** toggle cursor visibility on/off */ + int KEY_CMD_CSRVIS = 38; + /** toggle hidden cursor on/off */ + int KEY_CMD_CSRHIDE = 39; + /** toggle cursor tracking on/off */ + int KEY_CMD_CSRTRK = 40; + /** toggle cursor style block/underline */ + int KEY_CMD_CSRSIZE = 41; + /** toggle cursor blinking on/off */ + int KEY_CMD_CSRBLINK = 42; + /** toggle attribute underlining on/off */ + int KEY_CMD_ATTRVIS = 43; + /** toggle attribute blinking on/off */ + int KEY_CMD_ATTRBLINK = 44; + /** toggle capital letter blinking on/off */ + int KEY_CMD_CAPBLINK = 45; + /** toggle alert tunes on/off */ + int KEY_CMD_TUNES = 46; + /** toggle autorepeat on/off */ + int KEY_CMD_AUTOREPEAT = 47; + /** toggle autospeak on/off */ + int KEY_CMD_AUTOSPEAK = 48; + /** enter/leave help display */ + int KEY_CMD_HELP = 49; + /** enter/leave status display */ + int KEY_CMD_INFO = 50; + /** enter/leave command learn mode */ + int KEY_CMD_LEARN = 51; + /** enter/leave preferences menu */ + int KEY_CMD_PREFMENU = 52; + /** save preferences to disk */ + int KEY_CMD_PREFSAVE = 53; + /** restore preferences from disk */ + int KEY_CMD_PREFLOAD = 54; + /** go to first item */ + int KEY_CMD_MENU_FIRST_ITEM = 55; + /** go to last item */ + int KEY_CMD_MENU_LAST_ITEM = 56; + /** go to previous item */ + int KEY_CMD_MENU_PREV_ITEM = 57; + /** go to next item */ + int KEY_CMD_MENU_NEXT_ITEM = 58; + /** select previous choice */ + int KEY_CMD_MENU_PREV_SETTING = 59; + /** select next choice */ + int KEY_CMD_MENU_NEXT_SETTING = 60; + /** stop speaking */ + int KEY_CMD_MUTE = 61; + /** go to current speech position */ + int KEY_CMD_SPKHOME = 62; + /** speak current line */ + int KEY_CMD_SAY_LINE = 63; + /** speak from top of screen through current line */ + int KEY_CMD_SAY_ABOVE = 64; + /** speak from current line through bottom of screen */ + int KEY_CMD_SAY_BELOW = 65; + /** decrease speech rate */ + int KEY_CMD_SAY_SLOWER = 66; + /** increase speech rate */ + int KEY_CMD_SAY_FASTER = 67; + /** decrease speech volume */ + int KEY_CMD_SAY_SOFTER = 68; + /** increase speech volume */ + int KEY_CMD_SAY_LOUDER = 69; + /** switch to previous virtual terminal */ + int KEY_CMD_SWITCHVT_PREV = 70; + /** switch to next virtual terminal */ + int KEY_CMD_SWITCHVT_NEXT = 71; + /** bring cursor to line */ + int KEY_CMD_CSRJMP_VERT = 72; + /** insert cut text at cursor */ + int KEY_CMD_PASTE = 73; + /** restart braille driver */ + int KEY_CMD_RESTARTBRL = 74; + /** restart speech driver */ + int KEY_CMD_RESTARTSPEECH = 75; + /** braille display temporarily unavailable */ + int KEY_CMD_OFFLINE = 76; + /** enable feature */ + int KEY_FLG_TOGGLE_ON = 0x100; + /** disable feature */ + int KEY_FLG_TOGGLE_OFF = 0x200; + /** mask for all toggle flags */ + int KEY_FLG_TOGGLE_MASK = (KEY_FLG_TOGGLE_ON | KEY_FLG_TOGGLE_OFF); + /** bring cursor into window after function */ + int KEY_FLG_MOTION_ROUTE = 0x400; + /** execute command on key press */ + int KEY_FLG_REPEAT_INITIAL = 0x8000; + /** wait before repeating */ + int KEY_FLG_REPEAT_DELAY = 0x4000; + /** mask for all repeat flags */ + int KEY_FLG_REPEAT_MASK = (KEY_FLG_REPEAT_INITIAL | KEY_FLG_REPEAT_DELAY); + /** bring cursor to character */ + int KEY_CMD_ROUTE = 0x10000; + /** start new cut buffer at character */ + int KEY_CMD_CUTBEGIN = 0x20000; + /** append to existing cut buffer from character */ + int KEY_CMD_CUTAPPEND = 0x30000; + /** rectangular cut to character */ + int KEY_CMD_CUTRECT = 0x40000; + /** linear cut to character */ + int KEY_CMD_CUTLINE = 0x50000; + /** switch to virtual terminal */ + int KEY_CMD_SWITCHVT = 0x60000; + /** go up to nearest line with less indent than character */ + int KEY_CMD_PRINDENT = 0x70000; + /** go down to nearest line with less indent than character */ + int KEY_CMD_NXINDENT = 0x80000; + /** describe character */ + int KEY_CMD_DESCCHAR = 0x90000; + /** place left end of window at character */ + int KEY_CMD_SETLEFT = 0xa0000; + /** remember current window position */ + int KEY_CMD_SETMARK = 0xb0000; + /** go to remembered window position */ + int KEY_CMD_GOTOMARK = 0xc0000; + /** go to selected line */ + int KEY_CMD_GOTOLINE = 0xd0000; + /** scale arg=0X00-0XFF to screen height */ + int KEY_FLG_LINE_SCALED = 0x100; + /** go to beginning of line */ + int KEY_FLG_LINE_TOLEFT = 0x200; + /** go up to nearest line with different character */ + int KEY_CMD_PRDIFCHAR = 0xe0000; + /** go down to nearest line with different character */ + int KEY_CMD_NXDIFCHAR = 0xf0000; + /** copy characters to cut buffer */ + int KEY_CMD_COPYCHARS = 0x100000; + /** append characters to cut buffer */ + int KEY_CMD_APNDCHARS = 0x110000; + /** input braille character */ + int KEY_CMD_PASSDOTS = 0x220000; + /** shift key pressed */ + int KEY_FLG_SHIFT = 0x1; + /** convert to uppercase */ + int KEY_FLG_UPPER = 0x2; + /** control key pressed */ + int KEY_FLG_CONTROL = 0x4; + /** meta key pressed */ + int KEY_FLG_META = 0x8; + /** upper-left dot of standard braille cell */ + byte DOT1 = (byte) (0001); + /** middle-left dot of standard braille cell */ + byte DOT2 = (byte) (0002); + /** lower-left dot of standard braille cell */ + byte DOT3 = (byte) (0004); + /** upper-right dot of standard braille cell */ + byte DOT4 = (byte) (0010); + /** middle-right dot of standard braille cell */ + byte DOT5 = (byte) (0020); + /** lower-right dot of standard braille cell */ + byte DOT6 = (byte) (0040); + /** lower-left dot of computer braille cell */ + byte DOT7 = (byte) (0100); + /** lower-right dot of computer braille cell */ + byte DOT8 = (byte) (0200); + /** space key pressed */ + byte DOTC = (byte) (0400); + /** input AT (set 2) keyboard scan code */ + int KEY_CMD_PASSAT = 0x230000; + /** input XT (set 1) keyboard scan code */ + int KEY_CMD_PASSXT = 0x240000; + /** input PS/2 (set 3) keyboard scan code */ + int KEY_CMD_PASSPS2 = 0x250000; + /** it is a release scan code */ + int KEY_FLG_KBD_RELEASE = 0x100; + /** it is an emulation 0 scan code */ + int KEY_FLG_KBD_EMUL0 = 0x200; + /** it is an emulation 1 scan code */ + int KEY_FLG_KBD_EMUL1 = 0x400; + /** switch to command context */ + int KEY_CMD_CONTEXT = 0x260000; +} diff --git a/grub-core/braille/brltty/Bindings/Java/DisplaySize.java b/grub-core/braille/brltty/Bindings/Java/DisplaySize.java new file mode 100644 index 000000000..349a431ed --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/DisplaySize.java @@ -0,0 +1,38 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class DisplaySize { + protected final int width; + protected final int height; + + public DisplaySize (int width, int height) { + this.width = width; + this.height = height; + } + + public int getWidth () { + return width; + } + + public int getHeight () { + return height; + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/Error.java b/grub-core/braille/brltty/Bindings/Java/Error.java new file mode 100644 index 000000000..71692a367 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Error.java @@ -0,0 +1,53 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Error extends java.lang.Error { + static final long serialVersionUID = 0; + int brlerrno; + int libcerrno; + int gaierrno; + String errfun; + public final native String toString (); + public Error (int brlerrno, int libcerrno, int gaierrno, String errfun) { + this.brlerrno = brlerrno; + this.libcerrno = libcerrno; + this.gaierrno = gaierrno; + this.errfun = errfun; + } + + public final static int SUCCESS = 0; /* Success */ + public final static int NOMEM = 1; /* Not enough memory */ + public final static int TTYBUSY = 2; /* Already a connection running in this tty */ + public final static int DEVICEBUSY = 3; /* Already a connection using RAW mode */ + public final static int UNKNOWN_INSTRUCTION = 4; /* Not implemented in protocol */ + public final static int ILLEGAL_INSTRUCTION = 5; /* Forbiden in current mode */ + public final static int INVALID_PARAMETER = 6; /* Out of range or have no sense */ + public final static int INVALID_PACKET = 7; /* Invalid size */ + public final static int CONNREFUSED = 8; /* Connection refused */ + public final static int OPNOTSUPP = 9; /* Operation not supported */ + public final static int GAIERR = 10; /* Getaddrinfo error */ + public final static int LIBCERR = 11; /* Libc error */ + public final static int UNKNOWNTTY = 12; /* Couldn't find out the tty number */ + public final static int PROTOCOL_VERSION = 13; /* Bad protocol version */ + public final static int EOF = 14; /* Unexpected end of file */ + public final static int EMPTYKEY = 15; /* Too many levels of recursion */ + public final static int DRIVERERROR = 16; /* Packet returned by driver too large */ +} diff --git a/grub-core/braille/brltty/Bindings/Java/Exception.java b/grub-core/braille/brltty/Bindings/Java/Exception.java new file mode 100644 index 000000000..5424be45f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Exception.java @@ -0,0 +1,35 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Exception extends java.lang.Exception { + static final long serialVersionUID = 0; + long handle; + int errno; + long packettype; + byte buf[]; + public final native String toString (); + public Exception (long handle, int errno, int packettype, byte buf[]) { + this.handle = handle; + this.errno = errno; + this.packettype = packettype; + this.buf = buf; + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/Key.java b/grub-core/braille/brltty/Bindings/Java/Key.java new file mode 100644 index 000000000..316e34c6f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Key.java @@ -0,0 +1,55 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Key { + protected final long code; + protected int type; + protected int command; + protected int argument; + protected int flags; + + public final native void expandKeyCode (long code); + + public Key (long code) { + this.code = code; + expandKeyCode(code); + } + + public long getCode () { + return code; + } + + public int getType () { + return type; + } + + public int getCommand () { + return command; + } + + public int getArgument () { + return argument; + } + + public int getFlags () { + return flags; + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/Native.java b/grub-core/braille/brltty/Bindings/Java/Native.java new file mode 100644 index 000000000..d16daf202 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Native.java @@ -0,0 +1,63 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Native { + static { + System.loadLibrary("brlapi_java"); + } + + protected long handle; + + protected native int openConnection ( + ConnectionSettings desiredSettings, + ConnectionSettings actualSettings) + throws Error; + public native void closeConnection (); + + public native String getDriverName () throws Error; + public native DisplaySize getDisplaySize () throws Error; + + public native int enterTtyMode (int tty, String driver) throws Error; + public native void enterTtyModeWithPath (int ttys[], String driver) throws Error; + public native void leaveTtyMode () throws Error; + public native void setFocus (int tty) throws Error; + + protected native void writeTextNative (int cursor, String text) throws Error; + public native void writeDots (byte dots[]) throws Error; + public native void write (WriteArguments arguments) throws Error; + + public native long readKey (boolean wait) throws Error; + public native void ignoreKeys (long type, long keys[]) throws Error; + public native void acceptKeys (long type, long keys[]) throws Error; + + public native void ignoreAllKeys () throws Error; + public native void acceptAllKeys () throws Error; + + public native void ignoreKeyRanges (long ranges[][]) throws Error; + public native void acceptKeyRanges (long ranges[][]) throws Error; + + public native void enterRawMode (String driver) throws Error; + public native void leaveRawMode () throws Error; + public native int sendRaw (byte buffer[]) throws Error; + public native int recvRaw (byte buffer[]) throws Error; + + public static native String getPacketTypeName (long type); +} diff --git a/grub-core/braille/brltty/Bindings/Java/Test.java b/grub-core/braille/brltty/Bindings/Java/Test.java new file mode 100644 index 000000000..1306bbdc5 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/Test.java @@ -0,0 +1,103 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class Test { + public static void main(String argv[]) { + ConnectionSettings settings = new ConnectionSettings(); + + { + int argi = 0; + while (argi < argv.length) { + String arg = argv[argi++]; + + if (arg.equals("-host")) { + if (argi == argv.length) { + System.err.println("Missing host specification."); + System.exit(2); + } + + settings.host = argv[argi++]; + continue; + } + + System.err.println("Invalid option: " + arg); + System.exit(2); + } + } + + try { + System.out.print("Connecting to BrlAPI... "); + Brlapi brlapi = new Brlapi(settings); + System.out.println("done (fd=" + brlapi.getFileDescriptor() + ")"); + + System.out.print("Connected to " + brlapi.getHost()); + System.out.print(" using key file " + brlapi.getAuth()); + System.out.println(); + + System.out.print("Driver is " + brlapi.getDriverName()); + System.out.println(); + + DisplaySize size = brlapi.getDisplaySize(); + System.out.println("Display size is " + size.getWidth() + "x" + size.getHeight()); + + int tty = brlapi.enterTtyMode(); + System.out.println("TTY is " + tty); + + brlapi.writeText("ok !! €", Brlapi.CURSOR_OFF); + brlapi.writeText(null, 1); + + long key[] = {0}; + brlapi.ignoreKeys(Brlapi.rangeType_all, key); + key[0] = Constants.KEY_TYPE_CMD; + brlapi.acceptKeys(Brlapi.rangeType_type, key); + long keys[][] = {{0,2},{5,7}}; + brlapi.ignoreKeyRanges(keys); + + printKey(new Key(brlapi.readKey(true))); + + { + WriteArguments args = new WriteArguments(); + args.regionBegin = 10; + args.regionSize = 20; + args.text = "Key Pressed € "; + args.andMask = "????????????????????".getBytes(); + args.cursor = 3; + brlapi.write(args); + } + + printKey(new Key(brlapi.readKey(true))); + + brlapi.leaveTtyMode(); + brlapi.closeConnection(); + } catch (Error error) { + System.out.println("got error: " + error); + System.exit(3); + } + } + + private static void printKey (Key key) { + System.out.println("got key " + Long.toHexString(key.getCode()) + " (" + + Integer.toHexString(key.getType()) + "," + + Integer.toHexString(key.getCommand()) + "," + + Integer.toHexString(key.getArgument()) + "," + + Integer.toHexString(key.getFlags()) + ")"); + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/WriteArguments.java b/grub-core/braille/brltty/Bindings/Java/WriteArguments.java new file mode 100644 index 000000000..edf77fd86 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/WriteArguments.java @@ -0,0 +1,33 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +package org.a11y.BrlAPI; + +public class WriteArguments { + public int displayNumber = Brlapi.DISPLAY_DEFAULT; + public int regionBegin = 0; + public int regionSize = 0; + public String text = null; + public byte andMask[] = null; + public byte orMask[] = null; + public int cursor = Brlapi.CURSOR_LEAVE; + + public WriteArguments () { + } +} diff --git a/grub-core/braille/brltty/Bindings/Java/apitest b/grub-core/braille/brltty/Bindings/Java/apitest new file mode 100644 index 000000000..dbe20a7bb --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/apitest @@ -0,0 +1,27 @@ +#!/bin/bash -p +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by +# Samuel Thibault +# Sébastien Hinderer +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +currentDirectory="$(pwd)" + +export LD_LIBRARY_PATH="${currentDirectory}" +export LD_PRELOAD="${currentDirectory}/../../Programs/libbrlapi.so" + +exec java -classpath "${currentDirectory}/classes" org.a11y.BrlAPI.Test "${@}" +exit "${?}" diff --git a/grub-core/braille/brltty/Bindings/Java/bindings.c b/grub-core/braille/brltty/Bindings/Java/bindings.c new file mode 100644 index 000000000..12d62ba10 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/bindings.c @@ -0,0 +1,809 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by + * Samuel Thibault + * Sébastien Hinderer + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +#include +#include +#include +#include +#include + +#define BRLAPI_NO_DEPRECATED +#define BRLAPI_NO_SINGLE_SESSION +#include "brlapi.h" + +#define ERR_NULLPTR 0 +#define ERR_OUTOFMEM 1 +#define ERR_INDEX 2 + +/* TODO: threads */ +static JNIEnv *env; + +static void ThrowException(JNIEnv *jenv, int code, const char *msg) { + jclass excep; + const char *exception; + + switch (code) { + case ERR_NULLPTR: exception = "java/lang/NullPointerException"; break; + case ERR_OUTOFMEM: exception = "java/lang/OutOfMemoryError"; break; + case ERR_INDEX: exception = "java/lang/IndexOutOfBoundsException"; break; + default: exception = "java/lang/UnknownError"; break; + } + + (*jenv)->ExceptionClear(jenv); + excep = (*jenv)->FindClass(jenv, exception); + if (excep) + (*jenv)->ThrowNew(jenv, excep, msg); + else + fprintf(stderr,"couldn't find exception %s !\n",exception); +} + +static void ThrowError(JNIEnv *jenv, const char *msg) { + const char *error = brlapi_strerror(&brlapi_error); + int lenmsg = strlen(msg); + int lenerr = strlen(error); + jclass jcexcep; + jmethodID jinit; + jthrowable jexcep; + jstring errfun = NULL; + + { + char message[lenmsg + 2 + lenerr + 1]; + snprintf(message, sizeof(message), "%s: %s", msg, error); + + if (!(jcexcep = (*jenv)->FindClass(jenv, "org/a11y/BrlAPI/Error"))) { + ThrowException(jenv, ERR_NULLPTR, "ThrowBrlapiErrorFindClass"); + return; + } + if (!(jinit = (*jenv)->GetMethodID(jenv, jcexcep, "", "(IIILjava/lang/String;)V"))) { + ThrowException(jenv, ERR_NULLPTR, "ThrowBrlapiErrorGetMethodID"); + return; + } + if (brlapi_errfun) + errfun = (*jenv)->NewStringUTF(jenv, brlapi_errfun); + if (!(jexcep = (*jenv)->NewObject(jenv, jcexcep, jinit, brlapi_errno, brlapi_libcerrno, brlapi_gaierrno, errfun))) { + ThrowException(jenv, ERR_NULLPTR, "ThrowBrlapiErrorNewObject"); + return; + } + (*jenv)->ExceptionClear(jenv); + (*jenv)->Throw(jenv, jexcep); + } +} + +static void BRLAPI_STDCALL exceptionHandler(brlapi_handle_t *handle, int err, brlapi_packetType_t type, const void *buf, size_t size) { + jarray jbuf; + jclass jcexcep; + jmethodID jinit; + jthrowable jexcep; + + if (!(jbuf = (*env)->NewByteArray(env, size))) { + ThrowException(env, ERR_OUTOFMEM, __func__); + return; + } + (*env)->SetByteArrayRegion(env, jbuf, 0, size, (jbyte *) buf); + + if (!(jcexcep = (*env)->FindClass(env, "org/a11y/BrlAPI/Exception"))) { + ThrowException(env, ERR_NULLPTR, "exceptionHandlerFindClass"); + return; + } + if (!(jinit = (*env)->GetMethodID(env, jcexcep, "", "(JII[B)V"))) { + ThrowException(env, ERR_NULLPTR, "exceptionHandlerGetMethodID"); + return; + } + if (!(jexcep = (*env)->NewObject(env, jcexcep, jinit, (jlong)(intptr_t) handle, err, type, jbuf))) { + ThrowException(env, ERR_NULLPTR, "exceptionHandlerNewObject"); + return; + } + (*env)->ExceptionClear(env); + (*env)->Throw(env, jexcep); + return; +} + +#define GET_CLASS(jenv, class, obj, ret) \ + if (!((class) = (*(jenv))->GetObjectClass((jenv), (obj)))) { \ + ThrowException((jenv), ERR_NULLPTR, #obj " -> " #class); \ + return ret; \ + } +#define GET_ID(jenv, id, class, field, sig, ret) \ + if (!((id) = (*(jenv))->GetFieldID((jenv), (class), (field), (sig)))) {\ + ThrowException((jenv), ERR_NULLPTR, #class "." field); \ + return ret; \ + } +#define GET_HANDLE(jenv, jobj, ret) \ + brlapi_handle_t *handle; \ + jclass jcls; \ + jfieldID handleID; \ + GET_CLASS(jenv, jcls, jobj, ret); \ + GET_ID(jenv, handleID, jcls, "handle", "J", ret); \ + handle = (void*) (intptr_t) (*jenv)->GetLongField(jenv, jobj, handleID); \ + if (!handle) { \ + ThrowException((jenv), ERR_NULLPTR, "connection has been closed"); \ + return ret; \ + } + +JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_openConnection(JNIEnv *jenv, jobject jobj, jobject JclientSettings , jobject JusedSettings) { + jclass jcclientSettings, jcusedSettings; + jfieldID clientAuthID = NULL, clientHostID = NULL, usedAuthID, usedHostID; + brlapi_connectionSettings_t clientSettings, usedSettings, + *PclientSettings, *PusedSettings; + int result; + jstring auth = NULL, host = NULL; + const char *str; + jfieldID handleID; + brlapi_handle_t *handle; + jclass jcls; + + GET_CLASS(jenv, jcls, jobj, -1); + GET_ID(jenv, handleID, jcls, "handle", "J", -1); + handle = malloc(brlapi_getHandleSize()); + if (!handle) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + + (*jenv)->SetLongField(jenv, jobj, handleID, (jlong) (intptr_t) handle); + + env = jenv; + + if (JclientSettings) { + GET_CLASS(jenv, jcclientSettings, JclientSettings, -1); + GET_ID(jenv, clientAuthID, jcclientSettings, "auth", "Ljava/lang/String;", -1); + GET_ID(jenv, clientHostID, jcclientSettings, "host", "Ljava/lang/String;", -1); + + PclientSettings = &clientSettings; + if ((auth = (*jenv)->GetObjectField(jenv, JclientSettings, clientAuthID))) { + if (!(clientSettings.auth = (char *)(*jenv)->GetStringUTFChars(jenv, auth, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + } else clientSettings.auth = NULL; + if ((host = (*jenv)->GetObjectField(jenv, JclientSettings, clientHostID))) { + if (!(clientSettings.host = (char *)(*jenv)->GetStringUTFChars(jenv, host, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + } else clientSettings.host = NULL; + } else PclientSettings = NULL; + + if (JusedSettings) + PusedSettings = &usedSettings; + else + PusedSettings = NULL; + + if ((result = brlapi__openConnection(handle, PclientSettings, PusedSettings)) < 0) { + ThrowError(jenv, __func__); + return -1; + } + + (void) brlapi__setExceptionHandler(handle, exceptionHandler); + + if (JclientSettings) { + if (clientSettings.auth) + (*jenv)->ReleaseStringUTFChars(jenv, auth, clientSettings.auth); + if (clientSettings.host) + (*jenv)->ReleaseStringUTFChars(jenv, host, clientSettings.host); + } + + if (PusedSettings) { + GET_CLASS(jenv, jcusedSettings, JusedSettings, -1); + GET_ID(jenv, usedAuthID, jcusedSettings, "auth", "Ljava/lang/String;", -1); + GET_ID(jenv, usedHostID, jcusedSettings, "host", "Ljava/lang/String;", -1); + + auth = (*jenv)->NewStringUTF(jenv, usedSettings.auth); + if (!auth) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + str = (*jenv)->GetStringUTFChars(jenv, auth, NULL); + (*jenv)->SetObjectField(jenv, JusedSettings, clientAuthID, auth); + (*jenv)->ReleaseStringUTFChars(jenv, auth, str); + + host = (*jenv)->NewStringUTF(jenv, usedSettings.host); + if (!host) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + str = (*jenv)->GetStringUTFChars(jenv, host, NULL); + (*jenv)->SetObjectField(jenv, JusedSettings, clientHostID, host); + (*jenv)->ReleaseStringUTFChars(jenv, host, str); + } + + return (jint) result; +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_closeConnection(JNIEnv *jenv, jobject jobj) { + env = jenv; + GET_HANDLE(jenv, jobj, ); + + brlapi__closeConnection(handle); + free((void*) (intptr_t) handle); + (*jenv)->SetLongField(jenv, jobj, handleID, (jlong) (intptr_t) NULL); +} + +JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Native_getDriverName(JNIEnv *jenv, jobject jobj) { + char name[32]; + GET_HANDLE(jenv, jobj, NULL); + + env = jenv; + + if (brlapi__getDriverName(handle, name, sizeof(name)) < 0) { + ThrowError(jenv, __func__); + return NULL; + } + + name[sizeof(name)-1] = 0; + return (*jenv)->NewStringUTF(jenv, name); +} + +JNIEXPORT jobject JNICALL Java_org_a11y_BrlAPI_Native_getDisplaySize(JNIEnv *jenv, jobject jobj) { + unsigned int x, y; + jclass jcsize; + jmethodID jinit; + jobject jsize; + GET_HANDLE(jenv, jobj, NULL); + + env = jenv; + + if (brlapi__getDisplaySize(handle, &x, &y) < 0) { + ThrowError(jenv, __func__); + return NULL; + } + + if (!(jcsize = (*jenv)->FindClass(jenv, "org/a11y/BrlAPI/DisplaySize"))) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return NULL; + } + if (!(jinit = (*jenv)->GetMethodID(jenv, jcsize, "", "(II)V"))) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return NULL; + } + if (!(jsize = (*jenv)->NewObject(jenv, jcsize, jinit, x, y))) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return NULL; + } + + return jsize; +} + +JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_enterTtyMode(JNIEnv *jenv, jobject jobj, jint jtty, jstring jdriver) { + int tty ; + char *driver; + int result; + GET_HANDLE(jenv, jobj, -1); + + env = jenv; + + tty = (int)jtty; + if (!jdriver) + driver = NULL; + else + if (!(driver = (char *)(*jenv)->GetStringUTFChars(jenv, jdriver, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return -1; + } + + result = brlapi__enterTtyMode(handle, tty,driver); + if (result < 0) { + ThrowError(jenv, __func__); + return -1; + } + + return (jint) result; +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_enterTtyModeWithPath(JNIEnv *jenv, jobject jobj, jintArray jttys, jstring jdriver) { + jint *ttys ; + char *driver; + int result; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!jttys) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + if (!(ttys = (*jenv)->GetIntArrayElements(jenv, jttys, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return; + } + + if (!jdriver) { + driver = NULL; + } else if (!(driver = (char *)(*jenv)->GetStringUTFChars(jenv, jdriver, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return; + } + + result = brlapi__enterTtyModeWithPath(handle, ttys,(*jenv)->GetArrayLength(jenv,jttys),driver); + (*jenv)->ReleaseIntArrayElements(jenv, jttys, ttys, JNI_ABORT); + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_leaveTtyMode(JNIEnv *jenv, jobject jobj) { + env = jenv; + GET_HANDLE(jenv, jobj, ); + + if (brlapi__leaveTtyMode(handle) < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_setFocus(JNIEnv *jenv, jobject jobj, jint jarg1) { + int arg1 ; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + arg1 = (int)jarg1; + if (brlapi__setFocus(handle, arg1) < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_writeTextNative(JNIEnv *jenv, jobject jobj, jint jarg1, jstring jarg2) { + brlapi_writeArguments_t s = BRLAPI_WRITEARGUMENTS_INITIALIZER; + int result; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + s.cursor = (int)jarg1; + + if (jarg2) { + s.regionBegin = 1; + s.regionSize = (*jenv)->GetStringLength(jenv, jarg2); + + if (!(s.text = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return; + } + s.charset = "UTF-8"; + } + + result = brlapi__write(handle, &s); + if (jarg2) + (*jenv)->ReleaseStringUTFChars(jenv, jarg2, s.text); + + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_writeDots(JNIEnv *jenv, jobject jobj, jbyteArray jarg1) { + jbyte *arg1; + int result; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!jarg1) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + arg1 = (*jenv)->GetByteArrayElements(jenv, jarg1, NULL); + if (!arg1) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return; + } + + result = brlapi__writeDots(handle, (const unsigned char *)arg1); + (*jenv)->ReleaseByteArrayElements(jenv, jarg1, arg1, JNI_ABORT); + + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_write(JNIEnv *jenv, jobject jobj, jobject jarguments) { + brlapi_writeArguments_t arguments = BRLAPI_WRITEARGUMENTS_INITIALIZER; + int result; + jstring text, andMask, orMask; + jclass jcwriteArguments; + jfieldID displayNumberID, regionBeginID, regionSizeID, + textID, andMaskID, orMaskID, cursorID; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!jarguments) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + + GET_CLASS(jenv, jcwriteArguments, jarguments,); + + GET_ID(jenv, displayNumberID,jcwriteArguments, "displayNumber", "I",); + GET_ID(jenv, regionBeginID, jcwriteArguments, "regionBegin", "I",); + GET_ID(jenv, regionSizeID, jcwriteArguments, "regionSize", "I",); + GET_ID(jenv, textID, jcwriteArguments, "text", "Ljava/lang/String;",); + GET_ID(jenv, andMaskID, jcwriteArguments, "andMask", "[B",); + GET_ID(jenv, orMaskID, jcwriteArguments, "orMask", "[B",); + GET_ID(jenv, cursorID, jcwriteArguments, "cursor", "I",); + + arguments.displayNumber = (*jenv)->GetIntField(jenv, jarguments, displayNumberID); + arguments.regionBegin = (*jenv)->GetIntField(jenv, jarguments, regionBeginID); + arguments.regionSize = (*jenv)->GetIntField(jenv, jarguments, regionSizeID); + if ((text = (*jenv)->GetObjectField(jenv, jarguments, textID))) + arguments.text = (char *)(*jenv)->GetStringUTFChars(jenv, text, NULL); + else + arguments.text = NULL; + if ((andMask = (*jenv)->GetObjectField(jenv, jarguments, andMaskID))) + arguments.andMask = (unsigned char *)(*jenv)->GetByteArrayElements(jenv, andMask, NULL); + else + arguments.andMask = NULL; + if ((orMask = (*jenv)->GetObjectField(jenv, jarguments, orMaskID))) + arguments.orMask = (unsigned char *)(*jenv)->GetByteArrayElements(jenv, orMask, NULL); + else + arguments.orMask = NULL; + arguments.cursor = (*jenv)->GetIntField(jenv, jarguments, cursorID); + arguments.charset = "UTF-8"; + + result = brlapi__write(handle, &arguments); + + if (text) + (*jenv)->ReleaseStringUTFChars(jenv, text, arguments.text); + if (andMask) + (*jenv)->ReleaseByteArrayElements(jenv, andMask, (jbyte*) arguments.andMask, JNI_ABORT); + if (orMask) + (*jenv)->ReleaseByteArrayElements(jenv, orMask, (jbyte*) arguments.orMask, JNI_ABORT); + + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT jlong JNICALL Java_org_a11y_BrlAPI_Native_readKey(JNIEnv *jenv, jobject jobj, jboolean jblock) { + brlapi_keyCode_t code; + int result; + GET_HANDLE(jenv, jobj, -1); + + env = jenv; + + result = brlapi__readKey(handle, (int) jblock, &code); + + if (result < 0) { + ThrowError(jenv, __func__); + return -1; + } + + if (!result) return (jlong)(-1); + return (jlong)code; +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { + jlong *s; + unsigned int n; + int result; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!js) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, js); + s = (*jenv)->GetLongArrayElements(jenv, js, NULL); + + // XXX jlong != brlapi_keyCode_t probably + result = brlapi__ignoreKeys(handle, jrange, (const brlapi_keyCode_t *)s, n); + (*jenv)->ReleaseLongArrayElements(jenv, js, s, JNI_ABORT); + + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptKeys(JNIEnv *jenv, jobject jobj, jlong jrange, jlongArray js) { + jlong *s; + unsigned int n; + int result; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!js) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, js); + s = (*jenv)->GetLongArrayElements(jenv, js, NULL); + + // XXX jlong != brlapi_keyCode_t probably + result = brlapi__acceptKeys(handle, jrange, (const brlapi_keyCode_t *)s, n); + (*jenv)->ReleaseLongArrayElements(jenv, js, s, JNI_ABORT); + + if (result < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreAllKeys(JNIEnv *jenv, jobject jobj) { + GET_HANDLE(jenv, jobj, ); + + if (brlapi__ignoreAllKeys(handle) < 0) + ThrowError(jenv, __func__); +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptAllKeys(JNIEnv *jenv, jobject jobj) { + GET_HANDLE(jenv, jobj, ); + + if (brlapi__acceptAllKeys(handle) < 0) + ThrowError(jenv, __func__); +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_ignoreKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { + unsigned int n; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!js) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, js); + + { + unsigned int i; + brlapi_range_t s[n]; + + for (i=0; iGetObjectArrayElement(jenv, js, i); + jlong *l = (*jenv)->GetLongArrayElements(jenv, jl, NULL); + s[i].first = l[0]; + s[i].last = l[1]; + (*jenv)->ReleaseLongArrayElements(jenv, jl, l, JNI_ABORT); + } + if (brlapi__ignoreKeyRanges(handle, s, n)) { + ThrowError(jenv, __func__); + return; + } + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_acceptKeyRanges(JNIEnv *jenv, jobject jobj, jobjectArray js) { + unsigned int n; + GET_HANDLE(jenv, jobj, ); + + env = jenv; + + if (!js) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, js); + + { + unsigned int i; + brlapi_range_t s[n]; + + for (i=0; iGetObjectArrayElement(jenv, js, i); + jlong *l = (*jenv)->GetLongArrayElements(jenv, jl, NULL); + s[i].first = l[0]; + s[i].last = l[1]; + (*jenv)->ReleaseLongArrayElements(jenv, jl, l, JNI_ABORT); + } + if (brlapi__acceptKeyRanges(handle, s, n)) { + ThrowError(jenv, __func__); + return; + } + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_enterRawMode(JNIEnv *jenv, jobject jobj, jstring jdriver) { + env = jenv; + char *driver; + int res; + GET_HANDLE(jenv, jobj, ); + + if (!jdriver) { + driver = NULL; + } else if (!(driver = (char *)(*jenv)->GetStringUTFChars(jenv, jdriver, NULL))) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return; + } + res = brlapi__enterRawMode(handle, driver); + if (jdriver) (*jenv)->ReleaseStringUTFChars(jenv, jdriver, driver); + if (res < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Native_leaveRawMode(JNIEnv *jenv, jobject jobj) { + env = jenv; + GET_HANDLE(jenv, jobj, ); + + if (brlapi__leaveRawMode(handle) < 0) { + ThrowError(jenv, __func__); + return; + } +} + +JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_sendRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { + jbyte *buf; + unsigned int n; + int result; + GET_HANDLE(jenv, jobj, -1); + + env = jenv; + + if (!jbuf) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return -1; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, jbuf); + buf = (*jenv)->GetByteArrayElements(jenv, jbuf, NULL); + + result = brlapi__sendRaw(handle, (const unsigned char *)buf, n); + (*jenv)->ReleaseByteArrayElements(jenv, jbuf, buf, JNI_ABORT); + + if (result < 0) { + ThrowError(jenv, __func__); + return -1; + } + + return (jint) result; +} + +JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_recvRaw(JNIEnv *jenv, jobject jobj, jbyteArray jbuf) { + jbyte *buf; + unsigned int n; + int result; + GET_HANDLE(jenv, jobj, -1); + + env = jenv; + + if (!jbuf) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return -1; + } + + n = (unsigned int) (*jenv)->GetArrayLength(jenv, jbuf); + buf = (*jenv)->GetByteArrayElements(jenv, jbuf, NULL); + + result = brlapi__recvRaw(handle, (unsigned char *)buf, n); + + if (result < 0) { + (*jenv)->ReleaseByteArrayElements(jenv, jbuf, buf, JNI_ABORT); + ThrowError(jenv, __func__); + return -1; + } + + (*jenv)->ReleaseByteArrayElements(jenv, jbuf, buf, 0); + return (jint) result; +} + +JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Native_getPacketTypeName(JNIEnv *jenv, jclass jcls, jlong jtype) { + const char *type; + + env = jenv; + + if (!(type = brlapi_getPacketTypeName((brlapi_packetType_t) jtype))) { + ThrowError(jenv, __func__); + return NULL; + } + + return (*jenv)->NewStringUTF(jenv, type); +} + +JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Error_toString (JNIEnv *jenv, jobject jerr) { + jclass jcerr; + jfieldID brlerrnoID, libcerrnoID, gaierrnoID, errfunID; + jstring jerrfun; + brlapi_error_t error; + const char *res; + + env = jenv; + + GET_CLASS(jenv, jcerr, jerr, NULL); + GET_ID(jenv, brlerrnoID, jcerr, "brlerrno", "I", NULL); + GET_ID(jenv, libcerrnoID, jcerr, "libcerrno", "I", NULL); + GET_ID(jenv, gaierrnoID, jcerr, "gaierrno", "I", NULL); + GET_ID(jenv, errfunID, jcerr, "errfun", "Ljava/lang/String;", NULL); + + error.brlerrno = (*jenv)->GetIntField(jenv, jerr, brlerrnoID); + error.libcerrno = (*jenv)->GetIntField(jenv, jerr, libcerrnoID); + error.gaierrno = (*jenv)->GetIntField(jenv, jerr, gaierrnoID); + if (!(jerrfun = (*jenv)->GetObjectField(jenv, jerr, errfunID))) { + error.errfun = NULL; + } else if (!(error.errfun = (char *)(*jenv)->GetStringUTFChars(jenv, jerrfun, NULL))) { + ThrowException(jenv, ERR_OUTOFMEM, __func__); + return NULL; + } + res = brlapi_strerror(&error); + if (jerrfun) + (*jenv)->ReleaseStringUTFChars(jenv, jerrfun, error.errfun); + return (*jenv)->NewStringUTF(jenv, res); +} + +JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Exception_toString (JNIEnv *jenv, jobject jerr) { + jclass jcerr; + jfieldID handleID, errnoID, typeID, bufID; + jarray jbuf; + brlapi_handle_t *handle; + int errno; + long type; + jbyte *buf; + int size; + char errmsg[256]; + brlapi_error_t error; + + env = jenv; + + if (!jerr) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return NULL; + } + GET_CLASS(jenv, jcerr, jerr, NULL); + GET_ID(jenv, handleID, jcerr, "handle", "I", NULL); + GET_ID(jenv, errnoID, jcerr, "errno", "I", NULL); + GET_ID(jenv, typeID, jcerr, "type", "I", NULL); + GET_ID(jenv, bufID, jcerr, "buf", "I", NULL); + + handle = (void*)(intptr_t)(*jenv)->GetLongField(jenv, jerr, handleID); + error.brlerrno = (*jenv)->GetIntField(jenv, jerr, errnoID); + type = (*jenv)->GetIntField(jenv, jerr, typeID); + if (!(jbuf = (*jenv)->GetObjectField(jenv, jerr, typeID))) { + ThrowException(jenv, ERR_NULLPTR, __func__); + return NULL; + } + size = (*jenv)->GetArrayLength(jenv, jbuf); + buf = (*jenv)->GetByteArrayElements(jenv, jbuf, NULL); + + brlapi__strexception(handle, errmsg, sizeof(errmsg), errno, type, buf, size); + + return (*jenv)->NewStringUTF(jenv, errmsg); +} + +JNIEXPORT void JNICALL Java_org_a11y_BrlAPI_Key_expandKeyCode (JNIEnv *jenv, jobject obj, jlong jkey) { + jclass jckey; + jfieldID typeID, commandID, argumentID, flagsID; + brlapi_keyCode_t key = jkey; + brlapi_expandedKeyCode_t ekc; + + GET_CLASS(jenv, jckey, obj, ); + GET_ID(jenv, typeID, jckey, "type", "I", ); + GET_ID(jenv, commandID, jckey, "command", "I", ); + GET_ID(jenv, argumentID, jckey, "argument", "I", ); + GET_ID(jenv, flagsID, jckey, "flags", "I", ); + + brlapi_expandKeyCode(key, &ekc); + (*jenv)->SetIntField(jenv, obj, typeID, ekc.type); + (*jenv)->SetIntField(jenv, obj, commandID, ekc.command); + (*jenv)->SetIntField(jenv, obj, argumentID, ekc.argument); + (*jenv)->SetIntField(jenv, obj, flagsID, ekc.flags); +} diff --git a/grub-core/braille/brltty/Bindings/Java/bindings.m4 b/grub-core/braille/brltty/Bindings/Java/bindings.m4 new file mode 100644 index 000000000..807b9f8b9 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/bindings.m4 @@ -0,0 +1,110 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by +# Samuel Thibault +# Sébastien Hinderer +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +AC_DEFUN([BRLTTY_JAVA_BINDINGS], [dnl +if test -n "${JAVA_HOME}" +then + BRLTTY_JAVA_COMPILER([javac], ["${JAVA_HOME}/bin"]) +else + BRLTTY_JAVA_COMPILER([javac], [], [dnl + BRLTTY_JAVA_COMPILER([javac], [/usr/java/bin /usr/java/jdk*/bin], [dnl + BRLTTY_JAVA_COMPILER([gcj]) + ]) + ]) +fi + +JAVA_OK=false +if test -n "${JAVAC_PATH}" +then + AC_MSG_NOTICE([Java compiler is ${JAVAC_PATH}]) + JAVA_OK=true + + JAVA_ENCODING="UTF-8" + case "${JAVAC_NAME}" + in + javac) JAVAC_OPTIONS="-encoding ${JAVA_ENCODING}";; + gcj) JAVAC_OPTIONS="-C --encoding=${JAVA_ENCODING}";; + *) JAVAC_OPTIONS="";; + esac + AC_SUBST([JAVAC], ["${JAVAC_PATH} ${JAVAC_OPTIONS}"]) + + JAVA_BIN=`AS_DIRNAME("${JAVAC_PATH}")` + JAVA_ROOT=`AS_DIRNAME("${JAVA_BIN}")` + + AC_CHECK_PROGS([JAVADOC_NAME], [javadoc gjdoc], [], ["${JAVA_BIN}"]) + if test -n "${JAVADOC_NAME}" + then + JAVADOC_PATH="${JAVA_BIN}/${JAVADOC_NAME}" + else + JAVADOC_PATH=":" + fi + AC_SUBST([JAVADOC], ["${JAVADOC_PATH} -encoding ${JAVA_ENCODING}"]) + + AC_CHECK_PROGS([JAR_NAME], [jar gjar], [JAR_NOT_FOUND_BY_CONFIGURE], ["${JAVA_BIN}"]) + AC_SUBST([JAR], ["${JAVA_BIN}/${JAR_NAME}"]) + BRLTTY_JAVA_DIRECTORY([JAR], [/usr/share/java]) + + JAVA_JNI_INC="${JAVA_ROOT}/include" + JAVA_JNI_HDR="jni.h" + JAVA_JNI_FLAGS="" + AC_CHECK_HEADER([${JAVA_JNI_HDR}], [], [AC_CHECK_FILE(["${JAVA_JNI_INC}/${JAVA_JNI_HDR}"], [JAVA_JNI_FLAGS="-I${JAVA_JNI_INC}"], [JAVA_OK=false])]) + AC_SUBST([JAVA_JNI_HDR]) + AC_SUBST([JAVA_JNI_INC]) + AC_SUBST([JAVA_JNI_FLAGS]) + BRLTTY_JAVA_DIRECTORY([JNI], [/usr/lib/java /usr/lib/jni]) +else + AC_MSG_WARN([Java compiler not found]) +fi + +AC_SUBST([JAVA_OK]) +]) + +AC_DEFUN([BRLTTY_JAVA_COMPILER], [dnl +AC_PATH_PROG([JAVAC_PATH], [$1], [], [$2]) +if test -n "${JAVAC_PATH}" +then + JAVAC_NAME="$1" +ifelse(len([$3]), 0, [], [dnl +else + $3 +])dnl +fi]) + +AC_DEFUN([BRLTTY_JAVA_DIRECTORY], [dnl +JAVA_$1_DIR="" +for directory in $2 +do + test -d "${directory}" && { + JAVA_$1_DIR="${directory}" + break + } +done + +if test -n "${JAVA_$1_DIR}" +then + JAVA_$1="yes" + AC_MSG_NOTICE([Java] m4_tolower([$1]) [installation directory is ${JAVA_$1_DIR}]) +else + JAVA_$1="no" + AC_MSG_WARN([no commonly used] m4_tolower([$1]) [installation directory]) +fi + +AC_SUBST([JAVA_$1]) +AC_SUBST([JAVA_$1_DIR]) +]) diff --git a/grub-core/braille/brltty/Bindings/Java/constants.awk b/grub-core/braille/brltty/Bindings/Java/constants.awk new file mode 100644 index 000000000..b803a1a60 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/constants.awk @@ -0,0 +1,121 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by +# Samuel Thibault +# Sébastien Hinderer +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +BEGIN { + print "package org.a11y.BrlAPI;" + print "" + print "public interface Constants {" +} + +END { + print "}" +} + +function brlCommand(name, symbol, value, help) { + writeCommandDefinition(name, value, help) +} + +function brlBlock(name, symbol, value, help) { + if (name == "PASSCHAR") return + if (name == "PASSKEY") return + + if (value ~ /^0[xX][0-9a-fA-F]+00$/) { + writeCommandDefinition(name, hexadecimalValue(value) "00", help) + } +} + +function brlKey(name, symbol, value, help) { +} + +function brlFlag(name, symbol, value, help) { + if (value ~ /^0[xX][0-9a-fA-F]+0000$/) { + value = hexadecimalValue(substr(value, 1, length(value)-4)) + if (name ~ /^CHAR_/) { + name = substr(name, 6) + } else { + value = value "00" + } + } else if (value ~ /^\(/) { + gsub("BRL_FLG_", "KEY_FLG_", value) + } else { + return + } + writeJavaConstant("int", "KEY_FLG_" name, value, help) +} + +function brlDot(number, symbol, value, help) { + writeJavaConstant("byte", "DOT" number, "(byte) (" value ")", help) +} + +function apiConstant(name, symbol, value, help) { + writeJavaConstant("int", name, value); +} + +function apiMask(name, symbol, value, help) { + writeJavaConstant("long", "KEY_" name, hexadecimalValue(value) "L"); +} + +function apiShift(name, symbol, value, help) { + writeJavaConstant("int", "KEY_" name, hexadecimalValue(value)); +} + +function apiType(name, symbol, value, help) { + writeJavaConstant("int", "KEY_TYPE_" name, hexadecimalValue(value)); +} + +function apiKey(name, symbol, value, help) { + value = hexadecimalValue(value) + + if (name == "FUNCTION") { + for (i=0; i<35; ++i) { + writeKeyDefinition("F" (i+1), "(" value " + " i ")") + } + } else { + writeKeyDefinition(name, value) + } +} + +function apiRangeType(name, symbol, value, help) { + writeJavaConstant("int", "rangeType_" name, value, help) +} + +function writeCommandDefinition(name, value, help) { + writeJavaConstant("int", "KEY_CMD_" name, value, help) +} + +function writeKeyDefinition(name, value) { + writeJavaConstant("int", "KEY_SYM_" name, value) +} + +function writeJavaConstant(type, name, value, help) { + writeJavadocComment(help) + print " " type " " name " = " value ";" +} + +function writeJavadocComment(text) { + if (length(text) > 0) print " /** " text " */" +} + +function hexadecimalValue(value) { + value = tolower(value) + gsub("x0+", "x", value) + gsub("x$", "x0", value) + return value +} + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/allclasses-frame.html b/grub-core/braille/brltty/Bindings/Java/doc/allclasses-frame.html new file mode 100644 index 000000000..b09f1c402 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/allclasses-frame.html @@ -0,0 +1,49 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
Brlapi +
+ConnectionSettings +
+Constants +
+DisplaySize +
+Error +
+Exception +
+Key +
+Native +
+Test +
+WriteArguments +
+
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/allclasses-noframe.html b/grub-core/braille/brltty/Bindings/Java/doc/allclasses-noframe.html new file mode 100644 index 000000000..e093ae7a5 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/allclasses-noframe.html @@ -0,0 +1,49 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
Brlapi +
+ConnectionSettings +
+Constants +
+DisplaySize +
+Error +
+Exception +
+Key +
+Native +
+Test +
+WriteArguments +
+
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/constant-values.html b/grub-core/braille/brltty/Bindings/Java/doc/constant-values.html new file mode 100644 index 000000000..ded7ccdba --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/constant-values.html @@ -0,0 +1,1564 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + + + + + + +
+org.a11y.*
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.a11y.BrlAPI.Constants
+public static final intCURSOR_LEAVE-1
+public static final intCURSOR_OFF0
+public static final intDISPLAY_DEFAULT-1
+public static final byteDOT11
+public static final byteDOT22
+public static final byteDOT34
+public static final byteDOT48
+public static final byteDOT516
+public static final byteDOT632
+public static final byteDOT764
+public static final byteDOT8-128
+public static final byteDOTC0
+public static final intERROR_AUTHENTICATION17
+public static final intERROR_CONNREFUSED8
+public static final intERROR_DEVICEBUSY3
+public static final intERROR_DRIVERERROR16
+public static final intERROR_EMPTYKEY15
+public static final intERROR_EOF14
+public static final intERROR_GAIERR10
+public static final intERROR_ILLEGAL_INSTRUCTION5
+public static final intERROR_INVALID_PACKET7
+public static final intERROR_INVALID_PARAMETER6
+public static final intERROR_LIBCERR11
+public static final intERROR_NOMEM1
+public static final intERROR_OPNOTSUPP9
+public static final intERROR_PROTOCOL_VERSION13
+public static final intERROR_SUCCESS0
+public static final intERROR_TTYBUSY2
+public static final intERROR_UNKNOWN_INSTRUCTION4
+public static final intERROR_UNKNOWNTTY12
+public static final intKEY_CMD_APNDCHARS1114112
+public static final longKEY_CMD_ARG_MASK65535L
+public static final intKEY_CMD_ARG_SHIFT0
+public static final intKEY_CMD_ATTRBLINK44
+public static final intKEY_CMD_ATTRDN8
+public static final intKEY_CMD_ATTRUP7
+public static final intKEY_CMD_ATTRVIS43
+public static final intKEY_CMD_AUTOREPEAT47
+public static final intKEY_CMD_AUTOSPEAK48
+public static final intKEY_CMD_BACK30
+public static final longKEY_CMD_BLK_MASK536805376L
+public static final intKEY_CMD_BLK_SHIFT16
+public static final intKEY_CMD_BOT10
+public static final intKEY_CMD_BOT_LEFT12
+public static final intKEY_CMD_CAPBLINK45
+public static final intKEY_CMD_CHRLT19
+public static final intKEY_CMD_CHRRT20
+public static final intKEY_CMD_CONTEXT2490368
+public static final intKEY_CMD_COPYCHARS1048576
+public static final intKEY_CMD_CSRBLINK42
+public static final intKEY_CMD_CSRHIDE39
+public static final intKEY_CMD_CSRJMP_VERT72
+public static final intKEY_CMD_CSRSIZE41
+public static final intKEY_CMD_CSRTRK40
+public static final intKEY_CMD_CSRVIS38
+public static final intKEY_CMD_CUTAPPEND196608
+public static final intKEY_CMD_CUTBEGIN131072
+public static final intKEY_CMD_CUTLINE327680
+public static final intKEY_CMD_CUTRECT262144
+public static final intKEY_CMD_DESCCHAR589824
+public static final intKEY_CMD_DISPMD33
+public static final intKEY_CMD_FREEZE32
+public static final intKEY_CMD_FWINLT23
+public static final intKEY_CMD_FWINLTSKIP25
+public static final intKEY_CMD_FWINRT24
+public static final intKEY_CMD_FWINRTSKIP26
+public static final intKEY_CMD_GOTOLINE851968
+public static final intKEY_CMD_GOTOMARK786432
+public static final intKEY_CMD_HELP49
+public static final intKEY_CMD_HOME29
+public static final intKEY_CMD_HWINLT21
+public static final intKEY_CMD_HWINRT22
+public static final intKEY_CMD_INFO50
+public static final intKEY_CMD_LEARN51
+public static final intKEY_CMD_LNBEG27
+public static final intKEY_CMD_LNDN2
+public static final intKEY_CMD_LNEND28
+public static final intKEY_CMD_LNUP1
+public static final intKEY_CMD_MENU_FIRST_ITEM55
+public static final intKEY_CMD_MENU_LAST_ITEM56
+public static final intKEY_CMD_MENU_NEXT_ITEM58
+public static final intKEY_CMD_MENU_NEXT_SETTING60
+public static final intKEY_CMD_MENU_PREV_ITEM57
+public static final intKEY_CMD_MENU_PREV_SETTING59
+public static final intKEY_CMD_MUTE61
+public static final intKEY_CMD_NOOP0
+public static final intKEY_CMD_NXDIFCHAR983040
+public static final intKEY_CMD_NXDIFLN6
+public static final intKEY_CMD_NXINDENT524288
+public static final intKEY_CMD_NXPGRPH14
+public static final intKEY_CMD_NXPROMPT16
+public static final intKEY_CMD_NXSEARCH18
+public static final intKEY_CMD_OFFLINE76
+public static final intKEY_CMD_PASSAT2293760
+public static final intKEY_CMD_PASSDOTS2228224
+public static final intKEY_CMD_PASSPS22424832
+public static final intKEY_CMD_PASSXT2359296
+public static final intKEY_CMD_PASTE73
+public static final intKEY_CMD_PRDIFCHAR917504
+public static final intKEY_CMD_PRDIFLN5
+public static final intKEY_CMD_PREFLOAD54
+public static final intKEY_CMD_PREFMENU52
+public static final intKEY_CMD_PREFSAVE53
+public static final intKEY_CMD_PRINDENT458752
+public static final intKEY_CMD_PRPGRPH13
+public static final intKEY_CMD_PRPROMPT15
+public static final intKEY_CMD_PRSEARCH17
+public static final intKEY_CMD_RESTARTBRL74
+public static final intKEY_CMD_RESTARTSPEECH75
+public static final intKEY_CMD_RETURN31
+public static final intKEY_CMD_ROUTE65536
+public static final intKEY_CMD_SAY_ABOVE64
+public static final intKEY_CMD_SAY_BELOW65
+public static final intKEY_CMD_SAY_FASTER67
+public static final intKEY_CMD_SAY_LINE63
+public static final intKEY_CMD_SAY_LOUDER69
+public static final intKEY_CMD_SAY_SLOWER66
+public static final intKEY_CMD_SAY_SOFTER68
+public static final intKEY_CMD_SETLEFT655360
+public static final intKEY_CMD_SETMARK720896
+public static final intKEY_CMD_SIXDOTS34
+public static final intKEY_CMD_SKPBLNKWINS37
+public static final intKEY_CMD_SKPIDLNS36
+public static final intKEY_CMD_SLIDEWIN35
+public static final intKEY_CMD_SPKHOME62
+public static final intKEY_CMD_SWITCHVT393216
+public static final intKEY_CMD_SWITCHVT_NEXT71
+public static final intKEY_CMD_SWITCHVT_PREV70
+public static final intKEY_CMD_TOP9
+public static final intKEY_CMD_TOP_LEFT11
+public static final intKEY_CMD_TUNES46
+public static final intKEY_CMD_WINDN4
+public static final intKEY_CMD_WINUP3
+public static final longKEY_CODE_MASK536870911L
+public static final intKEY_CODE_SHIFT0
+public static final longKEY_FLAGS_MASK-4294967296L
+public static final intKEY_FLAGS_SHIFT32
+public static final intKEY_FLG_CONTROL4
+public static final intKEY_FLG_KBD_EMUL0512
+public static final intKEY_FLG_KBD_EMUL11024
+public static final intKEY_FLG_KBD_RELEASE256
+public static final intKEY_FLG_LINE_SCALED256
+public static final intKEY_FLG_LINE_TOLEFT512
+public static final intKEY_FLG_META8
+public static final intKEY_FLG_MOTION_ROUTE1024
+public static final intKEY_FLG_REPEAT_DELAY16384
+public static final intKEY_FLG_REPEAT_INITIAL32768
+public static final intKEY_FLG_REPEAT_MASK49152
+public static final intKEY_FLG_SHIFT1
+public static final intKEY_FLG_TOGGLE_MASK768
+public static final intKEY_FLG_TOGGLE_OFF512
+public static final intKEY_FLG_TOGGLE_ON256
+public static final intKEY_FLG_UPPER2
+public static final longKEY_MAX-1L
+public static final intKEY_SYM_BACKSPACE65288
+public static final intKEY_SYM_DELETE65535
+public static final intKEY_SYM_DOWN65364
+public static final intKEY_SYM_END65367
+public static final intKEY_SYM_ESCAPE65307
+public static final intKEY_SYM_F165470
+public static final intKEY_SYM_F1065479
+public static final intKEY_SYM_F1165480
+public static final intKEY_SYM_F1265481
+public static final intKEY_SYM_F1365482
+public static final intKEY_SYM_F1465483
+public static final intKEY_SYM_F1565484
+public static final intKEY_SYM_F1665485
+public static final intKEY_SYM_F1765486
+public static final intKEY_SYM_F1865487
+public static final intKEY_SYM_F1965488
+public static final intKEY_SYM_F265471
+public static final intKEY_SYM_F2065489
+public static final intKEY_SYM_F2165490
+public static final intKEY_SYM_F2265491
+public static final intKEY_SYM_F2365492
+public static final intKEY_SYM_F2465493
+public static final intKEY_SYM_F2565494
+public static final intKEY_SYM_F2665495
+public static final intKEY_SYM_F2765496
+public static final intKEY_SYM_F2865497
+public static final intKEY_SYM_F2965498
+public static final intKEY_SYM_F365472
+public static final intKEY_SYM_F3065499
+public static final intKEY_SYM_F3165500
+public static final intKEY_SYM_F3265501
+public static final intKEY_SYM_F3365502
+public static final intKEY_SYM_F3465503
+public static final intKEY_SYM_F3565504
+public static final intKEY_SYM_F465473
+public static final intKEY_SYM_F565474
+public static final intKEY_SYM_F665475
+public static final intKEY_SYM_F765476
+public static final intKEY_SYM_F865477
+public static final intKEY_SYM_F965478
+public static final intKEY_SYM_HOME65360
+public static final intKEY_SYM_INSERT65379
+public static final intKEY_SYM_LEFT65361
+public static final intKEY_SYM_LINEFEED65293
+public static final intKEY_SYM_PAGE_DOWN65366
+public static final intKEY_SYM_PAGE_UP65365
+public static final intKEY_SYM_RIGHT65363
+public static final intKEY_SYM_TAB65289
+public static final intKEY_SYM_UNICODE16777216
+public static final intKEY_SYM_UP65362
+public static final intKEY_TYPE_CMD536870912
+public static final longKEY_TYPE_MASK3758096384L
+public static final intKEY_TYPE_SHIFT29
+public static final intKEY_TYPE_SYM0
+public static final intrangeType_all0
+public static final intrangeType_code4
+public static final intrangeType_command2
+public static final intrangeType_key3
+public static final intrangeType_type1
+public static final intTTY_DEFAULT-1
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.a11y.BrlAPI.Error
+public static final intCONNREFUSED8
+public static final intDEVICEBUSY3
+public static final intDRIVERERROR16
+public static final intEMPTYKEY15
+public static final intEOF14
+public static final intGAIERR10
+public static final intILLEGAL_INSTRUCTION5
+public static final intINVALID_PACKET7
+public static final intINVALID_PARAMETER6
+public static final intLIBCERR11
+public static final intNOMEM1
+public static final intOPNOTSUPP9
+public static final intPROTOCOL_VERSION13
+public static final intSUCCESS0
+public static final intTTYBUSY2
+public static final intUNKNOWN_INSTRUCTION4
+public static final intUNKNOWNTTY12
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/deprecated-list.html b/grub-core/braille/brltty/Bindings/Java/doc/deprecated-list.html new file mode 100644 index 000000000..51bc4655d --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/deprecated-list.html @@ -0,0 +1,144 @@ + + + + + + +Deprecated List + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents
    +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/help-doc.html b/grub-core/braille/brltty/Bindings/Java/doc/help-doc.html new file mode 100644 index 000000000..c67c18495 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/help-doc.html @@ -0,0 +1,215 @@ + + + + + + +API Help + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    +
  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types
+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description +

    +

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary +

    +

  • Field Detail
  • Constructor Detail
  • Method Detail
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

    +
  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail
+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

    +
  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail
+
+

+Use

+
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    +
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/index-all.html b/grub-core/braille/brltty/Bindings/Java/doc/index-all.html new file mode 100644 index 000000000..818a8a07b --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/index-all.html @@ -0,0 +1,1156 @@ + + + + + + +Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A B C D E F G H I K L M N O P R S T U W
+

+A

+
+
acceptAllKeys() - +Method in class org.a11y.BrlAPI.Native +
  +
acceptKeyRanges(long[][]) - +Method in class org.a11y.BrlAPI.Native +
  +
acceptKeys(long, long[]) - +Method in class org.a11y.BrlAPI.Native +
  +
andMask - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
argument - +Variable in class org.a11y.BrlAPI.Key +
  +
auth - +Variable in class org.a11y.BrlAPI.ConnectionSettings +
  +
+
+

+B

+
+
Brlapi - Class in org.a11y.BrlAPI
 
Brlapi(ConnectionSettings) - +Constructor for class org.a11y.BrlAPI.Brlapi +
  +
+
+

+C

+
+
closeConnection() - +Method in class org.a11y.BrlAPI.Native +
  +
code - +Variable in class org.a11y.BrlAPI.Key +
  +
command - +Variable in class org.a11y.BrlAPI.Key +
  +
ConnectionSettings - Class in org.a11y.BrlAPI
 
ConnectionSettings(String, String) - +Constructor for class org.a11y.BrlAPI.ConnectionSettings +
  +
ConnectionSettings(String) - +Constructor for class org.a11y.BrlAPI.ConnectionSettings +
  +
ConnectionSettings() - +Constructor for class org.a11y.BrlAPI.ConnectionSettings +
  +
CONNREFUSED - +Static variable in error org.a11y.BrlAPI.Error +
  +
Constants - Interface in org.a11y.BrlAPI
 
cursor - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
CURSOR_LEAVE - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
CURSOR_OFF - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
+
+

+D

+
+
DEVICEBUSY - +Static variable in error org.a11y.BrlAPI.Error +
  +
DISPLAY_DEFAULT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
displayNumber - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
DisplaySize - Class in org.a11y.BrlAPI
 
DisplaySize(int, int) - +Constructor for class org.a11y.BrlAPI.DisplaySize +
  +
DOT1 - +Static variable in interface org.a11y.BrlAPI.Constants +
upper-left dot of standard braille cell +
DOT2 - +Static variable in interface org.a11y.BrlAPI.Constants +
middle-left dot of standard braille cell +
DOT3 - +Static variable in interface org.a11y.BrlAPI.Constants +
lower-left dot of standard braille cell +
DOT4 - +Static variable in interface org.a11y.BrlAPI.Constants +
upper-right dot of standard braille cell +
DOT5 - +Static variable in interface org.a11y.BrlAPI.Constants +
middle-right dot of standard braille cell +
DOT6 - +Static variable in interface org.a11y.BrlAPI.Constants +
lower-right dot of standard braille cell +
DOT7 - +Static variable in interface org.a11y.BrlAPI.Constants +
lower-left dot of computer braille cell +
DOT8 - +Static variable in interface org.a11y.BrlAPI.Constants +
lower-right dot of computer braille cell +
DOTC - +Static variable in interface org.a11y.BrlAPI.Constants +
space key pressed +
DRIVERERROR - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+E

+
+
EMPTYKEY - +Static variable in error org.a11y.BrlAPI.Error +
  +
enterRawMode(String) - +Method in class org.a11y.BrlAPI.Native +
  +
enterTtyMode(int) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
enterTtyMode(String) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
enterTtyMode() - +Method in class org.a11y.BrlAPI.Brlapi +
  +
enterTtyMode(int, String) - +Method in class org.a11y.BrlAPI.Native +
  +
enterTtyModeWithPath(int[]) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
enterTtyModeWithPath(int[], String) - +Method in class org.a11y.BrlAPI.Native +
  +
EOF - +Static variable in error org.a11y.BrlAPI.Error +
  +
Error - Error in org.a11y.BrlAPI
 
Error(int, int, int, String) - +Constructor for error org.a11y.BrlAPI.Error +
  +
ERROR_AUTHENTICATION - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_CONNREFUSED - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_DEVICEBUSY - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_DRIVERERROR - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_EMPTYKEY - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_EOF - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_GAIERR - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_ILLEGAL_INSTRUCTION - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_INVALID_PACKET - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_INVALID_PARAMETER - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_LIBCERR - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_NOMEM - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_OPNOTSUPP - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_PROTOCOL_VERSION - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_SUCCESS - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_TTYBUSY - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_UNKNOWN_INSTRUCTION - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
ERROR_UNKNOWNTTY - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
Exception - Exception in org.a11y.BrlAPI
 
Exception(long, int, int, byte[]) - +Constructor for exception org.a11y.BrlAPI.Exception +
  +
expandKeyCode(long) - +Method in class org.a11y.BrlAPI.Key +
  +
+
+

+F

+
+
fileDescriptor - +Variable in class org.a11y.BrlAPI.Brlapi +
  +
finalize() - +Method in class org.a11y.BrlAPI.Brlapi +
  +
flags - +Variable in class org.a11y.BrlAPI.Key +
  +
+
+

+G

+
+
GAIERR - +Static variable in error org.a11y.BrlAPI.Error +
  +
getArgument() - +Method in class org.a11y.BrlAPI.Key +
  +
getAuth() - +Method in class org.a11y.BrlAPI.Brlapi +
  +
getCode() - +Method in class org.a11y.BrlAPI.Key +
  +
getCommand() - +Method in class org.a11y.BrlAPI.Key +
  +
getDisplaySize() - +Method in class org.a11y.BrlAPI.Native +
  +
getDriverName() - +Method in class org.a11y.BrlAPI.Native +
  +
getFileDescriptor() - +Method in class org.a11y.BrlAPI.Brlapi +
  +
getFlags() - +Method in class org.a11y.BrlAPI.Key +
  +
getHeight() - +Method in class org.a11y.BrlAPI.DisplaySize +
  +
getHost() - +Method in class org.a11y.BrlAPI.Brlapi +
  +
getPacketTypeName(long) - +Static method in class org.a11y.BrlAPI.Native +
  +
getType() - +Method in class org.a11y.BrlAPI.Key +
  +
getWidth() - +Method in class org.a11y.BrlAPI.DisplaySize +
  +
+
+

+H

+
+
handle - +Variable in class org.a11y.BrlAPI.Native +
  +
height - +Variable in class org.a11y.BrlAPI.DisplaySize +
  +
host - +Variable in class org.a11y.BrlAPI.ConnectionSettings +
  +
+
+

+I

+
+
ignoreAllKeys() - +Method in class org.a11y.BrlAPI.Native +
  +
ignoreKeyRanges(long[][]) - +Method in class org.a11y.BrlAPI.Native +
  +
ignoreKeys(long, long[]) - +Method in class org.a11y.BrlAPI.Native +
  +
ILLEGAL_INSTRUCTION - +Static variable in error org.a11y.BrlAPI.Error +
  +
INVALID_PACKET - +Static variable in error org.a11y.BrlAPI.Error +
  +
INVALID_PARAMETER - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+K

+
+
Key - Class in org.a11y.BrlAPI
 
Key(long) - +Constructor for class org.a11y.BrlAPI.Key +
  +
KEY_CMD_APNDCHARS - +Static variable in interface org.a11y.BrlAPI.Constants +
append characters to cut buffer +
KEY_CMD_ARG_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_CMD_ARG_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_CMD_ATTRBLINK - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle attribute blinking on/off +
KEY_CMD_ATTRDN - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to nearest line with different highlighting +
KEY_CMD_ATTRUP - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to nearest line with different highlighting +
KEY_CMD_ATTRVIS - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle attribute underlining on/off +
KEY_CMD_AUTOREPEAT - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle autorepeat on/off +
KEY_CMD_AUTOSPEAK - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle autospeak on/off +
KEY_CMD_BACK - +Static variable in interface org.a11y.BrlAPI.Constants +
go back after cursor tracking +
KEY_CMD_BLK_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_CMD_BLK_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_CMD_BOT - +Static variable in interface org.a11y.BrlAPI.Constants +
go to bottom line +
KEY_CMD_BOT_LEFT - +Static variable in interface org.a11y.BrlAPI.Constants +
go to beginning of bottom line +
KEY_CMD_CAPBLINK - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle capital letter blinking on/off +
KEY_CMD_CHRLT - +Static variable in interface org.a11y.BrlAPI.Constants +
go left one character +
KEY_CMD_CHRRT - +Static variable in interface org.a11y.BrlAPI.Constants +
go right one character +
KEY_CMD_CONTEXT - +Static variable in interface org.a11y.BrlAPI.Constants +
switch to command context +
KEY_CMD_COPYCHARS - +Static variable in interface org.a11y.BrlAPI.Constants +
copy characters to cut buffer +
KEY_CMD_CSRBLINK - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle cursor blinking on/off +
KEY_CMD_CSRHIDE - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle hidden cursor on/off +
KEY_CMD_CSRJMP_VERT - +Static variable in interface org.a11y.BrlAPI.Constants +
bring cursor to line +
KEY_CMD_CSRSIZE - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle cursor style block/underline +
KEY_CMD_CSRTRK - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle cursor tracking on/off +
KEY_CMD_CSRVIS - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle cursor visibility on/off +
KEY_CMD_CUTAPPEND - +Static variable in interface org.a11y.BrlAPI.Constants +
append to existing cut buffer from character +
KEY_CMD_CUTBEGIN - +Static variable in interface org.a11y.BrlAPI.Constants +
start new cut buffer at character +
KEY_CMD_CUTLINE - +Static variable in interface org.a11y.BrlAPI.Constants +
linear cut to character +
KEY_CMD_CUTRECT - +Static variable in interface org.a11y.BrlAPI.Constants +
rectangular cut to character +
KEY_CMD_DESCCHAR - +Static variable in interface org.a11y.BrlAPI.Constants +
describe character +
KEY_CMD_DISPMD - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle display mode attributes/text +
KEY_CMD_FREEZE - +Static variable in interface org.a11y.BrlAPI.Constants +
freeze/unfreeze screen image +
KEY_CMD_FWINLT - +Static variable in interface org.a11y.BrlAPI.Constants +
go left one window +
KEY_CMD_FWINLTSKIP - +Static variable in interface org.a11y.BrlAPI.Constants +
go left to nearest non-blank window +
KEY_CMD_FWINRT - +Static variable in interface org.a11y.BrlAPI.Constants +
go right one window +
KEY_CMD_FWINRTSKIP - +Static variable in interface org.a11y.BrlAPI.Constants +
go right to nearest non-blank window +
KEY_CMD_GOTOLINE - +Static variable in interface org.a11y.BrlAPI.Constants +
go to selected line +
KEY_CMD_GOTOMARK - +Static variable in interface org.a11y.BrlAPI.Constants +
go to remembered window position +
KEY_CMD_HELP - +Static variable in interface org.a11y.BrlAPI.Constants +
enter/leave help display +
KEY_CMD_HOME - +Static variable in interface org.a11y.BrlAPI.Constants +
go to cursor +
KEY_CMD_HWINLT - +Static variable in interface org.a11y.BrlAPI.Constants +
go left half a window +
KEY_CMD_HWINRT - +Static variable in interface org.a11y.BrlAPI.Constants +
go right half a window +
KEY_CMD_INFO - +Static variable in interface org.a11y.BrlAPI.Constants +
enter/leave status display +
KEY_CMD_LEARN - +Static variable in interface org.a11y.BrlAPI.Constants +
enter/leave command learn mode +
KEY_CMD_LNBEG - +Static variable in interface org.a11y.BrlAPI.Constants +
go to beginning of line +
KEY_CMD_LNDN - +Static variable in interface org.a11y.BrlAPI.Constants +
go down one line +
KEY_CMD_LNEND - +Static variable in interface org.a11y.BrlAPI.Constants +
go to end of line +
KEY_CMD_LNUP - +Static variable in interface org.a11y.BrlAPI.Constants +
go up one line +
KEY_CMD_MENU_FIRST_ITEM - +Static variable in interface org.a11y.BrlAPI.Constants +
go to first item +
KEY_CMD_MENU_LAST_ITEM - +Static variable in interface org.a11y.BrlAPI.Constants +
go to last item +
KEY_CMD_MENU_NEXT_ITEM - +Static variable in interface org.a11y.BrlAPI.Constants +
go to next item +
KEY_CMD_MENU_NEXT_SETTING - +Static variable in interface org.a11y.BrlAPI.Constants +
select next choice +
KEY_CMD_MENU_PREV_ITEM - +Static variable in interface org.a11y.BrlAPI.Constants +
go to previous item +
KEY_CMD_MENU_PREV_SETTING - +Static variable in interface org.a11y.BrlAPI.Constants +
select previous choice +
KEY_CMD_MUTE - +Static variable in interface org.a11y.BrlAPI.Constants +
stop speaking +
KEY_CMD_NOOP - +Static variable in interface org.a11y.BrlAPI.Constants +
do nothing +
KEY_CMD_NXDIFCHAR - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to nearest line with different character +
KEY_CMD_NXDIFLN - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to nearest line with different content +
KEY_CMD_NXINDENT - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to nearest line with less indent than character +
KEY_CMD_NXPGRPH - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to first line of next paragraph +
KEY_CMD_NXPROMPT - +Static variable in interface org.a11y.BrlAPI.Constants +
go down to next command prompt +
KEY_CMD_NXSEARCH - +Static variable in interface org.a11y.BrlAPI.Constants +
search forward for cut text +
KEY_CMD_OFFLINE - +Static variable in interface org.a11y.BrlAPI.Constants +
braille display temporarily unavailable +
KEY_CMD_PASSAT - +Static variable in interface org.a11y.BrlAPI.Constants +
input AT (set 2) keyboard scan code +
KEY_CMD_PASSDOTS - +Static variable in interface org.a11y.BrlAPI.Constants +
input braille character +
KEY_CMD_PASSPS2 - +Static variable in interface org.a11y.BrlAPI.Constants +
input PS/2 (set 3) keyboard scan code +
KEY_CMD_PASSXT - +Static variable in interface org.a11y.BrlAPI.Constants +
input XT (set 1) keyboard scan code +
KEY_CMD_PASTE - +Static variable in interface org.a11y.BrlAPI.Constants +
insert cut text at cursor +
KEY_CMD_PRDIFCHAR - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to nearest line with different character +
KEY_CMD_PRDIFLN - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to nearest line with different content +
KEY_CMD_PREFLOAD - +Static variable in interface org.a11y.BrlAPI.Constants +
restore preferences from disk +
KEY_CMD_PREFMENU - +Static variable in interface org.a11y.BrlAPI.Constants +
enter/leave preferences menu +
KEY_CMD_PREFSAVE - +Static variable in interface org.a11y.BrlAPI.Constants +
save preferences to disk +
KEY_CMD_PRINDENT - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to nearest line with less indent than character +
KEY_CMD_PRPGRPH - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to last line of previous paragraph +
KEY_CMD_PRPROMPT - +Static variable in interface org.a11y.BrlAPI.Constants +
go up to previous command prompt +
KEY_CMD_PRSEARCH - +Static variable in interface org.a11y.BrlAPI.Constants +
search backward for cut text +
KEY_CMD_RESTARTBRL - +Static variable in interface org.a11y.BrlAPI.Constants +
restart braille driver +
KEY_CMD_RESTARTSPEECH - +Static variable in interface org.a11y.BrlAPI.Constants +
restart speech driver +
KEY_CMD_RETURN - +Static variable in interface org.a11y.BrlAPI.Constants +
go to cursor or go back after cursor tracking +
KEY_CMD_ROUTE - +Static variable in interface org.a11y.BrlAPI.Constants +
bring cursor to character +
KEY_CMD_SAY_ABOVE - +Static variable in interface org.a11y.BrlAPI.Constants +
speak from top of screen through current line +
KEY_CMD_SAY_BELOW - +Static variable in interface org.a11y.BrlAPI.Constants +
speak from current line through bottom of screen +
KEY_CMD_SAY_FASTER - +Static variable in interface org.a11y.BrlAPI.Constants +
increase speech rate +
KEY_CMD_SAY_LINE - +Static variable in interface org.a11y.BrlAPI.Constants +
speak current line +
KEY_CMD_SAY_LOUDER - +Static variable in interface org.a11y.BrlAPI.Constants +
increase speech volume +
KEY_CMD_SAY_SLOWER - +Static variable in interface org.a11y.BrlAPI.Constants +
decrease speech rate +
KEY_CMD_SAY_SOFTER - +Static variable in interface org.a11y.BrlAPI.Constants +
decrease speech volume +
KEY_CMD_SETLEFT - +Static variable in interface org.a11y.BrlAPI.Constants +
place left end of window at character +
KEY_CMD_SETMARK - +Static variable in interface org.a11y.BrlAPI.Constants +
remember current window position +
KEY_CMD_SIXDOTS - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle text style 6-dot/8-dot +
KEY_CMD_SKPBLNKWINS - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle skipping of blank windows on/off +
KEY_CMD_SKPIDLNS - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle skipping of lines with identical content on/off +
KEY_CMD_SLIDEWIN - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle sliding window on/off +
KEY_CMD_SPKHOME - +Static variable in interface org.a11y.BrlAPI.Constants +
go to current speech position +
KEY_CMD_SWITCHVT - +Static variable in interface org.a11y.BrlAPI.Constants +
switch to virtual terminal +
KEY_CMD_SWITCHVT_NEXT - +Static variable in interface org.a11y.BrlAPI.Constants +
switch to next virtual terminal +
KEY_CMD_SWITCHVT_PREV - +Static variable in interface org.a11y.BrlAPI.Constants +
switch to previous virtual terminal +
KEY_CMD_TOP - +Static variable in interface org.a11y.BrlAPI.Constants +
go to top line +
KEY_CMD_TOP_LEFT - +Static variable in interface org.a11y.BrlAPI.Constants +
go to beginning of top line +
KEY_CMD_TUNES - +Static variable in interface org.a11y.BrlAPI.Constants +
toggle alert tunes on/off +
KEY_CMD_WINDN - +Static variable in interface org.a11y.BrlAPI.Constants +
go down several lines +
KEY_CMD_WINUP - +Static variable in interface org.a11y.BrlAPI.Constants +
go up several lines +
KEY_CODE_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_CODE_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_FLAGS_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_FLAGS_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_FLG_CONTROL - +Static variable in interface org.a11y.BrlAPI.Constants +
control key pressed +
KEY_FLG_KBD_EMUL0 - +Static variable in interface org.a11y.BrlAPI.Constants +
it is an emulation 0 scan code +
KEY_FLG_KBD_EMUL1 - +Static variable in interface org.a11y.BrlAPI.Constants +
it is an emulation 1 scan code +
KEY_FLG_KBD_RELEASE - +Static variable in interface org.a11y.BrlAPI.Constants +
it is a release scan code +
KEY_FLG_LINE_SCALED - +Static variable in interface org.a11y.BrlAPI.Constants +
scale arg=0X00-0XFF to screen height +
KEY_FLG_LINE_TOLEFT - +Static variable in interface org.a11y.BrlAPI.Constants +
go to beginning of line +
KEY_FLG_META - +Static variable in interface org.a11y.BrlAPI.Constants +
meta key pressed +
KEY_FLG_MOTION_ROUTE - +Static variable in interface org.a11y.BrlAPI.Constants +
bring cursor into window after function +
KEY_FLG_REPEAT_DELAY - +Static variable in interface org.a11y.BrlAPI.Constants +
wait before repeating +
KEY_FLG_REPEAT_INITIAL - +Static variable in interface org.a11y.BrlAPI.Constants +
execute command on key press +
KEY_FLG_REPEAT_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
mask for all repeat flags +
KEY_FLG_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
shift key pressed +
KEY_FLG_TOGGLE_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
mask for all toggle flags +
KEY_FLG_TOGGLE_OFF - +Static variable in interface org.a11y.BrlAPI.Constants +
disable feature +
KEY_FLG_TOGGLE_ON - +Static variable in interface org.a11y.BrlAPI.Constants +
enable feature +
KEY_FLG_UPPER - +Static variable in interface org.a11y.BrlAPI.Constants +
convert to uppercase +
KEY_MAX - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_BACKSPACE - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_DELETE - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_DOWN - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_END - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_ESCAPE - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F1 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F10 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F11 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F12 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F13 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F14 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F15 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F16 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F17 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F18 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F19 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F2 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F20 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F21 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F22 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F23 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F24 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F25 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F26 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F27 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F28 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F29 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F3 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F30 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F31 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F32 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F33 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F34 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F35 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F4 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F5 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F6 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F7 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F8 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_F9 - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_HOME - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_INSERT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_LEFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_LINEFEED - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_PAGE_DOWN - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_PAGE_UP - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_RIGHT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_TAB - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_UNICODE - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_SYM_UP - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_TYPE_CMD - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_TYPE_MASK - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_TYPE_SHIFT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
KEY_TYPE_SYM - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
+
+

+L

+
+
leaveRawMode() - +Method in class org.a11y.BrlAPI.Native +
  +
leaveTtyMode() - +Method in class org.a11y.BrlAPI.Native +
  +
LIBCERR - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+M

+
+
main(String[]) - +Static method in class org.a11y.BrlAPI.Test +
  +
+
+

+N

+
+
Native - Class in org.a11y.BrlAPI
 
Native() - +Constructor for class org.a11y.BrlAPI.Native +
  +
NOMEM - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+O

+
+
openConnection(ConnectionSettings, ConnectionSettings) - +Method in class org.a11y.BrlAPI.Native +
  +
OPNOTSUPP - +Static variable in error org.a11y.BrlAPI.Error +
  +
org.a11y.BrlAPI - package org.a11y.BrlAPI
 
orMask - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
+
+

+P

+
+
PROTOCOL_VERSION - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+R

+
+
rangeType_all - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
rangeType_code - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
rangeType_command - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
rangeType_key - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
rangeType_type - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
readKey(boolean) - +Method in class org.a11y.BrlAPI.Native +
  +
recvRaw(byte[]) - +Method in class org.a11y.BrlAPI.Native +
  +
regionBegin - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
regionSize - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
+
+

+S

+
+
sendRaw(byte[]) - +Method in class org.a11y.BrlAPI.Native +
  +
setFocus(int) - +Method in class org.a11y.BrlAPI.Native +
  +
settings - +Variable in class org.a11y.BrlAPI.Brlapi +
  +
SUCCESS - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+T

+
+
Test - Class in org.a11y.BrlAPI
 
Test() - +Constructor for class org.a11y.BrlAPI.Test +
  +
text - +Variable in class org.a11y.BrlAPI.WriteArguments +
  +
toString() - +Method in error org.a11y.BrlAPI.Error +
  +
toString() - +Method in exception org.a11y.BrlAPI.Exception +
  +
TTY_DEFAULT - +Static variable in interface org.a11y.BrlAPI.Constants +
  +
TTYBUSY - +Static variable in error org.a11y.BrlAPI.Error +
  +
type - +Variable in class org.a11y.BrlAPI.Key +
  +
+
+

+U

+
+
UNKNOWN_INSTRUCTION - +Static variable in error org.a11y.BrlAPI.Error +
  +
UNKNOWNTTY - +Static variable in error org.a11y.BrlAPI.Error +
  +
+
+

+W

+
+
width - +Variable in class org.a11y.BrlAPI.DisplaySize +
  +
write(WriteArguments) - +Method in class org.a11y.BrlAPI.Native +
  +
WriteArguments - Class in org.a11y.BrlAPI
 
WriteArguments() - +Constructor for class org.a11y.BrlAPI.WriteArguments +
  +
writeDots(byte[]) - +Method in class org.a11y.BrlAPI.Native +
  +
writeText(int) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
writeText(String) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
writeText(String, int) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
writeText(int, String) - +Method in class org.a11y.BrlAPI.Brlapi +
  +
writeTextNative(int, String) - +Method in class org.a11y.BrlAPI.Native +
  +
+
+A B C D E F G H I K L M N O P R S T U W + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/index.html b/grub-core/braille/brltty/Bindings/Java/doc/index.html new file mode 100644 index 000000000..dc6ecc270 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/index.html @@ -0,0 +1,36 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="org/a11y/BrlAPI/package-summary.html">Non-frame version.</A> + + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Brlapi.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Brlapi.html new file mode 100644 index 000000000..a8469a7d1 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Brlapi.html @@ -0,0 +1,613 @@ + + + + + + +Brlapi + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Brlapi

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.Native
+      extended by org.a11y.BrlAPI.Brlapi
+
+
+
All Implemented Interfaces:
Constants
+
+
+
+
public class Brlapi
extends Native
implements Constants
+ + +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+protected  intfileDescriptor + +
+           
+protected  ConnectionSettingssettings + +
+           
+ + + + + + + +
Fields inherited from class org.a11y.BrlAPI.Native
handle
+ + + + + + + +
Fields inherited from interface org.a11y.BrlAPI.Constants
CURSOR_LEAVE, CURSOR_OFF, DISPLAY_DEFAULT, DOT1, DOT2, DOT3, DOT4, DOT5, DOT6, DOT7, DOT8, DOTC, ERROR_AUTHENTICATION, ERROR_CONNREFUSED, ERROR_DEVICEBUSY, ERROR_DRIVERERROR, ERROR_EMPTYKEY, ERROR_EOF, ERROR_GAIERR, ERROR_ILLEGAL_INSTRUCTION, ERROR_INVALID_PACKET, ERROR_INVALID_PARAMETER, ERROR_LIBCERR, ERROR_NOMEM, ERROR_OPNOTSUPP, ERROR_PROTOCOL_VERSION, ERROR_SUCCESS, ERROR_TTYBUSY, ERROR_UNKNOWN_INSTRUCTION, ERROR_UNKNOWNTTY, KEY_CMD_APNDCHARS, KEY_CMD_ARG_MASK, KEY_CMD_ARG_SHIFT, KEY_CMD_ATTRBLINK, KEY_CMD_ATTRDN, KEY_CMD_ATTRUP, KEY_CMD_ATTRVIS, KEY_CMD_AUTOREPEAT, KEY_CMD_AUTOSPEAK, KEY_CMD_BACK, KEY_CMD_BLK_MASK, KEY_CMD_BLK_SHIFT, KEY_CMD_BOT, KEY_CMD_BOT_LEFT, KEY_CMD_CAPBLINK, KEY_CMD_CHRLT, KEY_CMD_CHRRT, KEY_CMD_CONTEXT, KEY_CMD_COPYCHARS, KEY_CMD_CSRBLINK, KEY_CMD_CSRHIDE, KEY_CMD_CSRJMP_VERT, KEY_CMD_CSRSIZE, KEY_CMD_CSRTRK, KEY_CMD_CSRVIS, KEY_CMD_CUTAPPEND, KEY_CMD_CUTBEGIN, KEY_CMD_CUTLINE, KEY_CMD_CUTRECT, KEY_CMD_DESCCHAR, KEY_CMD_DISPMD, KEY_CMD_FREEZE, KEY_CMD_FWINLT, KEY_CMD_FWINLTSKIP, KEY_CMD_FWINRT, KEY_CMD_FWINRTSKIP, KEY_CMD_GOTOLINE, KEY_CMD_GOTOMARK, KEY_CMD_HELP, KEY_CMD_HOME, KEY_CMD_HWINLT, KEY_CMD_HWINRT, KEY_CMD_INFO, KEY_CMD_LEARN, KEY_CMD_LNBEG, KEY_CMD_LNDN, KEY_CMD_LNEND, KEY_CMD_LNUP, KEY_CMD_MENU_FIRST_ITEM, KEY_CMD_MENU_LAST_ITEM, KEY_CMD_MENU_NEXT_ITEM, KEY_CMD_MENU_NEXT_SETTING, KEY_CMD_MENU_PREV_ITEM, KEY_CMD_MENU_PREV_SETTING, KEY_CMD_MUTE, KEY_CMD_NOOP, KEY_CMD_NXDIFCHAR, KEY_CMD_NXDIFLN, KEY_CMD_NXINDENT, KEY_CMD_NXPGRPH, KEY_CMD_NXPROMPT, KEY_CMD_NXSEARCH, KEY_CMD_OFFLINE, KEY_CMD_PASSAT, KEY_CMD_PASSDOTS, KEY_CMD_PASSPS2, KEY_CMD_PASSXT, KEY_CMD_PASTE, KEY_CMD_PRDIFCHAR, KEY_CMD_PRDIFLN, KEY_CMD_PREFLOAD, KEY_CMD_PREFMENU, KEY_CMD_PREFSAVE, KEY_CMD_PRINDENT, KEY_CMD_PRPGRPH, KEY_CMD_PRPROMPT, KEY_CMD_PRSEARCH, KEY_CMD_RESTARTBRL, KEY_CMD_RESTARTSPEECH, KEY_CMD_RETURN, KEY_CMD_ROUTE, KEY_CMD_SAY_ABOVE, KEY_CMD_SAY_BELOW, KEY_CMD_SAY_FASTER, KEY_CMD_SAY_LINE, KEY_CMD_SAY_LOUDER, KEY_CMD_SAY_SLOWER, KEY_CMD_SAY_SOFTER, KEY_CMD_SETLEFT, KEY_CMD_SETMARK, KEY_CMD_SIXDOTS, KEY_CMD_SKPBLNKWINS, KEY_CMD_SKPIDLNS, KEY_CMD_SLIDEWIN, KEY_CMD_SPKHOME, KEY_CMD_SWITCHVT, KEY_CMD_SWITCHVT_NEXT, KEY_CMD_SWITCHVT_PREV, KEY_CMD_TOP, KEY_CMD_TOP_LEFT, KEY_CMD_TUNES, KEY_CMD_WINDN, KEY_CMD_WINUP, KEY_CODE_MASK, KEY_CODE_SHIFT, KEY_FLAGS_MASK, KEY_FLAGS_SHIFT, KEY_FLG_CONTROL, KEY_FLG_KBD_EMUL0, KEY_FLG_KBD_EMUL1, KEY_FLG_KBD_RELEASE, KEY_FLG_LINE_SCALED, KEY_FLG_LINE_TOLEFT, KEY_FLG_META, KEY_FLG_MOTION_ROUTE, KEY_FLG_REPEAT_DELAY, KEY_FLG_REPEAT_INITIAL, KEY_FLG_REPEAT_MASK, KEY_FLG_SHIFT, KEY_FLG_TOGGLE_MASK, KEY_FLG_TOGGLE_OFF, KEY_FLG_TOGGLE_ON, KEY_FLG_UPPER, KEY_MAX, KEY_SYM_BACKSPACE, KEY_SYM_DELETE, KEY_SYM_DOWN, KEY_SYM_END, KEY_SYM_ESCAPE, KEY_SYM_F1, KEY_SYM_F10, KEY_SYM_F11, KEY_SYM_F12, KEY_SYM_F13, KEY_SYM_F14, KEY_SYM_F15, KEY_SYM_F16, KEY_SYM_F17, KEY_SYM_F18, KEY_SYM_F19, KEY_SYM_F2, KEY_SYM_F20, KEY_SYM_F21, KEY_SYM_F22, KEY_SYM_F23, KEY_SYM_F24, KEY_SYM_F25, KEY_SYM_F26, KEY_SYM_F27, KEY_SYM_F28, KEY_SYM_F29, KEY_SYM_F3, KEY_SYM_F30, KEY_SYM_F31, KEY_SYM_F32, KEY_SYM_F33, KEY_SYM_F34, KEY_SYM_F35, KEY_SYM_F4, KEY_SYM_F5, KEY_SYM_F6, KEY_SYM_F7, KEY_SYM_F8, KEY_SYM_F9, KEY_SYM_HOME, KEY_SYM_INSERT, KEY_SYM_LEFT, KEY_SYM_LINEFEED, KEY_SYM_PAGE_DOWN, KEY_SYM_PAGE_UP, KEY_SYM_RIGHT, KEY_SYM_TAB, KEY_SYM_UNICODE, KEY_SYM_UP, KEY_TYPE_CMD, KEY_TYPE_MASK, KEY_TYPE_SHIFT, KEY_TYPE_SYM, rangeType_all, rangeType_code, rangeType_command, rangeType_key, rangeType_type, TTY_DEFAULT
+  + + + + + + + + + + +
+Constructor Summary
Brlapi(ConnectionSettings settings) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intenterTtyMode() + +
+           
+ intenterTtyMode(int tty) + +
+           
+ intenterTtyMode(java.lang.String driver) + +
+           
+ voidenterTtyModeWithPath(int[] ttys) + +
+           
+protected  voidfinalize() + +
+           
+ java.lang.StringgetAuth() + +
+           
+ intgetFileDescriptor() + +
+           
+ java.lang.StringgetHost() + +
+           
+ voidwriteText(int cursor) + +
+           
+ voidwriteText(int cursor, + java.lang.String text) + +
+           
+ voidwriteText(java.lang.String text) + +
+           
+ voidwriteText(java.lang.String text, + int cursor) + +
+           
+ + + + + + + +
Methods inherited from class org.a11y.BrlAPI.Native
acceptAllKeys, acceptKeyRanges, acceptKeys, closeConnection, enterRawMode, enterTtyMode, enterTtyModeWithPath, getDisplaySize, getDriverName, getPacketTypeName, ignoreAllKeys, ignoreKeyRanges, ignoreKeys, leaveRawMode, leaveTtyMode, openConnection, readKey, recvRaw, sendRaw, setFocus, write, writeDots, writeTextNative
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+settings

+
+protected final ConnectionSettings settings
+
+
+
+
+
+ +

+fileDescriptor

+
+protected final int fileDescriptor
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Brlapi

+
+public Brlapi(ConnectionSettings settings)
+       throws Error
+
+
+ +
Throws: +
Error
+
+ + + + + + + + +
+Method Detail
+ +

+finalize

+
+protected void finalize()
+
+
+
Overrides:
finalize in class java.lang.Object
+
+
+
+
+
+
+ +

+getHost

+
+public java.lang.String getHost()
+
+
+
+
+
+
+
+
+
+ +

+getAuth

+
+public java.lang.String getAuth()
+
+
+
+
+
+
+
+
+
+ +

+getFileDescriptor

+
+public int getFileDescriptor()
+
+
+
+
+
+
+
+
+
+ +

+enterTtyMode

+
+public int enterTtyMode(int tty)
+                 throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterTtyMode

+
+public int enterTtyMode(java.lang.String driver)
+                 throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterTtyMode

+
+public int enterTtyMode()
+                 throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterTtyModeWithPath

+
+public void enterTtyModeWithPath(int[] ttys)
+                          throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeText

+
+public void writeText(int cursor)
+               throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeText

+
+public void writeText(java.lang.String text)
+               throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeText

+
+public void writeText(java.lang.String text,
+                      int cursor)
+               throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeText

+
+public void writeText(int cursor,
+                      java.lang.String text)
+               throws Error
+
+
+
+
+
+ +
Throws: +
Error
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/ConnectionSettings.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/ConnectionSettings.html new file mode 100644 index 000000000..34f113a4a --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/ConnectionSettings.html @@ -0,0 +1,306 @@ + + + + + + +ConnectionSettings + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class ConnectionSettings

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.ConnectionSettings
+
+
+
+
public class ConnectionSettings
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+ java.lang.Stringauth + +
+           
+ java.lang.Stringhost + +
+           
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
ConnectionSettings() + +
+           
ConnectionSettings(java.lang.String host) + +
+           
ConnectionSettings(java.lang.String host, + java.lang.String auth) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+host

+
+public java.lang.String host
+
+
+
+
+
+ +

+auth

+
+public java.lang.String auth
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ConnectionSettings

+
+public ConnectionSettings(java.lang.String host,
+                          java.lang.String auth)
+
+
+
+ +

+ConnectionSettings

+
+public ConnectionSettings(java.lang.String host)
+
+
+
+ +

+ConnectionSettings

+
+public ConnectionSettings()
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Constants.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Constants.html new file mode 100644 index 000000000..8844daf54 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Constants.html @@ -0,0 +1,4287 @@ + + + + + + +Constants + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Interface Constants

+
+
All Known Implementing Classes:
Brlapi
+
+
+
+
public interface Constants
+ + +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intCURSOR_LEAVE + +
+           
+static intCURSOR_OFF + +
+           
+static intDISPLAY_DEFAULT + +
+           
+static byteDOT1 + +
+          upper-left dot of standard braille cell
+static byteDOT2 + +
+          middle-left dot of standard braille cell
+static byteDOT3 + +
+          lower-left dot of standard braille cell
+static byteDOT4 + +
+          upper-right dot of standard braille cell
+static byteDOT5 + +
+          middle-right dot of standard braille cell
+static byteDOT6 + +
+          lower-right dot of standard braille cell
+static byteDOT7 + +
+          lower-left dot of computer braille cell
+static byteDOT8 + +
+          lower-right dot of computer braille cell
+static byteDOTC + +
+          space key pressed
+static intERROR_AUTHENTICATION + +
+           
+static intERROR_CONNREFUSED + +
+           
+static intERROR_DEVICEBUSY + +
+           
+static intERROR_DRIVERERROR + +
+           
+static intERROR_EMPTYKEY + +
+           
+static intERROR_EOF + +
+           
+static intERROR_GAIERR + +
+           
+static intERROR_ILLEGAL_INSTRUCTION + +
+           
+static intERROR_INVALID_PACKET + +
+           
+static intERROR_INVALID_PARAMETER + +
+           
+static intERROR_LIBCERR + +
+           
+static intERROR_NOMEM + +
+           
+static intERROR_OPNOTSUPP + +
+           
+static intERROR_PROTOCOL_VERSION + +
+           
+static intERROR_SUCCESS + +
+           
+static intERROR_TTYBUSY + +
+           
+static intERROR_UNKNOWN_INSTRUCTION + +
+           
+static intERROR_UNKNOWNTTY + +
+           
+static intKEY_CMD_APNDCHARS + +
+          append characters to cut buffer
+static longKEY_CMD_ARG_MASK + +
+           
+static intKEY_CMD_ARG_SHIFT + +
+           
+static intKEY_CMD_ATTRBLINK + +
+          toggle attribute blinking on/off
+static intKEY_CMD_ATTRDN + +
+          go down to nearest line with different highlighting
+static intKEY_CMD_ATTRUP + +
+          go up to nearest line with different highlighting
+static intKEY_CMD_ATTRVIS + +
+          toggle attribute underlining on/off
+static intKEY_CMD_AUTOREPEAT + +
+          toggle autorepeat on/off
+static intKEY_CMD_AUTOSPEAK + +
+          toggle autospeak on/off
+static intKEY_CMD_BACK + +
+          go back after cursor tracking
+static longKEY_CMD_BLK_MASK + +
+           
+static intKEY_CMD_BLK_SHIFT + +
+           
+static intKEY_CMD_BOT + +
+          go to bottom line
+static intKEY_CMD_BOT_LEFT + +
+          go to beginning of bottom line
+static intKEY_CMD_CAPBLINK + +
+          toggle capital letter blinking on/off
+static intKEY_CMD_CHRLT + +
+          go left one character
+static intKEY_CMD_CHRRT + +
+          go right one character
+static intKEY_CMD_CONTEXT + +
+          switch to command context
+static intKEY_CMD_COPYCHARS + +
+          copy characters to cut buffer
+static intKEY_CMD_CSRBLINK + +
+          toggle cursor blinking on/off
+static intKEY_CMD_CSRHIDE + +
+          toggle hidden cursor on/off
+static intKEY_CMD_CSRJMP_VERT + +
+          bring cursor to line
+static intKEY_CMD_CSRSIZE + +
+          toggle cursor style block/underline
+static intKEY_CMD_CSRTRK + +
+          toggle cursor tracking on/off
+static intKEY_CMD_CSRVIS + +
+          toggle cursor visibility on/off
+static intKEY_CMD_CUTAPPEND + +
+          append to existing cut buffer from character
+static intKEY_CMD_CUTBEGIN + +
+          start new cut buffer at character
+static intKEY_CMD_CUTLINE + +
+          linear cut to character
+static intKEY_CMD_CUTRECT + +
+          rectangular cut to character
+static intKEY_CMD_DESCCHAR + +
+          describe character
+static intKEY_CMD_DISPMD + +
+          toggle display mode attributes/text
+static intKEY_CMD_FREEZE + +
+          freeze/unfreeze screen image
+static intKEY_CMD_FWINLT + +
+          go left one window
+static intKEY_CMD_FWINLTSKIP + +
+          go left to nearest non-blank window
+static intKEY_CMD_FWINRT + +
+          go right one window
+static intKEY_CMD_FWINRTSKIP + +
+          go right to nearest non-blank window
+static intKEY_CMD_GOTOLINE + +
+          go to selected line
+static intKEY_CMD_GOTOMARK + +
+          go to remembered window position
+static intKEY_CMD_HELP + +
+          enter/leave help display
+static intKEY_CMD_HOME + +
+          go to cursor
+static intKEY_CMD_HWINLT + +
+          go left half a window
+static intKEY_CMD_HWINRT + +
+          go right half a window
+static intKEY_CMD_INFO + +
+          enter/leave status display
+static intKEY_CMD_LEARN + +
+          enter/leave command learn mode
+static intKEY_CMD_LNBEG + +
+          go to beginning of line
+static intKEY_CMD_LNDN + +
+          go down one line
+static intKEY_CMD_LNEND + +
+          go to end of line
+static intKEY_CMD_LNUP + +
+          go up one line
+static intKEY_CMD_MENU_FIRST_ITEM + +
+          go to first item
+static intKEY_CMD_MENU_LAST_ITEM + +
+          go to last item
+static intKEY_CMD_MENU_NEXT_ITEM + +
+          go to next item
+static intKEY_CMD_MENU_NEXT_SETTING + +
+          select next choice
+static intKEY_CMD_MENU_PREV_ITEM + +
+          go to previous item
+static intKEY_CMD_MENU_PREV_SETTING + +
+          select previous choice
+static intKEY_CMD_MUTE + +
+          stop speaking
+static intKEY_CMD_NOOP + +
+          do nothing
+static intKEY_CMD_NXDIFCHAR + +
+          go down to nearest line with different character
+static intKEY_CMD_NXDIFLN + +
+          go down to nearest line with different content
+static intKEY_CMD_NXINDENT + +
+          go down to nearest line with less indent than character
+static intKEY_CMD_NXPGRPH + +
+          go down to first line of next paragraph
+static intKEY_CMD_NXPROMPT + +
+          go down to next command prompt
+static intKEY_CMD_NXSEARCH + +
+          search forward for cut text
+static intKEY_CMD_OFFLINE + +
+          braille display temporarily unavailable
+static intKEY_CMD_PASSAT + +
+          input AT (set 2) keyboard scan code
+static intKEY_CMD_PASSDOTS + +
+          input braille character
+static intKEY_CMD_PASSPS2 + +
+          input PS/2 (set 3) keyboard scan code
+static intKEY_CMD_PASSXT + +
+          input XT (set 1) keyboard scan code
+static intKEY_CMD_PASTE + +
+          insert cut text at cursor
+static intKEY_CMD_PRDIFCHAR + +
+          go up to nearest line with different character
+static intKEY_CMD_PRDIFLN + +
+          go up to nearest line with different content
+static intKEY_CMD_PREFLOAD + +
+          restore preferences from disk
+static intKEY_CMD_PREFMENU + +
+          enter/leave preferences menu
+static intKEY_CMD_PREFSAVE + +
+          save preferences to disk
+static intKEY_CMD_PRINDENT + +
+          go up to nearest line with less indent than character
+static intKEY_CMD_PRPGRPH + +
+          go up to last line of previous paragraph
+static intKEY_CMD_PRPROMPT + +
+          go up to previous command prompt
+static intKEY_CMD_PRSEARCH + +
+          search backward for cut text
+static intKEY_CMD_RESTARTBRL + +
+          restart braille driver
+static intKEY_CMD_RESTARTSPEECH + +
+          restart speech driver
+static intKEY_CMD_RETURN + +
+          go to cursor or go back after cursor tracking
+static intKEY_CMD_ROUTE + +
+          bring cursor to character
+static intKEY_CMD_SAY_ABOVE + +
+          speak from top of screen through current line
+static intKEY_CMD_SAY_BELOW + +
+          speak from current line through bottom of screen
+static intKEY_CMD_SAY_FASTER + +
+          increase speech rate
+static intKEY_CMD_SAY_LINE + +
+          speak current line
+static intKEY_CMD_SAY_LOUDER + +
+          increase speech volume
+static intKEY_CMD_SAY_SLOWER + +
+          decrease speech rate
+static intKEY_CMD_SAY_SOFTER + +
+          decrease speech volume
+static intKEY_CMD_SETLEFT + +
+          place left end of window at character
+static intKEY_CMD_SETMARK + +
+          remember current window position
+static intKEY_CMD_SIXDOTS + +
+          toggle text style 6-dot/8-dot
+static intKEY_CMD_SKPBLNKWINS + +
+          toggle skipping of blank windows on/off
+static intKEY_CMD_SKPIDLNS + +
+          toggle skipping of lines with identical content on/off
+static intKEY_CMD_SLIDEWIN + +
+          toggle sliding window on/off
+static intKEY_CMD_SPKHOME + +
+          go to current speech position
+static intKEY_CMD_SWITCHVT + +
+          switch to virtual terminal
+static intKEY_CMD_SWITCHVT_NEXT + +
+          switch to next virtual terminal
+static intKEY_CMD_SWITCHVT_PREV + +
+          switch to previous virtual terminal
+static intKEY_CMD_TOP + +
+          go to top line
+static intKEY_CMD_TOP_LEFT + +
+          go to beginning of top line
+static intKEY_CMD_TUNES + +
+          toggle alert tunes on/off
+static intKEY_CMD_WINDN + +
+          go down several lines
+static intKEY_CMD_WINUP + +
+          go up several lines
+static longKEY_CODE_MASK + +
+           
+static intKEY_CODE_SHIFT + +
+           
+static longKEY_FLAGS_MASK + +
+           
+static intKEY_FLAGS_SHIFT + +
+           
+static intKEY_FLG_CONTROL + +
+          control key pressed
+static intKEY_FLG_KBD_EMUL0 + +
+          it is an emulation 0 scan code
+static intKEY_FLG_KBD_EMUL1 + +
+          it is an emulation 1 scan code
+static intKEY_FLG_KBD_RELEASE + +
+          it is a release scan code
+static intKEY_FLG_LINE_SCALED + +
+          scale arg=0X00-0XFF to screen height
+static intKEY_FLG_LINE_TOLEFT + +
+          go to beginning of line
+static intKEY_FLG_META + +
+          meta key pressed
+static intKEY_FLG_MOTION_ROUTE + +
+          bring cursor into window after function
+static intKEY_FLG_REPEAT_DELAY + +
+          wait before repeating
+static intKEY_FLG_REPEAT_INITIAL + +
+          execute command on key press
+static intKEY_FLG_REPEAT_MASK + +
+          mask for all repeat flags
+static intKEY_FLG_SHIFT + +
+          shift key pressed
+static intKEY_FLG_TOGGLE_MASK + +
+          mask for all toggle flags
+static intKEY_FLG_TOGGLE_OFF + +
+          disable feature
+static intKEY_FLG_TOGGLE_ON + +
+          enable feature
+static intKEY_FLG_UPPER + +
+          convert to uppercase
+static longKEY_MAX + +
+           
+static intKEY_SYM_BACKSPACE + +
+           
+static intKEY_SYM_DELETE + +
+           
+static intKEY_SYM_DOWN + +
+           
+static intKEY_SYM_END + +
+           
+static intKEY_SYM_ESCAPE + +
+           
+static intKEY_SYM_F1 + +
+           
+static intKEY_SYM_F10 + +
+           
+static intKEY_SYM_F11 + +
+           
+static intKEY_SYM_F12 + +
+           
+static intKEY_SYM_F13 + +
+           
+static intKEY_SYM_F14 + +
+           
+static intKEY_SYM_F15 + +
+           
+static intKEY_SYM_F16 + +
+           
+static intKEY_SYM_F17 + +
+           
+static intKEY_SYM_F18 + +
+           
+static intKEY_SYM_F19 + +
+           
+static intKEY_SYM_F2 + +
+           
+static intKEY_SYM_F20 + +
+           
+static intKEY_SYM_F21 + +
+           
+static intKEY_SYM_F22 + +
+           
+static intKEY_SYM_F23 + +
+           
+static intKEY_SYM_F24 + +
+           
+static intKEY_SYM_F25 + +
+           
+static intKEY_SYM_F26 + +
+           
+static intKEY_SYM_F27 + +
+           
+static intKEY_SYM_F28 + +
+           
+static intKEY_SYM_F29 + +
+           
+static intKEY_SYM_F3 + +
+           
+static intKEY_SYM_F30 + +
+           
+static intKEY_SYM_F31 + +
+           
+static intKEY_SYM_F32 + +
+           
+static intKEY_SYM_F33 + +
+           
+static intKEY_SYM_F34 + +
+           
+static intKEY_SYM_F35 + +
+           
+static intKEY_SYM_F4 + +
+           
+static intKEY_SYM_F5 + +
+           
+static intKEY_SYM_F6 + +
+           
+static intKEY_SYM_F7 + +
+           
+static intKEY_SYM_F8 + +
+           
+static intKEY_SYM_F9 + +
+           
+static intKEY_SYM_HOME + +
+           
+static intKEY_SYM_INSERT + +
+           
+static intKEY_SYM_LEFT + +
+           
+static intKEY_SYM_LINEFEED + +
+           
+static intKEY_SYM_PAGE_DOWN + +
+           
+static intKEY_SYM_PAGE_UP + +
+           
+static intKEY_SYM_RIGHT + +
+           
+static intKEY_SYM_TAB + +
+           
+static intKEY_SYM_UNICODE + +
+           
+static intKEY_SYM_UP + +
+           
+static intKEY_TYPE_CMD + +
+           
+static longKEY_TYPE_MASK + +
+           
+static intKEY_TYPE_SHIFT + +
+           
+static intKEY_TYPE_SYM + +
+           
+static intrangeType_all + +
+           
+static intrangeType_code + +
+           
+static intrangeType_command + +
+           
+static intrangeType_key + +
+           
+static intrangeType_type + +
+           
+static intTTY_DEFAULT + +
+           
+  +

+ + + + + + + + +
+Field Detail
+ +

+TTY_DEFAULT

+
+static final int TTY_DEFAULT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DISPLAY_DEFAULT

+
+static final int DISPLAY_DEFAULT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CURSOR_LEAVE

+
+static final int CURSOR_LEAVE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CURSOR_OFF

+
+static final int CURSOR_OFF
+
+
+
See Also:
Constant Field Values
+
+
+ +

+rangeType_all

+
+static final int rangeType_all
+
+
+
See Also:
Constant Field Values
+
+
+ +

+rangeType_type

+
+static final int rangeType_type
+
+
+
See Also:
Constant Field Values
+
+
+ +

+rangeType_command

+
+static final int rangeType_command
+
+
+
See Also:
Constant Field Values
+
+
+ +

+rangeType_key

+
+static final int rangeType_key
+
+
+
See Also:
Constant Field Values
+
+
+ +

+rangeType_code

+
+static final int rangeType_code
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_SUCCESS

+
+static final int ERROR_SUCCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_NOMEM

+
+static final int ERROR_NOMEM
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_TTYBUSY

+
+static final int ERROR_TTYBUSY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_DEVICEBUSY

+
+static final int ERROR_DEVICEBUSY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_UNKNOWN_INSTRUCTION

+
+static final int ERROR_UNKNOWN_INSTRUCTION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_ILLEGAL_INSTRUCTION

+
+static final int ERROR_ILLEGAL_INSTRUCTION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_INVALID_PARAMETER

+
+static final int ERROR_INVALID_PARAMETER
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_INVALID_PACKET

+
+static final int ERROR_INVALID_PACKET
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_CONNREFUSED

+
+static final int ERROR_CONNREFUSED
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_OPNOTSUPP

+
+static final int ERROR_OPNOTSUPP
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_GAIERR

+
+static final int ERROR_GAIERR
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_LIBCERR

+
+static final int ERROR_LIBCERR
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_UNKNOWNTTY

+
+static final int ERROR_UNKNOWNTTY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_PROTOCOL_VERSION

+
+static final int ERROR_PROTOCOL_VERSION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_EOF

+
+static final int ERROR_EOF
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_EMPTYKEY

+
+static final int ERROR_EMPTYKEY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_DRIVERERROR

+
+static final int ERROR_DRIVERERROR
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ERROR_AUTHENTICATION

+
+static final int ERROR_AUTHENTICATION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_MAX

+
+static final long KEY_MAX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLAGS_MASK

+
+static final long KEY_FLAGS_MASK
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLAGS_SHIFT

+
+static final int KEY_FLAGS_SHIFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_TYPE_MASK

+
+static final long KEY_TYPE_MASK
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_TYPE_SHIFT

+
+static final int KEY_TYPE_SHIFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_TYPE_CMD

+
+static final int KEY_TYPE_CMD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_TYPE_SYM

+
+static final int KEY_TYPE_SYM
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CODE_MASK

+
+static final long KEY_CODE_MASK
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CODE_SHIFT

+
+static final int KEY_CODE_SHIFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_BLK_MASK

+
+static final long KEY_CMD_BLK_MASK
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_BLK_SHIFT

+
+static final int KEY_CMD_BLK_SHIFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ARG_MASK

+
+static final long KEY_CMD_ARG_MASK
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ARG_SHIFT

+
+static final int KEY_CMD_ARG_SHIFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_BACKSPACE

+
+static final int KEY_SYM_BACKSPACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_TAB

+
+static final int KEY_SYM_TAB
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_LINEFEED

+
+static final int KEY_SYM_LINEFEED
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_ESCAPE

+
+static final int KEY_SYM_ESCAPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_HOME

+
+static final int KEY_SYM_HOME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_LEFT

+
+static final int KEY_SYM_LEFT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_UP

+
+static final int KEY_SYM_UP
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_RIGHT

+
+static final int KEY_SYM_RIGHT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_DOWN

+
+static final int KEY_SYM_DOWN
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_PAGE_UP

+
+static final int KEY_SYM_PAGE_UP
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_PAGE_DOWN

+
+static final int KEY_SYM_PAGE_DOWN
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_END

+
+static final int KEY_SYM_END
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_INSERT

+
+static final int KEY_SYM_INSERT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F1

+
+static final int KEY_SYM_F1
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F2

+
+static final int KEY_SYM_F2
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F3

+
+static final int KEY_SYM_F3
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F4

+
+static final int KEY_SYM_F4
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F5

+
+static final int KEY_SYM_F5
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F6

+
+static final int KEY_SYM_F6
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F7

+
+static final int KEY_SYM_F7
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F8

+
+static final int KEY_SYM_F8
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F9

+
+static final int KEY_SYM_F9
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F10

+
+static final int KEY_SYM_F10
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F11

+
+static final int KEY_SYM_F11
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F12

+
+static final int KEY_SYM_F12
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F13

+
+static final int KEY_SYM_F13
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F14

+
+static final int KEY_SYM_F14
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F15

+
+static final int KEY_SYM_F15
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F16

+
+static final int KEY_SYM_F16
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F17

+
+static final int KEY_SYM_F17
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F18

+
+static final int KEY_SYM_F18
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F19

+
+static final int KEY_SYM_F19
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F20

+
+static final int KEY_SYM_F20
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F21

+
+static final int KEY_SYM_F21
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F22

+
+static final int KEY_SYM_F22
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F23

+
+static final int KEY_SYM_F23
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F24

+
+static final int KEY_SYM_F24
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F25

+
+static final int KEY_SYM_F25
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F26

+
+static final int KEY_SYM_F26
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F27

+
+static final int KEY_SYM_F27
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F28

+
+static final int KEY_SYM_F28
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F29

+
+static final int KEY_SYM_F29
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F30

+
+static final int KEY_SYM_F30
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F31

+
+static final int KEY_SYM_F31
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F32

+
+static final int KEY_SYM_F32
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F33

+
+static final int KEY_SYM_F33
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F34

+
+static final int KEY_SYM_F34
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_F35

+
+static final int KEY_SYM_F35
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_DELETE

+
+static final int KEY_SYM_DELETE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_SYM_UNICODE

+
+static final int KEY_SYM_UNICODE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NOOP

+
+static final int KEY_CMD_NOOP
+
+
do nothing +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_LNUP

+
+static final int KEY_CMD_LNUP
+
+
go up one line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_LNDN

+
+static final int KEY_CMD_LNDN
+
+
go down one line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_WINUP

+
+static final int KEY_CMD_WINUP
+
+
go up several lines +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_WINDN

+
+static final int KEY_CMD_WINDN
+
+
go down several lines +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRDIFLN

+
+static final int KEY_CMD_PRDIFLN
+
+
go up to nearest line with different content +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXDIFLN

+
+static final int KEY_CMD_NXDIFLN
+
+
go down to nearest line with different content +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ATTRUP

+
+static final int KEY_CMD_ATTRUP
+
+
go up to nearest line with different highlighting +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ATTRDN

+
+static final int KEY_CMD_ATTRDN
+
+
go down to nearest line with different highlighting +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_TOP

+
+static final int KEY_CMD_TOP
+
+
go to top line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_BOT

+
+static final int KEY_CMD_BOT
+
+
go to bottom line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_TOP_LEFT

+
+static final int KEY_CMD_TOP_LEFT
+
+
go to beginning of top line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_BOT_LEFT

+
+static final int KEY_CMD_BOT_LEFT
+
+
go to beginning of bottom line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRPGRPH

+
+static final int KEY_CMD_PRPGRPH
+
+
go up to last line of previous paragraph +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXPGRPH

+
+static final int KEY_CMD_NXPGRPH
+
+
go down to first line of next paragraph +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRPROMPT

+
+static final int KEY_CMD_PRPROMPT
+
+
go up to previous command prompt +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXPROMPT

+
+static final int KEY_CMD_NXPROMPT
+
+
go down to next command prompt +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRSEARCH

+
+static final int KEY_CMD_PRSEARCH
+
+
search backward for cut text +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXSEARCH

+
+static final int KEY_CMD_NXSEARCH
+
+
search forward for cut text +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CHRLT

+
+static final int KEY_CMD_CHRLT
+
+
go left one character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CHRRT

+
+static final int KEY_CMD_CHRRT
+
+
go right one character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_HWINLT

+
+static final int KEY_CMD_HWINLT
+
+
go left half a window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_HWINRT

+
+static final int KEY_CMD_HWINRT
+
+
go right half a window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_FWINLT

+
+static final int KEY_CMD_FWINLT
+
+
go left one window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_FWINRT

+
+static final int KEY_CMD_FWINRT
+
+
go right one window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_FWINLTSKIP

+
+static final int KEY_CMD_FWINLTSKIP
+
+
go left to nearest non-blank window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_FWINRTSKIP

+
+static final int KEY_CMD_FWINRTSKIP
+
+
go right to nearest non-blank window +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_LNBEG

+
+static final int KEY_CMD_LNBEG
+
+
go to beginning of line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_LNEND

+
+static final int KEY_CMD_LNEND
+
+
go to end of line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_HOME

+
+static final int KEY_CMD_HOME
+
+
go to cursor +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_BACK

+
+static final int KEY_CMD_BACK
+
+
go back after cursor tracking +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_RETURN

+
+static final int KEY_CMD_RETURN
+
+
go to cursor or go back after cursor tracking +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_FREEZE

+
+static final int KEY_CMD_FREEZE
+
+
freeze/unfreeze screen image +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_DISPMD

+
+static final int KEY_CMD_DISPMD
+
+
toggle display mode attributes/text +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SIXDOTS

+
+static final int KEY_CMD_SIXDOTS
+
+
toggle text style 6-dot/8-dot +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SLIDEWIN

+
+static final int KEY_CMD_SLIDEWIN
+
+
toggle sliding window on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SKPIDLNS

+
+static final int KEY_CMD_SKPIDLNS
+
+
toggle skipping of lines with identical content on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SKPBLNKWINS

+
+static final int KEY_CMD_SKPBLNKWINS
+
+
toggle skipping of blank windows on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRVIS

+
+static final int KEY_CMD_CSRVIS
+
+
toggle cursor visibility on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRHIDE

+
+static final int KEY_CMD_CSRHIDE
+
+
toggle hidden cursor on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRTRK

+
+static final int KEY_CMD_CSRTRK
+
+
toggle cursor tracking on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRSIZE

+
+static final int KEY_CMD_CSRSIZE
+
+
toggle cursor style block/underline +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRBLINK

+
+static final int KEY_CMD_CSRBLINK
+
+
toggle cursor blinking on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ATTRVIS

+
+static final int KEY_CMD_ATTRVIS
+
+
toggle attribute underlining on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ATTRBLINK

+
+static final int KEY_CMD_ATTRBLINK
+
+
toggle attribute blinking on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CAPBLINK

+
+static final int KEY_CMD_CAPBLINK
+
+
toggle capital letter blinking on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_TUNES

+
+static final int KEY_CMD_TUNES
+
+
toggle alert tunes on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_AUTOREPEAT

+
+static final int KEY_CMD_AUTOREPEAT
+
+
toggle autorepeat on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_AUTOSPEAK

+
+static final int KEY_CMD_AUTOSPEAK
+
+
toggle autospeak on/off +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_HELP

+
+static final int KEY_CMD_HELP
+
+
enter/leave help display +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_INFO

+
+static final int KEY_CMD_INFO
+
+
enter/leave status display +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_LEARN

+
+static final int KEY_CMD_LEARN
+
+
enter/leave command learn mode +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PREFMENU

+
+static final int KEY_CMD_PREFMENU
+
+
enter/leave preferences menu +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PREFSAVE

+
+static final int KEY_CMD_PREFSAVE
+
+
save preferences to disk +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PREFLOAD

+
+static final int KEY_CMD_PREFLOAD
+
+
restore preferences from disk +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_FIRST_ITEM

+
+static final int KEY_CMD_MENU_FIRST_ITEM
+
+
go to first item +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_LAST_ITEM

+
+static final int KEY_CMD_MENU_LAST_ITEM
+
+
go to last item +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_PREV_ITEM

+
+static final int KEY_CMD_MENU_PREV_ITEM
+
+
go to previous item +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_NEXT_ITEM

+
+static final int KEY_CMD_MENU_NEXT_ITEM
+
+
go to next item +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_PREV_SETTING

+
+static final int KEY_CMD_MENU_PREV_SETTING
+
+
select previous choice +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MENU_NEXT_SETTING

+
+static final int KEY_CMD_MENU_NEXT_SETTING
+
+
select next choice +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_MUTE

+
+static final int KEY_CMD_MUTE
+
+
stop speaking +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SPKHOME

+
+static final int KEY_CMD_SPKHOME
+
+
go to current speech position +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_LINE

+
+static final int KEY_CMD_SAY_LINE
+
+
speak current line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_ABOVE

+
+static final int KEY_CMD_SAY_ABOVE
+
+
speak from top of screen through current line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_BELOW

+
+static final int KEY_CMD_SAY_BELOW
+
+
speak from current line through bottom of screen +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_SLOWER

+
+static final int KEY_CMD_SAY_SLOWER
+
+
decrease speech rate +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_FASTER

+
+static final int KEY_CMD_SAY_FASTER
+
+
increase speech rate +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_SOFTER

+
+static final int KEY_CMD_SAY_SOFTER
+
+
decrease speech volume +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SAY_LOUDER

+
+static final int KEY_CMD_SAY_LOUDER
+
+
increase speech volume +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SWITCHVT_PREV

+
+static final int KEY_CMD_SWITCHVT_PREV
+
+
switch to previous virtual terminal +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SWITCHVT_NEXT

+
+static final int KEY_CMD_SWITCHVT_NEXT
+
+
switch to next virtual terminal +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CSRJMP_VERT

+
+static final int KEY_CMD_CSRJMP_VERT
+
+
bring cursor to line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PASTE

+
+static final int KEY_CMD_PASTE
+
+
insert cut text at cursor +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_RESTARTBRL

+
+static final int KEY_CMD_RESTARTBRL
+
+
restart braille driver +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_RESTARTSPEECH

+
+static final int KEY_CMD_RESTARTSPEECH
+
+
restart speech driver +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_OFFLINE

+
+static final int KEY_CMD_OFFLINE
+
+
braille display temporarily unavailable +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_TOGGLE_ON

+
+static final int KEY_FLG_TOGGLE_ON
+
+
enable feature +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_TOGGLE_OFF

+
+static final int KEY_FLG_TOGGLE_OFF
+
+
disable feature +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_TOGGLE_MASK

+
+static final int KEY_FLG_TOGGLE_MASK
+
+
mask for all toggle flags +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_MOTION_ROUTE

+
+static final int KEY_FLG_MOTION_ROUTE
+
+
bring cursor into window after function +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_REPEAT_INITIAL

+
+static final int KEY_FLG_REPEAT_INITIAL
+
+
execute command on key press +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_REPEAT_DELAY

+
+static final int KEY_FLG_REPEAT_DELAY
+
+
wait before repeating +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_REPEAT_MASK

+
+static final int KEY_FLG_REPEAT_MASK
+
+
mask for all repeat flags +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_ROUTE

+
+static final int KEY_CMD_ROUTE
+
+
bring cursor to character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CUTBEGIN

+
+static final int KEY_CMD_CUTBEGIN
+
+
start new cut buffer at character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CUTAPPEND

+
+static final int KEY_CMD_CUTAPPEND
+
+
append to existing cut buffer from character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CUTRECT

+
+static final int KEY_CMD_CUTRECT
+
+
rectangular cut to character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CUTLINE

+
+static final int KEY_CMD_CUTLINE
+
+
linear cut to character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SWITCHVT

+
+static final int KEY_CMD_SWITCHVT
+
+
switch to virtual terminal +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRINDENT

+
+static final int KEY_CMD_PRINDENT
+
+
go up to nearest line with less indent than character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXINDENT

+
+static final int KEY_CMD_NXINDENT
+
+
go down to nearest line with less indent than character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_DESCCHAR

+
+static final int KEY_CMD_DESCCHAR
+
+
describe character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SETLEFT

+
+static final int KEY_CMD_SETLEFT
+
+
place left end of window at character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_SETMARK

+
+static final int KEY_CMD_SETMARK
+
+
remember current window position +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_GOTOMARK

+
+static final int KEY_CMD_GOTOMARK
+
+
go to remembered window position +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_GOTOLINE

+
+static final int KEY_CMD_GOTOLINE
+
+
go to selected line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_LINE_SCALED

+
+static final int KEY_FLG_LINE_SCALED
+
+
scale arg=0X00-0XFF to screen height +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_LINE_TOLEFT

+
+static final int KEY_FLG_LINE_TOLEFT
+
+
go to beginning of line +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PRDIFCHAR

+
+static final int KEY_CMD_PRDIFCHAR
+
+
go up to nearest line with different character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_NXDIFCHAR

+
+static final int KEY_CMD_NXDIFCHAR
+
+
go down to nearest line with different character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_COPYCHARS

+
+static final int KEY_CMD_COPYCHARS
+
+
copy characters to cut buffer +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_APNDCHARS

+
+static final int KEY_CMD_APNDCHARS
+
+
append characters to cut buffer +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PASSDOTS

+
+static final int KEY_CMD_PASSDOTS
+
+
input braille character +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_SHIFT

+
+static final int KEY_FLG_SHIFT
+
+
shift key pressed +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_UPPER

+
+static final int KEY_FLG_UPPER
+
+
convert to uppercase +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_CONTROL

+
+static final int KEY_FLG_CONTROL
+
+
control key pressed +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_META

+
+static final int KEY_FLG_META
+
+
meta key pressed +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT1

+
+static final byte DOT1
+
+
upper-left dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT2

+
+static final byte DOT2
+
+
middle-left dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT3

+
+static final byte DOT3
+
+
lower-left dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT4

+
+static final byte DOT4
+
+
upper-right dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT5

+
+static final byte DOT5
+
+
middle-right dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT6

+
+static final byte DOT6
+
+
lower-right dot of standard braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT7

+
+static final byte DOT7
+
+
lower-left dot of computer braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOT8

+
+static final byte DOT8
+
+
lower-right dot of computer braille cell +

+

+
See Also:
Constant Field Values
+
+
+ +

+DOTC

+
+static final byte DOTC
+
+
space key pressed +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PASSAT

+
+static final int KEY_CMD_PASSAT
+
+
input AT (set 2) keyboard scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PASSXT

+
+static final int KEY_CMD_PASSXT
+
+
input XT (set 1) keyboard scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_PASSPS2

+
+static final int KEY_CMD_PASSPS2
+
+
input PS/2 (set 3) keyboard scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_KBD_RELEASE

+
+static final int KEY_FLG_KBD_RELEASE
+
+
it is a release scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_KBD_EMUL0

+
+static final int KEY_FLG_KBD_EMUL0
+
+
it is an emulation 0 scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_FLG_KBD_EMUL1

+
+static final int KEY_FLG_KBD_EMUL1
+
+
it is an emulation 1 scan code +

+

+
See Also:
Constant Field Values
+
+
+ +

+KEY_CMD_CONTEXT

+
+static final int KEY_CMD_CONTEXT
+
+
switch to command context +

+

+
See Also:
Constant Field Values
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/DisplaySize.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/DisplaySize.html new file mode 100644 index 000000000..1b6321411 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/DisplaySize.html @@ -0,0 +1,325 @@ + + + + + + +DisplaySize + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class DisplaySize

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.DisplaySize
+
+
+
+
public class DisplaySize
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+protected  intheight + +
+           
+protected  intwidth + +
+           
+  + + + + + + + + + + +
+Constructor Summary
DisplaySize(int width, + int height) + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+ intgetHeight() + +
+           
+ intgetWidth() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+width

+
+protected final int width
+
+
+
+
+
+ +

+height

+
+protected final int height
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DisplaySize

+
+public DisplaySize(int width,
+                   int height)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getWidth

+
+public int getWidth()
+
+
+
+
+
+
+ +

+getHeight

+
+public int getHeight()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Error.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Error.html new file mode 100644 index 000000000..dd27514b5 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Error.html @@ -0,0 +1,599 @@ + + + + + + +Error + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Error

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Error
+          extended by org.a11y.BrlAPI.Error
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class Error
extends java.lang.Error
+ + +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intCONNREFUSED + +
+           
+static intDEVICEBUSY + +
+           
+static intDRIVERERROR + +
+           
+static intEMPTYKEY + +
+           
+static intEOF + +
+           
+static intGAIERR + +
+           
+static intILLEGAL_INSTRUCTION + +
+           
+static intINVALID_PACKET + +
+           
+static intINVALID_PARAMETER + +
+           
+static intLIBCERR + +
+           
+static intNOMEM + +
+           
+static intOPNOTSUPP + +
+           
+static intPROTOCOL_VERSION + +
+           
+static intSUCCESS + +
+           
+static intTTYBUSY + +
+           
+static intUNKNOWN_INSTRUCTION + +
+           
+static intUNKNOWNTTY + +
+           
+  + + + + + + + + + + +
+Constructor Summary
Error(int brlerrno, + int libcerrno, + int gaierrno, + java.lang.String errfun) + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+SUCCESS

+
+public static final int SUCCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+NOMEM

+
+public static final int NOMEM
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TTYBUSY

+
+public static final int TTYBUSY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEVICEBUSY

+
+public static final int DEVICEBUSY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNKNOWN_INSTRUCTION

+
+public static final int UNKNOWN_INSTRUCTION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ILLEGAL_INSTRUCTION

+
+public static final int ILLEGAL_INSTRUCTION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+INVALID_PARAMETER

+
+public static final int INVALID_PARAMETER
+
+
+
See Also:
Constant Field Values
+
+
+ +

+INVALID_PACKET

+
+public static final int INVALID_PACKET
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CONNREFUSED

+
+public static final int CONNREFUSED
+
+
+
See Also:
Constant Field Values
+
+
+ +

+OPNOTSUPP

+
+public static final int OPNOTSUPP
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GAIERR

+
+public static final int GAIERR
+
+
+
See Also:
Constant Field Values
+
+
+ +

+LIBCERR

+
+public static final int LIBCERR
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNKNOWNTTY

+
+public static final int UNKNOWNTTY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PROTOCOL_VERSION

+
+public static final int PROTOCOL_VERSION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EOF

+
+public static final int EOF
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EMPTYKEY

+
+public static final int EMPTYKEY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DRIVERERROR

+
+public static final int DRIVERERROR
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+Error

+
+public Error(int brlerrno,
+             int libcerrno,
+             int gaierrno,
+             java.lang.String errfun)
+
+
+ + + + + + + + +
+Method Detail
+ +

+toString

+
+public final java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Throwable
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Exception.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Exception.html new file mode 100644 index 000000000..c29f72d45 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Exception.html @@ -0,0 +1,275 @@ + + + + + + +Exception + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Exception

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by org.a11y.BrlAPI.Exception
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class Exception
extends java.lang.Exception
+ + +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
Exception(long handle, + int errno, + int packettype, + byte[] buf) + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Exception

+
+public Exception(long handle,
+                 int errno,
+                 int packettype,
+                 byte[] buf)
+
+
+ + + + + + + + +
+Method Detail
+ +

+toString

+
+public final java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Throwable
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Key.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Key.html new file mode 100644 index 000000000..0a277a8e7 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Key.html @@ -0,0 +1,453 @@ + + + + + + +Key + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Key

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.Key
+
+
+
+
public class Key
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  intargument + +
+           
+protected  longcode + +
+           
+protected  intcommand + +
+           
+protected  intflags + +
+           
+protected  inttype + +
+           
+  + + + + + + + + + + +
+Constructor Summary
Key(long code) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidexpandKeyCode(long code) + +
+           
+ intgetArgument() + +
+           
+ longgetCode() + +
+           
+ intgetCommand() + +
+           
+ intgetFlags() + +
+           
+ intgetType() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+code

+
+protected final long code
+
+
+
+
+
+ +

+type

+
+protected int type
+
+
+
+
+
+ +

+command

+
+protected int command
+
+
+
+
+
+ +

+argument

+
+protected int argument
+
+
+
+
+
+ +

+flags

+
+protected int flags
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Key

+
+public Key(long code)
+
+
+ + + + + + + + +
+Method Detail
+ +

+expandKeyCode

+
+public final void expandKeyCode(long code)
+
+
+
+
+
+
+ +

+getCode

+
+public long getCode()
+
+
+
+
+
+
+ +

+getType

+
+public int getType()
+
+
+
+
+
+
+ +

+getCommand

+
+public int getCommand()
+
+
+
+
+
+
+ +

+getArgument

+
+public int getArgument()
+
+
+
+
+
+
+ +

+getFlags

+
+public int getFlags()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Native.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Native.html new file mode 100644 index 000000000..ea69d59c2 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Native.html @@ -0,0 +1,782 @@ + + + + + + +Native + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Native

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.Native
+
+
+
Direct Known Subclasses:
Brlapi
+
+
+
+
public class Native
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + +
+Field Summary
+protected  longhandle + +
+           
+  + + + + + + + + + + +
+Constructor Summary
Native() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidacceptAllKeys() + +
+           
+ voidacceptKeyRanges(long[][] ranges) + +
+           
+ voidacceptKeys(long type, + long[] keys) + +
+           
+ voidcloseConnection() + +
+           
+ voidenterRawMode(java.lang.String driver) + +
+           
+ intenterTtyMode(int tty, + java.lang.String driver) + +
+           
+ voidenterTtyModeWithPath(int[] ttys, + java.lang.String driver) + +
+           
+ DisplaySizegetDisplaySize() + +
+           
+ java.lang.StringgetDriverName() + +
+           
+static java.lang.StringgetPacketTypeName(long type) + +
+           
+ voidignoreAllKeys() + +
+           
+ voidignoreKeyRanges(long[][] ranges) + +
+           
+ voidignoreKeys(long type, + long[] keys) + +
+           
+ voidleaveRawMode() + +
+           
+ voidleaveTtyMode() + +
+           
+protected  intopenConnection(ConnectionSettings desiredSettings, + ConnectionSettings actualSettings) + +
+           
+ longreadKey(boolean wait) + +
+           
+ intrecvRaw(byte[] buffer) + +
+           
+ intsendRaw(byte[] buffer) + +
+           
+ voidsetFocus(int tty) + +
+           
+ voidwrite(WriteArguments arguments) + +
+           
+ voidwriteDots(byte[] dots) + +
+           
+protected  voidwriteTextNative(int cursor, + java.lang.String text) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+handle

+
+protected long handle
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Native

+
+public Native()
+
+
+ + + + + + + + +
+Method Detail
+ +

+openConnection

+
+protected int openConnection(ConnectionSettings desiredSettings,
+                             ConnectionSettings actualSettings)
+                      throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+closeConnection

+
+public void closeConnection()
+
+
+
+
+
+
+ +

+getDriverName

+
+public java.lang.String getDriverName()
+                               throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+getDisplaySize

+
+public DisplaySize getDisplaySize()
+                           throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterTtyMode

+
+public int enterTtyMode(int tty,
+                        java.lang.String driver)
+                 throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterTtyModeWithPath

+
+public void enterTtyModeWithPath(int[] ttys,
+                                 java.lang.String driver)
+                          throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+leaveTtyMode

+
+public void leaveTtyMode()
+                  throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+setFocus

+
+public void setFocus(int tty)
+              throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeTextNative

+
+protected void writeTextNative(int cursor,
+                               java.lang.String text)
+                        throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+writeDots

+
+public void writeDots(byte[] dots)
+               throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+write

+
+public void write(WriteArguments arguments)
+           throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+readKey

+
+public long readKey(boolean wait)
+             throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+ignoreKeys

+
+public void ignoreKeys(long type,
+                       long[] keys)
+                throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+acceptKeys

+
+public void acceptKeys(long type,
+                       long[] keys)
+                throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+ignoreAllKeys

+
+public void ignoreAllKeys()
+                   throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+acceptAllKeys

+
+public void acceptAllKeys()
+                   throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+ignoreKeyRanges

+
+public void ignoreKeyRanges(long[][] ranges)
+                     throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+acceptKeyRanges

+
+public void acceptKeyRanges(long[][] ranges)
+                     throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+enterRawMode

+
+public void enterRawMode(java.lang.String driver)
+                  throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+leaveRawMode

+
+public void leaveRawMode()
+                  throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+sendRaw

+
+public int sendRaw(byte[] buffer)
+            throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+recvRaw

+
+public int recvRaw(byte[] buffer)
+            throws Error
+
+
+ +
Throws: +
Error
+
+
+
+ +

+getPacketTypeName

+
+public static java.lang.String getPacketTypeName(long type)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Test.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Test.html new file mode 100644 index 000000000..3604356af --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/Test.html @@ -0,0 +1,250 @@ + + + + + + +Test + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class Test

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.Test
+
+
+
+
public class Test
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
Test() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+static voidmain(java.lang.String[] argv) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Test

+
+public Test()
+
+
+ + + + + + + + +
+Method Detail
+ +

+main

+
+public static void main(java.lang.String[] argv)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/WriteArguments.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/WriteArguments.html new file mode 100644 index 000000000..2f0de8d64 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/WriteArguments.html @@ -0,0 +1,366 @@ + + + + + + +WriteArguments + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.a11y.BrlAPI +
+Class WriteArguments

+
+java.lang.Object
+  extended by org.a11y.BrlAPI.WriteArguments
+
+
+
+
public class WriteArguments
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+ byte[]andMask + +
+           
+ intcursor + +
+           
+ intdisplayNumber + +
+           
+ byte[]orMask + +
+           
+ intregionBegin + +
+           
+ intregionSize + +
+           
+ java.lang.Stringtext + +
+           
+  + + + + + + + + + + +
+Constructor Summary
WriteArguments() + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+displayNumber

+
+public int displayNumber
+
+
+
+
+
+ +

+regionBegin

+
+public int regionBegin
+
+
+
+
+
+ +

+regionSize

+
+public int regionSize
+
+
+
+
+
+ +

+text

+
+public java.lang.String text
+
+
+
+
+
+ +

+andMask

+
+public byte[] andMask
+
+
+
+
+
+ +

+orMask

+
+public byte[] orMask
+
+
+
+
+
+ +

+cursor

+
+public int cursor
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+WriteArguments

+
+public WriteArguments()
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Brlapi.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Brlapi.html new file mode 100644 index 000000000..0df8bb09f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Brlapi.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Brlapi + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Brlapi

+
+No usage of org.a11y.BrlAPI.Brlapi +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/ConnectionSettings.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/ConnectionSettings.html new file mode 100644 index 000000000..1a7f059c7 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/ConnectionSettings.html @@ -0,0 +1,196 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.ConnectionSettings + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.ConnectionSettings

+
+ + + + + +
+Uses of ConnectionSettings in org.a11y.BrlAPI
+  +

+ + + + + + + + + +
Fields in org.a11y.BrlAPI declared as ConnectionSettings
+protected  ConnectionSettingsBrlapi.settings + +
+           
+  +

+ + + + + + + + + +
Methods in org.a11y.BrlAPI with parameters of type ConnectionSettings
+protected  intNative.openConnection(ConnectionSettings desiredSettings, + ConnectionSettings actualSettings) + +
+           
+  +

+ + + + + + + + +
Constructors in org.a11y.BrlAPI with parameters of type ConnectionSettings
Brlapi(ConnectionSettings settings) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Constants.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Constants.html new file mode 100644 index 000000000..3617b0164 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Constants.html @@ -0,0 +1,165 @@ + + + + + + +Uses of Interface org.a11y.BrlAPI.Constants + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
org.a11y.BrlAPI.Constants

+
+ + + + + +
+Uses of Constants in org.a11y.BrlAPI
+  +

+ + + + + + + + + +
Classes in org.a11y.BrlAPI that implement Constants
+ classBrlapi + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/DisplaySize.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/DisplaySize.html new file mode 100644 index 000000000..b780e397d --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/DisplaySize.html @@ -0,0 +1,165 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.DisplaySize + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.DisplaySize

+
+ + + + + +
+Uses of DisplaySize in org.a11y.BrlAPI
+  +

+ + + + + + + + + +
Methods in org.a11y.BrlAPI that return DisplaySize
+ DisplaySizeNative.getDisplaySize() + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Error.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Error.html new file mode 100644 index 000000000..172cb9ad6 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Error.html @@ -0,0 +1,411 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Error + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Error

+
+ + + + + +
+Uses of Error in org.a11y.BrlAPI
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Methods in org.a11y.BrlAPI that throw Error
+ voidNative.acceptAllKeys() + +
+           
+ voidNative.acceptKeyRanges(long[][] ranges) + +
+           
+ voidNative.acceptKeys(long type, + long[] keys) + +
+           
+ voidNative.enterRawMode(java.lang.String driver) + +
+           
+ intBrlapi.enterTtyMode() + +
+           
+ intBrlapi.enterTtyMode(int tty) + +
+           
+ intNative.enterTtyMode(int tty, + java.lang.String driver) + +
+           
+ intBrlapi.enterTtyMode(java.lang.String driver) + +
+           
+ voidBrlapi.enterTtyModeWithPath(int[] ttys) + +
+           
+ voidNative.enterTtyModeWithPath(int[] ttys, + java.lang.String driver) + +
+           
+ DisplaySizeNative.getDisplaySize() + +
+           
+ java.lang.StringNative.getDriverName() + +
+           
+ voidNative.ignoreAllKeys() + +
+           
+ voidNative.ignoreKeyRanges(long[][] ranges) + +
+           
+ voidNative.ignoreKeys(long type, + long[] keys) + +
+           
+ voidNative.leaveRawMode() + +
+           
+ voidNative.leaveTtyMode() + +
+           
+protected  intNative.openConnection(ConnectionSettings desiredSettings, + ConnectionSettings actualSettings) + +
+           
+ longNative.readKey(boolean wait) + +
+           
+ intNative.recvRaw(byte[] buffer) + +
+           
+ intNative.sendRaw(byte[] buffer) + +
+           
+ voidNative.setFocus(int tty) + +
+           
+ voidNative.write(WriteArguments arguments) + +
+           
+ voidNative.writeDots(byte[] dots) + +
+           
+ voidBrlapi.writeText(int cursor) + +
+           
+ voidBrlapi.writeText(int cursor, + java.lang.String text) + +
+           
+ voidBrlapi.writeText(java.lang.String text) + +
+           
+ voidBrlapi.writeText(java.lang.String text, + int cursor) + +
+           
+protected  voidNative.writeTextNative(int cursor, + java.lang.String text) + +
+           
+  +

+ + + + + + + + +
Constructors in org.a11y.BrlAPI that throw Error
Brlapi(ConnectionSettings settings) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Exception.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Exception.html new file mode 100644 index 000000000..0f70116c3 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Exception.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Exception + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Exception

+
+No usage of org.a11y.BrlAPI.Exception +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Key.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Key.html new file mode 100644 index 000000000..cbaaee3b7 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Key.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Key + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Key

+
+No usage of org.a11y.BrlAPI.Key +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Native.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Native.html new file mode 100644 index 000000000..ab99f046d --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Native.html @@ -0,0 +1,165 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Native + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Native

+
+ + + + + +
+Uses of Native in org.a11y.BrlAPI
+  +

+ + + + + + + + + +
Subclasses of Native in org.a11y.BrlAPI
+ classBrlapi + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Test.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Test.html new file mode 100644 index 000000000..1f4e5e3f4 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/Test.html @@ -0,0 +1,142 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.Test + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.Test

+
+No usage of org.a11y.BrlAPI.Test +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/WriteArguments.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/WriteArguments.html new file mode 100644 index 000000000..ea64fc7bf --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/class-use/WriteArguments.html @@ -0,0 +1,165 @@ + + + + + + +Uses of Class org.a11y.BrlAPI.WriteArguments + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.a11y.BrlAPI.WriteArguments

+
+ + + + + +
+Uses of WriteArguments in org.a11y.BrlAPI
+  +

+ + + + + + + + + +
Methods in org.a11y.BrlAPI with parameters of type WriteArguments
+ voidNative.write(WriteArguments arguments) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-frame.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-frame.html new file mode 100644 index 000000000..915f2031a --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-frame.html @@ -0,0 +1,77 @@ + + + + + + +org.a11y.BrlAPI + + + + + + + + + + + +org.a11y.BrlAPI + + + + +
+Interfaces  + +
+Constants
+ + + + + + +
+Classes  + +
+Brlapi +
+ConnectionSettings +
+DisplaySize +
+Key +
+Native +
+Test +
+WriteArguments
+ + + + + + +
+Exceptions  + +
+Exception
+ + + + + + +
+Errors  + +
+Error
+ + + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-summary.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-summary.html new file mode 100644 index 000000000..50dfd7fd0 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-summary.html @@ -0,0 +1,221 @@ + + + + + + +org.a11y.BrlAPI + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.a11y.BrlAPI +

+ + + + + + + + + +
+Interface Summary
Constants 
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
Brlapi 
ConnectionSettings 
DisplaySize 
Key 
Native 
Test 
WriteArguments 
+  + +

+ + + + + + + + + +
+Exception Summary
Exception 
+  + +

+ + + + + + + + + +
+Error Summary
Error 
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-tree.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-tree.html new file mode 100644 index 000000000..24d4f2aee --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-tree.html @@ -0,0 +1,163 @@ + + + + + + +org.a11y.BrlAPI Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package org.a11y.BrlAPI +

+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-use.html b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-use.html new file mode 100644 index 000000000..d9cdb7976 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/org/a11y/BrlAPI/package-use.html @@ -0,0 +1,185 @@ + + + + + + +Uses of Package org.a11y.BrlAPI + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
org.a11y.BrlAPI

+
+ + + + + + + + + + + + + + + + + + + + + + + +
+Classes in org.a11y.BrlAPI used by org.a11y.BrlAPI
ConnectionSettings + +
+           
Constants + +
+           
DisplaySize + +
+           
Error + +
+           
Native + +
+           
WriteArguments + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/overview-tree.html b/grub-core/braille/brltty/Bindings/Java/doc/overview-tree.html new file mode 100644 index 000000000..a802c8088 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/overview-tree.html @@ -0,0 +1,165 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
org.a11y.BrlAPI
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/package-list b/grub-core/braille/brltty/Bindings/Java/doc/package-list new file mode 100644 index 000000000..04f03617c --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/package-list @@ -0,0 +1 @@ +org.a11y.BrlAPI diff --git a/grub-core/braille/brltty/Bindings/Java/doc/serialized-form.html b/grub-core/braille/brltty/Bindings/Java/doc/serialized-form.html new file mode 100644 index 000000000..d20394690 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/serialized-form.html @@ -0,0 +1,264 @@ + + + + + + +Serialized Form + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Serialized Form

+
+
+ + + + + +
+Package org.a11y.BrlAPI
+ +

+ + + + + +
+Class org.a11y.BrlAPI.Error extends java.lang.Error implements Serializable
+ +

+serialVersionUID: 0L + +

+ + + + + +
+Serialized Fields
+ +

+brlerrno

+
+int brlerrno
+
+
+
+
+
+

+libcerrno

+
+int libcerrno
+
+
+
+
+
+

+gaierrno

+
+int gaierrno
+
+
+
+
+
+

+errfun

+
+java.lang.String errfun
+
+
+
+
+ +

+ + + + + +
+Class org.a11y.BrlAPI.Exception extends java.lang.Exception implements Serializable
+ +

+serialVersionUID: 0L + +

+ + + + + +
+Serialized Fields
+ +

+handle

+
+long handle
+
+
+
+
+
+

+errno

+
+int errno
+
+
+
+
+
+

+packettype

+
+long packettype
+
+
+
+
+
+

+buf

+
+byte[] buf
+
+
+
+
+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/grub-core/braille/brltty/Bindings/Java/doc/stylesheet.css b/grub-core/braille/brltty/Bindings/Java/doc/stylesheet.css new file mode 100644 index 000000000..6ea9e5161 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/doc/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/grub-core/braille/brltty/Bindings/Java/reldeps.mk b/grub-core/braille/brltty/Bindings/Java/reldeps.mk new file mode 100644 index 000000000..9f7d2dfa0 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Java/reldeps.mk @@ -0,0 +1,6 @@ +# Dependencies for bindings.$O: +bindings.$O: $(SRC_DIR)/bindings.c +bindings.$O: $(BLD_TOP)Programs/brlapi.h +bindings.$O: $(BLD_TOP)Programs/brlapi_constants.h +bindings.$O: $(SRC_TOP)Programs/brlapi_keycodes.h + diff --git a/grub-core/braille/brltty/Bindings/Lisp/bindings.m4 b/grub-core/braille/brltty/Bindings/Lisp/bindings.m4 new file mode 100644 index 000000000..8fcf905c3 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Lisp/bindings.m4 @@ -0,0 +1,21 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by Dave Mielke +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +AC_DEFUN([BRLTTY_LISP_BINDINGS], [dnl +LISP_OK=true +AC_SUBST([LISP_OK]) +]) diff --git a/grub-core/braille/brltty/Bindings/Lisp/brlapi.asd b/grub-core/braille/brltty/Bindings/Lisp/brlapi.asd new file mode 100644 index 000000000..df72693a1 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Lisp/brlapi.asd @@ -0,0 +1,27 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; libbrlapi - A library providing access to braille terminals for applications. +; +; Copyright (C) 2006-2012 by Mario Lang +; +; libbrlapi comes with ABSOLUTELY NO WARRANTY. +; +; This is free software, placed under the terms of the +; GNU Lesser General Public License, as published by the Free Software +; Foundation; either version 2.1 of the License, or (at your option) any +; later version. Please see the file LICENSE-LGPL for details. +; +; Web Page: http://mielke.cc/brltty/ +; +; This software is maintained by Dave Mielke . +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;; * BrlAPI System Definition + +(asdf:defsystem :brlapi + :name "brlapi" + :author "Mario Lang " + :depends-on (:cffi) + :serial t + :components ((:file "brlapi"))) + +;;;;@include "brlapi.lisp" diff --git a/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp b/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp new file mode 100644 index 000000000..dec7e8590 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp @@ -0,0 +1,246 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; libbrlapi - A library providing access to braille terminals for applications. +; +; Copyright (C) 2006-2012 by Mario Lang +; +; libbrlapi comes with ABSOLUTELY NO WARRANTY. +; +; This is free software, placed under the terms of the +; GNU Lesser General Public License, as published by the Free Software +; Foundation; either version 2.1 of the License, or (at your option) any +; later version. Please see the file LICENSE-LGPL for details. +; +; Web Page: http://mielke.cc/brltty/ +; +; This software is maintained by Dave Mielke . +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(eval-when (:compile-toplevel) + (declaim (optimize (safety 3) (debug 3)))) + +;;;; * Package definition + +(defpackage :brlapi + (:use :common-lisp :cffi) + (:export #:open-connection #:close-connection + #:driver-name #:display-size + #:enter-tty-mode #:leave-tty-mode + #:write-text #:write-dots #:write-region + #:read-key #:expand-key)) +(in-package :brlapi) + + +;;;; * C BrlAPI Library loading + +(define-foreign-library libbrlapi + (:unix (:or "libbrlapi.so.0.5.5" "libbrlapi.so.0.5")) + (t (:default "libbrlapi"))) +(use-foreign-library libbrlapi) + +;;;; * The DISPLAY class + +(defclass display () + ((handle :initarg :handle :reader display-handle) + (fd :initarg :fd :reader display-file-descriptor) + (auth :initarg :auth :reader display-auth) + (host :initarg :host :reader display-host) + (tty :initform nil :reader display-tty))) + +(defmethod print-object ((obj display) stream) + (print-unreadable-object (obj stream :type t) + (if (not (display-file-descriptor obj)) + (format stream "disconnected") + (apply #'format stream "~Dx~D fd=~D, host=~A, driver=~A" + (concatenate 'list (multiple-value-list (display-size obj)) + (list (display-file-descriptor obj) (display-host obj) + (driver-name obj))))))) + + +;;;; * Error handling + +(defctype brlapi-code :int) +(define-condition brlapi-error (error) + ((text :initarg :text :reader brlapi-error-text)) + (:report (lambda (c stream) + (format stream "libbrlapi function returned ~A" + (brlapi-error-text c)))) + (:documentation "Signalled when a libbrlapi function answers with -1.")) + +(defmethod translate-from-foreign (value (name (eql 'brlapi-code))) + "Raise a BRLAPI-ERROR if VALUE, a brlapi-code, is -1." + (declare (integer value)) + (if (eql value -1) + (error 'brlapi-error + :text (foreign-funcall "brlapi_strerror" + :pointer + (foreign-funcall "brlapi_error_location" + :pointer) + :string)) + value)) + + +;;;; * Connection management + +(defcstruct settings + "Connection setting structure." + (auth :string) + (host :string)) + +(defun open-connection (&optional auth host) + "Open a new connection to BRLTTY on HOST usng AUTH for authorization. +Return a DISPLAY object which can further be used to interact with BRLTTY." + (with-foreign-object (settings 'settings) + (setf (foreign-slot-value settings 'settings 'auth) + (if (stringp auth) auth (null-pointer)) + (foreign-slot-value settings 'settings 'host) + (if (stringp host) host (null-pointer))) + (let* ((handle (foreign-alloc :char :count (foreign-funcall "brlapi_getHandleSize" :int))) + (fd (foreign-funcall "brlapi__openConnection" + :pointer handle + :pointer settings + :pointer settings + brlapi-code)) + (display (make-instance 'display :handle handle :fd fd + :auth (foreign-slot-value settings 'settings 'auth) + :host (foreign-slot-value settings 'settings 'host)))) + #+sbcl (sb-ext:finalize display (lambda () + (foreign-funcall "brlapi__closeConnection" :pointer handle :void) + (foreign-free handle))) + display))) + +(defmethod close-connection ((obj display)) + (foreign-funcall "brlapi__closeConnection" :pointer (display-handle obj) :void) + (setf (slot-value obj 'fd) nil) + (foreign-free (display-handle obj)) + (setf (slot-value obj 'handle) nil)) + +;;;; * Querying the display + +(defmethod driver-name ((obj display)) + "Return the currently used driver name." + (with-foreign-pointer-as-string ((str str-size) 64) + (foreign-funcall "brlapi__getDriverName" :pointer (display-handle obj) + :string str :int str-size brlapi-code))) + +(defmethod display-size ((obj display)) + "Return the dimensions of DISPLAY as multiple values. +The first value represents the x dimension and the second the y dimension." + (with-foreign-objects ((x :int) (y :int)) + (foreign-funcall "brlapi__getDisplaySize" :pointer (display-handle obj) :pointer x :pointer y brlapi-code) + (values (mem-ref x :int) (mem-ref y :int)))) + + +;;;; * TTY mode + +(defmethod enter-tty-mode ((obj display) tty &optional (driver "")) + (declare (integer tty)) + (declare (string driver)) + (setf (slot-value obj 'tty) (foreign-funcall "brlapi__enterTtyMode" :pointer (display-handle obj) :int tty :string driver brlapi-code))) + +(defmethod leave-tty-mode ((obj display)) + (foreign-funcall "brlapi__leaveTtyMode" :pointer (display-handle obj) brlapi-code) + (setf (slot-value obj 'tty) nil)) + + +;;;; * Output + +(defmethod write-text ((obj display) text &key (cursor -1)) + "Write TEXT (a string) to the braille display." + (declare (string text)) + (declare (integer cursor)) + (if (eql (foreign-funcall "brlapi__writeText" + :pointer (display-handle obj) + :int cursor :string text + brlapi-code) + 0) + text)) + +(defbitfield (dots :uint8) + (:dot1 #x01) :dot2 :dot3 :dot4 :dot5 :dot6 :dot7 :dot8) +(defmethod write-dots ((obj display) &rest dots-list) + "Write the given dots list to the display." + (with-foreign-object (dots 'dots (display-size obj)) + (loop for i below (min (display-size obj) (length dots-list)) + do (setf (mem-aref dots 'dots i) + (foreign-bitfield-value 'dots (nth i dots-list)))) + (loop for i from (length dots-list) below (display-size obj) + do (setf (mem-aref dots 'dots i) 0)) + (foreign-funcall "brlapi__writeDots" :pointer (display-handle obj) :pointer dots brlapi-code))) + +(defcstruct write-struct + (display-number :int) + (region-begin :int) + (region-size :int) + (text :pointer) + (attr-and :pointer) + (attr-or :pointer) + (cursor :int) + (charset :string)) + +(defmethod write-region ((obj display) text &key (begin 1) size (cursor -1) (display-number -1) + (charset "") attr-and attr-or) + "Update a specific region of the braille display and apply and/or masks." + (let ((size (or size (min (display-size obj) + (max (length text) + (length attr-and) + (length attr-or)))))) + (with-foreign-objects ((ws 'write-struct) + (txt :string (1+ size)) + (attra 'dots size) + (attro 'dots size)) + (loop for i below size + do (setf (mem-aref txt :uint8 i) (char-code #\SPACE))) + (setf (mem-aref txt :uint8 size) 0) + (loop for i below (min size (length text)) + do (setf (mem-aref txt :uint8 i) (char-code (aref text i)))) + (loop for i below size + do (setf (mem-aref attra :uint8 i) #XFF (mem-aref attro :uint8 i) 0)) + (loop for i below (min size (length attr-and)) + do (setf (mem-aref attra :uint8 i) (foreign-bitfield-value 'dots (nth i attr-and)))) + (loop for i below (min size (length attr-or)) + do (setf (mem-aref attro :uint8 i) (foreign-bitfield-value 'dots (nth i attr-or)))) + (setf (foreign-slot-value ws 'write-struct 'display-number) display-number + (foreign-slot-value ws 'write-struct 'cursor) cursor + (foreign-slot-value ws 'write-struct 'region-begin) begin + (foreign-slot-value ws 'write-struct 'region-size) size + (foreign-slot-value ws 'write-struct 'charset) charset + (foreign-slot-value ws 'write-struct 'text) txt + (foreign-slot-value ws 'write-struct 'attr-or) attro + (foreign-slot-value ws 'write-struct 'attr-and) attra) + (eql (foreign-funcall "brlapi__write" :pointer (display-handle obj) :pointer ws brlapi-code) 0)))) + + +;;;; * Input + +(defctype key-code :uint64) +(defmethod read-key ((obj display) &optional block) + (with-foreign-object (key 'key-code) + (case (foreign-funcall "brlapi__readKey" :pointer (display-handle obj) :boolean block :pointer key brlapi-code) + (0 nil) + (1 (mem-ref key 'key-code))))) + +(defun expand-key (code) + (with-foreign-objects ((command :int) (arg :int) (flags :int)) + (foreign-funcall "brlapi_expandKeyCode" + key-code code + :pointer command :pointer arg :pointer flags + :int) + (values (intern (foreign-funcall "brlapi_getKeyName" + :int (mem-ref command :int) + :int (mem-ref arg :int) + :string)) + (mem-ref arg :int) + (mem-ref flags :int)))) + +;;;; * Example usage + +(defun example (&optional (tty -1)) + "A basic example." + (let ((display (open-connection))) + (enter-tty-mode display tty) + (write-text display "Press any key to continue...") + (apply #'format t "; Command: ~A, argument: ~D, flags: ~D" + (multiple-value-list (expand-key (read-key display t)))) + (leave-tty-mode display) + (close-connection display))) + diff --git a/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp.in b/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp.in new file mode 100644 index 000000000..1ece2fc13 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Lisp/brlapi.lisp.in @@ -0,0 +1,246 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; libbrlapi - A library providing access to braille terminals for applications. +; +; Copyright (C) 2006-2012 by Mario Lang +; +; libbrlapi comes with ABSOLUTELY NO WARRANTY. +; +; This is free software, placed under the terms of the +; GNU Lesser General Public License, as published by the Free Software +; Foundation; either version 2.1 of the License, or (at your option) any +; later version. Please see the file LICENSE-LGPL for details. +; +; Web Page: http://mielke.cc/brltty/ +; +; This software is maintained by Dave Mielke . +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(eval-when (:compile-toplevel) + (declaim (optimize (safety 3) (debug 3)))) + +;;;; * Package definition + +(defpackage :brlapi + (:use :common-lisp :cffi) + (:export #:open-connection #:close-connection + #:driver-name #:display-size + #:enter-tty-mode #:leave-tty-mode + #:write-text #:write-dots #:write-region + #:read-key #:expand-key)) +(in-package :brlapi) + + +;;;; * C BrlAPI Library loading + +(define-foreign-library libbrlapi + (:unix (:or "libbrlapi.@library_extension@.@api_release@" "libbrlapi.@library_extension@.@api_version@")) + (t (:default "libbrlapi"))) +(use-foreign-library libbrlapi) + +;;;; * The DISPLAY class + +(defclass display () + ((handle :initarg :handle :reader display-handle) + (fd :initarg :fd :reader display-file-descriptor) + (auth :initarg :auth :reader display-auth) + (host :initarg :host :reader display-host) + (tty :initform nil :reader display-tty))) + +(defmethod print-object ((obj display) stream) + (print-unreadable-object (obj stream :type t) + (if (not (display-file-descriptor obj)) + (format stream "disconnected") + (apply #'format stream "~Dx~D fd=~D, host=~A, driver=~A" + (concatenate 'list (multiple-value-list (display-size obj)) + (list (display-file-descriptor obj) (display-host obj) + (driver-name obj))))))) + + +;;;; * Error handling + +(defctype brlapi-code :int) +(define-condition brlapi-error (error) + ((text :initarg :text :reader brlapi-error-text)) + (:report (lambda (c stream) + (format stream "libbrlapi function returned ~A" + (brlapi-error-text c)))) + (:documentation "Signalled when a libbrlapi function answers with -1.")) + +(defmethod translate-from-foreign (value (name (eql 'brlapi-code))) + "Raise a BRLAPI-ERROR if VALUE, a brlapi-code, is -1." + (declare (integer value)) + (if (eql value -1) + (error 'brlapi-error + :text (foreign-funcall "brlapi_strerror" + :pointer + (foreign-funcall "brlapi_error_location" + :pointer) + :string)) + value)) + + +;;;; * Connection management + +(defcstruct settings + "Connection setting structure." + (auth :string) + (host :string)) + +(defun open-connection (&optional auth host) + "Open a new connection to BRLTTY on HOST usng AUTH for authorization. +Return a DISPLAY object which can further be used to interact with BRLTTY." + (with-foreign-object (settings 'settings) + (setf (foreign-slot-value settings 'settings 'auth) + (if (stringp auth) auth (null-pointer)) + (foreign-slot-value settings 'settings 'host) + (if (stringp host) host (null-pointer))) + (let* ((handle (foreign-alloc :char :count (foreign-funcall "brlapi_getHandleSize" :int))) + (fd (foreign-funcall "brlapi__openConnection" + :pointer handle + :pointer settings + :pointer settings + brlapi-code)) + (display (make-instance 'display :handle handle :fd fd + :auth (foreign-slot-value settings 'settings 'auth) + :host (foreign-slot-value settings 'settings 'host)))) + #+sbcl (sb-ext:finalize display (lambda () + (foreign-funcall "brlapi__closeConnection" :pointer handle :void) + (foreign-free handle))) + display))) + +(defmethod close-connection ((obj display)) + (foreign-funcall "brlapi__closeConnection" :pointer (display-handle obj) :void) + (setf (slot-value obj 'fd) nil) + (foreign-free (display-handle obj)) + (setf (slot-value obj 'handle) nil)) + +;;;; * Querying the display + +(defmethod driver-name ((obj display)) + "Return the currently used driver name." + (with-foreign-pointer-as-string ((str str-size) 64) + (foreign-funcall "brlapi__getDriverName" :pointer (display-handle obj) + :string str :int str-size brlapi-code))) + +(defmethod display-size ((obj display)) + "Return the dimensions of DISPLAY as multiple values. +The first value represents the x dimension and the second the y dimension." + (with-foreign-objects ((x :int) (y :int)) + (foreign-funcall "brlapi__getDisplaySize" :pointer (display-handle obj) :pointer x :pointer y brlapi-code) + (values (mem-ref x :int) (mem-ref y :int)))) + + +;;;; * TTY mode + +(defmethod enter-tty-mode ((obj display) tty &optional (driver "")) + (declare (integer tty)) + (declare (string driver)) + (setf (slot-value obj 'tty) (foreign-funcall "brlapi__enterTtyMode" :pointer (display-handle obj) :int tty :string driver brlapi-code))) + +(defmethod leave-tty-mode ((obj display)) + (foreign-funcall "brlapi__leaveTtyMode" :pointer (display-handle obj) brlapi-code) + (setf (slot-value obj 'tty) nil)) + + +;;;; * Output + +(defmethod write-text ((obj display) text &key (cursor -1)) + "Write TEXT (a string) to the braille display." + (declare (string text)) + (declare (integer cursor)) + (if (eql (foreign-funcall "brlapi__writeText" + :pointer (display-handle obj) + :int cursor :string text + brlapi-code) + 0) + text)) + +(defbitfield (dots :uint8) + (:dot1 #x01) :dot2 :dot3 :dot4 :dot5 :dot6 :dot7 :dot8) +(defmethod write-dots ((obj display) &rest dots-list) + "Write the given dots list to the display." + (with-foreign-object (dots 'dots (display-size obj)) + (loop for i below (min (display-size obj) (length dots-list)) + do (setf (mem-aref dots 'dots i) + (foreign-bitfield-value 'dots (nth i dots-list)))) + (loop for i from (length dots-list) below (display-size obj) + do (setf (mem-aref dots 'dots i) 0)) + (foreign-funcall "brlapi__writeDots" :pointer (display-handle obj) :pointer dots brlapi-code))) + +(defcstruct write-struct + (display-number :int) + (region-begin :int) + (region-size :int) + (text :pointer) + (attr-and :pointer) + (attr-or :pointer) + (cursor :int) + (charset :string)) + +(defmethod write-region ((obj display) text &key (begin 1) size (cursor -1) (display-number -1) + (charset "") attr-and attr-or) + "Update a specific region of the braille display and apply and/or masks." + (let ((size (or size (min (display-size obj) + (max (length text) + (length attr-and) + (length attr-or)))))) + (with-foreign-objects ((ws 'write-struct) + (txt :string (1+ size)) + (attra 'dots size) + (attro 'dots size)) + (loop for i below size + do (setf (mem-aref txt :uint8 i) (char-code #\SPACE))) + (setf (mem-aref txt :uint8 size) 0) + (loop for i below (min size (length text)) + do (setf (mem-aref txt :uint8 i) (char-code (aref text i)))) + (loop for i below size + do (setf (mem-aref attra :uint8 i) #XFF (mem-aref attro :uint8 i) 0)) + (loop for i below (min size (length attr-and)) + do (setf (mem-aref attra :uint8 i) (foreign-bitfield-value 'dots (nth i attr-and)))) + (loop for i below (min size (length attr-or)) + do (setf (mem-aref attro :uint8 i) (foreign-bitfield-value 'dots (nth i attr-or)))) + (setf (foreign-slot-value ws 'write-struct 'display-number) display-number + (foreign-slot-value ws 'write-struct 'cursor) cursor + (foreign-slot-value ws 'write-struct 'region-begin) begin + (foreign-slot-value ws 'write-struct 'region-size) size + (foreign-slot-value ws 'write-struct 'charset) charset + (foreign-slot-value ws 'write-struct 'text) txt + (foreign-slot-value ws 'write-struct 'attr-or) attro + (foreign-slot-value ws 'write-struct 'attr-and) attra) + (eql (foreign-funcall "brlapi__write" :pointer (display-handle obj) :pointer ws brlapi-code) 0)))) + + +;;;; * Input + +(defctype key-code :uint64) +(defmethod read-key ((obj display) &optional block) + (with-foreign-object (key 'key-code) + (case (foreign-funcall "brlapi__readKey" :pointer (display-handle obj) :boolean block :pointer key brlapi-code) + (0 nil) + (1 (mem-ref key 'key-code))))) + +(defun expand-key (code) + (with-foreign-objects ((command :int) (arg :int) (flags :int)) + (foreign-funcall "brlapi_expandKeyCode" + key-code code + :pointer command :pointer arg :pointer flags + :int) + (values (intern (foreign-funcall "brlapi_getKeyName" + :int (mem-ref command :int) + :int (mem-ref arg :int) + :string)) + (mem-ref arg :int) + (mem-ref flags :int)))) + +;;;; * Example usage + +(defun example (&optional (tty -1)) + "A basic example." + (let ((display (open-connection))) + (enter-tty-mode display tty) + (write-text display "Press any key to continue...") + (apply #'format t "; Command: ~A, argument: ~D, flags: ~D" + (multiple-value-list (expand-key (read-key display t)))) + (leave-tty-mode display) + (close-connection display))) + diff --git a/grub-core/braille/brltty/Bindings/OCaml/META b/grub-core/braille/brltty/Bindings/OCaml/META new file mode 100644 index 000000000..c4c3ac0b3 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/OCaml/META @@ -0,0 +1,5 @@ +requires = "unix" +description = "Bindings for the libbrlapi braille enabling library" +archive(byte) = "brlapi.cma" +archive(native) = "brlapi.cmxa" +version = "0.1" diff --git a/grub-core/braille/brltty/Bindings/OCaml/bindings.m4 b/grub-core/braille/brltty/Bindings/OCaml/bindings.m4 new file mode 100644 index 000000000..e46071264 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/OCaml/bindings.m4 @@ -0,0 +1,156 @@ +# autoconf input for Objective Caml programs +# Copyright (C) 2001 Jean-Christophe Filliâtre +# from a first script by Georges Mariano +# +# Modified to be an autoconf m4 function in 2006 +# for BRLTTY [http://mielke.cc/brltty/] +# by Dave Mielke +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License version 2, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# See the GNU Library General Public License version 2 for more details +# (enclosed in the file LGPL). + +# the script generated by autoconf from this input will set the following +# variables: +# OCAMLC "ocamlc" if present in the path, or a failure +# or "ocamlc.opt" if present with same version number as ocamlc +# OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no" +# OCAMLMKLIB "ocamlkmlib", or "no" +# OCAMLBEST either "byte" if no native compiler was found, +# or "opt" otherwise +# OCAMLDEP "ocamldep" +# OCAMLLEX "ocamllex" (or "ocamllex.opt" if present) +# OCAMLYACC "ocamlyac" +# OCAMLLIB the path to the ocaml standard library +# OCAMLVERSION the ocaml version number +# OCAMLWEB "ocamlweb" (not mandatory) +# OCAMLWIN32 "yes"/"no" depending on Sys.os_type = "Win32" + +AC_DEFUN([BRLTTY_OCAML_BINDINGS], [dnl +# Check for Ocaml compilers + +# we first look for ocamlc in the path; if not present, we fail +AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no) +if test "$OCAMLC" = no ; then + AC_MSG_WARN([Cannot find ocamlc.]) + OCAML_OK=false +else + # checking for ocamlmklib + AC_CHECK_PROG(OCAMLMKLIB,ocamlmklib,ocamlmklib,no) + if test "$OCAMLMKLIB" = no ; then + AC_MSG_WARN([Cannot find ocamlmklib.]) + OCAML_OK=false + else + OCAML_OK=true + # we extract Ocaml version number and library path + OCAMLVERSION=`$OCAMLC -version` + AC_MSG_NOTICE([OCaml version is $OCAMLVERSION]) + + OCAMLLIB=`$OCAMLC -where` + AC_MSG_NOTICE([OCaml library path is $OCAMLLIB]) + + # then we look for ocamlopt; if not present, we issue a warning + # if the version is not the same, we also discard it + # we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not + AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no) + OCAMLBEST=byte + OCAML_NCLIB= + if test "$OCAMLOPT" = no ; then + AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.]) + else + AC_MSG_CHECKING(ocamlopt version) + TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` + if test "$TMPVERSION" != "$OCAMLVERSION" ; then + AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.) + OCAMLOPT=no + else + AC_MSG_RESULT(ok) + OCAMLBEST=opt + OCAML_NCLIB="\$(OCAML_LIB).cmxa" + fi + fi + + # checking for ocamlc.opt + AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no) + if test "$OCAMLCDOTOPT" != no ; then + AC_MSG_CHECKING(ocamlc.opt version) + TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` + if test "$TMPVERSION" != "$OCAMLVERSION" ; then + AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.) + else + AC_MSG_RESULT(ok) + OCAMLC=$OCAMLCDOTOPT + fi + fi + + # checking for ocamlopt.opt + if test "$OCAMLOPT" != no ; then + AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt,no) + if test "$OCAMLOPTDOTOPT" != no ; then + AC_MSG_CHECKING(ocamlc.opt version) + TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` + if test "$TMPVER" != "$OCAMLVERSION" ; then + AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.) + else + AC_MSG_RESULT(ok) + OCAMLOPT=$OCAMLOPTDOTOPT + fi + fi + fi + + # platform + AC_MSG_CHECKING(platform) + if echo "let _ = Sys.os_type;;" | ocaml | grep -q Win32; then + AC_MSG_RESULT(Win32) + OCAMLWIN32=yes + OCAML_CLIBS=libbrlapi_stubs.a + elif echo "let _ = Sys.os_type;;" | ocaml | grep -q Cygwin; then + AC_MSG_RESULT(Cygwin) + OCAMLWIN32=yes + OCAML_CLIBS=libbrlapi_stubs.a + else + AC_MSG_RESULT(Unix) + OCAMLWIN32=no + OCAML_CLIBS="libbrlapi_stubs.a dllbrlapi_stubs.so" + fi + + # checking for ocamlfindlib + AC_CHECK_PROG(OCAMLFIND,ocamlfind,ocamlfind,no) + if test "$OCAMLFIND" = ocamlfind; then + OCAMLC='ocamlfind ocamlc' + if test "$OCAMLOPT" = ocamlopt; then + OCAMLOPT='ocamlfind ocamlopt' + fi + OCAML_INSTALL_TARGET=install-with-findlib + OCAML_UNINSTALL_TARGET=uninstall-without-findlib + else + OCAML_INSTALL_TARGET=install-without-findlib + OCAML_UNINSTALL_TARGET=uninstall-without-findlib + AC_MSG_WARN([Cannot find ocamlfind.]) + fi + fi +fi + +# substitutions to perform +AC_SUBST(OCAMLC) +AC_SUBST(OCAMLOPT) +AC_SUBST(OCAMLMKLIB) +AC_SUBST(OCAMLBEST) +AC_SUBST(OCAMLVERSION) +AC_SUBST(OCAMLLIB) +AC_SUBST(OCAMLWIN32) +AC_SUBST(OCAML_CLIBS) +AC_SUBST(OCAML_NCLIB) +AC_SUBST(OCAMLFIND) +AC_SUBST(OCAML_INSTALL_TARGET) +AC_SUBST(OCAML_UNINSTALL_TARGET) + +AC_SUBST([OCAML_OK]) +]) diff --git a/grub-core/braille/brltty/Bindings/OCaml/brlapi_stubs.c b/grub-core/braille/brltty/Bindings/OCaml/brlapi_stubs.c new file mode 100644 index 000000000..6abc56a6c --- /dev/null +++ b/grub-core/braille/brltty/Bindings/OCaml/brlapi_stubs.c @@ -0,0 +1,482 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2005-2012 by + * Sébastien Hinderer + * Samuel Thibault + * All rights reserved. + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +#include +#include +#include +#include +#include +#include + +#define CAML_NAME_SPACE /* Don't import old names */ +#include /* definition of the value type, and conversion macros */ +#include /* miscellaneous memory-related functions and macros (for GC interface, in-place modification of structures, etc). */ +#include /* allocation functions (to create structured Caml objects) */ +#include /* functions for raising exceptions */ +#include /* callback from C to Caml */ +#include /* operations on custom blocks */ +#include /* operations for writing user-defined serialization and deserialization functions for custom blocks */ +#define BRLAPI_NO_DEPRECATED +#include "brlapi.h" +#include "brlapi_protocol.h" + +#ifndef MIN +#define MIN(x, y) (xbrlerrno)); + Store_field(camlError, 1, Val_int(err->libcerrno)); + Store_field(camlError, 2, Val_int(err->gaierrno)); + if (err->errfun!=NULL) + Store_field(camlError, 3, caml_copy_string(err->errfun)); + else + Store_field(camlError, 3, caml_copy_string("")); + return camlError; +} + +CAMLprim value brlapiml_errorCode_of_error(value camlError) +{ + CAMLparam1(camlError); + CAMLlocal1(result); + switch (Int_val(Field(camlError, 0))) { + case BRLAPI_ERROR_NOMEM: result = Val_int(0); break; + case BRLAPI_ERROR_TTYBUSY: result = Val_int(1); break; + case BRLAPI_ERROR_DEVICEBUSY: result = Val_int(2); break; + case BRLAPI_ERROR_UNKNOWN_INSTRUCTION: result = Val_int(3); break; + case BRLAPI_ERROR_ILLEGAL_INSTRUCTION: result = Val_int(4); break; + case BRLAPI_ERROR_INVALID_PARAMETER: result = Val_int(5); break; + case BRLAPI_ERROR_INVALID_PACKET: result = Val_int(6); break; + case BRLAPI_ERROR_CONNREFUSED: result = Val_int(7); break; + case BRLAPI_ERROR_OPNOTSUPP: result = Val_int(8); break; + case BRLAPI_ERROR_GAIERR: { + result = caml_alloc(1, 0); + Store_field(result, 0, Val_int(Field(camlError, 2))); + }; break; + case BRLAPI_ERROR_LIBCERR: { + result = caml_alloc(1, 1); + Store_field(result, 0, unix_error_of_code(Int_val(Field(camlError, 1)))); + }; break; + case BRLAPI_ERROR_UNKNOWNTTY: result = Val_int(9); break; + case BRLAPI_ERROR_PROTOCOL_VERSION: result = Val_int(10); break; + case BRLAPI_ERROR_EOF: result = Val_int(11); break; + case BRLAPI_ERROR_EMPTYKEY: result = Val_int(12); break; + case BRLAPI_ERROR_DRIVERERROR: result = Val_int(13); break; + case BRLAPI_ERROR_AUTHENTICATION: result = Val_int(14); break; + default: { + result = caml_alloc(1, 2); + Store_field(result, 0, Val_int(Field(camlError, 0))); + } + } + CAMLreturn(result); +} + +/* Function : raise_brlapi_error */ +/* Raises the Brlapi_error exception */ +static void raise_brlapi_error(void) +{ + static value *exception = NULL; + CAMLlocal1(res); + if (exception==NULL) exception = caml_named_value("Brlapi_error"); + res = caml_alloc(2,0); + Store_field(res, 0, *exception); + Store_field(res, 1, constrCamlError(&brlapi_error)); + caml_raise(res); +} + +/* Function : raise_brlapi_exception */ +/* Raises Brlapi_exception */ +static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t type, const void *packet, size_t size) +{ + static value *exception = NULL; + int i; + CAMLlocal2(str, res); + str = caml_alloc_string(size); + for (i=0; i. +############################################################################### + +BEGIN { +} + +END { +} + +function brlCommand(name, symbol, value, help) { + writeCommandDefinition("cmd_" name, "Int32.of_int " value, help) +} + +function brlBlock(name, symbol, value, help) { + if (value ~ /^0[xX][0-9a-fA-F]+00$/) { + writeCommandDefinition("blk_" name, "Int32.of_int " hexadecimalValue(value) "00", help) + } +} + +function brlKey(name, symbol, value, help) { +# not implemented for other bindings either +# print "braille key:" +# print name symbol value +# print "(** " help " *)" +} + +function brlFlag(name, symbol, value, help) { + if (value ~ /^0[xX][0-9a-fA-F]+0000$/) { + value = hexadecimalValue(substr(value, 1, length(value)-4)) + if (name ~ /^CHAR_/) { + name = substr(name, 6) + } else { + value = value "00" + } + } else if (value ~ /^\(/) { + return + } else { + return + } + writeCamlConstant("int32", "KEY_FLG_" name, "Int32.of_int " tolower(value), help) +} + +function brlDot(number, symbol, value, help) { + writeCamlConstant("int", "dot" number, value, help) +} + +function apiConstant(name, symbol, value, help) { + writeCamlConstant("int", name, value); +} + +function apiMask(name, symbol, value, help) { + writeCamlConstant("int64", "key_" tolower(name), hexadecimalValue(value) "L"); +} + +function apiShift(name, symbol, value, help) { + writeCamlConstant("int", "key_" tolower(name), hexadecimalValue(value)); +} + +function apiType(name, symbol, value, help) { + writeCamlConstant("int", "key_type_" tolower(name), hexadecimalValue(value)); +} + +function apiKey(name, symbol, value, help) { + value = hexadecimalValue(value) + + if (name == "FUNCTION") { + for (i=0; i<35; ++i) { + writeKeyDefinition("F" (i+1), "(" value " + " i ")") + } + } else { + writeKeyDefinition(name, value) + } +} + +function apiRangeType(name, symbol, value, help) { + writeCamlConstant("int", "rangeType_" name, value, help) +} + +function writeCommandDefinition(name, value, help) { + writeCamlConstant("int32", name, value, help) +} + +function writeKeyDefinition(name, value) { + writeCamlConstant("int32", "KEY_SYM_" name, "Int32.of_int " value) +} + +function writeCamlConstant(type, name, value, help) { + print "let " tolower(name) " : " type " = " value " " camldocComment(help) +} + +function camldocComment(text) { + if (length(text) > 0) value = "(** " text " *)"; + else value = ""; + return value; +} + +function hexadecimalValue(value) { + value = tolower(value) + gsub("x0+", "x", value) + gsub("x$", "x0", value) + return value +} diff --git a/grub-core/braille/brltty/Bindings/OCaml/main.ml b/grub-core/braille/brltty/Bindings/OCaml/main.ml new file mode 100644 index 000000000..08332634a --- /dev/null +++ b/grub-core/braille/brltty/Bindings/OCaml/main.ml @@ -0,0 +1,213 @@ +(* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2002-2012 by + * Sébastien Hinderer + * Samuel Thibault + * All rights reserved. + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + *) + +(* BrlAPI Interface for the OCaml language *) + +let dot1 = 1 lsl 0 +let dot2 = 1 lsl 1 +let dot3 = 1 lsl 2 +let dot4 = 1 lsl 3 +let dot5 = 1 lsl 4 +let dot6 = 1 lsl 5 +let dot7 = 1 lsl 6 +let dot8 = 1 lsl 7 + +type settings = { + auth : string; + host : string +} + +let settings_initializer = { + auth = ""; + host = "" +} + +type writeArguments = { + mutable displayNumber : int; + mutable regionBegin : int; + mutable regionSize : int; + text : string; + attrAnd : int array; + attrOr : int array; + mutable cursor : int; + mutable charset : string +} + +let writeArguments_initializer = { + displayNumber = -1; + regionBegin = 0; + regionSize = 0; + text = ""; + attrAnd = [| |]; + attrOr = [| |]; + cursor = -1; + charset = "" +} + +type handle + +let max_packet_size = 512 + +type errorCode = + | SUCCESS + | NOMEM + | TTYBUSY + | DEVICEBUSY + | UNKNOWN_INSTRUCTION + | ILLEGAL_INSTRUCTION + | INVALID_PARAMETER + | INVALID_PACKET + | CONNREFUSED + | OPNOTSUPP + | GAIERR of int + | LIBCERR of Unix.error + | UNKNOWNTTY + | PROTOCOL_VERSION + | EOF + | EMPTYKEY + | DRIVERERROR + | AUTHENTICATION + | Unknown of int + +type error = { + brlerrno : int; + libcerrno : int; + gaierrno : int; + errfun : string; +} + +external errorCode_of_error : + error -> errorCode = "brlapiml_errorCode_of_error" + +external strerror : + error -> string = "brlapiml_strerror" + +exception Brlapi_error of error +exception Brlapi_exception of errorCode * int32 * string + +external openConnection : + settings -> Unix.file_descr * settings = "brlapiml_openConnection" +external openConnectionWithHandle : + settings -> handle = "brlapiml_openConnectionWithHandle" +external closeConnection : + ?h:handle -> unit -> unit = "brlapiml_closeConnection" +external getDriverName : + ?h:handle -> unit -> string = "brlapiml_getDriverName" +external getDisplaySize : + ?h:handle -> unit -> int * int = "brlapiml_getDisplaySize" + +external enterTtyMode : + ?h:handle -> int -> string -> int = "brlapiml_enterTtyMode" +external enterTtyModeWithPath : + ?h:handle -> int array -> string -> int = "brlapiml_enterTtyModeWithPath" +external leaveTtyMode : + ?h:handle -> unit -> unit = "brlapiml_leaveTtyMode" +external setFocus : + ?h:handle -> int -> unit = "brlapiml_setFocus" + +external writeText : + ?h:handle -> int -> string -> unit = "brlapiml_writeText" +external writeDots : + ?h:handle -> int array -> unit = "brlapiml_writeDots" +external write : + ?h:handle -> writeArguments -> unit = "brlapiml_write" + +external readKey : + ?h:handle -> unit -> int64 option = "brlapiml_readKey" +external waitKey : + ?h:handle -> unit -> int64 = "brlapiml_waitKey" + +type expandedKeyCode = { + type_ : int32; + command : int32; + argument : int32; + flags : int32 +} + +external expandKeyCode : + ?h:handle -> int64 -> expandedKeyCode = "brlapiml_expandKeyCode" + +type rangeType = + | RT_all + | RT_type + | RT_command + | RT_key + | RT_code + +external ignoreKeys : + ?h:handle -> rangeType -> int64 array -> unit = "brlapiml_ignoreKeys" +external acceptKeys : + ?h:handle -> rangeType -> int64 array -> unit = "brlapiml_acceptKeys" +external ignoreAllKeys : + ?h:handle -> unit = "brlapiml_ignoreAllKeys" +external acceptAllKeys : + ?h:handle -> unit = "brlapiml_acceptAllKeys" +external ignoreKeyRanges : + ?h:handle -> (int64 * int64) array -> unit = "brlapiml_ignoreKeyRanges" +external acceptKeyRanges : + ?h:handle -> (int64 * int64) array -> unit = "brlapiml_acceptKeyRanges" + +external enterRawMode : + ?h:handle -> string -> unit = "brlapiml_enterRawMode" +external leaveRawMode : + ?h:handle -> unit -> unit = "brlapiml_leaveRawMode" +external sendRaw : + ?h:handle -> string -> int = "brlapiml_sendRaw" +external recvRaw : + ?h:handle -> unit -> string = "brlapiml_recvRaw" + +external suspendDriver : + ?h:handle -> string -> unit = "brlapiml_suspendDriver" +external resumeDriver : + ?h:handle -> unit -> unit = "brlapiml_resumeDriver" + +module type KEY = sig + type key + val key_of_int64 : int64 -> key + val int64_of_key : key -> int64 +end + +module MakeKeyHandlers (M1 : KEY) = struct + type key = M1.key + let readKey ?h () = match readKey ?h () with + | None -> None + | Some x -> Some (M1.key_of_int64 x) + + let waitKey ?h () = M1.key_of_int64 (waitKey ?h ()) + let ignoreKeys ?h t a = ignoreKeys ?h t (Array.map M1.int64_of_key a) + let acceptKeys ?h t a = acceptKeys ?h t (Array.map M1.int64_of_key a) + let f (x,y) = (M1.int64_of_key x, M1.int64_of_key y) + let g a = Array.map f a + let ignoreKeyRanges ?h a = ignoreKeyRanges ?h (g a) + let acceptKeyRanges ?h a = acceptKeyRanges ?h (g a) +end + + + +external setExceptionHandler : + unit -> unit = "brlapiml_setExceptionHandler" + +let _ = + let x = { brlerrno = 0; libcerrno = 0; gaierrno = 0; errfun = "" } in + Callback.register_exception "Brlapi_error" + (Brlapi_error x); + Callback.register_exception "Brlapi_exception" + (Brlapi_exception (SUCCESS, 0l, "")); + setExceptionHandler() diff --git a/grub-core/braille/brltty/Bindings/OCaml/main.mli b/grub-core/braille/brltty/Bindings/OCaml/main.mli new file mode 100644 index 000000000..a0dde8a92 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/OCaml/main.mli @@ -0,0 +1,222 @@ +(* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2002-2012 by + * Sébastien Hinderer + * Samuel Thibault + * All rights reserved. + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + *) + +(* BrlAPI Interface for the OCaml language *) +(* +Ajouter des fichiers .in +*) + +(* +BRLAPI_RELEASE +BRLAPI_MAJOR +BRLAPI_MINOR +BRLAPI_REVISION +Faire un fichier .in: @VAR@ est remplacé par la valeur de VAR +telle que définie dans configure.ac. +*) + +(* +BRLAPI_SOCKETPORTNUM +BRLAPI_SOCKETPORT (string) +BRLAPI_MAXPACKETSIZE +BRLAPI_MAXNAMELENGTH +BRLAPI_SOCKETPATH +BRLAPI_ETCDIR +BRLAPI_AUTHKEYFILE +BRLAPI_DEFAUTH +Idem que précédemmment +C'est du ni errorCode = "brlapiml_errorCode_of_error" + +external strerror : + error -> string = "brlapiml_strerror" + +exception Brlapi_error of error +exception Brlapi_exception of errorCode * int32 * string + +external openConnection : + settings -> Unix.file_descr * settings = "brlapiml_openConnection" +external openConnectionWithHandle : + settings -> handle = "brlapiml_openConnectionWithHandle" +external closeConnection : + ?h:handle -> unit -> unit = "brlapiml_closeConnection" +(* +val expandHost : string -> string * string +Idem: proto +*) +external getDriverName : + ?h:handle -> unit -> string = "brlapiml_getDriverName" +external getDisplaySize : + ?h:handle -> unit -> int * int = "brlapiml_getDisplaySize" + +external enterTtyMode : + ?h:handle -> int -> string -> int = "brlapiml_enterTtyMode" +val enterTtyModeWithPath : + ?h:handle -> int array -> string -> int +external leaveTtyMode : + ?h:handle -> unit -> unit = "brlapiml_leaveTtyMode" +external setFocus : + ?h:handle -> int -> unit = "brlapiml_setFocus" + +external writeText : + ?h:handle -> int -> string -> unit = "brlapiml_writeText" +(* Arg optionnel pour curseur ? *) +external writeDots : + ?h:handle -> int array -> unit = "brlapiml_writeDots" +external write : + ?h:handle -> writeArguments -> unit = "brlapiml_write" + +(* +BRLAPI_KEYCODE_MAX +Les constantes pour travailler sur les flags de touches ? +Les KEY_SYM ? +Oui: pour être cohérent avec le fait de fournir le int64 +Flags: entiers. +*) + +(* val getKeyName : expandedKeyCode -> string *) + +(* +brlapi_dotNumberToBit +brlapi_dotBitToNumber +Unicode ? +Oui, utile pour les key_sym +*) + +external readKey : + ?h:handle -> unit -> int64 option = "brlapiml_readKey" +external waitKey : + ?h:handle -> unit -> int64 = "brlapiml_waitKey" + +type expandedKeyCode = { + type_ : int32; + command : int32; + argument : int32; + flags : int32 +} + +external expandKeyCode : + ?h:handle -> int64 -> expandedKeyCode = "brlapiml_expandKeyCode" + +type rangeType = + | RT_all + | RT_type + | RT_command + | RT_key + | RT_code + +external ignoreKeys : + ?h:handle -> rangeType -> int64 array -> unit = "brlapiml_ignoreKeys" +external acceptKeys : + ?h:handle -> rangeType -> int64 array -> unit = "brlapiml_acceptKeys" +external ignoreAllKeys : + ?h:handle -> unit = "brlapiml_ignoreAllKeys" +external acceptAllKeys : + ?h:handle -> unit = "brlapiml_acceptAllKeys" +external ignoreKeyRanges : + ?h:handle -> (int64 * int64) array -> unit = "brlapiml_ignoreKeyRanges" +external acceptKeyRanges : + ?h:handle -> (int64 * int64) array -> unit = "brlapiml_acceptKeyRanges" + +external enterRawMode : + ?h:handle -> string -> unit = "brlapiml_enterRawMode" +external leaveRawMode : + ?h:handle -> unit -> unit = "brlapiml_leaveRawMode" +external sendRaw : + ?h:handle -> string -> int = "brlapiml_sendRaw" +external recvRaw : + ?h:handle -> unit -> string = "brlapiml_recvRaw" + +external suspendDriver : + ?h:handle -> string -> unit = "brlapiml_suspendDriver" +external resumeDriver : + ?h:handle -> unit -> unit = "brlapiml_resumeDriver" + +module type KEY = sig + type key + val key_of_int64 : int64 -> key + val int64_of_key : key -> int64 +end + +module MakeKeyHandlers (M1 : KEY) : sig + type key = M1.key + val readKey : ?h:handle -> unit -> key option + val waitKey : ?h:handle -> unit -> key + + val ignoreKeys : ?h:handle -> rangeType -> key array -> unit + val acceptKeys : ?h:handle -> rangeType -> key array -> unit + val ignoreKeyRanges : ?h:handle -> (key * key) array -> unit + val acceptKeyRanges : ?h:handle -> (key * key) array -> unit +end diff --git a/grub-core/braille/brltty/Bindings/Python/bindings.c b/grub-core/braille/brltty/Bindings/Python/bindings.c new file mode 100644 index 000000000..0af3e899c --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/bindings.c @@ -0,0 +1,99 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2005-2012 by + * Alexis Robert + * Samuel Thibault + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +/* bindings.c provides initialized variables and brlapi exception handler to + * the Python bindings */ + + +#include "brlapi.h" + +#ifdef __MINGW32__ + +#define WIN_ERRNO_STORAGE_CLASS static +#include "win_errno.h" + +#include "win_pthread.h" + +#else /* __MINGW32__ */ +#include +#endif /* __MINGW32__ */ + +#include +#include + +#include "bindings.h" + +const brlapi_writeArguments_t brlapi_writeArguments_initialized = BRLAPI_WRITEARGUMENTS_INITIALIZER; + +static pthread_once_t brlapi_protocolExceptionOnce = PTHREAD_ONCE_INIT; +static pthread_key_t brlapi_protocolExceptionKey; +static char *brlapi_protocolExceptionSingleThread; + +#if defined(WINDOWS) + +#elif defined(__GNUC__) || defined(__sun__) +#pragma weak pthread_once +#pragma weak pthread_key_create +#pragma weak pthread_getspecific +#pragma weak pthread_setspecific +#endif /* weak external references */ + +static void BRLAPI_STDCALL brlapi_pythonExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size) +{ + char str[128]; + + brlapi__strexception(handle, str, sizeof(str), error, type, packet, size); +#ifndef WINDOWS + if (!(pthread_once && pthread_key_create)) + brlapi_protocolExceptionSingleThread = strdup(str); + else +#endif + pthread_setspecific(brlapi_protocolExceptionKey, strdup(str)); +} + +char *brlapi_protocolException(void) +{ + char *exception; +#ifndef WINDOWS + if (!(pthread_once && pthread_key_create)) { + exception = brlapi_protocolExceptionSingleThread; + brlapi_protocolExceptionSingleThread = NULL; + return exception; + } else +#endif + { + exception = pthread_getspecific(brlapi_protocolExceptionKey); + pthread_setspecific(brlapi_protocolExceptionKey, NULL); + return exception; + } +} + +static void do_brlapi_protocolExceptionInit(void) +{ + pthread_key_create(&brlapi_protocolExceptionKey, free); +} + +void brlapi_protocolExceptionInit(brlapi_handle_t *handle) { +#ifndef WINDOWS + if (pthread_once && pthread_key_create) +#endif /* WINDOWS */ + pthread_once(&brlapi_protocolExceptionOnce, do_brlapi_protocolExceptionInit); + + brlapi__setExceptionHandler(handle, &brlapi_pythonExceptionHandler); +} diff --git a/grub-core/braille/brltty/Bindings/Python/bindings.h b/grub-core/braille/brltty/Bindings/Python/bindings.h new file mode 100644 index 000000000..deefad681 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/bindings.h @@ -0,0 +1,26 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2005-2012 by + * Alexis Robert + * Samuel Thibault + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +/* bindings.h provides initialized variables to the Python bindings */ + +#include "brlapi.h" + +extern const brlapi_writeArguments_t brlapi_writeArguments_initialized; +extern char *brlapi_protocolException(void); +extern void brlapi_protocolExceptionInit(brlapi_handle_t *handle); diff --git a/grub-core/braille/brltty/Bindings/Python/bindings.m4 b/grub-core/braille/brltty/Bindings/Python/bindings.m4 new file mode 100644 index 000000000..bfcfc043f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/bindings.m4 @@ -0,0 +1,136 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +AC_DEFUN([BRLTTY_PYTHON_BINDINGS], [dnl +PYTHON_OK=true + +AC_PATH_PROG([PYTHON], [python]) +if test -z "${PYTHON}" +then + AC_MSG_WARN([Python interpreter not found]) + PYTHON_OK=false +else + PYTHON_PROLOGUE="" + for python_module in sys distutils.sysconfig + do + if test -n "`${PYTHON} -c "import ${python_module};" 2>&1`" + then + AC_MSG_WARN([Python module not found: ${python_module}]) + PYTHON_OK=false + else + PYTHON_PROLOGUE="${PYTHON_PROLOGUE}import ${python_module}; " + fi + done + AC_SUBST([PYTHON_PROLOGUE]) + + if "${PYTHON_OK}" + then + if test -z "${PYTHON_VERSION}" + then + [PYTHON_VERSION="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_config_vars('VERSION')[0];"`"] + if test -z "${PYTHON_VERSION}" + then + [PYTHON_VERSION="`${PYTHON} -c "${PYTHON_PROLOGUE} print '.'.join(sys.version.split()[0].split('.')[:2]);"`"] + if test -z "${PYTHON_VERSION}" + then + AC_MSG_WARN([Python version not defined]) + fi + fi + fi + AC_SUBST([PYTHON_VERSION]) + + if test -z "${PYTHON_CPPFLAGS}" + then + [python_include_directory="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_python_inc();"`"] + if test -z "${python_include_directory}" + then + AC_MSG_WARN([Python include directory not found]) + PYTHON_OK=false + else + PYTHON_CPPFLAGS="-I${python_include_directory}" + + if test ! -f "${python_include_directory}/Python.h" + then + AC_MSG_WARN([Python developer environment not installed]) + PYTHON_OK=false + fi + fi + fi + AC_SUBST([PYTHON_CPPFLAGS]) + + if test -z "${PYTHON_LIBS}" + then + PYTHON_LIBS="-lpython${PYTHON_VERSION}" + + [python_library_directory="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_python_lib(0,1);"`"] + if test -z "${python_library_directory}" + then + AC_MSG_WARN([Python library directory not found]) + else + PYTHON_LIBS="-L${python_library_directory}/config ${PYTHON_LIBS}" + fi + fi + AC_SUBST([PYTHON_LIBS]) + + if test -z "${PYTHON_EXTRA_LIBS}" + then + [PYTHON_EXTRA_LIBS="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_config_var('LOCALMODLIBS'), distutils.sysconfig.get_config_var('LIBS');"`"] + fi + AC_SUBST([PYTHON_EXTRA_LIBS]) + + if test -z "${PYTHON_EXTRA_LDFLAGS}" + then + [PYTHON_EXTRA_LDFLAGS="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_config_var('LINKFORSHARED');"`"] + fi + AC_SUBST([PYTHON_EXTRA_LDFLAGS]) + + if test -z "${PYTHON_SITE_PKG}" + then + [PYTHON_SITE_PKG="`${PYTHON} -c "${PYTHON_PROLOGUE} print distutils.sysconfig.get_python_lib(0,0);"`"] + if test -z "${PYTHON_SITE_PKG}" + then + AC_MSG_WARN([Python package directory not found]) + fi + fi + AC_SUBST([PYTHON_SITE_PKG]) + fi +fi + +AC_PATH_PROG([PYREXC], [pyrexc]) +if test -z "${PYREXC}" +then + AC_MSG_WARN([Pyrex compiler not found]) + PYTHON_OK=false +fi + +if test "${GCC}" = "yes" +then + PYREXC_CFLAGS="-Wno-parentheses -Wno-unused -fno-strict-aliasing -U_POSIX_C_SOURCE -U_XOPEN_SOURCE" +else + case "${host_os}" + in + *) + PYREXC_CFLAGS="" + ;; + esac +fi +AC_SUBST([PYREXC_CFLAGS]) + +AC_SUBST([PYTHON_OK]) +]) diff --git a/grub-core/braille/brltty/Bindings/Python/brlapi.pyx b/grub-core/braille/brltty/Bindings/Python/brlapi.pyx new file mode 100644 index 000000000..99950fd6f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/brlapi.pyx @@ -0,0 +1,711 @@ +""" +This module implements a set of bindings for BrlAPI, a braille bridge for applications. + +The reference C API documentation is available online http://mielke.cc/brltty/doc/BrlAPIref-HTML, as well as in manual pages. + +This documentation is only a python helper, you should also read C manual pages. + +Example : +import brlapi +import errno +import Xlib.keysymdef.miscellany +try: + b = brlapi.Connection() + b.enterTtyMode() + b.ignoreKeys(brlapi.rangeType_all,[0]) + + # Accept the home, window up and window down braille commands + b.acceptKeys(brlapi.rangeType_command,[brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_HOME, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_WINUP, brlapi.KEY_TYPE_CMD|brlapi.KEY_CMD_WINDN]) + + # Accept the tab key + b.acceptKeys(brlapi.rangeType_key,[brlapi.KEY_TYPE_SYM|Xlib.keysymdef.miscellany.XK_Tab]) + + b.writeText("Press home, winup/dn or tab to continue ... ¤") + key = b.readKey() + + k = b.expandKeyCode(key) + b.writeText("Key %ld (%x %x %x %x) !" % (key, k["type"], k["command"], k["argument"], k["flags"])) + b.writeText(None,1) + b.readKey() + + underline = chr(brlapi.DOT7 + brlapi.DOT8) + # Note: center() can take two arguments only starting from python 2.4 + b.write( + regionBegin = 1, + regionSize = 40, + text = u"Press any key to exit ¤ ", + orMask = "".center(21,underline) + "".center(19,chr(0))) + + b.acceptKeys(brlapi.rangeType_all,[0]) + b.readKey() + + b.leaveTtyMode() + +except brlapi.ConnectionError, e: + if e.brlerrno == brlapi.ERROR_CONNREFUSED: + print "Connection to %s refused. BRLTTY is too busy..." % e.host + elif e.brlerrno == brlapi.ERROR_AUTHENTICATION: + print "Authentication with %s failed. Please check the permissions of %s" % (e.host,e.auth) + elif e.brlerrno == brlapi.ERROR_LIBCERR and (e.libcerrno == errno.ECONNREFUSED or e.libcerrno == errno.ENOENT): + print "Connection to %s failed. Is BRLTTY really running?" % (e.host) + else: + print "Connection to BRLTTY at %s failed: " % (e.host) + print e + print e.brlerrno + print e.libcerrno +""" + +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +cimport c_brlapi +import errno +include "constants.auto.pyx" + +class OperationError(Exception): + """Error while performing some operation""" + def __init__(self): + cdef char *exception + exception = c_brlapi.brlapi_protocolException() + if (exception): + self.exception = exception + c_brlapi.free(exception) + else: + self.exception = None + self.brlerrno = c_brlapi.brlapi_error.brlerrno + self.libcerrno = c_brlapi.brlapi_error.libcerrno + self.gaierrno = c_brlapi.brlapi_error.gaierrno + if (c_brlapi.brlapi_error.errfun): + self.errfun = c_brlapi.brlapi_error.errfun + + def __str__(self): + cdef c_brlapi.brlapi_error_t error + if self.exception: + return self.exception + error.brlerrno = self.brlerrno + error.libcerrno = self.libcerrno + error.gaierrno = self.gaierrno + str = self.errfun + error.errfun = str + return c_brlapi.brlapi_strerror(&error) + +class ConnectionError(OperationError): + """Error while connecting to BrlTTY""" + + def __init__(self, host, auth): + OperationError.__init__(self) + self.host = host + self.auth = auth + + def __str__(self): + msg = "couldn't connect to %s with key %s: %s" % (self.host,self.auth,OperationError.__str__(self)) + msg = msg + "\n(brlerrno %d, libcerrno %d, gaierrno %d)" % (self.brlerrno, self.libcerrno, self.gaierrno) + if self.brlerrno == ERROR_CONNREFUSED: + msg = msg + "\nBRLTTY is too busy..." + elif self.brlerrno == ERROR_AUTHENTICATION: + msg = msg + "\nAuthentication failed. Please check you can read %s and it is not empty." % self.auth + elif self.brlerrno == ERROR_LIBCERR and (self.libcerrno == errno.ECONNREFUSED or self.libcerrno == errno.ENOENT): + msg = msg + "\nIs BRLTTY really running?" + return msg + + def host(self): + """Host of BRLTTY server""" + return self.settings.host + + def auth(self): + """Authentication method used""" + return self.settings.auth + +cdef class WriteStruct: + """Structure containing arguments to be given to Connection.write() + See brlapi_writeArguments_t(3). + + This is DEPRECATED. Use the named parameters of write() instead.""" + cdef c_brlapi.brlapi_writeArguments_t props + + def __init__(self): + self.props = c_brlapi.brlapi_writeArguments_initialized + + property displayNumber: + """Display number DISPLAY_DEFAULT == unspecified""" + def __get__(self): + return self.props.displayNumber + def __set__(self, val): + self.props.displayNumber = val + + property regionBegin: + """Region of display to update, 1st character of display is 1""" + def __get__(self): + return self.props.regionBegin + def __set__(self, val): + self.props.regionBegin = val + + property regionSize: + """Number of characters held in text, attrAnd and attrOr. For multibytes text, this is the number of multibyte characters. Combining and double-width characters count for 1""" + def __get__(self): + return self.props.regionSize + def __set__(self, val): + self.props.regionSize = val + + property text: + """Text to display""" + def __get__(self): + if (not self.props.text): + return None + else: + return self.props.text + def __set__(self, val): + cdef c_brlapi.size_t size + cdef char *c_val + if (type(val) == unicode): + val = val.encode('UTF-8') + self.charset = 'UTF-8' + if (self.props.text): + c_brlapi.free(self.props.text) + if (val): + size = len(val) + c_val = val + self.props.text = c_brlapi.malloc(size+1) + c_brlapi.memcpy(self.props.text,c_val,size) + self.props.text[size] = 0 + self.props.textSize = size + else: + self.props.text = NULL + + property cursor: + """CURSOR_LEAVE == don't touch, CURSOR_OFF == turn off, 1 = 1st char of display, ...""" + def __get__(self): + return self.props.cursor + def __set__(self, val): + self.props.cursor = val + + property charset: + """Character set of the text""" + def __get__(self): + if (not self.props.charset): + return None + else: + return self.props.charset + def __set__(self, val): + cdef c_brlapi.size_t size + cdef char *c_val + if (self.props.charset): + c_brlapi.free(self.props.charset) + if (val): + size = len(val) + c_val = val + self.props.charset = c_brlapi.malloc(size+1) + c_brlapi.memcpy(self.props.charset,c_val,size) + self.props.charset[size] = 0 + else: + self.props.charset = NULL + + property attrAnd: + """And attributes; applied first""" + def __get__(self): + if (not self.props.andMask): + return None + else: + return self.props.andMask + def __set__(self, val): + cdef c_brlapi.size_t size + cdef char *c_val + if (self.props.andMask): + c_brlapi.free(self.props.andMask) + if (val): + size = len(val) + c_val = val + self.props.andMask = c_brlapi.malloc(size+1) + c_brlapi.memcpy(self.props.andMask,c_val,size) + self.props.andMask[size] = 0 + else: + self.props.andMask = NULL + + property attrOr: + """Or attributes; applied after ANDing""" + def __get__(self): + if (not self.props.orMask): + return None + else: + return self.props.orMask + def __set__(self, val): + cdef c_brlapi.size_t size + cdef char *c_val + if (self.props.orMask): + c_brlapi.free(self.props.orMask) + if (val): + size = len(val) + c_val = val + self.props.orMask = c_brlapi.malloc(size+1) + c_brlapi.memcpy(self.props.orMask,c_val,size) + self.props.orMask[size] = 0 + else: + self.props.orMask = NULL + +cdef class Connection: + """Class which manages the bridge between your program and BrlAPI""" + + cdef c_brlapi.brlapi_handle_t *h + cdef c_brlapi.brlapi_connectionSettings_t settings + cdef int fd + + def __init__(self, host = None, auth = None): + """Connect your program to BrlTTY using settings + + See brlapi_openConnection(3) + + Setting host to None defaults it to localhost, using the local installation's default TCP port, or to the content of the BRLAPI_HOST environment variable, if it exists. + Note: Please check that resolving this name works before complaining. + + Setting auth to None defaults it to local installation setup or to the content of the BRLAPI_AUTH environment variable, if it exists.""" + cdef c_brlapi.brlapi_connectionSettings_t client + + if auth: + client.auth = auth + else: + client.auth = NULL + + if host: + client.host = host + else: + client.host = NULL + + self.h = c_brlapi.malloc(c_brlapi.brlapi_getHandleSize()) + + c_brlapi.Py_BEGIN_ALLOW_THREADS + self.fd = c_brlapi.brlapi__openConnection(self.h, &client, &self.settings) + c_brlapi.Py_END_ALLOW_THREADS + c_brlapi.brlapi_protocolExceptionInit(self.h) + if self.fd == -1: + c_brlapi.free(self.h) + raise ConnectionError(self.settings.host, self.settings.auth) + + def __del__(self): + """Close the BrlAPI conection""" + c_brlapi.brlapi__closeConnection(self.h) + c_brlapi.free(self.h) + + property host: + """To get authorized to connect, libbrlapi has to tell the BrlAPI server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application.""" + def __get__(self): + return self.settings.host + + property auth: + """This tells where the BrlAPI server resides : it might be listening on another computer, on any TCP port. It should look like "foo:1", which means TCP port number BRLAPI_SOCKETPORTNUM+1 on computer called "foo".""" + def __get__(self): + return self.settings.auth + + property fileDescriptor: + """Returns the Unix file descriptor that the connection uses""" + def __get__(self): + return self.fd + + property displaySize: + """Get the size of the braille display + See brlapi_getDisplaySize(3).""" + def __get__(self): + cdef unsigned int x + cdef unsigned int y + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__getDisplaySize(self.h, &x, &y) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return (x, y) + + property driverName: + """Get the complete name of the driver used by BrlTTY + See brlapi_getDriverName(3).""" + def __get__(self): + cdef char name[21] + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__getDriverName(self.h, name, sizeof(name)) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return name + + def enterTtyMode(self, tty = TTY_DEFAULT, driver = None): + """Ask for some tty, with some key mechanism + + See brlapi_enterTtyMode(3). + + * tty : If tty >= 0, application takes control of the specified tty + If tty == TTY_DEFAULT, the library first tries to get the tty number from the WINDOWID environment variable (form xterm case), then the CONTROLVT variable, and at last reads /proc/self/stat (on linux) + * driver : Tells how the application wants readKey() to return key presses. None or "" means BrlTTY commands are required, whereas a driver name means that raw key codes returned by this driver are expected.""" + cdef int retval + cdef int c_tty + cdef char *c_driver + c_tty = tty + if not driver: + c_driver = NULL + else: + c_driver = driver + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__enterTtyMode(self.h, c_tty, c_driver) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def enterTtyModeWithPath(self, path = [], driver = None): + """Ask for some tty, with some key mechanism + + See brlapi_enterTtyModeWithPath(3). + + * tty is an array of ttys representing the tty path to be got. Can be None. + * driver : has the same meaning as in enterTtyMode. + + Providing an empty array or None means to get the root.""" + cdef int retval + cdef int *c_ttys + cdef int c_nttys + cdef char *c_driver + if not path: + c_ttys = NULL + c_nttys = 0 + else: + c_nttys = len(path) + c_ttys = c_brlapi.malloc(c_nttys * sizeof(int)) + for i from 0 <= i < c_nttys: + c_ttys[i] = path[i] + if not driver: + c_driver = NULL + else: + c_driver = driver + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__enterTtyModeWithPath(self.h, c_ttys, c_nttys, c_driver) + c_brlapi.Py_END_ALLOW_THREADS + if (c_ttys): + c_brlapi.free(c_ttys) + if retval == -1: + raise OperationError() + else: + return retval + + def leaveTtyMode(self): + """Stop controlling the tty + See brlapi_leaveTtyMode(3).""" + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__leaveTtyMode(self.h) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def setFocus(self, tty): + """Tell the current tty to brltty. + See brlapi_setFocus(3). + This is intended for focus tellers, such as brltty, xbrlapi, screen, ... enterTtyMode() must have been called before hand to tell where this focus applies in the tty tree.""" + cdef int retval + cdef int c_tty + c_tty = tty + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__setFocus(self.h, c_tty) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + # The writeArguments parameter must remain first (after self) in order + # to maintain backward compatibility with old code which passes it + # by position. New code should not use it since the plan is to remove + # it once it's no longer being used. New code should supply attributes + # by specifying the remaining parameters, as needed, by name. + def write(self, WriteStruct writeArguments = None, + displayNumber = None, + regionBegin = None, + regionSize = None, + text = None, + andMask = None, + orMask = None, + cursor = None, + charset = None): + """Update a specific region of the braille display and apply and/or masks. + See brlapi_write(3). + * s : gives information necessary for the update""" + cdef int retval + if not writeArguments: + writeArguments = WriteStruct() + if displayNumber != None: + writeArguments.displayNumber = displayNumber + if regionBegin != None: + writeArguments.regionBegin = regionBegin + if regionSize != None: + writeArguments.regionSize = regionSize + if text: + writeArguments.text = text + if andMask: + writeArguments.attrAnd = andMask + if orMask: + writeArguments.attrOr = orMask + if cursor != None: + writeArguments.cursor = cursor + if charset: + writeArguments.charset = charset + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__write(self.h, &writeArguments.props) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def writeDots(self, dots): + """Write the given dots array to the display. + See brlapi_writeDots(3). + * dots : points on an array of dot information, one per character. Its size must hence be the same as what displaysize provides.""" + cdef int retval + cdef char *c_dots + cdef unsigned char *c_udots + (x, y) = self.displaySize + dispSize = x * y + if (len(dots) < dispSize): + dots = dots + "".center(dispSize - len(dots), '\0') + c_dots = dots + c_udots = c_dots + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__writeDots(self.h, c_udots) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def writeText(self, text, cursor = CURSOR_OFF): + """Write the given \0-terminated string to the braille display. + See brlapi_writeText(3). + If the string is too long, it is cut. If it's too short, spaces are appended. The current LC_CTYPE locale is considered, unless it is left as default "C", in which case the charset is assumed to be 8bits, and the same as the server's. + + * cursor : gives the cursor position; if equal to CURSOR_OFF, no cursor is shown at all; if cursor == CURSOR_LEAVE, the cursor is left where it is + * text : points to the string to be displayed""" + w = WriteStruct() + w.cursor = cursor + if (text): + (x, y) = self.displaySize + dispSize = x * y + if (len(text) < dispSize): + text = text + "".center(dispSize - len(text)) + w.regionBegin = 1 + w.regionSize = dispSize + w.text = text[0 : dispSize] + return self.write(w) + + def readKey(self, wait = True): + """Read a key from the braille keyboard. + See brlapi_readKey(3). + + This function returns one key press's code. + + If None or "" was given to enterTtyPath(), a brltty command is returned. It is hence pretty driver-independent, and should be used by default when no other option is possible. + + By default, all commands but those which restart drivers and switch virtual are returned to the application and not to brltty. If the application doesn't want to see some command events, it should call either ignoreKeys() or ignoreKeyRanges(). + + If some driver name was given to enterTtyMode(), a raw keycode is returned, as specified by the terminal driver. It generally corresponds to the very code that the terminal tells to the driver. This should only be used by applications which are dedicated to a particular braille terminal. Hence, checking the terminal type thanks to a call to drivername before getting tty control is a pretty good idea. + + By default, all the keypresses will be passed to the client, none will go through brltty, so the application will have to handle console switching itself for instance.""" + cdef c_brlapi.brlapi_keyCode_t code + cdef int retval + cdef int c_wait + c_wait = wait + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__readKey(self.h, c_wait, &code) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + elif retval <= 0 and wait == False: + return None + else: + return code + + def expandKeyCode(self, code): + """Expand a keycode into its individual components. + See brlapi_expandKeyCode(3).""" + cdef c_brlapi.brlapi_expandedKeyCode_t ekc + cdef int retval + retval = c_brlapi.brlapi_expandKeyCode(code, &ekc) + if retval == -1: + raise OperationError() + else: + return { "type":ekc.type, "command":ekc.command, "argument":ekc.argument, "flags":ekc.flags } + + def ignoreKeys(self, key_type, set): + """Ignore some key presses from the braille keyboard. + See brlapi_ignoreKeys(3). + + This function asks the server to give the provided keys to brltty, rather than returning them to the application via brlapi_readKey(). + + The given codes should be brltty commands (nul or "" was given to brlapi_enterTtyMode())""" + cdef int retval + cdef c_brlapi.brlapi_rangeType_t c_type + cdef c_brlapi.brlapi_keyCode_t *c_set + cdef unsigned int c_n + c_type = key_type + c_n = len(set) + c_set = c_brlapi.malloc(c_n * sizeof(c_set[0])) + for i from 0 <= i < c_n: + c_set[i] = set[i] + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__ignoreKeys(self.h, c_type, c_set, c_n) + c_brlapi.Py_END_ALLOW_THREADS + c_brlapi.free(c_set) + if retval == -1: + raise OperationError() + else: + return retval + + def acceptKeys(self, key_type, set): + """Accept some key presses from the braille keyboard. + See brlapi_ignoreKeys(3). + + This function asks the server to give the provided keys to the application, and not give them to brltty. + + The given codes should be brltty commands (nul or "" was given to brlapi_enterTtyMode())""" + cdef int retval + cdef c_brlapi.brlapi_rangeType_t c_type + cdef c_brlapi.brlapi_keyCode_t *c_set + cdef unsigned int c_n + c_type = key_type + c_n = len(set) + c_set = c_brlapi.malloc(c_n * sizeof(c_set[0])) + for i from 0 <= i < c_n: + c_set[i] = set[i] + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__acceptKeys(self.h, c_type, c_set, c_n) + c_brlapi.Py_END_ALLOW_THREADS + c_brlapi.free(c_set) + if retval == -1: + raise OperationError() + else: + return retval + + def ignoreAllKeys(self): + """Ignore all key presses from the braille keyboard. + See brlapi_ignoreAllKeys(3). + + This function asks the server to give all keys to brltty, rather than returning them to the application via brlapi_readKey().""" + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__ignoreAllKeys(self.h) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def acceptAllKeys(self): + """Accept all key presses from the braille keyboard. + See brlapi_acceptAllKeys(3). + + This function asks the server to give all keys to the application, and not give them to brltty. + + Warning: after calling this function, make sure to call brlapi_ignoreKeys() for ignoring important keys like BRL_CMD_SWITCHVT_PREV/NEXT and such.""" + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__acceptAllKeys(self.h) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def ignoreKeyRanges(self, keys): + """Ignore some key presses from the braille keyboard. + See brlapi_ignoreKeyRanges(3). + + This function asks the server to give the provided key ranges to brltty, rather than returning them to the application via brlapi_readKey(). + + The given codes should be raw keycodes (i.e. some driver name was given to brlapi_enterTtyMode()) """ + cdef int retval + cdef c_brlapi.brlapi_range_t *c_keys + cdef unsigned int c_n + c_n = len(keys) + c_keys = c_brlapi.malloc(c_n * sizeof(c_keys[0])) + for i from 0 <= i < c_n: + c_keys[i].first = keys[i][0] + c_keys[i].last = keys[i][1] + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__ignoreKeyRanges(self.h, c_keys, c_n) + c_brlapi.Py_END_ALLOW_THREADS + c_brlapi.free(c_keys) + if retval == -1: + raise OperationError() + else: + return retval + + def acceptKeyRanges(self, keys): + """Accept some key presses from the braille keyboard. + See brlapi_acceptKeyRanges(3). + + This function asks the server to return the provided key ranges (inclusive) to the application, and not give them to brltty. + + The given codes should be raw keycodes (i.e. some driver name was given to brlapi_enterTtyMode()) """ + cdef int retval + cdef c_brlapi.brlapi_range_t *c_keys + cdef unsigned int c_n + c_n = len(keys) + c_keys = c_brlapi.malloc(c_n * sizeof(c_keys[0])) + for i from 0 <= i < c_n: + c_keys[i].first = keys[i][0] + c_keys[i].last = keys[i][1] + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__acceptKeyRanges(self.h, c_keys, c_n) + c_brlapi.Py_END_ALLOW_THREADS + c_brlapi.free(c_keys) + if retval == -1: + raise OperationError() + else: + return retval + + def enterRawMode(self, driver): + """Switch to Raw mode + See brlapi_enterRawMode(3). + + * driver : Specifies the name of the driver for which the raw communication will be established""" + cdef int retval + cdef char *c_driver + c_driver = driver + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__enterRawMode(self.h, c_driver) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + + def leaveRawMode(self): + """leave Raw mode + See brlapi_leaveRawMode(3).""" + cdef int retval + c_brlapi.Py_BEGIN_ALLOW_THREADS + retval = c_brlapi.brlapi__leaveRawMode(self.h) + c_brlapi.Py_END_ALLOW_THREADS + if retval == -1: + raise OperationError() + else: + return retval + diff --git a/grub-core/braille/brltty/Bindings/Python/c_brlapi.pxd b/grub-core/braille/brltty/Bindings/Python/c_brlapi.pxd new file mode 100644 index 000000000..c0a554512 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/c_brlapi.pxd @@ -0,0 +1,121 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +# File binding C functions + +cdef extern from "sys/types.h": + ctypedef int size_t + +cdef extern from "Programs/brlapi.h": + ctypedef struct brlapi_connectionSettings_t: + char *auth + char *host + + ctypedef struct brlapi_writeArguments_t: + int displayNumber + unsigned int regionBegin + unsigned int regionSize + char *text + int textSize + unsigned char *andMask + unsigned char *orMask + int cursor + char *charset + + ctypedef struct brlapi_expandedKeyCode_t: + unsigned int type + unsigned int command + unsigned int argument + unsigned int flags + + ctypedef struct brlapi_error_t: + int brlerrno + int libcerrno + int gaierrno + char *errfun + + brlapi_error_t brlapi_error + + ctypedef struct brlapi_handle_t + + ctypedef unsigned long long brlapi_keyCode_t + + size_t brlapi_getHandleSize() + void brlapi__closeConnection(brlapi_handle_t *) + int brlapi__openConnection(brlapi_handle_t *, brlapi_connectionSettings_t*, brlapi_connectionSettings_t*) + + int brlapi__getDisplaySize(brlapi_handle_t *, unsigned int*, unsigned int *y) + int brlapi__getDriverName(brlapi_handle_t *, char*, int) + + int brlapi__enterTtyMode(brlapi_handle_t *, int, char*) + int brlapi__enterTtyModeWithPath(brlapi_handle_t *, int *, int, char*) + int brlapi__leaveTtyMode(brlapi_handle_t *) + int brlapi__setFocus(brlapi_handle_t *, int) + + int brlapi__write(brlapi_handle_t *, brlapi_writeArguments_t*) + int brlapi__writeDots(brlapi_handle_t *, unsigned char*) + int brlapi__writeText(brlapi_handle_t *, int, char*) + + ctypedef enum brlapi_rangeType_t: + brlapi_rangeType_all + + ctypedef struct brlapi_range_t: + brlapi_keyCode_t first + brlapi_keyCode_t last + + int brlapi__ignoreKeys(brlapi_handle_t *, brlapi_rangeType_t, brlapi_keyCode_t *, unsigned int) + int brlapi__acceptKeys(brlapi_handle_t *, brlapi_rangeType_t, brlapi_keyCode_t *, unsigned int) + int brlapi__ignoreAllKeys(brlapi_handle_t *) + int brlapi__acceptAllKeys(brlapi_handle_t *) + int brlapi__ignoreKeyRanges(brlapi_handle_t *, brlapi_range_t *, unsigned int) + int brlapi__acceptKeyRanges(brlapi_handle_t *, brlapi_range_t *, unsigned int) + int brlapi__readKey(brlapi_handle_t *, int, brlapi_keyCode_t*) + int brlapi_expandKeyCode(brlapi_keyCode_t, brlapi_expandedKeyCode_t *) + + int brlapi__enterRawMode(brlapi_handle_t *, char*) + int brlapi__leaveRawMode(brlapi_handle_t *) + int brlapi__recvRaw(brlapi_handle_t *, void*, int) + int brlapi__sendRaw(brlapi_handle_t *, void*, int) + + brlapi_error_t* brlapi_error_location() + char* brlapi_strerror(brlapi_error_t*) + brlapi_keyCode_t BRLAPI_KEY_MAX + brlapi_keyCode_t BRLAPI_KEY_FLAGS_MASK + brlapi_keyCode_t BRLAPI_KEY_TYPE_MASK + brlapi_keyCode_t BRLAPI_KEY_CODE_MASK + brlapi_keyCode_t BRLAPI_KEY_CMD_BLK_MASK + brlapi_keyCode_t BRLAPI_KEY_CMD_ARG_MASK + +cdef extern from "bindings.h": + brlapi_writeArguments_t brlapi_writeArguments_initialized + char *brlapi_protocolException() + void brlapi_protocolExceptionInit(brlapi_handle_t *) + +cdef extern from "stdlib.h": + void *malloc(size_t) + void free(void*) + char *strdup(char *) + +cdef extern from "string.h": + void *memcpy(void *, void *, size_t) + +cdef extern from "Python.h": + # these are macros, we just need to make Pyrex aware of them + int Py_BEGIN_ALLOW_THREADS + int Py_END_ALLOW_THREADS diff --git a/grub-core/braille/brltty/Bindings/Python/constants.awk b/grub-core/braille/brltty/Bindings/Python/constants.awk new file mode 100644 index 000000000..c5fd39236 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/constants.awk @@ -0,0 +1,108 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +function brlCommand(name, symbol, value, help) { + writeCommandDefinition(name, value, help) +} + +function brlBlock(name, symbol, value, help) { + if (name == "PASSCHAR") return + if (name == "PASSKEY") return + + if (value ~ /^0[xX][0-9a-fA-F]+00$/) { + writeCommandDefinition(name, tolower(value) "00", help) + } +} + +function brlKey(name, symbol, value, help) { +} + +function brlFlag(name, symbol, value, help) { + if (value ~ /^0[xX][0-9a-fA-F]+0000$/) { + value = tolower(substr(value, 1, length(value)-4)) + if (name ~ /^CHAR_/) { + name = substr(name, 6) + } else { + value = value "00" + } + } else if (value ~ /^\(/) { + gsub("BRL_FLG_", "KEY_FLG_", value) + } else { + return + } + writePythonAssignment("KEY_FLG_" name, value, help) +} + +function brlDot(number, symbol, value, help) { + writePythonAssignment("DOT" number, value, help) +} + +function apiConstant(name, symbol, value, help) { + writePythonAssignment(name, value, help) +} + +function apiMask(name, symbol, value, help) { + writePythonAssignment("KEY_" name, "c_brlapi." symbol, help) +} + +function apiShift(name, symbol, value, help) { + value = hexadecimalValue(value) + writePythonAssignment("KEY_" name, value, help) +} + +function apiType(name, symbol, value, help) { + value = hexadecimalValue(value) + writePythonAssignment("KEY_TYPE_" name, value, help) +} + +function apiKey(name, symbol, value, help) { + value = hexadecimalValue(value) + + if (name == "FUNCTION") { + for (i=0; i<35; ++i) { + key = "F" (i+1) + writeKeyDefinition(key, "(" value " + " i ")", "the " key " key") + } + } else { + writeKeyDefinition(name, value, help) + } +} + +function apiRangeType(name, symbol, value, help) { + writePythonAssignment("rangeType_" name, value, help) +} + +function writeCommandDefinition(name, value, help) { + writePythonAssignment("KEY_CMD_" name, value, help) +} + +function writeKeyDefinition(name, value, help) { + writePythonAssignment("KEY_SYM_" name, value, help) +} + +function writePythonAssignment(name, value, help) { + if (length(help) > 0) print "## " help + print name " = " value +} + +function hexadecimalValue(value) { + value = tolower(value) + return value +} + diff --git a/grub-core/braille/brltty/Bindings/Python/mkdoc.py b/grub-core/braille/brltty/Bindings/Python/mkdoc.py new file mode 100644 index 000000000..e094e10e4 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/mkdoc.py @@ -0,0 +1,26 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +import sys +from distutils.util import get_platform +import pydoc + +if __name__ == "__main__": + sys.path.insert(1, 'build/lib.' + get_platform() + '-' + sys.version[0:3]) + pydoc.writedoc('brlapi') diff --git a/grub-core/braille/brltty/Bindings/Python/reldeps.mk b/grub-core/braille/brltty/Bindings/Python/reldeps.mk new file mode 100644 index 000000000..021940775 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/reldeps.mk @@ -0,0 +1,12 @@ +# Dependencies for bindings.$O: +bindings.$O: $(SRC_DIR)/bindings.c +bindings.$O: $(BLD_TOP)Programs/brlapi.h +bindings.$O: $(BLD_TOP)Programs/brlapi_constants.h +bindings.$O: $(SRC_TOP)Programs/brlapi_keycodes.h +bindings.$O: $(SRC_TOP)Programs/timing.h +bindings.$O: $(SRC_TOP)Programs/win_pthread.h +bindings.$O: $(BLD_TOP)config.h +bindings.$O: $(SRC_TOP)prologue.h +bindings.$O: $(SRC_TOP)Programs/win_errno.h +bindings.$O: $(SRC_DIR)/bindings.h + diff --git a/grub-core/braille/brltty/Bindings/Python/setup.py b/grub-core/braille/brltty/Bindings/Python/setup.py new file mode 100644 index 000000000..9c8335a71 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/setup.py @@ -0,0 +1,40 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +from distutils.core import setup, Extension + +if __name__ == "__main__": + brlapi = Extension("brlapi", + sources = ["brlapi.auto.c","./bindings.c"], + include_dirs = [".", ".", "./../../Programs", "./../../Programs", "./../../", "./../../"], + library_dirs = ["./../../Programs"], + libraries = ["brlapi"], + language = "c", + define_macros = [], + extra_compile_args = "-Wno-parentheses -Wno-unused -fno-strict-aliasing -U_POSIX_C_SOURCE -U_XOPEN_SOURCE".split()) + + setup( + name = "Brlapi", + version = "0.5.5", + description = "Python BrlAPI", + author = "Alexis Robert", + author_email = "alexissoft@free.fr", + license = "LGPL license", + url = "http://mielke.cc/brltty/", + ext_modules = [brlapi],) diff --git a/grub-core/braille/brltty/Bindings/Python/setup.py.in b/grub-core/braille/brltty/Bindings/Python/setup.py.in new file mode 100644 index 000000000..447b5bd11 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Python/setup.py.in @@ -0,0 +1,40 @@ +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2005-2012 by +# Alexis Robert +# Samuel Thibault +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +from distutils.core import setup, Extension + +if __name__ == "__main__": + brlapi = Extension("brlapi", + sources = ["brlapi.auto.c","@srcdir@/bindings.c"], + include_dirs = ["@builddir@", "@srcdir@", "./@top_builddir@/Programs", "./@top_srcdir@/Programs", "./@top_builddir@/", "./@top_srcdir@/"], + library_dirs = ["./@top_builddir@/Programs"], + libraries = ["brlapi"], + language = "c", + define_macros = [], + extra_compile_args = "@PYREXC_CFLAGS@".split()) + + setup( + name = "Brlapi", + version = "@api_release@", + description = "Python BrlAPI", + author = "Alexis Robert", + author_email = "alexissoft@free.fr", + license = "LGPL license", + url = "http://mielke.cc/brltty/", + ext_modules = [brlapi],) diff --git a/grub-core/braille/brltty/Bindings/Tcl/apitest b/grub-core/braille/brltty/Bindings/Tcl/apitest new file mode 100644 index 000000000..1f28db1a6 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Tcl/apitest @@ -0,0 +1,27 @@ +#!/bin/bash -p +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by Dave Mielke +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +programName="$(basename "${0}")" +programDirectory="$(cd "$(dirname "${0}")" && pwd)" +currentDirectory="$(pwd)" + +export LD_LIBRARY_PATH="${currentDirectory}" +export LD_PRELOAD="${currentDirectory}/../../Programs/libbrlapi.so" + +exec tclsh "${programDirectory}/${programName}.tcl" "${@}" +exit "${?}" diff --git a/grub-core/braille/brltty/Bindings/Tcl/apitest.tcl b/grub-core/braille/brltty/Bindings/Tcl/apitest.tcl new file mode 100644 index 000000000..8aa5b5b19 --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Tcl/apitest.tcl @@ -0,0 +1,63 @@ +#!/usr/bin/env tclsh +############################################################################### +# libbrlapi - A library providing access to braille terminals for applications. +# +# Copyright (C) 2006-2012 by Dave Mielke +# +# libbrlapi comes with ABSOLUTELY NO WARRANTY. +# +# This is free software, placed under the terms of the +# GNU Lesser General Public License, as published by the Free Software +# Foundation; either version 2.1 of the License, or (at your option) any +# later version. Please see the file LICENSE-LGPL for details. +# +# Web Page: http://mielke.cc/brltty/ +# +# This software is maintained by Dave Mielke . +############################################################################### + +source [file join [file dirname $argv0] prologue.tcl] +processProgramOptions optionValues { + {host string "where the BrlAPI server is [name][:port]"} +} + +load libbrlapi_tcl.so + +proc expandList {list args} { + set result "" + set delimiter "" + foreach field $args value $list { + append result "$delimiter$field=$value" + set delimiter " " + } + return $result +} + +set connectionSettings [list] +if {[info exists optionValues(host)]} { + lappend connectionSettings -host $optionValues(host) +} +set session [eval brlapi openConnection $connectionSettings] +puts "Object: $session" + +set host [$session getHost] +puts "Host: $host" + +set auth [$session getAuth] +puts "Auth: $auth" + +set fileDescriptor [$session getFileDescriptor] +puts "FileDescriptor: $fileDescriptor" + +set driverName [$session getDriverName] +puts "DriverName: $driverName" + +set displaySize [$session getDisplaySize] +puts "DisplaySize: [expandList $displaySize width height]" + +set tty [$session enterTtyMode] +puts "Tty: $tty" + +$session leaveTtyMode +$session closeConnection; unset session +exit 0 diff --git a/grub-core/braille/brltty/Bindings/Tcl/bindings.c b/grub-core/braille/brltty/Bindings/Tcl/bindings.c new file mode 100644 index 000000000..cdc1a190f --- /dev/null +++ b/grub-core/braille/brltty/Bindings/Tcl/bindings.c @@ -0,0 +1,1333 @@ +/* + * libbrlapi - A library providing access to braille terminals for applications. + * + * Copyright (C) 2006-2012 by Dave Mielke + * + * libbrlapi comes with ABSOLUTELY NO WARRANTY. + * + * This is free software, placed under the terms of the + * GNU Lesser General Public License, as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any + * later version. Please see the file LICENSE-LGPL for details. + * + * Web Page: http://mielke.cc/brltty/ + * + * This software is maintained by Dave Mielke . + */ + +#include +#include +#include + +#include +#include "brldots.h" + +#define BRLAPI_NO_DEPRECATED +#define BRLAPI_NO_SINGLE_SESSION +#include "brlapi.h" + +#define allocateMemory(size) ((void *)ckalloc((size))) +#define deallocateMemory(address) ckfree((void *)(address)) + +#define SET_ARRAY_ELEMENT(element, object) \ +do { \ + const char *name = (element); \ + Tcl_Obj *value = (object); \ + Tcl_Obj *result; \ + Tcl_IncrRefCount(value); \ + result = Tcl_SetVar2Ex(interp, array, name, value, TCL_LEAVE_ERR_MSG); \ + Tcl_DecrRefCount(value); \ + if (!result) return TCL_ERROR; \ +} while (0) + +typedef struct { + brlapi_connectionSettings_t settings; + brlapi_handle_t *handle; + brlapi_fileDescriptor fileDescriptor; +} BrlapiSession; + +static void +setIntResult (Tcl_Interp *interp, int value) { + Tcl_SetIntObj(Tcl_GetObjResult(interp), value); +} + +static void +setWideIntResult (Tcl_Interp *interp, Tcl_WideInt value) { + Tcl_SetWideIntObj(Tcl_GetObjResult(interp), value); +} + +static void +setStringResult (Tcl_Interp *interp, const char *string, int length) { + Tcl_SetStringObj(Tcl_GetObjResult(interp), string, length); +} + +static void +setStringsResult (Tcl_Interp *interp, ...) { + va_list arguments; + va_start(arguments, interp); + Tcl_AppendStringsToObjVA(Tcl_GetObjResult(interp), arguments); + va_end(arguments); +} + +static void +setByteArrayResult (Tcl_Interp *interp, const unsigned char *bytes, int count) { + Tcl_SetByteArrayObj(Tcl_GetObjResult(interp), bytes, count); +} + +static void +setBrlapiError (Tcl_Interp *interp) { + const char *text = brlapi_strerror(&brlapi_error); + const char *name; + int number; + + switch (brlapi_error.brlerrno) { + case BRLAPI_ERROR_LIBCERR: + name = "LIBC"; + number = brlapi_error.libcerrno; + break; + + case BRLAPI_ERROR_GAIERR: + name = "GAI"; + number = brlapi_error.gaierrno; + break; + + default: + name = "BRL"; + number = brlapi_error.brlerrno; + break; + } + + { + Tcl_Obj *const elements[] = { + Tcl_NewStringObj("BrlAPI", -1), + Tcl_NewStringObj(name, -1), + Tcl_NewIntObj(number), + Tcl_NewStringObj(text, -1) + }; + Tcl_SetObjErrorCode(interp, Tcl_NewListObj(4, elements)); + } + + setStringResult(interp, text, -1); +} + +static int +getDisplaySize ( + Tcl_Interp *interp, BrlapiSession *session, + unsigned int *width, unsigned int *height +) { + if (brlapi__getDisplaySize(session->handle, width, height) != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; +} + +#define OPTION_HANDLER_RETURN int +#define OPTION_HANDLER_PARAMETERS (Tcl_Interp *interp, Tcl_Obj *const objv[], void *data) +#define OPTION_HANDLER_NAME(command,function,option) optionHandler_##command##_##function##_##option +#define OPTION_HANDLER(command,function,option) \ + static OPTION_HANDLER_RETURN \ + OPTION_HANDLER_NAME(command, function, option) \ + OPTION_HANDLER_PARAMETERS + +typedef OPTION_HANDLER_RETURN (*OptionHandler) OPTION_HANDLER_PARAMETERS; + +typedef struct { + const char *name; + OptionHandler handler; + int operands; + const char *help; +} OptionEntry; + +static void +makeOptionNames (const OptionEntry *options, const char ***names) { + if (!*names) { + const OptionEntry *option = options; + const char **name; + while (option->name) ++option; + *names = name = allocateMemory(((option - options) + 1) * sizeof(*name)); + option = options; + while (option->name) *name++ = option++->name; + *name = NULL; + } +} + +static int +processOptions ( + Tcl_Interp *interp, void *data, + Tcl_Obj *const objv[], int objc, int start, + const OptionEntry *options, const char ***names +) { + makeOptionNames(options, names); + + objv += start; + objc -= start; + + while (objc > 0) { + int index; + { + int result = Tcl_GetIndexFromObj(interp, objv[0], *names, "option", 0, &index); + if (result != TCL_OK) return result; + } + + { + const OptionEntry *option = &options[index]; + int count = option->operands + 1; + + if (count > objc) { + Tcl_WrongNumArgs(interp, 1, objv, option->help); + return TCL_ERROR; + } + + { + int result = option->handler(interp, objv, data); + if (result != TCL_OK) return result; + } + + objv += count; + objc -= count; + } + } + + return TCL_OK; +} + +#define BEGIN_OPTIONS { static const OptionEntry optionTable[] = { +#define END_OPTIONS(start) \ + , {.name = NULL} }; \ + static const char **optionNames = NULL; \ + int result = processOptions(interp, &options, objv, objc, (start), optionTable, &optionNames); \ + if (result != TCL_OK) return result; \ +} +#define OPTION(command,function,option) \ + .name = "-" #option, .handler = OPTION_HANDLER_NAME(command, function, option) +#define OPERANDS(count,text) \ + .operands = (count), .help = ((count)? (text): NULL) + +static int +parseCursorOperand (Tcl_Interp *interp, Tcl_Obj *obj, int *cursor) { + const char *string = Tcl_GetString(obj); + + if (strcmp(string, "off") == 0) { + *cursor = BRLAPI_CURSOR_OFF; + } else if (strcmp(string, "leave") == 0) { + *cursor = BRLAPI_CURSOR_LEAVE; + } else { + int number; + int result = Tcl_GetIntFromObj(interp, obj, &number); + if (result != TCL_OK) return result; + if (number < 1) number = 1; + *cursor = number; + } + + return TCL_OK; +} + +typedef struct { + int tty; + const char *driver; +} FunctionData_session_enterTtyMode; + +OPTION_HANDLER(session, enterTtyMode, events) { + FunctionData_session_enterTtyMode *options = data; + options->driver = Tcl_GetString(objv[1]); + return TCL_OK; +} + +OPTION_HANDLER(session, enterTtyMode, keyCodes) { + FunctionData_session_enterTtyMode *options = data; + options->driver = NULL; + return TCL_OK; +} + +OPTION_HANDLER(session, enterTtyMode, tty) { + FunctionData_session_enterTtyMode *options = data; + Tcl_Obj *obj = objv[1]; + const char *string = Tcl_GetString(obj); + + if (strcmp(string, "default") == 0) { + options->tty = BRLAPI_TTY_DEFAULT; + } else { + int result = Tcl_GetIntFromObj(interp, obj, &options->tty); + if (result != TCL_OK) return result; + } + + return TCL_OK; +} + +typedef struct { + Tcl_Obj *path; + const char *driver; +} FunctionData_session_enterTtyModeWithPath; + +OPTION_HANDLER(session, enterTtyModeWithPath, events) { + FunctionData_session_enterTtyModeWithPath *options = data; + options->driver = Tcl_GetString(objv[1]); + return TCL_OK; +} + +OPTION_HANDLER(session, enterTtyModeWithPath, keyCodes) { + FunctionData_session_enterTtyModeWithPath *options = data; + options->driver = NULL; + return TCL_OK; +} + +OPTION_HANDLER(session, enterTtyModeWithPath, path) { + FunctionData_session_enterTtyModeWithPath *options = data; + options->path = objv[1]; + return TCL_OK; +} + +typedef struct { + brlapi_writeArguments_t arguments; + Tcl_Obj *textObject; + int textLength; + int andLength; + int orLength; +} FunctionData_session_write; + +OPTION_HANDLER(session, write, andMask) { + FunctionData_session_write *options = data; + options->arguments.andMask = Tcl_GetByteArrayFromObj(objv[1], &options->andLength); + if (!options->andLength) options->arguments.andMask = NULL; + return TCL_OK; +} + +OPTION_HANDLER(session, write, begin) { + FunctionData_session_write *options = data; + int offset; + + { + int result = Tcl_GetIntFromObj(interp, objv[1], &offset); + if (result != TCL_OK) return result; + } + + if (offset < 0) offset = 0; + options->arguments.regionBegin = offset; + return TCL_OK; +} + +OPTION_HANDLER(session, write, cursor) { + FunctionData_session_write *options = data; + return parseCursorOperand(interp, objv[1], &options->arguments.cursor); +} + +OPTION_HANDLER(session, write, displayNumber) { + FunctionData_session_write *options = data; + Tcl_Obj *obj = objv[1]; + const char *string = Tcl_GetString(obj); + + if (strcmp(string, "default") == 0) { + options->arguments.displayNumber = BRLAPI_DISPLAY_DEFAULT; + } else { + int number; + int result = Tcl_GetIntFromObj(interp, obj, &number); + if (result != TCL_OK) return result; + if (number < 0) number = 0; + options->arguments.displayNumber = number; + } + + return TCL_OK; +} + +OPTION_HANDLER(session, write, orMask) { + FunctionData_session_write *options = data; + options->arguments.orMask = Tcl_GetByteArrayFromObj(objv[1], &options->orLength); + if (!options->orLength) options->arguments.orMask = NULL; + return TCL_OK; +} + +OPTION_HANDLER(session, write, text) { + FunctionData_session_write *options = data; + options->textObject = objv[1]; + options->textLength = Tcl_GetCharLength(options->textObject); + if (!options->textLength) options->textObject = NULL; + return TCL_OK; +} + +static void +endSession (ClientData data) { + BrlapiSession *session = data; + brlapi__closeConnection(session->handle); + deallocateMemory(session->handle); + deallocateMemory(session); +} + +static int +brlapiSessionCommand (ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + static const char *functions[] = { + "acceptKeyRanges", + "acceptKeys", + "closeConnection", + "enterRawMode", + "enterTtyMode", + "enterTtyModeWithPath", + "getAuth", + "getDisplaySize", + "getDriverName", + "getFileDescriptor", + "getHost", + "ignoreKeyRanges", + "ignoreKeys", + "leaveRawMode", + "leaveTtyMode", + "readKey", + "recvRaw", + "resumeDriver", + "sendRaw", + "setFocus", + "suspendDriver", + "write", + "writeDots", + NULL + }; + + typedef enum { + FCN_acceptKeyRanges, + FCN_acceptKeys, + FCN_closeConnection, + FCN_enterRawMode, + FCN_enterTtyMode, + FCN_enterTtyModeWithPath, + FCN_getAuth, + FCN_getDisplaySize, + FCN_getDriverName, + FCN_getFileDescriptor, + FCN_getHost, + FCN_ignoreKeyRanges, + FCN_ignoreKeys, + FCN_leaveRawMode, + FCN_leaveTtyMode, + FCN_readKey, + FCN_recvRaw, + FCN_resumeDriver, + FCN_sendRaw, + FCN_setFocus, + FCN_suspendDriver, + FCN_write, + FCN_writeDots + } Function; + + BrlapiSession *session = data; + int function; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, " [ ...]"); + return TCL_ERROR; + } + + { + int result = Tcl_GetIndexFromObj(interp, objv[1], functions,"function", 0, &function); + if (result != TCL_OK) return result; + } + + switch (function) { + case FCN_getHost: { + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + setStringResult(interp, session->settings.host, -1); + return TCL_OK; + } + + case FCN_getAuth: { + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + setStringResult(interp, session->settings.auth, -1); + return TCL_OK; + } + + case FCN_getFileDescriptor: { + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + setIntResult(interp, session->fileDescriptor); + return TCL_OK; + } + + case FCN_getDriverName: { + size_t size = 0X10; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + while (1) { + char buffer[size]; + int result = brlapi__getDriverName(session->handle, buffer, size); + + if (result == -1) { + setBrlapiError(interp); + return TCL_ERROR; + } + + if (result <= size) { + setStringResult(interp, buffer, result-1); + return TCL_OK; + } + + size = result; + } + } + + case FCN_getDisplaySize: { + unsigned int width, height; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + { + int result = getDisplaySize(interp, session, &width, &height); + if (result != TCL_OK) return result; + } + + { + Tcl_Obj *const elements[] = { + Tcl_NewIntObj(width), + Tcl_NewIntObj(height) + }; + Tcl_SetObjResult(interp, Tcl_NewListObj(2, elements)); + } + return TCL_OK; + } + + case FCN_enterTtyMode: { + FunctionData_session_enterTtyMode options = { + .tty = BRLAPI_TTY_DEFAULT, + .driver = NULL + }; + + BEGIN_OPTIONS + { + OPTION(session, enterTtyMode, events), + OPERANDS(1, "") + } + , + { + OPTION(session, enterTtyMode, keyCodes), + OPERANDS(0, "") + } + , + { + OPTION(session, enterTtyMode, tty), + OPERANDS(1, "{default | }") + } + END_OPTIONS(2) + + { + int result = brlapi__enterTtyMode(session->handle, options.tty, options.driver); + + if (result == -1) { + setBrlapiError(interp); + return TCL_ERROR; + } + + setIntResult(interp, result); + return TCL_OK; + } + } + + case FCN_enterTtyModeWithPath: { + FunctionData_session_enterTtyModeWithPath options = { + .path = NULL, + .driver = NULL + }; + Tcl_Obj **elements; + int count; + + BEGIN_OPTIONS + { + OPTION(session, enterTtyModeWithPath, events), + OPERANDS(1, "") + } + , + { + OPTION(session, enterTtyModeWithPath, keyCodes), + OPERANDS(0, "") + } + , + { + OPTION(session, enterTtyModeWithPath, path), + OPERANDS(1, "") + } + END_OPTIONS(2) + + if (options.path) { + int result = Tcl_ListObjGetElements(interp, options.path, &count, &elements); + if (result != TCL_OK) return result; + } else { + count = 0; + } + + if (count) { + int path[count]; + int index; + + for (index=0; indexhandle, path, count, options.driver) != -1) return TCL_OK; + } else if (brlapi__enterTtyModeWithPath(session->handle, NULL, 0, options.driver) != -1) { + return TCL_OK; + } + + setBrlapiError(interp); + return TCL_ERROR; + } + + case FCN_leaveTtyMode: { + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + if (brlapi__leaveTtyMode(session->handle) != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + + case FCN_setFocus: { + int tty; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, ""); + return TCL_ERROR; + } + + { + int result = Tcl_GetIntFromObj(interp, objv[2], &tty); + if (result != TCL_OK) return result; + } + + if (brlapi__setFocus(session->handle, tty) != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + + case FCN_readKey: { + int wait; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, ""); + return TCL_ERROR; + } + + { + int result = Tcl_GetBooleanFromObj(interp, objv[2], &wait); + if (result != TCL_OK) return result; + } + + { + brlapi_keyCode_t key; + int result = brlapi__readKey(session->handle, wait, &key); + + if (result == -1) { + setBrlapiError(interp); + return TCL_ERROR; + } + + if (result == 1) setWideIntResult(interp, key); + return TCL_OK; + } + } + + { + int ignore; + brlapi_rangeType_t rangeType; + Tcl_Obj *codeList; + + case FCN_acceptKeys: + ignore = 0; + goto doKeys; + + case FCN_ignoreKeys: + ignore = 1; + + doKeys: + if ((objc < 3) || (objc > 4)) { + Tcl_WrongNumArgs(interp, 2, objv, " []"); + return TCL_ERROR; + } + + { + static const char *rangeNames[] = { + "all", + "code", + "command", + "key", + "type", + NULL + }; + + static const brlapi_rangeType_t rangeTypes[] = { + brlapi_rangeType_all, + brlapi_rangeType_code, + brlapi_rangeType_command, + brlapi_rangeType_key, + brlapi_rangeType_type + }; + + int rangeIndex; + int result = Tcl_GetIndexFromObj(interp, objv[2], rangeNames, "range type", 0, &rangeIndex); + if (result != TCL_OK) return result; + rangeType = rangeTypes[rangeIndex]; + } + + if (objc < 4) { + codeList = NULL; + } else { + codeList = objv[3]; + } + + if (rangeType != brlapi_rangeType_all) { + Tcl_Obj **codeElements; + int codeCount; + + if (!codeList) { + setStringResult(interp, "no key code list", -1); + return TCL_ERROR; + } + + { + int result = Tcl_ListObjGetElements(interp, codeList, &codeCount, &codeElements); + if (result != TCL_OK) return result; + } + + if (codeCount) { + brlapi_keyCode_t codes[codeCount]; + int codeIndex; + + for (codeIndex=0; codeIndexhandle, rangeType, codes, codeCount): + brlapi__acceptKeys(session->handle, rangeType, codes, codeCount); + if (result != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + } + } else if (codeList) { + setStringResult(interp, "unexpected key code list", -1); + return TCL_ERROR; + } + + { + int result = ignore? brlapi__ignoreKeys(session->handle, rangeType, NULL, 0): + brlapi__acceptKeys(session->handle, rangeType, NULL, 0); + if (result != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + } + + { + int ignore; + Tcl_Obj **rangeElements; + int rangeCount; + + case FCN_acceptKeyRanges: + ignore = 0; + goto doKeyRanges; + + case FCN_ignoreKeyRanges: + ignore = 1; + + doKeyRanges: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, ""); + return TCL_ERROR; + } + + { + int result = Tcl_ListObjGetElements(interp, objv[2], &rangeCount, &rangeElements); + if (result != TCL_OK) return result; + } + + if (rangeCount) { + brlapi_range_t ranges[rangeCount]; + int rangeIndex; + + for (rangeIndex=0; rangeIndexfirst = codes[0]; + range->last = codes[1]; + } + } + + { + int result = ignore? brlapi__ignoreKeyRanges(session->handle, ranges, rangeCount): + brlapi__acceptKeyRanges(session->handle, ranges, rangeCount); + if (result != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + } + + { + int result = ignore? brlapi__ignoreKeyRanges(session->handle, NULL, 0): + brlapi__acceptKeyRanges(session->handle, NULL, 0); + if (result != -1) return TCL_OK; + setBrlapiError(interp); + return TCL_ERROR; + } + } + + case FCN_write: { + FunctionData_session_write options = { + .arguments = BRLAPI_WRITEARGUMENTS_INITIALIZER + }; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 2, objv, "[