1 ------------------------------------------------------------------------------
3 -- GNAT ncurses Binding --
5 -- Terminal_Interface.Curses.Text_IO --
9 ------------------------------------------------------------------------------
10 -- Copyright (c) 1998 Free Software Foundation, Inc. --
12 -- Permission is hereby granted, free of charge, to any person obtaining a --
13 -- copy of this software and associated documentation files (the --
14 -- "Software"), to deal in the Software without restriction, including --
15 -- without limitation the rights to use, copy, modify, merge, publish, --
16 -- distribute, distribute with modifications, sublicense, and/or sell --
17 -- copies of the Software, and to permit persons to whom the Software is --
18 -- furnished to do so, subject to the following conditions: --
20 -- The above copyright notice and this permission notice shall be included --
21 -- in all copies or substantial portions of the Software. --
23 -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
24 -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
25 -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
26 -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
27 -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
28 -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
29 -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
31 -- Except as contained in this notice, the name(s) of the above copyright --
32 -- holders shall not be used in advertising or otherwise to promote the --
33 -- sale, use or other dealings in this Software without prior written --
35 ------------------------------------------------------------------------------
36 -- Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
39 -- Binding Version 00.93
40 ------------------------------------------------------------------------------
42 with System.Parameters;
44 with Ada.IO_Exceptions;
46 package Terminal_Interface.Curses.Text_IO is
48 use type Ada.Text_IO.Count;
49 subtype Count is Ada.Text_IO.Count;
50 subtype Positive_Count is Count range 1 .. Count'Last;
52 subtype Field is Integer range 0 .. System.Parameters.Field_Max;
53 subtype Number_Base is Integer range 2 .. 16;
55 type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
57 -- For most of the routines you will see a version without a Window
58 -- type parameter. They will operate on a default window, which can
59 -- be set by the user. It is initially equal to Standard_Window.
61 procedure Set_Window (Win : in Window);
62 -- Set Win as the default window
64 function Get_Window return Window;
65 -- Get the current default window
67 procedure Flush (Win : in Window);
70 --------------------------------------------
71 -- Specification of line and page lengths --
72 --------------------------------------------
74 -- There are no set routines in this package. I assume, that you allocate
75 -- the window with an appropriate size.
76 -- A scroll-window is interpreted as an page with unbounded page length,
77 -- i.e. it returns the conventional 0 as page length.
79 function Line_Length (Win : in Window) return Count;
80 function Line_Length return Count;
82 function Page_Length (Win : in Window) return Count;
83 function Page_Length return Count;
85 ------------------------------------
86 -- Column, Line, and Page Control --
87 ------------------------------------
88 procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1);
89 procedure New_Line (Spacing : in Positive_Count := 1);
91 procedure New_Page (Win : in Window);
94 procedure Set_Col (Win : in Window; To : in Positive_Count);
95 procedure Set_Col (To : in Positive_Count);
97 procedure Set_Line (Win : in Window; To : in Positive_Count);
98 procedure Set_Line (To : in Positive_Count);
100 function Col (Win : in Window) return Positive_Count;
101 function Col return Positive_Count;
103 function Line (Win : in Window) return Positive_Count;
104 function Line return Positive_Count;
106 -----------------------
107 -- Characters-Output --
108 -----------------------
110 procedure Put (Win : in Window; Item : in Character);
111 procedure Put (Item : in Character);
117 procedure Put (Win : in Window; Item : in String);
118 procedure Put (Item : in String);
129 Status_Error : exception renames Ada.IO_Exceptions.Status_Error;
130 Mode_Error : exception renames Ada.IO_Exceptions.Mode_Error;
131 Name_Error : exception renames Ada.IO_Exceptions.Name_Error;
132 Use_Error : exception renames Ada.IO_Exceptions.Use_Error;
133 Device_Error : exception renames Ada.IO_Exceptions.Device_Error;
134 End_Error : exception renames Ada.IO_Exceptions.End_Error;
135 Data_Error : exception renames Ada.IO_Exceptions.Data_Error;
136 Layout_Error : exception renames Ada.IO_Exceptions.Layout_Error;
138 end Terminal_Interface.Curses.Text_IO;