Annotation of coherent/a/usr/include.b4ps2/sys/ms.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Driver Kit Version 1.1.0
                      3:  *     Copyright (c) 1982, 1990 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: /*
                      7:  *     Header for Microsoft mouse driver
                      8:  */
                      9: 
                     10: /*
                     11:  *     ioctl function definitions
                     12:  */
                     13: 
                     14: #define        MS_SETUP        0
                     15: #define        MS_SETCRS       1
                     16: #define        MS_READCRS      2
                     17: #define        MS_SETMICK      3
                     18: #define        MS_READMICK     4
                     19: #define        MS_READBTNS     5
                     20: #define        MS_READSTAT     6
                     21: #define        MS_WAIT         7
                     22: 
                     23: /* the third argument to ioctl is a pointer defined by */
                     24: /* one of the following structures:                    */
                     25: 
                     26: /* setup (function 0) uses a (struct msparms *)                */
                     27: struct msparms {
                     28:        int     accel_t;                /* fast motion threshold */
                     29:        int     h_cmin;                 /* min cursor value, horiz. */
                     30:        int     h_cmax;                 /* max cursor value, horiz. */
                     31:        int     v_cmin;                 /* min cursor value, vert. */
                     32:        int     v_cmax;                 /* max cursor value, vert. */
                     33:        int     h_mpr;                  /* horiz mickey/8-pixel ratio */
                     34:        int     v_mpr;                  /* vert  mickey/8-pixel ratio */
                     35: };
                     36: 
                     37: /* setcrs(function 1) & readcrs(function 2) use a (struct mspos *)     */
                     38: /* setmick(function 3) & readmick(function 4) use a (struct mspos *)   */
                     39: struct mspos {
                     40:        int     h_crsr;                 /* horiz cursor position */
                     41:        int     v_crsr;                 /* vert  cursor position */
                     42: };
                     43: 
                     44: /* offset names used for mickey structure - same as cursor structure */
                     45: #define msmick mspos
                     46: #define h_mick h_crsr
                     47: #define v_mick v_crsr
                     48: 
                     49: /* readbtns(function 5) uses a (struct msbuts *)       */
                     50: struct msbuts {
                     51:        int     bbstat;                 /* button status left=bit0 right=bit1 */
                     52:        struct {
                     53:                int             cnt;    /* button press/release count */
                     54:                struct mspos    bpos;   /* button cursor */
                     55:        } buts[4];                      /* left  pressed, released */
                     56:                                        /* right pressed, released */
                     57: };
                     58: 
                     59: /* "bbstat" inside the above structure indicates whether or not the buttons */
                     60: /* are depressed.  The bits are as follows:                                */
                     61: 
                     62: #define MS_L_DOWN      0x01
                     63: #define MS_R_DOWN      0x02
                     64: 
                     65: /* the offsets into the "buts" array within the above structure are: */
                     66: #define MS_B_L_PRESS   0
                     67: #define MS_B_L_RELEASE 1
                     68: #define MS_B_R_PRESS   2
                     69: #define MS_B_R_RELEASE 3
                     70: 
                     71: /* readstat(function 6) & wait(function 7) use an (int *)      */
                     72: /* the Status bits are defined as follows:                     */
                     73: 
                     74: #define MS_S_MOVE      0x01
                     75: #define MS_S_L_PRESS   0x02
                     76: #define MS_S_L_RELEASE 0x04
                     77: #define MS_S_R_PRESS   0x08
                     78: #define MS_S_R_RELEASE 0x10
                     79: #define MS_S_BUTTONS   0x1e

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.