]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/gen/terminal_interface-curses.ads.m4
11930d9709ee10508b6abf60d4d2cfa44712aa39
[ncurses.git] / Ada95 / gen / terminal_interface-curses.ads.m4
1 --  -*- ada -*-
2 define(`HTMLNAME',`terminal_interface-curses__ads.htm')dnl
3 include(M4MACRO)------------------------------------------------------------------------------
4 --                                                                          --
5 --                           GNAT ncurses Binding                           --
6 --                                                                          --
7 --                         Terminal_Interface.Curses                        --
8 --                                                                          --
9 --                                 S P E C                                  --
10 --                                                                          --
11 ------------------------------------------------------------------------------
12 -- Copyright (c) 1998 Free Software Foundation, Inc.                        --
13 --                                                                          --
14 -- Permission is hereby granted, free of charge, to any person obtaining a  --
15 -- copy of this software and associated documentation files (the            --
16 -- "Software"), to deal in the Software without restriction, including      --
17 -- without limitation the rights to use, copy, modify, merge, publish,      --
18 -- distribute, distribute with modifications, sublicense, and/or sell       --
19 -- copies of the Software, and to permit persons to whom the Software is    --
20 -- furnished to do so, subject to the following conditions:                 --
21 --                                                                          --
22 -- The above copyright notice and this permission notice shall be included  --
23 -- in all copies or substantial portions of the Software.                   --
24 --                                                                          --
25 -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
26 -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
27 -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
28 -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
29 -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
30 -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
31 -- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
32 --                                                                          --
33 -- Except as contained in this notice, the name(s) of the above copyright   --
34 -- holders shall not be used in advertising or otherwise to promote the     --
35 -- sale, use or other dealings in this Software without prior written       --
36 -- authorization.                                                           --
37 ------------------------------------------------------------------------------
38 --  Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1996
39 --  Version Control:
40 --  $Revision: 1.28 $
41 --  Binding Version 01.00
42 ------------------------------------------------------------------------------
43 include(`Base_Defs')
44 with System.Storage_Elements;
45 with Interfaces.C;   --  We need this for some assertions.
46
47 package Terminal_Interface.Curses is
48    pragma Preelaborate (Terminal_Interface.Curses);
49 include(`Linker_Options')
50 include(`Version_Info')
51    type Window is private;
52    Null_Window : constant Window;
53
54    type Line_Position   is new Natural; --  line coordinate
55    type Column_Position is new Natural; --  column coordinate
56
57    subtype Line_Count   is Line_Position   range 1 .. Line_Position'Last;
58    --  Type to count lines. We do not allow null windows, so must be positive
59    subtype Column_Count is Column_Position range 1 .. Column_Position'Last;
60    --  Type to count columns. We do not allow null windows, so must be positive
61
62    type Key_Code is new Natural;
63    --  That is anything including real characters, special keys and logical
64    --  request codes.
65
66    subtype Real_Key_Code is Key_Code range 0 .. M4_KEY_MAX;
67    --  This are the codes that potentially represent a real keystroke.
68    --  Not all codes may be possible on a specific terminal. To check the
69    --  availability of a special key, the Has_Key function is provided.
70
71    subtype Special_Key_Code is Real_Key_Code
72      range M4_SPECIAL_FIRST .. Real_Key_Code'Last;
73    --  Type for a function- or special key number
74
75    subtype Normal_Key_Code is Real_Key_Code range
76      Character'Pos (Character'First) .. Character'Pos (Character'Last);
77    --  This are the codes for regular (incl. non-graphical) characters.
78
79    --  Constants for function- and special keys
80    --
81    Key_None                       : constant Special_Key_Code := M4_SPECIAL_FIRST;
82 include(`Key_Definitions')
83    Key_Max                        : constant Special_Key_Code
84      := Special_Key_Code'Last;
85
86    subtype User_Key_Code is Key_Code
87      range (Key_Max + 129) .. Key_Code'Last;
88    --  This is reserved for user defined key codes. The range between Key_Max
89    --  and the first user code is reserved for subsystems like menu and forms.
90
91    --  For those who like to use the original key names we produce them were
92    --  they differ from the original. Please note that they may differ in
93    --  lower/upper case.
94 include(`Old_Keys')dnl
95
96 ------------------------------------------------------------------------------
97
98    type Color_Number is range 0 .. Integer (Interfaces.C.short'Last);
99    for Color_Number'Size use Interfaces.C.short'Size;
100    --  (n)curses uses a short for the color index
101    --  The model is, that a Color_Number is an index into an array of
102    --  (potentially) definable colors. Some of those indices are
103    --  predefined (see below), although they may not really exist.
104
105 include(`Color_Defs')
106    type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
107    for RGB_Value'Size use Interfaces.C.short'Size;
108    --  Some system may allow to redefine a color by setting RGB values.
109
110    type Color_Pair is range 0 .. 255;
111    for Color_Pair'Size use 8;
112    subtype Redefinable_Color_Pair is Color_Pair range 1 .. 255;
113    --  (n)curses reserves 1 Byte for the color-pair number. Color Pair 0
114    --  is fixed (Black & White). A color pair is simply a combination of
115    --  two colors described by Color_Numbers, one for the foreground and
116    --  the other for the background
117
118 include(`Character_Attribute_Set_Rep')
119    --  (n)curses uses all but the lowest 16 Bits for Attributes.
120
121    Normal_Video : constant Character_Attribute_Set := (others => False);
122
123    type Attributed_Character is
124       record
125          Attr  : Character_Attribute_Set;
126          Color : Color_Pair;
127          Ch    : Character;
128       end record;
129    pragma Convention (C, Attributed_Character);
130    --  This is the counterpart for the chtype in C.
131
132 include(`AC_Rep')
133    Default_Character : constant Attributed_Character
134      := (Ch    => Character'First,
135          Color => Color_Pair'First,
136          Attr  => (others => False));  --  preelaboratable Normal_Video
137
138    type Attributed_String is array (Positive range <>) of Attributed_Character;
139    pragma Pack (Attributed_String);
140    --  In this binding we allow strings of attributed characters.
141
142    ------------------
143    --  Exceptions  --
144    ------------------
145    Curses_Exception     : exception;
146    Wrong_Curses_Version : exception;
147
148    --  Those exceptions are raised by the ETI (Extended Terminal Interface)
149    --  subpackets for Menu and Forms handling.
150    --
151    Eti_System_Error    : exception;
152    Eti_Bad_Argument    : exception;
153    Eti_Posted          : exception;
154    Eti_Connected       : exception;
155    Eti_Bad_State       : exception;
156    Eti_No_Room         : exception;
157    Eti_Not_Posted      : exception;
158    Eti_Unknown_Command : exception;
159    Eti_No_Match        : exception;
160    Eti_Not_Selectable  : exception;
161    Eti_Not_Connected   : exception;
162    Eti_Request_Denied  : exception;
163    Eti_Invalid_Field   : exception;
164    Eti_Current         : exception;
165
166    --------------------------------------------------------------------------
167    --  External C variables
168    --  Conceptually even in C this are kind of constants, but they are
169    --  initialized and sometimes changed by the library routines at runtime
170    --  depending on the type of terminal. I believe the best way to model
171    --  this is to use functions.
172    --------------------------------------------------------------------------
173
174    function Lines            return Line_Count;
175    pragma Inline (Lines);
176
177    function Columns          return Column_Count;
178    pragma Inline (Columns);
179
180    function Tab_Size         return Natural;
181    pragma Inline (Tab_Size);
182
183    function Number_Of_Colors return Natural;
184    pragma Inline (Number_Of_Colors);
185
186    function Number_Of_Color_Pairs return Natural;
187    pragma Inline (Number_Of_Color_Pairs);
188
189    ACS_Map : array (Character'Val (0) .. Character'Val (127)) of
190      Attributed_Character;
191    pragma Import (C, ACS_Map, "acs_map");
192    --
193    --
194    --  Constants for several characters from the Alternate Character Set
195    --  You must use this constants as indices into the ACS_Map array
196    --  to get the corresponding attributed character at runtime.
197    --
198 include(`ACS_Map')dnl
199
200    --  MANPAGE(`curs_initscr.3x')
201    --  | Not implemented: newterm, set_term, delscreen
202
203    --  ANCHOR(`stdscr',`Standard_Window')
204    function Standard_Window return Window;
205    --  AKA
206    pragma Inline (Standard_Window);
207
208    --  ANCHOR(`initscr()',`Init_Screen')
209    procedure Init_Screen;
210
211    --  ANCHOR(`initscr()',`Init_Windows')
212    procedure Init_Windows renames Init_Screen;
213    --  AKA
214    pragma Inline (Init_Screen);
215    pragma Inline (Init_Windows);
216
217    --  ANCHOR(`endwin()',`End_Windows')
218    procedure End_Windows;
219    --  AKA
220    procedure End_Screen renames End_Windows;
221    pragma Inline (End_Windows);
222    pragma Inline (End_Screen);
223
224    --  ANCHOR(`isendwin()',`Is_End_Window')
225    function Is_End_Window return Boolean;
226    --  AKA
227    pragma Inline (Is_End_Window);
228
229    --  MANPAGE(`curs_move.3x')
230
231    --  ANCHOR(`wmove()',`Move_Cursor')
232    procedure Move_Cursor (Win    : in Window := Standard_Window;
233                           Line   : in Line_Position;
234                           Column : in Column_Position);
235    --  AKA
236    pragma Inline (Move_Cursor);
237
238    --  MANPAGE(`curs_addch.3x')
239
240    --  ANCHOR(`waddch()',`Add')
241    procedure Add (Win :  in Window := Standard_Window;
242                   Ch  :  in Attributed_Character);
243    --  AKA
244
245    procedure Add (Win :  in Window := Standard_Window;
246                   Ch  :  in Character);
247    --  Add a single character at the current logical cursor position to
248    --  the window. Use the current windows attributes.
249
250    --  ANCHOR(`mvwaddch()',`Add')
251    procedure Add
252      (Win    : in Window := Standard_Window;
253       Line   : in Line_Position;
254       Column : in Column_Position;
255       Ch     : in Attributed_Character);
256    --  AKA
257
258    procedure Add
259      (Win    : in Window := Standard_Window;
260       Line   : in Line_Position;
261       Column : in Column_Position;
262       Ch     : in Character);
263    --  Move to the position and add a single character into the window
264    --  There are more Add routines, so the Inline pragma follows later
265
266    --  ANCHOR(`wechochar()',`Add_With_Immediate_Echo')
267    procedure Add_With_Immediate_Echo
268      (Win : in Window := Standard_Window;
269       Ch  : in Attributed_Character);
270    --  AKA
271
272    procedure Add_With_Immediate_Echo
273      (Win : in Window := Standard_Window;
274       Ch  : in Character);
275    --  Add a character and do an immediate refresh of the screen.
276    pragma Inline (Add_With_Immediate_Echo);
277
278    --  MANPAGE(`curs_window.3x')
279
280    --  ANCHOR(`newwin()',`Create')
281    function Create
282      (Number_Of_Lines       : Line_Count;
283       Number_Of_Columns     : Column_Count;
284       First_Line_Position   : Line_Position;
285       First_Column_Position : Column_Position) return Window;
286    --  AKA
287    pragma Inline (Create);
288
289    function New_Window
290      (Number_Of_Lines       : Line_Count;
291       Number_Of_Columns     : Column_Count;
292       First_Line_Position   : Line_Position;
293       First_Column_Position : Column_Position) return Window
294      renames Create;
295    pragma Inline (New_Window);
296
297    --  ANCHOR(`delwin()',`Delete')
298    procedure Delete (Win : in out Window);
299    --  AKA
300    --  Reset Win to Null_Window
301    pragma Inline (Delete);
302
303    --  ANCHOR(`subwin()',`Sub_Window')
304    function Sub_Window
305      (Win                   : Window := Standard_Window;
306       Number_Of_Lines       : Line_Count;
307       Number_Of_Columns     : Column_Count;
308       First_Line_Position   : Line_Position;
309       First_Column_Position : Column_Position) return Window;
310    --  AKA
311    pragma Inline (Sub_Window);
312
313    --  ANCHOR(`derwin()',`Derived_Window')
314    function Derived_Window
315      (Win                   : Window := Standard_Window;
316       Number_Of_Lines       : Line_Count;
317       Number_Of_Columns     : Column_Count;
318       First_Line_Position   : Line_Position;
319       First_Column_Position : Column_Position) return Window;
320    --  AKA
321    pragma Inline (Derived_Window);
322
323    --  ANCHOR(`dupwin()',`Duplicate')
324    function Duplicate (Win : Window) return Window;
325    --  AKA
326    pragma Inline (Duplicate);
327
328    --  ANCHOR(`mvwin()',`Move_Window')
329    procedure Move_Window (Win    : in Window;
330                           Line   : in Line_Position;
331                           Column : in Column_Position);
332    --  AKA
333    pragma Inline (Move_Window);
334
335    --  ANCHOR(`mvderwin()',`Move_Derived_Window')
336    procedure Move_Derived_Window (Win    : in Window;
337                                   Line   : in Line_Position;
338                                   Column : in Column_Position);
339    --  AKA
340    pragma Inline (Move_Derived_Window);
341
342    --  ANCHOR(`wsyncup()',`Synchronize_Upwards')
343    procedure Synchronize_Upwards (Win : in Window);
344    --  AKA
345    pragma Import (C, Synchronize_Upwards, "wsyncup");
346
347    --  ANCHOR(`wsyncdown()',`Synchronize_Downwards')
348    procedure Synchronize_Downwards (Win : in Window);
349    --  AKA
350    pragma Import (C, Synchronize_Downwards, "wsyncdown");
351
352    --  ANCHOR(`syncok()',`Set_Synch_Mode')
353    procedure Set_Synch_Mode (Win  : in Window := Standard_Window;
354                              Mode : in Boolean := False);
355    --  AKA
356    pragma Inline (Set_Synch_Mode);
357
358    --  MANPAGE(`curs_addstr.3x')
359
360    --  ANCHOR(`waddnstr()',`Add')
361    procedure Add (Win : in Window := Standard_Window;
362                   Str : in String;
363                   Len : in Integer := -1);
364    --  AKA
365    --  ALIAS(`waddstr()')
366
367    --  ANCHOR(`mvwaddnstr()',`Add')
368    procedure Add (Win    : in Window := Standard_Window;
369                   Line   : in Line_Position;
370                   Column : in Column_Position;
371                   Str    : in String;
372                   Len    : in Integer := -1);
373    --  AKA
374    --  ALIAS(`mvwaddstr()')
375
376    --  MANPAGE(`curs_addchstr.3x')
377
378    --  ANCHOR(`waddchnstr()',`Add')
379    procedure Add (Win : in Window := Standard_Window;
380                   Str : in Attributed_String;
381                   Len : in Integer := -1);
382    --  AKA
383    --  ALIAS(`waddchstr()')
384
385    --  ANCHOR(`mvwaddchnstr()',`Add')
386    procedure Add (Win    : in Window := Standard_Window;
387                   Line   : in Line_Position;
388                   Column : in Column_Position;
389                   Str    : in Attributed_String;
390                   Len    : in Integer := -1);
391    --  AKA
392    --  ALIAS(`mvwaddchstr()')
393    pragma Inline (Add);
394
395    --  MANPAGE(`curs_border.3x')
396
397    --  ANCHOR(`wborder()',`Border')
398    procedure Border
399      (Win                       : in Window := Standard_Window;
400       Left_Side_Symbol          : in Attributed_Character := Default_Character;
401       Right_Side_Symbol         : in Attributed_Character := Default_Character;
402       Top_Side_Symbol           : in Attributed_Character := Default_Character;
403       Bottom_Side_Symbol        : in Attributed_Character := Default_Character;
404       Upper_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
405       Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
406       Lower_Left_Corner_Symbol  : in Attributed_Character := Default_Character;
407       Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
408      );
409    --  AKA
410    pragma Inline (Border);
411
412    --  ANCHOR(`box()',`Box')
413    procedure Box
414      (Win               : in Window := Standard_Window;
415       Vertical_Symbol   : in Attributed_Character := Default_Character;
416       Horizontal_Symbol : in Attributed_Character := Default_Character);
417    --  AKA
418    pragma Inline (Box);
419
420    --  ANCHOR(`whline()',`Horizontal_Line')
421    procedure Horizontal_Line
422      (Win         : in Window := Standard_Window;
423       Line_Size   : in Natural;
424       Line_Symbol : in Attributed_Character := Default_Character);
425    --  AKA
426    pragma Inline (Horizontal_Line);
427
428    --  ANCHOR(`wvline()',`Vertical_Line')
429    procedure Vertical_Line
430      (Win         : in Window := Standard_Window;
431       Line_Size   : in Natural;
432       Line_Symbol : in Attributed_Character := Default_Character);
433    --  AKA
434    pragma Inline (Vertical_Line);
435
436    --  MANPAGE(`curs_getch.3x')
437
438    --  ANCHOR(`wgetch()',`Get_Keystroke')
439    function Get_Keystroke (Win : Window := Standard_Window)
440                            return Real_Key_Code;
441    --  AKA
442    --  Get a character from the keyboard and echo it - if enabled - to the
443    --  window.
444    --  If for any reason (i.e. a timeout) we couldn't get a character the
445    --  returned keycode is Key_None.
446    pragma Inline (Get_Keystroke);
447
448    --  ANCHOR(`ungetch()',`Undo_Keystroke')
449    procedure Undo_Keystroke (Key : in Real_Key_Code);
450    --  AKA
451    pragma Inline (Undo_Keystroke);
452
453    --  ANCHOR(`has_key()',`Has_Key')
454    function Has_Key (Key : Special_Key_Code) return Boolean;
455    --  AKA
456    pragma Inline (Has_Key);
457
458    --  |
459    --  | Some helper functions
460    --  |
461    function Is_Function_Key (Key : Special_Key_Code) return Boolean;
462    --  Return True if the Key is a function key (i.e. one of F0 .. F63)
463    pragma Inline (Is_Function_Key);
464
465    subtype Function_Key_Number is Integer range 0 .. 63;
466    --  (n)curses allows for 64 function keys.
467
468    function Function_Key (Key : Real_Key_Code) return Function_Key_Number;
469    --  Return the number of the function key. If the code is not a
470    --  function key, a CONSTRAINT_ERROR will be raised.
471    pragma Inline (Function_Key);
472
473    function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code;
474    --  Return the key code for a given function-key number.
475    pragma Inline (Function_Key_Code);
476
477    --  MANPAGE(`curs_attr.3x')
478
479    --  ANCHOR(`wattron()',`Switch_Character_Attribute')
480    procedure Switch_Character_Attribute
481      (Win  : in Window := Standard_Window;
482       Attr : in Character_Attribute_Set := Normal_Video;
483       On   : in Boolean := True); --  if False we switch Off.
484    --  AKA
485    --  ALIAS(`wattroff()')
486
487    --  ANCHOR(`wattrset()',`Set_Character_Attributes')
488    procedure Set_Character_Attributes
489      (Win   : in Window := Standard_Window;
490       Attr  : in Character_Attribute_Set := Normal_Video;
491       Color : in Color_Pair := Color_Pair'First);
492    --  AKA
493    pragma Inline (Set_Character_Attributes);
494
495    --  ANCHOR(`wattr_get()',`Get_Character_Attributes')
496    function Get_Character_Attribute
497      (Win : in Window := Standard_Window) return Character_Attribute_Set;
498    --  AKA
499
500    --  ANCHOR(`wattr_get()',`Get_Character_Attribute')
501    function Get_Character_Attribute
502      (Win : in Window := Standard_Window) return Color_Pair;
503    --  AKA
504    pragma Inline (Get_Character_Attribute);
505
506    --  ANCHOR(`wcolor_set()',`Set_Color')
507    procedure Set_Color (Win  : in Window := Standard_Window;
508                         Pair : in Color_Pair);
509    --  AKA
510    pragma Inline (Set_Color);
511
512    --  ANCHOR(`wchgat()',`Change_Attributes')
513    procedure Change_Attributes
514      (Win   : in Window := Standard_Window;
515       Count : in Integer := -1;
516       Attr  : in Character_Attribute_Set := Normal_Video;
517       Color : in Color_Pair := Color_Pair'First);
518    --  AKA
519
520    --  ANCHOR(`mvwchgat()',`Change_Attributes')
521    procedure Change_Attributes
522      (Win    : in Window := Standard_Window;
523       Line   : in Line_Position := Line_Position'First;
524       Column : in Column_Position := Column_Position'First;
525       Count  : in Integer := -1;
526       Attr   : in Character_Attribute_Set := Normal_Video;
527       Color  : in Color_Pair := Color_Pair'First);
528    --  AKA
529    pragma Inline (Change_Attributes);
530
531    --  MANPAGE(`curs_beep.3x')
532
533    --  ANCHOR(`beep()',`Beep')
534    procedure Beep;
535    --  AKA
536    pragma Inline (Beep);
537
538    --  ANCHOR(`flash()',`Flash_Screen')
539    procedure Flash_Screen;
540    --  AKA
541    pragma Inline (Flash_Screen);
542
543    --  MANPAGE(`curs_inopts.3x')
544
545    --  | Not implemented : typeahead
546    --
547    --  ANCHOR(`cbreak()',`Set_Cbreak_Mode')
548    procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
549    --  AKA
550    --  ALIAS(`nocbreak()')
551    pragma Inline (Set_Cbreak_Mode);
552
553    --  ANCHOR(`raw()',`Set_Raw_Mode')
554    procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
555    --  AKA
556    --  ALIAS(`noraw()')
557    pragma Inline (Set_Raw_Mode);
558
559    --  ANCHOR(`echo()',`Set_Echo_Mode')
560    procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
561    --  AKA
562    --  ALIAS(`noecho()')
563    pragma Inline (Set_Echo_Mode);
564
565    --  ANCHOR(`meta()',`Set_Meta_Mode')
566    procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
567                             SwitchOn : in Boolean := True);
568    --  AKA
569    pragma Inline (Set_Meta_Mode);
570
571    --  ANCHOR(`keypad()',`Set_KeyPad_Mode')
572    procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
573                               SwitchOn : in Boolean := True);
574    --  AKA
575    pragma Inline (Set_KeyPad_Mode);
576
577    type Half_Delay_Amount is range 1 .. 255;
578
579    --  ANCHOR(`halfdelay()',`Half_Delay')
580    procedure Half_Delay (Amount : in Half_Delay_Amount);
581    --  AKA
582    pragma Inline (Half_Delay);
583
584    --  ANCHOR(`intrflush()',`Set_Flush_On_Interrupt_Mode')
585    procedure Set_Flush_On_Interrupt_Mode
586      (Win  : in Window := Standard_Window;
587       Mode : in Boolean := True);
588    --  AKA
589    pragma Inline (Set_Flush_On_Interrupt_Mode);
590
591    --  ANCHOR(`qiflush()',`Set_Queue_Interrupt_Mode')
592    procedure Set_Queue_Interrupt_Mode
593      (Win   : in Window := Standard_Window;
594       Flush : in Boolean := True);
595    --  AKA
596    --  ALIAS(`noqiflush()')
597    pragma Inline (Set_Queue_Interrupt_Mode);
598
599    --  ANCHOR(`nodelay()',`Set_NoDelay_Mode')
600    procedure Set_NoDelay_Mode
601      (Win  : in Window := Standard_Window;
602       Mode : in Boolean := False);
603    --  AKA
604    pragma Inline (Set_NoDelay_Mode);
605
606    type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
607
608    --  ANCHOR(`wtimeout()',`Set_Timeout_Mode')
609    procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
610                                Mode   : in Timeout_Mode;
611                                Amount : in Natural); --  in Milliseconds
612    --  AKA
613    --  Instead of overloading the semantic of the sign of amount, we
614    --  introduce the Timeout_Mode parameter. This should improve
615    --  readability. For Blocking and Non_Blocking, the Amount is not
616    --  evaluated.
617    --  We don't inline this procedure.
618
619    --  ANCHOR(`notimeout()',`Set_Escape_Time_Mode')
620    procedure Set_Escape_Timer_Mode
621      (Win       : in Window := Standard_Window;
622       Timer_Off : in Boolean := False);
623    --  AKA
624    pragma Inline (Set_Escape_Timer_Mode);
625
626    --  MANPAGE(`curs_outopts.3x')
627
628    --  ANCHOR(`nl()',`Set_NL_Mode')
629    procedure Set_NL_Mode (SwitchOn : in Boolean := True);
630    --  AKA
631    --  ALIAS(`nonl()')
632    pragma Inline (Set_NL_Mode);
633
634    --  ANCHOR(`clearok()',`Clear_On_Next_Update')
635    procedure Clear_On_Next_Update
636      (Win      : in Window := Standard_Window;
637       Do_Clear : in Boolean := True);
638    --  AKA
639    pragma Inline (Clear_On_Next_Update);
640
641    --  ANCHOR(`idlok()',`Use_Insert_Delete_Line')
642    procedure Use_Insert_Delete_Line
643      (Win    : in Window := Standard_Window;
644       Do_Idl : in Boolean := True);
645    --  AKA
646    pragma Inline (Use_Insert_Delete_Line);
647
648    --  ANCHOR(`idcok()',`Use_Insert_Delete_Character')
649    procedure Use_Insert_Delete_Character
650      (Win    : in Window := Standard_Window;
651       Do_Idc : in Boolean := True);
652    --  AKA
653    pragma Inline (Use_Insert_Delete_Character);
654
655    --  ANCHOR(`leaveok()',`Leave_Cursor_After_Update')
656    procedure Leave_Cursor_After_Update
657      (Win      : in Window := Standard_Window;
658       Do_Leave : in Boolean := True);
659    --  AKA
660    pragma Inline (Leave_Cursor_After_Update);
661
662    --  ANCHOR(`immedok()',`Immediate_Update_Mode')
663    procedure Immediate_Update_Mode
664      (Win  : in Window := Standard_Window;
665       Mode : in Boolean := False);
666    --  AKA
667    pragma Inline (Immediate_Update_Mode);
668
669    --  ANCHOR(`scrollok()',`Allow_Scrolling')
670    procedure Allow_Scrolling
671      (Win  : in Window := Standard_Window;
672       Mode : in Boolean := False);
673    --  AKA
674    pragma Inline (Allow_Scrolling);
675
676    function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
677    --  There is no such function in the C interface.
678    pragma Inline (Scrolling_Allowed);
679
680    --  ANCHOR(`wsetscrreg()',`Set_Scroll_Region')
681    procedure Set_Scroll_Region
682      (Win         : in Window := Standard_Window;
683       Top_Line    : in Line_Position;
684       Bottom_Line : in Line_Position);
685    --  AKA
686    pragma Inline (Set_Scroll_Region);
687
688    --  MANPAGE(`curs_refresh.3x')
689
690    --  ANCHOR(`doupdate()',`Update_Screen')
691    procedure Update_Screen;
692    --  AKA
693    pragma Inline (Update_Screen);
694
695    --  ANCHOR(`wrefresh()',`Refresh')
696    procedure Refresh (Win : in Window := Standard_Window);
697    --  AKA
698    --  There is an overloaded Refresh for Pads.
699    --  The Inline pragma appears there
700
701    --  ANCHOR(`wnoutrefresh()',`Refresh_Without_Update')
702    procedure Refresh_Without_Update
703      (Win : in Window := Standard_Window);
704    --  AKA
705    --  There is an overloaded Refresh_Without_Update for Pads.
706    --  The Inline pragma appears there
707
708    --  ANCHOR(`redrawwin()',`Redraw')
709    procedure Redraw (Win : in Window := Standard_Window);
710    --  AKA
711
712    --  ANCHOR(`wredrawln()',`Redraw')
713    procedure Redraw (Win        : in Window := Standard_Window;
714                      Begin_Line : in Line_Position;
715                      Line_Count : in Positive);
716    --  AKA
717    pragma Inline (Redraw);
718
719    --  MANPAGE(`curs_clear.3x')
720
721    --  ANCHOR(`werase()',`Erase')
722    procedure Erase (Win : in Window := Standard_Window);
723    --  AKA
724    pragma Inline (Erase);
725
726    --  ANCHOR(`wclear()',`Clear')
727    procedure Clear
728      (Win : in Window := Standard_Window);
729    --  AKA
730    pragma Inline (Clear);
731
732    --  ANCHOR(`wclrtobot()',`Clear_To_End_Of_Screen')
733    procedure Clear_To_End_Of_Screen
734      (Win : in Window := Standard_Window);
735    --  AKA
736    pragma Inline (Clear_To_End_Of_Screen);
737
738    --  ANCHOR(`wclrtoeol()',`Clear_To_End_Of_Line')
739    procedure Clear_To_End_Of_Line
740      (Win : in Window := Standard_Window);
741    --  AKA
742    pragma Inline (Clear_To_End_Of_Line);
743
744    --  MANPAGE(`curs_bkgd.3x')
745
746    --  ANCHOR(`wbkgdset()',`Set_Background')
747    procedure Set_Background
748      (Win : in Window := Standard_Window;
749       Ch  : in Attributed_Character);
750    --  AKA
751    pragma Inline (Set_Background);
752
753    --  ANCHOR(`wbkgd()',`Change_Background')
754    procedure Change_Background
755      (Win : in Window := Standard_Window;
756       Ch  : in Attributed_Character);
757    --  AKA
758    pragma Inline (Change_Background);
759
760    --  ANCHOR(`wbkgdget()',`Get_Background')
761    function Get_Background (Win : Window := Standard_Window)
762      return Attributed_Character;
763    --  AKA
764    pragma Inline (Get_Background);
765
766    --  MANPAGE(`curs_touch.3x')
767
768    --  ANCHOR(`untouchwin()',`Untouch')
769    procedure Untouch (Win : in Window := Standard_Window);
770    --  AKA
771    pragma Inline (Untouch);
772
773    --  ANCHOR(`touchwin()',`Touch')
774    procedure Touch (Win : in Window := Standard_Window);
775    --  AKA
776
777    --  ANCHOR(`touchline()',`Touch')
778    procedure Touch (Win   : in Window := Standard_Window;
779                     Start : in Line_Position;
780                     Count : in Positive);
781    --  AKA
782    pragma Inline (Touch);
783
784    --  ANCHOR(`wtouchln()',`Change_Line_Status')
785    procedure Change_Lines_Status (Win   : in Window := Standard_Window;
786                                   Start : in Line_Position;
787                                   Count : in Positive;
788                                   State : in Boolean);
789    --  AKA
790    pragma Inline (Change_Lines_Status);
791
792    --  ANCHOR(`is_linetouched()',`Is_Touched')
793    function Is_Touched (Win  : Window := Standard_Window;
794                         Line : Line_Position) return Boolean;
795    --  AKA
796
797    --  ANCHOR(`is_wintouched()',`Is_Touched')
798    function Is_Touched (Win : Window := Standard_Window) return Boolean;
799    --  AKA
800    pragma Inline (Is_Touched);
801
802    --  MANPAGE(`curs_overlay.3x')
803
804    --  ANCHOR(`copywin()',`Copy')
805    procedure Copy
806      (Source_Window            : in Window;
807       Destination_Window       : in Window;
808       Source_Top_Row           : in Line_Position;
809       Source_Left_Column       : in Column_Position;
810       Destination_Top_Row      : in Line_Position;
811       Destination_Left_Column  : in Column_Position;
812       Destination_Bottom_Row   : in Line_Position;
813       Destination_Right_Column : in Column_Position;
814       Non_Destructive_Mode     : in Boolean := True);
815    --  AKA
816    pragma Inline (Copy);
817
818    --  ANCHOR(`overwrite()',`Overwrite')
819    procedure Overwrite (Source_Window      : in Window;
820                         Destination_Window : in Window);
821    --  AKA
822    pragma Inline (Overwrite);
823
824    --  ANCHOR(`overlay()',`Overlay')
825    procedure Overlay (Source_Window      : in Window;
826                       Destination_Window : in Window);
827    --  AKA
828    pragma Inline (Overlay);
829
830    --  MANPAGE(`curs_deleteln.3x')
831
832    --  ANCHOR(`winsdelln()',`Insert_Delete_Lines')
833    procedure Insert_Delete_Lines
834      (Win   : in Window  := Standard_Window;
835       Lines : in Integer := 1); --  default is to insert one line above
836    --  AKA
837    pragma Inline (Insert_Delete_Lines);
838
839    --  ANCHOR(`wdeleteln()',`Delete_Line')
840    procedure Delete_Line (Win : in Window := Standard_Window);
841    --  AKA
842    pragma Inline (Delete_Line);
843
844    --  ANCHOR(`winsertln()',`Insert_Line')
845    procedure Insert_Line (Win : in Window := Standard_Window);
846    --  AKA
847    pragma Inline (Insert_Line);
848
849    --  MANPAGE(`curs_getyx.3x')
850
851    --  ANCHOR(`getmaxyx()',`Get_Size')
852    procedure Get_Size
853      (Win               : in Window := Standard_Window;
854       Number_Of_Lines   : out Line_Count;
855       Number_Of_Columns : out Column_Count);
856    --  AKA
857    pragma Inline (Get_Size);
858
859    --  ANCHOR(`getbegyx()',`Get_Window_Position')
860    procedure Get_Window_Position
861      (Win             : in Window := Standard_Window;
862       Top_Left_Line   : out Line_Position;
863       Top_Left_Column : out Column_Position);
864    --  AKA
865    pragma Inline (Get_Window_Position);
866
867    --  ANCHOR(`getyx()',`Get_Cursor_Position')
868    procedure Get_Cursor_Position
869      (Win    : in  Window := Standard_Window;
870       Line   : out Line_Position;
871       Column : out Column_Position);
872    --  AKA
873    pragma Inline (Get_Cursor_Position);
874
875    --  ANCHOR(`getparyx()',`Get_Origin_Relative_To_Parent')
876    procedure Get_Origin_Relative_To_Parent
877      (Win                : in  Window;
878       Top_Left_Line      : out Line_Position;
879       Top_Left_Column    : out Column_Position;
880       Is_Not_A_Subwindow : out Boolean);
881    --  AKA
882    --  Instead of placing -1 in the coordinates as return, we use a boolean
883    --  to return the info that the window has no parent.
884    pragma Inline (Get_Origin_Relative_To_Parent);
885
886    --  MANPAGE(`curs_pad.3x')
887
888    --  ANCHOR(`newpad()',`New_Pad')
889    function New_Pad (Lines   : Line_Count;
890                      Columns : Column_Count) return Window;
891    --  AKA
892    pragma Inline (New_Pad);
893
894    --  ANCHOR(`subpad()',`Sub_Pad')
895    function Sub_Pad
896      (Pad                   : Window;
897       Number_Of_Lines       : Line_Count;
898       Number_Of_Columns     : Column_Count;
899       First_Line_Position   : Line_Position;
900       First_Column_Position : Column_Position) return Window;
901    --  AKA
902    pragma Inline (Sub_Pad);
903
904    --  ANCHOR(`prefresh()',`Refresh')
905    procedure Refresh
906      (Pad                      : in Window;
907       Source_Top_Row           : in Line_Position;
908       Source_Left_Column       : in Column_Position;
909       Destination_Top_Row      : in Line_Position;
910       Destination_Left_Column  : in Column_Position;
911       Destination_Bottom_Row   : in Line_Position;
912       Destination_Right_Column : in Column_Position);
913    --  AKA
914    pragma Inline (Refresh);
915
916    --  ANCHOR(`pnoutrefresh()',`Refresh_Without_Update')
917    procedure Refresh_Without_Update
918      (Pad                      : in Window;
919       Source_Top_Row           : in Line_Position;
920       Source_Left_Column       : in Column_Position;
921       Destination_Top_Row      : in Line_Position;
922       Destination_Left_Column  : in Column_Position;
923       Destination_Bottom_Row   : in Line_Position;
924       Destination_Right_Column : in Column_Position);
925    --  AKA
926    pragma Inline (Refresh_Without_Update);
927
928    --  ANCHOR(`pechochar()',`Add_Character_To_Pad_And_Echo_It')
929    procedure Add_Character_To_Pad_And_Echo_It
930      (Pad : in Window;
931       Ch  : in Attributed_Character);
932    --  AKA
933
934    procedure Add_Character_To_Pad_And_Echo_It
935      (Pad : in Window;
936       Ch  : in Character);
937    pragma Inline (Add_Character_To_Pad_And_Echo_It);
938
939    --  MANPAGE(`curs_scroll.3x')
940
941    --  ANCHOR(`wscrl()',`Scroll')
942    procedure Scroll (Win    : in Window  := Standard_Window;
943                      Amount : in Integer := 1);
944    --  AKA
945    pragma Inline (Scroll);
946
947    --  MANPAGE(`curs_delch.3x')
948
949    --  ANCHOR(`wdelch()',`Delete_Character')
950    procedure Delete_Character (Win : in Window := Standard_Window);
951    --  AKA
952
953    --  ANCHOR(`mvwdelch()',`Delete_Character')
954    procedure Delete_Character
955      (Win    : in Window := Standard_Window;
956       Line   : in Line_Position;
957       Column : in Column_Position);
958    --  AKA
959    pragma Inline (Delete_Character);
960
961    --  MANPAGE(`curs_inch.3x')
962
963    --  ANCHOR(`winch()',`Peek')
964    function Peek (Win : Window := Standard_Window)
965      return Attributed_Character;
966    --  AKA
967
968    --  ANCHOR(`mvwinch()',`Peek')
969    function Peek
970      (Win    : Window := Standard_Window;
971       Line   : Line_Position;
972       Column : Column_Position) return Attributed_Character;
973    --  AKA
974    --  More Peek's follow, pragma Inline appears later.
975
976    --  MANPAGE(`curs_winch.3x')
977
978    --  ANCHOR(`winsch()',`Insert')
979    procedure Insert (Win : in Window := Standard_Window;
980                      Ch  : in Attributed_Character);
981    --  AKA
982
983    --  ANCHOR(`mvwinsch()',`Insert')
984    procedure Insert (Win    : in Window := Standard_Window;
985                      Line   : in Line_Position;
986                      Column : in Column_Position;
987                      Ch     : in Attributed_Character);
988    --  AKA
989
990    --  MANPAGE(`curs_winch.3x')
991
992    --  ANCHOR(`winsnstr()',`Insert')
993    procedure Insert (Win : in Window := Standard_Window;
994                      Str : in String;
995                      Len : in Integer := -1);
996    --  AKA
997    --  ALIAS(`winsstr()')
998
999    --  ANCHOR(`mvwinsnstr()',`Insert')
1000    procedure Insert (Win    : in Window := Standard_Window;
1001                      Line   : in Line_Position;
1002                      Column : in Column_Position;
1003                      Str    : in String;
1004                      Len    : in Integer := -1);
1005    --  AKA
1006    --  ALIAS(`mvwinsstr()')
1007    pragma Inline (Insert);
1008
1009    --  MANPAGE(`curs_instr.3x')
1010
1011    --  ANCHOR(`winnstr()',`Peek')
1012    procedure Peek (Win : in  Window := Standard_Window;
1013                    Str : out String;
1014                    Len : in  Integer := -1);
1015    --  AKA
1016    --  ALIAS(`winstr()')
1017
1018    --  ANCHOR(`mvwinnstr()',`Peek')
1019    procedure Peek (Win    : in  Window := Standard_Window;
1020                    Line   : in  Line_Position;
1021                    Column : in  Column_Position;
1022                    Str    : out String;
1023                    Len    : in  Integer := -1);
1024    --  AKA
1025    --  ALIAS(`mvwinstr()')
1026
1027    --  MANPAGE(`curs_inchstr.3x')
1028
1029    --  ANCHOR(`winchnstr()',`Peek')
1030    procedure Peek (Win : in  Window := Standard_Window;
1031                    Str : out Attributed_String;
1032                    Len : in  Integer := -1);
1033    --  AKA
1034    --  ALIAS(`winchstr()')
1035
1036    --  ANCHOR(`mvwinchnstr()',`Peek')
1037    procedure Peek (Win    : in  Window := Standard_Window;
1038                    Line   : in  Line_Position;
1039                    Column : in  Column_Position;
1040                    Str    : out Attributed_String;
1041                    Len    : in  Integer := -1);
1042    --  AKA
1043    --  ALIAS(`mvwinchstr()')
1044    --  We don't inline the Peek procedures
1045
1046    --  MANPAGE(`curs_getstr.3x')
1047
1048    --  ANCHOR(`wgetnstr()',`Get')
1049    procedure Get (Win : in  Window := Standard_Window;
1050                   Str : out String;
1051                   Len : in  Integer := -1);
1052    --  AKA
1053    --  ALIAS(`wgetstr()')
1054
1055    procedure Get (Win    : in  Window := Standard_Window;
1056                   Line   : in  Line_Position;
1057                   Column : in  Column_Position;
1058                   Str    : out String;
1059                   Len    : in  Integer := -1);
1060    --  AKA
1061    --  not specified in ncurses, should be: mvwgetnstr()
1062    --       and mvwgetstr() (which exists)
1063    --  Get is not inlined
1064
1065    --  MANPAGE(`curs_slk.3x')
1066
1067    type Soft_Label_Key_Format is (Three_Two_Three,
1068                                   Four_Four,
1069                                   PC_Style,              --  ncurses specific
1070                                   PC_Style_With_Index);  --  "
1071    type Label_Number is new Positive range 1 .. 12;
1072    type Label_Justification is (Left, Centered, Right);
1073
1074    --  ANCHOR(`slk_init()',`Init_Soft_Label_Keys')
1075    procedure Init_Soft_Label_Keys
1076      (Format : in Soft_Label_Key_Format := Three_Two_Three);
1077    --  AKA
1078    pragma Inline (Init_Soft_Label_Keys);
1079
1080    --  ANCHOR(`slk_set()',`Set_Soft_Label_Key')
1081    procedure Set_Soft_Label_Key (Label : in Label_Number;
1082                                  Text  : in String;
1083                                  Fmt   : in Label_Justification := Left);
1084    --  AKA
1085    --  We don't inline this procedure
1086
1087    --  ANCHOR(`slk_refresh()',`Refresh_Soft_Label_Key')
1088    procedure Refresh_Soft_Label_Keys;
1089    --  AKA
1090    pragma Inline (Refresh_Soft_Label_Keys);
1091
1092    --  ANCHOR(`slk_noutrefresh()',`Refresh_Soft_Label_Keys_Without_Update')
1093    procedure Refresh_Soft_Label_Keys_Without_Update;
1094    --  AKA
1095    pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
1096
1097    --  ANCHOR(`slk_label()',`Get_Soft_Label_Key')
1098    procedure Get_Soft_Label_Key (Label : in Label_Number;
1099                                  Text  : out String);
1100    --  AKA
1101
1102    --  ANCHOR(`slk_label()',`Get_Soft_Label_Key')
1103    function Get_Soft_Label_Key (Label : in Label_Number) return String;
1104    --  AKA
1105    --  Same as function
1106    pragma Inline (Get_Soft_Label_Key);
1107
1108    --  ANCHOR(`slk_clear()',`Clear_Soft_Label_Keys')
1109    procedure Clear_Soft_Label_Keys;
1110    --  AKA
1111    pragma Inline (Clear_Soft_Label_Keys);
1112
1113    --  ANCHOR(`slk_restore()',`Restore_Soft_Label_Keys')
1114    procedure Restore_Soft_Label_Keys;
1115    --  AKA
1116    pragma Inline (Restore_Soft_Label_Keys);
1117
1118    --  ANCHOR(`slk_touch()',`Touch_Soft_Label_Keys')
1119    procedure Touch_Soft_Label_Keys;
1120    --  AKA
1121    pragma Inline (Touch_Soft_Label_Keys);
1122
1123    --  ANCHOR(`slk_attron()',`Switch_Soft_Label_Key_Attributes')
1124    procedure Switch_Soft_Label_Key_Attributes
1125      (Attr : in Character_Attribute_Set;
1126       On   : in Boolean := True);
1127    --  AKA
1128    --  ALIAS(`slk_attroff()')
1129    pragma Inline (Switch_Soft_Label_Key_Attributes);
1130
1131    --  ANCHOR(`slk_attrset()',`Set_Soft_Label_Key_Attributes')
1132    procedure Set_Soft_Label_Key_Attributes
1133      (Attr  : in Character_Attribute_Set := Normal_Video;
1134       Color : in Color_Pair := Color_Pair'First);
1135    --  AKA
1136    pragma Inline (Set_Soft_Label_Key_Attributes);
1137
1138    --  ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes')
1139    function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
1140    --  AKA
1141
1142    --  ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes')
1143    function Get_Soft_Label_Key_Attributes return Color_Pair;
1144    --  AKA
1145    pragma Inline (Get_Soft_Label_Key_Attributes);
1146
1147    --  ANCHOR(`slk_color()',`Set_Soft_Label_Key_Color')
1148    procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
1149    --  AKA
1150    pragma Inline (Set_Soft_Label_Key_Color);
1151
1152    --  MANPAGE(`keyok.3x')
1153
1154    --  ANCHOR(`keyok()',`Enable_Key')
1155    procedure Enable_Key (Key    : in Special_Key_Code;
1156                          Enable : in Boolean := True);
1157    --  AKA
1158    pragma Inline (Enable_Key);
1159
1160    --  MANPAGE(`define_key.3x')
1161
1162    --  ANCHOR(`define_key()',`Define_Key')
1163    procedure Define_Key (Definition : in String;
1164                          Key        : in Special_Key_Code);
1165    --  AKA
1166    pragma Inline (Define_Key);
1167
1168    --  MANPAGE(`curs_util.3x')
1169
1170    --  | Not implemented : filter, use_env, putwin, getwin
1171    --
1172    --  ANCHOR(`keyname()',`Key_Name')
1173    procedure Key_Name (Key  : in  Real_Key_Code;
1174                        Name : out String);
1175    --  AKA
1176    --  The external name for a real keystroke.
1177
1178    --  ANCHOR(`keyname()',`Key_Name')
1179    function Key_Name (Key  : in  Real_Key_Code) return String;
1180    --  AKA
1181    --  Same as function
1182    --  We don't inline this routine
1183
1184    --  ANCHOR(`unctrl()',`Un_Control')
1185    procedure Un_Control (Ch  : in Attributed_Character;
1186                          Str : out String);
1187    --  AKA
1188
1189    --  ANCHOR(`unctrl()',`Un_Control')
1190    function Un_Control (Ch  : in Attributed_Character) return String;
1191    --  AKA
1192    --  Same as function
1193    pragma Inline (Un_Control);
1194
1195    --  ANCHOR(`delay_output()',`Delay_Output')
1196    procedure Delay_Output (Msecs : in Natural);
1197    --  AKA
1198    pragma Inline (Delay_Output);
1199
1200    --  ANCHOR(`flushinp()',`Flush_Input')
1201    procedure Flush_Input;
1202    --  AKA
1203    pragma Inline (Flush_Input);
1204
1205    --  MANPAGE(`curs_termattrs.3x')
1206
1207    --  ANCHOR(`baudrate()',`Baudrate')
1208    function Baudrate return Natural;
1209    --  AKA
1210    pragma Inline (Baudrate);
1211
1212    --  ANCHOR(`erasechar()',`Erase_Character')
1213    function Erase_Character return Character;
1214    --  AKA
1215    pragma Inline (Erase_Character);
1216
1217    --  ANCHOR(`killchar()',`Kill_Character')
1218    function Kill_Character return Character;
1219    --  AKA
1220    pragma Inline (Kill_Character);
1221
1222    --  ANCHOR(`has_ic()',`Has_Insert_Character')
1223    function Has_Insert_Character return Boolean;
1224    --  AKA
1225    pragma Inline (Has_Insert_Character);
1226
1227    --  ANCHOR(`has_il()',`Has_Insert_Line')
1228    function Has_Insert_Line return Boolean;
1229    --  AKA
1230    pragma Inline (Has_Insert_Line);
1231
1232    --  ANCHOR(`termattrs()',`Supported_Attributes')
1233    function Supported_Attributes return Character_Attribute_Set;
1234    --  AKA
1235    pragma Inline (Supported_Attributes);
1236
1237    --  ANCHOR(`longname()',`Long_Name')
1238    procedure Long_Name (Name : out String);
1239    --  AKA
1240
1241    --  ANCHOR(`longname()',`Long_Name')
1242    function Long_Name return String;
1243    --  AKA
1244    --  Same as function
1245    pragma Inline (Long_Name);
1246
1247    --  ANCHOR(`termname()',`Terminal_Name')
1248    procedure Terminal_Name (Name : out String);
1249    --  AKA
1250
1251    --  ANCHOR(`termname()',`Terminal_Name')
1252    function Terminal_Name return String;
1253    --  AKA
1254    --  Same as function
1255    pragma Inline (Terminal_Name);
1256
1257    --  MANPAGE(`curs_color.3x')
1258
1259    --  ANCHOR(`start_color()',`Start_Color')
1260    procedure Start_Color;
1261    --  AKA
1262    pragma Import (C, Start_Color, "start_color");
1263
1264    --  ANCHOR(`init_pair()',`Init_Pair')
1265    procedure Init_Pair (Pair : in Redefinable_Color_Pair;
1266                         Fore : in Color_Number;
1267                         Back : in Color_Number);
1268    --  AKA
1269    pragma Inline (Init_Pair);
1270
1271    --  ANCHOR(`pair_content()',`Pair_Content')
1272    procedure Pair_Content (Pair : in Color_Pair;
1273                            Fore : out Color_Number;
1274                            Back : out Color_Number);
1275    --  AKA
1276    pragma Inline (Pair_Content);
1277
1278    --  ANCHOR(`has_colors()',`Has_Colors')
1279    function Has_Colors return Boolean;
1280    --  AKA
1281    pragma Inline (Has_Colors);
1282
1283    --  ANCHOR(`init_color()',`Init_Color')
1284    procedure Init_Color (Color : in Color_Number;
1285                          Red   : in RGB_Value;
1286                          Green : in RGB_Value;
1287                          Blue  : in RGB_Value);
1288    --  AKA
1289    pragma Inline (Init_Color);
1290
1291    --  ANCHOR(`can_change_color()',`Can_Change_Color')
1292    function Can_Change_Color return Boolean;
1293    --  AKA
1294    pragma Inline (Can_Change_Color);
1295
1296    --  ANCHOR(`color_content()',`Color_Content')
1297    procedure Color_Content (Color : in  Color_Number;
1298                             Red   : out RGB_Value;
1299                             Green : out RGB_Value;
1300                             Blue  : out RGB_Value);
1301    --  AKA
1302    pragma Inline (Color_Content);
1303
1304    --  MANPAGE(`curs_kernel.3x')
1305
1306    --  | Not implemented: getsyx, setsyx
1307    --
1308    type Curses_Mode is (Curses, Shell);
1309
1310    --  ANCHOR(`def_prog_mode()',`Save_Curses_Mode')
1311    procedure Save_Curses_Mode (Mode : in Curses_Mode);
1312    --  AKA
1313    --  ALIAS(`def_shell_mode()')
1314    pragma Inline (Save_Curses_Mode);
1315
1316    --  ANCHOR(`reset_prog_mode()',`Reset_Curses_Mode')
1317    procedure Reset_Curses_Mode (Mode : in Curses_Mode);
1318    --  AKA
1319    --  ALIAS(`reset_shell_mode()')
1320    pragma Inline (Reset_Curses_Mode);
1321
1322    --  ANCHOR(`savetty()',`Save_Terminal_State')
1323    procedure Save_Terminal_State;
1324    --  AKA
1325    pragma Inline (Save_Terminal_State);
1326
1327    --  ANCHOR(`resetty();',`Reset_Terminal_State')
1328    procedure Reset_Terminal_State;
1329    --  AKA
1330    pragma Inline (Reset_Terminal_State);
1331
1332    type Stdscr_Init_Proc is access
1333       function (Win     : Window;
1334                 Columns : Column_Count) return Integer;
1335    pragma Convention (C, Stdscr_Init_Proc);
1336    --  N.B.: the return value is actually ignored, but it seems to be
1337    --        a good practice to return 0 if you think all went fine
1338    --        and -1 otherwise.
1339
1340    --  ANCHOR(`ripoffline()',`Rip_Off_Lines')
1341    procedure Rip_Off_Lines (Lines : in Integer;
1342                             Proc  : in Stdscr_Init_Proc);
1343    --  AKA
1344    --  N.B.: to be more precise, this uses a ncurses specific enhancement of
1345    --        ripoffline(), in which the Lines argument absolute value is the
1346    --        number of lines to be ripped of. The official ripoffline() only
1347    --        uses the sign of Lines to rip of a single line from bottom or top.
1348    pragma Inline (Rip_Off_Lines);
1349
1350    type Cursor_Visibility is (Invisible, Normal, Very_Visible);
1351
1352    --  ANCHOR(`curs_set()',`Set_Cursor_Visibility')
1353    procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
1354    --  AKA
1355    pragma Inline (Set_Cursor_Visibility);
1356
1357    --  ANCHOR(`napms()',`Nap_Milli_Seconds')
1358    procedure Nap_Milli_Seconds (Ms : in Natural);
1359    --  AKA
1360    pragma Inline (Nap_Milli_Seconds);
1361
1362    --  |=====================================================================
1363    --  | Some useful helpers.
1364    --  |=====================================================================
1365    type Transform_Direction is (From_Screen, To_Screen);
1366    procedure Transform_Coordinates
1367      (W      : in Window := Standard_Window;
1368       Line   : in out Line_Position;
1369       Column : in out Column_Position;
1370       Dir    : in Transform_Direction := From_Screen);
1371    --  This procedure transforms screen coordinates into coordinates relative
1372    --  to the window and vice versa, depending on the Dir parameter.
1373    --  Screen coordinates are the position informations on the physical device.
1374    --  An Curses_Exception will be raised if Line and Column are not in the
1375    --  Window or if you pass the Null_Window as argument.
1376    --  We don't inline this procedure
1377
1378 private
1379    type Window is new System.Storage_Elements.Integer_Address;
1380    Null_Window : constant Window := 0;
1381
1382    --  The next constants are generated and may be different on your
1383    --  architecture.
1384    --
1385 include(`Window_Offsets')dnl
1386    Curses_Bool_False : constant Curses_Bool := 0;
1387
1388 end Terminal_Interface.Curses;