xref: /netbsd/lib/libpanel/panel_above.3 (revision 6a2a8244)
1.\"	$NetBSD: panel_above.3,v 1.8 2015/11/01 14:47:54 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_ABOVE 3
28.Os
29.Sh NAME
30.Nm top_panel ,
31.Nm bottom_panel ,
32.Nm panel_above ,
33.Nm panel_below
34.Nd z-order of panels
35.Sh LIBRARY
36.Lb libpanel
37.Sh SYNOPSIS
38.In panel.h
39.\"
40.Ft int
41.Fn top_panel "PANEL *p"
42.\"
43.Ft int
44.Fn bottom_panel "PANEL *p"
45.\"
46.Ft PANEL *
47.Fn panel_above "PANEL *p"
48.\"
49.Ft PANEL *
50.Fn panel_below "PANEL *p"
51.\"
52.Sh DESCRIPTION
53Newly created panels are placed at the top of the deck.
54The z-order of a visible panel can be changed with the functions
55.Fn top_panel
56and
57.Fn bottom_panel
58that move it to the top and bottom of the deck respectively.
59.Pp
60For a visible panel its neighbors in the deck can be obtained with
61.Fn panel_above
62and
63.Fn panel_below .
64The bottom and top panels can be obtained by passing a
65.Dv NULL
66argument to
67.Fn panel_above
68and
69.Fn panel_below ,
70respectively.
71.Sh IMPLEMENTATION NOTES
72The
73.Fn top_panel
74function will return an error if the panel is currently hidden.
75Use
76.Xr show_panel 3
77to make a hidden panel visible again and put it at the top of the deck.
78This is the behaviour specified by the original
79.At V
80panel library.
81.Pp
82In the ncurses implementation of the panel library
83.Fn show_panel
84and
85.Fn top_panel
86are identical and handle both visible and hidden panels.
87This may be a source of bugs in programs tested only against ncurses.
88.Sh RETURN VALUES
89Functions returning pointers will return
90.Dv NULL
91if an error is detected.
92The functions that return an int will return one of the following
93values:
94.Pp
95.Bl -tag -width ".Dv ERR" -compact
96.It Dv OK
97The function completed successfully.
98.It Dv ERR
99An error occurred in the function.
100.El
101.Sh SEE ALSO
102.Xr panel 3
103