home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / INC_DBCS / VMD.INC < prev    next >
Text File  |  1995-04-14  |  9KB  |  252 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. ;***    VMD.INC
  13. ;
  14. ;
  15. ;    MVDM Virtual Mouse Exported Definitions
  16. ;
  17. ;    For include file hierarchy, see MVDM.INC
  18. ;
  19. ;
  20. ;    MODIFICATION HISTORY
  21. ;    11/15/88    JTP        Created.
  22. ;    05/05/93    RAR        Version 9.00 updates
  23. ;    07/19/90    J-TS00  Japanese version created.    (T.Sobue)
  24. ;    01/16/91        Base code change        (T.Sobue)
  25. ;
  26.  
  27.  
  28. ifndef INCL_NONE               ;include everything by default
  29. INCL_VMOUSE    EQU 1
  30. endif
  31.  
  32. ifdef  INCL_VMOUSE
  33. INCL_VMOUSEINT    EQU 1
  34. INCL_VMOUSESYSREQ    EQU 1
  35. INCL_VMOUSEDEVREQ    EQU 1
  36. endif
  37.  
  38.  
  39. ifdef  INCL_VMOUSEINT
  40.  
  41. ;***    VMD _INT 33h constants
  42. ;
  43.  
  44. INT_MOUSE    EQU    033h       ;mouse software interrupt
  45.  
  46. INT33_RESET    EQU    0    ;mouse reset and status
  47. INT33_SHOWPOINTER    EQU    1    ;show pointer
  48. INT33_HIDEPOINTER    EQU    2    ;hide pointer
  49. INT33_QUERYSTATUS    EQU    3    ;query button status and mouse pos.
  50. INT33_SETPOSITION    EQU    4    ;set mouse position
  51. INT33_GETPRESSINFO    EQU    5    ;get button press information
  52. INT33_GETRELEASEINFO    EQU    6    ;get button release information
  53. INT33_SETHORIZONTAL    EQU    7    ;set horizontal min/max boundaries
  54. INT33_SETVERTICAL    EQU    8    ;set vertical min/max boundaries
  55. INT33_DEFINEGRPOINTER    EQU    9    ;define graphics pointer
  56. INT33_DEFINETEXTPOINTER        EQU    10    ;define text/hardware pointer
  57. INT33_GETMOTIONCOUNTS    EQU    11    ;get mouse motion counters
  58. INT33_SETUSERSUB    EQU    12    ;set user call mask/address
  59. INT33_ENABLELIGHTPEN    EQU    13    ;enable lightpen emulation
  60. INT33_DISABLELIGHTPEN    EQU    14    ;disable lightpen emulation
  61. INT33_SETMICKEYRATIO    EQU    15    ;set mickeys-to-8-pixels ratio
  62. INT33_SETCONDITIONAL    EQU    16    ;set conditional-off area
  63. INT33_FUNCTION17    EQU    17    ;UNDEFINED (points to function 19)
  64. INT33_DEFINEVARPOINTER    EQU    18    ;define variable-size graphics pointer
  65. INT33_SETDBLSPEED    EQU    19    ;set dbl-speed threshold
  66. INT33_SWAPUSERSUB    EQU    20    ;swap user call mask/address
  67. INT33_QUERYSTATESIZE    EQU    21    ;query save-state storage req.
  68. INT33_SAVESTATE        EQU    22    ;save driver state
  69. INT33_RESTORESTATE    EQU    23    ;restore driver state
  70. INT33_SETALTUSERSUB    EQU    24    ;set alternate call mask/address
  71. INT33_QUERYALTUSERSUB    EQU    25    ;query alternate call mask/address
  72. INT33_SETSENSITIVITY    EQU    26    ;set mickeys/pixel, dbl-speed thres.
  73. INT33_QUERYSENSITIVITY    EQU    27    ;query mickeys/pixel, dbl-speed thres.
  74. INT33_SETINTERRUPTRATE    EQU    28    ;set interrupt rate (inport only)
  75. INT33_SETPOINTERCOLOR    EQU    28    ;set pointer color      J-TS00
  76. INT33_SETCRTPAGE    EQU    29    ;set CRT page #
  77. INT33_QUERYCRTPAGE    EQU    30    ;query CRT page #
  78. INT33_DISABLEDRIVER    EQU    31    ;disable driver
  79. INT33_ENABLEDRIVER    EQU    32    ;enable driver
  80. INT33_SOFTWARERESET    EQU    33    ;more complete mouse reset
  81. INT33_SETLANGUAGE    EQU    34    ;set language #
  82. INT33_QUERYLANGUAGE    EQU    35    ;query language #
  83. INT33_QUERYMOUSEVERSION        EQU    36    ;query mouse version, type, and IRQ
  84.  
  85. INT33_GETSWITCHSETTINGS        EQU    51    ;get switch settings
  86. INT33_GETMOUSEINI    EQU    52    ;get MOUSE.INI
  87. INT33_MAXFUNC    EQU    <INT33_GETMOUSEINI>
  88.  
  89. INT33_ERROR    EQU    -1    ;error return in AX of _INT 33 function
  90.  
  91. MAX_PTRWIDTH    EQU    2    ;maximum # bytes across
  92. MAX_PTRHEIGHT    EQU    16    ;maximum # bytes in height
  93.  
  94. BUTTON_LEFT    EQU    0    ;button ordinals
  95. BUTTON_RIGHT    EQU    1
  96. BUTTON_CENTER    EQU    2
  97.  
  98. BUTBIT_LEFT    EQU    00001h    ;button bit positions
  99. BUTBIT_RIGHT    EQU    00002h
  100. BUTBIT_CENTER    EQU    00004h
  101.  
  102. CALLMASK_MOTION        EQU    00001h    ;motion
  103. CALLMASK_LEFTDOWN    EQU    00002h    ;LEFT button down
  104. CALLMASK_LEFTUP        EQU    00004h    ;LEFT button up
  105. CALLMASK_RIGHTDOWN    EQU    00008h    ;RIGHT button down
  106. CALLMASK_RIGHTUP    EQU    00010h    ;RIGHT button up
  107. CALLMASK_SHIFTBUTTON    EQU    00020h    ;SHIFT key held while button up/down
  108. CALLMASK_CTRLBUTTON    EQU    00040h    ;CTRL key held while button up/down
  109. CALLMASK_ALTBUTTON    EQU    00080h    ;ALT key held while button up/down
  110. CALLMASK_CENTERDOWN    EQU    00100h    ;CENTER button down
  111. CALLMASK_CENTERUP    EQU    00200h    ;CENTER button up
  112. CALLMASK_ALLOWED    EQU    003FFh
  113. CALLMASK_BUTTONSHIFTS    EQU    (CALLMASK_SHIFTBUTTON  OR  \
  114.                  CALLMASK_CTRLBUTTON   OR  \
  115.                  CALLMASK_ALTBUTTON)
  116.  
  117. CALL12MASK_CENTERDOWN    EQU    00020h    ;CENTER button down (SETUSERSUB only)
  118. CALL12MASK_CENTERUP    EQU    00040h    ;CENTER button up (SETUSERSUB only)
  119. CALL12MASK_ALLOWED    EQU    0007Fh
  120.  
  121.  
  122. DEF_XMICKEYS    EQU    8        ;(x_pixel)
  123. DEF_YMICKEYS    EQU    16        ;(y_pixel)
  124. DEF_XMICKEYS_J    EQU    4        ;(x_pixel) J-DOS      ; J-TS00
  125. DEF_YMICKEYS_J    EQU    4        ;(y_pixel) J-DOS      ; J-TS00
  126.  
  127. DEF_XMICSSCALE    EQU    50        ;range 0-100
  128. DEF_YMICSSCALE    EQU    50        ;range 0-100
  129. DEF_THRESHOLDSCALE    EQU    50    ;range 0-100
  130.  
  131. DEF_TEXTANDMASK        EQU    0ffffh        ;(DfltTextAndMask)
  132. DEF_TEXTXORMASK        EQU    07700h        ;(DfltTextXorMask)
  133.  
  134. DEF_THRESHOLD    EQU    64     ;BUGBUG JeffPar - What is correct???
  135.                     ;PDD wants 4, doc says 64, MS src says 128
  136. DEF_THRESHOLD_J        EQU    07fffh        ;disable threshold      ; J-TS00
  137.                     ;function in J-DOS.      ; J-TS00
  138. DEF_COLOR    EQU    15        ;pointer color          ; J-TS00
  139. endif
  140.  
  141.  
  142. ifdef  INCL_VMOUSESYSREQ
  143.  
  144. ;***    VMSE constants
  145. ;
  146.  
  147. VMD_NAME    EQU    "VMOUSE$"           ;name of VMD
  148.  
  149. ;***    VMSE functions for use by PMVDMP
  150. ;
  151.  
  152. VMSESYSREQ_SETACCESS    EQU    1    ;obtain exclusive access for VDM
  153. VMSESYSREQ_SETFOCUS    EQU    2    ;notify VDM is gaining/losing focus
  154. VMSESYSREQ_POSTMOUSE    EQU    3    ;send mouse events to a VDM
  155. VMSESYSREQ_MAX    EQU    3
  156.  
  157. endif
  158.  
  159.  
  160. ifdef  INCL_VMOUSEDEVREQ
  161.  
  162. ;***    VMD constants
  163. ;
  164.  
  165. VMDEVREQ_REGISTER    EQU    1    ;VMD-defined functions for
  166. VMDEVREQ_SETSIZE    EQU    2    ;communication from VVD to VMD
  167. VMDEVREQ_SEAMLESS    EQU    3    ;Seamless notification
  168. VMDEVREQ_PROTINT33    EQU    4    ;VDPX to VMD for Pmode Int 33h calls
  169. VMDEVREQ_DPMITASK    EQU    5    ;DPMI program start/stop notification
  170.  
  171.  
  172.  
  173. ;***    VMD VDHRequestVDD communication structures
  174. ;
  175. ;   VMREG is the input packet passed with the VMDEVREQ_REGISTER request
  176. ;   from a VVD, and contains all the functions required by VMD of every
  177. ;   supported VVD, which are:
  178. ;
  179. ;    Show pointer
  180. ;    Hide pointer
  181. ;    Define text pointer
  182. ;    Define graphics pointer
  183. ;    Enable/disable light pen emulation
  184. ;
  185. ;   VMFUNC is the output packet filled in on the same (VMDEVREQ_REGISTER)
  186. ;   request.  It points to the following functions:
  187. ;
  188. ;    VDM Light pen request (to call only when light pen emulation enabled)
  189. ;
  190. ;   VMSSIZE is the input packet passed with the VMDEVREQ_SETSIZE request
  191. ;   from a VVD, and defines the current video mode (or -1 if unknown),
  192. ;   physical screen dimensions, and cell size.  There is no output packet
  193. ;   for this request.
  194. ;
  195.  
  196. DefType PFNSHOWPTR,dd
  197. DefType PFNHIDEPTR,dd
  198. DefType PFNDEFTEXT,dd
  199. DefType PFNDEFGRAPH,dd
  200. DefType PFNSETPAGE,dd
  201. DefType PFNSETLPEN,dd
  202. DefType PFNSETCOLOR,dd            ;J-TS00
  203.  
  204. DefStruc ,vmreg_s            ;vmreg
  205.     ULONG    vmreg_nb           ;size of structure, in bytes (24)
  206.     PFNSHOWPTR    vmreg_pfnShowPtr       ;ptr to show pointer fn.
  207.     PFNHIDEPTR    vmreg_pfnHidePtr       ;ptr to hide pointer fn.
  208.     PFNDEFTEXT    vmreg_pfnDefTextPtr    ;ptr to define text pointer fn.
  209.     PFNDEFGRAPH vmreg_pfnDefGraphPtr   ;ptr to define graphics pointer fn.
  210.     PFNSETPAGE    vmreg_pfnSetVideoPage  ;ptr to set video page fn.
  211.     PFNSETLPEN    vmreg_pfnSetLPenEm     ;ptr to enable/disable lpen fn.
  212.     PFNSETCOLOR vmreg_pfnSetPtrColor   ;ptr to set pointer color fn. J-TS00
  213. EndStruc VMREG
  214.  
  215. DefType PVMREG,dd
  216.  
  217.  
  218. DefStruc ,vmstat_s
  219.     BOOL    vmstat_fPtrHidden           ;visual pointer status
  220.     ULONG   vmstat_x               ;current virtual position
  221.     ULONG   vmstat_y
  222.     ULONG   vmstat_flButtons           ;current button status (see BUTBITs)
  223. EndStruc VMSTAT
  224.  
  225. DefType PVMSTAT,dd
  226.  
  227. DefType PFNQUERYSTAT,dd
  228.  
  229. DefStruc ,vmfunc_s            ;vmfunc
  230.     ULONG     vmfunc_nb           ;size of structure, in bytes (8)
  231.     PFNQUERYSTAT vmfunc_pfnQueryStatus ;ptr to query virtual status proc.
  232. EndStruc VMFUNC
  233.  
  234. DefType PVMFUNC,dd
  235.  
  236. DefStruc ,vmss_s            ;vmss
  237.     ULONG   vmss_nb               ;size of structure, in bytes (36)
  238.     LONG    vmss_lMode               ;video mode (eg, 00h-13h, or -1)
  239.     ULONG   vmss_ulWidth           ;width of screen, in pixels
  240.     ULONG   vmss_ulHeight           ;height of screen, in pixels
  241.     ULONG   vmss_ulCellWidth           ;width of screen cells, in pixels
  242.     ULONG   vmss_ulCellHeight           ;height of screen cells, in pixels
  243.     ULONG   vmss_ulPtrWidth           ;width of pointer drawing size, in pixels
  244.     ULONG   vmss_ulPtrHeight           ;height of pointer drawing size, in pixels
  245.     ULONG   vmss_ulPtrUnitWidth           ;width of pointer drawing unit, in pixels
  246. EndStruc VMSSIZE
  247.  
  248. DefType PVMSSIZE,dd
  249.  
  250.  
  251. endif  ;INCL_VMOUSEDEVREQ
  252.