+ type Choice_Function <B>is</B> <B>access</B>
+ <B>function</B> (Fld : Field; Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Convention (C, Choice_Function);
+
+ <I>-- +----------------------------------------------------------------------</I>
+ <I>-- | This must be in sync with the FIELDTYPE structure in form.h</I>
+ <I>-- |</I>
+ type Low_Level_Field_Type <B>is</B>
+ <B>record</B>
+ Status : <A HREF="terminal_interface-curses-aux_s.html#37:12">C_Short</A>;
+ Ref_Count : <A HREF="terminal_interface-curses-aux_s.html#38:12">C_Long_Int</A>;
+ Left, Right : System.Address;
+ Makearg : Makearg_Function;
+ Copyarg : Copyarg_Function;
+ Freearg : Freearg_Function;
+ Fcheck : Field_Check_Function;
+ Ccheck : Char_Check_Function;
+ Next, Prev : Choice_Function;
+ <B>end</B> <B>record</B>;
+ <B>pragma</B> Convention (C, Low_Level_Field_Type);
+ type C_Field_Type <B>is</B> <B>access</B> <B>all</B> Low_Level_Field_Type;
+
+ Null_Field_Type : <B>constant</B> C_Field_Type := <B>null</B>;
+
+ <I>-- +----------------------------------------------------------------------</I>
+ <I>-- | This four low-level fieldtypes are the ones associated with</I>
+ <I>-- | fieldtypes handled by this binding. Any other low-level fieldtype</I>
+ <I>-- | will result in a Form_Exception is function Get_Type.</I>
+ <I>-- |</I>
+ C_Generic_Type : C_Field_Type := Null_Field_Type;
+ C_Generic_Choice : C_Field_Type := Null_Field_Type;
+ C_Builtin_Router : C_Field_Type := Null_Field_Type;
+ C_Choice_Router : C_Field_Type := Null_Field_Type;
+
+ <B>procedure</B> Wrap_Builtin (Fld : Field;
+ Typ : Field_Type'Class;
+ Cft : C_Field_Type := C_Builtin_Router);
+ <I>-- This procedure has to be called by the Set_Field_Type implementation</I>
+ <I>-- for builtin low-level fieldtypes to replace it by an Ada95</I>
+ <I>-- conformant Field_Type object.</I>
+ <I>-- The parameter Cft must be C_Builtin_Router for regular low-level</I>
+ <I>-- fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for</I>
+ <I>-- low-level fieldtypes witch choice functions (like TYP_ENUM).</I>
+ <I>-- Any other value will raise a Form_Exception.</I>
+
+ <B>function</B> Make_Arg (Args : System.Address) <B>return</B> System.Address;
+ <B>pragma</B> Convention (C, Make_Arg);
+ <I>-- This is the Makearg_Function for the internal low-level types</I>
+ <I>-- introduced by this binding.</I>
+
+ <B>function</B> Copy_Arg (Usr : System.Address) <B>return</B> System.Address;
+ <B>pragma</B> Convention (C, Copy_Arg);
+ <I>-- This is the Copyarg_Function for the internal low-level types</I>
+ <I>-- introduced by this binding.</I>
+
+ <B>procedure</B> Free_Arg (Usr : System.Address);
+ <B>pragma</B> Convention (C, Free_Arg);
+ <I>-- This is the Freearg_Function for the internal low-level types</I>
+ <I>-- introduced by this binding.</I>
+
+ <B>function</B> Field_Check_Router (Fld : Field;
+ Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Convention (C, Field_Check_Router);
+ <I>-- This is the Field_Check_Function for the internal low-level types</I>
+ <I>-- introduced to wrap the low-level types by a Field_Type derived</I>
+ <I>-- type. It routes the call to the corresponding low-level validation</I>
+ <I>-- function.</I>
+
+ <B>function</B> Char_Check_Router (Ch : <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Convention (C, Char_Check_Router);
+ <I>-- This is the Char_Check_Function for the internal low-level types</I>
+ <I>-- introduced to wrap the low-level types by a Field_Type derived</I>
+ <I>-- type. It routes the call to the corresponding low-level validation</I>
+ <I>-- function.</I>
+
+ <B>function</B> Next_Router (Fld : Field;
+ Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Convention (C, Next_Router);
+ <I>-- This is the Choice_Function for the internal low-level types</I>
+ <I>-- introduced to wrap the low-level types by a Field_Type derived</I>
+ <I>-- type. It routes the call to the corresponding low-level next_choice</I>
+ <I>-- function.</I>
+
+ <B>function</B> Prev_Router (Fld : Field;
+ Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Convention (C, Prev_Router);
+ <I>-- This is the Choice_Function for the internal low-level types</I>
+ <I>-- introduced to wrap the low-level types by a Field_Type derived</I>
+ <I>-- type. It routes the call to the corresponding low-level prev_choice</I>
+ <I>-- function.</I>
+
+ <I>-- This is the Argument structure maintained by all low-level field types</I>
+ <I>-- introduced by this binding.</I>
+ type Argument <B>is</B> <B>record</B>
+ Typ : Field_Type_Access; <I>-- the Field_Type creating this record</I>
+ Usr : System.Address; <I>-- original arg for builtin low-level types</I>
+ Cft : C_Field_Type; <I>-- the original low-level type</I>
+ <B>end</B> <B>record</B>;
+ type Argument_Access <B>is</B> <B>access</B> <B>all</B> Argument;
+
+ <I>-- +----------------------------------------------------------------------</I>
+ <I>-- |</I>
+ <I>-- | Some Imports of libform routines to deal with low-level fieldtypes.</I>
+ <I>-- |</I>
+ <B>function</B> New_Fieldtype (Fcheck : Field_Check_Function;
+ Ccheck : Char_Check_Function)
+ <B>return</B> C_Field_Type;
+ <B>pragma</B> Import (C, New_Fieldtype, "new_fieldtype");
+
+ <B>function</B> Set_Fieldtype_Arg (Cft : C_Field_Type;
+ Mak : Makearg_Function := Make_Arg'<B>Access</B>;
+ Cop : Copyarg_Function := Copy_Arg'<B>Access</B>;
+ Fre : Freearg_Function := Free_Arg'<B>Access</B>)
+ <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
+
+ <B>function</B> Set_Fieldtype_Choice (Cft : C_Field_Type;
+ Next, Prev : Choice_Function)
+ <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+ <B>pragma</B> Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
+
+<B>end</B> Terminal_Interface.Curses.Forms.Field_Types;