NetBSD/lib/libpanel/panel_above.3

103 lines
3.0 KiB
Groff

.\" $NetBSD: panel_above.3,v 1.8 2015/11/01 14:47:54 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_ABOVE 3
.Os
.Sh NAME
.Nm top_panel ,
.Nm bottom_panel ,
.Nm panel_above ,
.Nm panel_below
.Nd z-order of panels
.Sh LIBRARY
.Lb libpanel
.Sh SYNOPSIS
.In panel.h
.\"
.Ft int
.Fn top_panel "PANEL *p"
.\"
.Ft int
.Fn bottom_panel "PANEL *p"
.\"
.Ft PANEL *
.Fn panel_above "PANEL *p"
.\"
.Ft PANEL *
.Fn panel_below "PANEL *p"
.\"
.Sh DESCRIPTION
Newly created panels are placed at the top of the deck.
The z-order of a visible panel can be changed with the functions
.Fn top_panel
and
.Fn bottom_panel
that move it to the top and bottom of the deck respectively.
.Pp
For a visible panel its neighbors in the deck can be obtained with
.Fn panel_above
and
.Fn panel_below .
The bottom and top panels can be obtained by passing a
.Dv NULL
argument to
.Fn panel_above
and
.Fn panel_below ,
respectively.
.Sh IMPLEMENTATION NOTES
The
.Fn top_panel
function will return an error if the panel is currently hidden.
Use
.Xr show_panel 3
to make a hidden panel visible again and put it at the top of the deck.
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
Functions returning pointers will return
.Dv NULL
if an error is detected.
The functions that return an int 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