* WANTED: mouse routines for Ada Z, Meridian ADA
@ 1991-04-29 11:50 Naasif Gierdien
1991-05-01 3:05 ` Michael Feldman
0 siblings, 1 reply; 2+ messages in thread
From: Naasif Gierdien @ 1991-04-29 11:50 UTC (permalink / raw)
The subject line says it all..I'm looking for mouse routines
to run under the Ada Z or Meridian ada environment on a 286/386.
If anyone can suggest anything or lead me in the right direction..??
Thanks in advance,
-Naasif
--
Naasif Gierdien \_/ Melbourne, Australia.
( ) -- Could someone please stop the planet --
( ) -- I want to get off ! --
Internet: naasif@eyrie.img.uu.oz.au UUCP: ...!uunet!eyrie.uu.oz.au!naasif
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: WANTED: mouse routines for Ada Z, Meridian ADA
1991-04-29 11:50 WANTED: mouse routines for Ada Z, Meridian ADA Naasif Gierdien
@ 1991-05-01 3:05 ` Michael Feldman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Feldman @ 1991-05-01 3:05 UTC (permalink / raw)
-- Package MSMOUSE:
--
-- Developed by:
-- Philip K. Thomas, The George Washington University
-- 04/20/88
--
-- This must used with the microsoft mouse driver active.
-- It is used to communicate with the microsoft mouse. The various
-- procedures are specified below.
--
-- This package uses the Meridian package INTERRUPT
--
-- Specification:
--
with Interrupt; use Interrupt;
Package MSMOUSE is
function Are_You_There return Boolean;
-- If mouse is active, resets mouse and returns True
-- Else returns False
procedure Show_Cursor;
-- Turns Cursor On
procedure Hide_Cursor;
-- Turns Cursor Off
procedure Get_Position(x:out Integer; y:out Integer);
-- Returns x,y position of cursor
procedure Set_Cursor(x:in Integer; y:in Integer);
-- Positions Coursor at location x,y
procedure Left_Button_Press(x:out Integer; y:out Integer; c:out Integer);
-- Returns number of times LEFT button was pressed since last call
-- also x,y position of cursor at last press
procedure Right_Button_Press(x:out Integer; y:out Integer; c:out Integer);
-- Returns number of times RIGHT button was pressed since last call
-- also x,y position of cursor at last press
procedure Left_Button_Release(x:out Integer; y:out Integer; c:out Integer);
-- Returns number of times LEFT button was released since last call
-- also x,y position of cursor at last release
procedure Right_Button_Release(x:out Integer; y:out Integer; c:out Integer);
-- Returns number of times RIGHT button was released since last call
-- also x,y position of cursor at last release
procedure Set_X_Window(min:in Integer; max:in Integer);
-- Restricts cursor movement to between min and max in the horizontal direction
procedure Set_Y_Window(min:in Integer; max:in Integer);
-- Restricts cursor movement to between min and max in the vertical direction
end MSMOUSE;
Package body MSMOUSE is
ms_vec: constant Interrupt_Range := 51; -- Microsoft's interrupt vector
Reg_File: Registers; -- Registers used for communication
procedure ms_int is
begin
vector (
on => ms_vec,
register_block => reg_file
);
end ms_int;
function Are_You_There return Boolean is
begin
reg_file.Ax:=0;
ms_int;
return not (reg_file.Ax = 0);
end Are_You_There;
procedure Show_Cursor is
begin
reg_file.Ax:=1;
ms_int;
end Show_Cursor;
procedure Hide_Cursor is
begin
reg_file.Ax:=2;
ms_int;
end Hide_Cursor;
procedure Get_Position(x:out Integer; y:out Integer) is
begin
reg_file.Ax:=3;
ms_int;
x:= reg_file.Cx;
y:= reg_file.Dx;
end Get_Position;
procedure Set_Cursor(x:in Integer; y:in Integer) is
begin
reg_file.Ax:=4;
reg_file.Cx:=x;
reg_file.Dx:=y;
ms_int;
end Set_Cursor;
procedure Left_Button_Press(x:out Integer; y:out Integer; c:out Integer) is
begin
reg_file.Ax:=5;
reg_file.Bx:=0;
ms_int;
x:= reg_file.Cx;
y:= reg_file.Dx;
c:= reg_file.Bx;
end Left_Button_Press;
procedure Right_Button_Press(x:out Integer; y:out Integer; c:out Integer) is
begin
reg_file.Ax:=5;
reg_file.Bx:=1;
ms_int;
x:= reg_file.Cx;
y:= reg_file.Dx;
c:= reg_file.Bx;
end Right_Button_Press;
procedure Left_Button_Release(x:out Integer; y:out Integer; c:out Integer) is
begin
reg_file.Ax:=6;
reg_file.Bx:=0;
ms_int;
x:= reg_file.Cx;
y:= reg_file.Dx;
c:= reg_file.Bx;
end Left_Button_Release;
procedure Right_Button_Release(x:out Integer; y:out Integer; c:out Integer) is
begin
reg_file.Ax:=6;
reg_file.Bx:=1;
ms_int;
x:= reg_file.Cx;
y:= reg_file.Dx;
c:= reg_file.Bx;
end Right_Button_Release;
procedure Set_X_Window(min:in Integer; max:in Integer) is
begin
reg_file.Ax:=7;
reg_file.Cx:=min;
reg_file.Dx:=max;
ms_int;
end Set_X_Window;
procedure Set_Y_Window(min:in Integer; max:in Integer) is
begin
reg_file.Ax:=8;
reg_file.Cx:=min;
reg_file.Dx:=max;
ms_int;
end Set_Y_Window;
end MSMOUSE;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1991-05-01 3:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-04-29 11:50 WANTED: mouse routines for Ada Z, Meridian ADA Naasif Gierdien
1991-05-01 3:05 ` Michael Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox