xref: /netbsd-src/lib/libpanel/panel_hidden.3 (revision ed8dd388368ba2a90492987cbff26238e7a4b6f1)
1.\"	$NetBSD: panel_hidden.3,v 1.3 2015/10/28 10:22:40 wiz Exp $
2.\"
3.\" Copyright (c) 2015 Valery Ushakov
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd October 28, 2015
27.Dt PANEL_HIDDEN 3
28.Os
29.Sh NAME
30.Nm hide_panel ,
31.Nm show_panel ,
32.Nm panel_hidden
33.Nd visibility of panels
34.Sh LIBRARY
35.Lb libpanel
36.Sh SYNOPSIS
37.In panel.h
38.\"
39.Ft int
40.Fn hide_panel "PANEL *p"
41.\"
42.Ft int
43.Fn show_panel "PANEL *p"
44.\"
45.Ft int
46.Fn panel_hidden "PANEL *p"
47.\"
48.Sh DESCRIPTION
49Panels are initially created visible.
50The function
51.Fn hide_panel
52can be used to hide a panel.
53The panel is removed from the deck.
54.Pp
55A panel can be made visible again with a call to
56.Fn show_panel .
57The panel is returned to the top of the deck.
58.Pp
59The current visibility status of a panel can be queried with
60.Fn panel_hidden .
61.Sh IMPLEMENTATION NOTES
62The
63.Fn show_panel
64function will return an error if the panel is already visible.
65Use
66.Xr top_panel 3
67to change z-order of an already visible panel.
68This is the behaviour specified by the original
69.At V
70panel library.
71.Pp
72In the ncurses implementation of the panel library
73.Fn show_panel
74and
75.Fn top_panel
76are identical and handle both visible and hidden panels.
77This may be a source of bugs in programs tested only against ncurses.
78.Sh RETURN VALUES
79The
80.Fn panel_hidden
81function returns
82.Dv TRUE
83or
84.Dv FALSE .
85It will return
86.Dv ERR
87if passed a null pointer.
88.Pp
89Other functions will return one of the following values:
90.Pp
91.Bl -tag -width ".Dv ERR" -compact
92.It Dv OK
93The function completed successfully.
94.It Dv ERR
95An error occurred in the function.
96.El
97.Sh SEE ALSO
98.Xr panel 3
99