aboutsummaryrefslogtreecommitdiff
path: root/doc/wheelapi2.txt
blob: 6f6af29fd55b3be5d15b11c62f45b12357f60c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
This document describes an extension to the CuteMouse wheelapi.txt
to support two wheels (vertical and horizontal).

NOTE: Draft, subject to change.

---------------------------------------------------------------------
Changes to the wheelapi v1 functions:

INT 33/0011 - Check wheel support and enable/get capabilities flags
    AX = 0011h
Return:	AX = 574Dh ('WM' in assembly) if Wheel API is supported by driver
    CX = Capabilities flag
        Bit(s)	Description
        ------	-----------
         0      1=Pointing device supports wheel
         1      1=Pointing device supports 2nd wheel
         2-15	Reserved
Note: calling this function enables support for BOTH wheels
        (until the next int33/0 reset call).
        To receive 2nd wheel interrupts,, bit 9 must be set when registering
        user interrupt routines (see INT 33/000C).

INT 33/0003 - Get cursor position, buttons status and wheel counter
    AX = 0003h
Return:	BL = buttons status (bits 0-4)
    CX = column
    DX = row
    BH = 8-bit signed counter of wheel movement since last call
          positive value means downward wheel movement.
    SI = 16-bit signed counter of 2nd wheel movement since last call
          positive value means rightward wheel movement.
Note:   calling this clears the wheel counter for ALL wheels.

INT 33/0005 - Get button press or wheel movement data
    AX = 0005h
    BX = button number, -1 for vertical wheel, -2 for 2nd/horizontal wheel
Note:   as in wheelapi v1, AH always contains (1st) wheel movement on return
          independently of button number requested in BX.

INT 33/0006 - Get button release or wheel movement data
    AX = 0006h
    BX = button number, -1 for vertical wheel, -2 for 2nd/horizontal wheel

INT 33/000C - Define User Interrupt Routine
INT 33/0014 - Exchange User Interrupt Routines
Bitfields for mouse call mask:
Bit(s)	Description
 0-6	same as Table 03171 (as in int33.lst)
 7      vertical wheel movement (as in wheelapi.txt)
 8      (absolute mouse event bit)
 9      horizontal wheel movement
 10     4th button pressed
 11     4th button released
 12     5th button pressed
 13     5th button released
 14-15	unused
Notes:	on entry, bit 9 of CX (call mask) indicates that the user routine
          will be called on horizontal wheel movement
        if the user routine is called with bit 9 of AX (condition mask) set,
          then BH will hold the 8-bit signed counter of HORIZONTAL wheel
          movement since the last call to the routine. if bit 7 is set, then
          BH holds VERTICAL wheel movement.
        it is impossible for the user routine to be called with both
          vertical (bit 7) and horizontal (bit 9) movement.

Remark: A program that just sets 0xFFFF event mask and expects to find vertical
           wheel movement info in BH (wheelapi v1 style) will be confused, as
           here when bit 9 is set BH will contain horizontal wheel movement
           instead. DN/2 does this, so horizontal scrolling acts like vertical.
           Maybe this isn't so bad.