• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1--  -*- 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------------------------------------------------------------------------------
13-- Copyright 2020 Thomas E. Dickey                                          --
14-- Copyright 1998-2009,2014 Free Software Foundation, Inc.                  --
15--                                                                          --
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:
42--  $Revision: 1.23 $
43--  $Date: 2020/02/02 23:34:34 $
44--  Binding Version 01.00
45------------------------------------------------------------------------------
46with System;
47
48package Terminal_Interface.Curses.Panels is
49   pragma Preelaborate (Terminal_Interface.Curses.Panels);
50   pragma Linker_Options ("-lpanel" & Curses_Constants.DFT_ARG_SUFFIX);
51
52   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')
78   procedure Bottom (Pan : Panel);
79   --  AKA
80   pragma Inline (Bottom);
81
82   --  ANCHOR(`top_panel()',`Top')
83   procedure Top (Pan : Panel);
84   --  AKA
85   pragma Inline (Top);
86
87   --  ANCHOR(`show_panel()',`Show')
88   procedure Show (Pan : Panel);
89   --  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')
98   procedure Hide (Pan : Panel);
99   --  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')
112   procedure Replace (Pan : Panel;
113                      Win : Window);
114   --  AKA
115   pragma Inline (Replace);
116
117   --  ANCHOR(`move_panel()',`Move')
118   procedure Move (Pan    : Panel;
119                   Line   : Line_Position;
120                   Column : Column_Position);
121   --  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;
149