]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/terminal_interface-curses-text_io_s.html
ncurses 4.2
[ncurses.git] / Ada95 / html / terminal_interface-curses-text_io_s.html
1 <HTML>
2 <HEAD>
3 <TITLE></TITLE>
4 </HEAD>
5 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
6 <PRE>
7 <I>------------------------------------------------------------------------------</I>
8 <I>--                                                                          --</I>
9 <I>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</I>
10 <I>--                                                                          --</I>
11 <I>--                     Terminal_Interface.Curses.Text_IO                    --</I>
12 <I>--                                                                          --</I>
13 <I>--                                 S P E C                                  --</I>
14 <I>--                                                                          --</I>
15 <I>------------------------------------------------------------------------------</I>
16 <I>-- Copyright (c) 1998 Free Software Foundation, Inc.                        --</I>
17 <I>--                                                                          --</I>
18 <I>-- Permission is hereby granted, free of charge, to any person obtaining a  --</I>
19 <I>-- copy of this software and associated documentation files (the            --</I>
20 <I>-- "Software"), to deal in the Software without restriction, including      --</I>
21 <I>-- without limitation the rights to use, copy, modify, merge, publish,      --</I>
22 <I>-- distribute, distribute with modifications, sublicense, and/or sell       --</I>
23 <I>-- copies of the Software, and to permit persons to whom the Software is    --</I>
24 <I>-- furnished to do so, subject to the following conditions:                 --</I>
25 <I>--                                                                          --</I>
26 <I>-- The above copyright notice and this permission notice shall be included  --</I>
27 <I>-- in all copies or substantial portions of the Software.                   --</I>
28 <I>--                                                                          --</I>
29 <I>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</I>
30 <I>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</I>
31 <I>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</I>
32 <I>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</I>
33 <I>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</I>
34 <I>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</I>
35 <I>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</I>
36 <I>--                                                                          --</I>
37 <I>-- Except as contained in this notice, the name(s) of the above copyright   --</I>
38 <I>-- holders shall not be used in advertising or otherwise to promote the     --</I>
39 <I>-- sale, use or other dealings in this Software without prior written       --</I>
40 <I>-- authorization.                                                           --</I>
41 <I>------------------------------------------------------------------------------</I>
42 <I>--  <A HREF="http://home.t-online.de/home/Juergen.Pfeifer">J&uuml;rgen Pfeifer</A>, Email: <A HREF="mailto:Juergen.Pfeifer@T-Online.de">Juergen.Pfeifer@T-Online.de</A>                      --</I>
43 <I>--  Version Control:</I>
44 <I>--  @Revision: 1.6 @</I>
45 <I>------------------------------------------------------------------------------</I>
46 <B>with</B> System;
47 <B>with</B> System.Parameters;
48 <B>with</B> Ada.Text_IO;
49 <B>with</B> Ada.IO_Exceptions;
50
51 <B>package</B> Terminal_Interface.Curses.Text_IO <B>is</B>
52
53    <B>use</B> type Ada.Text_IO.Count;
54    <B>subtype</B> Count <B>is</B> Ada.Text_IO.Count;
55    <B>subtype</B> Positive_Count <B>is</B> Count <B>range</B> 1 .. Count'Last;
56
57    <B>subtype</B> Field <B>is</B> Integer <B>range</B> 0 .. System.Parameters.Field_Max;
58    <B>subtype</B> Number_Base <B>is</B> Integer <B>range</B> 2 .. 16;
59
60    type Type_Set <B>is</B> (Lower_Case, Upper_Case, Mixed_Case);
61
62    <I>--  For most of the routines you will see a version without a Window</I>
63    <I>--  type parameter. They will operate on a default window, which can</I>
64    <I>--  be set by the user. It is initially equal to Standard_Window.</I>
65
66    <B>procedure</B> Set_Window (Win : <B>in</B> Window);
67    <I>--  Set Win as the default window</I>
68
69    <B>function</B> Get_Window <B>return</B> Window;
70    <I>--  Get the current default window</I>
71
72    <B>procedure</B> Flush (Win : <B>in</B> Window);
73    <B>procedure</B> Flush;
74
75    <I>--------------------------------------------</I>
76    <I>-- Specification of line and page lengths --</I>
77    <I>--------------------------------------------</I>
78
79    <I>--  There are no set routines in this package. I assume, that you allocate</I>
80    <I>--  the window with an appropriate size.</I>
81    <I>--  A scroll-window is interpreted as an page with unbounded page length,</I>
82    <I>--  i.e. it returns the conventional 0 as page length.</I>
83
84    <B>function</B> Line_Length (Win : <B>in</B> Window) <B>return</B> Count;
85    <B>function</B> Line_Length <B>return</B> Count;
86
87    <B>function</B> Page_Length (Win : <B>in</B> Window) <B>return</B> Count;
88    <B>function</B> Page_Length <B>return</B> Count;
89
90    <I>------------------------------------</I>
91    <I>-- Column, Line, and Page Control --</I>
92    <I>------------------------------------</I>
93    <B>procedure</B> New_Line (Win : <B>in</B> Window; Spacing : <B>in</B> Positive_Count := 1);
94    <B>procedure</B> New_Line (Spacing : <B>in</B> Positive_Count := 1);
95
96    <B>procedure</B> New_Page (Win : <B>in</B> Window);
97    <B>procedure</B> New_Page;
98
99    <B>procedure</B> Set_Col (Win : <B>in</B> Window;  To : <B>in</B> Positive_Count);
100    <B>procedure</B> Set_Col (To : <B>in</B> Positive_Count);
101
102    <B>procedure</B> Set_Line (Win : <B>in</B> Window; To : <B>in</B> Positive_Count);
103    <B>procedure</B> Set_Line (To : <B>in</B> Positive_Count);
104
105    <B>function</B> Col (Win : <B>in</B> Window) <B>return</B> Positive_Count;
106    <B>function</B> Col <B>return</B> Positive_Count;
107
108    <B>function</B> Line (Win : <B>in</B> Window) <B>return</B> Positive_Count;
109    <B>function</B> Line <B>return</B> Positive_Count;
110
111    <I>-----------------------</I>
112    <I>-- Characters-Output --</I>
113    <I>-----------------------</I>
114
115    <B>procedure</B> Put (Win  : <B>in</B> Window; Item : <B>in</B> Character);
116    <B>procedure</B> Put (Item : <B>in</B> Character);
117
118    <I>--------------------</I>
119    <I>-- Strings-Output --</I>
120    <I>--------------------</I>
121
122    <B>procedure</B> Put (Win  : <B>in</B> Window; Item : <B>in</B> String);
123    <B>procedure</B> Put (Item : <B>in</B> String);
124
125    <B>procedure</B> Put_Line
126      (Win  : <B>in</B> Window;
127       Item : <B>in</B> String);
128
129    <B>procedure</B> Put_Line
130      (Item : <B>in</B> String);
131
132    <I>--  Exceptions</I>
133
134    Status_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Status_Error;
135    Mode_Error   : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Mode_Error;
136    Name_Error   : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Name_Error;
137    Use_Error    : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Use_Error;
138    Device_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Device_Error;
139    End_Error    : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.End_Error;
140    Data_Error   : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Data_Error;
141    Layout_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Layout_Error;
142
143 <B>end</B> Terminal_Interface.Curses.Text_IO;
144
145 </PRE>
146
147 <P><HR><P>
148 <P>
149 This is BETA software. The interface is subject to change without notice.<P>
150 <!-- Do NOT delete my name or the tool name from below; -->
151 <!-- giving me credit is a condition of use of ada2html -->
152 <P><I>This hypertext format was generated by <A HREF="http://www.adahome.com/Tutorials/Lovelace/dwheeler.htm">David A. Wheeler</A>'s <A HREF="http://www.adahome.com/Resources/Tools/ada2html/ada2html.htm">ada2html</A></I>
153 </BODY>
154 </HTML>
155