ncurses 6.0 - patch 20170422
[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-2011,2014 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.19 @</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 <b>with</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_47_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_45_35">Aux</A>;
60
61 <b>package</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_47_28">Curses</A>.<A HREF="terminal_interface-curses-forms__ads.htm#ref_45_35">Forms</A>.<span class="symbol"><A NAME="ref_44_41" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_51_46">Field_Types</A></span> <b>is</b>
62    <b>pragma</b> Preelaborate (<A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_47_28">Curses</A>.<A HREF="terminal_interface-curses-forms__ads.htm#ref_45_35">Forms</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_44_41">Field_Types</A>);
63    <b>use</b> <b>type</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
64    <b>subtype</b> <span class="symbol"><A NAME="ref_47_12">C_Int</A></span> <b>is</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
65
66    <span class="comment"><EM>--  |=====================================================================</EM></span>
67    <span class="comment"><EM>--  | Man page <A HREF="../man/form_fieldtype.3x.html">form_fieldtype.3x</A></EM></span>
68    <span class="comment"><EM>--  |=====================================================================</EM></span>
69
70    <b>type</b> <span class="symbol"><A NAME="ref_53_9">Field_Type</A></span> <b>is</b> <b>abstract</b> <b>tagged</b> <b>null</b> <b>record</b>;
71    <span class="comment"><EM>--  Abstract base type for all field types. A concrete field type</EM></span>
72    <span class="comment"><EM>--  is an extension that adds some data elements describing formats or</EM></span>
73    <span class="comment"><EM>--  boundary values for the type and validation routines.</EM></span>
74    <span class="comment"><EM>--  For the builtin low-level fieldtypes, the validation routines are</EM></span>
75    <span class="comment"><EM>--  already defined by the low-level C library.</EM></span>
76    <span class="comment"><EM>--  The builtin types like Alpha or AlphaNumeric etc. are defined in</EM></span>
77    <span class="comment"><EM>--  child packages of this package. You may use one of them as example</EM></span>
78    <span class="comment"><EM>--  how to create you own child packages for low-level field types that</EM></span>
79    <span class="comment"><EM>--  you may have already written in C.</EM></span>
80
81    <b>type</b> <span class="symbol"><A NAME="ref_64_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_53_9">Field_Type</A>'Class;
82
83    <span class="comment"><EM>--  #1A NAME="AFU_1"#2|</EM></span>
84    <b>procedure</b> <span class="symbol"><A NAME="ref_67_14">Set_Field_Type</A></span> (<span class="symbol"><A NAME="ref_67_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_67_14">Fld</A></span>      : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>;
85                              <span class="symbol"><A NAME="ref_68_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_67_14">Fld_Type</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_53_9">Field_Type</A>) <b>is</b> <b>abstract</b>;
86    <span class="comment"><EM>--  AKA: <A HREF="../man/form_fieldtype.3x.html">set_field_type()</A></EM></span>
87    <span class="comment"><EM>--  But: we hide the vararg mechanism of the C interface. You always</EM></span>
88    <span class="comment"><EM>--       have to pass a single Field_Type parameter.</EM></span>
89
90    <span class="comment"><EM>--  ---------------------------------------------------------------------</EM></span>
91
92    <span class="comment"><EM>--  |=====================================================================</EM></span>
93    <span class="comment"><EM>--  | Man page <A HREF="../man/form_field_validation.3x.html">form_field_validation.3x</A></EM></span>
94    <span class="comment"><EM>--  |=====================================================================</EM></span>
95
96    <span class="comment"><EM>--  #1A NAME="AFU_2"#2|</EM></span>
97    <b>function</b> <span class="symbol"><A NAME="ref_80_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_70_13">Get_Type</A></span> (<span class="symbol"><A NAME="ref_80_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_51_9">Field</A>) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_64_9">Field_Type_Access</A>;
98    <span class="comment"><EM>--  AKA: <A HREF="../man/form_field_validation.3x.html">field_type()</A></EM></span>
99    <span class="comment"><EM>--  AKA: field_arg()</EM></span>
100    <span class="comment"><EM>--  In Ada95 we can combine these. If you try to retrieve the field type</EM></span>
101    <span class="comment"><EM>--  that is not defined as extension of the abstract tagged type above,</EM></span>
102    <span class="comment"><EM>--  you will raise a Form_Exception.</EM></span>
103    <span class="comment"><EM>--  This is not inlined</EM></span>
104
105    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
106    <span class="comment"><EM>--  | Private Part.</EM></span>
107    <span class="comment"><EM>--  | Most of this is used by the implementations of the child packages.</EM></span>
108    <span class="comment"><EM>--  |</EM></span>
109 <b>private</b>
110    <b>type</b> <span class="symbol"><A NAME="ref_93_9">Makearg_Function</A></span> <b>is</b> <b>access</b>
111      <b>function</b> (<span class="symbol"><A NAME="ref_94_16">Args</A></span> : System.Address) <b>return</b> System.Address;
112    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_93_9">Makearg_Function</A>);
113
114    <b>type</b> <span class="symbol"><A NAME="ref_97_9">Copyarg_Function</A></span> <b>is</b> <b>access</b>
115      <b>function</b> (<span class="symbol"><A NAME="ref_98_16">Usr</A></span> : System.Address) <b>return</b> System.Address;
116    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_97_9">Copyarg_Function</A>);
117
118    <b>type</b> <span class="symbol"><A NAME="ref_101_9">Freearg_Function</A></span> <b>is</b> <b>access</b>
119      <b>procedure</b> (<span class="symbol"><A NAME="ref_102_17">Usr</A></span> : System.Address);
120    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_101_9">Freearg_Function</A>);
121
122    <b>type</b> <span class="symbol"><A NAME="ref_105_9">Field_Check_Function</A></span> <b>is</b> <b>access</b>
123      <b>function</b> (<span class="symbol"><A NAME="ref_106_16">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>; <span class="symbol"><A NAME="ref_106_29">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
124    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_105_9">Field_Check_Function</A>);
125
126    <b>type</b> <span class="symbol"><A NAME="ref_109_9">Char_Check_Function</A></span> <b>is</b> <b>access</b>
127      <b>function</b> (<span class="symbol"><A NAME="ref_110_16">Ch</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_47_12">C_Int</A>; <span class="symbol"><A NAME="ref_110_28">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
128    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_109_9">Char_Check_Function</A>);
129
130    <b>type</b> <span class="symbol"><A NAME="ref_113_9">Choice_Function</A></span> <b>is</b> <b>access</b>
131      <b>function</b> (<span class="symbol"><A NAME="ref_114_16">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>; <span class="symbol"><A NAME="ref_114_29">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
132    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_113_9">Choice_Function</A>);
133
134    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
135    <span class="comment"><EM>--  | This must be in sync with the FIELDTYPE structure in form.h</EM></span>
136    <span class="comment"><EM>--  |</EM></span>
137    <b>type</b> <span class="symbol"><A NAME="ref_120_9">Low_Level_Field_Type</A></span> <b>is</b>
138       <b>record</b>
139          <span class="symbol"><A NAME="ref_122_10">Status</A></span> :              <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.unsigned_short;
140          <span class="symbol"><A NAME="ref_123_10">Ref_Count</A></span> :           <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.long;
141          <span class="symbol"><A NAME="ref_124_10">Left</A></span>, <span class="symbol"><A NAME="ref_124_16">Right</A></span> :         System.Address;
142          <span class="symbol"><A NAME="ref_125_10">Makearg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_93_9">Makearg_Function</A>;
143          <span class="symbol"><A NAME="ref_126_10">Copyarg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_97_9">Copyarg_Function</A>;
144          <span class="symbol"><A NAME="ref_127_10">Freearg</A></span> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_101_9">Freearg_Function</A>;
145          <span class="symbol"><A NAME="ref_128_10">Fcheck</A></span> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_105_9">Field_Check_Function</A>;
146          <span class="symbol"><A NAME="ref_129_10">Ccheck</A></span> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_109_9">Char_Check_Function</A>;
147          <span class="symbol"><A NAME="ref_130_10">Next</A></span>, <span class="symbol"><A NAME="ref_130_16">Prev</A></span> :          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_113_9">Choice_Function</A>;
148       <b>end</b> <b>record</b>;
149    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_120_9">Low_Level_Field_Type</A>);
150    <b>type</b> <span class="symbol"><A NAME="ref_133_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_120_9">Low_Level_Field_Type</A>;
151
152    <span class="symbol"><A NAME="ref_135_4">Null_Field_Type</A></span>   : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <b>null</b>;
153
154    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
155    <span class="comment"><EM>--  | This four low-level fieldtypes are the ones associated with</EM></span>
156    <span class="comment"><EM>--  | fieldtypes handled by this binding. Any other low-level fieldtype</EM></span>
157    <span class="comment"><EM>--  | will result in a Form_Exception is function Get_Type.</EM></span>
158    <span class="comment"><EM>--  |</EM></span>
159    <span class="symbol"><A NAME="ref_142_4">M_Generic_Type</A></span>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <b>null</b>;
160    <span class="symbol"><A NAME="ref_143_4">M_Generic_Choice</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <b>null</b>;
161    <span class="symbol"><A NAME="ref_144_4">M_Builtin_Router</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <b>null</b>;
162    <span class="symbol"><A NAME="ref_145_4">M_Choice_Router</A></span>  : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <b>null</b>;
163
164    <span class="comment"><EM>--  Two wrapper functions to access those low-level fieldtypes defined</EM></span>
165    <span class="comment"><EM>--  in this package.</EM></span>
166    <b>function</b> <span class="symbol"><A NAME="ref_149_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_221_13">C_Builtin_Router</A></span> <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
167    <b>function</b> <span class="symbol"><A NAME="ref_150_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_244_13">C_Choice_Router</A></span>  <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
168
169    <b>procedure</b> <span class="symbol"><A NAME="ref_152_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_127_14">Wrap_Builtin</A></span> (<span class="symbol"><A NAME="ref_152_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_127_28">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>;
170                            <span class="symbol"><A NAME="ref_153_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_128_28">Typ</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_53_9">Field_Type</A>'Class;
171                            <span class="symbol"><A NAME="ref_154_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_129_28">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_149_13">C_Builtin_Router</A>);
172    <span class="comment"><EM>--  This procedure has to be called by the Set_Field_Type implementation</EM></span>
173    <span class="comment"><EM>--  for builtin low-level fieldtypes to replace it by an Ada95</EM></span>
174    <span class="comment"><EM>--  conformant Field_Type object.</EM></span>
175    <span class="comment"><EM>--  The parameter Cft must be C_Builtin_Router for regular low-level</EM></span>
176    <span class="comment"><EM>--  fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for</EM></span>
177    <span class="comment"><EM>--  low-level fieldtypes witch choice functions (like TYP_ENUM).</EM></span>
178    <span class="comment"><EM>--  Any other value will raise a Form_Exception.</EM></span>
179
180    <b>function</b> <span class="symbol"><A NAME="ref_163_13">Make_Arg</A></span> (<span class="symbol"><A NAME="ref_163_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_163_13">Args</A></span> : System.Address) <b>return</b> System.Address;
181    <b>pragma</b> Import (C, Make_Arg, "void_star_make_arg");
182    <span class="comment"><EM>--  This is the Makearg_Function for the internal low-level types</EM></span>
183    <span class="comment"><EM>--  introduced by this binding.</EM></span>
184
185    <b>function</b> <span class="symbol"><A NAME="ref_168_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_96_13">Copy_Arg</A></span> (<span class="symbol"><A NAME="ref_168_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_96_23">Usr</A></span> : System.Address) <b>return</b> System.Address;
186    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_168_13">Copy_Arg</A>);
187    <span class="comment"><EM>--  This is the Copyarg_Function for the internal low-level types</EM></span>
188    <span class="comment"><EM>--  introduced by this binding.</EM></span>
189
190    <b>procedure</b> <span class="symbol"><A NAME="ref_173_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_102_14">Free_Arg</A></span> (<span class="symbol"><A NAME="ref_173_24" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_102_24">Usr</A></span> : System.Address);
191    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_173_14">Free_Arg</A>);
192    <span class="comment"><EM>--  This is the Freearg_Function for the internal low-level types</EM></span>
193    <span class="comment"><EM>--  introduced by this binding.</EM></span>
194
195    <b>function</b> <span class="symbol"><A NAME="ref_178_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_159_13">Field_Check_Router</A></span> (<span class="symbol"><A NAME="ref_178_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_159_33">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>;
196                                 <span class="symbol"><A NAME="ref_179_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_160_33">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
197    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_178_13">Field_Check_Router</A>);
198    <span class="comment"><EM>--  This is the Field_Check_Function for the internal low-level types</EM></span>
199    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
200    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level validation</EM></span>
201    <span class="comment"><EM>--  function.</EM></span>
202
203    <b>function</b> <span class="symbol"><A NAME="ref_186_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_174_13">Char_Check_Router</A></span> (<span class="symbol"><A NAME="ref_186_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_174_32">Ch</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_47_12">C_Int</A>;
204                                <span class="symbol"><A NAME="ref_187_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_175_32">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
205    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_186_13">Char_Check_Router</A>);
206    <span class="comment"><EM>--  This is the Char_Check_Function for the internal low-level types</EM></span>
207    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
208    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level validation</EM></span>
209    <span class="comment"><EM>--  function.</EM></span>
210
211    <b>function</b> <span class="symbol"><A NAME="ref_194_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_189_13">Next_Router</A></span> (<span class="symbol"><A NAME="ref_194_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_189_26">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>;
212                          <span class="symbol"><A NAME="ref_195_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_190_26">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
213    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_194_13">Next_Router</A>);
214    <span class="comment"><EM>--  This is the Choice_Function for the internal low-level types</EM></span>
215    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
216    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level next_choice</EM></span>
217    <span class="comment"><EM>--  function.</EM></span>
218
219    <b>function</b> <span class="symbol"><A NAME="ref_202_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_204_13">Prev_Router</A></span> (<span class="symbol"><A NAME="ref_202_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_204_26">Fld</A></span> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_51_9">Field</A>;
220                          <span class="symbol"><A NAME="ref_203_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_205_26">Usr</A></span> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_2098_9">Curses_Bool</A>;
221    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_202_13">Prev_Router</A>);
222    <span class="comment"><EM>--  This is the Choice_Function for the internal low-level types</EM></span>
223    <span class="comment"><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></span>
224    <span class="comment"><EM>--  type. It routes the call to the corresponding low-level prev_choice</EM></span>
225    <span class="comment"><EM>--  function.</EM></span>
226
227    <span class="comment"><EM>--  This is the Argument structure maintained by all low-level field types</EM></span>
228    <span class="comment"><EM>--  introduced by this binding.</EM></span>
229    <b>type</b> <span class="symbol"><A NAME="ref_212_9">Argument</A></span> <b>is</b> <b>record</b>
230       <span class="symbol"><A NAME="ref_213_7">Typ</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_64_9">Field_Type_Access</A>;   <span class="comment"><EM>--  the Field_Type creating this record</EM></span>
231       <span class="symbol"><A NAME="ref_214_7">Usr</A></span> : System.Address;      <span class="comment"><EM>--  original arg for builtin low-level types</EM></span>
232       <span class="symbol"><A NAME="ref_215_7">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;        <span class="comment"><EM>--  the original low-level type</EM></span>
233    <b>end</b> <b>record</b>;
234    <b>type</b> <span class="symbol"><A NAME="ref_217_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_212_9">Argument</A>;
235
236    <span class="comment"><EM>--  +----------------------------------------------------------------------</EM></span>
237    <span class="comment"><EM>--  |</EM></span>
238    <span class="comment"><EM>--  | Some Imports of libform routines to deal with low-level fieldtypes.</EM></span>
239    <span class="comment"><EM>--  |</EM></span>
240    <b>function</b> <span class="symbol"><A NAME="ref_223_13">New_Fieldtype</A></span> (<span class="symbol"><A NAME="ref_223_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_223_13">Fcheck</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_105_9">Field_Check_Function</A>;
241                            <span class="symbol"><A NAME="ref_224_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_223_13">Ccheck</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_109_9">Char_Check_Function</A>)
242      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
243    <b>pragma</b> Import (C, New_Fieldtype, "new_fieldtype");
244
245    <b>function</b> <span class="symbol"><A NAME="ref_228_13">Set_Fieldtype_Arg</A></span> (<span class="symbol"><A NAME="ref_228_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_228_13">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
246                                <span class="symbol"><A NAME="ref_229_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_228_13">Mak</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_93_9">Makearg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_163_13">Make_Arg</A>'<b>Access</b>;
247                                <span class="symbol"><A NAME="ref_230_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_228_13">Cop</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_97_9">Copyarg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_168_13">Copy_Arg</A>'<b>Access</b>;
248                                <span class="symbol"><A NAME="ref_231_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_228_13">Fre</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_101_9">Freearg_Function</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_173_14">Free_Arg</A>'<b>Access</b>)
249      <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_45_35">Aux</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_71_9">Eti_Error</A>;
250    <b>pragma</b> Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
251
252    <b>function</b> <span class="symbol"><A NAME="ref_235_13">Set_Fieldtype_Choice</A></span> (<span class="symbol"><A NAME="ref_235_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_235_13">Cft</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
253                                   <span class="symbol"><A NAME="ref_236_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_235_13">Next</A></span>, <span class="symbol"><A NAME="ref_236_41" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_235_13">Prev</A></span> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_113_9">Choice_Function</A>)
254      <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_45_35">Aux</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_71_9">Eti_Error</A>;
255    <b>pragma</b> Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
256
257 <b>end</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_47_28">Curses</A>.<A HREF="terminal_interface-curses-forms__ads.htm#ref_45_35">Forms</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_44_41">Field_Types</A>;
258 </PRE></BODY></HTML>