ncurses 5.9 - patch 20130518
[ncurses.git] / doc / html / ada / terminal_interface-curses-forms-field_types__ads.htm
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>terminal_interface-curses-forms-field_types.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-forms-field_types.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.Forms.Field_Types              --</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.16 @</EM></span>
56 <span class="comment"><EM>--  Binding Version 01.00</EM></span>
57 <span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
58 <b>with</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C;
59
60 <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>.<A HREF="terminal_interface-curses-forms__ads.htm#ref_49_35">Forms</A>.<span class="symbol"><A NAME="ref_43_41" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_51_46">Field_Types</A></span> <b>is</b>
61    <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-forms__ads.htm#ref_49_35">Forms</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_43_41">Field_Types</A>);
62    <b>use</b> <b>type</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
63    <b>subtype</b> <span class="symbol"><A NAME="ref_46_12">C_Int</A></span> <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
64
65    <span class="comment"><EM>--  |=====================================================================</EM></span>
66    <span class="comment"><EM>--  | Man page <A HREF="../man/form_fieldtype.3x.html">form_fieldtype.3x</A></EM></span>
67    <span class="comment"><EM>--  |=====================================================================</EM></span>
68
69    <b>type</b> <span class="symbol"><A NAME="ref_52_9">Field_Type</A></span> <b>is</b> <b>abstract</b> <b>tagged</b> <b>null</b> <b>record</b>;
70    <span class="comment"><EM>--  Abstract base type for all field types. A concrete field type</EM></span>
71    <span class="comment"><EM>--  is an extension that adds some data elements describing formats or</EM></span>
72    <span class="comment"><EM>--  boundary values for the type and validation routines.</EM></span>
73    <span class="comment"><EM>--  For the builtin low-level fieldtypes, the validation routines are</EM></span>
74    <span class="comment"><EM>--  already defined by the low-level C library.</EM></span>
75    <span class="comment"><EM>--  The builtin types like Alpha or AlphaNumeric etc. are defined in</EM></span>
76    <span class="comment"><EM>--  child packages of this package. You may use one of them as example</EM></span>
77    <span class="comment"><EM>--  how to create you own child packages for low-level field types that</EM></span>
78    <span class="comment"><EM>--  you may have already written in C.</EM></span>
79
80    <b>type</b> <span class="symbol"><A NAME="ref_63_9">Field_Type_Access</A></span> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class;
81
82    <span class="comment"><EM>--  #1A NAME="AFU_1"#2|</EM></span>
83    <b>procedure</b> <span class="symbol"><A NAME="ref_66_14">Set_Field_Type</A></span> (<span class="symbol"><A NAME="ref_66_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_66_14">Fld</A></span>      : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
84                              <span class="symbol"><A NAME="ref_67_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_66_14">Fld_Type</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>) <b>is</b> <b>abstract</b>;
85    <span class="comment"><EM>--  AKA: <A HREF="../man/form_fieldtype.3x.html">set_field_type()</A></EM></span>
86    <span class="comment"><EM>--  But: we hide the vararg mechanism of the C interface. You always</EM></span>
87    <span class="comment"><EM>--       have to pass a single Field_Type parameter.</EM></span>
88
89    <span class="comment"><EM>--  ---------------------------------------------------------------------</EM></span>
90
91    <span class="comment"><EM>--  |=====================================================================</EM></span>
92    <span class="comment"><EM>--  | Man page <A HREF="../man/form_field_validation.3x.html">form_field_validation.3x</A></EM></span>
93    <span class="comment"><EM>--  |=====================================================================</EM></span>
94
95    <span class="comment"><EM>--  #1A NAME="AFU_2"#2|</EM></span>
96    <b>function</b> <span class="symbol"><A NAME="ref_79_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_70_13">Get_Type</A></span> (<span class="symbol"><A NAME="ref_79_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_70_23">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_63_9">Field_Type_Access</A>;
97    <span class="comment"><EM>--  AKA: <A HREF="../man/form_field_validation.3x.html">field_type()</A></EM></span>
98    <span class="comment"><EM>--  AKA: field_arg()</EM></span>
99    <span class="comment"><EM>--  In Ada95 we can combine these. If you try to retrieve the field type</EM></span>
100    <span class="comment"><EM>--  that is not defined as extension of the abstract tagged type above,</EM></span>
101    <span class="comment"><EM>--  you will raise a Form_Exception.</EM></span>
102    <span class="comment"><EM>--  This is not inlined</EM></span>
103
104    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
105    <span class="comment"><EM>--  | Private Part.</EM></span>
106    <span class="comment"><EM>--  | Most of this is used by the implementations of the child packages.</EM></span>
107    <span class="comment"><EM>--  |</EM></span>
108 <b>private</b>
109    <b>type</b> <span class="symbol"><A NAME="ref_92_9">Makearg_Function</A></span> <b>is</b> <b>access</b>
110      <b>function</b> (<span class="symbol"><A NAME="ref_93_16">Args</A></span> : System.Address) <b>return</b> System.Address;
111    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_92_9">Makearg_Function</A>);
112
113    <b>type</b> <span class="symbol"><A NAME="ref_96_9">Copyarg_Function</A></span> <b>is</b> <b>access</b>
114      <b>function</b> (<span class="symbol"><A NAME="ref_97_16">Usr</A></span> : System.Address) <b>return</b> System.Address;
115    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_96_9">Copyarg_Function</A>);
116
117    <b>type</b> <span class="symbol"><A NAME="ref_100_9">Freearg_Function</A></span> <b>is</b> <b>access</b>
118      <b>procedure</b> (<span class="symbol"><A NAME="ref_101_17">Usr</A></span> : System.Address);
119    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_100_9">Freearg_Function</A>);
120
121    <b>type</b> <span class="symbol"><A NAME="ref_104_9">Field_Check_Function</A></span> <b>is</b> <b>access</b>
122      <b>function</b> (<span class="symbol"><A NAME="ref_105_16">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>; <span class="symbol"><A NAME="ref_105_29">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
123    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>);
124
125    <b>type</b> <span class="symbol"><A NAME="ref_108_9">Char_Check_Function</A></span> <b>is</b> <b>access</b>
126      <b>function</b> (<span class="symbol"><A NAME="ref_109_16">Ch</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>; <span class="symbol"><A NAME="ref_109_28">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
127    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>);
128
129    <b>type</b> <span class="symbol"><A NAME="ref_112_9">Choice_Function</A></span> <b>is</b> <b>access</b>
130      <b>function</b> (<span class="symbol"><A NAME="ref_113_16">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>; <span class="symbol"><A NAME="ref_113_29">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
131    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>);
132
133    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
134    <span class="comment"><EM>--  | This must be in sync with the FIELDTYPE structure in form.h</EM></span>
135    <span class="comment"><EM>--  |</EM></span>
136    <b>type</b> <span class="symbol"><A NAME="ref_119_9">Low_Level_Field_Type</A></span> <b>is</b>
137       <b>record</b>
138          <span class="symbol"><A NAME="ref_121_10">Status</A></span> :              <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.unsigned_short;
139          <span class="symbol"><A NAME="ref_122_10">Ref_Count</A></span> :           <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.long;
140          <span class="symbol"><A NAME="ref_123_10">Left</A></span>, <span class="symbol"><A NAME="ref_123_16">Right</A></span> :         System.Address;
141          <span class="symbol"><A NAME="ref_124_10">Makearg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_92_9">Makearg_Function</A>;
142          <span class="symbol"><A NAME="ref_125_10">Copyarg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_96_9">Copyarg_Function</A>;
143          <span class="symbol"><A NAME="ref_126_10">Freearg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_100_9">Freearg_Function</A>;
144          <span class="symbol"><A NAME="ref_127_10">Fcheck</A></span> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>;
145          <span class="symbol"><A NAME="ref_128_10">Ccheck</A></span> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>;
146          <span class="symbol"><A NAME="ref_129_10">Next</A></span>, <span class="symbol"><A NAME="ref_129_16">Prev</A></span> :          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>;
147       <b>end</b> <b>record</b>;
148    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_119_9">Low_Level_Field_Type</A>);
149    <b>type</b> <span class="symbol"><A NAME="ref_132_9">C_Field_Type</A></span> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_119_9">Low_Level_Field_Type</A>;
150
151    <span class="symbol"><A NAME="ref_134_4">Null_Field_Type</A></span>   : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
152
153    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
154    <span class="comment"><EM>--  | This four low-level fieldtypes are the ones associated with</EM></span>
155    <span class="comment"><EM>--  | fieldtypes handled by this binding. Any other low-level fieldtype</EM></span>
156    <span class="comment"><EM>--  | will result in a Form_Exception is function Get_Type.</EM></span>
157    <span class="comment"><EM>--  |</EM></span>
158    <span class="symbol"><A NAME="ref_141_4">M_Generic_Type</A></span>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
159    <span class="symbol"><A NAME="ref_142_4">M_Generic_Choice</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
160    <span class="symbol"><A NAME="ref_143_4">M_Builtin_Router</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
161    <span class="symbol"><A NAME="ref_144_4">M_Choice_Router</A></span>  : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
162
163    <span class="comment"><EM>--  Two wrapper functions to access those low-level fieldtypes defined</EM></span>
164    <span class="comment"><EM>--  in this package.</EM></span>
165    <b>function</b> <span class="symbol"><A NAME="ref_148_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_224_13">C_Builtin_Router</A></span> <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
166    <b>function</b> <span class="symbol"><A NAME="ref_149_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_251_13">C_Choice_Router</A></span>  <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
167
168    <b>procedure</b> <span class="symbol"><A NAME="ref_151_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_126_14">Wrap_Builtin</A></span> (<span class="symbol"><A NAME="ref_151_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_126_28">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
169                            <span class="symbol"><A NAME="ref_152_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_127_28">Typ</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class;
170                            <span class="symbol"><A NAME="ref_153_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_128_28">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_148_13">C_Builtin_Router</A>);
171    <span class="comment"><EM>--  This procedure has to be called by the Set_Field_Type implementation</EM></span>
172    <span class="comment"><EM>--  for builtin low-level fieldtypes to replace it by an Ada95</EM></span>
173    <span class="comment"><EM>--  conformant Field_Type object.</EM></span>
174    <span class="comment"><EM>--  The parameter Cft must be C_Builtin_Router for regular low-level</EM></span>
175    <span class="comment"><EM>--  fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for</EM></span>
176    <span class="comment"><EM>--  low-level fieldtypes witch choice functions (like TYP_ENUM).</EM></span>
177    <span class="comment"><EM>--  Any other value will raise a Form_Exception.</EM></span>
178
179    <b>function</b> <span class="symbol"><A NAME="ref_162_13">Make_Arg</A></span> (<span class="symbol"><A NAME="ref_162_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Args</A></span> : System.Address) <b>return</b> System.Address;
180    <b>pragma</b> Import (C, Make_Arg, "void_star_make_arg");
181    <span class="comment"><EM>--  This is the Makearg_Function for the internal low-level types</EM></span>
182    <span class="comment"><EM>--  introduced by this binding.</EM></span>
183
184    <b>function</b> <span class="symbol"><A NAME="ref_167_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_95_13">Copy_Arg</A></span> (<span class="symbol"><A NAME="ref_167_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_95_23">Usr</A></span> : System.Address) <b>return</b> System.Address;
185    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>);
186    <span class="comment"><EM>--  This is the Copyarg_Function for the internal low-level types</EM></span>
187    <span class="comment"><EM>--  introduced by this binding.</EM></span>
188
189    <b>procedure</b> <span class="symbol"><A NAME="ref_172_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_101_14">Free_Arg</A></span> (<span class="symbol"><A NAME="ref_172_24" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_101_24">Usr</A></span> : System.Address);
190    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>);
191    <span class="comment"><EM>--  This is the Freearg_Function for the internal low-level types</EM></span>
192    <span class="comment"><EM>--  introduced by this binding.</EM></span>
193
194    <b>function</b> <span class="symbol"><A NAME="ref_177_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_162_13">Field_Check_Router</A></span> (<span class="symbol"><A NAME="ref_177_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_162_33">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
195                                 <span class="symbol"><A NAME="ref_178_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_163_33">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
196    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A>);
197    <span class="comment"><EM>--  This is the Field_Check_Function for the internal low-level types</EM></span>
198    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
199    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level validation</EM></span>
200    <span class="comment"><EM>--  function.</EM></span>
201
202    <b>function</b> <span class="symbol"><A NAME="ref_185_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_177_13">Char_Check_Router</A></span> (<span class="symbol"><A NAME="ref_185_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_177_32">Ch</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
203                                <span class="symbol"><A NAME="ref_186_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_32">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
204    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A>);
205    <span class="comment"><EM>--  This is the Char_Check_Function for the internal low-level types</EM></span>
206    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
207    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level validation</EM></span>
208    <span class="comment"><EM>--  function.</EM></span>
209
210    <b>function</b> <span class="symbol"><A NAME="ref_193_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_13">Next_Router</A></span> (<span class="symbol"><A NAME="ref_193_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_26">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
211                          <span class="symbol"><A NAME="ref_194_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_193_26">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
212    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_13">Next_Router</A>);
213    <span class="comment"><EM>--  This is the Choice_Function for the internal low-level types</EM></span>
214    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
215    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level next_choice</EM></span>
216    <span class="comment"><EM>--  function.</EM></span>
217
218    <b>function</b> <span class="symbol"><A NAME="ref_201_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_207_13">Prev_Router</A></span> (<span class="symbol"><A NAME="ref_201_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_207_26">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
219                          <span class="symbol"><A NAME="ref_202_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_208_26">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1925_9">Curses_Bool</A>;
220    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_13">Prev_Router</A>);
221    <span class="comment"><EM>--  This is the Choice_Function for the internal low-level types</EM></span>
222    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
223    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level prev_choice</EM></span>
224    <span class="comment"><EM>--  function.</EM></span>
225
226    <span class="comment"><EM>--  This is the Argument structure maintained by all low-level field types</EM></span>
227    <span class="comment"><EM>--  introduced by this binding.</EM></span>
228    <b>type</b> <span class="symbol"><A NAME="ref_211_9">Argument</A></span> <b>is</b> <b>record</b>
229       <span class="symbol"><A NAME="ref_212_7">Typ</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_63_9">Field_Type_Access</A>;   <span class="comment"><EM>--  the Field_Type creating this record</EM></span>
230       <span class="symbol"><A NAME="ref_213_7">Usr</A></span> : System.Address;      <span class="comment"><EM>--  original arg for builtin low-level types</EM></span>
231       <span class="symbol"><A NAME="ref_214_7">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;        <span class="comment"><EM>--  the original low-level type</EM></span>
232    <b>end</b> <b>record</b>;
233    <b>type</b> <span class="symbol"><A NAME="ref_216_9">Argument_Access</A></span> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_211_9">Argument</A>;
234
235    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
236    <span class="comment"><EM>--  |</EM></span>
237    <span class="comment"><EM>--  | Some Imports of libform routines to deal with low-level fieldtypes.</EM></span>
238    <span class="comment"><EM>--  |</EM></span>
239    <b>function</b> <span class="symbol"><A NAME="ref_222_13">New_Fieldtype</A></span> (<span class="symbol"><A NAME="ref_222_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">Fcheck</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>;
240                            <span class="symbol"><A NAME="ref_223_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">Ccheck</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>)
241      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
242    <b>pragma</b> Import (C, New_Fieldtype, "new_fieldtype");
243
244    <b>function</b> <span class="symbol"><A NAME="ref_227_13">Set_Fieldtype_Arg</A></span> (<span class="symbol"><A NAME="ref_227_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
245                                <span class="symbol"><A NAME="ref_228_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Mak</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_92_9">Makearg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A>'<b>Access</b>;
246                                <span class="symbol"><A NAME="ref_229_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Cop</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_96_9">Copyarg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>'<b>Access</b>;
247                                <span class="symbol"><A NAME="ref_230_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Fre</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_100_9">Freearg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>'<b>Access</b>)
248      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
249    <b>pragma</b> Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
250
251    <b>function</b> <span class="symbol"><A NAME="ref_234_13">Set_Fieldtype_Choice</A></span> (<span class="symbol"><A NAME="ref_234_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
252                                   <span class="symbol"><A NAME="ref_235_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Next</A></span>, <span class="symbol"><A NAME="ref_235_41" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Prev</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>)
253      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
254    <b>pragma</b> Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
255
256 <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-forms__ads.htm#ref_49_35">Forms</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_43_41">Field_Types</A>;
257 </PRE></BODY></HTML>