home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / VDH / WDHEQU.INC < prev    next >
Text File  |  1995-04-14  |  11KB  |  264 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. ;*
  14. ;* SOURCE FILE NAME = WDHEQU.INC
  15. ;*
  16. ;* DESCRIPTIVE NAME =         macros, definitions for base video
  17. ;*
  18. ;*
  19. ;* VERSION      V2.0
  20. ;*
  21. ;* DATE         
  22. ;*
  23. ;* DESCRIPTION          macros, definitions for base video
  24. ;*
  25. ;* FUNCTIONS    NONE
  26. ;*              
  27. ;* NOTES        NONE
  28. ;*
  29. ;* STRUCTURES   NONE
  30. ;*
  31. ;* EXTERNAL REFERENCES
  32. ;*
  33. ;*              NONE
  34. ;*
  35. ;* EXTERNAL FUNCTIONS
  36. ;*
  37. ;*              NONE
  38. ;*
  39. ;* CHANGE ACTIVITY =
  40. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  41. ;*   --------  ----------  -----  --------------------------------------
  42. ;*   mm/dd/yy  @Vr.mpppxx  xxxxx   xxxxxxx
  43. ;*   12/11/88              P3108   GreInitialize is necessary in DevEnable for VIO  
  44. ;*   12/19/88              P3258   Deadlock when MOUOPEN reenters VIOCALLS under
  45. ;*                                 DosStartSession when VIO or PM app is in a popup
  46. ;*   02/21/89              B700261 Emulate GRows as 16*TRows,
  47. ;*   03/08/89              B700065 Shadow the cursor type,
  48. ;*   03/25/89              132 DCR 132 changes
  49. ;*   04/04/89              B700??? Sizzle work,
  50. ;*   05/01/89              HM00550 Clear carry flag for SetBuffAddr routine,
  51. ;*   08/07/89              B706051 Add codepage variables for vio_windowable,
  52. ;*   09/26/89              B785912 Change default attribute to 07,
  53. ;*   11/02/89              549     Seltable changes due to rangeless sessions
  54. ;*   02/05/90              704     DCR 704 work
  55. ;*   07/31/90              B790152 Return correct number of bytes in LVB,
  56. ;*   04/11/91              1348    NAKADA, Enable DBCS support in Vio-Window
  57. ;*   05/11/93  @TK1        A64278  TAK, Console creation serialization  
  58. ;*
  59. ;*****************************************************************************/
  60.  
  61.                 .286p                   ;Generate protect mode code
  62.  
  63. WDHGSEG         EQU     <_DATA>                                         ;          
  64.  
  65. ;/*
  66. ;** Equates used by the Windowable Device Handler
  67. ;*/
  68.  
  69. ;/*
  70. ;** Stack frame used by all WDH routines
  71. ;*/
  72.  
  73. stackframe      STRUC                   ;VDH Stack Frame
  74.  
  75. stk_regfs       dw      ?               ;Reg ES save area ;          
  76. stk_reges       dw      ?               ;Reg ES save area
  77. stk_regds       dw      ?               ;Reg DS save area
  78. stk_regdi       dw      ?               ;Reg DI save area
  79. stk_regdih      dw      ?               ;For EDI
  80. stk_regsi       dw      ?               ;Reg SI save area
  81. stk_regsih      dw      ?               ;For ESI
  82. stk_regbp       dw      ?               ;Reg BP save area
  83. stk_regbph      dw      ?               ;For EBP
  84. stk_regsp       dw      ?               ;Reg SP save area
  85. stk_regsph      dw      ?               ;For ESP
  86. stk_regbx       dw      ?               ;Reg BX save area
  87. stk_regbxh      dw      ?               ;For EBX
  88. stk_regdx       dw      ?               ;Reg DX save area
  89. stk_regdxh      dw      ?               ;For EDX
  90. stk_regcx       dw      ?               ;Reg CX save area
  91. stk_regcxh      dw      ?               ;For ECX
  92. stk_regax       dw      ?               ;Reg AX save area
  93. stk_regaxh      dw      ?               ;For EAX
  94. stk_flags       dw      ?               ;Reg FL save area
  95. stk_retaddr     dd      ?               ;Return Address
  96. stk_function    dd      ?               ;Function Number
  97. stk_parmblock   dd      ?               ;Parameter Block Address
  98. stk_envblock    dd      ?               ;Environment Block Address
  99.  
  100. stackframe      ENDS
  101.  
  102. ;/*
  103. ;** Instance data for Windowable Device Handler is defined in BVSCB.INC
  104. ;*/
  105.  
  106. ;/*
  107. ;** Environment Block used by Windowable Device Handler
  108. ;*/
  109.  
  110. IFDEF D1348
  111. DBCSEvBufSiz    EQU     10                                              ;@A01
  112. ENDIF ;D1348
  113.  
  114. wdhenvironment  STRUC
  115.  
  116. env_viops       dw      (1+size VioPresentationSpace)/2 dup (0) ;Room for VIOPS
  117.  
  118. env_conhandle   dw      0               ;Console Handle
  119. env_processes   dw      0               ;Processes
  120.  
  121. env_startline   dw      0               ;Starting line of cursor ;          
  122. env_endline     dw      0               ;Ending line of cursor   ;          
  123.  
  124. env_mdlen       dw      34              ;Length of mode data (=34)
  125. env_type        db      1               ;Type for Mode
  126. env_colors      db      4               ;Colors for Mode
  127. env_cols        dw      80              ;Number of screen columns for text
  128. env_rows        dw      25              ;Number of screen rows for text
  129. env_gcols       dw      640             ;Number of screen columns for graphics
  130. env_grows       dw      400             ;Number of screen rows for graphics ;          
  131. env_attrformat  db      0               ;Attribute format
  132. env_attrbytes   db      1               ;Number of attribute bytes      ;          
  133. env_bufaddr     dd      000B8000h       ;Address of video buffer
  134. env_bufsize     dd      00000FA0h       ;Size of video buffer
  135. env_fullbufsz   dd      00000FA0h       ;Full buffer save size
  136. env_partbufsz   dd      00000FA0h       ;Partial buffer save size
  137. env_extdata     dd      0               ;Extended mode data address
  138.  
  139. env_scrlleft    dw      0               ;Scrollable Screen Rect                   
  140. env_scrltop     dw      0               ;Scrollable Screen Rect                   
  141. env_scrlright   dw      79              ;Scrollable Screen Rect                   
  142. env_scrlbottom  dw      24              ;Scrollable Screen Rect                   
  143.  
  144. env_attrbufsiz  dw      1
  145. env_attrbuf     db      07              ;default attribute                          
  146.                 db      0               ;second byte of 3 byte attribute                
  147.                 db      0               ;third byte of 3 byte attribute                 
  148.                 db      0               ;waste byte to keep structure aligned           
  149. env_consolesem  dd      0               ;console creation semaphore     @TK1
  150. env_consinit    db      0               ;console initialization flag    @TK1
  151.  
  152. IFDEF D1348
  153.                                         ;/Enable multiple DBCS env.
  154.                                         ; E.g., if font resource exists,
  155.                                         ; Chinese, Korean, and Japanese
  156.                                         ; DBCSs are displayed simultaneously.
  157.  
  158. ;/*
  159. ;** This structure must be the same as that in pmaviop.h.
  160. ;** From here...
  161. ;*/
  162.  
  163. env_DBCSEvBuff  db      DBCSEvBufSiz dup (0)    ;lcid = 0 : default
  164. env_CodePage    dw      ?
  165. env_CtryCode    dw      2 dup (0)
  166.  
  167. env_DBCSEvBuff1 db      DBCSEvBufSiz dup (0)    ;lcid = 1
  168. env_CodePage1   dw      ?
  169. env_CtryCode1   dw      2 dup (0)
  170.  
  171. env_DBCSEvBuff2 db      DBCSEvBufSiz dup (0)    ;lcid = 2
  172. env_CodePage2   dw      ?
  173. env_CtryCode2   dw      2 dup (0)
  174.  
  175. env_DBCSEvBuff3 db      DBCSEvBufSiz dup (0)    ;lcid = 3
  176. env_CodePage3   dw      ?
  177. env_CtryCode3   dw      2 dup (0)
  178.  
  179. env_grid_color  DD      ?
  180. env_reserved    DD      ?
  181.  
  182. ;/*
  183. ;** ...to here
  184. ;*/
  185.  
  186. env_lvbsize     dw      0               ; LVB size (LVB and PS)
  187.                                         ; if 64K, set 0FFFFh
  188.                                         ;/prepare the 2nd LVB for DBCS flag
  189. env_dbcslvbsel  dw      0               ; DBCS flag LVB selector
  190. env_funcindx    dw      0               ; function index for DBCS BufferUpdate
  191.                                         ;/DBCS BufferUpdate (bisecting DBCS
  192.                                         ; character status)
  193. env_dbcsstatus  dw      0               ; bisecting DBCS character status
  194. ENDIF ;D1348
  195.  
  196. wdhenvironment  ENDS
  197.  
  198. ;/*
  199. ;** Engine Call Equates
  200. ;*/
  201.  
  202. GreCharRectLo   EQU     403Bh
  203. GreCharRectHi   EQU     0000h
  204. GreCharStrLo    EQU     403Ch
  205. GreCharStrHi    EQU     0000h
  206. GreScrollRectLo EQU     403Dh
  207. GreScrollRectHi EQU     0000h
  208. GreUpdateCursorLo EQU   403Eh
  209. GreUpdateCursorHi EQU   0000h
  210. GreQueryFontslo EQU     4230h
  211. GreQueryFontsHi EQU     0000h
  212. GreQueryDevCapsLo EQU   40D1h
  213. GreQueryDevCapsHi EQU   0000h
  214. GreDeleteSetIdLo EQU    4222h
  215. GreDeleteSetIdHi EQU    0000h
  216. GreQuerySetIdsLo EQU    4224h
  217. GreQuerySetIdsHi EQU    0000h
  218. GreCreateLogicalFontLo EQU 422Dh
  219. GreCreateLogicalFontHi EQU 0000h
  220.  
  221. ;/*
  222. ;** GRE Equates
  223. ;*/
  224.  
  225. LCID_RANGE_AVIO EQU     2
  226. ExtAttrib       EQU     4                                               ;          
  227.  
  228. IFDEF D1348
  229.                                 ;/Set the format ID and attribute count
  230. DefaultFormat   equ     00h     ; default format ID
  231. DefaultAttrCount equ    1       ; default attribute count
  232. DefaultFMTATTR  equ     DefaultFormat or (DefaultAttrCount shl 8)
  233. DefaultCellSize equ     DefaultAttrCount + 1
  234.  
  235. WorldFormat     equ     70h     ; world format ID
  236. WorldAttrCount  equ     3       ; world attribute count
  237. WorldFMTATTR    equ     WorldFormat or (WorldAttrCount shl 8)
  238. WorldCellSize   equ     WorldAttrCount + 1
  239.  
  240. PSFormat        equ     00h     ; default PS format
  241. PSAttrCount     equ     1       ; default PS attibute count
  242. PSFMTATTR       equ     PSFormat or (PSAttrCount shl 8)
  243. PSCellSize      equ     PSAttrCount + 1
  244.  
  245. ExtPSFormat     equ     00h     ; extended PS format
  246. ExtPSAttrCount  equ     3       ; extended PS attribute count
  247. ExtPSFMTATTR    equ     ExtPSFormat or (ExtPSAttrCount shl 8)
  248. ExtPSCellSize   equ     ExtPSAttrCount + 1
  249.  
  250.                                 ;/function index for DBCS BufferUpdate
  251. DefaultFmtIndx  equ     0       ; index of default format function
  252. WorldFmtIndx    equ     2       ; index of world format function
  253. PSFmtIndx       equ     4       ; index of default PS format function
  254. ExtPSFmtIndx    equ     6       ; index of extended PS format function
  255.  
  256.                                 ;/DBCS BufferUpdate (bisecting DBCS character
  257.                                 ; status)
  258. BisectDBCS_START        equ     0001h   ; bisected starting DBCS character
  259. BisectDBCS_LAST         equ     0002h   ; bisected ending DBCS character
  260. BisectDBCS_LEFT         equ     0004h   ; bisected DBCS character in left side
  261. BisectDBCS_RIGHT        equ     0008h   ; bisected DBCS character in right side
  262. ENDIF ;D1348
  263.  
  264.