]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/ada/terminal_interface-curses-aux__ads.htm
ncurses 5.9 - patch 20140412
[ncurses.git] / doc / html / ada / terminal_interface-curses-aux__ads.htm
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>terminal_interface-curses-aux.ads</TITLE>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <style type="text/css">
7 *.comment {
8         color: green;
9 }
10 *.symbol {
11         color: red;
12 }
13 </style>
14 </HEAD>
15 <BODY>
16 <HR><DIV style="text-align:center"><H1> File : terminal_interface-curses-aux.ads </H1></DIV><HR>
17 <PRE>
18 <span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
19 <span class="comment"><EM>--                                                                          --</EM></span>
20 <span class="comment"><EM>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</EM></span>
21 <span class="comment"><EM>--                                                                          --</EM></span>
22 <span class="comment"><EM>--                       Terminal_Interface.Curses.Aux                      --</EM></span>
23 <span class="comment"><EM>--                                                                          --</EM></span>
24 <span class="comment"><EM>--                                 S P E C                                  --</EM></span>
25 <span class="comment"><EM>--                                                                          --</EM></span>
26 <span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
27 <span class="comment"><EM>-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              --</EM></span>
28 <span class="comment"><EM>--                                                                          --</EM></span>
29 <span class="comment"><EM>-- Permission is hereby granted, free of charge, to any person obtaining a  --</EM></span>
30 <span class="comment"><EM>-- copy of this software and associated documentation files (the            --</EM></span>
31 <span class="comment"><EM>-- "Software"), to deal in the Software without restriction, including      --</EM></span>
32 <span class="comment"><EM>-- without limitation the rights to use, copy, modify, merge, publish,      --</EM></span>
33 <span class="comment"><EM>-- distribute, distribute with modifications, sublicense, and/or sell       --</EM></span>
34 <span class="comment"><EM>-- copies of the Software, and to permit persons to whom the Software is    --</EM></span>
35 <span class="comment"><EM>-- furnished to do so, subject to the following conditions:                 --</EM></span>
36 <span class="comment"><EM>--                                                                          --</EM></span>
37 <span class="comment"><EM>-- The above copyright notice and this permission notice shall be included  --</EM></span>
38 <span class="comment"><EM>-- in all copies or substantial portions of the Software.                   --</EM></span>
39 <span class="comment"><EM>--                                                                          --</EM></span>
40 <span class="comment"><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</EM></span>
41 <span class="comment"><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</EM></span>
42 <span class="comment"><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</EM></span>
43 <span class="comment"><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</EM></span>
44 <span class="comment"><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</EM></span>
45 <span class="comment"><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</EM></span>
46 <span class="comment"><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</EM></span>
47 <span class="comment"><EM>--                                                                          --</EM></span>
48 <span class="comment"><EM>-- Except as contained in this notice, the name(s) of the above copyright   --</EM></span>
49 <span class="comment"><EM>-- holders shall not be used in advertising or otherwise to promote the     --</EM></span>
50 <span class="comment"><EM>-- sale, use or other dealings in this Software without prior written       --</EM></span>
51 <span class="comment"><EM>-- authorization.                                                           --</EM></span>
52 <span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
53 <span class="comment"><EM>--  Author:  Juergen Pfeifer, 1996</EM></span>
54 <span class="comment"><EM>--  Version Control:</EM></span>
55 <span class="comment"><EM>--  @Revision: 1.18 @</EM></span>
56 <span class="comment"><EM>--  Binding Version 01.00</EM></span>
57 <span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
58 <span class="comment"><EM>--  curses binding.</EM></span>
59 <span class="comment"><EM>--  This module is generated. Please don't change it manually!</EM></span>
60 <span class="comment"><EM>--  Run the generator instead.</EM></span>
61 <span class="comment"><EM>--  |</EM></span>
62 <b>with</b> System;
63 <b>with</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C;
64 <b>with</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.Strings; <b>use</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.Strings;
65 <b>with</b> <A HREF="unchconv__ads.htm#ref_20_10">Unchecked_Conversion</A>;
66
67 <b>package</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<span class="symbol"><A NAME="ref_50_35" HREF="terminal_interface-curses-aux__adb.htm#ref_41_40">Aux</A></span> <b>is</b>
68    <b>pragma</b> Preelaborate (<A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_50_35">Aux</A>);
69
70    <b>use</b> <b>type</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
71
72    <b>subtype</b> <span class="symbol"><A NAME="ref_55_12">C_Int</A></span>      <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
73    <b>subtype</b> <span class="symbol"><A NAME="ref_56_12">C_Short</A></span>    <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.short;
74    <b>subtype</b> <span class="symbol"><A NAME="ref_57_12">C_Long_Int</A></span> <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.long;
75    <b>subtype</b> <span class="symbol"><A NAME="ref_58_12">C_Size_T</A></span>   <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.size_t;
76    <b>subtype</b> <span class="symbol"><A NAME="ref_59_12">C_UInt</A></span>     <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.unsigned;
77    <b>subtype</b> <span class="symbol"><A NAME="ref_60_12">C_ULong</A></span>    <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.unsigned_long;
78    <b>subtype</b> <span class="symbol"><A NAME="ref_61_12">C_Char_Ptr</A></span> <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.Strings.chars_ptr;
79    <b>type</b>    <span class="symbol"><A NAME="ref_62_12">C_Void_Ptr</A></span> <b>is</b> <b>new</b> System.Address;
80    <b>type</b>    <span class="symbol"><A NAME="ref_63_12">C_Chtype</A></span>   <b>is</b> <b>new</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_59_12">C_UInt</A>;
81    <b>type</b>    <span class="symbol"><A NAME="ref_64_12">C_AttrType</A></span> <b>is</b> <b>new</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_59_12">C_UInt</A>;
82
83    <span class="comment"><EM>--  This is how those constants are defined in ncurses. I see them also</EM></span>
84    <span class="comment"><EM>--  exactly like this in all ETI implementations I ever tested. So it</EM></span>
85    <span class="comment"><EM>--  could be that this is quite general, but please check with your curses.</EM></span>
86    <span class="comment"><EM>--  This is critical, because curses sometime mixes Boolean returns with</EM></span>
87    <span class="comment"><EM>--  returning an error status.</EM></span>
88    <span class="symbol"><A NAME="ref_71_4">Curses_Ok</A></span>    : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := 0;
89    <span class="symbol"><A NAME="ref_72_4">Curses_Err</A></span>   : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := -1;
90
91    <span class="symbol"><A NAME="ref_74_4">Curses_True</A></span>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := 1;
92    <span class="symbol"><A NAME="ref_75_4">Curses_False</A></span> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := 0;
93
94    <span class="comment"><EM>--  Eti_Error: type for error codes returned by the menu and form subsystem</EM></span>
95    <b>subtype</b> <span class="symbol"><A NAME="ref_78_12">Eti_Error</A></span> <b>is</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> <b>range</b> -14 .. 0;
96
97    <span class="symbol"><A NAME="ref_80_4">E_Ok</A></span>               : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := 0;
98    <span class="symbol"><A NAME="ref_81_4">E_System_Error</A></span>     : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -1;
99    <span class="symbol"><A NAME="ref_82_4">E_Bad_Argument</A></span>     : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -2;
100    <span class="symbol"><A NAME="ref_83_4">E_Posted</A></span>           : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -3;
101    <span class="symbol"><A NAME="ref_84_4">E_Connected</A></span>        : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -4;
102    <span class="symbol"><A NAME="ref_85_4">E_Bad_State</A></span>        : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -5;
103    <span class="symbol"><A NAME="ref_86_4">E_No_Room</A></span>          : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -6;
104    <span class="symbol"><A NAME="ref_87_4">E_Not_Posted</A></span>       : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -7;
105    <span class="symbol"><A NAME="ref_88_4">E_Unknown_Command</A></span>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -8;
106    <span class="symbol"><A NAME="ref_89_4">E_No_Match</A></span>         : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -9;
107    <span class="symbol"><A NAME="ref_90_4">E_Not_Selectable</A></span>   : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -10;
108    <span class="symbol"><A NAME="ref_91_4">E_Not_Connected</A></span>    : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -11;
109    <span class="symbol"><A NAME="ref_92_4">E_Request_Denied</A></span>   : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -12;
110    <span class="symbol"><A NAME="ref_93_4">E_Invalid_Field</A></span>    : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -13;
111    <span class="symbol"><A NAME="ref_94_4">E_Current</A></span>          : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := -14;
112
113    <b>procedure</b> <span class="symbol"><A NAME="ref_96_14" HREF="terminal_interface-curses-aux__adb.htm#ref_94_14">Eti_Exception</A></span> (<span class="symbol"><A NAME="ref_96_29" HREF="terminal_interface-curses-aux__adb.htm#ref_94_29">Code</A></span> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>);
114    <span class="comment"><EM>--  Dispatch the error code and raise the appropriate exception</EM></span>
115    <span class="comment"><EM>--</EM></span>
116    <span class="comment"><EM>--</EM></span>
117    <span class="comment"><EM>--  Some helpers</EM></span>
118    <b>function</b> Chtype_To_AttrChar <b>is</b> <b>new</b>
119      <A HREF="unchconv__ads.htm#ref_20_10">Unchecked_Conversion</A> (<A HREF="unchconv__ads.htm#ref_17_9">Source</A> =&gt; <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>,
120                            <A HREF="unchconv__ads.htm#ref_18_9">Target</A> =&gt; <A HREF="terminal_interface-curses__ads.htm#ref_353_9">Attributed_Character</A>);
121    <b>function</b> AttrChar_To_Chtype <b>is</b> <b>new</b>
122      <A HREF="unchconv__ads.htm#ref_20_10">Unchecked_Conversion</A> (<A HREF="unchconv__ads.htm#ref_17_9">Source</A> =&gt; <A HREF="terminal_interface-curses__ads.htm#ref_353_9">Attributed_Character</A>,
123                            <A HREF="unchconv__ads.htm#ref_18_9">Target</A> =&gt; <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>);
124
125    <b>function</b> AttrChar_To_AttrType <b>is</b> <b>new</b>
126      <A HREF="unchconv__ads.htm#ref_20_10">Unchecked_Conversion</A> (<A HREF="unchconv__ads.htm#ref_17_9">Source</A> =&gt; <A HREF="terminal_interface-curses__ads.htm#ref_353_9">Attributed_Character</A>,
127                            <A HREF="unchconv__ads.htm#ref_18_9">Target</A> =&gt; <A HREF="terminal_interface-curses-aux__ads.htm#ref_64_12">C_AttrType</A>);
128
129    <b>function</b> AttrType_To_AttrChar <b>is</b> <b>new</b>
130      <A HREF="unchconv__ads.htm#ref_20_10">Unchecked_Conversion</A> (<A HREF="unchconv__ads.htm#ref_17_9">Source</A> =&gt; <A HREF="terminal_interface-curses-aux__ads.htm#ref_64_12">C_AttrType</A>,
131                            <A HREF="unchconv__ads.htm#ref_18_9">Target</A> =&gt; <A HREF="terminal_interface-curses__ads.htm#ref_353_9">Attributed_Character</A>);
132
133    <b>procedure</b> <span class="symbol"><A NAME="ref_116_14" HREF="terminal_interface-curses-aux__adb.htm#ref_44_14">Fill_String</A></span> (<span class="symbol"><A NAME="ref_116_27" HREF="terminal_interface-curses-aux__adb.htm#ref_44_27">Cp</A></span>  : chars_ptr;
134                           <span class="symbol"><A NAME="ref_117_27" HREF="terminal_interface-curses-aux__adb.htm#ref_45_27">Str</A></span> : <b>out</b> String);
135    <span class="comment"><EM>--  Fill the Str parameter with the string denoted by the chars_ptr</EM></span>
136    <span class="comment"><EM>--  C-Style string.</EM></span>
137
138    <b>function</b> <span class="symbol"><A NAME="ref_121_13" HREF="terminal_interface-curses-aux__adb.htm#ref_73_13">Fill_String</A></span> (<span class="symbol"><A NAME="ref_121_26" HREF="terminal_interface-curses-aux__adb.htm#ref_73_26">Cp</A></span> : chars_ptr) <b>return</b> String;
139    <span class="comment"><EM>--  Same but as function.</EM></span>
140
141 <b>end</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_50_35">Aux</A>;
142 </PRE></BODY></HTML>