]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm
ncurses 5.6 - patch 20070901
[ncurses.git] / doc / html / ada / terminal_interface-curses-forms-field_types__ads.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML><HEAD><TITLE>terminal_interface-curses-forms-field_types.ads</TITLE></HEAD>
3 <BODY>
4 <HR><DIV ALIGN="center"><H1> File : terminal_interface-curses-forms-field_types.ads </H1></DIV><HR>
5 <PRE>
6 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
7 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
8 <FONT COLOR=green><EM>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</EM></FONT>
9 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
10 <FONT COLOR=green><EM>--                 Terminal_Interface.Curses.Forms.Field_Types              --</EM></FONT>
11 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
12 <FONT COLOR=green><EM>--                                 S P E C                                  --</EM></FONT>
13 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
14 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
15 <FONT COLOR=green><EM>-- Copyright (c) 1998 Free Software Foundation, Inc.                        --</EM></FONT>
16 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
17 <FONT COLOR=green><EM>-- Permission is hereby granted, free of charge, to any person obtaining a  --</EM></FONT>
18 <FONT COLOR=green><EM>-- copy of this software and associated documentation files (the            --</EM></FONT>
19 <FONT COLOR=green><EM>-- "Software"), to deal in the Software without restriction, including      --</EM></FONT>
20 <FONT COLOR=green><EM>-- without limitation the rights to use, copy, modify, merge, publish,      --</EM></FONT>
21 <FONT COLOR=green><EM>-- distribute, distribute with modifications, sublicense, and/or sell       --</EM></FONT>
22 <FONT COLOR=green><EM>-- copies of the Software, and to permit persons to whom the Software is    --</EM></FONT>
23 <FONT COLOR=green><EM>-- furnished to do so, subject to the following conditions:                 --</EM></FONT>
24 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
25 <FONT COLOR=green><EM>-- The above copyright notice and this permission notice shall be included  --</EM></FONT>
26 <FONT COLOR=green><EM>-- in all copies or substantial portions of the Software.                   --</EM></FONT>
27 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
28 <FONT COLOR=green><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</EM></FONT>
29 <FONT COLOR=green><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</EM></FONT>
30 <FONT COLOR=green><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</EM></FONT>
31 <FONT COLOR=green><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</EM></FONT>
32 <FONT COLOR=green><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</EM></FONT>
33 <FONT COLOR=green><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</EM></FONT>
34 <FONT COLOR=green><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</EM></FONT>
35 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
36 <FONT COLOR=green><EM>-- Except as contained in this notice, the name(s) of the above copyright   --</EM></FONT>
37 <FONT COLOR=green><EM>-- holders shall not be used in advertising or otherwise to promote the     --</EM></FONT>
38 <FONT COLOR=green><EM>-- sale, use or other dealings in this Software without prior written       --</EM></FONT>
39 <FONT COLOR=green><EM>-- authorization.                                                           --</EM></FONT>
40 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
41 <FONT COLOR=green><EM>--  Author:  Juergen Pfeifer, 1996</EM></FONT>
42 <FONT COLOR=green><EM>--  Version Control:</EM></FONT>
43 <FONT COLOR=green><EM>--  @Revision: 1.14 @</EM></FONT>
44 <FONT COLOR=green><EM>--  Binding Version 01.00</EM></FONT>
45 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
46 <b>with</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C;
47
48 <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>.<FONT COLOR=red><A NAME="ref_43_41" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_51_46">Field_Types</A></FONT> <b>is</b>
49    <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>);
50    <b>use</b> <b>type</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.int;
51    <b>subtype</b> <FONT COLOR=red><A NAME="ref_46_12">C_Int</A></FONT> <b>is</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.int;
52
53    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
54    <FONT COLOR=green><EM>--  | Man page <A HREF="../man/form_fieldtype.3x.html">form_fieldtype.3x</A></EM></FONT>
55    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
56
57    <b>type</b> <FONT COLOR=red><A NAME="ref_52_9">Field_Type</A></FONT> <b>is</b> <b>abstract</b> <b>tagged</b> <b>null</b> <b>record</b>;
58    <FONT COLOR=green><EM>--  Abstract base type for all field types. A concrete field type</EM></FONT>
59    <FONT COLOR=green><EM>--  is an extension that adds some data elements describing formats or</EM></FONT>
60    <FONT COLOR=green><EM>--  boundary values for the type and validation routines.</EM></FONT>
61    <FONT COLOR=green><EM>--  For the builtin low-level fieldtypes, the validation routines are</EM></FONT>
62    <FONT COLOR=green><EM>--  already defined by the low-level C library.</EM></FONT>
63    <FONT COLOR=green><EM>--  The builtin types like Alpha or AlphaNumeric etc. are defined in</EM></FONT>
64    <FONT COLOR=green><EM>--  child packages of this package. You may use one of them as example</EM></FONT>
65    <FONT COLOR=green><EM>--  how to create you own child packages for low-level field types that</EM></FONT>
66    <FONT COLOR=green><EM>--  you may have already written in C.</EM></FONT>
67
68    <b>type</b> <FONT COLOR=red><A NAME="ref_63_9">Field_Type_Access</A></FONT> <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;
69
70    <FONT COLOR=green><EM>--  #1A NAME="AFU_1"#2|</EM></FONT>
71    <b>procedure</b> <FONT COLOR=red><A NAME="ref_66_14">Set_Field_Type</A></FONT> (<FONT COLOR=red><A NAME="ref_66_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_66_14">Fld</A></FONT>      : <b>in</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
72                              <FONT COLOR=red><A NAME="ref_67_30" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_66_14">Fld_Type</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>) <b>is</b> <b>abstract</b>;
73    <FONT COLOR=green><EM>--  AKA: <A HREF="../man/form_fieldtype.3x.html">set_field_type()</A></EM></FONT>
74    <FONT COLOR=green><EM>--  But: we hide the vararg mechanism of the C interface. You always</EM></FONT>
75    <FONT COLOR=green><EM>--       have to pass a single Field_Type parameter.</EM></FONT>
76
77    <FONT COLOR=green><EM>--  ---------------------------------------------------------------------</EM></FONT>
78
79    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
80    <FONT COLOR=green><EM>--  | Man page <A HREF="../man/form_field_validation.3x.html">form_field_validation.3x</A></EM></FONT>
81    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
82
83    <FONT COLOR=green><EM>--  #1A NAME="AFU_2"#2|</EM></FONT>
84    <b>function</b> <FONT COLOR=red><A NAME="ref_79_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_13">Get_Type</A></FONT> (<FONT COLOR=red><A NAME="ref_79_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_23">Fld</A></FONT> : <b>in</b> <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>;
85    <FONT COLOR=green><EM>--  AKA: <A HREF="../man/form_field_validation.3x.html">field_type()</A></EM></FONT>
86    <FONT COLOR=green><EM>--  AKA: field_arg()</EM></FONT>
87    <FONT COLOR=green><EM>--  In Ada95 we can combine these. If you try to retrieve the field type</EM></FONT>
88    <FONT COLOR=green><EM>--  that is not defined as extension of the abstract tagged type above,</EM></FONT>
89    <FONT COLOR=green><EM>--  you will raise a Form_Exception.</EM></FONT>
90    <FONT COLOR=green><EM>--  This is not inlined</EM></FONT>
91
92    <FONT COLOR=green><EM>--  +----------------------------------------------------------------------</EM></FONT>
93    <FONT COLOR=green><EM>--  | Private Part.</EM></FONT>
94    <FONT COLOR=green><EM>--  | Most of this is used by the implementations of the child packages.</EM></FONT>
95    <FONT COLOR=green><EM>--  |</EM></FONT>
96 <b>private</b>
97    <b>type</b> <FONT COLOR=red><A NAME="ref_92_9">Makearg_Function</A></FONT> <b>is</b> <b>access</b>
98      <b>function</b> (<FONT COLOR=red><A NAME="ref_93_16">Args</A></FONT> : System.Address) <b>return</b> System.Address;
99    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_92_9">Makearg_Function</A>);
100
101    <b>type</b> <FONT COLOR=red><A NAME="ref_96_9">Copyarg_Function</A></FONT> <b>is</b> <b>access</b>
102      <b>function</b> (<FONT COLOR=red><A NAME="ref_97_16">Usr</A></FONT> : System.Address) <b>return</b> System.Address;
103    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_96_9">Copyarg_Function</A>);
104
105    <b>type</b> <FONT COLOR=red><A NAME="ref_100_9">Freearg_Function</A></FONT> <b>is</b> <b>access</b>
106      <b>procedure</b> (<FONT COLOR=red><A NAME="ref_101_17">Usr</A></FONT> : System.Address);
107    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_100_9">Freearg_Function</A>);
108
109    <b>type</b> <FONT COLOR=red><A NAME="ref_104_9">Field_Check_Function</A></FONT> <b>is</b> <b>access</b>
110      <b>function</b> (<FONT COLOR=red><A NAME="ref_105_16">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>; <FONT COLOR=red><A NAME="ref_105_29">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
111    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>);
112
113    <b>type</b> <FONT COLOR=red><A NAME="ref_108_9">Char_Check_Function</A></FONT> <b>is</b> <b>access</b>
114      <b>function</b> (<FONT COLOR=red><A NAME="ref_109_16">Ch</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>; <FONT COLOR=red><A NAME="ref_109_28">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
115    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>);
116
117    <b>type</b> <FONT COLOR=red><A NAME="ref_112_9">Choice_Function</A></FONT> <b>is</b> <b>access</b>
118      <b>function</b> (<FONT COLOR=red><A NAME="ref_113_16">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>; <FONT COLOR=red><A NAME="ref_113_29">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
119    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>);
120
121    <FONT COLOR=green><EM>--  +----------------------------------------------------------------------</EM></FONT>
122    <FONT COLOR=green><EM>--  | This must be in sync with the FIELDTYPE structure in form.h</EM></FONT>
123    <FONT COLOR=green><EM>--  |</EM></FONT>
124    <b>type</b> <FONT COLOR=red><A NAME="ref_119_9">Low_Level_Field_Type</A></FONT> <b>is</b>
125       <b>record</b>
126          <FONT COLOR=red><A NAME="ref_121_10">Status</A></FONT> :              <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.short;
127          <FONT COLOR=red><A NAME="ref_122_10">Ref_Count</A></FONT> :           <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.long;
128          <FONT COLOR=red><A NAME="ref_123_10">Left</A></FONT>, <FONT COLOR=red><A NAME="ref_123_16">Right</A></FONT> :         System.Address;
129          <FONT COLOR=red><A NAME="ref_124_10">Makearg</A></FONT> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_92_9">Makearg_Function</A>;
130          <FONT COLOR=red><A NAME="ref_125_10">Copyarg</A></FONT> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_96_9">Copyarg_Function</A>;
131          <FONT COLOR=red><A NAME="ref_126_10">Freearg</A></FONT> :             <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_100_9">Freearg_Function</A>;
132          <FONT COLOR=red><A NAME="ref_127_10">Fcheck</A></FONT> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>;
133          <FONT COLOR=red><A NAME="ref_128_10">Ccheck</A></FONT> :              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>;
134          <FONT COLOR=red><A NAME="ref_129_10">Next</A></FONT>, <FONT COLOR=red><A NAME="ref_129_16">Prev</A></FONT> :          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>;
135       <b>end</b> <b>record</b>;
136    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_119_9">Low_Level_Field_Type</A>);
137    <b>type</b> <FONT COLOR=red><A NAME="ref_132_9">C_Field_Type</A></FONT> <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>;
138
139    <FONT COLOR=red><A NAME="ref_134_4">Null_Field_Type</A></FONT>   : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
140
141    <FONT COLOR=green><EM>--  +----------------------------------------------------------------------</EM></FONT>
142    <FONT COLOR=green><EM>--  | This four low-level fieldtypes are the ones associated with</EM></FONT>
143    <FONT COLOR=green><EM>--  | fieldtypes handled by this binding. Any other low-level fieldtype</EM></FONT>
144    <FONT COLOR=green><EM>--  | will result in a Form_Exception is function Get_Type.</EM></FONT>
145    <FONT COLOR=green><EM>--  |</EM></FONT>
146    <FONT COLOR=red><A NAME="ref_141_4">M_Generic_Type</A></FONT>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
147    <FONT COLOR=red><A NAME="ref_142_4">M_Generic_Choice</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
148    <FONT COLOR=red><A NAME="ref_143_4">M_Builtin_Router</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
149    <FONT COLOR=red><A NAME="ref_144_4">M_Choice_Router</A></FONT>  : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <b>null</b>;
150
151    <FONT COLOR=green><EM>--  Two wrapper functions to access those low-level fieldtypes defined</EM></FONT>
152    <FONT COLOR=green><EM>--  in this package.</EM></FONT>
153    <b>function</b> <FONT COLOR=red><A NAME="ref_148_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_239_13">C_Builtin_Router</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
154    <b>function</b> <FONT COLOR=red><A NAME="ref_149_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_266_13">C_Choice_Router</A></FONT>  <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
155
156    <b>procedure</b> <FONT COLOR=red><A NAME="ref_151_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_145_14">Wrap_Builtin</A></FONT> (<FONT COLOR=red><A NAME="ref_151_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_145_28">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
157                            <FONT COLOR=red><A NAME="ref_152_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_146_28">Typ</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class;
158                            <FONT COLOR=red><A NAME="ref_153_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_147_28">Cft</A></FONT> : <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>);
159    <FONT COLOR=green><EM>--  This procedure has to be called by the Set_Field_Type implementation</EM></FONT>
160    <FONT COLOR=green><EM>--  for builtin low-level fieldtypes to replace it by an Ada95</EM></FONT>
161    <FONT COLOR=green><EM>--  conformant Field_Type object.</EM></FONT>
162    <FONT COLOR=green><EM>--  The parameter Cft must be C_Builtin_Router for regular low-level</EM></FONT>
163    <FONT COLOR=green><EM>--  fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for</EM></FONT>
164    <FONT COLOR=green><EM>--  low-level fieldtypes witch choice functions (like TYP_ENUM).</EM></FONT>
165    <FONT COLOR=green><EM>--  Any other value will raise a Form_Exception.</EM></FONT>
166
167    <b>function</b> <FONT COLOR=red><A NAME="ref_162_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_97_13">Make_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_162_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_97_23">Args</A></FONT> : System.Address) <b>return</b> System.Address;
168    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A>);
169    <FONT COLOR=green><EM>--  This is the Makearg_Function for the internal low-level types</EM></FONT>
170    <FONT COLOR=green><EM>--  introduced by this binding.</EM></FONT>
171
172    <b>function</b> <FONT COLOR=red><A NAME="ref_167_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_115_13">Copy_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_167_23" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_115_23">Usr</A></FONT> : System.Address) <b>return</b> System.Address;
173    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>);
174    <FONT COLOR=green><EM>--  This is the Copyarg_Function for the internal low-level types</EM></FONT>
175    <FONT COLOR=green><EM>--  introduced by this binding.</EM></FONT>
176
177    <b>procedure</b> <FONT COLOR=red><A NAME="ref_172_14" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_121_14">Free_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_172_24" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_121_24">Usr</A></FONT> : System.Address);
178    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>);
179    <FONT COLOR=green><EM>--  This is the Freearg_Function for the internal low-level types</EM></FONT>
180    <FONT COLOR=green><EM>--  introduced by this binding.</EM></FONT>
181
182    <b>function</b> <FONT COLOR=red><A NAME="ref_177_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_181_13">Field_Check_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_177_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_181_33">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
183                                 <FONT COLOR=red><A NAME="ref_178_33" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_182_33">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
184    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A>);
185    <FONT COLOR=green><EM>--  This is the Field_Check_Function for the internal low-level types</EM></FONT>
186    <FONT COLOR=green><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></FONT>
187    <FONT COLOR=green><EM>--  type. It routes the call to the corresponding low-level validation</EM></FONT>
188    <FONT COLOR=green><EM>--  function.</EM></FONT>
189
190    <b>function</b> <FONT COLOR=red><A NAME="ref_185_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_195_13">Char_Check_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_185_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_195_32">Ch</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
191                                <FONT COLOR=red><A NAME="ref_186_32" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_196_32">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
192    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A>);
193    <FONT COLOR=green><EM>--  This is the Char_Check_Function for the internal low-level types</EM></FONT>
194    <FONT COLOR=green><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></FONT>
195    <FONT COLOR=green><EM>--  type. It routes the call to the corresponding low-level validation</EM></FONT>
196    <FONT COLOR=green><EM>--  function.</EM></FONT>
197
198    <b>function</b> <FONT COLOR=red><A NAME="ref_193_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_209_13">Next_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_193_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_209_26">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
199                          <FONT COLOR=red><A NAME="ref_194_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_210_26">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
200    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_13">Next_Router</A>);
201    <FONT COLOR=green><EM>--  This is the Choice_Function for the internal low-level types</EM></FONT>
202    <FONT COLOR=green><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></FONT>
203    <FONT COLOR=green><EM>--  type. It routes the call to the corresponding low-level next_choice</EM></FONT>
204    <FONT COLOR=green><EM>--  function.</EM></FONT>
205
206    <b>function</b> <FONT COLOR=red><A NAME="ref_201_13" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_223_13">Prev_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_201_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_223_26">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
207                          <FONT COLOR=red><A NAME="ref_202_26" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_224_26">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
208    <b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_13">Prev_Router</A>);
209    <FONT COLOR=green><EM>--  This is the Choice_Function for the internal low-level types</EM></FONT>
210    <FONT COLOR=green><EM>--  introduced to wrap the low-level types by a Field_Type derived</EM></FONT>
211    <FONT COLOR=green><EM>--  type. It routes the call to the corresponding low-level prev_choice</EM></FONT>
212    <FONT COLOR=green><EM>--  function.</EM></FONT>
213
214    <FONT COLOR=green><EM>--  This is the Argument structure maintained by all low-level field types</EM></FONT>
215    <FONT COLOR=green><EM>--  introduced by this binding.</EM></FONT>
216    <b>type</b> <FONT COLOR=red><A NAME="ref_211_9">Argument</A></FONT> <b>is</b> <b>record</b>
217       <FONT COLOR=red><A NAME="ref_212_7">Typ</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_63_9">Field_Type_Access</A>;   <FONT COLOR=green><EM>--  the Field_Type creating this record</EM></FONT>
218       <FONT COLOR=red><A NAME="ref_213_7">Usr</A></FONT> : System.Address;      <FONT COLOR=green><EM>--  original arg for builtin low-level types</EM></FONT>
219       <FONT COLOR=red><A NAME="ref_214_7">Cft</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;        <FONT COLOR=green><EM>--  the original low-level type</EM></FONT>
220    <b>end</b> <b>record</b>;
221    <b>type</b> <FONT COLOR=red><A NAME="ref_216_9">Argument_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_211_9">Argument</A>;
222
223    <FONT COLOR=green><EM>--  +----------------------------------------------------------------------</EM></FONT>
224    <FONT COLOR=green><EM>--  |</EM></FONT>
225    <FONT COLOR=green><EM>--  | Some Imports of libform routines to deal with low-level fieldtypes.</EM></FONT>
226    <FONT COLOR=green><EM>--  |</EM></FONT>
227    <b>function</b> <FONT COLOR=red><A NAME="ref_222_13">New_Fieldtype</A></FONT> (<FONT COLOR=red><A NAME="ref_222_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">Fcheck</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_104_9">Field_Check_Function</A>;
228                            <FONT COLOR=red><A NAME="ref_223_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">Ccheck</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_108_9">Char_Check_Function</A>)
229      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
230    <b>pragma</b> Import (C, New_Fieldtype, "new_fieldtype");
231
232    <b>function</b> <FONT COLOR=red><A NAME="ref_227_13">Set_Fieldtype_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_227_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Cft</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
233                                <FONT COLOR=red><A NAME="ref_228_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Mak</A></FONT> : <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>;
234                                <FONT COLOR=red><A NAME="ref_229_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Cop</A></FONT> : <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>;
235                                <FONT COLOR=red><A NAME="ref_230_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Fre</A></FONT> : <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>)
236      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
237    <b>pragma</b> Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
238
239    <b>function</b> <FONT COLOR=red><A NAME="ref_234_13">Set_Fieldtype_Choice</A></FONT> (<FONT COLOR=red><A NAME="ref_234_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Cft</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
240                                   <FONT COLOR=red><A NAME="ref_235_35" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Next</A></FONT>, <FONT COLOR=red><A NAME="ref_235_41" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Prev</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_112_9">Choice_Function</A>)
241      <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
242    <b>pragma</b> Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
243
244 <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>;
245 </PRE></BODY></HTML>