Difference between revisions of "Unit Console"

From Ultibo.org
Jump to: navigation, search
Line 1,019: Line 1,019:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleInit;</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleInit;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the Console unit and Console device table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| Called only during system startup
 
|-
 
|-
 
|}
 
|}
Line 1,034: Line 1,034:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Open a console device ready for drawing</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to open
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,046: Line 1,049:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Close a console device to prevent drawing</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to close
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,058: Line 1,064:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Clear a console device using the specified color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to clear
 +
|-
 +
! '''Color'''
 +
| The color to use when clearing the console
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,069: Line 1,084:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll all or part of a console device in the specified direction</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to scroll
 +
|-
 +
! '''X1'''
 +
| The left edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Count'''
 +
| The number of pixels or characters (depending on console mode) to scroll
 +
|-
 +
! '''Direction'''
 +
| The direction to scroll (eg CONSOLE_DIRECTION_UP)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,081: Line 1,117:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw an outline of a box on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X1'''
 +
| The left edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Width'''
 +
| The width of the box outline (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
Line 1,093: Line 1,153:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a horizontal or vertical line on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X1'''
 +
| The left starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Width'''
 +
| The width of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,105: Line 1,189:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDevicePlotLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a line in any direction on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X1'''
 +
| The left starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Width'''
 +
| The width of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
 
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 +
Character consoles may implement plot line but the default method only supports pixel consoles
 
|-
 
|-
 
|}
 
|}
Line 1,118: Line 1,227:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a character on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''Handle'''
 +
| The handle of the font to draw with
 +
|-
 +
! '''Ch'''
 +
| The character to draw
 +
|-
 +
! '''X'''
 +
| The left starting point of the character (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The top starting point of the character (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Forecolor'''
 +
| The foreground color for the character (eg COLOR_WHITE)
 +
|-
 +
! '''Backcolor'''
 +
| The background color for the character (eg COLOR_BLACK)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,130: Line 1,263:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a text string on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''Handle'''
 +
| The handle of the font to draw with
 +
|-
 +
! '''Text'''
 +
| The text to draw
 +
|-
 +
! '''X'''
 +
| The left starting point of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The top starting point of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Forecolor'''
 +
| The foreground color for the text (eg COLOR_WHITE)
 +
|-
 +
! '''Backcolor'''
 +
| The background color for the text (eg COLOR_BLACK)
 +
|-
 +
! '''Len'''
 +
| The length of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,142: Line 1,302:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a pixel on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X'''
 +
| The column to draw the pixel (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The row to draw the pixel (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,154: Line 1,329:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a filled block on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X1'''
 +
| The left edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
 
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawCircle(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a circle on a console device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X'''
 +
| The column center point of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The row center point of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color to draw with (eg COLOR_WHITE)
 +
|-
 +
! '''Width'''
 +
| The width of the circle outline (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Radius'''
 +
| The radius of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 +
Character consoles may implement draw circle but the default method only supports pixel consoles
 
|-
 
|-
 
|}
 
|}
Line 1,166: Line 1,396:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw an image on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to draw on
 +
|-
 +
! '''X'''
 +
| The starting column of the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The starting row of the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Buffer'''
 +
| Pointer to a block of memory containing the pixels of the image in a contiguous block of rows
 +
|-
 +
! '''Width'''
 +
| The number of columns in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Height'''
 +
| The number of rows in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Format'''
 +
| The color format of the image (eg COLOR_FORMAT_RGB24)
 
|-
 
|-
 
! '''Skip'''
 
! '''Skip'''
 
| The number of pixels to skip in the buffer after each row (Optional)
 
| The number of pixels to skip in the buffer after each row (Optional)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,177: Line 1,431:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a console window on a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to draw on
 +
|-
 +
! '''Handle'''
 +
| The handle of the console window to draw
 +
|-
 +
! '''Flags'''
 +
| Flags to specify what should be drawn (eg WINDOW_DRAW_FLAG_BORDER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,190: Line 1,453:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read a pixel from a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to read from
 +
|-
 +
! '''X'''
 +
| The column to read the pixel from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The row to read the pixel from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Color'''
 +
| The color value read from the console (eg COLOR_WHITE)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 1,202: Line 1,480:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read an image from a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to read from
 +
|-
 +
! '''X'''
 +
| The starting column to read the image from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The starting row to read the image from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Buffer'''
 +
| Pointer to a block of memory large enough to hold the pixels of the image in a contiguous block of rows
 +
|-
 +
! '''Width'''
 +
| The number of columns to store in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Height'''
 +
| The number of rows to store in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Format'''
 +
| The color format to store the image in (eg COLOR_FORMAT_RGB24)
 
|-
 
|-
 
! '''Skip'''
 
! '''Skip'''
 
| The number of pixels to skip in the buffer after each row (Optional)
 
| The number of pixels to skip in the buffer after each row (Optional)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,250: Line 1,552:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Copy an image within a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to copy on
 +
|-
 +
! '''Source'''
 +
| The starting point for the source of the copy (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Dest'''
 +
| The starting point for the destination of the copy (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Width'''
 +
| The number of columns in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Height'''
 +
| The number of rows in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new caret (cursor) of the specified size</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to create the caret on
 +
|-
 +
! '''Width'''
 +
| The width of the new caret (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Height'''
 +
| The height of the new caret (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''OffsetX'''
 +
| The X offset of the new caret (Optional)(Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''OffsetY'''
 +
| The Y offset of the new caret (Optional)(Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| Handle to new caret on success or INVALID_HANDLE_VALUE on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Delete an existing caret (cursor)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to delete the caret on
 +
|-
 +
! '''Handle'''
 +
| The handle of the caret to delete (as returned from ConsoleDeviceAddCaret)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Update an existing carets position, visibility or blink</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to update the caret on
 +
|-
 +
! '''Handle'''
 +
| The handle of the caret to update (as returned from ConsoleDeviceAddCaret)
 +
|-
 +
! '''X'''
 +
| The X position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y'''
 +
| The Y position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Visible'''
 +
| If true then show the caret else hide it
 +
|-
 +
! '''Blink'''
 +
| If true then blink the caret at the default blink rate
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceSetCursor(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to set the cursor
 +
|-
 +
! '''Width'''
 +
| The width of the cursor in characters
 +
|-
 +
! '''Height'''
 +
| The height of the cursor in characters
 +
|-
 +
! '''Chars'''
 +
| A buffer containing the cursor characters
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For devices that don't support hardware mouse cursor a software cursor will be implemented
 +
If chars is nil then the default cursor will be used
 
|-
 
|-
 
|}
 
|}
Line 1,261: Line 1,681:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceUpdateCursor(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Update the position and state for the mouse cursor of a console device (CONSOLE_MODE_CHARACTER only)</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to update the cursor
 +
|-
 +
! '''Enabled'''
 +
| If true then show the cursor else hide it
 +
|-
 +
! '''X'''
 +
| The cursor X location in characters
 +
|-
 +
! '''Y'''
 +
| The cursor Y location in characters
 +
|-
 +
! '''Relative'''
 +
| If true then X and Y are considered relative to the current position
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For devices that don't support hardware mouse cursor a software cursor will be implemented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the coordinates of a console position from a console device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to get from
 +
|-
 +
! '''Position'''
 +
| The console position to get the coordinates for (eg CONSOLE_POSITION_FULL)
 +
|-
 +
! '''X1'''
 +
| The left edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y1'''
 +
| The top edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''X2'''
 +
| The right edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Y2'''
 +
| The bottom edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,274: Line 1,742:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current properties from a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to get properties from
 +
|-
 +
! '''Properties'''
 +
| Pointer to a TConsoleProperties structure to return
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,286: Line 1,760:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a console device supports a flag value</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to check
 +
|-
 +
! '''Flag'''
 +
| The console flag to check (eg CONSOLE_FLAG_FULLSCREEN)
 +
|-
 +
! '''Return'''
 +
| True if flag is supported, False if not or on error
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceUpdateFlag(Console:PConsoleDevice; Flag:LongWord; Clear:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set or clear a flag on a console device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to set or clear the flag on
 +
|-
 +
! '''Flag'''
 +
| The console flag to set or clear (eg CONSOLE_FLAG_LINE_WRAP)
 +
|-
 +
! '''Clear'''
 +
| If true clear the flag, else set it
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,298: Line 1,799:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the mode of a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to get from
 +
|-
 +
! '''Return'''
 +
| The mode of the console (eg CONSOLE_MODE_PIXEL) or CONSOLE_MODE_NONE on error
 
|-
 
|-
 
|}
 
|}
Line 1,310: Line 1,814:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the state of a console device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to get from
 +
|-
 +
! '''Return'''
 +
| The current state of the console (eg CONSOLE_STATE_OPEN)
 
|-
 
|-
 
|}
 
|}
Line 1,353: Line 1,860:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to destroy
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,365: Line 1,875:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to register
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,377: Line 1,890:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to deregister
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,385: Line 1,901:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by ID in the console table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''ConsoleId'''
| None documented
+
| The ID number of the console to find
 +
|-
 +
! '''Return'''
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 1,397: Line 1,916:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by its related device in the console table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Device'''
| None documented
+
| Pointer to the related device to find
 +
|-
 +
! '''Return'''
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 1,409: Line 1,931:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by name in the console table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Name'''
| None documented
+
| The name of the console to find (eg Console0)
 +
|-
 +
! '''Return'''
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 1,421: Line 1,946:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by description in the console table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Description'''
| None documented
+
| The description of the console to find (eg Framebuffer Console (Framebuffer0))
 +
|-
 +
! '''Return'''
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 1,433: Line 1,961:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all console devices in the console table</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Callback'''
| None documented
+
| The callback function to call for each console in the table
 +
|-
 +
! '''Data'''
 +
| A private data pointer to pass to callback for each console in the table
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 1,445: Line 1,979:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a notification for console device changes</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to notify changes for (Optional, pass nil for all console devices)
 +
|-
 +
! '''Callback'''
 +
| The function to call when a notification event occurs
 +
|-
 +
! '''Data'''
 +
| A private data pointer to pass to callback when a notification event occurs
 +
|-
 +
! '''Notification'''
 +
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
 +
|-
 +
! '''Flags'''
 +
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER)
 
|-
 
|-
 
|}
 
|}
Line 1,469: Line 2,015:
 
! '''Position'''
 
! '''Position'''
 
| The console position to create the new window at (eg CONSOLE_POSITION_FULL)
 
| The console position to create the new window at (eg CONSOLE_POSITION_FULL)
 +
|-
 +
! '''Default'''
 +
| If true allow the new window to be the default window if there is no current default
 
|-
 
|-
 
! '''Return'''
 
! '''Return'''
Line 1,499: Line 2,048:
 
! '''Position'''
 
! '''Position'''
 
| The console position to create the new window at (eg CONSOLE_POSITION_FULL)
 
| The console position to create the new window at (eg CONSOLE_POSITION_FULL)
 +
|-
 +
! '''Default'''
 +
| If true allow the new window to be the default window if there is no current default
 
|-
 
|-
 
! '''Return'''
 
! '''Return'''
Line 1,547: Line 2,099:
 
! '''Return'''
 
! '''Return'''
 
| ERROR_SUCCESS if completed or another error code on failure
 
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowActivate(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Make an existing console window the active window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to activate
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowDeactivate(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Make an existing console window inactive</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to deactivate
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| On success there will be no active window set
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowNext(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the next console window starting with the active window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to change the active window on
 +
|-
 +
! '''Visible'''
 +
| If true only return windows that are visible
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowPrevious(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the previous console window starting with the active window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to change the active window on
 +
|-
 +
! '''Visible'''
 +
| If true only return windows that are visible
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowAt(Console:PConsoleDevice; X,Y:LongWord; Visible:Boolean):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find the console window that X and Y coordinates are within</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to find the window on
 +
|-
 +
! '''X'''
 +
| The X coordinate to find the window for
 +
|-
 +
! '''Y'''
 +
| The Y coordinate to find the window for
 +
|-
 +
! '''Visible'''
 +
| If true only return windows that are visible
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| For Text Console functions, X and Y are based on character columns not screen pixels
 
|-
 
|-
 
|}
 
|}
Line 1,604: Line 2,252:
 
! '''Return'''
 
! '''Return'''
 
| True if the flag is set, False if not set
 
| True if the flag is set, False if not set
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowUpdateFlag(Handle:TWindowHandle; Flag:LongWord; Clear:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set or clear a flag on an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to set or clear the flag on
 +
|-
 +
! '''Flag'''
 +
| The window flag to set or clear (eg WINDOW_FLAG_LINE_WRAP)
 +
|-
 +
! '''Clear'''
 +
| If true clear the flag, else set it
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,249: Line 2,918:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor X and Y positions of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get cursor X and Y for
 +
|-
 +
! '''X'''
 +
| The returned cursor X value
 +
|-
 +
! '''Y'''
 +
| The returned cursor Y value
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For Text Console functions, cursor X and Y are based on character rows and columns not screen pixels
 
|-
 
|-
 
|}
 
|}
Line 2,261: Line 2,942:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor X and Y positions of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to set cursor X and Y for
 +
|-
 +
! '''X'''
 +
| The new cursor X value
 +
|-
 +
! '''Y'''
 +
| The new cursor Y value
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For Text Console functions, cursor X and Y are based on character rows and columns not screen pixels
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorMode(Handle:TWindowHandle):TCursorMode;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor mode of an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get the mode for
 +
|-
 +
! '''Return'''
 +
| The current cursor mode (eg CURSOR_MODE_INSERT)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorMode(Handle:TWindowHandle;CursorMode:TCursorMode):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor mode of an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to set the mode for
 +
|-
 +
! '''CursorMode'''
 +
| The cursor mode to set (eg CURSOR_MODE_INSERT)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,273: Line 2,999:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor blink state of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to get blink state for
 +
|-
 +
! '''Return'''
 +
| True if blink is enabled, False if not or on error
 
|-
 
|-
 
|}
 
|}
Line 2,285: Line 3,014:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor blink state of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to set the blink state for
 +
|-
 +
! '''CursorBlink'''
 +
| True to enable blink, False to disable
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,297: Line 3,032:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor state of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to get the state for
 +
|-
 +
! '''Return'''
 +
| The current cursor state (eg CURSOR_STATE_ON)
 
|-
 
|-
 
|}
 
|}
Line 2,309: Line 3,047:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor state of an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to set the state for
 +
|-
 +
! '''CursorState'''
 +
| The cursor state to set (eg CURSOR_STATE_ON)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetCursorShape(Handle:TWindowHandle):TCursorShape;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor shape of an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"*
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get the shape for
 +
|-
 +
! '''Return'''
 +
| The current cursor shape (eg CURSOR_SHAPE_LINE)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowSetCursorShape(Handle:TWindowHandle; CursorShape:TCursorShape):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor shape of an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to set the shape for
 +
|-
 +
! '''CursorShape'''
 +
| The cursor shape to set (eg CURSOR_SHAPE_LINE)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,321: Line 3,098:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enable the cursor on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to enable the cursor for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,333: Line 3,113:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Disable the cursor on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to disable the cursor for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorLine(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Change the cursor to a vertical line on an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to change the cursor for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorBar(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Change the cursor to a horizontal bar on an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to change the cursor for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorBlock(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Change the cursor to a solid block on an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to change the cursor for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,345: Line 3,173:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Move the cursor on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to move the cursor for
 +
|-
 +
! '''X'''
 +
| The column to move the cursor to
 +
|-
 +
! '''Y'''
 +
| The row to move the cursor to
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For Text Console functions, X and Y are based on character rows and columns not screen pixels
 
|-
 
|-
 
|}
 
|}
Line 2,357: Line 3,197:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the blink state of the cursor on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to set the blink state for
 +
|-
 +
! '''Enabled'''
 +
| True if the cursor is blinking, False if not
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowAddHistory(Handle:TWindowHandle; const Value:String):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Add a value to the command history table of an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to add to
 +
|-
 +
! '''Value'''
 +
| The text to add to the command history
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| For Text Console functions, Window is based on screen character rows and columns not screen pixels
 +
When the number of entries in the table reaches the maximum the first entry will be removed
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowClearHistory(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Remove all entries from the command history table of an existing console window}</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to clear
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowFirstHistory(Handle:TWindowHandle):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the first (oldest) command history value from an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get from
 +
|-
 +
! '''Return'''
 +
| The command history value or an empty string on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowLastHistory(Handle:TWindowHandle):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the last (most recent) command history value from an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get from
 +
|-
 +
! '''Return'''
 +
| The command history value or an empty string on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowNextHistory(Handle:TWindowHandle):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the next (after current) command history value from an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get from
 +
|-
 +
! '''Return'''
 +
| The command history value or an empty string on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowPreviousHistory(Handle:TWindowHandle):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the next (before current) command history value from an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get from
 +
|-
 +
! '''Return'''
 +
| The command history value or an empty string on failure
 +
|-
 +
! '''Note'''
 +
| If there is no current history value the last value is returned
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCurrentHistory(Handle:TWindowHandle):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current command history value from an existing console window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to get from
 +
|-
 +
! '''Return'''
 +
| The command history value or an empty string on failure
 +
|-
 +
! '''Note'''
 +
| If there is no current history value the last value is returned
 
|-
 
|-
 
|}
 
|}
Line 2,369: Line 3,333:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the current viewport of an existing console window up</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to scroll
 +
|-
 +
! '''Row'''
 +
| The starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up
 +
|-
 +
! '''Lines'''
 +
| The number of character lines to scroll up, Lines number of rows at the top will be discarded
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,381: Line 3,357:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the current viewport of an existing console window down</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to scroll
 +
|-
 +
! '''Row'''
 +
| The starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down
 +
|-
 +
! '''Lines'''
 +
| The number of character lines to scroll down, Lines number of rows at the bottom will be discarded
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,393: Line 3,381:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the current viewport of an existing console window left</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to scroll
 
|-
 
|-
 
! '''Row'''
 
! '''Row'''
| Row is the starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left
+
| The starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left
 
|-
 
|-
 
! '''Lines'''
 
! '''Lines'''
| Lines is the number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left
+
| The number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left
 
|-
 
|-
 
! '''Col'''
 
! '''Col'''
| Col is the starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left
+
| The starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left
 
|-
 
|-
 
! '''Char'''
 
! '''Char'''
| Chars is the number of characters to scroll left, Chars number of columnss at the left will be discarded
+
| The number of characters to scroll left, Chars number of columns at the left will be discarded
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,417: Line 3,411:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the current viewport of an existing console window right</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to scroll
 
|-
 
|-
 
! '''Row'''
 
! '''Row'''
| Row is the starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right
+
| The starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right
 
|-
 
|-
 
! '''Lines'''
 
! '''Lines'''
| Lines is the number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right
+
| The number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right
 
|-
 
|-
 
! '''Col'''
 
! '''Col'''
| Col is the starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right
+
| The starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right
 
|-
 
|-
 
! '''Char'''
 
! '''Char'''
| Chars is the number of characters to scroll right, Chars number of columns at the right will be discarded
+
| The number of characters to scroll right, Chars number of columns at the right will be discarded
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,489: Line 3,489:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on an existing console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to write text on
 +
|-
 +
! '''Text'''
 +
| The text to write
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| The window will not scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,500: Line 3,509:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to write text on
 +
|-
 +
! '''Text'''
 +
| The text to write
 +
|-
 +
! '''X'''
 +
| The column to start writing the text at
 +
|-
 +
! '''Y'''
 +
| The row to start writing the text at
 +
|-
 +
! '''Forecolor'''
 +
| The foreround color to use (eg COLOR_WHITE)
 +
|-
 +
! '''Backcolor'''
 +
| The foreround color to use (eg COLOR_BLACK)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
 
| For Text Console functions, X and Y are based on screen character rows and columns not screen pixels
 
| For Text Console functions, X and Y are based on screen character rows and columns not screen pixels
 +
The window will not scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,513: Line 3,544:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on an existing console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to write text on
 +
|-
 +
! '''Text'''
 +
| The text to write
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| The window will scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,524: Line 3,564:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to write text on
 +
|-
 +
! '''Text'''
 +
| The text to write
 +
|-
 +
! '''X'''
 +
| The column to start writing the text at
 +
|-
 +
! '''Y'''
 +
| The row to start writing the text at
 +
|-
 +
! '''Forecolor'''
 +
| The foreround color to use (eg COLOR_WHITE)
 +
|-
 +
! '''Backcolor'''
 +
| The foreround color to use (eg COLOR_BLACK)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
 
| For Text Console functions, X and Y are based on character rows and columns not screen pixels
 
| For Text Console functions, X and Y are based on character rows and columns not screen pixels
 +
The window will scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,537: Line 3,599:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a character on an existing console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Handle'''
| None documented
+
| The handle of the window to write the character on
 +
|-
 +
! '''Chr'''
 +
| The character to write
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,548: Line 3,616:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a character on an existing console window</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to write the character on
 +
|-
 +
! '''Chr'''
 +
| The character to write
 +
|-
 +
! '''X'''
 +
| The column to start writing the character at
 +
|-
 +
! '''Y'''
 +
| The row to start writing the character at
 +
|-
 +
! '''Forecolor'''
 +
| The foreround color to use (eg COLOR_WHITE)
 +
|-
 +
! '''Backcolor'''
 +
| The foreround color to use (eg COLOR_BLACK)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,590: Line 3,679:
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| For Text Console functions, Source, Dest, Width, Height and Skip are based on character rows and columns not screen.
+
| For Text Console functions, Source, Dest, Width, Height and Skip are based on character rows and columns not screen pixels
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowRead(Handle:TWindowHandle; var AText:String):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read text input from the console and echo to an existing console window at the current position in the current color</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to echo input to
 +
|-
 +
! '''Text'''
 +
| The text read from the console on return
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| The console window will not scroll up on return
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowReadLn(Handle:TWindowHandle; var AText:String):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read text input from the console and echo to an existing console window at the current position in the current color</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to echo input to
 +
|-
 +
! '''Text'''
 +
| The text read from the console on return
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| The console window will scroll up one line on return
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowReadLnEx(Handle:TWindowHandle; var AText:String; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Scroll,History:Boolean; Completion:TConsoleWindowCompletion; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read text input from the console and echo to an existing console window at the specified position in the specified color</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to echo input to
 +
|-
 +
! '''Text'''
 +
| The text read from the console on return
 +
|-
 +
! '''Prompt'''
 +
| An optional text prompt to display at the start of the line
 +
|-
 +
! '''X'''
 +
| The starting X position for the output (0 for current position)
 +
|-
 +
! '''Y'''
 +
| The starting Y position for the output (0 for current position)
 +
|-
 +
! '''Forecolor'''
 +
| The text forecolor for the output (COLOR_NONE for current color)
 +
|-
 +
! '''Backcolor'''
 +
| The text backcolor for the output (COLOR_NONE for current color)
 +
|-
 +
! '''Scroll'''
 +
| If true then scroll up one line on return
 +
|-
 +
! '''History'''
 +
| If true then support console history buffer using Up, Down and F3 keys
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| Supports common line editing behaviour including Home, End, Left, Right, Up, Down, Insert, Backspace and Delete
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowReadChr(Handle:TWindowHandle; var AChr:Char):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read one character input from the console and echo to an existing console window at the current position in the current color</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to echo input to
 +
|-
 +
! '''Chr'''
 +
| The character read from the console on return
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! '''Note'''
 +
| The console window will not scroll up on return
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowReadChrEx(Handle:TWindowHandle; var AChr:Char; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Echo,Scroll:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read one character input from the console and optionally echo to an existing console window at the specified position in the specified color</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Handle'''
 +
| The handle of the window to echo input to
 +
|-
 +
! '''Chr'''
 +
| The character read from the console on return
 +
|-
 +
! '''Prompt'''
 +
| An optional text prompt to display at the start of the line
 +
|-
 +
! '''X'''
 +
| The starting X position for the output (0 for current position)
 +
|-
 +
! '''Y'''
 +
| The starting Y position for the output (0 for current position)
 +
|-
 +
! '''Forecolor'''
 +
| The text forecolor for the output (COLOR_NONE for current color)
 +
|-
 +
! '''Backcolor'''
 +
| The text backcolor for the output (COLOR_NONE for current color)
 +
|-
 +
! '''Echo'''
 +
| If true then echo the character to the console window
 +
|-
 +
! '''Scroll'''
 +
| If true then scroll up one line on return
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 2,855: Line 4,088:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleScrollUp(Row,Lines:Integer);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleScrollUp(Row,Lines:Integer);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the default console window up</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Row'''
 +
| The starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up
 +
|-
 +
! '''Lines'''
 +
| The number of character lines to scroll up, Lines number of rows at the top will be discarded
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,867: Line 4,106:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleScrollDown(Row,Lines:Integer);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleScrollDown(Row,Lines:Integer);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll the default console window down</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Row'''
 +
| The starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down
 +
|-
 +
! '''Lines'''
 +
| The number of character lines to scroll down, Lines number of rows at the bottom will be discarded
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
Line 2,879: Line 4,124:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWrite(const AText:String);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWrite(const AText:String);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on the default console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Text'''
 +
| The text to write
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| The window will not scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,891: Line 4,139:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWriteLn(const AText:String);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWriteLn(const AText:String);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write text on the default console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Text'''
 +
| The text to write
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| None documented
+
| The window will scroll up at the end of the line
 
|-
 
|-
 
|}
 
|}
Line 2,903: Line 4,154:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWriteChr(AChr:Char);</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleWriteChr(AChr:Char);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a character on the default console window at the current position in the current color</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Chr'''
| None documented
+
| The character to write
 
|-
 
|-
 
|}
 
|}
Line 2,919: Line 4,170:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Text'''
| None documented
+
| The text read from the console input
 
|-
 
|-
 
|}
 
|}
Line 2,931: Line 4,182:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Text'''
| None documented
+
| The text read from the console input
 
|-
 
|-
 
|}
 
|}
Line 2,943: Line 4,194:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Chr'''
| None documented
+
| The character read from the console input
 
|-
 
|-
 
|}
 
|}
Line 3,115: Line 4,366:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawWindow API for FramebufferConsole</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawWindow API for FramebufferConsole</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
Line 3,121: Line 4,372:
 
|-
 
|-
 
! '''Note'''
 
! '''Note'''
| Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead. Caller must hold the Window lock
+
| Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead
 +
Caller must hold the Window lock
 
|-
 
|-
 
|}
 
|}
Line 3,182: Line 4,434:
 
! '''Note'''
 
! '''Note'''
 
| Not intended to be called directly by applications, use ConsoleDeviceCopyImage instead
 
| Not intended to be called directly by applications, use ConsoleDeviceCopyImage instead
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FramebufferConsoleCaretTimer(Caret:PConsoleCaret);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Internal function used by FramebufferConsole device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FramebufferConsoleShowCaret(Console:PConsoleDevice; Caret:PConsoleCaret);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Internal function used by FramebufferConsole device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications
 +
Caller must hold the console lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure FramebufferConsoleHideCaret(Console:PConsoleDevice; Caret:PConsoleCaret);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Internal function used by FramebufferConsole device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications
 +
Caller must hold the console lock
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FramebufferConsoleAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceAddCaret API for FramebufferConsole</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications, use ConsoleDeviceAddCaret instead
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FramebufferConsoleDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDeleteCaret API for FramebufferConsole</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications, use ConsoleDeviceDeleteCaret instead
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FramebufferConsoleUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceUpdateCaret API for FramebufferConsole</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Not intended to be called directly by applications, use ConsoleDeviceUpdateCaret instead
 
|-
 
|-
 
|}
 
|}
Line 3,240: Line 4,566:
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Console device is in the Console table</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Console device is in the Console table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCaretCheck(Console:PConsoleDevice; Caret:PConsoleCaret):PConsoleCaret;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a console caret entry is valid</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to search for the caret
 +
|-
 +
! '''Caret'''
 +
| The caret entry to check for validity
 +
|-
 +
! '''Return'''
 +
| The supplied caret if successful or nil on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetDefaultFont:TFontHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the default console font</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 3,306: Line 4,662:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to get the window count for
 +
|-
 +
! '''Return'''
 +
| The current number of console windows on the specified console device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetActive(Console:PConsoleDevice):TWindowHandle; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current console active window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to get the active window for
 +
|-
 +
! '''Return'''
 +
| The window handle of the current active window or INVALID_HANDLE_VALUE on failure
 
|-
 
|-
 
|}
 
|}
Line 3,318: Line 4,692:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to get the default window for
 +
|-
 +
! '''Return'''
 +
| The window handle of the current default window or INVALID_HANDLE_VALUE on failure
 
|-
 
|-
 
|}
 
|}
Line 3,330: Line 4,707:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! '''Console'''
| None documented
+
| The console device to set the default window for
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 3,338: Line 4,718:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a console window entry is valid</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Console'''
 +
| The console device to search for the window
 +
|-
 +
! '''Window'''
 +
| The window entry to check for validity
 +
|-
 +
! '''Return'''
 +
| The supplied window if successful or nil on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConsoleWindowGetDefaultFont:TFontHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the default console window font</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"

Revision as of 05:55, 22 March 2018

Return to Unit Reference


Description


Ultibo Console interface unit

Note:

Console coordinates X,Y are based on either pixels or characters depending on the console mode (Pixel or Character)

Console coordinates begin at 0,0 and extend to Width - 1, Height - 1

Console Window coordinates X,Y are always based on characters, beginning at 1,1 and extending to Cols,Rows

Constants



[Expand]
Console specific constants CONSOLE_*


[Expand]
Console device type CONSOLE_TYPE_*


[Expand]
Console device state CONSOLE_STATE_*


[Expand]
Console device flag CONSOLE_FLAG_*


[Expand]
Console device mode CONSOLE_MODE_*


[Expand]
Console caret signature CARET_SIGNATURE*


[Expand]
Console window signature WINDOW_SIGNATURE_*


[Expand]
Console window state WINDOW_STATE_*


[Expand]
Console window mode WINDOW_MODE_*


[Expand]
Console window flag WINDOW_FLAG_*


[Expand]
Console window draw flag WINDOW_DRAW_FLAG_*


[Expand]
Console window history WINDOW_HISTORY_*


[Expand]
Framebuffer console FRAMEBUFFER_CONSOLE_*


Type definitions



Cursor state

TCursorState = (CURSORON,CURSOROFF);

Console char

[Expand]

PConsoleChar = ^TConsoleChar;

TConsoleChar = record

Console point

[Expand]

TConsolePoint = record

Console rect

[Expand]

TConsoleRect = record

Console properties

[Expand]

PConsoleProperties = ^TConsoleProperties;

TConsoleProperties = record

Console enumeration callback

TConsoleEnumerate = function(Console:PConsoleDevice; Data:Pointer):LongWord;

Console notification callback

TConsoleNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

Console device open

TConsoleDeviceOpen = function(Console:PConsoleDevice):LongWord;

Console device close

TConsoleDeviceClose = function(Console:PConsoleDevice):LongWord;

Console device clear

TConsoleDeviceClear = function(Console:PConsoleDevice; Color:LongWord):LongWord;

Console device scroll

TConsoleDeviceScroll = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;

Console device draw box

TConsoleDeviceDrawBox = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;

Console device draw line

TConsoleDeviceDrawLine = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;

Console device draw char

TConsoleDeviceDrawChar = function(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char;X,Y,Forecolor,Backcolor:LongWord):LongWord;

Console device draw text

TConsoleDeviceDrawText = function(Console:PConsoleDevice; Handle:TFontHandle; const Text:String;X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;

Console device draw pixel

TConsoleDeviceDrawPixel = function(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;

Console device draw block

TConsoleDeviceDrawBlock = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;

Console device draw image

TConsoleDeviceDrawImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;

Console device draw window

TConsoleDeviceDrawWindow = function(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;

Console device get pixel

TConsoleDeviceGetPixel = function(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;

Console device get image

TConsoleDeviceGetImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;

Console device put text

TConsoleDevicePutText = function(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;

Console device copy image

TConsoleDeviceCopyImage = function(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;

Console device get position

TConsoleDeviceGetPosition = function(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;

Console device get properties

TConsoleDeviceGetProperties = function(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;

Console device

[Expand]

PConsoleDevice = ^TConsoleDevice;

TConsoleDevice = record

Window properties

[Expand]

PWindowProperties = ^TWindowProperties;

TWindowProperties = record

Console window enumeration callback

TConsoleWindowEnumerate = function(Console:PConsoleDevice; Handle:TWindowHandle; Data:Pointer):LongWord;

Console window

[Expand]

PConsoleWindow = ^TConsoleWindow;

TConsoleWindow = record

Framebuffer console

[Expand]

PFramebufferConsole = ^TFramebufferConsole;

TFramebufferConsole = record


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure ConsoleInit;
Description: Initialize the Console unit and Console device table


Console functions

[Expand]
function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;
Description: Open a console device ready for drawing


[Expand]
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
Description: Close a console device to prevent drawing


[Expand]
function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Description: Clear a console device using the specified color


[Expand]
function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Description: Scroll all or part of a console device in the specified direction


[Expand]
function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw an outline of a box on a console device


[Expand]
function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw a horizontal or vertical line on a console device


[Expand]
function ConsoleDevicePlotLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw a line in any direction on a console device


[Expand]
function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Draw a character on a console device


[Expand]
function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
Description: Draw a text string on a console device


[Expand]
function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
Description: Draw a pixel on a console device


[Expand]
function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
Description: Draw a filled block on a console device


[Expand]
function ConsoleDeviceDrawCircle(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;
Description: Draw a circle on a console device


[Expand]
function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Draw an image on a console device


[Expand]
function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
Description: Draw a console window on a console device


[Expand]
function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
Description: Read a pixel from a console device


[Expand]
function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Read an image from a console device


[Expand]
function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Output a rectangular area of text to a console device


[Expand]
function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Description: Copy an image within a console device


[Expand]
function ConsoleDeviceAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
Description: Create a new caret (cursor) of the specified size


[Expand]
function ConsoleDeviceDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
Description: Delete an existing caret (cursor)


[Expand]
function ConsoleDeviceUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;
Description: Update an existing carets position, visibility or blink


[Expand]
function ConsoleDeviceSetCursor(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;
Description: Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only)


[Expand]
function ConsoleDeviceUpdateCursor(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;
Description: Update the position and state for the mouse cursor of a console device (CONSOLE_MODE_CHARACTER only)


[Expand]
function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Get the coordinates of a console position from a console device


[Expand]
function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
Description: Get the current properties from a console device


[Expand]
function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;
Description: Check if a console device supports a flag value


[Expand]
function ConsoleDeviceUpdateFlag(Console:PConsoleDevice; Flag:LongWord; Clear:Boolean):LongWord;
Description: Set or clear a flag on a console device


[Expand]
function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;
Description: Get the mode of a console device


[Expand]
function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;
Description: Get the state of a console device


[Expand]
function ConsoleDeviceCreate:PConsoleDevice;
Description: Create a new Console entry


[Expand]
function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;
Description: Create a new Console entry


[Expand]
function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;
Description: Destroy an existing Console entry


[Expand]
function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;
Description: Register a new Console in the Console table


[Expand]
function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;
Description: Deregister a Console from the Console table


[Expand]
function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;
Description: Find a console device by ID in the console table


[Expand]
function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;
Description: Find a console device by its related device in the console table


[Expand]
function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;
Description: Find a console device by name in the console table


[Expand]
function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;
Description: Find a console device by description in the console table


[Expand]
function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;
Description: Enumerate all console devices in the console table


[Expand]
function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for console device changes


Text console functions

[Expand]
function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
Description: Create a new Console window


[Expand]
function ConsoleWindowCreateEx(Console:PConsoleDevice; Font:TFontHandle; Size,State,Mode,Position:LongWord; Default:Boolean):TWindowHandle;
Description: Create a new Console window


[Expand]
function ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;
Description: Close and Destroy an existing console window


[Expand]
function ConsoleWindowShow(Handle:TWindowHandle):LongWord;
Description: Make an existing console window visible and show it on screen


[Expand]
function ConsoleWindowHide(Handle:TWindowHandle):LongWord;
Description: Make an existing console window invisible and hide it on screen


[Expand]
function ConsoleWindowActivate(Handle:TWindowHandle):LongWord;
Description: Make an existing console window the active window


[Expand]
function ConsoleWindowDeactivate(Handle:TWindowHandle):LongWord;
Description: Make an existing console window inactive


[Expand]
function ConsoleWindowNext(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
Description: Get the next console window starting with the active window


[Expand]
function ConsoleWindowPrevious(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
Description: Get the previous console window starting with the active window


[Expand]
function ConsoleWindowAt(Console:PConsoleDevice; X,Y:LongWord; Visible:Boolean):TWindowHandle;
Description: Find the console window that X and Y coordinates are within


[Expand]
function ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;
Description: Find an existing console window in the position specified


[Expand]
function ConsoleWindowEnumerate(Console:PConsoleDevice; Callback:TConsoleWindowEnumerate; Data:Pointer):LongWord;
Description: Enumerate existing console windows on the specified console device


[Expand]
function ConsoleWindowCheckFlag(Handle:TWindowHandle; Flag:LongWord):Boolean;
Description: Check an existing console window to determine if a flag is set or not


[Expand]
function ConsoleWindowUpdateFlag(Handle:TWindowHandle; Flag:LongWord; Clear:Boolean):LongWord;
Description: Set or clear a flag on an existing console window


[Expand]
function ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;
Description: Get the window mode of an existing console window


[Expand]
function ConsoleWindowGetState(Handle:TWindowHandle):LongWord;
Description: Get the window state of an existing console window


[Expand]
function ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;
Description: Get the position of an existing console window


[Expand]
function ConsoleWindowSetPosition(Handle:TWindowHandle; Position:LongWord):LongWord;
Description: Set the position of an existing console window


[Expand]
function ConsoleWindowGetProperties(Handle:TWindowHandle; Properties:PWindowProperties):LongWord;
Description: Get the properties for the specified console window


[Expand]
function ConsoleWindowGetMinX(Handle:TWindowHandle):LongWord;
Description: Get the current minimum X of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetMinY(Handle:TWindowHandle):LongWord;
Description: Get the current minimum Y of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetMaxX(Handle:TWindowHandle):LongWord;
Description: Get the current maximum X of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetMaxY(Handle:TWindowHandle):LongWord;
Description: Get the current maximum Y of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetRect(Handle:TWindowHandle):TConsoleRect; inline;
Description: Get the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window


[Expand]
function ConsoleWindowSetRect(Handle:TWindowHandle; const ARect:TConsoleRect):LongWord; inline;
Description: Set the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window


[Expand]
function ConsoleWindowResetRect(Handle:TWindowHandle):LongWord; inline;
Description: Reset the window viewport for an existing console window to the maximum size


[Expand]
function ConsoleWindowGetViewport(Handle:TWindowHandle; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Get the X1,Y1,X2,Y2 of the window viewport for an existing console window


[Expand]
function ConsoleWindowSetViewport(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord):LongWord;
Description: Set the X1,Y1,X2,Y2 of the window viewport for an existing console window


[Expand]
function ConsoleWindowResetViewport(Handle:TWindowHandle):LongWord;
Description: Reset the window viewport for an existing console window to the maximum size


[Expand]
function ConsoleWindowGetX(Handle:TWindowHandle):LongWord;
Description: Get the current X (Column) position of an existing console window


[Expand]
function ConsoleWindowSetX(Handle:TWindowHandle; X:LongWord):LongWord;
Description: Set the current X (Column) position of an existing console window


[Expand]
function ConsoleWindowGetY(Handle:TWindowHandle):LongWord;
Description: Get the current Y (Row) position of an existing console window


[Expand]
function ConsoleWindowSetY(Handle:TWindowHandle; Y:LongWord):LongWord;
Description: Set the current Y (Row) position of an existing console window


[Expand]
function ConsoleWindowGetXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
Description: Get the current X and Y positions of an existing console window


[Expand]
function ConsoleWindowSetXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Set the current X and Y positions of an existing console window


[Expand]
function ConsoleWindowGetPoint(Handle:TWindowHandle):TConsolePoint;
Description: Get the point X,Y of an existing console window


[Expand]
function ConsoleWindowSetPoint(Handle:TWindowHandle; const APoint:TConsolePoint):LongWord;
Description: Set the point X,Y of an existing console window


[Expand]
function ConsoleWindowGetCols(Handle:TWindowHandle):LongWord;
Description: Get the current columns of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetRows(Handle:TWindowHandle):LongWord;
Description: Get the current rows of the window viewport for an existing console window


[Expand]
function ConsoleWindowGetWidth(Handle:TWindowHandle):LongWord;
Description: Get the absolute width of an existing console window


[Expand]
function ConsoleWindowGetHeight(Handle:TWindowHandle):LongWord;
Description: Get the absolute height of an existing console window


[Expand]
function ConsoleWindowGetFormat(Handle:TWindowHandle):LongWord;
Description: Get the color format of an existing console window


[Expand]
function ConsoleWindowGetForecolor(Handle:TWindowHandle):LongWord;
Description: Get the current foreground color of an existing console window


[Expand]
function ConsoleWindowSetForecolor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the current foreground color of an existing console window


[Expand]
function ConsoleWindowGetBackcolor(Handle:TWindowHandle):LongWord;
Description: Get the current background color of an existing console window


[Expand]
function ConsoleWindowSetBackcolor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the current background color of an existing console window


[Expand]
function ConsoleWindowGetFont(Handle:TWindowHandle):TFontHandle;
Description: Get the default font of an existing console window


[Expand]
function ConsoleWindowSetFont(Handle:TWindowHandle; Font:TFontHandle):LongWord;
Description: Set the default font of an existing console window


[Expand]
function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
Description: Get the current cursor X and Y positions of an existing console window


[Expand]
function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Set the current cursor X and Y positions of an existing console window


[Expand]
function ConsoleWindowGetCursorMode(Handle:TWindowHandle):TCursorMode;
Description: Get the current cursor mode of an existing console window


[Expand]
function ConsoleWindowSetCursorMode(Handle:TWindowHandle;CursorMode:TCursorMode):LongWord;
Description: Set the current cursor mode of an existing console window


[Expand]
function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;
Description: Get the current cursor blink state of an existing console window


[Expand]
function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;
Description: Set the current cursor blink state of an existing console window


[Expand]
function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;
Description: Get the current cursor state of an existing console window


[Expand]
function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;
Description: Set the current cursor state of an existing console window


[Expand]
function ConsoleWindowGetCursorShape(Handle:TWindowHandle):TCursorShape;
Description: Get the current cursor shape of an existing console window


[Expand]
function ConsoleWindowSetCursorShape(Handle:TWindowHandle; CursorShape:TCursorShape):LongWord;
Description: Set the current cursor shape of an existing console window


[Expand]
function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;
Description: Enable the cursor on an existing console window


[Expand]
function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;
Description: Disable the cursor on an existing console window


[Expand]
function ConsoleWindowCursorLine(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a vertical line on an existing console window


[Expand]
function ConsoleWindowCursorBar(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a horizontal bar on an existing console window


[Expand]
function ConsoleWindowCursorBlock(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a solid block on an existing console window


[Expand]
function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Move the cursor on an existing console window


[Expand]
function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;
Description: Set the blink state of the cursor on an existing console window


[Expand]
function ConsoleWindowAddHistory(Handle:TWindowHandle; const Value:String):LongWord;
Description: Add a value to the command history table of an existing console window


[Expand]
function ConsoleWindowClearHistory(Handle:TWindowHandle):LongWord;
Description: Remove all entries from the command history table of an existing console window}


[Expand]
function ConsoleWindowFirstHistory(Handle:TWindowHandle):String;
Description: Get the first (oldest) command history value from an existing console window


[Expand]
function ConsoleWindowLastHistory(Handle:TWindowHandle):String;
Description: Get the last (most recent) command history value from an existing console window


[Expand]
function ConsoleWindowNextHistory(Handle:TWindowHandle):String;
Description: Get the next (after current) command history value from an existing console window


[Expand]
function ConsoleWindowPreviousHistory(Handle:TWindowHandle):String;
Description: Get the next (before current) command history value from an existing console window


[Expand]
function ConsoleWindowCurrentHistory(Handle:TWindowHandle):String;
Description: Get the current command history value from an existing console window


[Expand]
function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window up


[Expand]
function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window down


[Expand]
function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window left


[Expand]
function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window right


[Expand]
function ConsoleWindowClear(Handle:TWindowHandle):LongWord;
Description: Clear the current viewport of an existing console window


[Expand]
function ConsoleWindowClearEx(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord; Cursor:Boolean):LongWord;
Description: Clear part of the the current viewport of an existing console window


[Expand]
function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;
Description: Write text on an existing console window at the current position in the current color


[Expand]
function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write text on an existing console window


[Expand]
function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;
Description: Write text on an existing console window at the current position in the current color


[Expand]
function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write text on an existing console window


[Expand]
function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;
Description: Write a character on an existing console window at the current position in the current color


[Expand]
function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write a character on an existing console window


[Expand]
function ConsoleWindowOutput(Handle:TWindowHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Output a rectangular area of text to a console window


[Expand]
function ConsoleWindowRead(Handle:TWindowHandle; var AText:String):LongWord;
Description: Read text input from the console and echo to an existing console window at the current position in the current color


[Expand]
function ConsoleWindowReadLn(Handle:TWindowHandle; var AText:String):LongWord;
Description: Read text input from the console and echo to an existing console window at the current position in the current color


[Expand]
function ConsoleWindowReadLnEx(Handle:TWindowHandle; var AText:String; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Scroll,History:Boolean; Completion:TConsoleWindowCompletion; Data:Pointer):LongWord;
Description: Read text input from the console and echo to an existing console window at the specified position in the specified color


[Expand]
function ConsoleWindowReadChr(Handle:TWindowHandle; var AChr:Char):LongWord;
Description: Read one character input from the console and echo to an existing console window at the current position in the current color


[Expand]
function ConsoleWindowReadChrEx(Handle:TWindowHandle; var AChr:Char; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Echo,Scroll:Boolean):LongWord;
Description: Read one character input from the console and optionally echo to an existing console window at the specified position in the specified color


CRT console functions

[Expand]
procedure ConsoleAssignCrt(var F:Text);
Description: Compatible with RTL Crt unit function AssignCrt


[Expand]
procedure ConsoleClrEol;
Description: Compatible with RTL Crt unit function ClrEol


[Expand]
procedure ConsoleClrScr;
Description: Compatible with RTL Crt unit function ClrScr


[Expand]
procedure ConsoleDelay(MS:Word);
Description: Compatible with RTL Crt unit function Delay


[Expand]
procedure ConsoleDelLine;
Description: Compatible with RTL Crt unit function DelLine


[Expand]
procedure ConsoleGotoXY(X,Y:Integer);
Description: Compatible with RTL Crt unit function GotoXY


[Expand]
procedure ConsoleHighVideo;
Description: Compatible with RTL Crt unit function HighVideo


[Expand]
procedure ConsoleInsLine;
Description: Compatible with RTL Crt unit function InsLine


[Expand]
function ConsoleKeypressed:Boolean;
Description: Compatible with RTL Crt unit function KeyPressed


[Expand]
procedure ConsoleLowVideo;
Description: Compatible with RTL Crt unit function LowVideo


[Expand]
procedure ConsoleNormVideo;
Description: Compatible with RTL Crt unit function NormVideo


[Expand]
procedure ConsoleNoSound;
Description: Compatible with RTL Crt unit function NoSound


[Expand]
function ConsoleReadKey:Char;
Description: Compatible with RTL Crt unit function ReadKey


[Expand]
procedure ConsoleSound(Hz:Word);
Description: Compatible with RTL Crt unit function Sound


[Expand]
procedure ConsoleTextBackground(Color:LongWord);
Description: Compatible with RTL Crt unit function TextBackground


[Expand]
procedure ConsoleTextColor(Color:LongWord);
Description: Compatible with RTL Crt unit function TextColor


[Expand]
procedure ConsoleTextMode(Mode:Integer);
Description: Compatible with RTL Crt unit function TextMode


[Expand]
function ConsoleWhereX:Integer;
Description: Compatible with RTL Crt unit function WhereX


[Expand]
function ConsoleWhereY:Integer;
Description: Compatible with RTL Crt unit function WhereY


[Expand]
procedure ConsoleWindow(X1,Y1,X2,Y2:Integer);
Description: Compatible with RTL Crt unit function Window


[Expand]
procedure ConsoleScrollUp(Row,Lines:Integer);
Description: Scroll the default console window up


[Expand]
procedure ConsoleScrollDown(Row,Lines:Integer);
Description: Scroll the default console window down


[Expand]
procedure ConsoleWrite(const AText:String);
Description: Write text on the default console window at the current position in the current color


[Expand]
procedure ConsoleWriteLn(const AText:String);
Description: Write text on the default console window at the current position in the current color


[Expand]
procedure ConsoleWriteChr(AChr:Char);
Description: Write a character on the default console window at the current position in the current color


[Expand]
procedure ConsoleRead(var AText:String);
Description: Read text from console input and echo to screen


[Expand]
procedure ConsoleReadLn(var AText:String);
Description: Read text from console input and echo to screen


[Expand]
procedure ConsoleReadChr(var AChr:Char);
Description: Read characters from console input and echo to screen


RTL text IO functions

[Expand]
function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform TextIOWriteChar function


RTL console functions

[Expand]
function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform ConsoleWriteChar function


Framebuffer console functions

[Expand]
function FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;
Description: Implementation of ConsoleDeviceOpen API for FramebufferConsole


[Expand]
function FramebufferConsoleClose(Console:PConsoleDevice):LongWord;
Description: Implementation of ConsoleDeviceClose API for FramebufferConsole


[Expand]
function FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceClear API for FramebufferConsole


[Expand]
function FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Description: Implementation of ConsoleDeviceScroll API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawBox API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawLine API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle;Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawChar API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawText API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawPixel API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawBlock API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawImage API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawWindow API for FramebufferConsole


[Expand]
function FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;
Description: Internal function used by FramebufferConsole to draw the console desktop


[Expand]
function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetPixel API for FramebufferConsole


[Expand]
function FramebufferConsoleGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetImage API for FramebufferConsole


[Expand]
function FramebufferConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDevicePutText API for FramebufferConsole


[Expand]
function FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Description: Implementation of ConsoleDeviceCopyImage API for FramebufferConsole


[Expand]
procedure FramebufferConsoleCaretTimer(Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device


[Expand]
procedure FramebufferConsoleShowCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device


[Expand]
procedure FramebufferConsoleHideCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device


[Expand]
function FramebufferConsoleAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
Description: Implementation of ConsoleDeviceAddCaret API for FramebufferConsole


[Expand]
function FramebufferConsoleDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
Description: Implementation of ConsoleDeviceDeleteCaret API for FramebufferConsole


[Expand]
function FramebufferConsoleUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;
Description: Implementation of ConsoleDeviceUpdateCaret API for FramebufferConsole


[Expand]
function FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetPosition API for FramebufferConsole


Console helper functions

[Expand]
function ConsoleDeviceGetCount:LongWord; inline;
Description: Get the current console device count


[Expand]
function ConsoleDeviceGetDefault:PConsoleDevice; inline;
Description: Get the current default console device


[Expand]
function ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;
Description: Set the current default console device


[Expand]
function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;
Description: Check if the supplied Console device is in the Console table


[Expand]
function ConsoleDeviceCaretCheck(Console:PConsoleDevice; Caret:PConsoleCaret):PConsoleCaret;
Description: Check if a console caret entry is valid


[Expand]
function ConsoleDeviceGetDefaultFont:TFontHandle;
Description: Get the default console font


[Expand]
function ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented


[Expand]
function ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented


[Expand]
function ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Description: To be documented


Text console helper functions

[Expand]
function ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;
Description: Get the current console window count


[Expand]
function ConsoleWindowGetActive(Console:PConsoleDevice):TWindowHandle; inline;
Description: Get the current console active window


[Expand]
function ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;
Description: Get the current console default window


[Expand]
function ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Description: Set the current console default window


[Expand]
function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;
Description: Check if a console window entry is valid


[Expand]
function ConsoleWindowGetDefaultFont:TFontHandle;
Description: Get the default console window font


[Expand]
function ConsoleWindowRedirectOutput(Handle:TWindowHandle):Boolean;
Description: Redirect standard output to the console window specified by Handle


Return to Unit Reference