1/*
2 *      Authors:  Hadi Bargi Rangin  bargi@dots.physics.orst.edu
3 *                Bill Barry         barryb@dots.physics.orst.edu
4 *                Randy Lundquist    randyl@dots.physics.orst.edu
5 *
6 * Modifications Copyright (c) 1995 by
7 * Science Access Project, Oregon State University.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program (see the file COPYING); if not, write to the
21 * Free Software Foundation, Inc.,
22 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
23 *
24 ****************************************************************
25 * $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU
26 */
27
28#ifdef HAVE_BRAILLE
29
30extern void StartBraille __P((void));
31
32struct braille_display
33{
34  struct display *bd_dpy;	/* display we are connected to */
35  int   bd_start_braille;	/* screenrc var to request to turn braille on */
36  int   bd_using_braille;	/* all is fine, use braille */
37  struct event bd_readev;
38  struct event bd_writeev;
39  struct event bd_selectev;
40  int   bd_fd;		/* file descriptor */
41  int   bd_obuflen;	/* current number of charactors in output buffer */
42  char  bd_obuf[IOSIZE];
43  int   bd_info;	/* default, no info, 0,1,2,3 */
44  int   bd_ncrc;	/* default 1, numbers of cells on the right side of real cursor, 1...bd_width */
45  int   bd_skip;	/* default off, on/off */
46  int   bd_link;	/* default, linked, on/off */
47  int   bd_width;	/* length of braille display to use, <=bd_ncells */
48  int   bd_scroll;	/* default on, scroll on/off */
49  char *bd_braille_table;	/* braille code */
50
51  int   bd_bell;	/* bell used for navigation on/off */
52  int   bd_ncells;	/* real number of cells on braille display */
53  int   bd_eightdot;	/* eightdot on/off */
54  int   bd_baud;	/* communication baudrate between port and braille display */
55  char *bd_port;	/* serial port to use */
56  char *bd_type; 	/* kind of braille display */
57  double bd_version;	/* rom version of braille display */
58  char  bd_btable[256];	/* braille translation table */
59
60  /* functions which communicate with braille displays */
61  int (*write_line_braille) __P((char [],int, int));
62  void (*buttonpress) __P((void));
63  int (*bd_response_test) __P((void));
64
65  int   bd_refreshing;	/* are we doing a refresh? */
66  char  bd_line[40+1];	/* bd_ncells chars displayed on braille */
67  int   bd_cursorpos;	/* cursor position on braille */
68  char  bd_oline[40+1];	/* bd_ncells chars displayed on braille */
69  int   bd_sx, bd_sy;	/* screen cursor pos */
70  int   bd_moved;	/* used braille move keys */
71
72  int   bd_searching;	/* are we seaching (bd_skip is on) */
73  int   bd_searchmax;	/* search: max x */
74  int   bd_searchmin;	/* search: min x */
75  int   bd_searchstart;
76  int   bd_searchend;
77};
78
79extern struct braille_display bd;
80
81#define BD_FORE bd.bd_dpy->d_fore
82
83#endif
84