Difference between revisions of "Unit Console"
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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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 | + | <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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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 | + | <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:''' | + | <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''' | ||
− | | | + | | 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 | + | <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:''' | + | <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 | + | <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:''' | + | <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:''' | + | <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:''' | + | <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:''' | + | <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:''' | + | <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:''' | + | <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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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:''' | + | <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:''' | + | <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''' | ||
− | | | + | | 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 | + | <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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''ConsoleId''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Device''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Name''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Description''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Callback''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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:''' | + | <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:''' | + | <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''' | ||
− | | | + | | The starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left |
|- | |- | ||
! '''Lines''' | ! '''Lines''' | ||
− | | | + | | The number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left |
|- | |- | ||
! '''Col''' | ! '''Col''' | ||
− | | | + | | The starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left |
|- | |- | ||
! '''Char''' | ! '''Char''' | ||
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | The starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right |
|- | |- | ||
! '''Lines''' | ! '''Lines''' | ||
− | | | + | | The number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right |
|- | |- | ||
! '''Col''' | ! '''Col''' | ||
− | | | + | | The starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right |
|- | |- | ||
! '''Char''' | ! '''Char''' | ||
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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 | + | <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:''' | + | <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:''' | + | <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''' | ||
− | | | + | | 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 | + | <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:''' | + | <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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Handle''' |
− | | | + | | 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 | + | <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:''' | + | <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:''' | + | <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:''' | + | <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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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''' | ||
− | | | + | | 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:''' | + | <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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Chr''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Text''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Text''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Chr''' |
− | | | + | | 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 | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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;" | ||
|- | |- | ||
− | ! ''' | + | ! '''Console''' |
− | | | + | | 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:''' | + | <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
Contents
[hide]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
CONSOLE_*
CONSOLE_TYPE_*
CONSOLE_STATE_*
CONSOLE_FLAG_*
CONSOLE_MODE_*
CARET_SIGNATURE*
WINDOW_SIGNATURE_*
WINDOW_STATE_*
WINDOW_MODE_*
WINDOW_FLAG_*
WINDOW_DRAW_FLAG_*
WINDOW_HISTORY_*
FRAMEBUFFER_CONSOLE_*
Type definitions
Cursor state
TCursorState = (CURSORON,CURSOROFF);
|
Console char
Console point
TConsolePoint = record
Console rect
TConsoleRect = record
Console properties
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
Window properties
Console window enumeration callback
TConsoleWindowEnumerate = function(Console:PConsoleDevice; Handle:TWindowHandle; Data:Pointer):LongWord;
|
Console window
Framebuffer console
Public variables
None defined
Function declarations
Initialization functions
Console functions
function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;
function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function ConsoleDevicePlotLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
function ConsoleDeviceDrawCircle(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;
function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
function ConsoleDeviceAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
function ConsoleDeviceDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
function ConsoleDeviceUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;
function ConsoleDeviceSetCursor(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;
function ConsoleDeviceUpdateCursor(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;
function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;
function ConsoleDeviceUpdateFlag(Console:PConsoleDevice; Flag:LongWord; Clear:Boolean):LongWord;
function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;
function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;
function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;
function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;
function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;
function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;
function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;
function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;
function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;
function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;
function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;
function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Text console functions
function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
function ConsoleWindowCreateEx(Console:PConsoleDevice; Font:TFontHandle; Size,State,Mode,Position:LongWord; Default:Boolean):TWindowHandle;
function ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;
function ConsoleWindowShow(Handle:TWindowHandle):LongWord;
function ConsoleWindowHide(Handle:TWindowHandle):LongWord;
function ConsoleWindowActivate(Handle:TWindowHandle):LongWord;
function ConsoleWindowDeactivate(Handle:TWindowHandle):LongWord;
function ConsoleWindowNext(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
function ConsoleWindowPrevious(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
function ConsoleWindowAt(Console:PConsoleDevice; X,Y:LongWord; Visible:Boolean):TWindowHandle;
function ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;
function ConsoleWindowEnumerate(Console:PConsoleDevice; Callback:TConsoleWindowEnumerate; Data:Pointer):LongWord;
function ConsoleWindowCheckFlag(Handle:TWindowHandle; Flag:LongWord):Boolean;
function ConsoleWindowUpdateFlag(Handle:TWindowHandle; Flag:LongWord; Clear:Boolean):LongWord;
function ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetState(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetPosition(Handle:TWindowHandle; Position:LongWord):LongWord;
function ConsoleWindowGetProperties(Handle:TWindowHandle; Properties:PWindowProperties):LongWord;
function ConsoleWindowGetMinX(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMinY(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMaxX(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMaxY(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetRect(Handle:TWindowHandle):TConsoleRect; inline;
function ConsoleWindowSetRect(Handle:TWindowHandle; const ARect:TConsoleRect):LongWord; inline;
function ConsoleWindowResetRect(Handle:TWindowHandle):LongWord; inline;
function ConsoleWindowGetViewport(Handle:TWindowHandle; var X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleWindowSetViewport(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleWindowResetViewport(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetX(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetX(Handle:TWindowHandle; X:LongWord):LongWord;
function ConsoleWindowGetY(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetY(Handle:TWindowHandle; Y:LongWord):LongWord;
function ConsoleWindowGetXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
function ConsoleWindowSetXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowGetPoint(Handle:TWindowHandle):TConsolePoint;
function ConsoleWindowSetPoint(Handle:TWindowHandle; const APoint:TConsolePoint):LongWord;
function ConsoleWindowGetCols(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetRows(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetWidth(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetHeight(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetFormat(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetForecolor(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetForecolor(Handle:TWindowHandle; Color:LongWord):LongWord;
function ConsoleWindowGetBackcolor(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetBackcolor(Handle:TWindowHandle; Color:LongWord):LongWord;
function ConsoleWindowGetFont(Handle:TWindowHandle):TFontHandle;
function ConsoleWindowSetFont(Handle:TWindowHandle; Font:TFontHandle):LongWord;
function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowGetCursorMode(Handle:TWindowHandle):TCursorMode;
function ConsoleWindowSetCursorMode(Handle:TWindowHandle;CursorMode:TCursorMode):LongWord;
function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;
function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;
function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;
function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;
function ConsoleWindowGetCursorShape(Handle:TWindowHandle):TCursorShape;
function ConsoleWindowSetCursorShape(Handle:TWindowHandle; CursorShape:TCursorShape):LongWord;
function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorLine(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorBar(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorBlock(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;
function ConsoleWindowAddHistory(Handle:TWindowHandle; const Value:String):LongWord;
function ConsoleWindowClearHistory(Handle:TWindowHandle):LongWord;
function ConsoleWindowFirstHistory(Handle:TWindowHandle):String;
function ConsoleWindowLastHistory(Handle:TWindowHandle):String;
function ConsoleWindowNextHistory(Handle:TWindowHandle):String;
function ConsoleWindowPreviousHistory(Handle:TWindowHandle):String;
function ConsoleWindowCurrentHistory(Handle:TWindowHandle):String;
function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
function ConsoleWindowClear(Handle:TWindowHandle):LongWord;
function ConsoleWindowClearEx(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord; Cursor:Boolean):LongWord;
function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;
function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;
function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;
function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowOutput(Handle:TWindowHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
function ConsoleWindowRead(Handle:TWindowHandle; var AText:String):LongWord;
function ConsoleWindowReadLn(Handle:TWindowHandle; var AText:String):LongWord;
function ConsoleWindowReadLnEx(Handle:TWindowHandle; var AText:String; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Scroll,History:Boolean; Completion:TConsoleWindowCompletion; Data:Pointer):LongWord;
function ConsoleWindowReadChr(Handle:TWindowHandle; var AChr:Char):LongWord;
function ConsoleWindowReadChrEx(Handle:TWindowHandle; var AChr:Char; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Echo,Scroll:Boolean):LongWord;
CRT console functions
procedure ConsoleAssignCrt(var F:Text);
procedure ConsoleGotoXY(X,Y:Integer);
function ConsoleKeypressed:Boolean;
procedure ConsoleTextBackground(Color:LongWord);
procedure ConsoleTextColor(Color:LongWord);
procedure ConsoleTextMode(Mode:Integer);
procedure ConsoleWindow(X1,Y1,X2,Y2:Integer);
procedure ConsoleScrollUp(Row,Lines:Integer);
procedure ConsoleScrollDown(Row,Lines:Integer);
procedure ConsoleWrite(const AText:String);
procedure ConsoleWriteLn(const AText:String);
procedure ConsoleWriteChr(AChr:Char);
procedure ConsoleRead(var AText:String);
procedure ConsoleReadLn(var AText:String);
procedure ConsoleReadChr(var AChr:Char);
RTL text IO functions
function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
RTL console functions
function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Framebuffer console functions
function FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;
function FramebufferConsoleClose(Console:PConsoleDevice):LongWord;
function FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
function FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
function FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function FramebufferConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle;Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function FramebufferConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
function FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
function FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
function FramebufferConsoleDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
function FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;
function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
function FramebufferConsoleGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function FramebufferConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
function FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
procedure FramebufferConsoleCaretTimer(Caret:PConsoleCaret);
procedure FramebufferConsoleShowCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
procedure FramebufferConsoleHideCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
function FramebufferConsoleAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
function FramebufferConsoleDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
function FramebufferConsoleUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;
function FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Console helper functions
function ConsoleDeviceGetCount:LongWord; inline;
function ConsoleDeviceGetDefault:PConsoleDevice; inline;
function ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;
function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;
function ConsoleDeviceCaretCheck(Console:PConsoleDevice; Caret:PConsoleCaret):PConsoleCaret;
function ConsoleDeviceGetDefaultFont:TFontHandle;
function ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;
function ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;
function ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;
function ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Text console helper functions
function ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;
function ConsoleWindowGetActive(Console:PConsoleDevice):TWindowHandle; inline;
function ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;
function ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;
function ConsoleWindowGetDefaultFont:TFontHandle;
function ConsoleWindowRedirectOutput(Handle:TWindowHandle):Boolean;
Return to Unit Reference