home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / conapi.zip / TAU / BOOK / ConCalls.INF (.txt)
OS/2 Help File  |  2000-02-11  |  29KB  |  1,095 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4.                            32-bit Unicode Console API
  5.                                   Users' Guide.
  6.  
  7.   Copyright (c) 2000 Jonathan de Boyne Pollard. All rights reserved worldwide.
  8.  
  9. This is the users' guide for the 32-bit Unicode Console API. 
  10.  
  11. Software licence 
  12.  
  13. This software is copyright in order to protect the good name of the author and 
  14. in order to prevent other people from passing it off as their own and making 
  15. money from it.  The author wants this software to enjoy as wide an audience as 
  16. possible, and also wants you to receive this software as it was originally 
  17. released.  Therefore: 
  18.  
  19. You may archive, store, copy, and distribute this software (which means the 
  20. programs, and any accompanying electronic documentation, helptext, and message 
  21. or data files) in its entire original, unmodified, form for any purpose, 
  22. commercial or otherwise.  In fact you are encouraged to give copies of this 
  23. software to your friends so that they can enjoy it too. 
  24.  
  25. You may make limited modifications to the original distribution archive before 
  26. passing it on to others, to convert it to another archive format (extended 
  27. attributes and long filenames must be preserved, however), or to add archive 
  28. comments in order to advertise BBSes and the like (a FILE_ID.DIZ description 
  29. file is already supplied in the distribution archive, however). 
  30.  
  31. You may not pass this software off as your own, attempt to modify it, or 
  32. obscure or remove the copyright notices or this software licence in any way. 
  33. Nor may you attempt to make money from distributing it to others apart from 
  34. media costs. 
  35.  
  36. You may not  (and this part is especially true for those madly litigious 
  37. Americans) sue the author or anybody else in respect of any supposed guarantee. 
  38. You receive this software exactly "as is". There's no guarantee whatsoever. 
  39. The author takes pride in his work, and naturally wants the software to behave 
  40. well and do its job; but he isn't prepared (certainly not for software that you 
  41. are getting entirely for free) to make any sort of guarantee of merchantability 
  42. or fitness for any purpose. 
  43.  
  44. Bug fixes and enhancements to the software will occur entirely at the whim of 
  45. the author, as and when he has spare time to write them.  If you want a 
  46. specific modification to the software, please remember that the author is a 
  47. professional programmer.  You can always pay him to write it! 
  48.  
  49. The source code for the software is the product of a lot of time, skill, and 
  50. effort.  It is not given away for free.  If you need to have access to the 
  51. source code, approach the author about paying for a source code licence. 
  52.  
  53. Technical support for the installation or use of the software consumes time and 
  54. effort.  If you need such support, approach the author about paying for a 
  55. support contract. 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ 2. Distributing the runtime DLLs ΓòÉΓòÉΓòÉ
  59.  
  60. IBM OS/2 does not contain the DLLs necessary for programs that use the 32-bit 
  61. Unicode Console API.  If one wishes to run such an application on IBM OS/2, the 
  62. DLLs must be installed. 
  63.  
  64. You may bundle the necessary Console API DLLs for IBM OS/2 along with your 
  65. application.  If you do so, your application's installation program must ensure 
  66. that it does not overwrite any DLLs with older versions. 
  67.  
  68. However, it is suggested that instead you instruct your users to obtain 
  69. CONRT.ZIP or CONRT.RAR from a central source, such as your favourite site for 
  70. OS/2 files, and install it beforehand.  This will avoid both the need for 
  71. bundling the DLLs with your application, and the need to worry about installing 
  72. them properly when your application is installed. 
  73.  
  74. The CONRT package contains versions of the DLLs that are suitable for 32-bit 
  75. IBM OS/2 (i.e. versions 2.0.1 upwards).  Full instructions explaining to end 
  76. users how to install the DLLs are supplied in the "Read Me" file that is 
  77. included within the package. 
  78.  
  79. If your favourite site for OS/2 files does not include CONRT.ZIP or CONRT.RAR, 
  80. they are provided along with the 32-bit Unicode Console API developers' toolkit 
  81. so that you can upload them.  They must be uploaded exactly as provided, with 
  82. no modifications. 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 3. About the console API ΓòÉΓòÉΓòÉ
  86.  
  87.  
  88. ΓòÉΓòÉΓòÉ 3.1. Consoles and Unicode ΓòÉΓòÉΓòÉ
  89.  
  90. The Console API functions all operate in terms of Unicode. 
  91.  
  92. The text-mode screen buffer of a console buffer object comprises an array of 
  93. cells.  Each cell comprises an attribute value and a Unicode character. When 
  94. the text-mode screen buffer is displayed on the display, the Unicode characters 
  95. are converted to the display character set.  The display character set is 
  96. determined by the current output code page of the console buffer object. 
  97.  
  98.  
  99. ΓòÉΓòÉΓòÉ 3.2. Console modes ΓòÉΓòÉΓòÉ
  100.  
  101. Various behavioural aspects of the "glass TTY" (a.k.a.  "high level") interface 
  102. to consoles, can be controlled by setting console mode flags. 
  103.  
  104. Note:  Console mode flags have no effect on IBM OS/2. 
  105.  
  106. These modes affect "high level" output: 
  107.  
  108.  DISABLE_ANSI_CSI_SEQUENCES 
  109.            If this mode is unset, ANSI CSI sequences are recognised and 
  110.            processed. If this mode is set, ANSI CSI sequences are not 
  111.            recognised, and are displayed as a sequence of appropriate glyphs 
  112.            instead. 
  113.  
  114.  DISABLE_ANSI_CONTROL_CHARS 
  115.            If this mode is unset, the ANSI control characters BS, TAB, FF, LF, 
  116.            CR, and VT will cause the appropriate cursor motions and screen 
  117.            changes.  If this mode is set, those ANSI control characters will 
  118.            not be treated specially, and will display the appropriate glyphs. 
  119.  
  120.  DISABLE_WRAP_AT_EOL 
  121.            If this mode is unset, output will wrap around to the next line on 
  122.            the screen once it reaches the end of a line, scrolling the screen 
  123.            up one line if it reaches the last line on the screen, and the BS 
  124.            ANSI control character (if DISABLE_ANSI_CONTROL_CHARS is not set) 
  125.            will wrap around to the previous line on the screen if the cursor is 
  126.            at the beginning of a line. 
  127.  
  128.  ENABLE_UTF8_OUTPUT 
  129.            If this mode is unset, characters written to the output are treated 
  130.            as single-byte characters and translated to Unicode using the 
  131.            process' current code page.  If this mode is set, characters written 
  132.            to the output are expected to form multi-byte UTF8 sequences that 
  133.            map onto Unicode characters, and the process' current code page is 
  134.            ignored. 
  135.  
  136.  These modes affect "high level" input: 
  137.  
  138.  DISABLE_EDITING_KEYS 
  139.            If this mode is unset, editing keys such as BACKSPACE will cause the 
  140.            appropriate actions in the line buffer.  If this mode is set, 
  141.            editing keys will be treated no differently to all other keys.  If 
  142.            line input is being echoed and this mode is unset, then ANSI control 
  143.            characters will be displayed in order to display the editing 
  144.            operation, and it is recommended that the output console buffer thus 
  145.            not have DISABLE_ANSI_CONTROL_CHARS set. 
  146.  
  147.  DISABLE_LINE_INPUT 
  148.            If this mode is unset, a call to read the console will not return 
  149.            until the ENTER key is pressed, and the caller's supplied buffer 
  150.            will be filled with characters from the input line.  If this mode is 
  151.            set, the call will return when no more keypresses are immediately 
  152.            available, and the ENTER key will not be treated specially. 
  153.  
  154.  DISABLE_LINE_INPUT_ECHO 
  155.            If this mode is unset, line input (which itself will only happen if 
  156.            DISABLE_LINE_INPUT is unset) will be echoed to the output console 
  157.            buffer. If this mode is set, line input will not be echoed. 
  158.  
  159.  
  160. ΓòÉΓòÉΓòÉ 4. Console API Reference ΓòÉΓòÉΓòÉ
  161.  
  162.  
  163. ΓòÉΓòÉΓòÉ 4.1. Functions ΓòÉΓòÉΓòÉ
  164.  
  165. All of the Console API functions are declared when the macro INCL_CONSOLE is 
  166. defined prior to the first inclusion of the <os2.h> header.  Defining the 
  167. INCL_BASE macro will implicitly cause the INCL_CONSOLE macro to be defined. 
  168.  
  169. To link an application that uses the Console API, use the CONCALLS.LIB import 
  170. library. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 4.1.1. DosWriteConsoleOutputCellStr ΓòÉΓòÉΓòÉ
  174.  
  175. C++ language function declaration 
  176.  
  177. APIRET APIENTRY DosWriteConsoleOutputCellStr ( HFILE Handle, const CONSOLE_CELL * PtrCellStr, size_t Cells, size_t Row, size_t Col ) ;
  178.  
  179. Parameters 
  180.  
  181.  Handle         The file handle of the console buffer or CON device. The handle 
  182.                 should be 1 on IBM OS/2 
  183.  
  184.  PtrCellStr     A pointer to an array of character/attribute cells. 
  185.  
  186.  Cells          The number of cells to modify. 
  187.  
  188.  Row            The starting row position. 
  189.  
  190.  Col            The starting column position. 
  191.  
  192.  Return value 
  193.  
  194.  An OS/2 system error code. 
  195.  
  196.  Remarks 
  197.  
  198.  
  199. ΓòÉΓòÉΓòÉ 4.1.2. DosWriteConsoleOutputCharStr ΓòÉΓòÉΓòÉ
  200.  
  201. C++ language function declaration 
  202.  
  203. APIRET APIENTRY DosWriteConsoleOutputCharStr ( HFILE Handle, const CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col ) ;
  204.  
  205. Parameters 
  206.  
  207.  Handle         The file handle of the console buffer or CON device. The handle 
  208.                 should be 1 on IBM OS/2 
  209.  
  210.  PtrCharStr     A pointer to an array of characters. 
  211.  
  212.  Chars          The number of characters to modify. 
  213.  
  214.  Row            The starting row position. 
  215.  
  216.  Col            The starting column position. 
  217.  
  218.  Return value 
  219.  
  220.  An OS/2 system error code. 
  221.  
  222.  Remarks 
  223.  
  224.  
  225. ΓòÉΓòÉΓòÉ 4.1.3. DosWriteConsoleOutputAttrStr ΓòÉΓòÉΓòÉ
  226.  
  227. C++ language function declaration 
  228.  
  229. APIRET APIENTRY DosWriteConsoleOutputAttrStr ( HFILE Handle, const unsigned short * PtrAttrStr, size_t Attrs, size_t Row, size_t Col ) ;
  230.  
  231. Parameters 
  232.  
  233.  Handle         The file handle of the console buffer or CON device. The handle 
  234.                 should be 1 on IBM OS/2 
  235.  
  236.  PtrAttrStr     A pointer to an array of attributes. 
  237.  
  238.  Attrs          The number of attributes to modify. 
  239.  
  240.  Row            The starting row position. 
  241.  
  242.  Col            The starting column position. 
  243.  
  244.  Return value 
  245.  
  246.  An OS/2 system error code. 
  247.  
  248.  Remarks 
  249.  
  250.  
  251. ΓòÉΓòÉΓòÉ 4.1.4. DosWriteConsoleOutputCharStrAttr ΓòÉΓòÉΓòÉ
  252.  
  253. C++ language function declaration 
  254.  
  255. APIRET APIENTRY DosWriteConsoleOutputCharStrAttr ( HFILE Handle, const CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col, unsigned char Attr ) ;
  256.  
  257. Parameters 
  258.  
  259.  Handle         The file handle of the console buffer or CON device. The handle 
  260.                 should be 1 on IBM OS/2 
  261.  
  262.  PtrCharStr     A pointer to an array of characters. 
  263.  
  264.  Chars          The number of characters to modify. 
  265.  
  266.  Row            The starting row position. 
  267.  
  268.  Col            The starting column position. 
  269.  
  270.  Attr           The attribute to use for all characters. 
  271.  
  272.  Return value 
  273.  
  274.  An OS/2 system error code. 
  275.  
  276.  Remarks 
  277.  
  278.  
  279. ΓòÉΓòÉΓòÉ 4.1.5. DosWriteConsoleOutputNCell ΓòÉΓòÉΓòÉ
  280.  
  281. C++ language function declaration 
  282.  
  283. APIRET APIENTRY DosWriteConsoleOutputNCell ( HFILE Handle, const CONSOLE_CELL & Cell, size_t Cells, size_t Row, size_t Col ) ;
  284.  
  285. Parameters 
  286.  
  287.  Handle         The file handle of the console buffer or CON device. The handle 
  288.                 should be 1 on IBM OS/2 
  289.  
  290.  Cell           The character/attribute cell to write. 
  291.  
  292.  Cells          The number of cells to modify. 
  293.  
  294.  Row            The starting row position. 
  295.  
  296.  Col            The starting column position. 
  297.  
  298.  Return value 
  299.  
  300.  An OS/2 system error code. 
  301.  
  302.  Remarks 
  303.  
  304.  
  305. ΓòÉΓòÉΓòÉ 4.1.6. DosWriteConsoleOutputNChar ΓòÉΓòÉΓòÉ
  306.  
  307. C++ language function declaration 
  308.  
  309. APIRET APIENTRY DosWriteConsoleOutputNChar ( HFILE Handle, CONSOLE_UNICHAR Char, size_t Chars, size_t Row, size_t Col ) ;
  310.  
  311. Parameters 
  312.  
  313.  Handle         The file handle of the console buffer or CON device. The handle 
  314.                 should be 1 on IBM OS/2 
  315.  
  316.  Char           The character to write. 
  317.  
  318.  Chars          The number of characters to modify. 
  319.  
  320.  Row            The starting row position. 
  321.  
  322.  Col            The starting column position. 
  323.  
  324.  Return value 
  325.  
  326.  An OS/2 system error code. 
  327.  
  328.  Remarks 
  329.  
  330.  
  331. ΓòÉΓòÉΓòÉ 4.1.7. DosWriteConsoleOutputNAttr ΓòÉΓòÉΓòÉ
  332.  
  333. C++ language function declaration 
  334.  
  335. APIRET APIENTRY DosWriteConsoleOutputNAttr ( HFILE Handle, unsigned char Attr, size_t Attrs, size_t Row, size_t Col ) ;
  336.  
  337. Parameters 
  338.  
  339.  Handle         The file handle of the console buffer or CON device. The handle 
  340.                 should be 1 on IBM OS/2 
  341.  
  342.  Attr           The attribute to write. 
  343.  
  344.  Attrs          The number of attributes to modify. 
  345.  
  346.  Row            The starting row position. 
  347.  
  348.  Col            The starting column position. 
  349.  
  350.  Return value 
  351.  
  352.  An OS/2 system error code. 
  353.  
  354.  Remarks 
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ 4.1.8. DosReadConsoleOutputCellStr ΓòÉΓòÉΓòÉ
  358.  
  359. C++ language function declaration 
  360.  
  361. APIRET APIENTRY DosReadConsoleOutputCellStr ( HFILE Handle, CONSOLE_CELL * PtrCellStr, size_t Cells, size_t Row, size_t Col ) ;
  362.  
  363. Parameters 
  364.  
  365.  Handle         The file handle of the console buffer or CON device. The handle 
  366.                 should be 1 on IBM OS/2 
  367.  
  368.  PtrCellStr     A pointer to an array of character/attribute cells. 
  369.  
  370.  Cells          The number of cells to query. 
  371.  
  372.  Row            The starting row position. 
  373.  
  374.  Col            The starting column position. 
  375.  
  376.  Return value 
  377.  
  378.  An OS/2 system error code. 
  379.  
  380.  Remarks 
  381.  
  382.  
  383. ΓòÉΓòÉΓòÉ 4.1.9. DosReadConsoleOutputCharStr ΓòÉΓòÉΓòÉ
  384.  
  385. C++ language function declaration 
  386.  
  387. APIRET APIENTRY DosReadConsoleOutputCharStr ( HFILE Handle, CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col ) ;
  388.  
  389. Parameters 
  390.  
  391.  Handle         The file handle of the console buffer or CON device. The handle 
  392.                 should be 1 on IBM OS/2 
  393.  
  394.  PtrCharStr     A pointer to an array of characters. 
  395.  
  396.  Chars          The number of characters to query. 
  397.  
  398.  Row            The starting row position. 
  399.  
  400.  Col            The starting column position. 
  401.  
  402.  Return value 
  403.  
  404.  An OS/2 system error code. 
  405.  
  406.  Remarks 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 4.1.10. DosReadConsoleOutputAttrStr ΓòÉΓòÉΓòÉ
  410.  
  411. C++ language function declaration 
  412.  
  413. APIRET APIENTRY DosReadConsoleOutputAttrStr ( HFILE Handle, unsigned short * PtrAttrStr, size_t Attrs, size_t Row, size_t Col ) ;
  414.  
  415. Parameters 
  416.  
  417.  Handle         The file handle of the console buffer or CON device. The handle 
  418.                 should be 1 on IBM OS/2 
  419.  
  420.  PtrAttrStr     A pointer to an array of attributes. 
  421.  
  422.  Attrs          The number of attributes to query. 
  423.  
  424.  Row            The starting row position. 
  425.  
  426.  Col            The starting column position. 
  427.  
  428.  Return value 
  429.  
  430.  An OS/2 system error code. 
  431.  
  432.  Remarks 
  433.  
  434.  
  435. ΓòÉΓòÉΓòÉ 4.1.11. DosSetConsoleCursorPos ΓòÉΓòÉΓòÉ
  436.  
  437. C++ language function declaration 
  438.  
  439. APIRET APIENTRY DosSetConsoleCursorPos ( HFILE Handle, size_t Row, size_t Col ) ;
  440.  
  441. Parameters 
  442.  
  443.  Handle         The file handle of the console buffer or CON device. The handle 
  444.                 should be 1 on IBM OS/2 
  445.  
  446.  Row            The new cursor row position. 
  447.  
  448.  Col            The new cursor column position. 
  449.  
  450.  Return value 
  451.  
  452.  An OS/2 system error code. 
  453.  
  454.  Remarks 
  455.  
  456.  Use DosSetConsoleCursorSize to make the cursor invisible. 
  457.  
  458.  
  459. ΓòÉΓòÉΓòÉ 4.1.12. DosQueryConsoleCursorPos ΓòÉΓòÉΓòÉ
  460.  
  461. C++ language function declaration 
  462.  
  463. APIRET APIENTRY DosQueryConsoleCursorPos ( HFILE Handle, size_t & Row, size_t & Col ) ;
  464.  
  465. Parameters 
  466.  
  467.  Handle         The file handle of the console buffer or CON device. The handle 
  468.                 should be 1 on IBM OS/2 
  469.  
  470.  Row            A reference to a variable wherein is stored the current cursor 
  471.                 row position. 
  472.  
  473.  Col            A reference to a variable wherein is stored the current cursor 
  474.                 column position. 
  475.  
  476.  Return value 
  477.  
  478.  An OS/2 system error code. 
  479.  
  480.  Remarks 
  481.  
  482.  
  483. ΓòÉΓòÉΓòÉ 4.1.13. DosSetConsoleSize ΓòÉΓòÉΓòÉ
  484.  
  485. C++ language function declaration 
  486.  
  487. APIRET APIENTRY DosSetConsoleSize ( HFILE Handle, size_t Rows, size_t Cols ) ;
  488.  
  489. Parameters 
  490.  
  491.  Handle         The file handle of the console buffer or CON device. The handle 
  492.                 should be 1 on IBM OS/2 
  493.  
  494.  Rows           The new size in rows. 
  495.  
  496.  Cols           The new size in columns. 
  497.  
  498.  Return value 
  499.  
  500.  An OS/2 system error code. 
  501.  
  502.  Remarks 
  503.  
  504.  
  505. ΓòÉΓòÉΓòÉ 4.1.14. DosQueryConsoleSize ΓòÉΓòÉΓòÉ
  506.  
  507. C++ language function declaration 
  508.  
  509. APIRET APIENTRY DosQueryConsoleSize ( HFILE Handle, size_t & Row, size_t & Col ) ;
  510.  
  511. Parameters 
  512.  
  513.  Handle         The file handle of the console buffer or CON device. The handle 
  514.                 should be 1 on IBM OS/2 
  515.  
  516.  Rows           A reference to a variable wherein is stored the current size in 
  517.                 rows. 
  518.  
  519.  Cols           A reference to a variable wherein is stored the current size in 
  520.                 columns. 
  521.  
  522.  Return value 
  523.  
  524.  An OS/2 system error code. 
  525.  
  526.  Remarks 
  527.  
  528.  On IBM OS/2, the available full-screen console sizes are determined by the 
  529.  currently configured Base Video Handler (which can be found by inspecting the 
  530.  value of the VIDEO_DEVICES environment variable).  The range of available 
  531.  console sizes will vary from driver to driver.  Most drivers will support 12, 
  532.  24, 25, 28, 30, 40, 48, 50, or 60 rows; and 40 or 80 columns. 
  533.  
  534.  
  535. ΓòÉΓòÉΓòÉ 4.1.15. DosSetConsoleInputFocus ΓòÉΓòÉΓòÉ
  536.  
  537. C++ language function declaration 
  538.  
  539. APIRET APIENTRY DosSetConsoleInputFocus ( HFILE Handle ) ;
  540.  
  541. Parameters 
  542.  
  543.  Handle         The file handle of the console buffer or CON device. The handle 
  544.                 should be 0 on IBM OS/2 
  545.  
  546.  Return value 
  547.  
  548.  An OS/2 system error code. 
  549.  
  550.  Note:  This call returns a "not implemented" error on IBM OS/2. 
  551.  
  552.  Remarks 
  553.  
  554.  
  555. ΓòÉΓòÉΓòÉ 4.1.16. DosSetConsoleOutputFocus ΓòÉΓòÉΓòÉ
  556.  
  557. C++ language function declaration 
  558.  
  559. APIRET APIENTRY DosSetConsoleOutputFocus ( HFILE Handle ) ;
  560.  
  561. Parameters 
  562.  
  563.  Handle         The file handle of the console buffer or CON device. The handle 
  564.                 should be 1 on IBM OS/2 
  565.  
  566.  Return value 
  567.  
  568.  An OS/2 system error code. 
  569.  
  570.  Note:  This call returns a "not implemented" error on IBM OS/2. 
  571.  
  572.  Remarks 
  573.  
  574.  
  575. ΓòÉΓòÉΓòÉ 4.1.17. DosSetConsoleMode ΓòÉΓòÉΓòÉ
  576.  
  577. C++ language function declaration 
  578.  
  579. APIRET APIENTRY DosSetConsoleMode ( HFILE Handle, ULONG Flags ) ;
  580.  
  581. Parameters 
  582.  
  583.  Handle         The file handle of the console buffer or CON device. The handle 
  584.                 should be 1 on IBM OS/2 
  585.  
  586.  Flags          The new mode flags. 
  587.  
  588.  Return value 
  589.  
  590.  An OS/2 system error code. 
  591.  
  592.  Remarks 
  593.  
  594.  
  595. ΓòÉΓòÉΓòÉ 4.1.18. DosQueryConsoleMode ΓòÉΓòÉΓòÉ
  596.  
  597. C++ language function declaration 
  598.  
  599. APIRET APIENTRY DosQueryConsoleMode ( HFILE Handle, ULONG & Flags ) ;
  600.  
  601. Parameters 
  602.  
  603.  Handle         The file handle of the console buffer or CON device. The handle 
  604.                 should be 1 on IBM OS/2 
  605.  
  606.  Flags          A reference to a variable wherein is stored the current mode 
  607.                 flags. 
  608.  
  609.  Return value 
  610.  
  611.  An OS/2 system error code. 
  612.  
  613.  Remarks 
  614.  
  615.  
  616. ΓòÉΓòÉΓòÉ 4.1.19. DosSetConsoleOutputAttr ΓòÉΓòÉΓòÉ
  617.  
  618. C++ language function declaration 
  619.  
  620. APIRET APIENTRY DosSetConsoleOutputAttr ( HFILE Handle, unsigned char OutputAttr, unsigned char ScrollAttr ) ;
  621.  
  622. Parameters 
  623.  
  624.  Handle         The file handle of the console buffer or CON device. The handle 
  625.                 should be 1 on IBM OS/2 
  626.  
  627.  OutputAttr     The attribute to use for any printable characters generated 
  628.                 during tty-style text output. 
  629.  
  630.  ScrollAttr     The attribute to use for any scrolling that occurs during 
  631.                 tty-style text output. 
  632.  
  633.  Return value 
  634.  
  635.  An OS/2 system error code. 
  636.  
  637.  Remarks 
  638.  
  639.  
  640. ΓòÉΓòÉΓòÉ 4.1.20. DosScrollConsoleDown ΓòÉΓòÉΓòÉ
  641.  
  642. C++ language function declaration 
  643.  
  644. APIRET APIENTRY DosScrollConsoleDown ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ;
  645.  
  646. Parameters 
  647.  
  648.  Handle         The file handle of the console buffer or CON device. The handle 
  649.                 should be 1 on IBM OS/2 
  650.  
  651.  Top            The topmost row of the scrolled rectangle. 
  652.  
  653.  Left           The leftmost column of the scrolled rectangle. 
  654.  
  655.  Height         The height of the scrolled rectangle in characters. 
  656.  
  657.  Width          The width of the scrolled rectangle in characters. 
  658.  
  659.  Delta          The number of rows to scroll. 
  660.  
  661.  Space          The character/attribute value to fill empty cells with. 
  662.  
  663.  Return value 
  664.  
  665.  An OS/2 system error code. 
  666.  
  667.  Remarks 
  668.  
  669.  The scrolled rectangle is silently limited to the actual size of the screen. 
  670.  This allows -1UL to be used for the width and height parameters to mean "to 
  671.  the end of the screen". 
  672.  
  673.  
  674. ΓòÉΓòÉΓòÉ 4.1.21. DosScrollConsoleUp ΓòÉΓòÉΓòÉ
  675.  
  676. C++ language function declaration 
  677.  
  678. APIRET APIENTRY DosScrollConsoleUp ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ;
  679.  
  680. Parameters 
  681.  
  682.  Handle         The file handle of the console buffer or CON device. The handle 
  683.                 should be 1 on IBM OS/2 
  684.  
  685.  Top            The topmost row of the scrolled rectangle. 
  686.  
  687.  Left           The leftmost column of the scrolled rectangle. 
  688.  
  689.  Height         The height of the scrolled rectangle in characters. 
  690.  
  691.  Width          The width of the scrolled rectangle in characters. 
  692.  
  693.  Delta          The number of rows to scroll. 
  694.  
  695.  Space          The character/attribute value to fill empty cells with. 
  696.  
  697.  Return value 
  698.  
  699.  An OS/2 system error code. 
  700.  
  701.  Remarks 
  702.  
  703.  The scrolled rectangle is silently limited to the actual size of the screen. 
  704.  This allows -1UL to be used for the width and height parameters to mean "to 
  705.  the end of the screen". 
  706.  
  707.  
  708. ΓòÉΓòÉΓòÉ 4.1.22. DosScrollConsoleLeft ΓòÉΓòÉΓòÉ
  709.  
  710. C++ language function declaration 
  711.  
  712. APIRET APIENTRY DosScrollConsoleLeft ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ;
  713.  
  714. Parameters 
  715.  
  716.  Handle         The file handle of the console buffer or CON device. The handle 
  717.                 should be 1 on IBM OS/2 
  718.  
  719.  Top            The topmost row of the scrolled rectangle. 
  720.  
  721.  Left           The leftmost column of the scrolled rectangle. 
  722.  
  723.  Height         The height of the scrolled rectangle in characters. 
  724.  
  725.  Width          The width of the scrolled rectangle in characters. 
  726.  
  727.  Delta          The number of columns to scroll. 
  728.  
  729.  Space          The character/attribute value to fill empty cells with. 
  730.  
  731.  Return value 
  732.  
  733.  An OS/2 system error code. 
  734.  
  735.  Remarks 
  736.  
  737.  The scrolled rectangle is silently limited to the actual size of the screen. 
  738.  This allows -1UL to be used for the width and height parameters to mean "to 
  739.  the end of the screen". 
  740.  
  741.  
  742. ΓòÉΓòÉΓòÉ 4.1.23. DosScrollConsoleRight ΓòÉΓòÉΓòÉ
  743.  
  744. C++ language function declaration 
  745.  
  746. APIRET APIENTRY DosScrollConsoleRight ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ;
  747.  
  748. Parameters 
  749.  
  750.  Handle         The file handle of the console buffer or CON device. The handle 
  751.                 should be 1 on IBM OS/2 
  752.  
  753.  Top            The topmost row of the scrolled rectangle. 
  754.  
  755.  Left           The leftmost column of the scrolled rectangle. 
  756.  
  757.  Height         The height of the scrolled rectangle in characters. 
  758.  
  759.  Width          The width of the scrolled rectangle in characters. 
  760.  
  761.  Delta          The number of columns to scroll. 
  762.  
  763.  Space          The character/attribute value to fill empty cells with. 
  764.  
  765.  Return value 
  766.  
  767.  An OS/2 system error code. 
  768.  
  769.  Remarks 
  770.  
  771.  The scrolled rectangle is silently limited to the actual size of the screen. 
  772.  This allows -1UL to be used for the width and height parameters to mean "to 
  773.  the end of the screen". 
  774.  
  775.  
  776. ΓòÉΓòÉΓòÉ 4.1.24. DosSetConsoleCursorSize ΓòÉΓòÉΓòÉ
  777.  
  778. C++ language function declaration 
  779.  
  780. APIRET APIENTRY DosSetConsoleCursorSize ( HFILE Handle, unsigned int PercentStart, unsigned int PercentEnd, BOOL Visible ) ;
  781.  
  782. Parameters 
  783.  
  784.  Handle         The file handle of the console buffer or CON device. The handle 
  785.                 should be 1 on IBM OS/2 
  786.  
  787.  PercentStart   The percentage of the cell height of the cursor start line. 
  788.  
  789.  PercentEnd     The percentage of the cell height of the cursor end line. 
  790.  
  791.  Visible        The new cursor visibility status. 
  792.  
  793.  Return value 
  794.  
  795.  An OS/2 system error code. 
  796.  
  797.  Remarks 
  798.  
  799.  
  800. ΓòÉΓòÉΓòÉ 4.1.25. DosQueryConsoleCursorSize ΓòÉΓòÉΓòÉ
  801.  
  802. C++ language function declaration 
  803.  
  804. APIRET APIENTRY DosQueryConsoleCursorSize ( HFILE Handle, unsigned int & PercentStart, unsigned int & PercentEnd, BOOL & Visible ) ;
  805.  
  806. Parameters 
  807.  
  808.  Handle         The file handle of the console buffer or CON device. The handle 
  809.                 should be 1 on IBM OS/2 
  810.  
  811.  PercentStart   A reference to a variable wherein is stored the percentage of 
  812.                 the cell height of the cursor start line. 
  813.  
  814.  PercentEnd     A reference to a variable wherein is stored the percentage of 
  815.                 the cell height of the cursor end line. 
  816.  
  817.  Visible        A reference to a variable wherein is stored the current cursor 
  818.                 visibility status. 
  819.  
  820.  Return value 
  821.  
  822.  An OS/2 system error code. 
  823.  
  824.  Remarks 
  825.  
  826.  
  827. ΓòÉΓòÉΓòÉ 4.1.26. DosSetConsoleShiftState ΓòÉΓòÉΓòÉ
  828.  
  829. C++ language function declaration 
  830.  
  831. APIRET APIENTRY DosSetConsoleShiftState ( HFILE Handle, ULONG ShiftState ) ;
  832.  
  833. Parameters 
  834.  
  835.  Handle         The file handle of the console buffer or CON device. The handle 
  836.                 should be 0 on IBM OS/2 
  837.  
  838.  ShiftState     The new console keyboard shift state. 
  839.  
  840.  Return value 
  841.  
  842.  An OS/2 system error code. 
  843.  
  844.  Remarks 
  845.  
  846.  IBM OS/2 will ignore attempts to set the shift state flags for the "Windows" 
  847.  keys or the "fake CTRL" key to the pressed state. 
  848.  
  849.  IBM OS/2 will also ignore attempts to modify the shift state in a windowed 
  850.  console. 
  851.  
  852.  
  853. ΓòÉΓòÉΓòÉ 4.1.27. DosQueryConsoleShiftState ΓòÉΓòÉΓòÉ
  854.  
  855. C++ language function declaration 
  856.  
  857. APIRET APIENTRY DosQueryConsoleShiftState ( HFILE Handle, ULONG & ShiftState ) ;
  858.  
  859. Parameters 
  860.  
  861.  Handle         The file handle of the console buffer or CON device. The handle 
  862.                 should be 0 on IBM OS/2 
  863.  
  864.  ShiftState     A reference to a variable wherein is stored the current 
  865.                 keyboard shift state. 
  866.  
  867.  Return value 
  868.  
  869.  An OS/2 system error code. 
  870.  
  871.  Remarks 
  872.  
  873.  IBM OS/2 does not support the shift state flags for the "Windows" keys or the 
  874.  "fake CTRL" key, and will always report them as not depressed. 
  875.  
  876.  
  877. ΓòÉΓòÉΓòÉ 4.1.28. DosQueryMaximumConsoleSize ΓòÉΓòÉΓòÉ
  878.  
  879. C++ language function declaration 
  880.  
  881. APIRET APIENTRY DosQueryMaximumConsoleSize ( HFILE Handle, size_t & Rows, size_t & Cols ) ;
  882.  
  883. Parameters 
  884.  
  885.  Handle         The file handle of the console buffer or CON device. The handle 
  886.                 should be 1 on IBM OS/2 
  887.  
  888.  Rows           A reference to a variable wherein is stored the maximum number 
  889.                 of rows that the console may have. 
  890.  
  891.  Cols           A reference to a variable wherein is stored the maximum number 
  892.                 of columns that the console may have. 
  893.  
  894.  Return value 
  895.  
  896.  An OS/2 system error code. 
  897.  
  898.  Remarks 
  899.  
  900.  On IBM OS/2, the range of available full-screen console sizes is not available 
  901.  from the Base Video Handler, so fixed values are returned. 
  902.  
  903.  
  904. ΓòÉΓòÉΓòÉ 4.1.29. DosSetConsoleOutputCodePage ΓòÉΓòÉΓòÉ
  905.  
  906. C++ language function declaration 
  907.  
  908. APIRET APIENTRY DosSetConsoleOutputCodePage ( HFILE Handle, unsigned int CodePage ) ;
  909.  
  910. Parameters 
  911.  
  912.  Handle         The file handle of the console buffer or CON device. The handle 
  913.                 should be 1 on IBM OS/2 
  914.  
  915.  CodePage       The new code page to use for console output. 
  916.  
  917.  Return value 
  918.  
  919.  An OS/2 system error code. 
  920.  
  921.  Remarks 
  922.  
  923.  The output code page determines what subset of Unicode the console can 
  924.  actually display.  Different code pages represent different subsets. Unicode 
  925.  characters not in the currently displayable subset will be displayed as a 
  926.  "default" character. 
  927.  
  928.  
  929. ΓòÉΓòÉΓòÉ 4.1.30. DosQueryConsoleOutputCodePage ΓòÉΓòÉΓòÉ
  930.  
  931. C++ language function declaration 
  932.  
  933. APIRET APIENTRY DosQueryConsoleOutputCodePage ( HFILE Handle, unsigned int & CodePage ) ;
  934.  
  935. Parameters 
  936.  
  937.  Handle         The file handle of the console buffer or CON device. The handle 
  938.                 should be 1 on IBM OS/2 
  939.  
  940.  CodePage       A reference to a variable wherein is stored the current console 
  941.                 output code page. 
  942.  
  943.  Return value 
  944.  
  945.  An OS/2 system error code. 
  946.  
  947.  Remarks 
  948.  
  949.  
  950. ΓòÉΓòÉΓòÉ 4.1.31. DosSetConsoleInputCodePage ΓòÉΓòÉΓòÉ
  951.  
  952. C++ language function declaration 
  953.  
  954. APIRET APIENTRY DosSetConsoleInputCodePage ( HFILE Handle, unsigned int CodePage ) ;
  955.  
  956. Parameters 
  957.  
  958.  Handle         The file handle of the console buffer or CON device. The handle 
  959.                 should be 0 on IBM OS/2 
  960.  
  961.  CodePage       The new input code page. 
  962.  
  963.  Return value 
  964.  
  965.  An OS/2 system error code. 
  966.  
  967.  Remarks 
  968.  
  969.  
  970. ΓòÉΓòÉΓòÉ 4.1.32. DosQueryConsoleInputCodePage ΓòÉΓòÉΓòÉ
  971.  
  972. C++ language function declaration 
  973.  
  974. APIRET APIENTRY DosQueryConsoleInputCodePage ( HFILE Handle, unsigned int & CodePage ) ;
  975.  
  976. Parameters 
  977.  
  978.  Handle         The file handle of the console buffer or CON device. The handle 
  979.                 should be 0 on IBM OS/2 
  980.  
  981.  CodePage       A reference to a variable wherein is stored the current console 
  982.                 input code page. 
  983.  
  984.  Return value 
  985.  
  986.  An OS/2 system error code. 
  987.  
  988.  Remarks 
  989.  
  990.  
  991. ΓòÉΓòÉΓòÉ 4.1.33. DosReadConsoleInputEvent ΓòÉΓòÉΓòÉ
  992.  
  993. C++ language function declaration 
  994.  
  995. APIRET APIENTRY DosReadConsoleInputEvent ( HFILE Handle, CONSOLE_INPUT_EVENT * Events, size_t MaxEvents, size_t & NumEvents, BOOL remove ) ;
  996.  
  997. Parameters 
  998.  
  999.  Handle         The file handle of the console buffer or CON device. The handle 
  1000.                 should be 0 on IBM OS/2 
  1001.  
  1002.  Events         A pointer to an array of CONSOLE_INPUT_EVENT stuctures. 
  1003.  
  1004.  MaxEvents      The maximum number of array elements that can be stored. 
  1005.  
  1006.  NumEvents      A reference to a variable wherein is stored the actual number 
  1007.                 of array elements that have been stored by the call. 
  1008.  
  1009.  Remove         A flag indicating whether or not to remove the input events 
  1010.                 from the queue. 
  1011.  
  1012.  Return value 
  1013.  
  1014.  An OS/2 system error code. 
  1015.  
  1016.  Remarks 
  1017.  
  1018.  This call blocks until one or more input events are available, and returns up 
  1019.  to MaxEvents event structures in the array provided, indicating in NumEvents 
  1020.  how many structures were actually filled.  At least one event will be 
  1021.  returned.  (A MaxEvents value less than 1 is an error.) 
  1022.  
  1023.  Note:  The virtual key numbers in a keyboard event are the CON_KBD_KEY_XXX 
  1024.  constants, not the VK_XXXX constants defined by the Presentation Manager API. 
  1025.  
  1026.  A key event may have a virtual key code without having a character code, and 
  1027.  vice versa.  The recommended practice is to first recognise non-character key 
  1028.  events by their virtual key codes, and then to process all other key events 
  1029.  that have character codes according to their character codes. 
  1030.  
  1031.  IBM OS/2 does not generate console window size, menu, or focus events. 
  1032.  
  1033.  
  1034. ΓòÉΓòÉΓòÉ 4.1.34. DosFlushConsoleInputEvents ΓòÉΓòÉΓòÉ
  1035.  
  1036. C++ language function declaration 
  1037.  
  1038. APIRET APIENTRY DosFlushConsoleInputEvents ( HFILE Handle ) ;
  1039.  
  1040. Parameters 
  1041.  
  1042.  Handle         The file handle of the console buffer or CON device. The handle 
  1043.                 should be 0 on IBM OS/2 
  1044.  
  1045.  Return value 
  1046.  
  1047.  An OS/2 system error code. 
  1048.  
  1049.  Remarks 
  1050.  
  1051.  All input events currently queued for the console will be deleted. 
  1052.  
  1053.  
  1054. ΓòÉΓòÉΓòÉ 4.1.35. DosQueryConsoleNumberOfMouseButtons ΓòÉΓòÉΓòÉ
  1055.  
  1056. C++ language function declaration 
  1057.  
  1058. APIRET APIENTRY DosQueryConsoleNumberOfMouseButtons ( HFILE Handle, size_t & Buttons ) ;
  1059.  
  1060. Parameters 
  1061.  
  1062.  Handle         The file handle of the console buffer or CON device. The handle 
  1063.                 should be 0 on IBM OS/2 
  1064.  
  1065.  Buttons        A reference to a variable wherein is stored the number of mouse 
  1066.                 buttons on the mouse. 
  1067.  
  1068.  Return value 
  1069.  
  1070.  An OS/2 system error code. 
  1071.  
  1072.  Remarks 
  1073.  
  1074.  The number of mouse buttons is determined in software.  The number of buttons 
  1075.  supported by the mouse device driver may not match the number of buttons that 
  1076.  the physical mouse actually has. 
  1077.  
  1078.  
  1079. ΓòÉΓòÉΓòÉ 5. Acknowledgements ΓòÉΓòÉΓòÉ
  1080.  
  1081. The following people helped with the pre-release testing: 
  1082.  
  1083.  
  1084. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1085.  
  1086. The handle parameter to this call is ignored on IBM OS/2 but 0, the handle for 
  1087. standard input, should be used for upward compatibility with other 
  1088. implementations. 
  1089.  
  1090.  
  1091. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1092.  
  1093. The handle parameter to this call is ignored on IBM OS/2 but 1, the handle for 
  1094. standard output, should be used for upward compatibility with other 
  1095. implementations.