xref: /netbsd-src/lib/libpanel/new_panel.3 (revision e47dc51a2af495892ffca94d9b684627e816d6e7)
1.\"	$NetBSD: new_panel.3,v 1.4 2015/10/29 02:33:46 uwe 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 NEW_PANEL 3
28.Os
29.Sh NAME
30.Nm new_panel ,
31.Nm panel_window ,
32.Nm replace_panel ,
33.Nm del_panel
34.Nd panel routines
35.Sh LIBRARY
36.Lb libpanel
37.Sh SYNOPSIS
38.In panel.h
39.\"
40.Ft PANEL *
41.Fn new_panel "WINDOW *win"
42.\"
43.Ft WINDOW *
44.Fn panel_window "PANEL *p"
45.\"
46.Ft int
47.Fn replace_panel "PANEL *p" "WINDOW *win"
48.\"
49.Ft int
50.Fn del_panel "PANEL *p"
51.\"
52.Sh DESCRIPTION
53The function
54.Fn new_panel
55creates a new panel associated with the curses window
56.Fa win .
57The new panel is visible and is placed at the top of the deck.
58.Pp
59The curses window associated with a panel may be obtained with
60.Fn panel_window
61and changed with
62.Fn replace_panel .
63.Pp
64The function
65.Fn del_panel
66hides the panel and deletes it.
67Note that the curses window associated with the panel is not deleted.
68.Sh RETURN VALUES
69Functions returning pointers will return
70.Dv NULL
71if an error is detected.
72The functions that return an int will return one of the following
73values:
74.Pp
75.Bl -tag -width ".Dv ERR" -compact
76.It Dv OK
77The function completed successfully.
78.It Dv ERR
79An error occurred in the function.
80.El
81.Sh SEE ALSO
82.Xr panel 3
83