blob: 1175343ae8c6cb51e058370cc044051e89b25c39 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301-- -*- ada -*-
2define(`HTMLNAME',`terminal_interface-curses-panels__ads.htm')dnl
3include(M4MACRO)dnl
4------------------------------------------------------------------------------
5-- --
6-- GNAT ncurses Binding --
7-- --
8-- Terminal_Interface.Curses.Panels --
9-- --
10-- S P E C --
11-- --
12------------------------------------------------------------------------------
micky3879b9f5e72025-07-08 18:04:53 -040013-- Copyright 2020 Thomas E. Dickey --
14-- Copyright 1998-2009,2014 Free Software Foundation, Inc. --
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015-- --
16-- Permission is hereby granted, free of charge, to any person obtaining a --
17-- copy of this software and associated documentation files (the --
18-- "Software"), to deal in the Software without restriction, including --
19-- without limitation the rights to use, copy, modify, merge, publish, --
20-- distribute, distribute with modifications, sublicense, and/or sell --
21-- copies of the Software, and to permit persons to whom the Software is --
22-- furnished to do so, subject to the following conditions: --
23-- --
24-- The above copyright notice and this permission notice shall be included --
25-- in all copies or substantial portions of the Software. --
26-- --
27-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
28-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
29-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
30-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
31-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
32-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
33-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
34-- --
35-- Except as contained in this notice, the name(s) of the above copyright --
36-- holders shall not be used in advertising or otherwise to promote the --
37-- sale, use or other dealings in this Software without prior written --
38-- authorization. --
39------------------------------------------------------------------------------
40-- Author: Juergen Pfeifer, 1996
41-- Version Control:
micky3879b9f5e72025-07-08 18:04:53 -040042-- $Revision: 1.23 $
43-- $Date: 2020/02/02 23:34:34 $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053044-- Binding Version 01.00
45------------------------------------------------------------------------------
46with System;
47
48package Terminal_Interface.Curses.Panels is
49 pragma Preelaborate (Terminal_Interface.Curses.Panels);
Steve Kondikae271bc2015-11-15 02:50:53 +010050 pragma Linker_Options ("-lpanel" & Curses_Constants.DFT_ARG_SUFFIX);
51
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053052 type Panel is private;
53
54 ---------------------------
55 -- Interface constants --
56 ---------------------------
57 Null_Panel : constant Panel;
58
59 -------------------
60 -- Exceptions --
61 -------------------
62
63 Panel_Exception : exception;
64
65 -- MANPAGE(`panel.3x')
66
67 -- ANCHOR(`new_panel()',`Create')
68 function Create (Win : Window) return Panel;
69 -- AKA
70 pragma Inline (Create);
71
72 -- ANCHOR(`new_panel()',`New_Panel')
73 function New_Panel (Win : Window) return Panel renames Create;
74 -- AKA
75 -- pragma Inline (New_Panel);
76
77 -- ANCHOR(`bottom_panel()',`Bottom')
Steve Kondikae271bc2015-11-15 02:50:53 +010078 procedure Bottom (Pan : Panel);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053079 -- AKA
80 pragma Inline (Bottom);
81
82 -- ANCHOR(`top_panel()',`Top')
Steve Kondikae271bc2015-11-15 02:50:53 +010083 procedure Top (Pan : Panel);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053084 -- AKA
85 pragma Inline (Top);
86
87 -- ANCHOR(`show_panel()',`Show')
Steve Kondikae271bc2015-11-15 02:50:53 +010088 procedure Show (Pan : Panel);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053089 -- AKA
90 pragma Inline (Show);
91
92 -- ANCHOR(`update_panels()',`Update_Panels')
93 procedure Update_Panels;
94 -- AKA
95 pragma Import (C, Update_Panels, "update_panels");
96
97 -- ANCHOR(`hide_panel()',`Hide')
Steve Kondikae271bc2015-11-15 02:50:53 +010098 procedure Hide (Pan : Panel);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053099 -- AKA
100 pragma Inline (Hide);
101
102 -- ANCHOR(`panel_window()',`Get_Window')
103 function Get_Window (Pan : Panel) return Window;
104 -- AKA
105 pragma Inline (Get_Window);
106
107 -- ANCHOR(`panel_window()',`Panel_Window')
108 function Panel_Window (Pan : Panel) return Window renames Get_Window;
109 -- pragma Inline (Panel_Window);
110
111 -- ANCHOR(`replace_panel()',`Replace')
Steve Kondikae271bc2015-11-15 02:50:53 +0100112 procedure Replace (Pan : Panel;
113 Win : Window);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530114 -- AKA
115 pragma Inline (Replace);
116
117 -- ANCHOR(`move_panel()',`Move')
Steve Kondikae271bc2015-11-15 02:50:53 +0100118 procedure Move (Pan : Panel;
119 Line : Line_Position;
120 Column : Column_Position);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530121 -- AKA
122 pragma Inline (Move);
123
124 -- ANCHOR(`panel_hidden()',`Is_Hidden')
125 function Is_Hidden (Pan : Panel) return Boolean;
126 -- AKA
127 pragma Inline (Is_Hidden);
128
129 -- ANCHOR(`panel_above()',`Above')
130 function Above (Pan : Panel) return Panel;
131 -- AKA
132 pragma Import (C, Above, "panel_above");
133
134 -- ANCHOR(`panel_below()',`Below')
135 function Below (Pan : Panel) return Panel;
136 -- AKA
137 pragma Import (C, Below, "panel_below");
138
139 -- ANCHOR(`del_panel()',`Delete')
140 procedure Delete (Pan : in out Panel);
141 -- AKA
142 pragma Inline (Delete);
143
144private
145 type Panel is new System.Storage_Elements.Integer_Address;
146 Null_Panel : constant Panel := 0;
147
148end Terminal_Interface.Curses.Panels;