* ada and mouse
@ 2002-05-31 12:15 tony
2002-05-31 17:57 ` Larry Kilgallen
2002-05-31 21:53 ` tmoran
0 siblings, 2 replies; 3+ messages in thread
From: tony @ 2002-05-31 12:15 UTC (permalink / raw)
how using mouse in ada83 ?
please, send me an exemple.
thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ada and mouse
2002-05-31 12:15 ada and mouse tony
@ 2002-05-31 17:57 ` Larry Kilgallen
2002-05-31 21:53 ` tmoran
1 sibling, 0 replies; 3+ messages in thread
From: Larry Kilgallen @ 2002-05-31 17:57 UTC (permalink / raw)
In article <ad7pgu$jic$1@news2adm.admin.in.none.net>, "tony" <dark-angel6@libertysurf.fr> writes:
> how using mouse in ada83 ?
> please, send me an exemple.
You need to read the programming documentation for your operating system.
^ permalink raw reply [flat|nested] 3+ messages in thread
* re: ada and mouse
2002-05-31 12:15 ada and mouse tony
2002-05-31 17:57 ` Larry Kilgallen
@ 2002-05-31 21:53 ` tmoran
1 sibling, 0 replies; 3+ messages in thread
From: tmoran @ 2002-05-31 21:53 UTC (permalink / raw)
> how using mouse in ada83 ?
> please, send me an exemple.
Here's the spec for a 16 bit DOS mouse interface using Janus Ada 83.
I'll e-mail the body if you want.
with System;
package Mouse is
-- low level mouse driver interface
-- uses int33 functions
-- 16#00#: reset
-- 16#01#: show cursor
-- 16#02#: hide cursor
-- 16#03#: get mouse position and button status
-- 16#04#: set mouse cursor position
-- 16#07#: set min/max horizontal position
-- 16#08#: set min/max vertical position
-- 16#09#: set graphics cursor block
-- This is set True or False by calls on Reset.
-- There is an automatic call on Reset at package initialization time.
-- All mouse operations are NOPs if not Driver_Present
Driver_Present: Boolean := False;
type State is record
X,
Y : Integer;
Left_Button,
Middle_Button,
Right_Button: Boolean;
end record;
-- x,y measured in mickeys
-- button flags are true iff button is currently depressed
Current : State := (X | Y => 0,
Left_Button | Middle_Button | Right_Button => False);
procedure Check; -- updates Current
-- The public record 'current' is used, rather than having 'out'
-- parameters to the 'check' routine, for simplicity and efficiency.
-- There is no way with this interface to have more than one mouse
-- per OS task, so the generality of out parameters, or a generic
-- mouse package, would be spurious.
procedure Reset;
procedure Hide_Cursor;
procedure Show_Cursor;
procedure Horizontal_Range(Min,
Max : in Natural);
procedure Vertical_Range(Min,
Max : in Natural);
type Graphic_Cursor_Bits is array (Integer range <>) of System.Word;
subtype Normal_Graphic_Cursor_Bits is Graphic_Cursor_Bits(0 .. 15);
subtype Hot_Spot_Offsets is Integer range - 16 .. 16;
procedure Set_Graphic_Cursor_Words(Screen_Mask: in Graphic_Cursor_Bits;
Cursor_Mask: in Graphic_Cursor_Bits;
X_Hot_Spot : in Hot_Spot_Offsets;
Y_Hot_Spot : in Hot_Spot_Offsets);
procedure Set_Cursor_Position(X,
Y : in Integer);
end Mouse;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-05-31 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-31 12:15 ada and mouse tony
2002-05-31 17:57 ` Larry Kilgallen
2002-05-31 21:53 ` tmoran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox