home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / BSESUB.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  30KB  |  904 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. /*static char *SCCSID = "@(#)bsesub.h   6.6 92/02/26";*/
  14. /*static char *SCCSID = "@(#)bsesub.h   6.6 92/02/26";*/
  15. /***************************************************************************\
  16. *
  17. * Module Name: BSESUB.H
  18. *
  19. * OS/2 Base Include File
  20. *
  21. *
  22. *****************************************************************************
  23. *
  24. * Subcomponents marked with "+" are partially included by default
  25. *   #define:                To include:
  26. *
  27. *   INCL_KBD                KBD
  28. *   INCL_VIO                VIO
  29. *   INCL_MOU                MOU
  30. \***************************************************************************/
  31.  
  32. #ifdef INCL_SUB
  33.  
  34. #define INCL_KBD
  35. #define INCL_VIO
  36. #define INCL_MOU
  37.  
  38. #endif /* INCL_SUB */
  39.  
  40. #ifdef INCL_KBD
  41.  
  42. /* XLATOFF */
  43. #ifdef INCL_16
  44. #define KbdCharIn       Kbd16CharIn
  45. #define KbdClose        Kbd16Close
  46. #define KbdDeRegister   Kbd16DeRegister
  47. #define KbdFlushBuffer  Kbd16FlushBuffer
  48. #define KbdFreeFocus    Kbd16FreeFocus
  49. #define KbdGetCp        Kbd16GetCp
  50. #define KbdGetFocus     Kbd16GetFocus
  51. #define KbdGetHWID      Kbd16GetHWID
  52. #define KbdGetStatus    Kbd16GetStatus
  53. #define KbdOpen         Kbd16Open
  54. #define KbdPeek         Kbd16Peek
  55. #define KbdRegister     Kbd16Register
  56. #define KbdSetCp        Kbd16SetCp
  57. #define KbdSetCustXt    Kbd16SetCustXt
  58. #define KbdSetFgnd      Kbd16SetFgnd
  59. #define KbdSetHWID      Kbd16SetHWID
  60. #define KbdSetStatus    Kbd16SetStatus
  61. #define KbdStringIn     Kbd16StringIn
  62. #define KbdSynch        Kbd16Synch
  63. #define KbdXlate        Kbd16Xlate
  64. #endif /* INCL_16 */
  65. /* XLATON */
  66.  
  67. typedef unsigned short  HKBD;
  68. typedef HKBD    FAR *   PHKBD;
  69.  
  70. APIRET  APIENTRY        KbdRegister (PSZ pszModName, PSZ pszEntryPt, ULONG FunMask);
  71.  
  72. #define KR_KBDCHARIN    0x00000001L
  73. #define KR_KBDPEEK      0x00000002L
  74. #define KR_KBDFLUSHBUFFER       0x00000004L
  75. #define KR_KBDGETSTATUS 0x00000008L
  76. #define KR_KBDSETSTATUS 0x00000010L
  77. #define KR_KBDSTRINGIN  0x00000020L
  78. #define KR_KBDOPEN      0x00000040L
  79. #define KR_KBDCLOSE     0x00000080L
  80. #define KR_KBDGETFOCUS  0x00000100L
  81. #define KR_KBDFREEFOCUS 0x00000200L
  82. #define KR_KBDGETCP     0x00000400L
  83. #define KR_KBDSETCP     0x00000800L
  84. #define KR_KBDXLATE     0x00001000L
  85. #define KR_KBDSETCUSTXT 0x00002000L
  86.  
  87. #define IO_WAIT                    0
  88. #define IO_NOWAIT                  1
  89.  
  90. APIRET  APIENTRY        KbdDeRegister (void);
  91.  
  92. /* KBDKEYINFO structure, for KbdCharIn and KbdPeek */
  93.  
  94. /* XLATOFF */
  95. #pragma pack(2)
  96. /* XLATON */
  97.  
  98. typedef struct _KBDKEYINFO {    /* kbci */
  99.         UCHAR    chChar;
  100.         UCHAR    chScan;
  101.         UCHAR    fbStatus;
  102.         UCHAR    bNlsShift;
  103.         USHORT   fsState;
  104.         ULONG    time;
  105.         }KBDKEYINFO;
  106. typedef KBDKEYINFO FAR *PKBDKEYINFO;
  107.  
  108. /* XLATOFF */
  109. #pragma pack()
  110. /* XLATON */
  111.  
  112. APIRET  APIENTRY        KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd);
  113. APIRET  APIENTRY        KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
  114.  
  115. /* structure for KbdStringIn() */
  116.  
  117. typedef struct _STRINGINBUF {   /* kbsi */
  118.         USHORT cb;
  119.         USHORT cchIn;
  120.         } STRINGINBUF;
  121. typedef STRINGINBUF FAR *PSTRINGINBUF;
  122.  
  123. APIRET  APIENTRY        KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fsWait,
  124.                              HKBD hkbd);
  125.  
  126. APIRET  APIENTRY        KbdFlushBuffer (HKBD hkbd);
  127.  
  128. /* KBDINFO.fsMask */
  129.  
  130. #define KEYBOARD_ECHO_ON        0x0001
  131. #define KEYBOARD_ECHO_OFF       0x0002
  132. #define KEYBOARD_BINARY_MODE    0x0004
  133. #define KEYBOARD_ASCII_MODE     0x0008
  134. #define KEYBOARD_MODIFY_STATE   0x0010
  135. #define KEYBOARD_MODIFY_INTERIM 0x0020
  136. #define KEYBOARD_MODIFY_TURNAROUND      0x0040
  137. #define KEYBOARD_2B_TURNAROUND  0x0080
  138. #define KEYBOARD_SHIFT_REPORT   0x0100
  139.  
  140. #ifndef INCL_DOSDEVIOCTL  /* following constants defined in bsedev.h */
  141.  
  142. /* KBDINFO.fsState/KBDKEYINFO.fsState/KBDTRANS.fsState */
  143.  
  144. #define KBDSTF_RIGHTSHIFT               0x0001
  145. #define KBDSTF_LEFTSHIFT                0x0002
  146. #define KBDSTF_CONTROL          0x0004
  147. #define KBDSTF_ALT              0x0008
  148. #define KBDSTF_SCROLLLOCK_ON    0x0010
  149. #define KBDSTF_NUMLOCK_ON               0x0020
  150. #define KBDSTF_CAPSLOCK_ON      0x0040
  151. #define KBDSTF_INSERT_ON                0x0080
  152. #define KBDSTF_LEFTCONTROL      0x0100
  153. #define KBDSTF_LEFTALT          0x0200
  154. #define KBDSTF_RIGHTCONTROL     0x0400
  155. #define KBDSTF_RIGHTALT         0x0800
  156. #define KBDSTF_SCROLLLOCK               0x1000
  157. #define KBDSTF_NUMLOCK          0x2000
  158. #define KBDSTF_CAPSLOCK         0x4000
  159. #define KBDSTF_SYSREQ           0x8000
  160.  
  161. #endif  /* INCL_DOSDEVIOCTL */
  162.  
  163. /* KBDINFO structure, for KbdSet/GetStatus */
  164. typedef struct _KBDINFO {       /* kbst */
  165.         USHORT cb;
  166.         USHORT fsMask;
  167.         USHORT chTurnAround;
  168.         USHORT fsInterim;
  169.         USHORT fsState;
  170.         }KBDINFO;
  171. typedef KBDINFO FAR *PKBDINFO;
  172.  
  173. APIRET  APIENTRY        KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
  174. APIRET  APIENTRY        KbdGetStatus (PKBDINFO pkbdinfo, HKBD hdbd);
  175.  
  176. APIRET  APIENTRY        KbdSetCp (USHORT usReserved, USHORT pidCP, HKBD hdbd);
  177. APIRET  APIENTRY        KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
  178.  
  179. APIRET  APIENTRY        KbdOpen (PHKBD phkbd);
  180. APIRET  APIENTRY        KbdClose (HKBD hkbd);
  181.  
  182. APIRET  APIENTRY        KbdGetFocus (USHORT fWait, HKBD hkbd);
  183. APIRET  APIENTRY        KbdFreeFocus (HKBD hkbd);
  184.  
  185. APIRET  APIENTRY        KbdSynch (USHORT fsWait);
  186.  
  187. APIRET  APIENTRY        KbdSetFgnd(VOID);
  188.  
  189. /* structure for KbdGetHWID() */
  190. typedef struct _KBDHWID {       /* kbhw */
  191.         USHORT cb;
  192.         USHORT idKbd;
  193.         USHORT usReserved1;
  194.         USHORT usReserved2;
  195.         } KBDHWID;
  196. typedef KBDHWID FAR *PKBDHWID;
  197.  
  198. APIRET  APIENTRY        KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
  199. APIRET  APIENTRY        KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
  200.  
  201. /* KBDTRANS.fbStatus */
  202.  
  203. #define KBDTRF_SHIFT_KEY_IN             0x01
  204. #define KBDTRF_CONVERSION_REQUEST       0x20
  205. #define KBDTRF_FINAL_CHAR_IN            0x40
  206. #define KBDTRF_INTERIM_CHAR_IN          0x80
  207.  
  208. /* XLATOFF */
  209. #pragma pack(2)
  210. /* XLATON */
  211.  
  212. /* structure for KbdXlate() */
  213. typedef struct _KBDTRANS {      /* kbxl */
  214.         UCHAR      chChar;
  215.         UCHAR      chScan;
  216.         UCHAR      fbStatus;
  217.         UCHAR      bNlsShift;
  218.         USHORT     fsState;
  219.         ULONG      time;
  220.         USHORT     fsDD;
  221.         USHORT     fsXlate;
  222.         USHORT     fsShift;
  223.         USHORT     sZero;
  224.         } KBDTRANS;
  225. typedef KBDTRANS FAR *PKBDTRANS;
  226.  
  227. /* XLATOFF */
  228. #pragma pack()
  229. /* XLATON */
  230.  
  231. APIRET  APIENTRY        KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd);
  232. APIRET  APIENTRY        KbdSetCustXt (PUSHORT usCodePage, HKBD hkbd);
  233.  
  234. #endif /* INCL_KBD */
  235.  
  236. #ifdef INCL_VIO
  237.  
  238. /* XLATOFF */
  239. #ifdef INCL_16
  240. #define VioCheckCharType        Vio16CheckCharType
  241. #define VioDeRegister   Vio16DeRegister
  242. #define VioEndPopUp     Vio16EndPopUp
  243. #define VioGetAnsi      Vio16GetAnsi
  244. #define VioGetBuf       Vio16GetBuf
  245. #define VioGetConfig    Vio16GetConfig
  246. #define VioGetCp        Vio16GetCp
  247. #define VioGetCurPos    Vio16GetCurPos
  248. #define VioGetCurType   Vio16GetCurType
  249. #define VioGetFont      Vio16GetFont
  250. #define VioGetMode      Vio16GetMode
  251. #define VioGetPhysBuf   Vio16GetPhysBuf
  252. #define VioGetState     Vio16GetState
  253. #define VioModeUndo     Vio16ModeUndo
  254. #define VioModeWait     Vio16ModeWait
  255. #define VioPopUp        Vio16PopUp
  256. #define VioPrtSc        Vio16PrtSc
  257. #define VioPrtScToggle  Vio16PrtScToggle
  258. #define VioReadCellStr  Vio16ReadCellStr
  259. #define VioReadCharStr  Vio16ReadCharStr
  260. #define VioRedrawSize   Vio16RedrawSize
  261. #define VioRegister     Vio16Register
  262. #define VioSavRedrawUndo        Vio16SavRedrawUndo
  263. #define VioSavRedrawWait        Vio16SavRedrawWait
  264. #define VioScrLock      Vio16ScrLock
  265. #define VioScrUnLock    Vio16ScrUnLock
  266. #define VioScrollDn     Vio16ScrollDn
  267. #define VioScrollLf     Vio16ScrollLf
  268. #define VioScrollRt     Vio16ScrollRt
  269. #define VioScrollUp     Vio16ScrollUp
  270. #define VioSetAnsi      Vio16SetAnsi
  271. #define VioSetCp        Vio16SetCp
  272. #define VioSetCurPos    Vio16SetCurPos
  273. #define VioSetCurType   Vio16SetCurType
  274. #define VioSetFont      Vio16SetFont
  275. #define VioSetMode      Vio16SetMode
  276. #define VioSetState     Vio16SetState
  277. #define VioShowBuf      Vio16ShowBuf
  278. #define VioWrtCellStr   Vio16WrtCellStr
  279. #define VioWrtCharStr   Vio16WrtCharStr
  280. #define VioWrtCharStrAtt        Vio16WrtCharStrAtt
  281. #define VioWrtNAttr     Vio16WrtNAttr
  282. #define VioWrtNCell     Vio16WrtNCell
  283. #define VioWrtNChar     Vio16WrtNChar
  284. #define VioWrtTTY       Vio16WrtTTY
  285. #endif /* INCL_16 */
  286. /* XLATON */
  287.  
  288. typedef unsigned short  HVIO;
  289. typedef HVIO    FAR *   PHVIO;
  290.  
  291. APIRET  APIENTRY    VioRegister (PSZ pszModName, PSZ pszEntryName, ULONG flFun1,
  292.                              ULONG flFun2);
  293.  
  294. APIRET  APIENTRY    VioGlobalReg(PSZ pszModName,
  295.                                   PSZ pszEntryName,
  296.                                   ULONG flFun1,
  297.                                   ULONG flFun2,
  298.                                   USHORT usReturn);
  299.  
  300. /* first parameter registration constants   */
  301. #define VR_VIOGETCURPOS 0x00000001L
  302. #define VR_VIOGETCURTYPE        0x00000002L
  303. #define VR_VIOGETMODE   0x00000004L
  304. #define VR_VIOGETBUF    0x00000008L
  305. #define VR_VIOGETPHYSBUF        0x00000010L
  306. #define VR_VIOSETCURPOS 0x00000020L
  307. #define VR_VIOSETCURTYPE        0x00000040L
  308. #define VR_VIOSETMODE   0x00000080L
  309. #define VR_VIOSHOWBUF   0x00000100L
  310. #define VR_VIOREADCHARSTR       0x00000200L
  311. #define VR_VIOREADCELLSTR       0x00000400L
  312. #define VR_VIOWRTNCHAR  0x00000800L
  313. #define VR_VIOWRTNATTR  0x00001000L
  314. #define VR_VIOWRTNCELL  0x00002000L
  315. #define VR_VIOWRTTTY    0x00004000L
  316. #define VR_VIOWRTCHARSTR        0x00008000L
  317.  
  318. #define VR_VIOWRTCHARSTRATT     0x00010000L
  319. #define VR_VIOWRTCELLSTR        0x00020000L
  320. #define VR_VIOSCROLLUP  0x00040000L
  321. #define VR_VIOSCROLLDN  0x00080000L
  322. #define VR_VIOSCROLLLF  0x00100000L
  323. #define VR_VIOSCROLLRT  0x00200000L
  324. #define VR_VIOSETANSI   0x00400000L
  325. #define VR_VIOGETANSI   0x00800000L
  326. #define VR_VIOPRTSC     0x01000000L
  327. #define VR_VIOSCRLOCK   0x02000000L
  328. #define VR_VIOSCRUNLOCK 0x04000000L
  329. #define VR_VIOSAVREDRAWWAIT     0x08000000L
  330. #define VR_VIOSAVREDRAWUNDO     0x10000000L
  331. #define VR_VIOPOPUP     0x20000000L
  332. #define VR_VIOENDPOPUP  0x40000000L
  333. #define VR_VIOPRTSCTOGGLE       0x80000000L
  334.  
  335. /* second parameter registration constants  */
  336. #define VR_VIOMODEWAIT  0x00000001L
  337. #define VR_VIOMODEUNDO  0x00000002L
  338. #define VR_VIOGETFONT   0x00000004L
  339. #define VR_VIOGETCONFIG 0x00000008L
  340. #define VR_VIOSETCP     0x00000010L
  341. #define VR_VIOGETCP     0x00000020L
  342. #define VR_VIOSETFONT   0x00000040L
  343. #define VR_VIOGETSTATE  0x00000080L
  344. #define VR_VIOSETSTATE  0x00000100L
  345.  
  346. APIRET  APIENTRY        VioDeRegister (void);
  347.  
  348. APIRET  APIENTRY        VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio);
  349.  
  350. APIRET  APIENTRY        VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio);
  351. APIRET  APIENTRY        VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio);
  352.  
  353. /* structure for VioSet/GetCurType() */
  354. typedef struct _VIOCURSORINFO { /* vioci */
  355.         USHORT   yStart;
  356.         USHORT   cEnd;
  357.         USHORT   cx;
  358.         USHORT   attr;
  359.         } VIOCURSORINFO;
  360. typedef VIOCURSORINFO FAR *PVIOCURSORINFO;
  361.  
  362. APIRET  APIENTRY        VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  363. APIRET  APIENTRY        VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  364.  
  365. /* VIOMODEINFO.color constants */
  366.  
  367. #define COLORS_2        0x0001
  368. #define COLORS_4        0x0002
  369. #define COLORS_16       0x0004
  370.  
  371. /* XLATOFF */
  372. #pragma pack(1)
  373. /* XLATON */
  374.  
  375. /* structure for VioSet/GetMode() */
  376. typedef struct _VIOMODEINFO {   /* viomi */
  377.         USHORT cb;
  378.         UCHAR  fbType;
  379.         UCHAR  color;
  380.         USHORT col;
  381.         USHORT row;
  382.         USHORT hres;
  383.         USHORT vres;
  384.         UCHAR  fmt_ID;
  385.         UCHAR  attrib;
  386.         ULONG  buf_addr;
  387.         ULONG  buf_length;
  388.         ULONG  full_length;
  389.         ULONG  partial_length;
  390.         PCH    ext_data_addr;
  391.         } VIOMODEINFO;
  392. typedef VIOMODEINFO FAR *PVIOMODEINFO;
  393.  
  394. /* XLATOFF */
  395. #pragma pack()
  396. /* XLATON */
  397.  
  398. #define VGMT_OTHER      0x01
  399. #define VGMT_GRAPHICS   0x02
  400. #define VGMT_DISABLEBURST       0x04
  401.  
  402. APIRET  APIENTRY        VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  403. APIRET  APIENTRY        VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  404.  
  405. /* structure for VioGetPhysBuf() */
  406.  
  407. typedef struct _VIOPHYSBUF {    /* viopb */
  408.         PBYTE    pBuf;
  409.         ULONG    cb;
  410.         SEL      asel[1];
  411.         } VIOPHYSBUF;
  412. typedef VIOPHYSBUF FAR *PVIOPHYSBUF;
  413.  
  414. APIRET  APIENTRY        VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved);
  415.  
  416. APIRET  APIENTRY        VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
  417.                                 USHORT usColumn, HVIO hvio);
  418. APIRET  APIENTRY        VioReadCharStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
  419.                                 USHORT usColumn, HVIO hvio);
  420. APIRET  APIENTRY        VioWrtCellStr (PCH pchCellStr, USHORT cb, USHORT usRow,
  421.                                USHORT usColumn, HVIO hvio);
  422. APIRET  APIENTRY        VioWrtCharStr (PCH pchStr, USHORT cb, USHORT usRow,
  423.                                USHORT usColumn, HVIO hvio);
  424.  
  425. APIRET  APIENTRY        VioScrollDn (USHORT usTopRow, USHORT usLeftCol,
  426.                              USHORT usBotRow, USHORT usRightCol,
  427.                              USHORT cbLines, PBYTE pCell, HVIO hvio);
  428. APIRET  APIENTRY        VioScrollUp (USHORT usTopRow, USHORT usLeftCol,
  429.                              USHORT usBotRow, USHORT usRightCol,
  430.                              USHORT cbLines, PBYTE pCell, HVIO hvio);
  431. APIRET  APIENTRY        VioScrollLf (USHORT usTopRow, USHORT usLeftCol,
  432.                              USHORT usBotRow, USHORT usRightCol,
  433.                              USHORT cbCol, PBYTE pCell, HVIO hvio);
  434. APIRET  APIENTRY        VioScrollRt (USHORT usTopRow, USHORT usLeftCol,
  435.                              USHORT usBotRow, USHORT usRightCol,
  436.                              USHORT cbCol, PBYTE pCell, HVIO hvio);
  437.  
  438. APIRET  APIENTRY        VioWrtNAttr (PBYTE pAttr, USHORT cb, USHORT usRow,
  439.                              USHORT usColumn, HVIO hvio);
  440. APIRET  APIENTRY        VioWrtNCell (PBYTE pCell, USHORT cb, USHORT usRow,
  441.                              USHORT usColumn, HVIO hvio);
  442. APIRET  APIENTRY        VioWrtNChar (PCH pchChar, USHORT cb, USHORT usRow,
  443.                              USHORT usColumn, HVIO hvio);
  444. APIRET  APIENTRY        VioWrtTTY (PCH pch, USHORT cb, HVIO hvio);
  445. APIRET  APIENTRY        VioWrtCharStrAtt (PCH pch, USHORT cb, USHORT usRow,
  446.                                   USHORT usColumn, PBYTE pAttr, HVIO hvio);
  447.  
  448. #define VCC_SBCSCHAR               0
  449. #define VCC_DBCSFULLCHAR           1
  450. #define VCC_DBCS1STHALF            2
  451. #define VCC_DBCS2NDHALF            3
  452.  
  453. APIRET  APIENTRY        VioCheckCharType (PUSHORT pType, USHORT usRow,
  454.                                   USHORT usColumn, HVIO hvio);
  455.  
  456. APIRET  APIENTRY        VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio);
  457.  
  458.  
  459. #define ANSI_ON                    1
  460. #define ANSI_OFF                   0
  461.  
  462. APIRET  APIENTRY        VioSetAnsi (USHORT fAnsi, HVIO hvio);
  463. APIRET  APIENTRY        VioGetAnsi (PUSHORT pfAnsi, HVIO hvio);
  464.  
  465. APIRET  APIENTRY        VioPrtSc (HVIO hvio);
  466. APIRET  APIENTRY        VioPrtScToggle (HVIO hvio);
  467.  
  468. #define VSRWI_SAVEANDREDRAW        0
  469. #define VSRWI_REDRAW               1
  470.  
  471. #define VSRWN_SAVE                 0
  472. #define VSRWN_REDRAW               1
  473.  
  474. #define UNDOI_GETOWNER             0
  475. #define UNDOI_RELEASEOWNER         1
  476.  
  477. #define UNDOK_ERRORCODE            0
  478. #define UNDOK_TERMINATE            1
  479.  
  480. APIRET  APIENTRY        VioRedrawSize (PULONG pcbRedraw);
  481. APIRET  APIENTRY        VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pNotifyType,
  482.                                   USHORT usReserved);
  483. APIRET  APIENTRY        VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd,
  484.                                   USHORT usReserved);
  485.  
  486. #define VMWR_POPUP                 0
  487. #define VMWN_POPUP                 0
  488.  
  489. APIRET  APIENTRY        VioModeWait (USHORT usReqType, PUSHORT pNotifyType,
  490.                              USHORT usReserved);
  491. APIRET  APIENTRY        VioModeUndo (USHORT usOwnerInd, USHORT usKillInd,
  492.                              USHORT usReserved);
  493.  
  494. #define LOCKIO_NOWAIT              0
  495. #define LOCKIO_WAIT                1
  496.  
  497. #define LOCK_SUCCESS               0
  498. #define LOCK_FAIL                  1
  499.  
  500. APIRET  APIENTRY        VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio);
  501. APIRET  APIENTRY        VioScrUnLock (HVIO hvio);
  502.  
  503. #define VP_NOWAIT       0x0000
  504. #define VP_WAIT 0x0001
  505. #define VP_OPAQUE       0x0000
  506. #define VP_TRANSPARENT  0x0002
  507.  
  508. APIRET  APIENTRY        VioPopUp (PUSHORT pfWait, HVIO hvio);
  509. APIRET  APIENTRY        VioEndPopUp (HVIO hvio);
  510.  
  511. /* VIOCONFIGINFO.adapter constants */
  512.  
  513. #define DISPLAY_MONOCHROME      0x0000
  514. #define DISPLAY_CGA             0x0001
  515. #define DISPLAY_EGA             0x0002
  516. #define DISPLAY_VGA             0x0003
  517. #define DISPLAY_8514A           0x0007
  518. #define DISPLAY_IMAGEADAPTER    0x0008
  519. #define DISPLAY_XGA             0x0009
  520. #define DISPLAY_SVGA            0x000A
  521.  
  522. /* VIOCONFIGINFO.display constants */
  523.  
  524. #define MONITOR_MONOCHROME      0x0000
  525. #define MONITOR_COLOR           0x0001
  526. #define MONITOR_ENHANCED        0x0002
  527. #define MONITOR_8503            0x0003
  528. #define MONITOR_851X_COLOR      0x0004
  529. #define MONITOR_8514            0x0009
  530. #define MONITOR_FLATPANEL       0x000A
  531. #define MONITOR_8507_8604       0x000B
  532. #define MONITOR_8515            0x000C
  533. #define MONITOR_9515            0x000F
  534. #define MONITOR_9517            0x0011
  535. #define MONITOR_9518            0x0012
  536. #define MONITOR_OEM             0x0013
  537.  
  538. /* structure for VioGetConfig() */
  539.  
  540. /* XLATOFF */
  541. #pragma pack(2)
  542. /* XLATON */
  543.  
  544. typedef struct _VIOCONFIGINFO { /* vioin */
  545.         USHORT  cb;
  546.         USHORT  adapter;
  547.         USHORT  display;
  548.         ULONG   cbMemory;
  549.         USHORT  Configuration;
  550.         USHORT  VDHVersion;
  551.         USHORT  Flags;
  552.         ULONG   HWBufferSize;
  553.         ULONG   FullSaveSize;
  554.         ULONG   PartSaveSize;
  555.         USHORT  EMAdaptersOFF;
  556.         USHORT  EMDisplaysOFF;
  557.         } VIOCONFIGINFO;
  558. typedef VIOCONFIGINFO FAR *PVIOCONFIGINFO;
  559.  
  560. /* XLATOFF */
  561. #pragma pack()
  562. /* XLATON */
  563.  
  564. #define VIO_CONFIG_CURRENT         0
  565. #define VIO_CONFIG_PRIMARY         1
  566. #define VIO_CONFIG_SECONDARY       2
  567.  
  568. APIRET  APIENTRY        VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin,
  569.                               HVIO hvio);
  570.  
  571. /* structure for VioGet/SetFont() */
  572. typedef struct _VIOFONTINFO {   /* viofi */
  573.         USHORT  cb;
  574.         USHORT  type;
  575.         USHORT  cxCell;
  576.         USHORT  cyCell;
  577.         PVOID   pbData;
  578.         USHORT  cbData;
  579.         } VIOFONTINFO;
  580. typedef VIOFONTINFO FAR *PVIOFONTINFO;
  581.  
  582. #define VGFI_GETCURFONT            0
  583. #define VGFI_GETROMFONT            1
  584.  
  585. APIRET  APIENTRY        VioGetFont (PVIOFONTINFO pviofi, HVIO hvio);
  586. APIRET  APIENTRY        VioSetFont (PVIOFONTINFO pviofi, HVIO hvio);
  587.  
  588. APIRET  APIENTRY        VioGetCp (USHORT usReserved, PUSHORT pIdCodePage, HVIO hvio);
  589. APIRET  APIENTRY        VioSetCp (USHORT usReserved, USHORT idCodePage, HVIO hvio);
  590.  
  591. typedef struct _VIOPALSTATE {   /* viopal */
  592.         USHORT  cb;
  593.         USHORT  type;
  594.         USHORT  iFirst;
  595.         USHORT  acolor[1];
  596.         }VIOPALSTATE;
  597. typedef VIOPALSTATE FAR *PVIOPALSTATE;
  598.  
  599. typedef struct _VIOOVERSCAN {   /* vioos */
  600.         USHORT  cb;
  601.         USHORT  type;
  602.         USHORT  color;
  603.         }VIOOVERSCAN;
  604. typedef VIOOVERSCAN FAR *PVIOOVERSCAN;
  605.  
  606. typedef struct _VIOINTENSITY {  /* vioint */
  607.         USHORT  cb;
  608.         USHORT  type;
  609.         USHORT  fs;
  610.         }VIOINTENSITY;
  611. typedef VIOINTENSITY FAR *PVIOINTENSITY;
  612.  
  613. typedef struct _VIOCOLORREG {  /* viocreg */
  614.         USHORT  cb;
  615.         USHORT  type;
  616.         USHORT  firstcolorreg;
  617.         USHORT  numcolorregs;
  618.         PCH     colorregaddr;
  619.         }VIOCOLORREG;
  620. typedef VIOCOLORREG FAR *PVIOCOLORREG;
  621.  
  622. typedef struct _VIOSETULINELOC {  /* viouline */
  623.         USHORT  cb;
  624.         USHORT  type;
  625.         USHORT  scanline;
  626.         }VIOSETULINELOC;
  627. typedef VIOSETULINELOC FAR *PVIOSETULINELOC;
  628.  
  629. typedef struct _VIOSETTARGET {  /* viosett */
  630.         USHORT  cb;
  631.         USHORT  type;
  632.         USHORT  defaultalgorithm;
  633.         }VIOSETTARGET;
  634. typedef VIOSETTARGET FAR *PVIOSETTARGET;
  635.  
  636. APIRET  APIENTRY        VioGetState (PVOID pState, HVIO hvio);
  637. APIRET  APIENTRY        VioSetState (PVOID pState, HVIO hvio);
  638.  
  639. #endif /* INCL_VIO */
  640.  
  641. #ifdef INCL_MOU
  642.  
  643. /* XLATOFF */
  644. #ifdef INCL_16
  645. #define MouClose        Mou16Close
  646. #define MouDeRegister   Mou16DeRegister
  647. #define MouDrawPtr      Mou16DrawPtr
  648. #define MouFlushQue     Mou16FlushQue
  649. #define MouGetDevStatus Mou16GetDevStatus
  650. #define MouGetEventMask Mou16GetEventMask
  651. #define MouGetNumButtons        Mou16GetNumButtons
  652. #define MouGetNumMickeys        Mou16GetNumMickeys
  653. #define MouGetNumQueEl  Mou16GetNumQueEl
  654. #define MouGetPtrPos    Mou16GetPtrPos
  655. #define MouGetPtrShape  Mou16GetPtrShape
  656. #define MouGetScaleFact Mou16GetScaleFact
  657. #define MouGetThreshold Mou16GetThreshold
  658. #define MouInitReal     Mou16InitReal
  659. #define MouOpen         Mou16Open
  660. #define MouReadEventQue Mou16ReadEventQue
  661. #define MouRegister     Mou16Register
  662. #define MouRemovePtr    Mou16RemovePtr
  663. #define MouSetDevStatus Mou16SetDevStatus
  664. #define MouSetEventMask Mou16SetEventMask
  665. #define MouSetPtrPos    Mou16SetPtrPos
  666. #define MouSetPtrShape  Mou16SetPtrShape
  667. #define MouSetScaleFact Mou16SetScaleFact
  668. #define MouSetThreshold Mou16SetThreshold
  669. #define MouSynch        Mou16Synch
  670. #endif /* INCL_16 */
  671. /* XLATON */
  672.  
  673. typedef unsigned short  HMOU;
  674. typedef HMOU    FAR *   PHMOU;
  675.  
  676. APIRET  APIENTRY        MouRegister (PSZ pszModName, PSZ pszEntryName, ULONG flFuns);
  677.  
  678. #define MR_MOUGETNUMBUTTONS     0x00000001L
  679. #define MR_MOUGETNUMMICKEYS     0x00000002L
  680. #define MR_MOUGETDEVSTATUS      0x00000004L
  681. #define MR_MOUGETNUMQUEEL       0x00000008L
  682. #define MR_MOUREADEVENTQUE      0x00000010L
  683. #define MR_MOUGETSCALEFACT      0x00000020L
  684. #define MR_MOUGETEVENTMASK      0x00000040L
  685. #define MR_MOUSETSCALEFACT      0x00000080L
  686. #define MR_MOUSETEVENTMASK      0x00000100L
  687. #define MR_MOUOPEN      0x00000800L
  688. #define MR_MOUCLOSE     0x00001000L
  689. #define MR_MOUGETPTRSHAPE       0x00002000L
  690. #define MR_MOUSETPTRSHAPE       0x00004000L
  691. #define MR_MOUDRAWPTR   0x00008000L
  692. #define MR_MOUREMOVEPTR 0x00010000L
  693. #define MR_MOUGETPTRPOS 0x00020000L
  694. #define MR_MOUSETPTRPOS 0x00040000L
  695. #define MR_MOUINITREAL  0x00080000L
  696. #define MR_MOUSETDEVSTATUS      0x00100000L
  697.  
  698. APIRET  APIENTRY        MouDeRegister (void);
  699.  
  700. APIRET  APIENTRY        MouFlushQue (HMOU hmou);
  701.  
  702. #define MHK_BUTTON1     0x0001
  703. #define MHK_BUTTON2     0x0002
  704. #define MHK_BUTTON3     0x0004
  705.  
  706. /* structure for MouGet/SetPtrPos() */
  707. typedef struct _PTRLOC {    /* moupl */
  708.         USHORT row;
  709.         USHORT col;
  710.         } PTRLOC;
  711. typedef PTRLOC FAR *PPTRLOC;
  712.  
  713. APIRET  APIENTRY        MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
  714. APIRET  APIENTRY        MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
  715.  
  716. /* structure for MouGet/SetPtrShape() */
  717. typedef struct _PTRSHAPE {  /* moups */
  718.         USHORT cb;
  719.         USHORT col;
  720.         USHORT row;
  721.         USHORT colHot;
  722.         USHORT rowHot;
  723.         } PTRSHAPE;
  724. typedef PTRSHAPE FAR *PPTRSHAPE;
  725.  
  726. APIRET  APIENTRY        MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
  727. APIRET  APIENTRY        MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
  728.  
  729. /* MouGetDevStatus/MouSetDevStatus device status constants */
  730.  
  731. #define MOUSE_QUEUEBUSY 0x0001
  732. #define MOUSE_BLOCKREAD 0x0002
  733. #define MOUSE_FLUSH     0x0004
  734. #define MOUSE_UNSUPPORTED_MODE  0x0008
  735. #define MOUSE_DISABLED  0x0100
  736. #define MOUSE_MICKEYS   0x0200
  737.  
  738. APIRET  APIENTRY        MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
  739.  
  740. APIRET  APIENTRY        MouGetNumButtons (PUSHORT pcButtons, HMOU hmou);
  741. APIRET  APIENTRY        MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou);
  742.  
  743. /* MouReadEventQue */
  744.  
  745. #define MOU_NOWAIT      0x0000
  746. #define MOU_WAIT        0x0001
  747.  
  748. /* XLATOFF */
  749. #pragma pack(2)
  750. /* XLATON */
  751.  
  752. /* structure for MouReadEventQue() */
  753. typedef struct _MOUEVENTINFO {  /* mouev */
  754.         USHORT fs;
  755.         ULONG  time;
  756.     SHORT row;
  757.     SHORT col;
  758.         }MOUEVENTINFO;
  759. typedef MOUEVENTINFO FAR *PMOUEVENTINFO;
  760.  
  761. /* XLATOFF */
  762. #pragma pack()
  763. /* XLATON */
  764.  
  765. APIRET  APIENTRY        MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait,
  766.                                  HMOU hmou);
  767.  
  768. /* structure for MouGetNumQueEl() */
  769. typedef struct _MOUQUEINFO {    /* mouqi */
  770.         USHORT cEvents;
  771.         USHORT cmaxEvents;
  772.         } MOUQUEINFO;
  773. typedef MOUQUEINFO FAR *PMOUQUEINFO;
  774.  
  775. APIRET  APIENTRY        MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou);
  776.  
  777. /* MouGetEventMask/MouSetEventMask events */
  778.  
  779. #define MOUSE_MOTION    0x0001
  780. #define MOUSE_MOTION_WITH_BN1_DOWN      0x0002
  781. #define MOUSE_BN1_DOWN  0x0004
  782. #define MOUSE_MOTION_WITH_BN2_DOWN      0x0008
  783. #define MOUSE_BN2_DOWN  0x0010
  784. #define MOUSE_MOTION_WITH_BN3_DOWN      0x0020
  785. #define MOUSE_BN3_DOWN  0x0040
  786.  
  787. APIRET  APIENTRY        MouGetEventMask (PUSHORT pfsEvents, HMOU hmou);
  788. APIRET  APIENTRY        MouSetEventMask (PUSHORT pfsEvents, HMOU hmou);
  789.  
  790.  
  791. /* structure for MouGet/SetScaleFact() */
  792. typedef struct _SCALEFACT { /* mousc */
  793.         USHORT rowScale;
  794.         USHORT colScale;
  795.         } SCALEFACT;
  796. typedef SCALEFACT FAR *PSCALEFACT;
  797.  
  798. APIRET  APIENTRY        MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
  799. APIRET  APIENTRY        MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
  800.  
  801. APIRET  APIENTRY        MouOpen (PSZ pszDvrName, PHMOU phmou);
  802. APIRET  APIENTRY        MouClose (HMOU hmou);
  803.  
  804. /* structure for MouRemovePtr() */
  805. typedef struct _NOPTRRECT { /* mourt */
  806.         USHORT row;
  807.         USHORT col;
  808.         USHORT cRow;
  809.         USHORT cCol;
  810.         } NOPTRRECT;
  811. typedef NOPTRRECT FAR *PNOPTRRECT;
  812.  
  813. APIRET  APIENTRY        MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou);
  814.  
  815. APIRET  APIENTRY        MouDrawPtr (HMOU hmou);
  816.  
  817. #define MOU_NODRAW      0x0001
  818. #define MOU_DRAW        0x0000
  819. #define MOU_MICKEYS     0x0002
  820. #define MOU_PELS        0x0000
  821.  
  822. APIRET  APIENTRY        MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
  823. APIRET  APIENTRY        MouInitReal (PSZ);
  824.  
  825. APIRET  APIENTRY        MouSynch(USHORT pszDvrName);
  826.  
  827. typedef struct _THRESHOLD {     /* threshold */
  828.         USHORT Length;          /* Length Field            */
  829.         USHORT Level1;          /* First movement level    */
  830.         USHORT Lev1Mult;        /* First level multiplier  */
  831.         USHORT Level2;          /* Second movement level   */
  832.         USHORT lev2Mult;        /* Second level multiplier */
  833. } THRESHOLD, *PTHRESHOLD;
  834.  
  835. APIRET  APIENTRY        MouGetThreshold(PTHRESHOLD pthreshold, HMOU hmou);
  836. APIRET  APIENTRY        MouSetThreshold(PTHRESHOLD pthreshold, HMOU hmou);
  837.  
  838. #endif /* INCL_MOU */
  839.  
  840. /***    Input Method Profiler Services
  841.  *
  842.  *      IMPSetAIMProfile
  843.  *      IMPQueryAIMProfile
  844.  *      IMPResetAIMProfile
  845.  */
  846. #ifndef INCL_32
  847. typedef struct _AIMParms {  /* aimp */
  848.           ULONG  Length;
  849.           ULONG  Reserved;
  850.           ULONG  AIM_Errors;
  851.           BOOL   AIM_Active;
  852.           USHORT AIM_TimeOut;
  853.           ULONG  AIM_FKAccept;
  854.           ULONG  AIM_FKRate;
  855.           ULONG  AIM_FKDelay;
  856.           } AIMParms;
  857.  
  858. typedef AIMParms FAR *PAIMParms;
  859. #endif
  860.  
  861. #ifdef INCL_32
  862. typedef struct _AIMParms {  /* aimp */
  863.           ULONG  Length;
  864.           ULONG  Reserved;
  865.           ULONG  AIM_Errors;
  866.           USHORT AIM_Active;
  867.           USHORT AIM_TimeOut;
  868.           ULONG  AIM_FKAccept;
  869.           ULONG  AIM_FKRate;
  870.           ULONG  AIM_FKDelay;
  871.           } AIMParms;
  872.  
  873. typedef AIMParms  *PAIMParms;
  874.  
  875. #define  IMPSetAIMProfile     IMP32SetAIMProfile
  876. #define  IMPQueryAIMProfile   IMP32QueryAIMProfile
  877. #define  IMPResetAIMProfile   IMP32ResetAIMProfile
  878.  
  879. ULONG APIENTRY IMP32SetAIMProfile( PAIMParms pAIMParms );
  880. ULONG APIENTRY IMP32QueryAIMProfile( PAIMParms pAIMParms );
  881. VOID  APIENTRY IMP32ResetAIMProfile();
  882.  
  883. #else
  884.  
  885. /***    IMPSetAIMProfile - Alter AIM profile values
  886.  *
  887.  */
  888.  
  889. USHORT APIENTRY IMPSetAIMProfile( PAIMParms pAIMParms );
  890.  
  891.  
  892. /***    IMPQueryAIMProfile - Query AIM profile values
  893.  *
  894.  */
  895.  
  896. USHORT APIENTRY IMPQueryAIMProfile( PAIMParms pAIMParms );
  897.  
  898. /***    IMPResetAIMProfile - Reset AIM profile values
  899.  *
  900.  */
  901.  
  902. VOID APIENTRY IMPResetAIMProfile();
  903. #endif /* INCL_32 */
  904.