blob: a22b5d52df1c68fa456e2b7a3257e1b233b5effb [file] [log] [blame] [edit]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<TITLE>terminal_interface-curses-forms-field_types.ads</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
*.comment {
color: green;
}
*.symbol {
color: red;
}
</style>
</HEAD>
<BODY>
<HR><DIV style="text-align:center"><H1> File : terminal_interface-curses-forms-field_types.ads </H1></DIV><HR>
<PRE>
<span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- Terminal_Interface.Curses.Forms.Field_Types --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- S P E C --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- Permission is hereby granted, free of charge, to any person obtaining a --</EM></span>
<span class="comment"><EM>-- copy of this software and associated documentation files (the --</EM></span>
<span class="comment"><EM>-- "Software"), to deal in the Software without restriction, including --</EM></span>
<span class="comment"><EM>-- without limitation the rights to use, copy, modify, merge, publish, --</EM></span>
<span class="comment"><EM>-- distribute, distribute with modifications, sublicense, and/or sell --</EM></span>
<span class="comment"><EM>-- copies of the Software, and to permit persons to whom the Software is --</EM></span>
<span class="comment"><EM>-- furnished to do so, subject to the following conditions: --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- The above copyright notice and this permission notice shall be included --</EM></span>
<span class="comment"><EM>-- in all copies or substantial portions of the Software. --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --</EM></span>
<span class="comment"><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --</EM></span>
<span class="comment"><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --</EM></span>
<span class="comment"><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --</EM></span>
<span class="comment"><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --</EM></span>
<span class="comment"><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --</EM></span>
<span class="comment"><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --</EM></span>
<span class="comment"><EM>-- --</EM></span>
<span class="comment"><EM>-- Except as contained in this notice, the name(s) of the above copyright --</EM></span>
<span class="comment"><EM>-- holders shall not be used in advertising or otherwise to promote the --</EM></span>
<span class="comment"><EM>-- sale, use or other dealings in this Software without prior written --</EM></span>
<span class="comment"><EM>-- authorization. --</EM></span>
<span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- Author: Juergen Pfeifer, 1996</EM></span>
<span class="comment"><EM>-- Version Control:</EM></span>
<span class="comment"><EM>-- @Revision: 1.19 @</EM></span>
<span class="comment"><EM>-- Binding Version 01.00</EM></span>
<span class="comment"><EM>------------------------------------------------------------------------------</EM></span>
<b>with</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C;
<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>;
<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>
<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>);
<b>use</b> <b>type</b> <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.int;
<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;
<span class="comment"><EM>-- |=====================================================================</EM></span>
<span class="comment"><EM>-- | Man page <A HREF="../man/form_fieldtype.3x.html">form_fieldtype.3x</A></EM></span>
<span class="comment"><EM>-- |=====================================================================</EM></span>
<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>;
<span class="comment"><EM>-- Abstract base type for all field types. A concrete field type</EM></span>
<span class="comment"><EM>-- is an extension that adds some data elements describing formats or</EM></span>
<span class="comment"><EM>-- boundary values for the type and validation routines.</EM></span>
<span class="comment"><EM>-- For the builtin low-level fieldtypes, the validation routines are</EM></span>
<span class="comment"><EM>-- already defined by the low-level C library.</EM></span>
<span class="comment"><EM>-- The builtin types like Alpha or AlphaNumeric etc. are defined in</EM></span>
<span class="comment"><EM>-- child packages of this package. You may use one of them as example</EM></span>
<span class="comment"><EM>-- how to create you own child packages for low-level field types that</EM></span>
<span class="comment"><EM>-- you may have already written in C.</EM></span>
<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;
<span class="comment"><EM>-- #1A NAME="AFU_1"#2|</EM></span>
<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>;
<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>;
<span class="comment"><EM>-- AKA: <A HREF="../man/form_fieldtype.3x.html">set_field_type()</A></EM></span>
<span class="comment"><EM>-- But: we hide the vararg mechanism of the C interface. You always</EM></span>
<span class="comment"><EM>-- have to pass a single Field_Type parameter.</EM></span>
<span class="comment"><EM>-- ---------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- |=====================================================================</EM></span>
<span class="comment"><EM>-- | Man page <A HREF="../man/form_field_validation.3x.html">form_field_validation.3x</A></EM></span>
<span class="comment"><EM>-- |=====================================================================</EM></span>
<span class="comment"><EM>-- #1A NAME="AFU_2"#2|</EM></span>
<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>;
<span class="comment"><EM>-- AKA: <A HREF="../man/form_field_validation.3x.html">field_type()</A></EM></span>
<span class="comment"><EM>-- AKA: field_arg()</EM></span>
<span class="comment"><EM>-- In Ada95 we can combine these. If you try to retrieve the field type</EM></span>
<span class="comment"><EM>-- that is not defined as extension of the abstract tagged type above,</EM></span>
<span class="comment"><EM>-- you will raise a Form_Exception.</EM></span>
<span class="comment"><EM>-- This is not inlined</EM></span>
<span class="comment"><EM>-- +----------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- | Private Part.</EM></span>
<span class="comment"><EM>-- | Most of this is used by the implementations of the child packages.</EM></span>
<span class="comment"><EM>-- |</EM></span>
<b>private</b>
<b>type</b> <span class="symbol"><A NAME="ref_93_9">Makearg_Function</A></span> <b>is</b> <b>access</b>
<b>function</b> (<span class="symbol"><A NAME="ref_94_16">Args</A></span> : System.Address) <b>return</b> System.Address;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_93_9">Makearg_Function</A>);
<b>type</b> <span class="symbol"><A NAME="ref_97_9">Copyarg_Function</A></span> <b>is</b> <b>access</b>
<b>function</b> (<span class="symbol"><A NAME="ref_98_16">Usr</A></span> : System.Address) <b>return</b> System.Address;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_97_9">Copyarg_Function</A>);
<b>type</b> <span class="symbol"><A NAME="ref_101_9">Freearg_Function</A></span> <b>is</b> <b>access</b>
<b>procedure</b> (<span class="symbol"><A NAME="ref_102_17">Usr</A></span> : System.Address);
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_101_9">Freearg_Function</A>);
<b>type</b> <span class="symbol"><A NAME="ref_105_9">Field_Check_Function</A></span> <b>is</b> <b>access</b>
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_105_9">Field_Check_Function</A>);
<b>type</b> <span class="symbol"><A NAME="ref_109_9">Char_Check_Function</A></span> <b>is</b> <b>access</b>
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_109_9">Char_Check_Function</A>);
<b>type</b> <span class="symbol"><A NAME="ref_113_9">Choice_Function</A></span> <b>is</b> <b>access</b>
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_113_9">Choice_Function</A>);
<span class="comment"><EM>-- +----------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- | This must be in sync with the FIELDTYPE structure in form.h</EM></span>
<span class="comment"><EM>-- |</EM></span>
<b>type</b> <span class="symbol"><A NAME="ref_120_9">Low_Level_Field_Type</A></span> <b>is</b>
<b>record</b>
<span class="symbol"><A NAME="ref_122_10">Status</A></span> : <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.unsigned_short;
<span class="symbol"><A NAME="ref_123_10">Ref_Count</A></span> : <A HREF="interfac__ads.htm#ref_36_9">Interfaces</A>.C.long;
<span class="symbol"><A NAME="ref_124_10">Left</A></span>, <span class="symbol"><A NAME="ref_124_16">Right</A></span> : System.Address;
<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>;
<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>;
<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>;
<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>;
<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>;
<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>;
<b>end</b> <b>record</b>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_120_9">Low_Level_Field_Type</A>);
<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>;
<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>;
<span class="comment"><EM>-- +----------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- | This four low-level fieldtypes are the ones associated with</EM></span>
<span class="comment"><EM>-- | fieldtypes handled by this binding. Any other low-level fieldtype</EM></span>
<span class="comment"><EM>-- | will result in a Form_Exception is function Get_Type.</EM></span>
<span class="comment"><EM>-- |</EM></span>
<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>;
<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>;
<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>;
<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>;
<span class="comment"><EM>-- Two wrapper functions to access those low-level fieldtypes defined</EM></span>
<span class="comment"><EM>-- in this package.</EM></span>
<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>;
<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>;
<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>;
<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;
<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>);
<span class="comment"><EM>-- This procedure has to be called by the Set_Field_Type implementation</EM></span>
<span class="comment"><EM>-- for builtin low-level fieldtypes to replace it by an Ada95</EM></span>
<span class="comment"><EM>-- conformant Field_Type object.</EM></span>
<span class="comment"><EM>-- The parameter Cft must be C_Builtin_Router for regular low-level</EM></span>
<span class="comment"><EM>-- fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for</EM></span>
<span class="comment"><EM>-- low-level fieldtypes witch choice functions (like TYP_ENUM).</EM></span>
<span class="comment"><EM>-- Any other value will raise a Form_Exception.</EM></span>
<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;
<b>pragma</b> Import (C, Make_Arg, "void_star_make_arg");
<span class="comment"><EM>-- This is the Makearg_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced by this binding.</EM></span>
<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;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_168_13">Copy_Arg</A>);
<span class="comment"><EM>-- This is the Copyarg_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced by this binding.</EM></span>
<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);
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_173_14">Free_Arg</A>);
<span class="comment"><EM>-- This is the Freearg_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced by this binding.</EM></span>
<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>;
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_178_13">Field_Check_Router</A>);
<span class="comment"><EM>-- This is the Field_Check_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced to wrap the low-level types by a Field_Type derived</EM></span>
<span class="comment"><EM>-- type. It routes the call to the corresponding low-level validation</EM></span>
<span class="comment"><EM>-- function.</EM></span>
<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>;
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_186_13">Char_Check_Router</A>);
<span class="comment"><EM>-- This is the Char_Check_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced to wrap the low-level types by a Field_Type derived</EM></span>
<span class="comment"><EM>-- type. It routes the call to the corresponding low-level validation</EM></span>
<span class="comment"><EM>-- function.</EM></span>
<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>;
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_194_13">Next_Router</A>);
<span class="comment"><EM>-- This is the Choice_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced to wrap the low-level types by a Field_Type derived</EM></span>
<span class="comment"><EM>-- type. It routes the call to the corresponding low-level next_choice</EM></span>
<span class="comment"><EM>-- function.</EM></span>
<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>;
<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>;
<b>pragma</b> Convention (C, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_202_13">Prev_Router</A>);
<span class="comment"><EM>-- This is the Choice_Function for the internal low-level types</EM></span>
<span class="comment"><EM>-- introduced to wrap the low-level types by a Field_Type derived</EM></span>
<span class="comment"><EM>-- type. It routes the call to the corresponding low-level prev_choice</EM></span>
<span class="comment"><EM>-- function.</EM></span>
<span class="comment"><EM>-- This is the Argument structure maintained by all low-level field types</EM></span>
<span class="comment"><EM>-- introduced by this binding.</EM></span>
<b>type</b> <span class="symbol"><A NAME="ref_212_9">Argument</A></span> <b>is</b> <b>record</b>
<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>
<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>
<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>
<b>end</b> <b>record</b>;
<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>;
<span class="comment"><EM>-- +----------------------------------------------------------------------</EM></span>
<span class="comment"><EM>-- |</EM></span>
<span class="comment"><EM>-- | Some Imports of libform routines to deal with low-level fieldtypes.</EM></span>
<span class="comment"><EM>-- |</EM></span>
<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>;
<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>)
<b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_133_9">C_Field_Type</A>;
<b>pragma</b> Import (C, New_Fieldtype, "new_fieldtype");
<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>;
<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>;
<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>;
<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>)
<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>;
<b>pragma</b> Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
<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>;
<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>)
<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>;
<b>pragma</b> Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
<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>;
</PRE></BODY></HTML>