From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fba29d12a978f37 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-31 14:54:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr13.news.prodigy.com.POSTED!3bae8248!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: re: ada and mouse References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.14.79 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr13.news.prodigy.com 1022882033 ST000 12.234.14.79 (Fri, 31 May 2002 17:53:53 EDT) NNTP-Posting-Date: Fri, 31 May 2002 17:53:53 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: Q[R_PJONAJUMB_LY@BCBNWX@RJ_XPDLMN@GZ_GYO^JWTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN Date: Fri, 31 May 2002 21:53:53 GMT Xref: archiver1.google.com comp.lang.ada:25125 Date: 2002-05-31T21:53:53+00:00 List-Id: > 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;