home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / H / VMD.H < prev    next >
C/C++ Source or Header  |  1995-08-30  |  10KB  |  241 lines

  1. /***************************************************************************
  2. *
  3. * Module Name: VMD.H (MVDM Virtual Mouse Exported Definitions)
  4. *
  5. * OS/2 public header file.
  6. *
  7. * Copyright (c) 1987 - 1993  IBM Corporation
  8. *
  9. *****************************************************************************/
  10.  
  11.  
  12. #ifndef INCL_NONE                       // include everything by default
  13. #define INCL_VMOUSE
  14. #endif
  15.  
  16. #ifdef  INCL_VMOUSE
  17. #define INCL_VMOUSEINT
  18. #define INCL_VMOUSESYSREQ
  19. #define INCL_VMOUSEDEVREQ
  20. #endif
  21.  
  22. #pragma info( none )
  23.    #ifndef __CHKHDR__
  24.       #pragma info( none )
  25.    #endif
  26. #pragma info( restore )
  27.  
  28. #ifndef __VMD__
  29. #define __VMD__
  30.  
  31. #ifdef  INCL_VMOUSEINT
  32.  
  33. /***    VMD INT 33h constants
  34.  */
  35.  
  36. #define INT_MOUSE            0x33       // mouse software interrupt
  37.  
  38. #define INT33_RESET             0       // mouse reset and status
  39. #define INT33_SHOWPOINTER       1       // show pointer
  40. #define INT33_HIDEPOINTER       2       // hide pointer
  41. #define INT33_QUERYSTATUS       3       // query button status and mouse pos.
  42. #define INT33_SETPOSITION       4       // set mouse position
  43. #define INT33_GETPRESSINFO      5       // get button press information
  44. #define INT33_GETRELEASEINFO    6       // get button release information
  45. #define INT33_SETHORIZONTAL     7       // set horizontal min/max boundaries
  46. #define INT33_SETVERTICAL       8       // set vertical min/max boundaries
  47. #define INT33_DEFINEGRPOINTER   9       // define graphics pointer
  48. #define INT33_DEFINETEXTPOINTER 10      // define text/hardware pointer
  49. #define INT33_GETMOTIONCOUNTS   11      // get mouse motion counters
  50. #define INT33_SETUSERSUB        12      // set user call mask/address
  51. #define INT33_ENABLELIGHTPEN    13      // enable lightpen emulation
  52. #define INT33_DISABLELIGHTPEN   14      // disable lightpen emulation
  53. #define INT33_SETMICKEYRATIO    15      // set mickeys-to-8-pixels ratio
  54. #define INT33_SETCONDITIONAL    16      // set conditional-off area
  55. #define INT33_FUNCTION17        17      // UNDEFINED (points to function 19)
  56. #define INT33_DEFINEVARPOINTER  18      // define variable-size graphics pointer
  57. #define INT33_SETDBLSPEED       19      // set dbl-speed threshold
  58. #define INT33_SWAPUSERSUB       20      // swap user call mask/address
  59. #define INT33_QUERYSTATESIZE    21      // query save-state storage req.
  60. #define INT33_SAVESTATE         22      // save driver state
  61. #define INT33_RESTORESTATE      23      // restore driver state
  62. #define INT33_SETALTUSERSUB     24      // set alternate call mask/address
  63. #define INT33_QUERYALTUSERSUB   25      // query alternate call mask/address
  64. #define INT33_SETSENSITIVITY    26      // set mickeys/pixel, dbl-speed thres.
  65. #define INT33_QUERYSENSITIVITY  27      // query mickeys/pixel, dbl-speed thres.
  66. #define INT33_SETINTERRUPTRATE  28      // set interrupt rate (inport only)
  67. #define INT33_SETCRTPAGE        29      // set CRT page #
  68. #define INT33_QUERYCRTPAGE      30      // query CRT page #
  69. #define INT33_DISABLEDRIVER     31      // disable driver
  70. #define INT33_ENABLEDRIVER      32      // enable driver
  71. #define INT33_SOFTWARERESET     33      // more complete mouse reset
  72. #define INT33_SETLANGUAGE       34      // set language #
  73. #define INT33_QUERYLANGUAGE     35      // query language #
  74. #define INT33_QUERYMOUSEVERSION 36      // query mouse version, type, and IRQ
  75. #define INT33_MAXFUNC           INT33_QUERYMOUSEVERSION
  76.  
  77. #define INT33_ERROR             -1      // error return in AX of INT 33 function
  78.  
  79. #define MAX_PTRWIDTH            2       // maximum # bytes across
  80. #define MAX_PTRHEIGHT           16      // maximum # bytes in height
  81.  
  82. #define BUTTON_LEFT             0       // button ordinals
  83. #define BUTTON_RIGHT            1
  84. #define BUTTON_CENTER           2
  85.  
  86. #define BUTBIT_LEFT             0x0001  // button bit positions
  87. #define BUTBIT_RIGHT            0x0002
  88. #define BUTBIT_CENTER           0x0004
  89.  
  90. #define CALLMASK_MOTION         0x0001  // motion
  91. #define CALLMASK_LEFTDOWN       0x0002  // LEFT button down
  92. #define CALLMASK_LEFTUP         0x0004  // LEFT button up
  93. #define CALLMASK_RIGHTDOWN      0x0008  // RIGHT button down
  94. #define CALLMASK_RIGHTUP        0x0010  // RIGHT button up
  95. #define CALLMASK_SHIFTBUTTON    0x0020  // SHIFT key held while button up/down
  96. #define CALLMASK_CTRLBUTTON     0x0040  // CTRL key held while button up/down
  97. #define CALLMASK_ALTBUTTON      0x0080  // ALT key held while button up/down
  98. #define CALLMASK_CENTERDOWN     0x0100  // CENTER button down
  99. #define CALLMASK_CENTERUP       0x0200  // CENTER button up
  100. #define CALLMASK_ALLOWED        0x03FF
  101. #define CALLMASK_BUTTONSHIFTS   (CALLMASK_SHIFTBUTTON | \
  102.                                  CALLMASK_CTRLBUTTON  | \
  103.                                  CALLMASK_ALTBUTTON)
  104.  
  105. #define CALL12MASK_CENTERDOWN   0x0020  // CENTER button down (SETUSERSUB only)
  106. #define CALL12MASK_CENTERUP     0x0040  // CENTER button up (SETUSERSUB only)
  107. #define CALL12MASK_ALLOWED      0x007F
  108.  
  109.  
  110. #define DEF_XMICKEYS    8               // (x_pixel)
  111. #define DEF_YMICKEYS    16              // (y_pixel)
  112.  
  113. #define DEF_XMICSSCALE  50              // range 0-100
  114. #define DEF_YMICSSCALE  50              // range 0-100
  115. #define DEF_THRESHOLDSCALE      50      // range 0-100
  116.  
  117. #define DEF_TEXTANDMASK 0xffff          // (DfltTextAndMask)
  118. #define DEF_TEXTXORMASK 0x7700          // (DfltTextXorMask)
  119.  
  120. #define DEF_THRESHOLD   64
  121.  
  122. #endif
  123.  
  124.  
  125. #ifdef  INCL_VMOUSESYSREQ
  126.  
  127. /***    VMSE constants
  128.  */
  129.  
  130. #define VMD_NAME "VMOUSE$"              // name of VMD
  131.  
  132. /***    VMSE functions for use by PMVDMP
  133.  */
  134.  
  135. #define VMSESYSREQ_SETACCESS    1       // obtain exclusive access for VDM
  136. #define VMSESYSREQ_SETFOCUS     2       // notify VDM is gaining/losing focus
  137. #define VMSESYSREQ_POSTMOUSE    3       // send mouse events to a VDM
  138. #define VMSESYSREQ_MAX          3
  139.  
  140. #endif
  141.  
  142.  
  143. #ifdef  INCL_VMOUSEDEVREQ
  144.  
  145. /***EK+ VMD constants
  146.  */
  147.  
  148. #define VMDEVREQ_REGISTER       1       // VMD-defined functions for
  149. #define VMDEVREQ_SETSIZE        2       // communication from VVD to VMD
  150. #define VMDEVREQ_SEAMLESS       3       // Seamless notification
  151. #define VMDEVREQ_PROTINT33      4       // VDPX to VMD for Pmode Int 33h calls
  152. #define VMDEVREQ_DPMITASK       5       // DPMI program start/stop notification
  153. /*end*/
  154.  
  155.  
  156. /***ET+ VMD VDHRequestVDD communication structures
  157.  *
  158.  *  VMREG is the input packet passed with the VMDEVREQ_REGISTER request
  159.  *  from a VVD, and contains all the functions required by VMD of every
  160.  *  supported VVD, which are:
  161.  *
  162.  *      Show pointer
  163.  *      Hide pointer
  164.  *      Define text pointer
  165.  *      Define graphics pointer
  166.  *      Enable/disable light pen emulation
  167.  *
  168.  *  VMFUNC is the output packet filled in on the same (VMDEVREQ_REGISTER)
  169.  *  request.  It points to the following functions:
  170.  *
  171.  *      VDM Light pen request (to call only when light pen emulation enabled)
  172.  *
  173.  *  VMSSIZE is the input packet passed with the VMDEVREQ_SETSIZE request
  174.  *  from a VVD, and defines the current video mode (or -1 if unknown),
  175.  *  physical screen dimensions, and cell size.  There is no output packet
  176.  *  for this request.
  177.  */
  178.  
  179. typedef BOOL (*EXPENTRY PFNSHOWPTR)(HVDM, ULONG, ULONG);
  180. typedef BOOL (*EXPENTRY PFNHIDEPTR)(HVDM);
  181. typedef BOOL (*EXPENTRY PFNDEFTEXT)(HVDM, ULONG, ULONG, BOOL);
  182. typedef BOOL (*EXPENTRY PFNDEFGRAPH)(HVDM, PUSHORT, ULONG, ULONG);
  183. typedef BOOL (*EXPENTRY PFNSETPAGE)(HVDM, ULONG);
  184. typedef BOOL (*EXPENTRY PFNSETLPEN)(HVDM, BOOL);
  185.  
  186. typedef struct vmreg_s {                /* vmreg */
  187.     ULONG       vmreg_nb;               // size of structure, in bytes (24)
  188.     PFNSHOWPTR  vmreg_pfnShowPtr;       // ptr to show pointer fn.
  189.     PFNHIDEPTR  vmreg_pfnHidePtr;       // ptr to hide pointer fn.
  190.     PFNDEFTEXT  vmreg_pfnDefTextPtr;    // ptr to define text pointer fn.
  191.     PFNDEFGRAPH vmreg_pfnDefGraphPtr;   // ptr to define graphics pointer fn.
  192.     PFNSETPAGE  vmreg_pfnSetVideoPage;  // ptr to set video page fn.
  193.     PFNSETLPEN  vmreg_pfnSetLPenEm;     // ptr to enable/disable lpen fn.
  194. } VMREG;
  195.  
  196. typedef VMREG *PVMREG;
  197.  
  198.  
  199. typedef struct vmstat_s {
  200.     BOOL    vmstat_fPtrHidden;          // visual pointer status
  201.     ULONG   vmstat_x;                   // current virtual position
  202.     ULONG   vmstat_y;
  203.     ULONG   vmstat_flButtons;           // current button status (see BUTBITs)
  204. } VMSTAT;
  205.  
  206. typedef VMSTAT *PVMSTAT;
  207.  
  208. typedef BOOL (*EXPENTRY PFNQUERYSTAT)(HVDM, PVMSTAT);
  209.  
  210. typedef struct vmfunc_s {               /* vmfunc */
  211.     ULONG        vmfunc_nb;             // size of structure, in bytes (8)
  212.     PFNQUERYSTAT vmfunc_pfnQueryStatus; // ptr to query virtual status proc.
  213. } VMFUNC;
  214.  
  215. typedef VMFUNC *PVMFUNC;
  216.  
  217. typedef struct vmss_s {                 /* vmss */
  218.     ULONG   vmss_nb;                    // size of structure, in bytes (36)
  219.     LONG    vmss_lMode;                 // video mode (eg, 00h-13h, or -1)
  220.     ULONG   vmss_ulWidth;               // width of screen, in pixels
  221.     ULONG   vmss_ulHeight;              // height of screen, in pixels
  222.     ULONG   vmss_ulCellWidth;           // width of screen cells, in pixels
  223.     ULONG   vmss_ulCellHeight;          // height of screen cells, in pixels
  224.     ULONG   vmss_ulPtrWidth;            // width of pointer drawing size, in pixels
  225.     ULONG   vmss_ulPtrHeight;           // height of pointer drawing size, in pixels
  226.     ULONG   vmss_ulPtrUnitWidth;        // width of pointer drawing unit, in pixels
  227. } VMSSIZE;
  228.  
  229. typedef VMSSIZE *PVMSSIZE;
  230. /*end*/
  231.  
  232. #endif  // INCL_VMOUSEDEVREQ
  233.  
  234. #endif /* __VMD__ */
  235.  
  236. #pragma info( none )
  237.    #ifndef __CHKHDR__
  238.       #pragma info( restore )
  239.    #endif
  240. #pragma info( restore )
  241.