1 /* @(#)ttys.h	1.9 04/03/12 Copyright 1984-2004 J. Schilling */
2 /*
3  *	Definitione for the internal lower layer support for terminal.h
4  *
5  *	Copyright (c) 1984-2004 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 /*
22  * The external interface of ttycmds.c has the following functions:
23  *
24  *	tty_start()	- Parse TERMCAP entry and do set up for this package
25  *	tty_entry(i)	- Return pointer to decoded TERMCAP entries
26  *	tty_fkey(i)	- Return TERMCAP mapping for function key 'i'
27  *	tty_pagesize()	- Return the terminal's pagesize from TERMCAP entry
28  *	tty_linelength()- Return the terminal's linelength from TERMCAP entry
29  *	tty_init()	- Initialize terminal (send startup sequence)
30  *	tty_term()	- Restore terminal to default mode (send term sequence)
31  *
32  *	TTY*		- Several pointers to apropriate functions
33  *			  implementing TERMCAP functionality.
34  *			  These pointers are not intended for direct use by the
35  *			  higher level software but for terminal.c
36  *
37  * If a specific TERMCAP functionality is not present the corresponding
38  * TTY* function pointer is a NULL pointer.
39  *
40  * tty_pagesize() and tty_linelength() return the "real" size of the
41  * screen as returnd by tgetent(). Corrections for "auto_right_margin"
42  * are done in the upper layers.
43  */
44 
45 extern	void (*TTYclrscreen)	__PR((ewin_t *wp));	/* clr screen */
46 extern	void (*TTYclr_endscr)	__PR((ewin_t *wp));	/* clr to end of scr */
47 extern	void (*TTYclrendln)	__PR((void));		/* clr to end of line*/
48 extern	void (*TTYdelchars)	__PR((int));		/* delete chars */
49 extern	void (*TTYdellines)	__PR((int));		/* delete lines */
50 extern	void (*TTYinschars)	__PR((char *));		/* insert chars */
51 extern	void (*TTYinslines)	__PR((int));		/* insert lines */
52 extern	void (*TTYaltvideo)	__PR((char *));		/* alternate video */
53 extern	void (*TTYhome)		__PR((void));		/* cursor home */
54 extern	void (*TTYup)		__PR((int));		/* cursor up */
55 extern	void (*TTYdown)		__PR((int));		/* cursor down */
56 extern	void (*TTYleft)		__PR((int));		/* cursor left */
57 extern	void (*TTYright)	__PR((int));		/* cursor right */
58 extern	void (*TTYcursor)	__PR((int y, int x));	/* move cursor abs */
59 extern	void (*TTYsscroll)	__PR((int, int));	/* set scroll region */
60 extern	void (*TTYsup)		__PR((int));		/* scroll up */
61 extern	void (*TTYsdown)	__PR((int));		/* scroll down */
62 
63 
64 extern	char *	tty_start	__PR((int (*)(int c)));
65 extern	char **	tty_entry	__PR((void));
66 extern	void	tty_init	__PR((void));
67 extern	void	tty_term	__PR((void));
68 extern	char *	tty_fkey	__PR((int n));
69 extern	int	tty_pagesize	__PR((void));
70 extern	int	tty_linelength	__PR((void));
71