Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | -- -*- ada -*- |
| 2 | define(`HTMLNAME',`terminal_interface-curses-panels__ads.htm')dnl |
| 3 | include(M4MACRO)dnl |
| 4 | ------------------------------------------------------------------------------ |
| 5 | -- -- |
| 6 | -- GNAT ncurses Binding -- |
| 7 | -- -- |
| 8 | -- Terminal_Interface.Curses.Panels -- |
| 9 | -- -- |
| 10 | -- S P E C -- |
| 11 | -- -- |
| 12 | ------------------------------------------------------------------------------ |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 13 | -- Copyright 2020 Thomas E. Dickey -- |
| 14 | -- Copyright 1998-2009,2014 Free Software Foundation, Inc. -- |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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: |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 42 | -- $Revision: 1.23 $ |
| 43 | -- $Date: 2020/02/02 23:34:34 $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 44 | -- Binding Version 01.00 |
| 45 | ------------------------------------------------------------------------------ |
| 46 | with System; |
| 47 | |
| 48 | package Terminal_Interface.Curses.Panels is |
| 49 | pragma Preelaborate (Terminal_Interface.Curses.Panels); |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 50 | pragma Linker_Options ("-lpanel" & Curses_Constants.DFT_ARG_SUFFIX); |
| 51 | |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 78 | procedure Bottom (Pan : Panel); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 79 | -- AKA |
| 80 | pragma Inline (Bottom); |
| 81 | |
| 82 | -- ANCHOR(`top_panel()',`Top') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 83 | procedure Top (Pan : Panel); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 84 | -- AKA |
| 85 | pragma Inline (Top); |
| 86 | |
| 87 | -- ANCHOR(`show_panel()',`Show') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 88 | procedure Show (Pan : Panel); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 98 | procedure Hide (Pan : Panel); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 112 | procedure Replace (Pan : Panel; |
| 113 | Win : Window); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 114 | -- AKA |
| 115 | pragma Inline (Replace); |
| 116 | |
| 117 | -- ANCHOR(`move_panel()',`Move') |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 118 | procedure Move (Pan : Panel; |
| 119 | Line : Line_Position; |
| 120 | Column : Column_Position); |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | |
| 144 | private |
| 145 | type Panel is new System.Storage_Elements.Integer_Address; |
| 146 | Null_Panel : constant Panel := 0; |
| 147 | |
| 148 | end Terminal_Interface.Curses.Panels; |