Merge branch 'vendor/NCURSES'
[dragonfly.git] / contrib / ncurses / doc / html / ada / terminal_interface-curses-text_io__ads.htm
1 <HTML><HEAD><TITLE>terminal_interface-curses-text_io.ads</TITLE></HEAD>
2 <BODY>
3 <HR><DIV ALIGN="center"><H1> File : terminal_interface-curses-text_io.ads </H1></DIV><HR>
4 <PRE>
5 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
6 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
7 <FONT COLOR=green><EM>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</EM></FONT>
8 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
9 <FONT COLOR=green><EM>--                     Terminal_Interface.Curses.Text_IO                    --</EM></FONT>
10 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
11 <FONT COLOR=green><EM>--                                 S P E C                                  --</EM></FONT>
12 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
13 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
14 <FONT COLOR=green><EM>-- Copyright (c) 1998 Free Software Foundation, Inc.                        --</EM></FONT>
15 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
16 <FONT COLOR=green><EM>-- Permission is hereby granted, free of charge, to any person obtaining a  --</EM></FONT>
17 <FONT COLOR=green><EM>-- copy of this software and associated documentation files (the            --</EM></FONT>
18 <FONT COLOR=green><EM>-- "Software"), to deal in the Software without restriction, including      --</EM></FONT>
19 <FONT COLOR=green><EM>-- without limitation the rights to use, copy, modify, merge, publish,      --</EM></FONT>
20 <FONT COLOR=green><EM>-- distribute, distribute with modifications, sublicense, and/or sell       --</EM></FONT>
21 <FONT COLOR=green><EM>-- copies of the Software, and to permit persons to whom the Software is    --</EM></FONT>
22 <FONT COLOR=green><EM>-- furnished to do so, subject to the following conditions:                 --</EM></FONT>
23 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
24 <FONT COLOR=green><EM>-- The above copyright notice and this permission notice shall be included  --</EM></FONT>
25 <FONT COLOR=green><EM>-- in all copies or substantial portions of the Software.                   --</EM></FONT>
26 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
27 <FONT COLOR=green><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</EM></FONT>
28 <FONT COLOR=green><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</EM></FONT>
29 <FONT COLOR=green><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</EM></FONT>
30 <FONT COLOR=green><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</EM></FONT>
31 <FONT COLOR=green><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</EM></FONT>
32 <FONT COLOR=green><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</EM></FONT>
33 <FONT COLOR=green><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</EM></FONT>
34 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
35 <FONT COLOR=green><EM>-- Except as contained in this notice, the name(s) of the above copyright   --</EM></FONT>
36 <FONT COLOR=green><EM>-- holders shall not be used in advertising or otherwise to promote the     --</EM></FONT>
37 <FONT COLOR=green><EM>-- sale, use or other dealings in this Software without prior written       --</EM></FONT>
38 <FONT COLOR=green><EM>-- authorization.                                                           --</EM></FONT>
39 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
40 <FONT COLOR=green><EM>--  Author:  Juergen Pfeifer, 1996</EM></FONT>
41 <FONT COLOR=green><EM>--  Version Control:</EM></FONT>
42 <FONT COLOR=green><EM>--  @Revision: 1.13 @</EM></FONT>
43 <FONT COLOR=green><EM>--  Binding Version 01.00</EM></FONT>
44 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
45 <b>with</b> Ada.Text_IO;
46 <b>with</b> Ada.IO_Exceptions;
47
48 <b>package</b> <A HREF="terminal_interface__ads.htm#41_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#48_28">Curses</A>.<FONT COLOR=red><A NAME="44_35">Text_IO</A></FONT> <b>is</b>
49
50    <b>use</b> <b>type</b> Ada.Text_IO.Count;
51    <b>subtype</b> <FONT COLOR=red><A NAME="47_12">Count</A></FONT> <b>is</b> Ada.Text_IO.Count;
52    <b>subtype</b> <FONT COLOR=red><A NAME="48_12">Positive_Count</A></FONT> <b>is</b> <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A> <b>range</b> 1 .. <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A>'Last;
53
54    <b>subtype</b> <FONT COLOR=red><A NAME="50_12">Field</A></FONT> <b>is</b> Ada.Text_IO.Field;
55    <b>subtype</b> <FONT COLOR=red><A NAME="51_12">Number_Base</A></FONT> <b>is</b> Integer <b>range</b> 2 .. 16;
56
57    <b>type</b> <FONT COLOR=red><A NAME="53_9">Type_Set</A></FONT> <b>is</b> (<FONT COLOR=red><A NAME="53_22">Lower_Case</A></FONT>, <FONT COLOR=red><A NAME="53_34">Upper_Case</A></FONT>, <FONT COLOR=red><A NAME="53_46">Mixed_Case</A></FONT>);
58
59    <FONT COLOR=green><EM>--  For most of the routines you will see a version without a Window</EM></FONT>
60    <FONT COLOR=green><EM>--  type parameter. They will operate on a default window, which can</EM></FONT>
61    <FONT COLOR=green><EM>--  be set by the user. It is initially equal to Standard_Window.</EM></FONT>
62
63    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#45_14">Set_Window</A><FONT COLOR=red><A NAME="59_14"></A></FONT> (<FONT COLOR=red><A NAME="59_26">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>);
64    <FONT COLOR=green><EM>--  Set Win as the default window</EM></FONT>
65
66    <b>function</b> <FONT COLOR=red><A NAME="62_13">Get_Window</A></FONT> <b>return</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>;
67    <FONT COLOR=green><EM>--  Get the current default window</EM></FONT>
68
69    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#62_14">Flush</A><FONT COLOR=red><A NAME="65_14"></A></FONT> (<FONT COLOR=red><A NAME="65_21">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>);
70    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#68_14">Flush</A><FONT COLOR=red><A NAME="66_14"></A></FONT>;
71
72    <FONT COLOR=green><EM>--------------------------------------------</EM></FONT>
73    <FONT COLOR=green><EM>-- Specification of line and page lengths --</EM></FONT>
74    <FONT COLOR=green><EM>--------------------------------------------</EM></FONT>
75
76    <FONT COLOR=green><EM>--  There are no set routines in this package. I assume, that you allocate</EM></FONT>
77    <FONT COLOR=green><EM>--  the window with an appropriate size.</EM></FONT>
78    <FONT COLOR=green><EM>--  A scroll-window is interpreted as an page with unbounded page length,</EM></FONT>
79    <FONT COLOR=green><EM>--  i.e. it returns the conventional 0 as page length.</EM></FONT>
80
81    <b>function</b> <FONT COLOR=red><A NAME="77_13">Line_Length</A></FONT> (<FONT COLOR=red><A NAME="77_26">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A>;
82    <b>function</b> <FONT COLOR=red><A NAME="78_13">Line_Length</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A>;
83
84    <b>function</b> <FONT COLOR=red><A NAME="80_13">Page_Length</A></FONT> (<FONT COLOR=red><A NAME="80_26">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A>;
85    <b>function</b> <FONT COLOR=red><A NAME="81_13">Page_Length</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#47_12">Count</A>;
86
87    <FONT COLOR=green><EM>------------------------------------</EM></FONT>
88    <FONT COLOR=green><EM>-- Column, Line, and Page Control --</EM></FONT>
89    <FONT COLOR=green><EM>------------------------------------</EM></FONT>
90    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#126_14">New_Line</A><FONT COLOR=red><A NAME="86_14"></A></FONT> (<FONT COLOR=red><A NAME="86_24">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>; <FONT COLOR=red><A NAME="86_41">Spacing</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A> := 1);
91    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#143_14">New_Line</A><FONT COLOR=red><A NAME="87_14"></A></FONT> (<FONT COLOR=red><A NAME="87_24">Spacing</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A> := 1);
92
93    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#149_14">New_Page</A><FONT COLOR=red><A NAME="89_14"></A></FONT> (<FONT COLOR=red><A NAME="89_24">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>);
94    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#155_14">New_Page</A><FONT COLOR=red><A NAME="90_14"></A></FONT>;
95
96    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#161_14">Set_Col</A><FONT COLOR=red><A NAME="92_14"></A></FONT> (<FONT COLOR=red><A NAME="92_23">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>;  <FONT COLOR=red><A NAME="92_41">To</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>);
97    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#189_14">Set_Col</A><FONT COLOR=red><A NAME="93_14"></A></FONT> (<FONT COLOR=red><A NAME="93_23">To</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>);
98
99    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#195_14">Set_Line</A><FONT COLOR=red><A NAME="95_14"></A></FONT> (<FONT COLOR=red><A NAME="95_24">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>; <FONT COLOR=red><A NAME="95_41">To</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>);
100    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#218_14">Set_Line</A><FONT COLOR=red><A NAME="96_14"></A></FONT> (<FONT COLOR=red><A NAME="96_24">To</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>);
101
102    <b>function</b> <FONT COLOR=red><A NAME="98_13">Col</A></FONT> (<FONT COLOR=red><A NAME="98_18">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>;
103    <b>function</b> <FONT COLOR=red><A NAME="99_13">Col</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>;
104
105    <b>function</b> <FONT COLOR=red><A NAME="101_13">Line</A></FONT> (<FONT COLOR=red><A NAME="101_19">Win</A></FONT> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>;
106    <b>function</b> <FONT COLOR=red><A NAME="102_13">Line</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-text_io__ads.htm#48_12">Positive_Count</A>;
107
108    <FONT COLOR=green><EM>-----------------------</EM></FONT>
109    <FONT COLOR=green><EM>-- Characters-Output --</EM></FONT>
110    <FONT COLOR=green><EM>-----------------------</EM></FONT>
111
112    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#268_14">Put</A><FONT COLOR=red><A NAME="108_14"></A></FONT> (<FONT COLOR=red><A NAME="108_19">Win</A></FONT>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>; <FONT COLOR=red><A NAME="108_37">Item</A></FONT> : <b>in</b> Character);
113    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#286_14">Put</A><FONT COLOR=red><A NAME="109_14"></A></FONT> (<FONT COLOR=red><A NAME="109_19">Item</A></FONT> : <b>in</b> Character);
114
115    <FONT COLOR=green><EM>--------------------</EM></FONT>
116    <FONT COLOR=green><EM>-- Strings-Output --</EM></FONT>
117    <FONT COLOR=green><EM>--------------------</EM></FONT>
118
119    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#296_14">Put</A><FONT COLOR=red><A NAME="115_14"></A></FONT> (<FONT COLOR=red><A NAME="115_19">Win</A></FONT>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>; <FONT COLOR=red><A NAME="115_37">Item</A></FONT> : <b>in</b> String);
120    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#314_14">Put</A><FONT COLOR=red><A NAME="116_14"></A></FONT> (<FONT COLOR=red><A NAME="116_19">Item</A></FONT> : <b>in</b> String);
121
122    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#320_14">Put_Line</A><FONT COLOR=red><A NAME="118_14"></A></FONT>
123      (<FONT COLOR=red><A NAME="119_7">Win</A></FONT>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#56_9">Window</A>;
124       <FONT COLOR=red><A NAME="120_7">Item</A></FONT> : <b>in</b> String);
125
126    <b>procedure</b> <A HREF="terminal_interface-curses-text_io__adb.htm#329_14">Put_Line</A><FONT COLOR=red><A NAME="122_14"></A></FONT>
127      (<FONT COLOR=red><A NAME="123_7">Item</A></FONT> : <b>in</b> String);
128
129    <FONT COLOR=green><EM>--  Exceptions</EM></FONT>
130
131    <FONT COLOR=red><A NAME="127_4">Status_Error</A></FONT> : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Status_Error;
132    <FONT COLOR=red><A NAME="128_4">Mode_Error</A></FONT>   : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Mode_Error;
133    <FONT COLOR=red><A NAME="129_4">Name_Error</A></FONT>   : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Name_Error;
134    <FONT COLOR=red><A NAME="130_4">Use_Error</A></FONT>    : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Use_Error;
135    <FONT COLOR=red><A NAME="131_4">Device_Error</A></FONT> : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Device_Error;
136    <FONT COLOR=red><A NAME="132_4">End_Error</A></FONT>    : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.End_Error;
137    <FONT COLOR=red><A NAME="133_4">Data_Error</A></FONT>   : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Data_Error;
138    <FONT COLOR=red><A NAME="134_4">Layout_Error</A></FONT> : <b>exception</b> <b>renames</b> Ada.IO_Exceptions.Layout_Error;
139
140 <b>end</b> <A HREF="terminal_interface__ads.htm#41_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#48_28">Curses</A>.<A HREF="terminal_interface-curses-text_io__ads.htm#44_35">Text_IO</A><A HREF="terminal_interface-curses-text_io__ads.htm#44_35">;</A>
141 </PRE></BODY></HTML>