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