~ubuntu-branches/ubuntu/karmic/brltty/karmic

« back to all changes in this revision

Viewing changes to Documents/BrlAPIref/man/man3/brlapi_tty.3

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-05-28 09:56:12 UTC
  • mfrom: (1.1.7 upstream) (2.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090528095612-yt0urjjk7mdghsro
Tags: 4.0-6ubuntu1
* Merge from debian unstable, remaining changes:
  - Conflicts: libbrlapi, libbrlapi-dev, libbrlapi1-dev.
  - Add brltty-setup, installed in both the udeb and the normal system.
  - Add initramfs integration to run brltty-setup if necessary before
    usplash starts.
  - Add ubiquity integration to propagate any brltty configuration to the
    target system.
  - Add udev rules and /lib/brltty/brltty.sh to the normal (non-udeb)
    package as well.
  - Enable brltty if /etc/default/brltty has RUN_BRLTTY=yes, which is set
    by the installer if brltty is configured; add a NEWS entry for
    upgraders.
  - Install udev rules with the same name (85-brltty.rules) in the udeb as
    in the deb.
  - Only copy the brltty config file from the initramfs if the md5sum differs.
  - Change maintainer to Ubuntu Accessibility Developers
    <ubuntu-accessibility-devel@lists.ubuntu.com>
  - Disable BrlTTY grabbing devices that use the FTDI USB to serial chip.
  - Remove the dh-lisp build-dependency, remove the cl-brlapi package, and
    adjust the brltty package description accordingly. dh-lisp is not
    in main.
  - Do not build the speechd package, speech-dispatcher is not in main.
  - Build for python 2.6.
  - Build against openjdk in Ubuntu.
  - Put udev rules file in /lib/udev/rules.d.
  - Enable brltty at startup on the target system if the alternate installer
    is used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "Entering & leaving tty mode" 3 "15 May 2009" "Version 1.0" "BrlAPI" \" -*- nroff -*-
 
2
.ad l
 
3
.nh
 
4
.SH NAME
 
5
Entering & leaving tty mode \- How to take control of ttys for direct braille display / read.  
 
6
 
 
7
.PP
 
8
.SS "Defines"
 
9
 
 
10
.in +1c
 
11
.ti -1c
 
12
.RI "#define \fBBRLAPI_TTY_DEFAULT\fP   -1"
 
13
.br
 
14
.in -1c
 
15
.SS "Functions"
 
16
 
 
17
.in +1c
 
18
.ti -1c
 
19
.RI "int BRLAPI_STDCALL \fBbrlapi_enterTtyMode\fP (int tty, const char *driver)"
 
20
.br
 
21
.ti -1c
 
22
.RI "int BRLAPI_STDCALL \fBbrlapi__enterTtyMode\fP (\fBbrlapi_handle_t\fP *handle, int tty, const char *driver)"
 
23
.br
 
24
.ti -1c
 
25
.RI "int BRLAPI_STDCALL \fBbrlapi_enterTtyModeWithPath\fP (int *ttys, int count, const char *driver)"
 
26
.br
 
27
.ti -1c
 
28
.RI "int BRLAPI_STDCALL \fBbrlapi__enterTtyModeWithPath\fP (\fBbrlapi_handle_t\fP *handle, int *ttys, int count, const char *driver)"
 
29
.br
 
30
.ti -1c
 
31
.RI "int BRLAPI_STDCALL \fBbrlapi_leaveTtyMode\fP (void)"
 
32
.br
 
33
.ti -1c
 
34
.RI "int BRLAPI_STDCALL \fBbrlapi__leaveTtyMode\fP (\fBbrlapi_handle_t\fP *handle)"
 
35
.br
 
36
.ti -1c
 
37
.RI "int BRLAPI_STDCALL \fBbrlapi_setFocus\fP (int tty)"
 
38
.br
 
39
.ti -1c
 
40
.RI "int BRLAPI_STDCALL \fBbrlapi__setFocus\fP (\fBbrlapi_handle_t\fP *handle, int tty)"
 
41
.br
 
42
.in -1c
 
43
.SH "Detailed Description"
 
44
.PP 
 
45
Before being able to write on the braille display, the application must tell the server which tty it will handle.
 
46
.PP
 
47
The application must also specify how braille keys will be delivered to it. Two ways are possible: key codes and commands:
 
48
.PP
 
49
.IP "\(bu" 2
 
50
key codes are specific to each braille driver, since the raw key code, as defined in the driver will be given for each key press. Using them leads to building highly driver-dependent applications, which can yet sometimes be useful to mimic existing proprietary applications for instance.
 
51
.IP "\(bu" 2
 
52
commands means that applications will get exactly the same values as \fIbrltty\fP. This allows driver-independent clients, which will hopefully be nice to use with a lot of different terminals. 
 
53
.PP
 
54
\fBSee also:\fP
 
55
.RS 4
 
56
\fBbrlapi_readKey()\fP 
 
57
.RE
 
58
.PP
 
59
 
 
60
.PP
 
61
 
 
62
.SH "Define Documentation"
 
63
.PP 
 
64
.SS "#define BRLAPI_TTY_DEFAULT   -1"
 
65
.PP
 
66
Select the default tty.
 
67
.PP
 
68
The library takes the following steps:
 
69
.IP "1." 4
 
70
Try to get the tty number from the \fCWINDOWID\fP environment variable (for the \fCxterm\fP case).
 
71
.IP "2." 4
 
72
Try to get the tty number from the \fCCONTROLVT\fP environment variable.
 
73
.IP "3." 4
 
74
Read \fC/proc/self/stat\fP (on \fCLinux\fP).
 
75
.PP
 
76
.PP
 
77
\fBSee also:\fP
 
78
.RS 4
 
79
\fBbrlapi_enterTtyMode()\fP 
 
80
.RE
 
81
.PP
 
82
 
 
83
.SH "Function Documentation"
 
84
.PP 
 
85
.SS "int BRLAPI_STDCALL brlapi__enterTtyMode (\fBbrlapi_handle_t\fP * handle, int tty, const char * driver)"
 
86
.PP
 
87
.SS "int BRLAPI_STDCALL brlapi__enterTtyModeWithPath (\fBbrlapi_handle_t\fP * handle, int * ttys, int count, const char * driver)"
 
88
.PP
 
89
.SS "int BRLAPI_STDCALL brlapi__leaveTtyMode (\fBbrlapi_handle_t\fP * handle)"
 
90
.PP
 
91
.SS "int BRLAPI_STDCALL brlapi__setFocus (\fBbrlapi_handle_t\fP * handle, int tty)"
 
92
.PP
 
93
.SS "int BRLAPI_STDCALL brlapi_enterTtyMode (int tty, const char * driver)"
 
94
.PP
 
95
Ask for some tty, with some key mechanism
 
96
.PP
 
97
\fBParameters:\fP
 
98
.RS 4
 
99
\fItty\fP 
 
100
.IP "\(bu" 2
 
101
If tty>=0 then take control of the specified tty.
 
102
.IP "\(bu" 2
 
103
If tty==\fBBRLAPI_TTY_DEFAULT\fP then take control of the default tty.
 
104
.PP
 
105
.br
 
106
\fIdriver\fP tells how the application wants \fBbrlapi_readKey()\fP to return key presses. NULL or '' means BRLTTY commands are required, whereas a driver name means that raw key codes returned by this driver are expected.
 
107
.RE
 
108
.PP
 
109
WINDOWPATH and WINDOWID should be propagated when running remote applications via ssh, for instance, along with BRLAPI_HOST and the authorization key (see SendEnv in ssh_config(5) and AcceptEnv in sshd_config(5))
 
110
.PP
 
111
\fBReturns:\fP
 
112
.RS 4
 
113
the used tty number on success, -1 on error
 
114
.RE
 
115
.PP
 
116
\fBSee also:\fP
 
117
.RS 4
 
118
\fBbrlapi_leaveTtyMode()\fP \fBbrlapi_readKey()\fP 
 
119
.RE
 
120
.PP
 
121
 
 
122
.SS "int BRLAPI_STDCALL brlapi_enterTtyModeWithPath (int * ttys, int count, const char * driver)"
 
123
.PP
 
124
Ask for some tty specified by its path in the tty tree, with some key mechanism
 
125
.PP
 
126
\fBParameters:\fP
 
127
.RS 4
 
128
\fIttys\fP points on the array of ttys representing the tty path to be got. Can be NULL if nttys is 0. 
 
129
.br
 
130
\fIcount\fP gives the number of elements in ttys. 
 
131
.br
 
132
\fIdriver\fP has the same meaning as in \fBbrlapi_enterTtyMode()\fP
 
133
.RE
 
134
.PP
 
135
Providing nttys == 0 means to get the root.
 
136
.PP
 
137
\fBSee also:\fP
 
138
.RS 4
 
139
\fBbrlapi_enterTtyMode()\fP 
 
140
.RE
 
141
.PP
 
142
 
 
143
.SS "int BRLAPI_STDCALL brlapi_leaveTtyMode (void)"
 
144
.PP
 
145
Stop controlling the tty
 
146
.PP
 
147
\fBReturns:\fP
 
148
.RS 4
 
149
0 on success, -1 on error.
 
150
.RE
 
151
.PP
 
152
\fBSee also:\fP
 
153
.RS 4
 
154
\fBbrlapi_enterTtyMode()\fP 
 
155
.RE
 
156
.PP
 
157
 
 
158
.SS "int BRLAPI_STDCALL brlapi_setFocus (int tty)"
 
159
.PP
 
160
Tell the current tty to brltty
 
161
.PP
 
162
This is intended for focus tellers, such as brltty, xbrlapi, screen, ... \fBbrlapi_enterTtyMode()\fP must have been called beforehand to tell where this focus applies in the tty tree.
 
163
.PP
 
164
\fBReturns:\fP
 
165
.RS 4
 
166
0 on success, -1 on error.
 
167
.RE
 
168
.PP
 
169
\fBSee also:\fP
 
170
.RS 4
 
171
\fBbrlapi_enterTtyMode()\fP \fBbrlapi_leaveTtyMode()\fP 
 
172
.RE
 
173
.PP
 
174