xref: /dflybsd-src/usr.bin/top/screen.h (revision dc4f0af10c302f890123c000480a85f47d731199)
1*dc4f0af1Szrj /*
2*dc4f0af1Szrj  * Copyright (c) 1984 through 2008, William LeFebvre
3*dc4f0af1Szrj  * All rights reserved.
4*dc4f0af1Szrj  *
5*dc4f0af1Szrj  * Redistribution and use in source and binary forms, with or without
6*dc4f0af1Szrj  * modification, are permitted provided that the following conditions are met:
7*dc4f0af1Szrj  *
8*dc4f0af1Szrj  *     * Redistributions of source code must retain the above copyright
9*dc4f0af1Szrj  * notice, this list of conditions and the following disclaimer.
10*dc4f0af1Szrj  *
11*dc4f0af1Szrj  *     * Redistributions in binary form must reproduce the above
12*dc4f0af1Szrj  * copyright notice, this list of conditions and the following disclaimer
13*dc4f0af1Szrj  * in the documentation and/or other materials provided with the
14*dc4f0af1Szrj  * distribution.
15*dc4f0af1Szrj  *
16*dc4f0af1Szrj  *     * Neither the name of William LeFebvre nor the names of other
17*dc4f0af1Szrj  * contributors may be used to endorse or promote products derived from
18*dc4f0af1Szrj  * this software without specific prior written permission.
19*dc4f0af1Szrj  *
20*dc4f0af1Szrj  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*dc4f0af1Szrj  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*dc4f0af1Szrj  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23*dc4f0af1Szrj  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24*dc4f0af1Szrj  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25*dc4f0af1Szrj  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26*dc4f0af1Szrj  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*dc4f0af1Szrj  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*dc4f0af1Szrj  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*dc4f0af1Szrj  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30*dc4f0af1Szrj  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*dc4f0af1Szrj  */
32*dc4f0af1Szrj 
33*dc4f0af1Szrj /*
34*dc4f0af1Szrj  *  top - a top users display for Unix 4.2
35*dc4f0af1Szrj  *
36*dc4f0af1Szrj  *  This file contains all the definitions necessary to use the hand-written
37*dc4f0af1Szrj  *  screen package in "screen.c"
38*dc4f0af1Szrj  */
39*dc4f0af1Szrj 
40*dc4f0af1Szrj #ifndef _SCREEN_H_
41*dc4f0af1Szrj #define _SCREEN_H_
42*dc4f0af1Szrj 
43*dc4f0af1Szrj extern char ch_erase;		/* set to the user's erase character */
44*dc4f0af1Szrj extern char ch_kill;		/* set to the user's kill character */
45*dc4f0af1Szrj extern char ch_werase;		/* set to the user's werase character */
46*dc4f0af1Szrj extern char smart_terminal;     /* set if the terminal has sufficient termcap
47*dc4f0af1Szrj 				   capabilities for normal operation */
48*dc4f0af1Szrj 
49*dc4f0af1Szrj /* rows and columns on the screen according to termcap */
50*dc4f0af1Szrj extern int  screen_length;
51*dc4f0af1Szrj extern int  screen_width;
52*dc4f0af1Szrj 
53*dc4f0af1Szrj void screen_getsize();
54*dc4f0af1Szrj int screen_readtermcap(int interactive);
55*dc4f0af1Szrj void screen_init();
56*dc4f0af1Szrj void screen_end();
57*dc4f0af1Szrj void screen_reinit();
58*dc4f0af1Szrj void screen_move(int x, int y);
59*dc4f0af1Szrj void screen_standout(char *msg);
60*dc4f0af1Szrj void screen_clear();
61*dc4f0af1Szrj int screen_cte();
62*dc4f0af1Szrj void screen_cleareol(int len);
63*dc4f0af1Szrj void screen_home();
64*dc4f0af1Szrj 
65*dc4f0af1Szrj #endif /* _SCREEN_H_ */
66