|
|
1.1 root 1: .\" Copyright (c) 1980 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted
5: .\" provided that the above copyright notice and this paragraph are
6: .\" duplicated in all such forms and that any documentation,
7: .\" advertising materials, and other materials related to such
8: .\" distribution and use acknowledge that the software was developed
9: .\" by the University of California, Berkeley. The name of the
10: .\" University may not be used to endorse or promote products derived
11: .\" from this software without specific prior written permission.
12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15: .\"
16: .\" @(#)doc.IV 6.2 (Berkeley) 3/17/89
17: .\"
18: .Ds
19: .Fd gettmode
20: .De
21: Get the tty stats.
22: This is normally called by
23: .Fn initscr .
24: .Ds
25: .Fd mvcur lasty\*,lastx\*,newy\*,newx
26: int lasty\*,lastx\*,newy\*,newx;
27: .De
28: Moves the terminal's cursor from
29: .Vn lasty\*,lastx ) (
30: to
31: .Vn newy\*,newx ) (
32: in an approximation of optimal fashion.
33: This routine uses the functions borrowed from
34: .i ex
35: version 2.6.
36: It is possible to use this optimization
37: without the benefit of the screen routines.
38: With the screen routines, this should not be called by the user.
39: .Fn move
40: and
41: .Fn refresh
42: should be used to move the cursor position,
43: so that the routines know what's going on.
44: .Ds
45: .Fd scroll win
46: WINDOW *win;
47: .De
48: Scroll the window upward one line.
49: This is normally not used by the user.
50: .Ds
51: .Fd savetty "" \*m
52: .Fd resetty "" \*m
53: .De
54: .Fn savetty
55: saves the current tty characteristic flags.
56: .Fn resetty
57: restores them to what
58: .Fn savetty
59: stored.
60: These functions are performed automatically by
61: .Fn initscr
62: and
63: .Fn endwin .
64: .Ds
65: .Fd setterm name
66: char *name;
67: .De
68: Set the terminal characteristics to be those of the terminal named
69: .Vn name ,
70: getting the terminal size from the
71: .b TIOCGWINSZ
72: .Fn ioctl "" "" 2
73: if it exists,
74: otherwise from the environment.
75: This is normally called by
76: .Fn initscr .
77: .Ds
78: .Fd tstp
79: .De
80: If the new
81: .b tty (4)
82: driver is in use,
83: this function
84: will save the current tty state
85: and then put the process to sleep.
86: When the process gets restarted,
87: it restores the tty state
88: and then calls
89: .Fn wrefresh "" "" curscr
90: to redraw the screen.
91: .Fn initscr
92: sets the signal
93: SIGTSTP
94: to trap to this routine.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.