missing ncurses sources
[tomato.git] / release / src / router / libncurses / Ada95 / src / terminal_interface-curses-text_io.ads
blob9c40329ff4bdbdd9470bdeebbc7cf34c3d3b20a6
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT ncurses Binding --
4 -- --
5 -- Terminal_Interface.Curses.Text_IO --
6 -- --
7 -- S P E C --
8 -- --
9 ------------------------------------------------------------------------------
10 -- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
11 -- --
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: --
19 -- --
20 -- The above copyright notice and this permission notice shall be included --
21 -- in all copies or substantial portions of the Software. --
22 -- --
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. --
30 -- --
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 --
34 -- authorization. --
35 ------------------------------------------------------------------------------
36 -- Author: Juergen Pfeifer, 1996
37 -- Version Control:
38 -- $Revision: 1.14 $
39 -- Binding Version 01.00
40 ------------------------------------------------------------------------------
41 with Ada.Text_IO;
42 with Ada.IO_Exceptions;
44 package Terminal_Interface.Curses.Text_IO is
46 use type Ada.Text_IO.Count;
47 subtype Count is Ada.Text_IO.Count;
48 subtype Positive_Count is Count range 1 .. Count'Last;
50 subtype Field is Ada.Text_IO.Field;
51 subtype Number_Base is Integer range 2 .. 16;
53 type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
55 -- For most of the routines you will see a version without a Window
56 -- type parameter. They will operate on a default window, which can
57 -- be set by the user. It is initially equal to Standard_Window.
59 procedure Set_Window (Win : Window);
60 -- Set Win as the default window
62 function Get_Window return Window;
63 -- Get the current default window
65 procedure Flush (Win : Window);
66 procedure Flush;
68 --------------------------------------------
69 -- Specification of line and page lengths --
70 --------------------------------------------
72 -- There are no set routines in this package. I assume, that you allocate
73 -- the window with an appropriate size.
74 -- A scroll-window is interpreted as an page with unbounded page length,
75 -- i.e. it returns the conventional 0 as page length.
77 function Line_Length (Win : Window) return Count;
78 function Line_Length return Count;
80 function Page_Length (Win : Window) return Count;
81 function Page_Length return Count;
83 ------------------------------------
84 -- Column, Line, and Page Control --
85 ------------------------------------
86 procedure New_Line (Win : Window; Spacing : Positive_Count := 1);
87 procedure New_Line (Spacing : Positive_Count := 1);
89 procedure New_Page (Win : Window);
90 procedure New_Page;
92 procedure Set_Col (Win : Window; To : Positive_Count);
93 procedure Set_Col (To : Positive_Count);
95 procedure Set_Line (Win : Window; To : Positive_Count);
96 procedure Set_Line (To : Positive_Count);
98 function Col (Win : Window) return Positive_Count;
99 function Col return Positive_Count;
101 function Line (Win : Window) return Positive_Count;
102 function Line return Positive_Count;
104 -----------------------
105 -- Characters-Output --
106 -----------------------
108 procedure Put (Win : Window; Item : Character);
109 procedure Put (Item : Character);
111 --------------------
112 -- Strings-Output --
113 --------------------
115 procedure Put (Win : Window; Item : String);
116 procedure Put (Item : String);
118 procedure Put_Line
119 (Win : Window;
120 Item : String);
122 procedure Put_Line
123 (Item : String);
125 -- Exceptions
127 Status_Error : exception renames Ada.IO_Exceptions.Status_Error;
128 Mode_Error : exception renames Ada.IO_Exceptions.Mode_Error;
129 Name_Error : exception renames Ada.IO_Exceptions.Name_Error;
130 Use_Error : exception renames Ada.IO_Exceptions.Use_Error;
131 Device_Error : exception renames Ada.IO_Exceptions.Device_Error;
132 End_Error : exception renames Ada.IO_Exceptions.End_Error;
133 Data_Error : exception renames Ada.IO_Exceptions.Data_Error;
134 Layout_Error : exception renames Ada.IO_Exceptions.Layout_Error;
136 end Terminal_Interface.Curses.Text_IO;