xref: /netbsd-src/lib/libpanel/panel.h (revision f7b066af9033d5441bc7dc8eaa894f44ac02dfdf)
1*f7b066afSkamil /*	$NetBSD: panel.h,v 1.2 2015/11/02 01:06:15 kamil Exp $ */
25858a2dbSuwe 
35858a2dbSuwe /*
45858a2dbSuwe  * Copyright (c) 2015 Valery Ushakov
55858a2dbSuwe  * All rights reserved.
65858a2dbSuwe  *
75858a2dbSuwe  * Redistribution and use in source and binary forms, with or without
85858a2dbSuwe  * modification, are permitted provided that the following conditions
95858a2dbSuwe  * are met:
105858a2dbSuwe  * 1. Redistributions of source code must retain the above copyright
115858a2dbSuwe  *    notice, this list of conditions and the following disclaimer.
125858a2dbSuwe  * 2. Redistributions in binary form must reproduce the above copyright
135858a2dbSuwe  *    notice, this list of conditions and the following disclaimer in the
145858a2dbSuwe  *    documentation and/or other materials provided with the distribution.
155858a2dbSuwe  *
165858a2dbSuwe  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
175858a2dbSuwe  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
185858a2dbSuwe  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
195858a2dbSuwe  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
205858a2dbSuwe  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
215858a2dbSuwe  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
225858a2dbSuwe  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
235858a2dbSuwe  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
245858a2dbSuwe  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
255858a2dbSuwe  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
265858a2dbSuwe  */
275858a2dbSuwe 
285858a2dbSuwe #ifndef	_PANEL_H_
295858a2dbSuwe #define	_PANEL_H_
305858a2dbSuwe 
315858a2dbSuwe #include <sys/cdefs.h>
325858a2dbSuwe #include <curses.h>
335858a2dbSuwe 
345858a2dbSuwe typedef struct __panel PANEL;
355858a2dbSuwe 
365858a2dbSuwe __BEGIN_DECLS
375858a2dbSuwe PANEL  *new_panel(WINDOW *);
385858a2dbSuwe int     del_panel(PANEL *);
395858a2dbSuwe 
405858a2dbSuwe int     replace_panel(PANEL *, WINDOW *);
415858a2dbSuwe WINDOW *panel_window(PANEL *);
425858a2dbSuwe 
435858a2dbSuwe int     set_panel_userptr(PANEL *, char *);
445858a2dbSuwe char   *panel_userptr(PANEL *);
455858a2dbSuwe 
465858a2dbSuwe int     hide_panel(PANEL *);
475858a2dbSuwe int     show_panel(PANEL *);
485858a2dbSuwe int     panel_hidden(PANEL *);
495858a2dbSuwe 
505858a2dbSuwe int     top_panel(PANEL *);
515858a2dbSuwe int     bottom_panel(PANEL *);
525858a2dbSuwe 
535858a2dbSuwe PANEL  *panel_above(PANEL *);
545858a2dbSuwe PANEL  *panel_below(PANEL *);
555858a2dbSuwe 
565858a2dbSuwe int     move_panel(PANEL *, int, int);
575858a2dbSuwe 
585858a2dbSuwe void    update_panels(void);
595858a2dbSuwe __END_DECLS
605858a2dbSuwe 
615858a2dbSuwe #endif	/* _PANEL_H_ */
62