2017-11-17 20:12:59 +01:00
|
|
|
/****************************************************************************
|
2017-11-28 00:31:22 +01:00
|
|
|
* apps/include/graphics/panel.h
|
2017-11-17 20:12:59 +01:00
|
|
|
*
|
2021-06-11 08:28:21 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2017-11-17 20:12:59 +01:00
|
|
|
*
|
2021-06-11 08:28:21 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2017-11-17 20:12:59 +01:00
|
|
|
*
|
2021-06-11 08:28:21 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2017-11-17 20:12:59 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2021-06-11 08:28:21 +02:00
|
|
|
/* Public Domain Curses -- Panels for PDCurses
|
|
|
|
* $Id: panel.h,v 1.19 2008/07/13 16:08:16 wmcbrine Exp $
|
|
|
|
*/
|
|
|
|
|
2017-11-17 20:12:59 +01:00
|
|
|
#ifndef __APPS_INCLUDE_GRAPHICS_PANEL_H
|
2020-01-31 16:18:05 +01:00
|
|
|
#define __APPS_INCLUDE_GRAPHICS_PANEL_H
|
2017-11-17 20:12:59 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include "graphics/curses.h"
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
# define EXTERN extern "C"
|
|
|
|
#else
|
|
|
|
# define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct panelobs
|
|
|
|
{
|
|
|
|
struct panelobs *above;
|
|
|
|
struct panel *pan;
|
|
|
|
} PANELOBS;
|
|
|
|
|
|
|
|
typedef struct panel
|
|
|
|
{
|
|
|
|
WINDOW *win;
|
|
|
|
int wstarty;
|
|
|
|
int wendy;
|
|
|
|
int wstartx;
|
|
|
|
int wendx;
|
|
|
|
struct panel *below;
|
|
|
|
struct panel *above;
|
|
|
|
const void *user;
|
|
|
|
struct panelobs *obscure;
|
|
|
|
} PANEL;
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int bottom_panel(PANEL *pan);
|
|
|
|
int del_panel(PANEL *pan);
|
|
|
|
int hide_panel(PANEL *pan);
|
|
|
|
int move_panel(PANEL *pan, int starty, int startx);
|
|
|
|
PANEL *new_panel(WINDOW *win);
|
|
|
|
PANEL *panel_above(const PANEL *pan);
|
|
|
|
PANEL *panel_below(const PANEL *pan);
|
|
|
|
int panel_hidden(const PANEL *pan);
|
|
|
|
const void *panel_userptr(const PANEL *pan);
|
|
|
|
WINDOW *panel_window(const PANEL *pan);
|
|
|
|
int replace_panel(PANEL *pan, WINDOW *win);
|
|
|
|
int set_panel_userptr(PANEL *pan, const void *uptr);
|
|
|
|
int show_panel(PANEL *pan);
|
|
|
|
int top_panel(PANEL *pan);
|
|
|
|
void update_panels(void);
|
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __APPS_INCLUDE_GRAPHICS_PANEL_H */
|