blob: f116cffdbde64560e8a8a0b20268badfbe34bbdc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
include "../curses.h"
include "window.h"
# HIDEWIN -- Hide a window
#
# B.Simon 28-Sep-90 Original
procedure hidewin (win)
int win # i: Window descriptor
#--
include "window.com"
int rect[RSIZE]
pointer pwin, buffer
begin
pwin = warray[win]
# Don't do anything if the screen under the window wasn't
# saved or the window is already hidden
if (WIN_BUFFER(pwin) == NULL || WIN_HIDDEN(pwin) == YES)
return
# Save the current window contents in a buffer,
# and restore the screen under the window
call wrect (win, YES, rect)
call getscreen (rect, buffer)
call putscreen (rect, WIN_BUFFER(pwin))
# Place the window contents in its own buffer and
# mark the window as hidden
call freescreen (WIN_BUFFER(pwin))
WIN_BUFFER(pwin) = buffer
WIN_HIDDEN(pwin) = YES
end
|