From 5a5e2352c9a01f9076994915188c26c6b9036202 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:28:28 +0200 Subject: Adding upstream version 4.9.0. Signed-off-by: Daniel Baumann --- braille.h | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 braille.h (limited to 'braille.h') diff --git a/braille.h b/braille.h new file mode 100644 index 0000000..266ad41 --- /dev/null +++ b/braille.h @@ -0,0 +1,83 @@ +/* + * Authors: Hadi Bargi Rangin bargi@dots.physics.orst.edu + * Bill Barry barryb@dots.physics.orst.edu + * Randy Lundquist randyl@dots.physics.orst.edu + * + * Modifications Copyright (c) 1995 by + * Science Access Project, Oregon State University. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (see the file COPYING); if not, see + * https://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + **************************************************************** + * $Id$ GNU + */ + +#ifdef HAVE_BRAILLE + +extern void StartBraille __P((void)); + +struct braille_display +{ + struct display *bd_dpy; /* display we are connected to */ + int bd_start_braille; /* screenrc var to request to turn braille on */ + int bd_using_braille; /* all is fine, use braille */ + struct event bd_readev; + struct event bd_writeev; + struct event bd_selectev; + int bd_fd; /* file descriptor */ + int bd_obuflen; /* current number of charactors in output buffer */ + char bd_obuf[IOSIZE]; + int bd_info; /* default, no info, 0,1,2,3 */ + int bd_ncrc; /* default 1, numbers of cells on the right side of real cursor, 1...bd_width */ + int bd_skip; /* default off, on/off */ + int bd_link; /* default, linked, on/off */ + int bd_width; /* length of braille display to use, <=bd_ncells */ + int bd_scroll; /* default on, scroll on/off */ + char *bd_braille_table; /* braille code */ + + int bd_bell; /* bell used for navigation on/off */ + int bd_ncells; /* real number of cells on braille display */ + int bd_eightdot; /* eightdot on/off */ + int bd_baud; /* communication baudrate between port and braille display */ + char *bd_port; /* serial port to use */ + char *bd_type; /* kind of braille display */ + double bd_version; /* rom version of braille display */ + char bd_btable[256]; /* braille translation table */ + + /* functions which communicate with braille displays */ + int (*write_line_braille) __P((char [],int, int)); + void (*buttonpress) __P((void)); + int (*bd_response_test) __P((void)); + + int bd_refreshing; /* are we doing a refresh? */ + char bd_line[40+1]; /* bd_ncells chars displayed on braille */ + int bd_cursorpos; /* cursor position on braille */ + char bd_oline[40+1]; /* bd_ncells chars displayed on braille */ + int bd_sx, bd_sy; /* screen cursor pos */ + int bd_moved; /* used braille move keys */ + + int bd_searching; /* are we seaching (bd_skip is on) */ + int bd_searchmax; /* search: max x */ + int bd_searchmin; /* search: min x */ + int bd_searchstart; + int bd_searchend; +}; + +extern struct braille_display bd; + +#define BD_FORE bd.bd_dpy->d_fore + +#endif -- cgit v1.2.3