home *** CD-ROM | disk | FTP | other *** search
- TPMOUSE
-
- This file is intended to allow use of a mouse with programs
- written in Turbo Pascal (version 4). Use it at your own risk.
- The author assumes no liability of any kind, having received
- no consideration for this program. I hereby place this program
- in the public domain.
-
- Listed below are the public declarations in Mouse.Tpu. This unit
- allows you to use a mouse with Turbo Pascal v4. A mouse driver
- appropriate to your mouse must be loaded before running a program
- which uses this unit. This unit has been tested with a Genius
- Mouse emulating a Microsoft Mouse and a Mouse Systems Mouse, and
- also with a Logitech serial mouse.
-
- Address bug notices or suggestions for improvement to me at:
-
- Steve Hendrix
- 8860 Brandywine
- Sagamore Hills OH 44067
-
-
-
-
- type
- MousePos = record
- ButtonStat: word;
- X, Y: integer;
- end;
- ButtonCount = record
- ButtonStat: word;
- Events: integer;
- X, Y: integer;
- end;
- MouseShape = record
- ScreenMask: array [0..15] of word;
- CursorMask: array [0..15] of word;
- end;
- MouseMotion = record
- X, Y: integer;
- end;
- RoutinePtr = ^byte;
-
- const
- ArrowCursor: MouseShape = (
- ScreenMask: ($FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,
- $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF);
- CursorMask: ($E000,$F800,$FE00,$D800,$0C00,$0600,$0300,$0000,
- $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000));
- MagnifyingGlass: MouseShape = (
- ScreenMask: ($FC3F,$E3C7,$DFFB,$BFFD,$7FFE,$7FFE,$7FFE,$BFFD,
- $DFFB,$E3C7,$FC3F,$FE7F,$FE7F,$FE7F,$FE7F,$FE7F);
- CursorMask: ($03C0,$1FF8,$3FFC,$7FFE,$FFFF,$FFFF,$FFFF,$7FFE,
- $3FFC,$1FF8,$03C0,$0180,$0180,$0180,$0180,$0180));
-
- function MouseStatus: shortint;
- procedure ShowMouse;
- procedure HideMouse;
- procedure GetMousePos (var Mouse: MousePos);
- procedure SetMousePos (X, Y: integer);
- procedure GetButtonPresses (Button: word; var Button: ButtonCount);
- procedure GetButtonReleases (Button: word; var Button: ButtonCount);
- procedure SetMouseWindow (Xmin, Ymin, Xmax, Ymax: integer);
- procedure DefinePointer (HotX, HotY: integer; var Shape: MouseShape);
- procedure DefineTextPointer (Hardware: boolean; Start, Stop: integer);
- procedure GetMotionCounters (var Motion: MouseMotion);
- procedure DefineEventHandler (Mask: word; Routine: RoutinePtr);
- procedure SetMouseSpeed (X, Y: integer);
- procedure SetInvisWindow (Xmin, Ymin, Xmax, Ymax: integer);
- procedure DoubleSpeedThreshold (MickeysPerSec: integer);
-