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>-- Version 00.92 --</I>
18 <I>-- The ncurses Ada95 binding is copyrighted 1996 by --</I>
19 <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>
21 <I>-- Permission is hereby granted to reproduce and distribute this --</I>
22 <I>-- binding by any means and for any fee, whether alone or as part --</I>
23 <I>-- of a larger distribution, in source or in binary form, PROVIDED --</I>
24 <I>-- this notice is included with any such distribution, and is not --</I>
25 <I>-- removed from any of its header files. Mention of ncurses and the --</I>
26 <I>-- author of this binding in any applications linked with it is --</I>
27 <I>-- highly appreciated. --</I>
29 <I>-- This binding comes AS IS with no warranty, implied or expressed. --</I>
30 <I>------------------------------------------------------------------------------</I>
31 <I>-- Version Control:</I>
32 <I>-- @Revision: 1.6 @</I>
33 <I>------------------------------------------------------------------------------</I>
34 <I>-- mouse binding, generated at Sun Feb 2 17:21:45 1997</I>
35 <I>-- This module is generated. Please don't change it manually!</I>
36 <I>-- Run the generator instead.</I>
40 <B>package</B> Terminal_Interface.Curses.Mouse <B>is</B>
42 <I>-- |=====================================================================</I>
43 <I>-- | Man page <A HREF="curs_mouse.3x.html">curs_mouse.3x</A></I>
44 <I>-- |=====================================================================</I>
45 <I>-- Please note, that in ncurses-1.9.9e documentation mouse support</I>
46 <I>-- is still marked as experimental. So also this binding will change</I>
47 <I>-- if the ncurses methods change.</I>
49 type Event_Mask <B>is</B> <B>private</B>;
50 No_Events : <B>constant</B> Event_Mask;
51 All_Events : <B>constant</B> Event_Mask;
53 type Mouse_Button <B>is</B> (Left, <I>-- aka: Button 1</I>
54 Middle, <I>-- aka: Button 2</I>
55 Right, <I>-- aka: Button 3</I>
56 Button4, <I>-- aka: Button 4</I>
57 Control, <I>-- Control Key</I>
58 Shift, <I>-- Shift Key</I>
59 Alt); <I>-- ALT Key</I>
61 type Button_State <B>is</B> (Released,
67 type Mouse_Event <B>is</B> <B>private</B>;
69 <I>-- |=====================================================================</I>
70 <I>-- | Man page <A HREF="curs_mouse.3x.html">curs_mouse.3x</A></I>
71 <I>-- |=====================================================================</I>
73 <B>procedure</B> Register_Reportable_Event
74 (B : <B>in</B> Mouse_Button;
75 S : <B>in</B> Button_State;
76 Mask : <B>in</B> <B>out</B> Event_Mask);
77 <I>-- Stores the event described by the button and the state in the mask.</I>
78 <I>-- Before you call this the first time, you should init the mask</I>
79 <I>-- with the Empty_Mask constant</I>
81 <I>-- <A NAME="AFU_1">|</I>
82 <B>function</B> Start_Mouse (Mask : Event_Mask := All_Events)
83 <B>return</B> Event_Mask;
84 <I>-- AKA: <A HREF="curs_mouse.3x.html">mousemask()</A></I>
86 <B>procedure</B> End_Mouse;
87 <B>pragma</B> Import (C, End_Mouse, "_nc_ada_unregister_mouse");
88 <I>-- Terminates the mouse</I>
90 <I>-- <A NAME="AFU_2">|</I>
91 <B>function</B> Get_Mouse <B>return</B> Mouse_Event;
92 <I>-- AKA: <A HREF="curs_mouse.3x.html">getmouse()</A></I>
94 <B>procedure</B> Get_Event (Event : <B>in</B> Mouse_Event;
95 Y : <B>out</B> Line_Position;
96 X : <B>out</B> Column_Position;
97 Button : <B>out</B> Mouse_Button;
98 State : <B>out</B> Button_State);
99 <I>-- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they</I>
100 <I>-- may not be identical to window coordinates.</I>
102 <I>-- <A NAME="AFU_3">|</I>
103 <B>procedure</B> Unget_Mouse (Event : <B>in</B> Mouse_Event);
104 <I>-- AKA: <A HREF="curs_mouse.3x.html">ungetmouse()</A></I>
106 <I>-- <A NAME="AFU_4">|</I>
107 <B>function</B> Enclosed_In_Window (Win : Window := Standard_Window;
108 Event : Mouse_Event) <B>return</B> Boolean;
109 <I>-- AKA: <A HREF="curs_mouse.3x.html">wenclose()</A></I>
110 <I>-- But : use event instead of screen coordinates.</I>
112 <I>-- <A NAME="AFU_5">|</I>
113 <B>function</B> Mouse_Interval (Msec : Natural := 200) <B>return</B> Natural;
114 <I>-- AKA: <A HREF="curs_mouse.3x.html">mouseinterval()</A></I>
117 type Event_Mask <B>is</B> <B>new</B> Interfaces.C.int;
118 No_Events : <B>constant</B> Event_Mask := 0;
119 All_Events : <B>constant</B> Event_Mask := -1;
121 type Mouse_Event <B>is</B>
123 Id : Integer <B>range</B> Integer (Interfaces.C.short'First) ..
124 Integer (Interfaces.C.Short'Last);
125 X, Y, Z : Integer <B>range</B> Integer (Interfaces.C.int'First) ..
126 Integer (Interfaces.C.int'Last);
128 <B>end</B> <B>record</B>;
129 <B>pragma</B> Convention (C, Mouse_Event);
130 <B>pragma</B> Pack (Mouse_Event);
132 <B>for</B> Mouse_Event <B>use</B>
134 Id <B>at</B> 0 <B>range</B> 0 .. 15;
135 X <B>at</B> 0 <B>range</B> 32 .. 63;
136 Y <B>at</B> 0 <B>range</B> 64 .. 95;
137 Z <B>at</B> 0 <B>range</B> 96 .. 127;
138 Bstate <B>at</B> 0 <B>range</B> 128 .. 159;
139 <B>end</B> <B>record</B>;
140 <I>-- Please note: this rep. clause is generated and may be</I>
141 <I>-- different on your system.</I>
143 Generation_Bit_Order : <B>constant</B> System.Bit_Order := System.Low_Order_First;
144 <I>-- This constant may be different on your system.</I>
146 <B>end</B> Terminal_Interface.Curses.Mouse;
152 This is BETA software. The interface is subject to change without notice.<P>
153 <!-- Do NOT delete my name or the tool name from below; -->
154 <!-- giving me credit is a condition of use of ada2html -->
155 <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>