]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/gen/terminal_interface-curses.ads.m4
ncurses 4.2
[ncurses.git] / Ada95 / gen / terminal_interface-curses.ads.m4
1 --  -*- ada -*-
2 define(`HTMLNAME',`terminal_interface-curses_s.html')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@T-Online.de> 1996
39 --  Version Control:
40 --  $Revision: 1.15 $
41 --  Binding Version 00.93
42 ------------------------------------------------------------------------------
43 include(`Base_Defs')
44 with System;
45 with Interfaces.C;   --  We need this for some assertions.
46
47 package Terminal_Interface.Curses is
48    pragma Preelaborate (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')
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 half of an integer 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 := Normal_Video;
126          Color : Color_Pair := 0;
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  => 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 symbols 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')
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 resfresh 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 functionkey 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(`wchgat()',`Change_Attributes')
507    procedure Change_Attributes
508      (Win   : in Window := Standard_Window;
509       Count : in Integer := -1;
510       Attr  : in Character_Attribute_Set := Normal_Video;
511       Color : in Color_Pair := Color_Pair'First);
512    --  AKA
513
514    --  ANCHOR(`mvwchgat()',`Change_Attributes')
515    procedure Change_Attributes
516      (Win    : in Window := Standard_Window;
517       Line   : in Line_Position := Line_Position'First;
518       Column : in Column_Position := Column_Position'First;
519       Count  : in Integer := -1;
520       Attr   : in Character_Attribute_Set := Normal_Video;
521       Color  : in Color_Pair := Color_Pair'First);
522    --  AKA
523    pragma Inline (Change_Attributes);
524
525    --  MANPAGE(`curs_beep.3x')
526
527    --  ANCHOR(`beep()',`Beep')
528    procedure Beep;
529    --  AKA
530    pragma Inline (Beep);
531
532    --  ANCHOR(`flash()',`Flash_Screen')
533    procedure Flash_Screen;
534    --  AKA
535    pragma Inline (Flash_Screen);
536
537    --  MANPAGE(`curs_inopts.3x')
538
539    --  | Not implemented : typeahead
540    --
541    --  ANCHOR(`cbreak()',`Set_Cbreak_Mode')
542    procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
543    --  AKA
544    --  ALIAS(`nocbreak()')
545    pragma Inline (Set_Cbreak_Mode);
546
547    --  ANCHOR(`raw()',`Set_Raw_Mode')
548    procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
549    --  AKA
550    --  ALIAS(`noraw()')
551    pragma Inline (Set_Raw_Mode);
552
553    --  ANCHOR(`echo()',`Set_Echo_Mode')
554    procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
555    --  AKA
556    --  ALIAS(`noecho()')
557    pragma Inline (Set_Echo_Mode);
558
559    --  ANCHOR(`meta()',`Set_Meta_Mode')
560    procedure Set_Meta_Mode (Win      : in Window := Standard_Window;
561                             SwitchOn : in Boolean := True);
562    --  AKA
563    pragma Inline (Set_Meta_Mode);
564
565    --  ANCHOR(`keypad()',`Set_KeyPad_Mode')
566    procedure Set_KeyPad_Mode (Win      : in Window := Standard_Window;
567                               SwitchOn : in Boolean := True);
568    --  AKA
569    pragma Inline (Set_KeyPad_Mode);
570
571    type Half_Delay_Amount is range 1 .. 255;
572
573    --  ANCHOR(`halfdelay()',`Half_Delay')
574    procedure Half_Delay (Amount : in Half_Delay_Amount);
575    --  AKA
576    pragma Inline (Half_Delay);
577
578    --  ANCHOR(`intrflush()',`Set_Flush_On_Interrupt_Mode')
579    procedure Set_Flush_On_Interrupt_Mode
580      (Win  : in Window := Standard_Window;
581       Mode : in Boolean := True);
582    --  AKA
583    pragma Inline (Set_Flush_On_Interrupt_Mode);
584
585    --  ANCHOR(`qiflush()',`Set_Queue_Interrupt_Mode')
586    procedure Set_Queue_Interrupt_Mode
587      (Win   : in Window := Standard_Window;
588       Flush : in Boolean := True);
589    --  AKA
590    --  ALIAS(`noqiflush()')
591    pragma Inline (Set_Queue_Interrupt_Mode);
592
593    --  ANCHOR(`nodelay()',`Set_NoDelay_Mode')
594    procedure Set_NoDelay_Mode
595      (Win  : in Window := Standard_Window;
596       Mode : in Boolean := False);
597    --  AKA
598    pragma Inline (Set_NoDelay_Mode);
599
600    type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
601
602    --  ANCHOR(`wtimeout()',`Set_Timeout_Mode')
603    procedure Set_Timeout_Mode (Win    : in Window := Standard_Window;
604                                Mode   : in Timeout_Mode;
605                                Amount : in Natural); --  in Miliseconds
606    --  AKA
607    --  Instead of overloading the semantic of the sign of amount, we
608    --  introduce the Timeout_Mode parameter. This should improve
609    --  readability. For Blocking and Non_Blocking, the Amount is not
610    --  evaluated.
611    --  We don't inline this procedure.
612
613    --  ANCHOR(`notimeout()',`Set_Escape_Time_Mode')
614    procedure Set_Escape_Timer_Mode
615      (Win       : in Window := Standard_Window;
616       Timer_Off : in Boolean := False);
617    --  AKA
618    pragma Inline (Set_Escape_Timer_Mode);
619
620    --  MANPAGE(`curs_outopts.3x')
621
622    --  ANCHOR(`nl()',`Set_NL_Mode')
623    procedure Set_NL_Mode (SwitchOn : in Boolean := True);
624    --  AKA
625    --  ALIAS(`nonl()')
626    pragma Inline (Set_NL_Mode);
627
628    --  ANCHOR(`clearok()',`Clear_On_Next_Update')
629    procedure Clear_On_Next_Update
630      (Win      : in Window := Standard_Window;
631       Do_Clear : in Boolean := True);
632    --  AKA
633    pragma Inline (Clear_On_Next_Update);
634
635    --  ANCHOR(`idlok()',`Use_Insert_Delete_Line')
636    procedure Use_Insert_Delete_Line
637      (Win    : in Window := Standard_Window;
638       Do_Idl : in Boolean := True);
639    --  AKA
640    pragma Inline (Use_Insert_Delete_Line);
641
642    --  ANCHOR(`idcok()',`Use_Insert_Delete_Character')
643    procedure Use_Insert_Delete_Character
644      (Win    : in Window := Standard_Window;
645       Do_Idc : in Boolean := True);
646    --  AKA
647    pragma Inline (Use_Insert_Delete_Character);
648
649    --  ANCHOR(`leaveok()',`Leave_Cursor_After_Update')
650    procedure Leave_Cursor_After_Update
651      (Win      : in Window := Standard_Window;
652       Do_Leave : in Boolean := True);
653    --  AKA
654    pragma Inline (Leave_Cursor_After_Update);
655
656    --  ANCHOR(`immedok()',`Immediate_Update_Mode')
657    procedure Immediate_Update_Mode
658      (Win  : in Window := Standard_Window;
659       Mode : in Boolean := False);
660    --  AKA
661    pragma Inline (Immediate_Update_Mode);
662
663    --  ANCHOR(`scrollok()',`Allow_Scrolling')
664    procedure Allow_Scrolling
665      (Win  : in Window := Standard_Window;
666       Mode : in Boolean := False);
667    --  AKA
668    pragma Inline (Allow_Scrolling);
669
670    function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean;
671    --  There is no such function in the C interface.
672    pragma Inline (Scrolling_Allowed);
673
674    --  ANCHOR(`wsetscrreg()',`Set_Scroll_Region')
675    procedure Set_Scroll_Region
676      (Win         : in Window := Standard_Window;
677       Top_Line    : in Line_Position;
678       Bottom_Line : in Line_Position);
679    --  AKA
680    pragma Inline (Set_Scroll_Region);
681
682    --  MANPAGE(`curs_refresh.3x')
683
684    --  ANCHOR(`doupdate()',`Update_Screen')
685    procedure Update_Screen;
686    --  AKA
687    pragma Inline (Update_Screen);
688
689    --  ANCHOR(`wrefresh()',`Refresh')
690    procedure Refresh (Win : in Window := Standard_Window);
691    --  AKA
692    --  There is an overloaded Refresh for Pads.
693    --  The Inline pragma appears there
694
695    --  ANCHOR(`wnoutrefresh()',`Refresh_Without_Update')
696    procedure Refresh_Without_Update
697      (Win : in Window := Standard_Window);
698    --  AKA
699    --  There is an overloaded Refresh_Without_Update for Pads.
700    --  The Inline pragma appears there
701
702    --  ANCHOR(`redrawwin()',`Redraw')
703    procedure Redraw (Win : in Window := Standard_Window);
704    --  AKA
705
706    --  ANCHOR(`wredrawln()',`Redraw')
707    procedure Redraw (Win        : in Window := Standard_Window;
708                      Begin_Line : in Line_Position;
709                      Line_Count : in Positive);
710    --  AKA
711    pragma Inline (Redraw);
712
713    --  MANPAGE(`curs_clear.3x')
714
715    --  ANCHOR(`werase()',`Erase')
716    procedure Erase (Win : in Window := Standard_Window);
717    --  AKA
718    pragma Inline (Erase);
719
720    --  ANCHOR(`wclear()',`Clear')
721    procedure Clear
722      (Win : in Window := Standard_Window);
723    --  AKA
724    pragma Inline (Clear);
725
726    --  ANCHOR(`wclrtobot()',`Clear_To_End_Of_Screen')
727    procedure Clear_To_End_Of_Screen
728      (Win : in Window := Standard_Window);
729    --  AKA
730    pragma Inline (Clear_To_End_Of_Screen);
731
732    --  ANCHOR(`wclrtoeol()',`Clear_To_End_Of_Line')
733    procedure Clear_To_End_Of_Line
734      (Win : in Window := Standard_Window);
735    --  AKA
736    pragma Inline (Clear_To_End_Of_Line);
737
738    --  MANPAGE(`curs_bkgd.3x')
739
740    --  ANCHOR(`wbkgdset()',`Set_Background')
741    procedure Set_Background
742      (Win : in Window := Standard_Window;
743       Ch  : in Attributed_Character);
744    --  AKA
745    pragma Inline (Set_Background);
746
747    --  ANCHOR(`wbkgd()',`Change_Background')
748    procedure Change_Background
749      (Win : in Window := Standard_Window;
750       Ch  : in Attributed_Character);
751    --  AKA
752    pragma Inline (Change_Background);
753
754    --  ANCHOR(`wbkgdget()',`Get_Background')
755    function Get_Background (Win : Window := Standard_Window)
756      return Attributed_Character;
757    --  AKA
758    pragma Inline (Get_Background);
759
760    --  MANPAGE(`curs_touch.3x')
761
762    --  ANCHOR(`untouchwin()',`Untouch')
763    procedure Untouch (Win : in Window := Standard_Window);
764    --  AKA
765    pragma Inline (Untouch);
766
767    --  ANCHOR(`touchwin()',`Touch')
768    procedure Touch (Win : in Window := Standard_Window);
769    --  AKA
770
771    --  ANCHOR(`touchline()',`Touch')
772    procedure Touch (Win   : in Window := Standard_Window;
773                     Start : in Line_Position;
774                     Count : in Positive);
775    --  AKA
776    pragma Inline (Touch);
777
778    --  ANCHOR(`wtouchln()',`Change_Line_Status')
779    procedure Change_Lines_Status (Win   : in Window := Standard_Window;
780                                   Start : in Line_Position;
781                                   Count : in Positive;
782                                   State : in Boolean);
783    --  AKA
784    pragma Inline (Change_Lines_Status);
785
786    --  ANCHOR(`is_linetouched()',`Is_Touched')
787    function Is_Touched (Win  : Window := Standard_Window;
788                         Line : Line_Position) return Boolean;
789    --  AKA
790
791    --  ANCHOR(`is_wintouched()',`Is_Touched')
792    function Is_Touched (Win : Window := Standard_Window) return Boolean;
793    --  AKA
794    pragma Inline (Is_Touched);
795
796    --  MANPAGE(`curs_overlay.3x')
797
798    --  ANCHOR(`copywin()',`Copy')
799    procedure Copy
800      (Source_Window            : in Window;
801       Destination_Window       : in Window;
802       Source_Top_Row           : in Line_Position;
803       Source_Left_Column       : in Column_Position;
804       Destination_Top_Row      : in Line_Position;
805       Destination_Left_Column  : in Column_Position;
806       Destination_Bottom_Row   : in Line_Position;
807       Destination_Right_Column : in Column_Position;
808       Non_Destructive_Mode     : in Boolean := True);
809    --  AKA
810    pragma Inline (Copy);
811
812    --  ANCHOR(`overwrite()',`Overwrite')
813    procedure Overwrite (Source_Window      : in Window;
814                         Destination_Window : in Window);
815    --  AKA
816    pragma Inline (Overwrite);
817
818    --  ANCHOR(`overlay()',`Overlay')
819    procedure Overlay (Source_Window      : in Window;
820                       Destination_Window : in Window);
821    --  AKA
822    pragma Inline (Overlay);
823
824    --  MANPAGE(`curs_deleteln.3x')
825
826    --  ANCHOR(`winsdelln()',`Insert_Delete_Lines')
827    procedure Insert_Delete_Lines
828      (Win   : in Window  := Standard_Window;
829       Lines : in Integer := 1); --  default is to insert one line above
830    --  AKA
831    pragma Inline (Insert_Delete_Lines);
832
833    --  ANCHOR(`wdeleteln()',`Delete_Line')
834    procedure Delete_Line (Win : in Window := Standard_Window);
835    --  AKA
836    pragma Inline (Delete_Line);
837
838    --  ANCHOR(`winsertln()',`Insert_Line')
839    procedure Insert_Line (Win : in Window := Standard_Window);
840    --  AKA
841    pragma Inline (Insert_Line);
842
843    --  MANPAGE(`curs_getyx.3x')
844
845    --  ANCHOR(`getmaxyx()',`Get_Size')
846    procedure Get_Size
847      (Win               : in Window := Standard_Window;
848       Number_Of_Lines   : out Line_Count;
849       Number_Of_Columns : out Column_Count);
850    --  AKA
851    pragma Inline (Get_Size);
852
853    --  ANCHOR(`getbegyx()',`Get_Window_Position')
854    procedure Get_Window_Position
855      (Win             : in Window := Standard_Window;
856       Top_Left_Line   : out Line_Position;
857       Top_Left_Column : out Column_Position);
858    --  AKA
859    pragma Inline (Get_Window_Position);
860
861    --  ANCHOR(`getyx()',`Get_Cursor_Position')
862    procedure Get_Cursor_Position
863      (Win    : in  Window := Standard_Window;
864       Line   : out Line_Position;
865       Column : out Column_Position);
866    --  AKA
867    pragma Inline (Get_Cursor_Position);
868
869    --  ANCHOR(`getparyx()',`Get_Origin_Relative_To_Parent')
870    procedure Get_Origin_Relative_To_Parent
871      (Win                : in  Window;
872       Top_Left_Line      : out Line_Position;
873       Top_Left_Column    : out Column_Position;
874       Is_Not_A_Subwindow : out Boolean);
875    --  AKA
876    --  Instead of placing -1 in the coordinates as return, we use a boolean
877    --  to return the info that the window has no parent.
878    pragma Inline (Get_Origin_Relative_To_Parent);
879
880    --  MANPAGE(`curs_pad.3x')
881
882    --  ANCHOR(`newpad()',`New_Pad')
883    function New_Pad (Lines   : Line_Count;
884                      Columns : Column_Count) return Window;
885    --  AKA
886    pragma Inline (New_Pad);
887
888    --  ANCHOR(`subpad()',`Sub_Pad')
889    function Sub_Pad
890      (Pad                   : Window;
891       Number_Of_Lines       : Line_Count;
892       Number_Of_Columns     : Column_Count;
893       First_Line_Position   : Line_Position;
894       First_Column_Position : Column_Position) return Window;
895    --  AKA
896    pragma Inline (Sub_Pad);
897
898    --  ANCHOR(`prefresh()',`Refresh')
899    procedure Refresh
900      (Pad                      : in Window;
901       Source_Top_Row           : in Line_Position;
902       Source_Left_Column       : in Column_Position;
903       Destination_Top_Row      : in Line_Position;
904       Destination_Left_Column  : in Column_Position;
905       Destination_Bottom_Row   : in Line_Position;
906       Destination_Right_Column : in Column_Position);
907    --  AKA
908    pragma Inline (Refresh);
909
910    --  ANCHOR(`pnoutrefresh()',`Refresh_Without_Update')
911    procedure Refresh_Without_Update
912      (Pad                      : in Window;
913       Source_Top_Row           : in Line_Position;
914       Source_Left_Column       : in Column_Position;
915       Destination_Top_Row      : in Line_Position;
916       Destination_Left_Column  : in Column_Position;
917       Destination_Bottom_Row   : in Line_Position;
918       Destination_Right_Column : in Column_Position);
919    --  AKA
920    pragma Inline (Refresh_Without_Update);
921
922    --  ANCHOR(`pechochar()',`Add_Character_To_Pad_And_Echo_It')
923    procedure Add_Character_To_Pad_And_Echo_It
924      (Pad : in Window;
925       Ch  : in Attributed_Character);
926    --  AKA
927
928    procedure Add_Character_To_Pad_And_Echo_It
929      (Pad : in Window;
930       Ch  : in Character);
931    pragma Inline (Add_Character_To_Pad_And_Echo_It);
932
933    --  MANPAGE(`curs_scroll.3x')
934
935    --  ANCHOR(`wscrl()',`Scroll')
936    procedure Scroll (Win    : in Window  := Standard_Window;
937                      Amount : in Integer := 1);
938    --  AKA
939    pragma Inline (Scroll);
940
941    --  MANPAGE(`curs_delch.3x')
942
943    --  ANCHOR(`wdelch()',`Delete_Character')
944    procedure Delete_Character (Win : in Window := Standard_Window);
945    --  AKA
946
947    --  ANCHOR(`mvwdelch()',`Delete_Character')
948    procedure Delete_Character
949      (Win    : in Window := Standard_Window;
950       Line   : in Line_Position;
951       Column : in Column_Position);
952    --  AKA
953    pragma Inline (Delete_Character);
954
955    --  MANPAGE(`curs_inch.3x')
956
957    --  ANCHOR(`winch()',`Peek')
958    function Peek (Win : Window := Standard_Window)
959      return Attributed_Character;
960    --  AKA
961
962    --  ANCHOR(`mvwinch()',`Peek')
963    function Peek
964      (Win    : Window := Standard_Window;
965       Line   : Line_Position;
966       Column : Column_Position) return Attributed_Character;
967    --  AKA
968    --  More Peek's follow, pragma Inline appears later.
969
970    --  MANPAGE(`curs_winch.3x')
971
972    --  ANCHOR(`winsch()',`Insert')
973    procedure Insert (Win : in Window := Standard_Window;
974                      Ch  : in Attributed_Character);
975    --  AKA
976
977    --  ANCHOR(`mvwinsch()',`Insert')
978    procedure Insert (Win    : in Window := Standard_Window;
979                      Line   : in Line_Position;
980                      Column : in Column_Position;
981                      Ch     : in Attributed_Character);
982    --  AKA
983
984    --  MANPAGE(`curs_winch.3x')
985
986    --  ANCHOR(`winsnstr()',`Insert')
987    procedure Insert (Win : in Window := Standard_Window;
988                      Str : in String;
989                      Len : in Integer := -1);
990    --  AKA
991    --  ALIAS(`winsstr()')
992
993    --  ANCHOR(`mvwinsnstr()',`Insert')
994    procedure Insert (Win    : in Window := Standard_Window;
995                      Line   : in Line_Position;
996                      Column : in Column_Position;
997                      Str    : in String;
998                      Len    : in Integer := -1);
999    --  AKA
1000    --  ALIAS(`mvwinsstr()')
1001    pragma Inline (Insert);
1002
1003    --  MANPAGE(`curs_instr.3x')
1004
1005    --  ANCHOR(`winnstr()',`Peek')
1006    procedure Peek (Win : in  Window := Standard_Window;
1007                    Str : out String;
1008                    Len : in  Integer := -1);
1009    --  AKA
1010    --  ALIAS(`winstr()')
1011
1012    --  ANCHOR(`mvwinnstr()',`Peek')
1013    procedure Peek (Win    : in  Window := Standard_Window;
1014                    Line   : in  Line_Position;
1015                    Column : in  Column_Position;
1016                    Str    : out String;
1017                    Len    : in  Integer := -1);
1018    --  AKA
1019    --  ALIAS(`mvwinstr()')
1020
1021    --  MANPAGE(`curs_inchstr.3x')
1022
1023    --  ANCHOR(`winchnstr()',`Peek')
1024    procedure Peek (Win : in  Window := Standard_Window;
1025                    Str : out Attributed_String;
1026                    Len : in  Integer := -1);
1027    --  AKA
1028    --  ALIAS(`winchstr()')
1029
1030    --  ANCHOR(`mvwinchnstr()',`Peek')
1031    procedure Peek (Win    : in  Window := Standard_Window;
1032                    Line   : in  Line_Position;
1033                    Column : in  Column_Position;
1034                    Str    : out Attributed_String;
1035                    Len    : in  Integer := -1);
1036    --  AKA
1037    --  ALIAS(`mvwinchstr()')
1038    --  We don't inline the Peek procedures
1039
1040    --  MANPAGE(`curs_getstr.3x')
1041
1042    --  ANCHOR(`wgetnstr()',`Get')
1043    procedure Get (Win : in  Window := Standard_Window;
1044                   Str : out String;
1045                   Len : in  Integer := -1);
1046    --  AKA
1047    --  ALIAS(`wgetstr()')
1048
1049    procedure Get (Win    : in  Window := Standard_Window;
1050                   Line   : in  Line_Position;
1051                   Column : in  Column_Position;
1052                   Str    : out String;
1053                   Len    : in  Integer := -1);
1054    --  AKA
1055    --  not specified in ncurses, should be: mvwgetnstr()
1056    --       and mvwgetstr() (which exists)
1057    --  Get is not inlined
1058
1059    --  MANPAGE(`curs_slk.3x')
1060
1061    type Soft_Label_Key_Format is (Three_Two_Three,
1062                                   Four_Four,
1063                                   PC_Style,              --  ncurses specific
1064                                   PC_Style_With_Index);  --  "
1065    type Label_Number is new Positive range 1 .. 12;
1066    type Label_Justification is (Left, Centered, Right);
1067
1068    --  ANCHOR(`slk_init()',`Init_Soft_Label_Keys')
1069    procedure Init_Soft_Label_Keys
1070      (Format : in Soft_Label_Key_Format := Three_Two_Three);
1071    --  AKA
1072    pragma Inline (Init_Soft_Label_Keys);
1073
1074    --  ANCHOR(`slk_set()',`Set_Soft_Label_Key')
1075    procedure Set_Soft_Label_Key (Label : in Label_Number;
1076                                  Text  : in String;
1077                                  Fmt   : in Label_Justification := Left);
1078    --  AKA
1079    --  We don't inline this procedure
1080
1081    --  ANCHOR(`slk_refresh()',`Refresh_Soft_Label_Key')
1082    procedure Refresh_Soft_Label_Keys;
1083    --  AKA
1084    pragma Inline (Refresh_Soft_Label_Keys);
1085
1086    --  ANCHOR(`slk_noutrefresh()',`Refresh_Soft_Label_Keys_Without_Update')
1087    procedure Refresh_Soft_Label_Keys_Without_Update;
1088    --  AKA
1089    pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
1090
1091    --  ANCHOR(`slk_label()',`Get_Soft_Label_Key')
1092    procedure Get_Soft_Label_Key (Label : in Label_Number;
1093                                  Text  : out String);
1094    --  AKA
1095
1096    --  ANCHOR(`slk_label()',`Get_Soft_Label_Key')
1097    function Get_Soft_Label_Key (Label : in Label_Number) return String;
1098    --  AKA
1099    --  Same as function
1100    pragma Inline (Get_Soft_Label_Key);
1101
1102    --  ANCHOR(`slk_clear()',`Clear_Soft_Label_Keys')
1103    procedure Clear_Soft_Label_Keys;
1104    --  AKA
1105    pragma Inline (Clear_Soft_Label_Keys);
1106
1107    --  ANCHOR(`slk_restore()',`Restore_Soft_Label_Keys')
1108    procedure Restore_Soft_Label_Keys;
1109    --  AKA
1110    pragma Inline (Restore_Soft_Label_Keys);
1111
1112    --  ANCHOR(`slk_touch()',`Touch_Soft_Label_Keys')
1113    procedure Touch_Soft_Label_Keys;
1114    --  AKA
1115    pragma Inline (Touch_Soft_Label_Keys);
1116
1117    --  ANCHOR(`slk_attron()',`Switch_Soft_Label_Key_Attributes')
1118    procedure Switch_Soft_Label_Key_Attributes
1119      (Attr : in Character_Attribute_Set;
1120       On   : in Boolean := True);
1121    --  AKA
1122    --  ALIAS(`slk_attroff()')
1123    pragma Inline (Switch_Soft_Label_Key_Attributes);
1124
1125    --  ANCHOR(`slk_attrset()',`Set_Soft_Label_Key_Attributes')
1126    procedure Set_Soft_Label_Key_Attributes
1127      (Attr  : in Character_Attribute_Set := Normal_Video;
1128       Color : in Color_Pair := Color_Pair'First);
1129    --  AKA
1130    pragma Inline (Set_Soft_Label_Key_Attributes);
1131
1132    --  ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes')
1133    function Get_Soft_Label_Key_Attributes return Character_Attribute_Set;
1134    --  AKA
1135
1136    --  ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes')
1137    function Get_Soft_Label_Key_Attributes return Color_Pair;
1138    --  AKA
1139    pragma Inline (Get_Soft_Label_Key_Attributes);
1140
1141    --  MANPAGE(`keyok.3x')
1142
1143    --  ANCHOR(`keyok()',`Enable_Key')
1144    procedure Enable_Key (Key    : in Special_Key_Code;
1145                          Enable : in Boolean := True);
1146    --  AKA
1147    pragma Inline (Enable_Key);
1148
1149    --  MANPAGE(`define_key.3x')
1150
1151    --  ANCHOR(`define_key()',`Define_Key')
1152    procedure Define_Key (Definition : in String;
1153                          Key        : in Special_Key_Code);
1154    --  AKA
1155    pragma Inline (Define_Key);
1156
1157    --  MANPAGE(`curs_util.3x')
1158
1159    --  | Not implemented : filter, use_env, putwin, getwin
1160    --
1161    --  ANCHOR(`keyname()',`Key_Name')
1162    procedure Key_Name (Key  : in  Real_Key_Code;
1163                        Name : out String);
1164    --  AKA
1165    --  The external name for a real keystroke.
1166
1167    --  ANCHOR(`keyname()',`Key_Name')
1168    function Key_Name (Key  : in  Real_Key_Code) return String;
1169    --  AKA
1170    --  Same as function
1171    --  We don't inline this routine
1172
1173    --  ANCHOR(`unctrl()',`Un_Control')
1174    procedure Un_Control (Ch  : in Attributed_Character;
1175                          Str : out String);
1176    --  AKA
1177
1178    --  ANCHOR(`unctrl()',`Un_Control')
1179    function Un_Control (Ch  : in Attributed_Character) return String;
1180    --  AKA
1181    --  Same as function
1182    pragma Inline (Un_Control);
1183
1184    --  ANCHOR(`delay_output()',`Delay_Output')
1185    procedure Delay_Output (Msecs : in Natural);
1186    --  AKA
1187    pragma Inline (Delay_Output);
1188
1189    --  ANCHOR(`flushinp()',`Flush_Input')
1190    procedure Flush_Input;
1191    --  AKA
1192    pragma Inline (Flush_Input);
1193
1194    --  MANPAGE(`curs_termattrs.3x')
1195
1196    --  ANCHOR(`baudrate()',`Baudrate')
1197    function Baudrate return Natural;
1198    --  AKA
1199    pragma Inline (Baudrate);
1200
1201    --  ANCHOR(`erasechar()',`Erase_Character')
1202    function Erase_Character return Character;
1203    --  AKA
1204    pragma Inline (Erase_Character);
1205
1206    --  ANCHOR(`killchar()',`Kill_Character')
1207    function Kill_Character return Character;
1208    --  AKA
1209    pragma Inline (Kill_Character);
1210
1211    --  ANCHOR(`has_ic()',`Has_Insert_Character')
1212    function Has_Insert_Character return Boolean;
1213    --  AKA
1214    pragma Inline (Has_Insert_Character);
1215
1216    --  ANCHOR(`has_il()',`Has_Insert_Line')
1217    function Has_Insert_Line return Boolean;
1218    --  AKA
1219    pragma Inline (Has_Insert_Line);
1220
1221    --  ANCHOR(`termattrs()',`Supported_Attributes')
1222    function Supported_Attributes return Character_Attribute_Set;
1223    --  AKA
1224    pragma Inline (Supported_Attributes);
1225
1226    --  ANCHOR(`longname()',`Long_Name')
1227    procedure Long_Name (Name : out String);
1228    --  AKA
1229
1230    --  ANCHOR(`longname()',`Long_Name')
1231    function Long_Name return String;
1232    --  AKA
1233    --  Same as function
1234    pragma Inline (Long_Name);
1235
1236    --  ANCHOR(`termname()',`Terminal_Name')
1237    procedure Terminal_Name (Name : out String);
1238    --  AKA
1239
1240    --  ANCHOR(`termname()',`Terminal_Name')
1241    function Terminal_Name return String;
1242    --  AKA
1243    --  Same as function
1244    pragma Inline (Terminal_Name);
1245
1246    --  MANPAGE(`curs_color.3x')
1247
1248    --  ANCHOR(`start_clolor()',`Start_Color')
1249    procedure Start_Color;
1250    --  AKA
1251    pragma Import (C, Start_Color, "start_color");
1252
1253    --  ANCHOR(`init_pair()',`Init_Pair')
1254    procedure Init_Pair (Pair : in Redefinable_Color_Pair;
1255                         Fore : in Color_Number;
1256                         Back : in Color_Number);
1257    --  AKA
1258    pragma Inline (Init_Pair);
1259
1260    --  ANCHOR(`pair_content()',`Pair_Content')
1261    procedure Pair_Content (Pair : in Color_Pair;
1262                            Fore : out Color_Number;
1263                            Back : out Color_Number);
1264    --  AKA
1265    pragma Inline (Pair_Content);
1266
1267    --  ANCHOR(`has_colors()',`Has_Colors')
1268    function Has_Colors return Boolean;
1269    --  AKA
1270    pragma Inline (Has_Colors);
1271
1272    --  ANCHOR(`init_color()',`Init_Color')
1273    procedure Init_Color (Color : in Color_Number;
1274                          Red   : in RGB_Value;
1275                          Green : in RGB_Value;
1276                          Blue  : in RGB_Value);
1277    --  AKA
1278    pragma Inline (Init_Color);
1279
1280    --  ANCHOR(`can_change_color()',`Can_Change_Color')
1281    function Can_Change_Color return Boolean;
1282    --  AKA
1283    pragma Inline (Can_Change_Color);
1284
1285    --  ANCHOR(`color_content()',`Color_Content')
1286    procedure Color_Content (Color : in  Color_Number;
1287                             Red   : out RGB_Value;
1288                             Green : out RGB_Value;
1289                             Blue  : out RGB_Value);
1290    --  AKA
1291    pragma Inline (Color_Content);
1292
1293    --  MANPAGE(`curs_kernel.3x')
1294
1295    --  | Not implemented: getsyx, setsyx
1296    --
1297    type Curses_Mode is (Curses, Shell);
1298
1299    --  ANCHOR(`def_prog_mode()',`Save_Curses_Mode')
1300    procedure Save_Curses_Mode (Mode : in Curses_Mode);
1301    --  AKA
1302    --  ALIAS(`def_shell_mode()')
1303    pragma Inline (Save_Curses_Mode);
1304
1305    --  ANCHOR(`reset_prog_mode()',`Reset_Curses_Mode')
1306    procedure Reset_Curses_Mode (Mode : in Curses_Mode);
1307    --  AKA
1308    --  ALIAS(`reset_shell_mode()')
1309    pragma Inline (Reset_Curses_Mode);
1310
1311    --  ANCHOR(`savetty()',`Save_Terminal_State')
1312    procedure Save_Terminal_State;
1313    --  AKA
1314    pragma Inline (Save_Terminal_State);
1315
1316    --  ANCHOR(`resetty();',`Reset_Terminal_State')
1317    procedure Reset_Terminal_State;
1318    --  AKA
1319    pragma Inline (Reset_Terminal_State);
1320
1321    type Stdscr_Init_Proc is access
1322       function (Win     : Window;
1323                 Columns : Column_Count) return Integer;
1324    pragma Convention (C, Stdscr_Init_Proc);
1325    --  N.B.: the return value is actually ignored, but it seems to be
1326    --        a good practice to return 0 if you think all went fine
1327    --        and -1 otherwise.
1328
1329    --  ANCHOR(`ripoffline()',`Rip_Off_Lines')
1330    procedure Rip_Off_Lines (Lines : in Integer;
1331                             Proc  : in Stdscr_Init_Proc);
1332    --  AKA
1333    --  N.B.: to be more precise, this uses a ncurses specific enhancement of
1334    --        ripoffline(), in which the Lines argument absolute value is the
1335    --        number of lines to be ripped of. The official ripoffline() only
1336    --        uses the sign of Lines to rip of a single line from bottom or top.
1337    pragma Inline (Rip_Off_Lines);
1338
1339    type Cursor_Visibility is (Invisible, Normal, Very_Visible);
1340
1341    --  ANCHOR(`curs_set()',`Set_Cursor_Visibility')
1342    procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility);
1343    --  AKA
1344    pragma Inline (Set_Cursor_Visibility);
1345
1346    --  ANCHOR(`napms()',`Nap_Milli_Seconds')
1347    procedure Nap_Milli_Seconds (Ms : in Natural);
1348    --  AKA
1349    pragma Inline (Nap_Milli_Seconds);
1350
1351    --  |=====================================================================
1352    --  | Some usefull helpers.
1353    --  |=====================================================================
1354    type Transform_Direction is (From_Screen, To_Screen);
1355    procedure Transform_Coordinates
1356      (W      : in Window := Standard_Window;
1357       Line   : in out Line_Position;
1358       Column : in out Column_Position;
1359       Dir    : in Transform_Direction := From_Screen);
1360    --  This procedure transforms screen coordinates into coordinates relative
1361    --  to the window and vice versa, depending on the Dir parmeter.
1362    --  Screen coordinates are the position informations on the physical device.
1363    --  An Curses_Exception will be raised if Line and Column are not in the
1364    --  Window or if you pass the Null_Window as argument.
1365    --  We don't inline this procedure
1366
1367 private
1368    type Window is new System.Address;
1369    Null_Window : constant Window := Window (System.Null_Address);
1370
1371 end Terminal_Interface.Curses;