NetBSD/lib/libpanel/panel_hidden.3

99 lines
2.8 KiB
Groff

.\" $NetBSD: panel_hidden.3,v 1.3 2015/10/28 10:22:40 wiz Exp $
.\"
.\" Copyright (c) 2015 Valery Ushakov
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 28, 2015
.Dt PANEL_HIDDEN 3
.Os
.Sh NAME
.Nm hide_panel ,
.Nm show_panel ,
.Nm panel_hidden
.Nd visibility of panels
.Sh LIBRARY
.Lb libpanel
.Sh SYNOPSIS
.In panel.h
.\"
.Ft int
.Fn hide_panel "PANEL *p"
.\"
.Ft int
.Fn show_panel "PANEL *p"
.\"
.Ft int
.Fn panel_hidden "PANEL *p"
.\"
.Sh DESCRIPTION
Panels are initially created visible.
The function
.Fn hide_panel
can be used to hide a panel.
The panel is removed from the deck.
.Pp
A panel can be made visible again with a call to
.Fn show_panel .
The panel is returned to the top of the deck.
.Pp
The current visibility status of a panel can be queried with
.Fn panel_hidden .
.Sh IMPLEMENTATION NOTES
The
.Fn show_panel
function will return an error if the panel is already visible.
Use
.Xr top_panel 3
to change z-order of an already visible panel.
This is the behaviour specified by the original
.At V
panel library.
.Pp
In the ncurses implementation of the panel library
.Fn show_panel
and
.Fn top_panel
are identical and handle both visible and hidden panels.
This may be a source of bugs in programs tested only against ncurses.
.Sh RETURN VALUES
The
.Fn panel_hidden
function returns
.Dv TRUE
or
.Dv FALSE .
It will return
.Dv ERR
if passed a null pointer.
.Pp
Other functions will return one of the following values:
.Pp
.Bl -tag -width ".Dv ERR" -compact
.It Dv OK
The function completed successfully.
.It Dv ERR
An error occurred in the function.
.El
.Sh SEE ALSO
.Xr panel 3