]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/terminal_interface-curses-mouse_s.html
ncurses 4.1
[ncurses.git] / Ada95 / html / terminal_interface-curses-mouse_s.html
1 <HTML>
2 <HEAD>
3 <TITLE></TITLE>
4 </HEAD>
5 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
6 <PRE>
7
8 <I>------------------------------------------------------------------------------</I>
9 <I>--                                                                          --</I>
10 <I>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</I>
11 <I>--                                                                          --</I>
12 <I>--                      Terminal_Interface.Curses.Mouse                     --</I>
13 <I>--                                                                          --</I>
14 <I>--                                 S P E C                                  --</I>
15 <I>--                                                                          --</I>
16 <I>--  Version 00.92                                                           --</I>
17 <I>--                                                                          --</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&uuml;rgen Pfeifer</A>, Email: <A HREF="mailto:Juergen.Pfeifer@T-Online.de">Juergen.Pfeifer@T-Online.de</A>                      --</I>
20 <I>--                                                                          --</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>
28 <I>--                                                                          --</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>
37 <I>--  |</I>
38 <B>with</B> System;
39
40 <B>package</B> Terminal_Interface.Curses.Mouse <B>is</B>
41
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>
48    <I>--</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;
52
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>
60
61    type Button_State <B>is</B> (Released,
62                          Pressed,
63                          Clicked,
64                          Double_Clicked,
65                          Triple_Clicked);
66
67    type Mouse_Event <B>is</B> <B>private</B>;
68
69    <I>--  |=====================================================================</I>
70    <I>--  | Man page <A HREF="curs_mouse.3x.html">curs_mouse.3x</A></I>
71    <I>--  |=====================================================================</I>
72
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>
80
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>
85
86    <B>procedure</B> End_Mouse;
87    <B>pragma</B> Import (C, End_Mouse, "_nc_ada_unregister_mouse");
88    <I>--  Terminates the mouse</I>
89
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>
93
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>
101
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>
105
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>
111
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>
115
116 <B>private</B>
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;
120
121    type Mouse_Event <B>is</B>
122       <B>record</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);
127          Bstate  : Event_Mask;
128       <B>end</B> <B>record</B>;
129    <B>pragma</B> Convention (C, Mouse_Event);
130    <B>pragma</B> Pack (Mouse_Event);
131
132    <B>for</B> Mouse_Event <B>use</B>
133       <B>record</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>
142
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>
145
146 <B>end</B> Terminal_Interface.Curses.Mouse;
147
148 </PRE>
149
150 <P><HR><P>
151 <P>
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>
156 </BODY>
157 </HTML>
158