5 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
8 <I>------------------------------------------------------------------------------</I>
10 <I>-- <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding --</I>
12 <I>-- Terminal_Interface.Curses.Mouse --</I>
16 <I>------------------------------------------------------------------------------</I>
17 <I>-- Copyright (c) 1998 Free Software Foundation, Inc. --</I>
19 <I>-- Permission is hereby granted, free of charge, to any person obtaining a --</I>
20 <I>-- copy of this software and associated documentation files (the --</I>
21 <I>-- "Software"), to deal in the Software without restriction, including --</I>
22 <I>-- without limitation the rights to use, copy, modify, merge, publish, --</I>
23 <I>-- distribute, distribute with modifications, sublicense, and/or sell --</I>
24 <I>-- copies of the Software, and to permit persons to whom the Software is --</I>
25 <I>-- furnished to do so, subject to the following conditions: --</I>
27 <I>-- The above copyright notice and this permission notice shall be included --</I>
28 <I>-- in all copies or substantial portions of the Software. --</I>
30 <I>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --</I>
31 <I>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --</I>
32 <I>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --</I>
33 <I>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --</I>
34 <I>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --</I>
35 <I>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --</I>
36 <I>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --</I>
38 <I>-- Except as contained in this notice, the name(s) of the above copyright --</I>
39 <I>-- holders shall not be used in advertising or otherwise to promote the --</I>
40 <I>-- sale, use or other dealings in this Software without prior written --</I>
41 <I>-- authorization. --</I>
42 <I>------------------------------------------------------------------------------</I>
43 <I>-- <A HREF="http://home.t-online.de/home/Juergen.Pfeifer">Jürgen Pfeifer</A>, Email: <A HREF="mailto:Juergen.Pfeifer@T-Online.de">Juergen.Pfeifer@T-Online.de</A> --</I>
44 <I>-- Version Control:</I>
45 <I>-- @Revision: 1.8 @</I>
46 <I>------------------------------------------------------------------------------</I>
47 <I>-- mouse binding.</I>
48 <I>-- This module is generated. Please don't change it manually!</I>
49 <I>-- Run the generator instead.</I>
53 <B>package</B> Terminal_Interface.Curses.Mouse <B>is</B>
55 <I>-- |=====================================================================</I>
56 <I>-- | Man page <A HREF="curs_mouse.3x.html">curs_mouse.3x</A></I>
57 <I>-- |=====================================================================</I>
58 <I>-- Please note, that in ncurses-1.9.9e documentation mouse support</I>
59 <I>-- is still marked as experimental. So also this binding will change</I>
60 <I>-- if the ncurses methods change.</I>
62 type Event_Mask <B>is</B> <B>private</B>;
63 No_Events : <B>constant</B> Event_Mask;
64 All_Events : <B>constant</B> Event_Mask;
66 type Mouse_Button <B>is</B> (Left, <I>-- aka: Button 1</I>
67 Middle, <I>-- aka: Button 2</I>
68 Right, <I>-- aka: Button 3</I>
69 Button4, <I>-- aka: Button 4</I>
70 Control, <I>-- Control Key</I>
71 Shift, <I>-- Shift Key</I>
72 Alt); <I>-- ALT Key</I>
74 type Button_State <B>is</B> (Released,
80 type Mouse_Event <B>is</B> <B>private</B>;
82 <I>-- |=====================================================================</I>
83 <I>-- | Man page <A HREF="curs_mouse.3x.html">curs_mouse.3x</A></I>
84 <I>-- |=====================================================================</I>
86 <B>function</B> Has_Mouse <B>return</B> Boolean;
87 <I>-- Return true if a mouse device is supported, false otherwise.</I>
89 <B>procedure</B> Register_Reportable_Event
90 (B : <B>in</B> Mouse_Button;
91 S : <B>in</B> Button_State;
92 Mask : <B>in</B> <B>out</B> Event_Mask);
93 <I>-- Stores the event described by the button and the state in the mask.</I>
94 <I>-- Before you call this the first time, you should init the mask</I>
95 <I>-- with the Empty_Mask constant</I>
97 <I>-- <A NAME="AFU_1">|</I>
98 <B>function</B> Start_Mouse (Mask : Event_Mask := All_Events)
99 <B>return</B> Event_Mask;
100 <I>-- AKA: <A HREF="curs_mouse.3x.html">mousemask()</A></I>
102 <B>procedure</B> End_Mouse;
103 <I>-- Terminates the mouse</I>
105 <I>-- <A NAME="AFU_2">|</I>
106 <B>function</B> Get_Mouse <B>return</B> Mouse_Event;
107 <I>-- AKA: <A HREF="curs_mouse.3x.html">getmouse()</A></I>
109 <B>procedure</B> Get_Event (Event : <B>in</B> Mouse_Event;
110 Y : <B>out</B> Line_Position;
111 X : <B>out</B> Column_Position;
112 Button : <B>out</B> Mouse_Button;
113 State : <B>out</B> Button_State);
114 <I>-- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they</I>
115 <I>-- may not be identical to window coordinates.</I>
117 <I>-- <A NAME="AFU_3">|</I>
118 <B>procedure</B> Unget_Mouse (Event : <B>in</B> Mouse_Event);
119 <I>-- AKA: <A HREF="curs_mouse.3x.html">ungetmouse()</A></I>
121 <I>-- <A NAME="AFU_4">|</I>
122 <B>function</B> Enclosed_In_Window (Win : Window := Standard_Window;
123 Event : Mouse_Event) <B>return</B> Boolean;
124 <I>-- AKA: <A HREF="curs_mouse.3x.html">wenclose()</A></I>
125 <I>-- But : use event instead of screen coordinates.</I>
127 <I>-- <A NAME="AFU_5">|</I>
128 <B>function</B> Mouse_Interval (Msec : Natural := 200) <B>return</B> Natural;
129 <I>-- AKA: <A HREF="curs_mouse.3x.html">mouseinterval()</A></I>
132 type Event_Mask <B>is</B> <B>new</B> Interfaces.C.int;
133 No_Events : <B>constant</B> Event_Mask := 0;
134 All_Events : <B>constant</B> Event_Mask := -1;
136 type Mouse_Event <B>is</B>
138 Id : Integer <B>range</B> Integer (Interfaces.C.short'First) ..
139 Integer (Interfaces.C.Short'Last);
140 X, Y, Z : Integer <B>range</B> Integer (Interfaces.C.int'First) ..
141 Integer (Interfaces.C.int'Last);
143 <B>end</B> <B>record</B>;
144 <B>pragma</B> Convention (C, Mouse_Event);
145 <B>pragma</B> Pack (Mouse_Event);
147 <B>for</B> Mouse_Event <B>use</B>
149 Id <B>at</B> 0 <B>range</B> 0 .. 15;
150 X <B>at</B> 0 <B>range</B> 32 .. 63;
151 Y <B>at</B> 0 <B>range</B> 64 .. 95;
152 Z <B>at</B> 0 <B>range</B> 96 .. 127;
153 Bstate <B>at</B> 0 <B>range</B> 128 .. 159;
154 <B>end</B> <B>record</B>;
155 <I>-- Please note: this rep. clause is generated and may be</I>
156 <I>-- different on your system.</I>
158 Generation_Bit_Order : <B>constant</B> System.Bit_Order := System.Low_Order_First;
159 <I>-- This constant may be different on your system.</I>
161 <B>end</B> Terminal_Interface.Curses.Mouse;
167 This is BETA software. The interface is subject to change without notice.<P>
168 <!-- Do NOT delete my name or the tool name from below; -->
169 <!-- giving me credit is a condition of use of ada2html -->
170 <P><I>This hypertext format was generated by <A HREF="http://www.adahome.com/Tutorials/Lovelace/dwheeler.htm">David A. Wheeler</A>'s <A HREF="http://www.adahome.com/Resources/Tools/ada2html/ada2html.htm">ada2html</A></I>