Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileKbdvbase()Initmous() XBIOSSyntaxVOID Initmous( mode, param, hand )
WORD mode;
VOIDP param;
VOID (*hand)();
Function Initmous() determines the method of handling IKBD mouse
packets from the system.
Opcode 0 (0x00)
Availability All TOSversions.
Parameters mode indicates a IKBD reporting mode and defines the meaning
of the other parameters as listed below. hand points to
a mouse packet handler which is called when each mouse
packet is sent. Register A0 contains the mouse packet
address when called.
Name mode Meaning
IM_DISABLE 0 Disable mouse reporting.
IM_RELATIVE 1 Enable relative mouse reporting mode.
Packets report offsets from the previous
mouse position. In this mode, param is
a pointer to a structure as follows:
struct param
{
BYTE topmode;
BYTE buttons;
BYTE xparam;
BYTE yparam;
}
topmode is IM_YBOT (0) to indicate that
Y=0 means bottom of the screen. A topmode
value of IM_YTOP (1) indicates that Y=0
means the top of the screen. buttons is
a bit array which affect the way mouse
clicks are handled. A value of IM_KEYS (4)
causes mouse buttons to generate keycodes
rather than mouse packets. A value of
IM_PACKETS (3) causes the absolute mouse
position to be reported on each button
press. xparam and yparam specify the number
of mouse X/Y increments between position
report packets. This mode is the default
mode of the AES and VDI.
IM_ABSOLUTE 2 Enable absolute mouse reporting mode.
Packets report actual screen positions. In
this mode, param is a pointer to
a structure as follows:
struct param
{
BYTE topmode;
BYTE buttons;
BYTE xparam;
BYTE yparam;
WORD xmax;
WORD ymax;
WORD xinitial;
WORD yinitial;
}
topmode, buttons, xparam, and yparam are
the same as for mode 2. xmax and ymax
specify the maximum X and Y positions the
mouse should be allowed to move to. xinital
and yinitial specify the mouse's initial
location.
- 3 Unused
IM_KEYCODE 4 Enable mouse keycode mode. Keyboard codes
for mouse movements are sent rather than
actual mouse packets. param is handled the
same as in mode 1.
Binding pea hand
pea param
move.w mode,-(sp)
clr.w -(sp)
trap #14
lea 12(sp),sp
Caveats Changing the mouse packet handler to anything but relative
mode will cause the AES and VDI to stop receiving mouse
input.
See Also Kbdvbase()