ncurses 6.3 - patch 20220115
[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>--                           <strong>GNAT</strong> 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 2018,2020 Thomas E. Dickey                                     --</em></span>
28 <span class="comment"><em>-- Copyright 1998-2011,2014 Free Software Foundation, Inc.                  --</em></span>
29 <span class="comment"><em>--                                                                          --</em></span>
30 <span class="comment"><em>-- Permission is hereby granted, free of charge, to any person obtaining a  --</em></span>
31 <span class="comment"><em>-- copy of this software and associated documentation files (the            --</em></span>
32 <span class="comment"><em>-- "Software"), to deal in the Software without restriction, including      --</em></span>
33 <span class="comment"><em>-- without limitation the rights to use, copy, modify, merge, publish,      --</em></span>
34 <span class="comment"><em>-- distribute, distribute with modifications, sublicense, and/or sell       --</em></span>
35 <span class="comment"><em>-- copies of the Software, and to permit persons to whom the Software is    --</em></span>
36 <span class="comment"><em>-- furnished to do so, subject to the following conditions:                 --</em></span>
37 <span class="comment"><em>--                                                                          --</em></span>
38 <span class="comment"><em>-- The above copyright notice and this permission notice shall be included  --</em></span>
39 <span class="comment"><em>-- in all copies or substantial portions of the Software.                   --</em></span>
40 <span class="comment"><em>--                                                                          --</em></span>
41 <span class="comment"><em>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</em></span>
42 <span class="comment"><em>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</em></span>
43 <span class="comment"><em>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</em></span>
44 <span class="comment"><em>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</em></span>
45 <span class="comment"><em>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</em></span>
46 <span class="comment"><em>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</em></span>
47 <span class="comment"><em>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</em></span>
48 <span class="comment"><em>--                                                                          --</em></span>
49 <span class="comment"><em>-- Except as contained in this notice, the name(s) of the above copyright   --</em></span>
50 <span class="comment"><em>-- holders shall not be used in advertising or otherwise to promote the     --</em></span>
51 <span class="comment"><em>-- sale, use or other dealings in this Software without prior written       --</em></span>
52 <span class="comment"><em>-- authorization.                                                           --</em></span>
53 <span class="comment"><em>------------------------------------------------------------------------------</em></span>
54 <span class="comment"><em>--  Author:  Juergen Pfeifer, 1996</em></span>
55 <span class="comment"><em>--  Version Control:</em></span>
56 <span class="comment"><em>--  @Revision: 1.21 @</em></span>
57 <span class="comment"><em>--  Binding Version 01.00</em></span>
58 <span class="comment"><em>------------------------------------------------------------------------------</em></span>
59 <b>with</b> <a href="interfac__ads.htm#ref_38_9">Interfaces</a>.C;
60 <b>with</b> <a href="terminal_interface__ads.htm#ref_43_9">Terminal_Interface</a>.<a href="terminal_interface-curses__ads.htm#ref_48_28">Curses</a>.<a href="terminal_interface-curses-aux__ads.htm#ref_46_35">Aux</a>;
61
62 <b>package</b> <a href="terminal_interface__ads.htm#ref_43_9">Terminal_Interface</a>.<a href="terminal_interface-curses__ads.htm#ref_48_28">Curses</a>.<a href="terminal_interface-curses-forms__ads.htm#ref_46_35">Forms</a>.<span class="symbol"><a name="ref_45_41" href="terminal_interface-curses-forms-field_types__adb.htm#ref_52_46">Field_Types</a></span> <b>is</b>
63    <b>pragma</b> Preelaborate (<a href="terminal_interface__ads.htm#ref_43_9">Terminal_Interface</a>.<a href="terminal_interface-curses__ads.htm#ref_48_28">Curses</a>.<a href="terminal_interface-curses-forms__ads.htm#ref_46_35">Forms</a>.<a href="terminal_interface-curses-forms-field_types__ads.htm#ref_45_41">Field_Types</a>);
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_38_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>--  <A NAME="AFU_1">|</A></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">Fld</a></span>      : <a href="terminal_interface-curses-forms__ads.htm#ref_52_9">Field</a>;
85                              <span class="symbol"><a name="ref_68_30">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>--  <A NAME="AFU_2">|</A></em></span>
97    <b>function</b> <span class="symbol"><a name="ref_80_13" href="terminal_interface-curses-forms-field_types__adb.htm#ref_71_13">Get_Type</a></span> (<span class="symbol"><a name="ref_80_23" href="terminal_interface-curses-forms-field_types__adb.htm#ref_71_23">Fld</a></span> : <a href="terminal_interface-curses-forms__ads.htm#ref_52_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" href="terminal_interface-curses-forms-field_types__ads.htm#ref_45_41">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_52_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_2099_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_2099_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_52_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_2099_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_38_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_38_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_222_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_245_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_128_14">Wrap_Builtin</a></span> (<span class="symbol"><a name="ref_152_28" href="terminal_interface-curses-forms-field_types__adb.htm#ref_128_28">Fld</a></span> : <a href="terminal_interface-curses-forms__ads.htm#ref_52_9">Field</a>;
170                            <span class="symbol"><a name="ref_153_28" href="terminal_interface-curses-forms-field_types__adb.htm#ref_129_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_130_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">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_97_13">Copy_Arg</a></span> (<span class="symbol"><a name="ref_168_23" href="terminal_interface-curses-forms-field_types__adb.htm#ref_97_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_103_14">Free_Arg</a></span> (<span class="symbol"><a name="ref_173_24" href="terminal_interface-curses-forms-field_types__adb.htm#ref_103_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_160_13">Field_Check_Router</a></span> (<span class="symbol"><a name="ref_178_33" href="terminal_interface-curses-forms-field_types__adb.htm#ref_160_33">Fld</a></span> : <a href="terminal_interface-curses-forms__ads.htm#ref_52_9">Field</a>;
196                                 <span class="symbol"><a name="ref_179_33" href="terminal_interface-curses-forms-field_types__adb.htm#ref_161_33">Usr</a></span> : System.Address) <b>return</b> <a href="terminal_interface-curses__ads.htm#ref_2099_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_175_13">Char_Check_Router</a></span> (<span class="symbol"><a name="ref_186_32" href="terminal_interface-curses-forms-field_types__adb.htm#ref_175_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_176_32">Usr</a></span> : System.Address) <b>return</b> <a href="terminal_interface-curses__ads.htm#ref_2099_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_190_13">Next_Router</a></span> (<span class="symbol"><a name="ref_194_26" href="terminal_interface-curses-forms-field_types__adb.htm#ref_190_26">Fld</a></span> : <a href="terminal_interface-curses-forms__ads.htm#ref_52_9">Field</a>;
212                          <span class="symbol"><a name="ref_195_26" href="terminal_interface-curses-forms-field_types__adb.htm#ref_191_26">Usr</a></span> : System.Address) <b>return</b> <a href="terminal_interface-curses__ads.htm#ref_2099_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_205_13">Prev_Router</a></span> (<span class="symbol"><a name="ref_202_26" href="terminal_interface-curses-forms-field_types__adb.htm#ref_205_26">Fld</a></span> : <a href="terminal_interface-curses-forms__ads.htm#ref_52_9">Field</a>;
220                          <span class="symbol"><a name="ref_203_26" href="terminal_interface-curses-forms-field_types__adb.htm#ref_206_26">Usr</a></span> : System.Address) <b>return</b> <a href="terminal_interface-curses__ads.htm#ref_2099_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">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">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">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">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">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">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_46_35">Aux</a>.<a href="terminal_interface-curses-aux__ads.htm#ref_70_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">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">Next</a></span>, <span class="symbol"><a name="ref_236_41">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_46_35">Aux</a>.<a href="terminal_interface-curses-aux__ads.htm#ref_70_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_43_9">Terminal_Interface</a>.<a href="terminal_interface-curses__ads.htm#ref_48_28">Curses</a>.<a href="terminal_interface-curses-forms__ads.htm#ref_46_35">Forms</a>.<a href="terminal_interface-curses-forms-field_types__ads.htm#ref_45_41">Field_Types</a>;
258 </pre></body></html>