blob: e22734358a5e906fda2a817685dfe2c1c243cc0d [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301-- -*- ada -*-
2define(`HTMLNAME',`terminal_interface-curses-trace__ads.htm')dnl
3include(M4MACRO)------------------------------------------------------------------------------
4-- --
5-- GNAT ncurses Binding --
6-- --
7-- Terminal_Interface.Curses.Trace --
8-- --
9-- S P E C --
10-- --
11------------------------------------------------------------------------------
Steve Kondikae271bc2015-11-15 02:50:53 +010012-- Copyright (c) 2000,2014 Free Software Foundation, Inc. --
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053013-- --
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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
39-- Version Control:
Steve Kondikae271bc2015-11-15 02:50:53 +010040-- $Revision: 1.4 $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053041-- Binding Version 01.00
42------------------------------------------------------------------------------
43
44package Terminal_Interface.Curses.Trace is
45 pragma Preelaborate (Terminal_Interface.Curses.Trace);
46
Steve Kondikae271bc2015-11-15 02:50:53 +010047 type Trace_Attribute_Set is
48 record
49 Times : Boolean;
50 Tputs : Boolean;
51 Update : Boolean;
52 Cursor_Move : Boolean;
53 Character_Output : Boolean;
54 Calls : Boolean;
55 Virtual_Puts : Boolean;
56 Input_Events : Boolean;
57 TTY_State : Boolean;
58 Internal_Calls : Boolean;
59 Character_Calls : Boolean;
60 Termcap_TermInfo : Boolean;
61 Attribute_Color : Boolean;
62 end record;
63 pragma Convention (C_Pass_By_Copy, Trace_Attribute_Set);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053064
Steve Kondikae271bc2015-11-15 02:50:53 +010065 for Trace_Attribute_Set use
66 record
67 Times at 0 range Curses_Constants.TRACE_TIMES_First
68 .. Curses_Constants.TRACE_TIMES_Last;
69 Tputs at 0 range Curses_Constants.TRACE_TPUTS_First
70 .. Curses_Constants.TRACE_TPUTS_Last;
71 Update at 0 range Curses_Constants.TRACE_UPDATE_First
72 .. Curses_Constants.TRACE_UPDATE_Last;
73 Cursor_Move at 0 range Curses_Constants.TRACE_MOVE_First
74 .. Curses_Constants.TRACE_MOVE_Last;
75 Character_Output at 0 range Curses_Constants.TRACE_CHARPUT_First
76 .. Curses_Constants.TRACE_CHARPUT_Last;
77 Calls at 0 range Curses_Constants.TRACE_CALLS_First
78 .. Curses_Constants.TRACE_CALLS_Last;
79 Virtual_Puts at 0 range Curses_Constants.TRACE_VIRTPUT_First
80 .. Curses_Constants.TRACE_VIRTPUT_Last;
81 Input_Events at 0 range Curses_Constants.TRACE_IEVENT_First
82 .. Curses_Constants.TRACE_IEVENT_Last;
83 TTY_State at 0 range Curses_Constants.TRACE_BITS_First
84 .. Curses_Constants.TRACE_BITS_Last;
85 Internal_Calls at 0 range Curses_Constants.TRACE_ICALLS_First
86 .. Curses_Constants.TRACE_ICALLS_Last;
87 Character_Calls at 0 range Curses_Constants.TRACE_CCALLS_First
88 .. Curses_Constants.TRACE_CCALLS_Last;
89 Termcap_TermInfo at 0 range Curses_Constants.TRACE_DATABASE_First
90 .. Curses_Constants.TRACE_DATABASE_Last;
91 Attribute_Color at 0 range Curses_Constants.TRACE_ATTRS_First
92 .. Curses_Constants.TRACE_ATTRS_Last;
93 end record;
94 pragma Warnings (Off);
95 for Trace_Attribute_Set'Size use Curses_Constants.Trace_Size;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053096 pragma Warnings (On);
97
98 Trace_Disable : constant Trace_Attribute_Set := (others => False);
99
100 Trace_Ordinary : constant Trace_Attribute_Set :=
101 (Times => True,
102 Tputs => True,
103 Update => True,
104 Cursor_Move => True,
105 Character_Output => True,
106 others => False);
107 Trace_Maximum : constant Trace_Attribute_Set := (others => True);
108
109------------------------------------------------------------------------------
110
111 -- MANPAGE(`curs_trace.3x')
112
113 -- ANCHOR(`trace()',`Trace_on')
114 procedure Trace_On (x : Trace_Attribute_Set);
115 -- The debugging library has trace.
116
117 -- ANCHOR(`_tracef()',`Trace_Put')
118 procedure Trace_Put (str : String);
119 -- AKA
120
121 Current_Trace_Setting : Trace_Attribute_Set;
122 pragma Import (C, Current_Trace_Setting, "_nc_tracing");
123
124end Terminal_Interface.Curses.Trace;