home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / VMDPMD.H < prev    next >
Text File  |  1995-04-14  |  6KB  |  141 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)vmdpmd.h   6.7 92/02/28";*/
  14. /***    VMDPMD.H
  15.  *
  16.  *      SCCSID = @(#)vmdpmd.h   6.7 92/02/28
  17.  *
  18.  *      Mouse VDD/PDD shared structures/constants
  19.  *
  20.  *      For include file hierarchy, see VMD/PMD include file(s)
  21.  *
  22.  *
  23.  *      MODIFICATION HISTORY
  24.  *      10/21/88    JTP     Created.
  25.  */
  26.  
  27.  
  28. /***EK+ VMD/PMD constants
  29.  */
  30.  
  31. #define PMD_NAME    "MOUSE$"            // registered name of PMD
  32.  
  33. #define PMDCMD_REGISTER         PDDCMD_REGISTER         //register VDD
  34. #define PMDCMD_DEREGISTER       (PMDCMD_REGISTER+1)     //de-register VDD
  35. #define PMDCMD_QUERYTYPE        (PMDCMD_REGISTER+2)     //query hwd info.
  36. #define PMDCMD_SETSCREENSIZE    (PMDCMD_REGISTER+3)     //set screen size
  37. #define PMDCMD_GRABACCESS    (PMDCMD_REGISTER+4) //Get Exclusive Access
  38.  
  39. #define VMDCMD_NOTIFYEVENT      0x01    // notification of event availability
  40.  
  41. /*end*/
  42.  
  43.  
  44. /***EK+ Event packet flags (as defined by PMD)
  45.  */
  46.  
  47. #define MEVSTAT_MOTION          0x0001  // motion only
  48. #define MEVSTAT_MOTIONLEFT      0x0002  // motion while LEFT button down
  49. #define MEVSTAT_LEFTDOWN        0x0004  // LEFT button down
  50. #define MEVSTAT_MOTIONRIGHT     0x0008  // motion while RIGHT button down
  51. #define MEVSTAT_RIGHTDOWN       0x0010  // RIGHT button down
  52. #define MEVSTAT_MOTIONCENTER    0x0020  // motion while CENTER button down
  53. #define MEVSTAT_CENTERDOWN      0x0040  // CENTER button down
  54. #define MEVSTAT_ALLMOTION       0x002B  // mask for all motion events
  55. #define MEVSTAT_ABSPIXEVENT     0x8000  // absolute pixel coordinate event
  56. /*end*/
  57.  
  58.  
  59. /***ET+ VMD-to-PMD communication structures
  60.  *
  61.  *  MHARDWARE is an output packet provided by VMD on the QUERYTYPE request,
  62.  *  and is filled in by the PMD with appropriate information about the mouse
  63.  *  hardware.  There is no input packet for this request.
  64.  *
  65.  *  MSSIZE is an input packet provided by VMD on the SETSCREENSIZE request
  66.  *  and contains the screen size of a given video mode.  This may be used
  67.  *  by the PMD to compute the coordinate range when reporting absolute pixel
  68.  *  events.
  69.  */
  70.  
  71. typedef struct mhw_s {                  /* mhw */
  72.     USHORT  mhw_nb;                     // size of structure, in bytes (9)
  73.     UCHAR   mhw_nMickeys;               // mickeys per centimeter
  74.     UCHAR   mhw_nButtons;               // # of buttons
  75.     UCHAR   mhw_irq;                    // IRQ #
  76.     UCHAR   mhw_uType;                  // 0=unk,1=bus,2=ser,3=inp,4=inboard
  77.     UCHAR   mhw_ComNum;                 // 0 if non-serial device
  78.     USHORT  mhw_ComPort;                // Com port address
  79. } MHARDWARE;
  80.  
  81. /**********************************************************************/
  82. /* Defines for mhw_uType byte field in the MHARDWARE structure        */
  83. /**********************************************************************/
  84. #define VMSE_UNKNOWN_DEVICE  0          // No pointing device
  85. #define VMSE_BUS_DEVICE      1          // MS Bus mouse
  86. #define VMSE_MSS_DEVICE      2          // MS Serial mouse
  87. #define VMSE_INP_DEVICE      3          // MS Inport mouse
  88. #define VMSE_PDI_DEVICE      4          // PS/2 style pointing device
  89. #define VMSE_PSC_DEVICE      5          // 8516 Touch Display device
  90.  
  91. /* start of changes for PenPM EMI */
  92. typedef struct mss_s {                  /* mss                              */
  93.     USHORT  mss_nb;                     /* size of structure, in bytes (12) */
  94.     UCHAR   mss_type;                   /* VIO type of the mode             */
  95.     UCHAR   mss_color;                  /* 2 ** n number of colors (4 = 16) */
  96.     USHORT  mss_tcol_res;               /* number of text columns           */
  97.     USHORT  mss_trow_res;               /* number of text rows              */
  98.     USHORT  mss_gcol_res;               /* number of x or column pels       */
  99.     USHORT  mss_grow_res;               /* number of y or row pels          */
  100. } MSSIZE;
  101. /* end of changes for PenPM EMI */
  102.  
  103. typedef struct mougrab{          /* mougrab */
  104.     USHORT  uscMouGrab;         // size of structure, in bytes (8)
  105.     USHORT  usSG;               // Screen Group
  106.     BOOL    fMouGrab;           // Flag to grab/release mouse
  107. } MOUGRAB;
  108. /*end*/
  109.  
  110.  
  111. /***ET+ PMD-to-VMD communication structures
  112.  *
  113.  *  MEVENT is an input packet provided by the PMD on the NOTIFYEVENT request,
  114.  *  and indicates the VDM screen group to which the new event belongs.  There
  115.  *  is no output packet for this request.
  116.  */
  117.  
  118. //Note that the mouse event is always in unscaled raw mickeys no matter
  119. //     what the SETVDMPARMS is programmed.  SETVDMPARMS only serves
  120. //     the purpose of telling PMSE the resolution of posting mouse events.
  121.  
  122. typedef struct minfo_s {                /* minfo */
  123.     USHORT  minfo_fs;                   // button/motion states
  124.     SHORT   minfo_nx;                   // x, in delta mickeys or abs pixels
  125.     SHORT   minfo_ny;                   // y, in delta mickeys or abs pixels
  126.     SHORT   nxMickeys;          // x, in delta mickeys, when saving counts
  127.     SHORT   nyMickeys;          // y, in delta mickeys, when saving counts
  128.  
  129. } MINFO;
  130.  
  131. typedef MINFO *PMINFO;                  /* pminfo */
  132.  
  133. typedef struct mev_s {                  /* mev */
  134.     USHORT  mev_uSG;                    // VDM screen group ID
  135.     MINFO   mev_mi;                     // mouse event info.
  136. } MEVENT;
  137.  
  138. typedef MEVENT *PMEV;                   /* pmev */
  139.  
  140. /*end*/
  141.