table of contents
other versions
- jessie 5.2~20141018-5
- jessie-backports 5.4-7~bpo8+1
- stretch 5.4-7
- testing 5.6-5
- stretch-backports 5.6-4~bpo9+1
- unstable 5.6-5
Entering & leaving tty mode(3) | BrlAPI | Entering & leaving tty mode(3) |
NAME¶
Entering & leaving tty mode - How to take control of ttys for direct braille display / read.Macros¶
#define BRLAPI_TTY_DEFAULT -1
Functions¶
int BRLAPI_STDCALL brlapi_enterTtyMode (int tty, const char *driver)
Detailed Description¶
Before being able to write on the braille display, the application must tell the server which tty it will handle. The application must also specify how braille keys will be delivered to it. Two ways are possible: key codes and commands:- •
- 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.
- •
- commands means that applications will get exactly the same values as brltty. This allows driver-independent clients, which will hopefully be nice to use with a lot of different terminals.
brlapi_readKey()
Macro Definition Documentation¶
#define BRLAPI_TTY_DEFAULT -1¶
Select the default tty. The library takes the following steps:- 1.
- Try to get the tty number from the WINDOWID environment variable (for the xterm case).
- 2.
- Try to get the tty number from the CONTROLVT environment variable.
- 3.
- Read /proc/self/stat (on Linux).
brlapi_enterTtyMode()
Function Documentation¶
int BRLAPI_STDCALL brlapi__enterTtyMode (brlapi_handle_t *handle, inttty, const char *driver)¶
int BRLAPI_STDCALL brlapi__enterTtyModeWithPath (brlapi_handle_t *handle, int *ttys, intcount, const char *driver)¶
int BRLAPI_STDCALL brlapi__leaveTtyMode (brlapi_handle_t *handle)¶
int BRLAPI_STDCALL brlapi__setFocus (brlapi_handle_t *handle, inttty)¶
int BRLAPI_STDCALL brlapi_enterTtyMode (inttty, const char *driver)¶
Ask for some tty, with some key mechanism Parameters:tty
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))
Returns:
- •
- If tty>=0 then take control of the specified tty.
- •
- If tty==BRLAPI_TTY_DEFAULT then take control of the default tty.
the used tty number on success, -1 on error
See also:
brlapi_leaveTtyMode()
brlapi_readKey()
int BRLAPI_STDCALL brlapi_enterTtyModeWithPath (int *ttys, intcount, const char *driver)¶
Ask for some tty specified by its path in the tty tree, with some key mechanism Parameters:ttys points on the array of ttys representing the
tty path to be got. Can be NULL if nttys is 0.
count gives the number of elements in ttys.
driver has the same meaning as in brlapi_enterTtyMode()
Providing nttys == 0 means to get the root.
See also:
brlapi_enterTtyMode()
int BRLAPI_STDCALL brlapi_leaveTtyMode (void)¶
Stop controlling the tty Returns:0 on success, -1 on error.
See also:
brlapi_enterTtyMode()
int BRLAPI_STDCALL brlapi_setFocus (inttty)¶
Tell the current tty to brltty This is intended for focus tellers, such as brltty, xbrlapi, screen, ... brlapi_enterTtyMode() must have been called beforehand to tell where this focus applies in the tty tree. Returns:0 on success, -1 on error.
See also:
brlapi_enterTtyMode()
brlapi_leaveTtyMode()
Author¶
Generated automatically by Doxygen for BrlAPI from the source code.Sat Mar 25 2017 | Version 1.0 |