home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / VMDPMD.H < prev    next >
C/C++ Source or Header  |  1999-03-15  |  6KB  |  154 lines

  1. /*static char *SCCSID = "@(#)vmdpmd.h   6.2 92/01/28";*/
  2. /***    VMDPMD.H
  3.  *
  4.  *
  5.  *      Mouse VDD/PDD shared structures/constants
  6.  *      Copyright (c) 1993 IBM Corporation
  7.  *
  8.  *      For include file hierarchy, see VMD/PMD include file(s)
  9.  *
  10.  *
  11.  */
  12.  
  13. /* NOINC */
  14. #if __IBMC__ || __IBMCPP__
  15.    #pragma info( none )
  16.       #ifndef __CHKHDR__
  17.          #pragma info( none )
  18.       #endif
  19.    #pragma info( restore )
  20. #endif
  21. /* INC */
  22.  
  23. #ifndef __VMDPMD__
  24. #define __VMDPMD__
  25.  
  26.  
  27. /***EK+ VMD/PMD constants
  28.  */
  29.  
  30. #define PMD_NAME    "MOUSE$"            /* registered name of PMD */
  31.  
  32. #define PMDCMD_REGISTER         PDDCMD_REGISTER         /* register VDD    */
  33. #define PMDCMD_DEREGISTER       (PMDCMD_REGISTER+1)     /* de-register VDD */
  34. #define PMDCMD_QUERYTYPE        (PMDCMD_REGISTER+2)     /* query hwd info. */
  35. #define PMDCMD_SETSCREENSIZE    (PMDCMD_REGISTER+3)     /* set screen size */
  36. #define PMDCMD_GRABACCESS    (PMDCMD_REGISTER+4) /* Get Exclusive Access   */
  37.  
  38. #define VMDCMD_NOTIFYEVENT      0x01    /* notification of event availability */
  39.  
  40. /*end*/
  41.  
  42.  
  43. /***EK+ Event packet flags (as defined by PMD)
  44.  */
  45.  
  46. #define MEVSTAT_MOTION          0x0001  /* motion only                     */
  47. #define MEVSTAT_MOTIONLEFT      0x0002  /* motion while LEFT button down   */
  48. #define MEVSTAT_LEFTDOWN        0x0004  /* LEFT button down                */
  49. #define MEVSTAT_MOTIONRIGHT     0x0008  /* motion while RIGHT button down  */
  50. #define MEVSTAT_RIGHTDOWN       0x0010  /* RIGHT button down               */
  51. #define MEVSTAT_MOTIONCENTER    0x0020  /* motion while CENTER button down */
  52. #define MEVSTAT_CENTERDOWN      0x0040  /* CENTER button down              */
  53. #define MEVSTAT_ALLMOTION       0x002B  /* mask for all motion events      */
  54. #define MEVSTAT_ABSPIXEVENT     0x8000  /* absolute pixel coordinate event */
  55. /*end*/
  56.  
  57.  
  58. /***ET+ VMD-to-PMD communication structures
  59.  *
  60.  *  MHARDWARE is an output packet provided by VMD on the QUERYTYPE request,
  61.  *  and is filled in by the PMD with appropriate information about the mouse
  62.  *  hardware.  There is no input packet for this request.
  63.  *
  64.  *  MSSIZE is an input packet provided by VMD on the SETSCREENSIZE request
  65.  *  and contains the screen size of a given video mode.  This may be used
  66.  *  by the PMD to compute the coordinate range when reporting absolute pixel
  67.  *  events.
  68.  */
  69.  
  70. typedef struct mhw_s {                  /* mhw */
  71.     USHORT  mhw_nb;                     /* size of structure, in bytes (6)   */
  72.     UCHAR   mhw_nMickeys;               /* mickeys per centimeter            */
  73.     UCHAR   mhw_nButtons;               /* # of buttons                      */
  74.     UCHAR   mhw_irq;                    /* IRQ #                             */
  75.     UCHAR   mhw_uType;                  /* 0=unk,1=bus,2=ser,3=inp,4=inboard */
  76.     UCHAR   mhw_ComNum;                 // 0 if non-serial device
  77.     USHORT  mhw_ComPort;                // Com port address
  78. } MHARDWARE;
  79.  
  80. /**********************************************************************/
  81. /* Defines for mhw_uType byte field in the MHARDWARE structure        */
  82. /**********************************************************************/
  83. #define VMSE_UNKNOWN_DEVICE  0          // No pointing device
  84. #define VMSE_BUS_DEVICE      1          // MS Bus mouse
  85. #define VMSE_MSS_DEVICE      2          // MS Serial mouse
  86. #define VMSE_INP_DEVICE      3          // MS Inport mouse
  87. #define VMSE_PDI_DEVICE      4          // PS/2 style pointing device
  88. #define VMSE_PSC_DEVICE      5          // 8516 Touch Display device
  89.  
  90. /* start of changes for PenPM EMI */
  91. typedef struct mss_s {                  /* mss */
  92.     USHORT  mss_nb;                     /* size of structure, in bytes (12) */
  93.     UCHAR   mss_type;                   /* VIO type of the mode             */
  94.     UCHAR   mss_color;                  /* 2 ** n number of colors (4 = 16) */
  95.     USHORT  mss_tcol_res;               /* number of text columns           */
  96.     USHORT  mss_trow_res;               /* number of text rows              */
  97.     USHORT  mss_gcol_res;               /* number of x or column pels       */
  98.     USHORT  mss_grow_res;               /* number of y or row pels          */
  99. } MSSIZE;
  100. /* end of changes for PenPM EMI */
  101.  
  102. typedef struct mougrab{                 /* mougrab */
  103.     USHORT  uscMouGrab;                 /* size of structure, in bytes (8)   */
  104.     USHORT  usSG;                       /* Screen Group                      */
  105.     BOOL    fMouGrab;                   /* Flag to grab/release mouse        */
  106. } MOUGRAB;
  107. /*end*/
  108.  
  109.  
  110. /***ET+ PMD-to-VMD communication structures
  111.  *
  112.  *  MEVENT is an input packet provided by the PMD on the NOTIFYEVENT request,
  113.  *  and indicates the VDM screen group to which the new event belongs.  There
  114.  *  is no output packet for this request.
  115.  */
  116.  
  117. /*Note that the mouse event is always in unscaled raw mickeys no matter
  118. **     what the SETVDMPARMS is programmed.  SETVDMPARMS only serves
  119. **     the purpose of telling PMSE the resolution of posting mouse events.
  120. */
  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.  
  142. #endif /* __VMDPMD__ */
  143.  
  144.  
  145. /* NOINC */
  146. #if __IBMC__ || __IBMCPP__
  147.    #pragma info( none )
  148.       #ifndef __CHKHDR__
  149.          #pragma info( restore )
  150.       #endif
  151.    #pragma info( restore )
  152. #endif
  153. /* INC */
  154.