home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / 32text / bsesub.h next >
Encoding:
C/C++ Source or Header  |  1993-11-30  |  23.4 KB  |  737 lines

  1. /***************************************************************************
  2.  *
  3.  * Name:  bsesub.h
  4.  *
  5.  * Function:
  6.  *     OS/2 base include for 32 bit versions of Vio/Kbd/Mou.
  7.  *
  8.  * Copyright:
  9.  *     Copyright (C) IBM Corp. 1987, 1993
  10.  *
  11.  * Note:
  12.  *     1. One or more of the following should be defined.
  13.  *          INCL_KBD                KBD
  14.  *          INCL_VIO                VIO
  15.  *          INCL_AVIO               VIO
  16.  *          INCL_MOU                MOU
  17.  *          INCL_SUB                all of the above
  18.  *
  19.  *     2. The Vio calls from pmavio.h were moved here so that all of
  20.  *        the Vio calls are in one place.
  21.  *
  22.  *     3. A number of fields have been increased from 16 bits to 32 bits.
  23.  *        All 32 bit fields are now placed on 4 byte boundaries.
  24.  *
  25.  *
  26.  ****************************************************************************/
  27.  
  28. #ifndef __BSESUB__
  29. #define __BSESUB__
  30.  
  31. #ifdef INCL_SUB
  32.     #define INCL_KBD
  33.     #define INCL_VIO
  34.     #define INCL_AVIO
  35.     #define INCL_MOU
  36. #endif
  37.  
  38. #ifdef INCL_AVIO
  39.     #define INCL_VIO
  40. #endif
  41.  
  42. /*
  43.  * Keyboard (Kbd) functions
  44.  *
  45.  * Notes:
  46.  *     The keyboard handle is always required to be zero, as there is no longer
  47.  *     an open an close.
  48.  */
  49. #ifdef INCL_KBD
  50.     typedef unsigned long HKBD;   /* keyboard handle */
  51.     typedef HKBD        * PHKBD;
  52.  
  53.     /*
  54.      * Flags for KbdCharin, KbdGetConsole, and KbdStringIn
  55.      * (IO_PEEKWAIT not available in OS/2 2.x)
  56.      */
  57.     #define IO_WAIT               0
  58.     #define IO_NOWAIT             1
  59.     #define IO_PEEK               2
  60.     #define IO_PEEKWAIT           3
  61.     #define IO_EXTENDED           4
  62.  
  63.     /*
  64.      * Console Event Kinds (CK_MOUSE, and CK_NOTIFY not in OS/2 2.x)
  65.      */
  66.     #define CK_NONE               0
  67.     #define CK_KEY                1
  68.     #define CK_CHAR               2
  69.     #define CK_MOUSE              3
  70.     #define CK_NOTIFY             4
  71.  
  72.     /*
  73.      * Translation status for KbdCharin and KbdXlate (fsState)
  74.      */
  75.     #define KBDTRF_SHIFT_KEY_IN        0x01
  76.     #define KBDTRF_NOT_A_CHAR          0x02
  77.     #define KBDTRF_CONVERSION_REQUEST  0x20
  78.     #define KBDTRF_FINAL_CHAR_IN       0x40
  79.     #define KBDTRF_INTERIM_CHAR_IN     0x80
  80.  
  81.     /*
  82.      * Key structure for KbdCharIn and KbdPeek
  83.      * (Unicode character added, change in lengths)
  84.      */
  85.     typedef  struct _KBDKEYINFO {
  86.         USHORT   ucUniChar;       /* Unicode char (added field) */
  87.         USHORT   chChar;          /* Char in current codepage  */
  88.         UCHAR    chScan;          /* Scan code */
  89.         UCHAR    fbStatus;        /* Final/Interim bits */
  90.         USHORT   fsState;         /* Shift state */
  91.         USHORT   VKey;            /* Virtual key */
  92.         USHORT   resv;            /* Reserved */
  93.         ULONG    time;            /* Time stamp (ms from IPL) */
  94.     } KBDKEYINFO;
  95.     typedef KBDKEYINFO * PKBDKEYINFO;
  96.  
  97.     /*
  98.      * Length structure for KbdStringIn
  99.      */
  100.     typedef struct _STRINGINBUF {
  101.         ULONG  cb;           /* Size of input buffer (was ushort) */
  102.         ULONG  cchIn;        /* Number of bytes read (was ushort) */
  103.     } STRINGINBUF;
  104.     typedef STRINGINBUF * PSTRINGINBUF;
  105.  
  106.     /*
  107.      * Values and layout of hardware ID for KbdGetHWID
  108.      */
  109.     #define KBHWID_UNKNOWN        0x0000
  110.     #define KBHWID_AT             0x0001
  111.     #define KBHWID_ENHANCED       0xab41
  112.     #define KBHWID_SMALL          0xab54
  113.     #define KBHWID_MFIOLD         0xab85
  114.     #define KBHWID_MFI            0xab86
  115.     typedef struct _KBDHWID {
  116.         USHORT cb;           /* Size of buffer           */
  117.         USHORT idKbd;        /* Keyboard ID (KBHWID_)    */
  118.     } KBDHWID;
  119.     typedef KBDHWID  * PKBDHWID;
  120.  
  121.     /*
  122.      * KBDINFO structure, for KbdSetStatus and KbdGetStatus
  123.      */
  124.     typedef struct _KBDINFO {
  125.         USHORT cb;
  126.         USHORT fsMask;
  127.         USHORT chTurnAround;
  128.         USHORT fsInterim;
  129.         USHORT fsState;
  130.     } KBDINFO;
  131.     typedef KBDINFO * PKBDINFO;
  132.  
  133.     /*
  134.      * Mask bits for KBDINFO in KbdSetStatus and KbdGetStatus (fsMask)
  135.      */
  136.     #define KEYBOARD_ECHO_ON                0x0001
  137.     #define KEYBOARD_ECHO_OFF               0x0002
  138.     #define KEYBOARD_BINARY_MODE            0x0004
  139.     #define KEYBOARD_ASCII_MODE             0x0008
  140.     #define KEYBOARD_MODIFY_STATE           0x0010
  141.     #define KEYBOARD_MODIFY_INTERIM         0x0020
  142.     #define KEYBOARD_MODIFY_TURNAROUND      0x0040
  143.     #define KEYBOARD_2B_TURNAROUND          0x0080
  144.     #define KEYBOARD_SHIFT_REPORT           0x0100
  145.  
  146.     /*
  147.      * Status bits for KBDINFO in KbdSetStatus and KbdGetStatus (fsState)
  148.      */
  149.     #ifndef INCL_DOSDEVIOCTL           /* Also defined in bsedev.h */
  150.         #define KBDSTF_RIGHTSHIFT           0x0001
  151.         #define KBDSTF_LEFTSHIFT            0x0002
  152.         #define KBDSTF_CONTROL              0x0004
  153.         #define KBDSTF_ALT                  0x0008
  154.         #define KBDSTF_SCROLLLOCK_ON        0x0010
  155.         #define KBDSTF_NUMLOCK_ON           0x0020
  156.         #define KBDSTF_CAPSLOCK_ON          0x0040
  157.         #define KBDSTF_INSERT_ON            0x0080
  158.         #define KBDSTF_LEFTCONTROL          0x0100
  159.         #define KBDSTF_LEFTALT              0x0200
  160.         #define KBDSTF_RIGHTCONTROL         0x0400
  161.         #define KBDSTF_RIGHTALT             0x0800
  162.         #define KBDSTF_SCROLLLOCK           0x1000
  163.         #define KBDSTF_NUMLOCK              0x2000
  164.         #define KBDSTF_CAPSLOCK             0x4000
  165.         #define KBDSTF_SYSREQ               0x8000
  166.     #endif  /* INCL_DOSDEVIOCTL */
  167.  
  168.    /*
  169.     * Keyboard function prototypes
  170.     */
  171.    APIRET APIENTRY  KbdCharIn(PKBDKEYINFO CharData, ULONG Wait, HKBD hkbd);
  172.  
  173.    APIRET APIENTRY  KbdGetConsole(PVOID Data, PULONG Kind, ULONG Flags,
  174.                     HKBD hkbd);
  175.  
  176.    APIRET APIENTRY  KbdFlushBuffer (HKBD hkbd);
  177.  
  178.    APIRET APIENTRY  KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
  179.  
  180.    APIRET APIENTRY  KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
  181.  
  182.    APIRET APIENTRY  KbdGetLayout(PSZ name, HKBD hkbd);
  183.  
  184.    APIRET APIENTRY  KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
  185.  
  186.    APIRET APIENTRY  KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
  187.  
  188.    APIRET APIENTRY  KbdSetCp (ULONG ulReserved, USHORT pidCP,  HKBD hkbd);
  189.  
  190.    APIRET APIENTRY  KbdSetLayout(PSZ name, HKBD hkbd);
  191.  
  192.    APIRET APIENTRY  KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
  193.  
  194.    APIRET APIENTRY  KbdStringIn (PCH pch, PSTRINGINBUF pchIn, ULONG Flag,
  195.                                      HKBD hkbd);
  196.  
  197.    APIRET APIENTRY  KbdXlate (PKBDKEYINFO pkbdtrans, HKBD hkbd);
  198.  
  199. #endif /* INCL_KBD */
  200.  
  201.  
  202. /*
  203.  *  Video Input Output (Vio) functions
  204.  */
  205. #ifdef INCL_VIO
  206.     /*
  207.      * Vio handles
  208.      */
  209.     typedef unsigned long   HVIO;
  210.     typedef HVIO        *   PHVIO;
  211.  
  212.     /*
  213.      * VioCreatePS format constants
  214.      */
  215.     #define FORMAT_CGA      0x0001
  216.     #define FORMAT_4BYTE    0x0003
  217.  
  218.     /*
  219.      * options for VioQueryFonts
  220.      */
  221.     #define VQF_PUBLIC      0x0001L
  222.     #define VQF_PRIVATE     0x0002L
  223.     #define VQF_ALL         0x0003L
  224.  
  225.     /*
  226.      * Cursor structure for VioSetCurType and VioGetCurType()
  227.      */
  228.     typedef struct _VIOCURSORINFO {
  229.         USHORT   yStart;
  230.         USHORT   cEnd;
  231.         USHORT   cx;
  232.         USHORT   attr;
  233.     } VIOCURSORINFO;
  234.     typedef VIOCURSORINFO * PVIOCURSORINFO;
  235.  
  236.     /*
  237.      * Mode structure for VioSetMode and VioGetMode
  238.      * (field added for 32 bit alignment)
  239.      */
  240.     typedef  struct _VIOMODEINFO     /* viomi */
  241.             {
  242.             USHORT cb;            /* structure length */
  243.             UCHAR  fbType;        /* mode type */
  244.             UCHAR  color;         /* number of colors */
  245.             USHORT col;           /* number of columns */
  246.             USHORT row;           /* number of rows */
  247.             USHORT hres;          /* horizontal size in pels */
  248.             USHORT vres;          /* vertical size in pels */
  249.             UCHAR  fmt_ID;        /* format of attributes */
  250.             UCHAR  attrib;        /* length of attributes */
  251.             USHORT resvd;         /* Reserved   (added field) */
  252.             ULONG  buf_addr;
  253.             ULONG  buf_length;
  254.             ULONG  full_length;
  255.             ULONG  partial_length;
  256.             PCH    ext_data_addr;
  257.             } VIOMODEINFO;
  258.     typedef VIOMODEINFO *PVIOMODEINFO;
  259.  
  260.  
  261.     /*
  262.      * VIOMODEINFO.fbType constants
  263.      */
  264.     #define VGMT_OTHER            1
  265.     #define VGMT_COLOR            1
  266.     #define VGMT_GRAPHICS         2
  267.     #define VGMT_DISABLEBURST     4
  268.     #define VGMT_NOTBIOS          8
  269.  
  270.     /*
  271.      * VIOMODEINFO.color constants
  272.      */
  273.     #define COLORS_2              1
  274.     #define COLORS_4              2
  275.     #define COLORS_16             4
  276.     #define COLORS_256            8
  277.     #define COLORS_64K           16
  278.     #define COLORS_16M           24
  279.  
  280.     /*
  281.      * Return types for VioCheckCharType
  282.      */
  283.     #define VCC_SBCSCHAR          0
  284.     #define VCC_DBCSFULLCHAR      1
  285.     #define VCC_DBCS1STHALF       2
  286.     #define VCC_DBCS2NDHALF       3
  287.  
  288.     /*
  289.      * Values for graphics mode screen synchronization
  290.      */
  291.     #define VSRWI_SAVEANDREDRAW   0
  292.     #define VSRWI_REDRAW          1
  293.  
  294.     #define VSRWN_SAVE            0
  295.     #define VSRWN_REDRAW          1
  296.  
  297.     #define UNDOI_GETOWNER        0
  298.     #define UNDOI_RELEASEOWNER    1
  299.  
  300.     #define UNDOK_ERRORCODE       0
  301.     #define UNDOK_TERMINATE       1
  302.  
  303.     #define LOCKIO_NOWAIT         0
  304.     #define LOCKIO_WAIT           1
  305.  
  306.     #define LOCK_SUCCESS          0
  307.     #define LOCK_FAIL             1
  308.  
  309.     /*
  310.      * Values for VioSetAnsi and VioGetAnsi
  311.      */
  312.     #define ANSI_ON               1
  313.     #define ANSI_OFF              0
  314.  
  315.     /*
  316.      * Values for VioPopup
  317.      */
  318.     #define VMWR_POPUP            0
  319.     #define VMWN_POPUP            0
  320.     #define VP_NOWAIT             0
  321.     #define VP_WAIT               1
  322.     #define VP_OPAQUE             0
  323.     #define VP_TRANSPARENT        2
  324.  
  325.     /*
  326.      * VIOCONFIGINFO.adapter constants
  327.      */
  328.     #define DISPLAY_MONOCHROME    0
  329.     #define DISPLAY_CGA           1
  330.     #define DISPLAY_EGA           2
  331.     #define DISPLAY_VGA           3
  332.     #define DISPLAY_8514A         7
  333.     #define DISPLAY_IAA           8
  334.     #define DISPLAY_XGA           9
  335.  
  336.     /*
  337.      * VIOCONFIGINFO.display constants
  338.      */
  339.     #define MONITOR_MONOCHROME    0
  340.     #define MONITOR_COLOR         1
  341.     #define MONITOR_ENHANCED      2
  342.     #define MONITOR_8503          3
  343.     #define MONITOR_851X_COLOR    4
  344.     #define MONITOR_8514          9
  345.     #define MONITOR_PLASMA       10
  346.     #define MONITOR_8507         11
  347.     #define MONITOR_8515         12
  348.  
  349.  
  350.     /*
  351.      * Configuration structure for VioGetConfig
  352.      * (all fields changed to ULONG)
  353.      */
  354.     typedef  struct _VIOCONFIGINFO {
  355.         ULONG   cb;
  356.         ULONG   adapter;
  357.         ULONG   display;
  358.         ULONG   cbMemory;
  359.         ULONG   Configuration;
  360.         ULONG   VDHVersion;
  361.         ULONG   Flags;
  362.         ULONG   HWBufferSize;
  363.         ULONG   FullSaveSize;
  364.         ULONG   PartSaveSize;
  365.         ULONG   EMAdaptersOFF;
  366.         ULONG   EMDisplaysOFF;
  367.     } VIOCONFIGINFO;
  368.     typedef VIOCONFIGINFO * PVIOCONFIGINFO;
  369.  
  370.     #define VIO_CONFIG_CURRENT    0
  371.     #define VIO_CONFIG_PRIMARY    1
  372.     #define VIO_CONFIG_SECONDARY  2
  373.  
  374.     /*
  375.      *  Structures for VioSetState and VioGetState
  376.      */
  377.     typedef struct _VIOPALSTATE {
  378.         USHORT  cb;
  379.         USHORT  type;
  380.         USHORT  iFirst;
  381.         USHORT  acolor[1];
  382.     } VIOPALSTATE;
  383.     typedef VIOPALSTATE * PVIOPALSTATE;
  384.  
  385.     typedef struct _VIOOVERSCAN {
  386.         USHORT  cb;
  387.         USHORT  type;
  388.         USHORT  color;
  389.     } VIOOVERSCAN;
  390.     typedef VIOOVERSCAN * PVIOOVERSCAN;
  391.  
  392.     typedef struct _VIOINTENSITY {
  393.         USHORT  cb;
  394.         USHORT  type;
  395.         USHORT  fs;
  396.     } VIOINTENSITY;
  397.     typedef VIOINTENSITY * PVIOINTENSITY;
  398.  
  399.     typedef struct _VIOCOLORREG {
  400.         USHORT  cb;
  401.         USHORT  type;
  402.         USHORT  firstcolorreg;
  403.         USHORT  numcolorregs;
  404.         PCH     colorregaddr;
  405.     } VIOCOLORREG;
  406.     typedef VIOCOLORREG * PVIOCOLORREG;
  407.  
  408.     typedef struct _VIOSETULINELOC {
  409.         USHORT  cb;
  410.         USHORT  type;
  411.         USHORT  scanline;
  412.     } VIOSETULINELOC;
  413.     typedef VIOSETULINELOC * PVIOSETULINELOC;
  414.  
  415.     typedef struct _VIOSETTARGET {
  416.         USHORT  cb;
  417.         USHORT  type;
  418.         USHORT  defaultalgorithm;
  419.     } VIOSETTARGET;
  420.     typedef VIOSETTARGET * PVIOSETTARGET;
  421.  
  422.     /*
  423.      * Vio function prototypes
  424.      */
  425.     APIRET APIENTRY  VioAssociate(ULONG hdc, HVIO hvps);
  426.  
  427.     APIRET APIENTRY  VioCheckCharType (PULONG pType, ULONG ulRow,
  428.                                        ULONG ulColumn, HVIO hvio);
  429.  
  430.     APIRET APIENTRY  VioCreateLogFont(PFATTRS pfat, ULONG lcid, PSTR8 pstr8Name,
  431.                                      HVIO hvps);
  432.  
  433.     APIRET APIENTRY  VioCreatePS(PHVIO phvps, ULONG Rows, ULONG Columns,
  434.                                 ULONG Format, ULONG AttrBytes, HVIO hvps);
  435.  
  436.     APIRET APIENTRY  VioDeleteSetId(ULONG lcid, HVIO hvps);
  437.  
  438.     APIRET APIENTRY  VioDestroyPS(HVIO hvps);
  439.  
  440.     APIRET APIENTRY  VioEndPopUp (HVIO hvio);
  441.  
  442.     APIRET APIENTRY  VioGetAnsi (PULONG pfAnsi, HVIO hvio);
  443.  
  444.     APIRET APIENTRY  VioGetBuf    (PULONG pLVB, PULONG pcbLVB, HVIO hvio);
  445.  
  446.     APIRET APIENTRY  VioGetConfig (ULONG ulConfigId, PVIOCONFIGINFO pvioin,
  447.                                        HVIO hvio);
  448.  
  449.     APIRET APIENTRY  VioGetCp (ULONG ulReserved, PUSHORT pIdCodePage, HVIO hvio);
  450.  
  451.     APIRET APIENTRY  VioGetCurPos (PULONG pusRow, PULONG pusColumn, HVIO hvio);
  452.  
  453.     APIRET APIENTRY  VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  454.  
  455.     APIRET APIENTRY  VioGetDeviceCellSize(PULONG Height, PULONG Width,
  456.                                          HVIO hvps);
  457.  
  458.     APIRET APIENTRY  VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  459.  
  460.     APIRET APIENTRY  VioGetOrg(PULONG Row, PULONG Column, HVIO hvps);
  461.  
  462.     APIRET APIENTRY  VioGetState (PVOID pState, HVIO hvio);
  463.  
  464.     APIRET APIENTRY  VioModeUndo (ULONG ulOwnerInd, ULONG ulKillInd,
  465.                                       ULONG ulReserved);
  466.  
  467.     APIRET APIENTRY  VioModeWait (ULONG ulReqType, PULONG pNotifyType,
  468.                                       ULONG ulReserved);
  469.  
  470.     APIRET APIENTRY  VioPopUp (PULONG pfWait, HVIO hvio);
  471.  
  472.     APIRET APIENTRY  VioPrtSc (HVIO hvio);
  473.  
  474.     APIRET APIENTRY  VioPrtScToggle (HVIO hvio);
  475.  
  476.     APIRET APIENTRY  VioQueryFonts(PULONG Remfonts, PFONTMETRICS Metrics,
  477.                                   ULONG MetricsLength, PULONG Fonts,
  478.                                   PSZ Facename, ULONG Options, HVIO hvps);
  479.  
  480.     APIRET APIENTRY  VioQuerySetIds(PULONG lcids, PSTR8 Names,
  481.                                    PULONG Types, ULONG count, HVIO hvps);
  482.  
  483.     APIRET APIENTRY  VioReadCellStr (PCH pchCellStr, PULONG pcb, ULONG ulRow,
  484.                                      ULONG ulColumn, HVIO hvio);
  485.  
  486.     APIRET APIENTRY  VioReadCharStr (PCH pchCellStr, PULONG pcb, ULONG ulRow,
  487.                                      ULONG ulColumn, HVIO hvio);
  488.  
  489.     APIRET APIENTRY  VioSavRedrawUndo (ULONG ulOwnerInd, ULONG ulKillInd,
  490.                                            ULONG ulReserved);
  491.  
  492.     APIRET APIENTRY  VioSavRedrawWait (ULONG ulRedrawInd, PULONG pNotifyType,
  493.                                            ULONG ulReserved);
  494.  
  495.     APIRET APIENTRY  VioScrLock (ULONG fWait, PUCHAR pfNotLocked, HVIO hvio);
  496.  
  497.     #define VioScrollDn VioScrollDown
  498.     APIRET APIENTRY  VioScrollDown (ULONG ulTopRow, ULONG ulLeftCol,
  499.                                   ULONG ulBotRow, ULONG ulRightCol,
  500.                                   ULONG cbLines,  PBYTE pCell, HVIO hvio);
  501.  
  502.     #define VioScrollLf VioScrollLeft
  503.     APIRET APIENTRY  VioScrollLeft (ULONG ulTopRow, ULONG ulLeftCol,
  504.                                   ULONG ulBotRow, ULONG ulRightCol,
  505.                                   ULONG cbCol, PBYTE pCell, HVIO hvio);
  506.  
  507.     #define VioScrollRt VioScrollRight
  508.     APIRET APIENTRY  VioScrollRight (ULONG ulTopRow, ULONG ulLeftCol,
  509.                                   ULONG ulBotRow, ULONG ulRightCol,
  510.                                   ULONG cbCol, PBYTE pCell, HVIO hvio);
  511.  
  512.     APIRET APIENTRY  VioScrollUp (ULONG ulTopRow, ULONG ulLeftCol,
  513.                                   ULONG ulBotRow, ULONG ulRightCol,
  514.                                   ULONG cbLines, PBYTE pCell, HVIO hvio);
  515.  
  516.     APIRET APIENTRY  VioScrUnLock (HVIO hvio);
  517.  
  518.     APIRET APIENTRY  VioSetAnsi (ULONG fAnsi, HVIO hvio);
  519.  
  520.     APIRET APIENTRY  VioSetCp (ULONG ulReserved, USHORT idCodePage, HVIO hvio);
  521.  
  522.     APIRET APIENTRY  VioSetCurPos (ULONG  ulRow,  ULONG  ulColumn,  HVIO hvio);
  523.  
  524.     APIRET APIENTRY  VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  525.  
  526.     APIRET APIENTRY  VioSetDeviceCellSize(ULONG Height, ULONG Width, HVIO hvps);
  527.  
  528.     APIRET APIENTRY  VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  529.  
  530.     APIRET APIENTRY  VioSetOrg(ULONG Row, ULONG Column, HVIO hvps);
  531.  
  532.     APIRET APIENTRY  VioSetState (PVOID pState, HVIO hvio);
  533.  
  534.     APIRET APIENTRY  VioShowBuf (ULONG offLVB, ULONG cb, HVIO hvio);
  535.  
  536.     APIRET APIENTRY  VioShowPS(ULONG Depth, ULONG Width, ULONG Cell, HVIO hvps);
  537.  
  538.     APIRET APIENTRY  VioWrtCellStr (PCH pchCellStr, ULONG cb, ULONG ulRow,
  539.                                     ULONG ulColumn, HVIO hvio);
  540.  
  541.     APIRET  APIENTRY VioWrtCharStr (PCH pchStr, ULONG cb, ULONG ulRow,
  542.                                     ULONG ulColumn, HVIO hvio);
  543.  
  544.     #define VioWrtCharStrAtt VioWrtCharStrAttr
  545.     APIRET APIENTRY  VioWrtCharStrAttr (PCH pch, ULONG cb, ULONG ulRow,
  546.                                        ULONG ulColumn, PBYTE pAttr, HVIO hvio);
  547.  
  548.     APIRET APIENTRY  VioWrtNAttr (PBYTE pAttr, ULONG cb, ULONG ulRow,
  549.                                   ULONG ulColumn, HVIO hvio);
  550.  
  551.     APIRET APIENTRY  VioWrtNCell (PBYTE pCell, ULONG cb, ULONG ulRow,
  552.                                   ULONG ulColumn, HVIO hvio);
  553.  
  554.     APIRET APIENTRY  VioWrtNChar (PCH pchChar, ULONG cb, ULONG ulRow,
  555.                                   ULONG ulColumn, HVIO hvio);
  556.  
  557.     APIRET APIENTRY  VioWrtTTY   (PCH pch, ULONG cb, HVIO hvio);
  558.  
  559. #endif /* INCL_VIO */
  560.  
  561.  
  562. /*
  563.  * Mouse (Mou) functions
  564.  *
  565.  * Notes:
  566.  *     The mouse handle is always required to be zero, as there is no longer
  567.  *     an open an close.
  568.  */
  569. #ifdef INCL_MOU
  570.  
  571.     typedef unsigned long   HMOU;
  572.     typedef HMOU        *   PHMOU;
  573.  
  574.     APIRET APIENTRY  MouFlushQue (HMOU hmou);
  575.  
  576.     #define MHK_BUTTON1                0x0001
  577.     #define MHK_BUTTON2                0x0002
  578.     #define MHK_BUTTON3                0x0004
  579.  
  580.     /*
  581.      * Structure for MouGetPtrPos and MouSetPtrPos
  582.      */
  583.     typedef struct _PTRLOC {
  584.         ULONG  row;               /* was USHORT */
  585.         ULONG  col;               /* was USHORT */
  586.     } PTRLOC;
  587.     typedef PTRLOC * PPTRLOC;
  588.  
  589.     /*
  590.      * structure for MouRemovePtr
  591.      * (field lengths increased)
  592.      */
  593.     typedef struct _NOPTRRECT {
  594.         ULONG  row;
  595.         ULONG  col;
  596.         ULONG  cRow;
  597.         ULONG  cCol;
  598.     } NOPTRRECT;
  599.     typedef NOPTRRECT * PNOPTRRECT;
  600.  
  601.     typedef struct _THRESHOLD {   /* threshold */
  602.         USHORT Length;            /* Length Field            */
  603.         USHORT Level1;            /* First movement level    */
  604.         USHORT Lev1Mult;          /* First level multiplier  */
  605.         USHORT Level2;            /* Second movement level   */
  606.         USHORT lev2Mult;          /* Second level multiplier */
  607.     } THRESHOLD;
  608.     typedef THRESHOLD * PTHRESHOLD;
  609.  
  610.     /*
  611.      * Pointer shape function for MouGetPtrShape and MouSetPtrShape
  612.      */
  613.     typedef struct _PTRSHAPE {
  614.         USHORT cb;                /* Structure length */
  615.         USHORT col;               /* Horizontal size */
  616.         USHORT row;               /* Vertical size */
  617.         USHORT colHot;            /* Horizontal hot spot */
  618.         USHORT rowHot;            /* Vertical hot spot */
  619.     } PTRSHAPE;
  620.     typedef PTRSHAPE * PPTRSHAPE;
  621.  
  622.     /*
  623.      * Device status for MouGetDevStatus and MouSetDevStatus
  624.      */
  625.     #define MOUSE_QUEUEBUSY        0x0001
  626.     #define MOUSE_BLOCKREAD        0x0002
  627.     #define MOUSE_FLUSH            0x0004
  628.     #define MOUSE_UNSUPPORTED_MODE 0x0008
  629.     #define MOUSE_DISABLED         0x0100
  630.     #define MOUSE_MICKEYS          0x0200
  631.  
  632.     /*
  633.      * Wait constants for MouReadEventQue
  634.      */
  635.     #define MOU_NOWAIT             0
  636.     #define MOU_WAIT               1
  637.  
  638.     /*
  639.      * structure for MouReadEventQue()
  640.      * (all fields lengthened)
  641.      */
  642.     typedef  struct _MOUEVENTINFO {
  643.         ULONG  fs;                 /* Mouse state (MOUSE_ ) */
  644.         LONG   row;                /* Horizontal position */
  645.         LONG   col;                /* Vertical position */
  646.         ULONG  time;               /* Timestamp */
  647.     } MOUEVENTINFO;
  648.     typedef MOUEVENTINFO *PMOUEVENTINFO;
  649.  
  650.     /*
  651.      * structure for MouGetNumQueEl()
  652.      * (all fields lengthened)
  653.      */
  654.     typedef struct _MOUQUEINFO {
  655.         ULONG  cEvents;
  656.         ULONG  cmaxEvents;
  657.     } MOUQUEINFO;
  658.     typedef MOUQUEINFO *PMOUQUEINFO;
  659.  
  660.     /*
  661.      * Event mask constants for MouGetEventMask and MouSetEventMask
  662.      */
  663.     #define MOUSE_MOTION                 0x0001
  664.     #define MOUSE_MOTION_WITH_BN1_DOWN   0x0002
  665.     #define MOUSE_BN1_DOWN               0x0004
  666.     #define MOUSE_MOTION_WITH_BN2_DOWN   0x0008
  667.     #define MOUSE_BN2_DOWN               0x0010
  668.     #define MOUSE_MOTION_WITH_BN3_DOWN   0x0020
  669.     #define MOUSE_BN3_DOWN               0x0040
  670.  
  671.     /*
  672.      * Structure for MouGetScaleFact and MouSetScaleFact
  673.      */
  674.     typedef  struct _SCALEFACT {
  675.         ULONG  rowScale;
  676.         ULONG  colScale;
  677.     } SCALEFACT;
  678.     typedef SCALEFACT * PSCALEFACT;
  679.  
  680.     /*
  681.      * Status for MouSetDevStatus
  682.      */
  683.     #define MOU_NODRAW                 0x0001
  684.     #define MOU_DRAW                   0x0000
  685.     #define MOU_MICKEYS                0x0002
  686.     #define MOU_PELS                   0x0000
  687.  
  688.     /*
  689.      * Mou function prototypes
  690.      */
  691. #define MouClose(x)  /* Mouse close is no longer needed */
  692.  
  693.     APIRET APIENTRY  MouDrawPtr (HMOU hmou);
  694.  
  695.     APIRET APIENTRY  MouFlushQue (HMOU hmou);
  696.  
  697.     APIRET APIENTRY  MouGetDevStatus (PULONG  DevStat, HMOU hmou);
  698.  
  699.     APIRET APIENTRY  MouGetEventMask (PULONG  EventMask, HMOU hmou);
  700.  
  701.     APIRET APIENTRY  MouGetNumButtons (PULONG  Buttons, HMOU hmou);
  702.  
  703.     APIRET APIENTRY  MouGetNumMickeys (PULONG  Mickeys, HMOU hmou);
  704.  
  705.     APIRET APIENTRY  MouGetNumQueEl (PMOUQUEINFO QElements, HMOU hmou);
  706.  
  707.     APIRET APIENTRY  MouGetPtrPos (PPTRLOC PtrLoc, HMOU hmou);
  708.  
  709.     APIRET APIENTRY  MouGetPtrShape (PVOID PtrBuf, PPTRSHAPE PtrInfo, HMOU hmou);
  710.  
  711.     APIRET APIENTRY  MouGetScaleFact (PSCALEFACT MouScale, HMOU hmou);
  712.  
  713.     APIRET APIENTRY  MouGetThreshold(PTHRESHOLD Threshold, HMOU hmou);
  714.  
  715. #define MouOpen(x, y) {*(y)=0;}
  716.  
  717.     APIRET APIENTRY  MouReadEventQue (PMOUEVENTINFO EventMask, PULONG Wait,
  718.                                       HMOU hmou);
  719.  
  720.     APIRET APIENTRY  MouRemovePtr (PNOPTRRECT MouseRect, HMOU hmou);
  721.  
  722.     APIRET APIENTRY  MouSetDevStatus (PULONG  DevStat, HMOU hmou);
  723.  
  724.     APIRET APIENTRY  MouSetEventMask (PULONG  EventMask, HMOU hmou);
  725.  
  726.     APIRET APIENTRY  MouSetPtrPos (PPTRLOC PtrLoc, HMOU hmou);
  727.  
  728.     APIRET APIENTRY  MouSetPtrShape (PBYTE PtrBuf, PPTRSHAPE PtrInfo, HMOU hmou);
  729.  
  730.     APIRET APIENTRY  MouSetScaleFact (PSCALEFACT Scale, HMOU hmou);
  731.  
  732.     APIRET APIENTRY  MouSetThreshold(PTHRESHOLD Threshold, HMOU hmou);
  733.  
  734. #endif /* INCL_MOU */
  735.  
  736. #endif /* __BSESUB__ */
  737.