home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / VMDPMD.H < prev    next >
C/C++ Source or Header  |  1997-04-10  |  5KB  |  127 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. #pragma checkout( suspend )
  14.    #ifndef __CHKHDR__
  15.       #pragma checkout( suspend )
  16.    #endif
  17. #pragma checkout( resume )
  18.  
  19. #ifndef __VMDPMD__
  20. #define __VMDPMD__
  21.  
  22.  
  23. /***EK+ VMD/PMD constants
  24.  */
  25.  
  26. #define PMD_NAME    "MOUSE$"            /* registered name of PMD */
  27.  
  28. #define PMDCMD_REGISTER         PDDCMD_REGISTER         /* register VDD    */
  29. #define PMDCMD_DEREGISTER       (PMDCMD_REGISTER+1)     /* de-register VDD */
  30. #define PMDCMD_QUERYTYPE        (PMDCMD_REGISTER+2)     /* query hwd info. */
  31. #define PMDCMD_SETSCREENSIZE    (PMDCMD_REGISTER+3)     /* set screen size */
  32. #define PMDCMD_GRABACCESS    (PMDCMD_REGISTER+4) /* Get Exclusive Access   */
  33.  
  34. #define VMDCMD_NOTIFYEVENT      0x01    /* notification of event availability */
  35.  
  36. /*end*/
  37.  
  38.  
  39. /***EK+ Event packet flags (as defined by PMD)
  40.  */
  41.  
  42. #define MEVSTAT_MOTION          0x0001  /* motion only                     */
  43. #define MEVSTAT_MOTIONLEFT      0x0002  /* motion while LEFT button down   */
  44. #define MEVSTAT_LEFTDOWN        0x0004  /* LEFT button down                */
  45. #define MEVSTAT_MOTIONRIGHT     0x0008  /* motion while RIGHT button down  */
  46. #define MEVSTAT_RIGHTDOWN       0x0010  /* RIGHT button down               */
  47. #define MEVSTAT_MOTIONCENTER    0x0020  /* motion while CENTER button down */
  48. #define MEVSTAT_CENTERDOWN      0x0040  /* CENTER button down              */
  49. #define MEVSTAT_ALLMOTION       0x002B  /* mask for all motion events      */
  50. #define MEVSTAT_ABSPIXEVENT     0x8000  /* absolute pixel coordinate event */
  51. /*end*/
  52.  
  53.  
  54. /***ET+ VMD-to-PMD communication structures
  55.  *
  56.  *  MHARDWARE is an output packet provided by VMD on the QUERYTYPE request,
  57.  *  and is filled in by the PMD with appropriate information about the mouse
  58.  *  hardware.  There is no input packet for this request.
  59.  *
  60.  *  MSSIZE is an input packet provided by VMD on the SETSCREENSIZE request
  61.  *  and contains the screen size of a given video mode.  This may be used
  62.  *  by the PMD to compute the coordinate range when reporting absolute pixel
  63.  *  events.
  64.  */
  65.  
  66. typedef struct mhw_s {                  /* mhw */
  67.     USHORT  mhw_nb;                     /* size of structure, in bytes (6)   */
  68.     UCHAR   mhw_nMickeys;               /* mickeys per centimeter            */
  69.     UCHAR   mhw_nButtons;               /* # of buttons                      */
  70.     UCHAR   mhw_irq;                    /* IRQ #                             */
  71.     UCHAR   mhw_uType;                  /* 0=unk,1=bus,2=ser,3=inp,4=inboard */
  72. } MHARDWARE;
  73.  
  74. typedef struct mss_s {                  /* mss */
  75.     USHORT  mss_nb;                     /* size of structure, in bytes (6)   */
  76.     USHORT  mss_uWidth;                 /* Column size                       */
  77.     USHORT  mss_uHeight;                /* Row size                          */
  78. } MSSIZE;
  79.  
  80. typedef struct mougrab{                 /* mougrab */
  81.     USHORT  uscMouGrab;                 /* size of structure, in bytes (8)   */
  82.     USHORT  usSG;                       /* Screen Group                      */
  83.     BOOL    fMouGrab;                   /* Flag to grab/release mouse        */
  84. } MOUGRAB;
  85. /*end*/
  86.  
  87.  
  88. /***ET+ PMD-to-VMD communication structures
  89.  *
  90.  *  MEVENT is an input packet provided by the PMD on the NOTIFYEVENT request,
  91.  *  and indicates the VDM screen group to which the new event belongs.  There
  92.  *  is no output packet for this request.
  93.  */
  94.  
  95. /*Note that the mouse event is always in unscaled raw mickeys no matter
  96. **     what the SETVDMPARMS is programmed.  SETVDMPARMS only serves
  97. **     the purpose of telling PMSE the resolution of posting mouse events.
  98. */
  99.  
  100. typedef struct minfo_s {                /* minfo */
  101.     USHORT  minfo_fs;                   /* button/motion states                    */
  102.     SHORT   minfo_nx;                   /* x, in delta mickeys or abs pixels       */
  103.     SHORT   minfo_ny;                   /* y, in delta mickeys or abs pixels       */
  104.     SHORT   nxMickeys;                  /* x, in delta mickeys, when saving counts */
  105.     SHORT   nyMickeys;                  /* y, in delta mickeys, when saving counts */
  106.  
  107. } MINFO;
  108.  
  109. typedef MINFO *PMINFO;                  /* pminfo */
  110.  
  111. typedef struct mev_s {                  /* mev */
  112.     USHORT  mev_uSG;                    /* VDM screen group ID */
  113.     MINFO   mev_mi;                     /* mouse event info.   */
  114. } MEVENT;
  115.  
  116. typedef MEVENT *PMEV;                   /* pmev */
  117.  
  118. /*end*/
  119.  
  120. #endif /* __VMDPMD__ */
  121.  
  122. #pragma checkout( suspend )
  123.    #ifndef __CHKHDR__
  124.       #pragma checkout( resume )
  125.    #endif
  126. #pragma checkout( resume )
  127.