Difference between revisions of "Unit Console"

From Ultibo.org
Jump to: navigation, search
 
(67 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''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 ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console specific constants''' <code> CONSOLE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONSOLE_NAME_PREFIX = 'Console';</code>
 +
| Name prefix for Console Devices
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console device type''' <code> CONSOLE_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONSOLE_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CONSOLE_TYPE_FRAMEBUFFER = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONSOLE_TYPE_SERIAL = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONSOLE_TYPE_REMOTE = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONSOLE_TYPE_LCD = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CONSOLE_TYPE_MAX = 4;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console device state''' <code> CONSOLE_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONSOLE_STATE_CLOSED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CONSOLE_STATE_OPEN = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CONSOLE_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console device flag''' <code> CONSOLE_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONSOLE_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONSOLE_FLAG_LINE_WRAP = $00000001;</code>
 +
| Wrap long lines to the next line if set
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_BOX = $00000002;</code>
 +
| Use DMA to draw boxes (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_LINE = $00000004;</code>
 +
| Use DMA to draw lines (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_FILL = $00000008;</code>
 +
| Use DMA to fill blocks (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_CLEAR = $00000010;</code>
 +
| Use DMA to clear blocks (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_SCROLL = $00000020;</code>
 +
| Use DMA to scroll blocks (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_SINGLE_WINDOW = $00000040;</code>
 +
| Console supports only one window (Not multiple)
 +
|-
 +
| <code>CONSOLE_FLAG_HARDWARE_CURSOR = $00000080;</code>
 +
| Console supports a hardware cursor (Mouse pointer) (Character mode only)
 +
|-
 +
| <code>CONSOLE_FLAG_HARDWARE_CARET = $00000100;</code>
 +
| Console supports a hardware caret (Text cursor)
 +
|-
 +
| <code>CONSOLE_FLAG_BLINK_CARET = $00000200;</code>
 +
| Console supports blinking caret
 +
|-
 +
| <code>CONSOLE_FLAG_TEXT_MODE = $00000400;</code>
 +
| Console supports text mode settings
 +
|-
 +
| <code>CONSOLE_FLAG_TEXT_BLINK = $00000800;</code>
 +
| Console supports blinking text
 +
|-
 +
| <code>CONSOLE_FLAG_COLOR = $00001000;</code>
 +
| Console supports colors
 +
|-
 +
| <code>CONSOLE_FLAG_FONT = $00002000;</code>
 +
| Console supports font
 +
|-
 +
| <code>CONSOLE_FLAG_FULLSCREEN = $00004000;</code>
 +
| Console supports creating a fullscreen window
 +
|-
 +
| <code>CONSOLE_FLAG_AUTO_SCROLL = $00008000;</code>
 +
| Automatically scroll up on reaching the last line
 +
|-
 +
| <code>CONSOLE_FLAG_DMA_TEXT = $00010000;</code>
 +
| Use DMA to draw text (Where applicable)
 +
|-
 +
| <code>CONSOLE_FLAG_COLOR_REVERSE = $00020000;</code>
 +
| Console requires colors to be reversed for underlying hardware
 +
|-
 +
| <code>CONSOLE_FLAG_TEXT_CARET = $00040000;</code>
 +
| Console supports a caret (Text cursor)
 +
|-
 +
| <code>CONSOLE_FLAG_FOCUS_CARET = $00080000;</code>
 +
| Only show caret on the focused (active) window
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>CONSOLE_FLAG_DMA_MASK = CONSOLE_FLAG_DMA_BOX or CONSOLE_FLAG_DMA_LINE or CONSOLE_FLAG_DMA_FILL or CONSOLE_FLAG_DMA_CLEAR or CONSOLE_FLAG_DMA_SCROLL or CONSOLE_FLAG_DMA_TEXT;</code>
 +
|-
 +
|colspan="2"|Flags that cannot be changed by ConsoleDeviceUpdateFlag
 +
|-
 +
|colspan="2"|<code>CONSOLE_FLAG_INTERNAL = CONSOLE_FLAG_SINGLE_WINDOW or CONSOLE_FLAG_HARDWARE_CURSOR or CONSOLE_FLAG_HARDWARE_CARET or CONSOLE_FLAG_BLINK_CARET or CONSOLE_FLAG_TEXT_MODE or CONSOLE_FLAG_TEXT_BLINK or CONSOLE_FLAG_COLOR or CONSOLE_FLAG_FONT or CONSOLE_FLAG_FULLSCREEN or CONSOLE_FLAG_COLOR_REVERSE or CONSOLE_FLAG_TEXT_CARET;</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console device mode''' <code> CONSOLE_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CONSOLE_MODE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CONSOLE_MODE_PIXEL = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CONSOLE_MODE_CHARACTER = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console caret signature''' <code> CARET_SIGNATURE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CARET_SIGNATURE = $9A2D40E3;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window signature''' <code> WINDOW_SIGNATURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_SIGNATURE = $DE3A5C04;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window state''' <code> WINDOW_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_STATE_INVISIBLE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>WINDOW_STATE_VISIBLE = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINDOW_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window mode''' <code> WINDOW_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_MODE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>WINDOW_MODE_TEXT = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WINDOW_MODE_GRAPHICS = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WINDOW_MODE_MAX = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window flag''' <code> WINDOW_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WINDOW_FLAG_LINE_WRAP = $00000001;</code>
 +
| Wrap long lines to the next line if set
 +
|-
 +
| <code>WINDOW_FLAG_BUFFERED = $00000002;</code>
 +
| Buffer output for scroll back and redraw
 +
|-
 +
| <code>WINDOW_FLAG_FULLSCREEN = $00000004;</code>
 +
| Window occupies the full screen
 +
|-
 +
| <code>WINDOW_FLAG_AUTO_SCROLL = $00000008;</code>
 +
| Automatically scroll up on reaching the last line
 +
|-
 +
| <code>WINDOW_FLAG_CHARACTER = $00000010;</code>
 +
| Console for this Window is character mode only
 +
|-
 +
| <code>WINDOW_FLAG_AUTO_UPDATE = $00000020;</code>
 +
| Automatically update output of buffered window
 +
|-
 +
| <code>WINDOW_FLAG_FOCUS_CURSOR = $00000040;</code>
 +
| Only show cursor (caret) on the focused (active) window
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|Flags that cannot be changed by ConsoleWindowUpdateFlag
 +
|-
 +
|colspan="2"|<code>WINDOW_FLAG_INTERNAL = WINDOW_FLAG_FULLSCREEN or WINDOW_FLAG_CHARACTER;</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window draw flag''' <code> WINDOW_DRAW_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_DRAW_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WINDOW_DRAW_FLAG_BODY = $00000001;</code>
 +
| Draw the Window body
 +
|-
 +
| <code>WINDOW_DRAW_FLAG_TITLE = $00000002;</code>
 +
| Draw the Window title
 +
|-
 +
| <code>WINDOW_DRAW_FLAG_BORDER = $00000004;</code>
 +
| Draw the Window border
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>WINDOW_DRAW_FLAG_ALL = WINDOW_DRAW_FLAG_BODY or WINDOW_DRAW_FLAG_TITLE or WINDOW_DRAW_FLAG_BORDER;</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Console window history''' <code> WINDOW_HISTORY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WINDOW_HISTORY_MAX_COUNT = 100;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Framebuffer console''' <code> FRAMEBUFFER_CONSOLE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>FRAMEBUFFER_CONSOLE_TITLE = 'Ultibo Core (Release: ' + ULTIBO_RELEASE_NAME + ' Version: ' + ULTIBO_RELEASE_VERSION + ' Date: ' + ULTIBO_RELEASE_DATE + ')';</code>
 +
| &nbsp;
 +
|-
 +
| <code>FRAMEBUFFER_CONSOLE_DESCRIPTION = 'Framebuffer Console';</code>
 +
| Description of the Framebuffer Console device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Cursor mode'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TCursorMode = (CURSOR_MODE_INSERT,CURSOR_MODE_OVERWRITE);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Cursor state'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TCursorState = (CURSORON,CURSOROFF);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Cursor shape'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TCursorShape = (CURSOR_SHAPE_LINE,CURSOR_SHAPE_BAR,CURSOR_SHAPE_BLOCK);</code>
 +
| style="width: 40%;"|Line is a vertical line, Bar is a horizontal bar and Block is a solid block (All shapes inverse any character data under them)
 +
|-
 +
|}
 +
 
 +
'''Console char'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PConsoleChar = ^TConsoleChar;</code>
 +
 
 +
<code>TConsoleChar = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Ch:Char;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Forecolor:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Backcolor:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console point'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>TConsolePoint = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>X:LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Y:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console rect'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>TConsoleRect = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>X1:LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Y1:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>X2:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Y2:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Console properties''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PConsoleProperties = ^TConsoleProperties;</code>
 +
 
 +
<code>TConsoleProperties = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Console device flags (eg CONSOLE_FLAG_FULLSCREEN)
 +
|-
 +
| <code>Mode:LongWord;</code>
 +
| Console device mode (eg CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>Width:LongWord;</code>
 +
| Console Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Height:LongWord;</code>
 +
| Console Height (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Format:LongWord;</code>
 +
| Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleEnumerate = function(Console:PConsoleDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device open'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceOpen = function(Console:PConsoleDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device close'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceClose = function(Console:PConsoleDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device clear'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceClear = function(Console:PConsoleDevice; Color:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device scroll'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceScroll = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw box'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawBox = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw line'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawLine = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device plot line'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDevicePlotLine = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw char'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawChar = function(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char;X,Y,Forecolor,Backcolor:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw text'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawText = function(Console:PConsoleDevice; Handle:TFontHandle; const Text:String;X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw pixel'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawPixel = function(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw block'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawBlock = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw circle'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawCircle = function(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw image'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device draw window'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDrawWindow = function(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device get pixel'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceGetPixel = function(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device get image'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceGetImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device put text'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDevicePutText = function(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device copy image'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceCopyImage = function(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device add caret'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceAddCaret = function(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device delete caret'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceDeleteCaret = function(Console:PConsoleDevice; Handle:THandle):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device update caret'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceUpdateCaret = function(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device update caret extended'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceUpdateCaretEx = function(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device set cursor'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceSetCursor = function(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device update cursor'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceUpdateCursor = function(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device get position'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceGetPosition = function(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device get properties'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleDeviceGetProperties = function(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PConsoleDevice = ^TConsoleDevice;</code>
 +
 
 +
<code>TConsoleDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| The Device entry for this Console device
 +
|-
 +
|colspan="2"|''Console Properties''
 +
|-
 +
| <code>ConsoleId:LongWord;</code>
 +
| Unique Id of this Console device in the Console device table
 +
|-
 +
| <code>ConsoleState:LongWord;</code>
 +
| Console device state (eg CONSOLE_STATE_OPEN)
 +
|-
 +
| <code>ConsoleMode:LongWord;</code>
 +
| Console device mode (eg CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceOpen:TConsoleDeviceOpen;</code>
 +
| A device specific DeviceOpen method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceClose:TConsoleDeviceClose;</code>
 +
| A device specific DeviceClose method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceClear:TConsoleDeviceClear;</code>
 +
| A device specific DeviceClear method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceScroll:TConsoleDeviceScroll;</code>
 +
| A device specific DeviceScroll method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceDrawBox:TConsoleDeviceDrawBox;</code>
 +
| A device specific DeviceDrawBox method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceDrawLine:TConsoleDeviceDrawLine;</code>
 +
| A device specific DeviceDrawLine method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DevicePlotLine:TConsoleDevicePlotLine;</code>
 +
| A device specific DevicePlotLine method implementing a standard console device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceDrawChar:TConsoleDeviceDrawChar;</code>
 +
| A device specific DeviceDrawChar method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceDrawText:TConsoleDeviceDrawText;</code>
 +
| A device specific DeviceDrawText method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceDrawPixel:TConsoleDeviceDrawPixel;</code>
 +
| A device specific DeviceDrawPixel method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceDrawBlock:TConsoleDeviceDrawBlock;</code>
 +
| A device specific DeviceDrawBlock method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceDrawCircle:TConsoleDeviceDrawCircle;</code>
 +
| A device specific DeviceDrawCircle method implementing a standard console device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceDrawImage:TConsoleDeviceDrawImage;</code>
 +
| A device specific DeviceDrawImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceDrawWindow:TConsoleDeviceDrawWindow;</code>
 +
| A device specific DeviceDrawWindow method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceGetPixel:TConsoleDeviceGetPixel;</code>
 +
| A device specific DeviceGetPixel method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceGetImage:TConsoleDeviceGetImage;</code>
 +
| A device specific DeviceGetImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DevicePutText:TConsoleDevicePutText;</code>
 +
| A device specific DevicePutText method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceCopyImage:TConsoleDeviceCopyImage;</code>
 +
| A device specific DeviceCopyImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>DeviceAddCaret:TConsoleDeviceAddCaret;</code>
 +
| A device specific DeviceAddCaret method implementing a standard console device interface (Optional)
 +
|-
 +
| <code>DeviceDeleteCaret:TConsoleDeviceDeleteCaret;</code>
 +
| A device specific DeviceDeleteCaret method implementing a standard console device interface (Optional)
 +
|-
 +
| <code>DeviceUpdateCaret:TConsoleDeviceUpdateCaret;</code>
 +
| A device specific DeviceUpdateCaret method implementing a standard console device interface (Optional)
 +
|-
 +
| <code>DeviceUpdateCaretEx:TConsoleDeviceUpdateCaretEx;</code>
 +
| A device specific DeviceUpdateCaretEx method implementing a standard console device interface (Optional)
 +
|-
 +
| <code>DeviceSetCursor:TConsoleDeviceSetCursor;</code>
 +
| A device specific DeviceSetCursor method implementing a standard console device interface (Or nil if the default method is suitable)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>DeviceUpdateCursor:TConsoleDeviceUpdateCursor;</code>
 +
| A device specific DeviceUpdateCursor method implementing a standard console device interface (Or nil if the default method is suitable)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>DeviceGetPosition:TConsoleDeviceGetPosition;</code>
 +
| A device specific DeviceGetPosition method implementing a standard console device interface (Mandatory)
 +
|-
 +
| <code>DeviceGetProperties:TConsoleDeviceGetProperties;</code>
 +
| A device specific DeviceGetProperties method implementing a standard console device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>OpenCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CloseCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ClearCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ScrollCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DrawCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GetCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PutCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CopyCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Width:LongWord;</code>
 +
| Console Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Height:LongWord;</code>
 +
| Console Height (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Format:LongWord;</code>
 +
| Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>Forecolor:LongWord;</code>
 +
| Foreground Color
 +
|-
 +
| <code>Backcolor:LongWord;</code>
 +
| Background Color
 +
|-
 +
| <code>Borderwidth:LongWord;</code>
 +
| Border Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Bordercolor:LongWord;</code>
 +
| Border Color
 +
|-
 +
|colspan="2"|''Font Properties''
 +
|-
 +
| <code>Font:TFontHandle;</code>
 +
| Console Font
 +
|-
 +
| <code>FontRatio:LongWord;</code>
 +
| Font Characters to Pixels Ratio (Normally 1 for Pixel Console/0 for Character Console)
 +
|-
 +
|colspan="2"|''Cursor Properties''
 +
|-
 +
| <code>CursorUpdate:LongBool;</code>
 +
| Flag to indicate if cursor update (Show/Hide) is in progress (CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorX:LongWord;</code>
 +
| Cursor X (Characters)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorY:LongWord;</code>
 +
| Cursor Y (Characters)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorWidth:LongWord;</code>
 +
| Cursor Width (Characters)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorHeight:LongWord;</code>
 +
| Cursor Height (Characters)(CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorVisible:LongBool;</code>
 +
| Cursor Visible On/Off (CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorChars:PChar;</code>
 +
| Buffer for cursor characters (CONSOLE_MODE_CHARACTER only)
 +
|-
 +
| <code>CursorBuffer:PChar;</code>
 +
| Buffer for characters currently under cursor (CONSOLE_MODE_CHARACTER only)
 +
|-
 +
|colspan="2"|''Caret Properties''
 +
|-
 +
| <code>CaretFirst:PConsoleCaret;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CaretLock:TCriticalSectionHandle;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CaretCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Window Properties''
 +
|-
 +
| <code>WindowFirst:PConsoleWindow;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WindowLock:TCriticalSectionHandle;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WindowCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WindowDefault:TWindowHandle;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PConsoleDevice;</code>
 +
| Previous entry in Console device table
 +
|-
 +
| <code>Next:PConsoleDevice;</code>
 +
| Next entry in Console device table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console caret'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>TConsoleCaret = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Caret Properties''
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>X:LongWord;</code>
 +
| Caret X (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Y:LongWord;</code>
 +
| Caret Y (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Width:LongWord;</code>
 +
| Caret Width (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Height:LongWord;</code>
 +
| Caret Height (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>OffsetX:LongWord;</code>
 +
| Caret Offset X (Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>OffsetY:LongWord;</code>
 +
| Caret Offset Y (Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Visible:LongBool;</code>
 +
| Caret Visible On/Off
 +
|-
 +
| <code>Blink:LongBool;</code>
 +
| Caret Blink On/Off
 +
|-
 +
| <code>Reverse:LongBool;</code>
 +
| Caret Color Reverse or Inverse
 +
|-
 +
| <code>Forecolor:LongWord;</code>
 +
| Caret Foreground Color
 +
|-
 +
| <code>Backcolor:LongWord;</code>
 +
| Caret Background Color
 +
|-
 +
| <code>Console:PConsoleDevice;</code>
 +
| Console device
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Handle:THandle;</code>
 +
| Device specific handle
 +
|-
 +
| <code>Active:LongBool;</code>
 +
| Caret currently active (displayed) (Independent of Visible to account for Blink)
 +
|-
 +
| <code>Image:Pointer;</code>
 +
| Device specific buffer for caret image
 +
|-
 +
| <code>Buffer:Pointer;</code>
 +
| Device specific buffer for area underneath caret
 +
|-
 +
| <code>Output:Pointer;</code>
 +
| Device specific buffer for curently displayed caret
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PConsoleCaret;</code>
 +
| Previous entry in Console Caret table
 +
|-
 +
| <code>Next:PConsoleCaret;</code>
 +
| Next entry in Console Caret table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Window properties'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PWindowProperties = ^TWindowProperties;</code>
 +
 
 +
<code>TWindowProperties = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Position:LongWord;</code>
 +
| Console Window Position (eg CONSOLE_POSITION_TOP)
 +
|-
 +
| <code>State:LongWord;</code>
 +
| Console Window State (eg WINDOW_STATE_VISIBLE)
 +
|-
 +
| <code>Mode:LongWord;</code>
 +
| Console Window Mode (eg WINDOW_MODE_TEXT)
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Console Window Flags (eg WINDOW_FLAG_LINE_WRAP)
 +
|-
 +
| <code>X1:LongWord;</code>
 +
| (Window X1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Y1:LongWord;</code>
 +
| (Window Y1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>X2:LongWord;</code>
 +
| (Window X2)Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Y2:LongWord;</code>
 +
| (Window Y2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Width:LongWord;</code>
 +
| Window Width in Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Height:LongWord;</code>
 +
| Window Height in Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>OffsetX:LongWord;</code>
 +
| Window X Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>OffsetY:LongWord;</code>
 +
| Window Y Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>FontWidth:LongWord;</code>
 +
| Font Width (Pixels)
 +
|-
 +
| <code>FontHeight:LongWord;</code>
 +
| Font Height (Pixels)
 +
|-
 +
| <code>Borderwidth:LongWord;</code>
 +
| Current Border Width
 +
|-
 +
| <code>Font:TFontHandle;</code>
 +
| Window Font
 +
|-
 +
| <code>Console:PConsoleDevice;</code>
 +
| Window console
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console window enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleWindowEnumerate = function(Console:PConsoleDevice; Handle:TWindowHandle; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console window completion callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConsoleWindowCompletion = function(Handle:TWindowHandle; var Buffer:String; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Console window'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PConsoleWindow = ^TConsoleWindow;</code>
 +
 
 +
<code>TConsoleWindow = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Window Properties''
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>Position:LongWord;</code>
 +
| Console Window Position (eg CONSOLE_POSITION_TOP)
 +
|-
 +
| <code>WindowState:LongWord;</code>
 +
| Console Window State (eg WINDOW_STATE_VISIBLE)
 +
|-
 +
| <code>WindowMode:LongWord;</code>
 +
| Console Window Mode (eg WINDOW_MODE_TEXT)
 +
|-
 +
| <code>WindowFlags:LongWord;</code>
 +
| Console Window Flags (eg WINDOW_FLAG_LINE_WRAP)
 +
|-
 +
| <code>X1:LongWord;</code>
 +
| (Window X1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Y1:LongWord;</code>
 +
| (Window Y1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>X2:LongWord;</code>
 +
| (Window X2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Y2:LongWord;</code>
 +
| Window Y2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>Width:LongWord;</code>
 +
| Window Width in Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Height:LongWord;</code>
 +
| Window Height in Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>OffsetX:LongWord;</code>
 +
| Window X Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>OffsetY:LongWord;</code>
 +
| Window Y Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>MinX:LongWord;</code>
 +
| (Viewport X1) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>MinY:LongWord;</code>
 +
| (Viewport Y1) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>MaxX:LongWord;</code>
 +
| (Viewport X2) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>MaxY:LongWord;</code>
 +
| (Viewport Y2) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>X:LongWord;</code>
 +
| (Current X) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Y:LongWord;</code>
 +
| (Current Y) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Cols:LongWord;</code>
 +
| Viewport Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Rows:LongWord;</code>
 +
| Viewport Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>Format:LongWord;</code>
 +
| Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)
 +
|-
 +
| <code>Forecolor:LongWord;</code>
 +
| Current Foreground Color
 +
|-
 +
| <code>Backcolor:LongWord;</code>
 +
| Current Background Color
 +
|-
 +
| <code>Borderwidth:LongWord;</code>
 +
| Current Border Width
 +
|-
 +
| <code>Bordercolor:LongWord;</code>
 +
| Current Border Color
 +
|-
 +
|colspan="2"|''Font Properties''
 +
|-
 +
| <code>Font:TFontHandle;</code>
 +
| Window Font
 +
|-
 +
| <code>FontWidth:LongWord;</code>
 +
| Font Width (Pixels)
 +
|-
 +
| <code>FontHeight:LongWord;</code>
 +
| Font Height (Pixels)
 +
|-
 +
|colspan="2"|''Cursor Properties''
 +
|-
 +
| <code>CursorX:LongWord;</code>
 +
| (Cursor X) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>CursorY:LongWord;</code>
 +
| (Cursor Y) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
 +
|-
 +
| <code>CursorMode:LongWord;</code>
 +
| Cursor Mode (eg CURSOR_MODE_INSERT)
 +
|-
 +
| <code>CursorBlink:Boolean;</code>
 +
| Cursor Blink On/Off
 +
|-
 +
| <code>CursorState:TCursorState;</code>
 +
| Cursor State On/Off
 +
|-
 +
| <code>CursorShape:TCursorShape;</code>
 +
| Cursor Shape Line/Bar/Block
 +
|-
 +
| <code>CursorReverse:LongBool;</code>
 +
| Cursor Color Reverse or Inverse (WINDOW_MODE_TEXT only)
 +
|-
 +
| <code>CursorForecolor:LongWord;</code>
 +
| Cursor Foreground Color (WINDOW_MODE_TEXT only)
 +
|-
 +
| <code>CursorBackcolor:LongWord;</code>
 +
| Cursor Background Color (WINDOW_MODE_TEXT only)
 +
|-
 +
|colspan="2"|''Caret Properties''
 +
|-
 +
| <code>CaretX:LongWord;</code>
 +
| Caret X Console Relative (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>CaretY:LongWord;</code>
 +
| Caret Y Console Relative (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
| <code>CaretHandle:THandle;</code>
 +
| Caret (Cursor) Handle (or INVALID_HANDLE_VALUE)
 +
|-
 +
|colspan="2"|''History Properties''
 +
|-
 +
| <code>HistoryFirst:PConsoleHistory;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HistoryLast:PConsoleHistory;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HistoryCurrent:PConsoleHistory;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HistoryCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Window lock
 +
|-
 +
| <code>Console:PConsoleDevice;</code>
 +
| Window console
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PConsoleWindow;</code>
 +
| Previous entry in Console Window table
 +
|-
 +
| <code>Next:PConsoleWindow;</code>
 +
| Next entry in Console Window table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Console history'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>TConsoleHistory = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''History Properties''
 +
|-
 +
| <code>Value:PChar;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Length:Integer;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PConsoleHistory;</code>
 +
| Previous entry in History table
 +
|-
 +
| <code>Next:PConsoleHistory;</code>
 +
| Next entry in History table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Framebuffer console'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PFramebufferConsole = ^TFramebufferConsole;</code>
 +
 
 +
<code>TFramebufferConsole = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Console Properties''
 +
|-
 +
| <code>Console:TConsoleDevice;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Framebuffer Properties''
 +
|-
 +
| <code>Framebuffer:PFramebufferDevice;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DesktopX:LongWord;</code>
 +
| Desktop X (Left) Console Relative (Pixels)
 +
|-
 +
| <code>DesktopY:LongWord;</code>
 +
| Desktop Y (Right) Console Relative (Pixels)
 +
|-
 +
| <code>DesktopWidth:LongWord;</code>
 +
| Desktop (Width) Console Relative (Pixels)
 +
|-
 +
| <code>DesktopHeight:LongWord;</code>
 +
| Desktop (Height) Console Relative (Pixels)
 +
|-
 +
| <code>DesktopOffset:LongWord;</code>
 +
| Desktop (Offset)
 +
|-
 +
| <code>DesktopColor:LongWord;</code>
 +
| Desktop (Color)
 +
|-
 +
|colspan="2"|''Buffer Properties''
 +
|-
 +
| <code>LineBuffer:Pointer;</code>
 +
| Buffer for device reads and writes (Size of one line)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 28: Line 1,335:
 
'''Initialization functions'''
 
'''Initialization functions'''
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">procedure ConsoleInit;</code>
+
<pre style="border: 0; padding-bottom:0px;">procedure ConsoleInit;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the Console unit and Console device table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Note
| To be documented
+
| Called only during system startup
 
|-
 
|-
 
|}
 
|}
Line 42: Line 1,350:
 
'''Console functions'''
 
'''Console functions'''
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Open a console device ready for drawing</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| The console device to open
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Close a console device to prevent drawing</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| The console device to close
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceClear(Console:PConsoleDevice;Color:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Clear a console device using the specified color</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Scroll all or part of a console device in the specified direction</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| The console device to scroll
 +
|-
 +
! X1
 +
| The left edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! Y1
 +
| The top edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! X2
 +
| The right edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! Y2
 +
| The bottom edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! Count
 +
| The number of pixels or characters (depending on console mode) to scroll
 +
|-
 +
! Direction
 +
| The direction to scroll (eg CONSOLE_DIRECTION_UP)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceScroll(Console:PConsoleDevice;X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw an outline of a box on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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
 +
|-
 +
! 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
 
|-
 
|-
! '''Description'''
+
! Note
| To be documented
+
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawBox(Console:PConsoleDevice;X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a horizontal or vertical line on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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
 +
|-
 +
! 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
 
|-
 
|-
! '''Description'''
+
! Note
| To be documented
+
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawLine(Console:PConsoleDevice;X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDevicePlotLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a line in any direction on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| 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
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawChar(Console:PConsoleDevice;Handle:TFontHandle;Ch:Char;X,Y,Forecolor,Backcolor:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a character on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawText(Console:PConsoleDevice;Handle:TFontHandle;const Text:String;X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</code>
+
<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 class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a text string on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawPixel(Console:PConsoleDevice;X,Y,Color:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a pixel on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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 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
 
|-
 
|-
! '''Description'''
+
! Note
| To be documented
+
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawBlock(Console:PConsoleDevice;X1,Y1,X2,Y2,Color:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a filled block on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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
 +
|-
 +
! 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
 
|-
 
|-
! '''Description'''
+
! Note
| To be documented
+
| Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawImage(Console:PConsoleDevice;X,Y:LongWord;Buffer:Pointer;Width,Height,Format,Skip:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawCircle(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a circle on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDrawWindow(Console:PConsoleDevice;Handle:TWindowHandle):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw an image on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| The number of pixels to skip in the buffer after each row (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetPixel(Console:PConsoleDevice;X,Y:LongWord;var Color:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Draw a console window on a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| The console device to draw on
 +
|-
 +
! Handle
 +
| The handle of the console window to draw
 +
|-
 +
! Flags
 +
| Flags to specify what should be drawn (eg WINDOW_DRAW_FLAG_BORDER)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetImage(Console:PConsoleDevice;X,Y:LongWord;Buffer:Pointer;Width,Height,Format,Skip:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read a pixel from a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| Color is returned in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceCopyImage(Console:PConsoleDevice;const Source,Dest:TConsolePoint;Width,Height:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read an image from a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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
 +
| The number of pixels to skip in the buffer after each row (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetPosition(Console:PConsoleDevice;Position:LongWord;var X1,Y1,X2,Y2:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Output a rectangular area of text to a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| The console device to output to
 +
|-
 +
! Source
 +
| The X and Y point in the source buffer to copy text from (Characters)
 +
|-
 +
! Dest
 +
| The X and Y point on the console device to copy text to (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
 +
|-
 +
! Buffer
 +
| A pointer to a buffer of TConsoleChar structures which represent rows of text
 +
|-
 +
! Width
 +
| The width of the area to be output (Characters)
 +
|-
 +
! Height
 +
| The height of the area to be output (Characters)
 +
|-
 +
! Skip
 +
| The number of characters to skip in the buffer after each row (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| Source, Width, Height and Skip are based on character rows and columns not screen pixels.
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetProperties(Console:PConsoleDevice;Properties:PConsoleProperties):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Copy an image within a console device</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceCheckFlag(Console:PConsoleDevice;Flag:LongWord):Boolean;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new caret (cursor) of the specified size</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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)
 
|-
 
|-
! '''Description'''
+
! Return
| To be documented
+
| Handle to new caret on success or INVALID_HANDLE_VALUE on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Delete an existing caret (cursor)</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord; inline;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Update an existing carets position, visibility or blink</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| To be documented
+
| 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>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceCreate:PConsoleDevice;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceUpdateCaretEx(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Update an existing carets position, colors, visibility, blink or reverse</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| Create a new Console entry
+
| The console device to update the caret on
 
|-
 
|-
! '''Return'''
+
! Handle
| Pointer to new Console entry or nil if Console could not be created
+
| 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)
 +
|-
 +
! Forecolor
 +
| The cursor foreground color if set or COLOR_NONE to disable
 +
|-
 +
! Backcolor
 +
| The cursor background color if set or COLOR_NONE to disable
 +
|-
 +
! Visible
 +
| If true then show the caret else hide it
 +
|-
 +
! Blink
 +
| If true then blink the caret at the default blink rate
 +
|-
 +
! Reverse
 +
| If true then enable reverse color else enable inverse color
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceSetCursor(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only)</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Console
| Create a new Console entry
+
| 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
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleDeviceUpdateCursor(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;</pre>
 +
<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;">
 +
{| 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)
 +
|-
 +
|}
 +
</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 ConsoleDeviceCreate:PConsoleDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Console entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Console entry or nil if Console could not be created
 +
|-
 +
|}
 +
</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 ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Console entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Size'''
+
! Size
 
| Size in bytes to allocate for new Console (Including the Console entry)
 
| Size in bytes to allocate for new Console (Including the Console entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Console entry or nil if Console could not be created
 
| Pointer to new Console entry or nil if Console could not be created
 
|-
 
|-
Line 304: Line 2,214:
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Console entry</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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 destroy
 
|-
 
|-
! '''Description'''
+
! Return
| Destroy an existing Console entry
+
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Console in the Console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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 register
 
|-
 
|-
! '''Description'''
+
! Return
| Register a new Console in the Console table
+
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Console from the Console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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 deregister
 
|-
 
|-
! '''Description'''
+
! Return
| Deregister a Console from the Console table
+
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by ID in the console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! ConsoleId
 +
| The ID number of the console to find
 
|-
 
|-
! '''Description'''
+
! Return
| To be documented
+
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by its related device in the console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Device
| To be documented
+
| Pointer to the related device to find
 +
|-
 +
! Return
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by name in the console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Name
| To be documented
+
| The name of the console to find (eg Console0)
 +
|-
 +
! Return
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a console device by description in the console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Description
| To be documented
+
| The description of the console to find (eg Framebuffer Console (Framebuffer0))
 +
|-
 +
! Return
 +
| Pointer to console device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate;Data:Pointer):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all console devices in the console table</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Description'''
+
! Callback
| To be documented
+
| The callback function to call for each console in the table
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback for each console in the table
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
 
</div></div>
 
</div></div>
 
<br />
 
<br />
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<code style="padding:10px;">function ConsoleDeviceNotification(Console:PConsoleDevice;Callback:TConsoleNotification;Data:Pointer;Notification,Flags:LongWord):LongWord;</code>
+
<pre style="border: 0; padding-bottom:0px;">function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
<div class="mw-collapsible-content" style="text-align: left; margin:0px;">
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a notification for console device changes</div>
{| class="wikitable" style="font-size: 14px; background:white;"
+
<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 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)
 
|-
 
|-
! '''Description'''
+
! Flags
| To be documented
+
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER)
 
|-
 
|-
 
|}
 
|}
Line 404: Line 2,362:
 
<br />
 
<br />
  
 +
'''Text console functions'''
 +
 +
<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 ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Console 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 create the new window on
 +
|-
 +
! Position
 +
| 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
 +
| Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created
 +
|-
 +
|}
 +
</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 ConsoleWindowCreateEx(Console:PConsoleDevice; Font:TFontHandle; Size,State,Mode,Position:LongWord; Default:Boolean):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Console 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 create the new window on
 +
|-
 +
! Font
 +
| The handle of the default font for the new console window
 +
|-
 +
! Size
 +
| The size in bytes to allocate for the new window entry (Defaults to SizeOf(TConsoleWindow))
 +
|-
 +
! State
 +
| Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created
 +
|-
 +
! Mode
 +
| The mode of the new console window (Normally WINDOW_MODE_TEXT)
 +
|-
 +
! Position
 +
| 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
 +
| Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created
 +
|-
 +
|}
 +
</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 ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Close and Destroy 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 destroy
 +
|-
 +
! 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 ConsoleWindowShow(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Make an existing console window visible and show it on screen</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 show
 +
|-
 +
! 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 ConsoleWindowHide(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Make an existing console window invisible and hide it on screen</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 hide
 +
|-
 +
! 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 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.
 +
|-
 +
|}
 +
</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 ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find an existing console window in the position specified</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
 +
|-
 +
! Position
 +
| The window position to find (eg CONSOLE_POSITION_FULL)
 +
|-
 +
! Return
 +
| The handle of the existing window or INVALID_HANDLE_VALUE if not found
 +
|-
 +
|}
 +
</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 ConsoleWindowEnumerate(Console:PConsoleDevice; Callback:TConsoleWindowEnumerate; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate existing console windows on the specified 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 enumerate windows for
 +
|-
 +
! Callback
 +
| The function to call for each window enumerated
 +
|-
 +
! Data
 +
| A pointer to private data to be passed to the callback (Optional)
 +
|-
 +
! 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 ConsoleWindowCheckFlag(Handle:TWindowHandle; Flag:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check an existing console window to determine if a flag is set or not</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 check
 +
|-
 +
! Flag
 +
| The window flag to check for (eg WINDOW_FLAG_LINE_WRAP)
 +
|-
 +
! Return
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the window 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 window mode (eg WINDOW_MODE_TEXT)
 +
|-
 +
|}
 +
</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 ConsoleWindowGetState(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the window state 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 state for
 +
|-
 +
! Return
 +
| The window state (eg WINDOW_STATE_INVISIBLE)
 +
|-
 +
|}
 +
</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 ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the position 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 position for
 +
|-
 +
! Return
 +
| The window position (eg CONSOLE_POSITION_FULL)
 +
|-
 +
|}
 +
</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 ConsoleWindowSetPosition(Handle:TWindowHandle; Position:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the position 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 position for
 +
|-
 +
! Position
 +
| The new window position to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| The function will return ERROR_INVALID_PARAMETER if another window exists at the position
 +
|-
 +
|}
 +
</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 ConsoleWindowGetProperties(Handle:TWindowHandle; Properties:PWindowProperties):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified 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 properties from
 +
|-
 +
! Properties
 +
| Pointer to a TWindowProperties structure to fill in
 +
|-
 +
! 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 ConsoleWindowGetMinX(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current minimum X of the window viewport for 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 MinX for
 +
|-
 +
! Return
 +
| The minimum X value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, X is based on character 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 ConsoleWindowGetMinY(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current minimum Y of the window viewport for 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 MinY for
 +
|-
 +
! Return
 +
| The minimum Y value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, Y is based on character rows 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 ConsoleWindowGetMaxX(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current maximum X of the window viewport for 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 MaxX for
 +
|-
 +
! Return
 +
| The maximum X value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, X is based on character 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 ConsoleWindowGetMaxY(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current maximum Y of the window viewport for 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 MaxY for
 +
|-
 +
! Return
 +
| The maximum Y value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, Y is based on character rows 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 ConsoleWindowGetRect(Handle:TWindowHandle):TConsoleRect; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the rectangle X1,Y1,X2,Y2 of the window viewport for 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 rectangle for
 +
|-
 +
! Return
 +
| The rectangle of the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, Rect is 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 ConsoleWindowSetRect(Handle:TWindowHandle; const ARect:TConsoleRect):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the rectangle X1,Y1,X2,Y2 of the window viewport for 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 rectangle for
 +
|-
 +
! Rect
 +
| The rectangle to set for the window viewport
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Rect is 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 ConsoleWindowResetRect(Handle:TWindowHandle):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Reset the window viewport for an existing console window to the maximum size</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 reset the viewport 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 ConsoleWindowGetViewport(Handle:TWindowHandle; var X1,Y1,X2,Y2:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the X1,Y1,X2,Y2 of the window viewport for 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 viewport for
 +
|-
 +
! X1
 +
| The left edge of the current viewport
 +
|-
 +
! Y1
 +
| The top edge of the current viewport
 +
|-
 +
! X2
 +
| The right edge of the current viewport
 +
|-
 +
! Y2
 +
| The bottom edge of the current viewport
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Viewport is 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 ConsoleWindowSetViewport(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the X1,Y1,X2,Y2 of the window viewport for 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 viewport for
 +
|-
 +
! X1
 +
| The left edge of the window viewport
 +
|-
 +
! Y1
 +
| The top edge of the window viewport
 +
|-
 +
! X2
 +
| The right edge of the window viewport
 +
|-
 +
! Y2
 +
| The bottom edge of the window viewport
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Viewport is 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 ConsoleWindowResetViewport(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Reset the window viewport for an existing console window to the maximum size</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 reset the viewport 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 ConsoleWindowGetX(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current X (Column) position 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 X for
 +
|-
 +
! Return
 +
| The X value for the window
 +
|-
 +
! Note
 +
| For Text Console functions, X is based on character 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 ConsoleWindowSetX(Handle:TWindowHandle; X:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current X (Column) position 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 X for
 +
|-
 +
! X
 +
| The new X value to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, X is based on character 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 ConsoleWindowGetY(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current Y (Row) position 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 Y for
 +
|-
 +
! Return
 +
| The Y value for the window
 +
|-
 +
! Note
 +
| For Text Console functions, Y is based on character rows 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 ConsoleWindowSetY(Handle:TWindowHandle; Y:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current Y (Row) position 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 Y for
 +
|-
 +
! Y
 +
| The new Y value to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Y is based on character rows 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 ConsoleWindowGetXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current X and Y positions 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 X and Y for
 +
|-
 +
! X
 +
| The returned X value
 +
|-
 +
! Y
 +
| The returned Y value
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, 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 ConsoleWindowSetXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current X and Y positions 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 X and Y for
 +
|-
 +
! X
 +
| The new X value
 +
|-
 +
! Y
 +
| The new Y value
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, 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 ConsoleWindowGetPoint(Handle:TWindowHandle):TConsolePoint;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the point X,Y 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 point for
 +
|-
 +
! Return
 +
| The current point of the window
 +
|-
 +
! Note
 +
| For Text Console functions, Point is 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 ConsoleWindowSetPoint(Handle:TWindowHandle; const APoint:TConsolePoint):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the point X,Y 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 point for
 +
|-
 +
! Point
 +
| The new point to set for the window
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Point is 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 ConsoleWindowGetCols(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current columns of the window viewport for 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 columns for
 +
|-
 +
! Return
 +
| The columns value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, Columns is based on character 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 ConsoleWindowGetRows(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current rows of the window viewport for 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 rows for
 +
|-
 +
! Return
 +
| The rows value for the current window viewport
 +
|-
 +
! Note
 +
| For Text Console functions, Rows is based on character rows 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 ConsoleWindowGetWidth(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the absolute width 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 width for
 +
|-
 +
! Return
 +
| The absolute width of the window
 +
|-
 +
! Note
 +
| For Text Console functions, Width is based on character 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 ConsoleWindowGetHeight(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the absolute height 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 height for
 +
|-
 +
! Return
 +
| The absolute height of the window
 +
|-
 +
! Note
 +
| For Text Console functions, Height is based on character rows 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 ConsoleWindowGetFormat(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the color format 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 format for
 +
|-
 +
! Return
 +
| The color format of the window (eg COLOR_FORMAT_ARGB32)
 +
|-
 +
|}
 +
</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 ConsoleWindowGetForecolor(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current foreground color 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 foreground color for
 +
|-
 +
! Return
 +
| The foreground color of the window (eg COLOR_WHITE)
 +
|-
 +
|}
 +
</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 ConsoleWindowSetForecolor(Handle:TWindowHandle; Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current foreground color 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 foreground color for
 +
|-
 +
! Color
 +
| The foreground color to set (eg COLOR_WHITE)
 +
|-
 +
! 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 ConsoleWindowGetBackcolor(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current background color 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 background color for
 +
|-
 +
! Return
 +
| The background color of the window (eg COLOR_BLACK)
 +
|-
 +
|}
 +
</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 ConsoleWindowSetBackcolor(Handle:TWindowHandle; Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current background color 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 background color for
 +
|-
 +
! Color
 +
| The background color to set (eg COLOR_BLACK)
 +
|-
 +
! 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 ConsoleWindowGetFont(Handle:TWindowHandle):TFontHandle;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the default font 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 default font for
 +
|-
 +
! Return
 +
| The font handle of the default font or INVALID_HANDLE_VALUE 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 ConsoleWindowSetFont(Handle:TWindowHandle; Font:TFontHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the default font 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 default font for
 +
|-
 +
! Font
 +
| The font handle of the default font to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console windows, setting the font also clears the window.
 +
|-
 +
|}
 +
</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 ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| 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 ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;</pre>
 +
<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;">
 +
{| 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.
 +
|-
 +
|}
 +
</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 ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;</pre>
 +
<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;">
 +
{| 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)
 +
|-
 +
|}
 +
</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 ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowGetCursorColor(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor color 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 cursor color for
 +
|-
 +
! Return
 +
| The cursor color of the window (eg COLOR_WHITE)
 +
|-
 +
! Note
 +
| Color will be returned 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 ConsoleWindowSetCursorColor(Handle:TWindowHandle; Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor color 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 cursor color for
 +
|-
 +
! Color
 +
| The cursor color to set (eg COLOR_WHITE)
 +
|-
 +
! 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)
 +
|-
 +
|}
 +
</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 ConsoleWindowGetCursorReverse(Handle:TWindowHandle):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current cursor reverse state 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 reverse state for
 +
|-
 +
! Return
 +
| True if reverse color is enabled, False if inverse color is enabled
 +
|-
 +
|}
 +
</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 ConsoleWindowSetCursorReverse(Handle:TWindowHandle; CursorReverse:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current cursor reverse state 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 reverse state for
 +
|-
 +
! CursorReverse
 +
| True to enable reverse color, False to enable inverse color
 +
|-
 +
! 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 ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| For Text Console functions, 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 ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;</pre>
 +
<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;">
 +
{| 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 ConsoleWindowCursorColor(Handle:TWindowHandle; Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the color of the cursor 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 the color for
 +
|-
 +
! Color
 +
| The cursor color to set (eg COLOR_WHITE)
 +
|-
 +
! 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)
 +
|-
 +
|}
 +
</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 ConsoleWindowCursorReverse(Handle:TWindowHandle; Enabled:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the reverse state of the cursor 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 the reverse state for
 +
|-
 +
! Enabled
 +
| True if the cursor shows in reverse colors, False if it shows in inverse colors
 +
|-
 +
! 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
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| Row is the starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up. Lines is the number of character lines to scroll up, Lines number of rows at the top will be discarded. The starting Row will be blanked with the background color.
 +
|-
 +
|}
 +
</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 ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| Row is the starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down. Lines is the number of character lines to scroll down, Lines number of rows at the bottom will be discarded. The starting Row will be blanked with the background color.
 +
|-
 +
|}
 +
</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 ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
 +
<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;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Handle
 +
| The handle of the window to scroll
 +
|-
 +
! Row
 +
| The starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left.
 +
|-
 +
! Lines
 +
| The number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left.
 +
|-
 +
! Col
 +
| The starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left.
 +
|-
 +
! 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
 +
| The starting Col will be blanked with the background color
 +
|-
 +
|}
 +
</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 ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;</pre>
 +
<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;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Handle
 +
| The handle of the window to scroll
 +
|-
 +
! Row
 +
| The starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right.
 +
|-
 +
! Lines
 +
| The number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right.
 +
|-
 +
! Col
 +
| The starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right.
 +
|-
 +
! 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
 +
| The starting Col will be blanked with the background color
 +
|-
 +
|}
 +
</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 ConsoleWindowClear(Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Clear the current viewport 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 ConsoleWindowClearEx(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord; Cursor:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Clear part of the the current viewport 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
 +
|-
 +
! X1
 +
| The left edge of the area to clear (relative to current viewport)
 +
|-
 +
! Y1
 +
| The top edge of the area to clear (relative to current viewport)
 +
|-
 +
! X2
 +
| The right edge of the area to clear (relative to current viewport)
 +
|-
 +
! Y2
 +
| The bottom edge of the area to clear (relative to current viewport)
 +
|-
 +
! Cursor
 +
| If True update the cursor position after clearing
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, Window is based on screen 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 ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| The window will not scroll up at the end of the 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 ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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 foreground color to use (eg COLOR_WHITE)
 +
|-
 +
! Backcolor
 +
| The background color to use (eg COLOR_BLACK)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
| The window will scroll up at the end of the 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 ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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 foreground color to use (eg COLOR_WHITE)
 +
|-
 +
! Backcolor
 +
| The background color to use (eg COLOR_BLACK)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;</pre>
 +
<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;">
 +
{| 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
 +
|-
 +
|}
 +
</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 ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
 +
<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;">
 +
{| 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 foreground color to use (eg COLOR_WHITE)
 +
|-
 +
! Backcolor
 +
| The background color to use (eg COLOR_BLACK)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| For Text Console functions, 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 ConsoleWindowOutput(Handle:TWindowHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Output a rectangular area of text to a 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 console window to output to
 +
|-
 +
! Source
 +
| The X and Y point in the source buffer to copy text from (Characters)
 +
|-
 +
! Dest
 +
| The X and Y point on the console window to copy text to (Characters)
 +
|-
 +
! Buffer
 +
| A pointer to a buffer of TConsoleChar structures which represent rows of text
 +
|-
 +
! Width
 +
| The width of the area to be output (Characters)
 +
|-
 +
! Height
 +
| The height of the area to be output (Characters)
 +
|-
 +
! Skip
 +
| The number of characters to skip in the buffer after each row (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| 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
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''CRT console functions'''
 +
 +
<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 ConsoleAssignCrt(var F:Text);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function AssignCrt</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/assigncrt.html
 +
|-
 +
|}
 +
</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 ConsoleClrEol;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function ClrEol</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/clreol.html
 +
|-
 +
|}
 +
</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 ConsoleClrScr;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function ClrScr</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/clrscr.html
 +
|-
 +
|}
 +
</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 ConsoleDelay(MS:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function Delay</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/delay.html
 +
|-
 +
|}
 +
</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 ConsoleDelLine;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function DelLine</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/delline.html
 +
|-
 +
|}
 +
</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 ConsoleGotoXY(X,Y:Integer);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function GotoXY</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/gotoxy.html
 +
|-
 +
! Note
 +
| For CRT Console functions, 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;">procedure ConsoleHighVideo;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function HighVideo</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/highvideo.html
 +
|-
 +
|}
 +
</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 ConsoleInsLine;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function InsLine</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| See: http://www.freepascal.org/docs-html-3.0.0/rtl/crt/insline.html
 +
|-
 +
|}
 +
</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 ConsoleKeypressed:Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function KeyPressed</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/keypressed.html
 +
|-
 +
|}
 +
</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 ConsoleLowVideo;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function LowVideo</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/lowvideo.html
 +
|-
 +
|}
 +
</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 ConsoleNormVideo;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function NormVideo</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/normvideo.html
 +
|-
 +
|}
 +
</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 ConsoleNoSound;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function NoSound</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/nosound.html
 +
|-
 +
|}
 +
</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 ConsoleReadKey:Char;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function ReadKey</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/readkey.html
 +
For extended key scan codes see: http://www.freepascal.org/docs-html/rtl/keyboard/kbdscancode.html
 +
|-
 +
|}
 +
</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 ConsoleSound(Hz:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function Sound</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/sound.html
 +
|-
 +
|}
 +
</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 ConsoleTextBackground(Color:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function TextBackground</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/textbackground.html
 +
|-
 +
|}
 +
</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 ConsoleTextColor(Color:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function TextColor</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/textcolor.html
 +
|-
 +
|}
 +
</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 ConsoleTextMode(Mode:Integer);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function TextMode</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/textmode.html
 +
|-
 +
|}
 +
</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 ConsoleWhereX:Integer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function WhereX</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/wherex.html
 +
|-
 +
! Note
 +
| For CRT Console functions, X is based on character 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 ConsoleWhereY:Integer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function WhereY</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/wherey.html
 +
|-
 +
! Note
 +
| For CRT Console functions, Y is based on character row not screen pixel.
 +
|-
 +
|}
 +
</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 ConsoleWindow(X1,Y1,X2,Y2:Integer);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Compatible with RTL Crt unit function Window</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! See
 +
| http://www.freepascal.org/docs-html-3.0.0/rtl/crt/window.html
 +
|-
 +
! Note
 +
| For CRT Console functions, X1, Y1, X2 and Y2 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;">procedure ConsoleScrollUp(Row,Lines:Integer);</pre>
 +
<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;">
 +
{| 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
 +
| For CRT Console functions, Row and Lines 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;">procedure ConsoleScrollDown(Row,Lines:Integer);</pre>
 +
<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;">
 +
{| 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
 +
| For CRT Console functions, Row and Lines 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;">procedure ConsoleWrite(const AText:String);</pre>
 +
<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;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Text
 +
| The text to write
 +
|-
 +
! Note
 +
| The window will not scroll up at the end of the 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;">procedure ConsoleWriteLn(const AText:String);</pre>
 +
<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;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Text
 +
| The text to write
 +
|-
 +
! Note
 +
| The window will scroll up at the end of the 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;">procedure ConsoleWriteChr(AChr:Char);</pre>
 +
<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;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Chr
 +
| The character to write
 +
|-
 +
|}
 +
</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 ConsoleRead(var AText:String);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read text from console input and echo to screen</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Text
 +
| The text read from the console input
 +
|-
 +
|}
 +
</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 ConsoleReadLn(var AText:String);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read text from console input and echo to screen</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Text
 +
| The text read from the console input
 +
|-
 +
|}
 +
</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 ConsoleReadChr(var AChr:Char);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read characters from console input and echo to screen</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Chr
 +
| The character read from the console input
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''RTL text IO functions'''
 +
 +
<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 SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform TextIOWriteChar function</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 />
 +
 +
'''RTL console functions'''
 +
 +
<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 SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handler for platform ConsoleWriteChar function</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 />
 +
 +
'''Framebuffer console functions'''
 +
 +
<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 FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceOpen 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 ConsoleDeviceOpen 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 FramebufferConsoleClose(Console:PConsoleDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceClose 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 ConsoleDeviceClose 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 FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceClear 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 ConsoleDeviceClear 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 FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceScroll 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 ConsoleDeviceScroll 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 FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawBox 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 ConsoleDeviceDrawBox 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 FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawLine 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 ConsoleDeviceDrawLine 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 FramebufferConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle;Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawChar 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 ConsoleDeviceDrawChar 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 FramebufferConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawText 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 ConsoleDeviceDrawText 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 FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawPixel 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 ConsoleDeviceDrawPixel 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 FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawBlock 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 ConsoleDeviceDrawBlock 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 FramebufferConsoleDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawImage 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 ConsoleDeviceDrawImage 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 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 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 ConsoleDeviceDrawWindow instead
 +
Caller must hold the Window 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 FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Internal function used by FramebufferConsole to draw the console desktop</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;">function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceGetPixel 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 ConsoleDeviceGetPixel 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 FramebufferConsoleGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceGetImage 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 ConsoleDeviceGetImage 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 FramebufferConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDevicePutText 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 ConsoleDevicePutText 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 FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceCopyImage 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 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 FramebufferConsoleUpdateCaretEx(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceUpdateCaretEx 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 ConsoleDeviceUpdateCaretEx 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 FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceGetPosition 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 ConsoleDeviceGetPosition instead
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Console helper functions'''
 +
 +
<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 ConsoleDeviceGetCount:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current console device count</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 ConsoleDeviceGetDefault:PConsoleDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default console device</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 ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default console device</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 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 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 ConsoleTypeToString(ConsoleType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Console type value to a string</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 ConsoleStateToString(ConsoleState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Console state value to a string</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 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;">
 +
{| 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 ConsolePositiontoString(Position:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 />
 +
 +
'''Text console helper functions'''
 +
 +
<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 ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current console window count</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 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
 +
|-
 +
|}
 +
</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 ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current console default 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 default window for
 +
|-
 +
! Return
 +
| The window handle of the current default window 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 ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current console default 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 set the default window 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 ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;</pre>
 +
<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 ConsoleWindowStateToString(WindowState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Console Window state value to a string</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 ConsoleWindowModeToString(WindowMode:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Console Window mode value to a string</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 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;">
 +
{| 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 ConsoleWindowRedirectOutput(Handle:TWindowHandle):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Redirect standard output to the console window specified by Handle</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Handle
 +
| The window handle to redirect output to (or INVALID_HANDLE_VALUE to stop redirection)
 +
|-
 +
! Return
 +
| True if completed successfully or False if an error occurred
 +
|-
 +
! Note
 +
| Redirects the output of the text files Output, ErrOutput, StdOut and StdErr which also redirects the output of Write, WriteLn and the standard C library.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 04:53, 10 October 2023

Return to Unit Reference


Description


Ultibo Console Interface unit

Note:

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

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

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

Constants



Console specific constants CONSOLE_*
CONSOLE_NAME_PREFIX = 'Console'; Name prefix for Console Devices


Console device type CONSOLE_TYPE_*
CONSOLE_TYPE_NONE = 0;  
CONSOLE_TYPE_FRAMEBUFFER = 1;  
CONSOLE_TYPE_SERIAL = 2;  
CONSOLE_TYPE_REMOTE = 3;  
CONSOLE_TYPE_LCD = 4;  
 
CONSOLE_TYPE_MAX = 4;  


Console device state CONSOLE_STATE_*
CONSOLE_STATE_CLOSED = 0;  
CONSOLE_STATE_OPEN = 1;  
 
CONSOLE_STATE_MAX = 1;  


Console device flag CONSOLE_FLAG_*
CONSOLE_FLAG_NONE = $00000000;  
CONSOLE_FLAG_LINE_WRAP = $00000001; Wrap long lines to the next line if set
CONSOLE_FLAG_DMA_BOX = $00000002; Use DMA to draw boxes (Where applicable)
CONSOLE_FLAG_DMA_LINE = $00000004; Use DMA to draw lines (Where applicable)
CONSOLE_FLAG_DMA_FILL = $00000008; Use DMA to fill blocks (Where applicable)
CONSOLE_FLAG_DMA_CLEAR = $00000010; Use DMA to clear blocks (Where applicable)
CONSOLE_FLAG_DMA_SCROLL = $00000020; Use DMA to scroll blocks (Where applicable)
CONSOLE_FLAG_SINGLE_WINDOW = $00000040; Console supports only one window (Not multiple)
CONSOLE_FLAG_HARDWARE_CURSOR = $00000080; Console supports a hardware cursor (Mouse pointer) (Character mode only)
CONSOLE_FLAG_HARDWARE_CARET = $00000100; Console supports a hardware caret (Text cursor)
CONSOLE_FLAG_BLINK_CARET = $00000200; Console supports blinking caret
CONSOLE_FLAG_TEXT_MODE = $00000400; Console supports text mode settings
CONSOLE_FLAG_TEXT_BLINK = $00000800; Console supports blinking text
CONSOLE_FLAG_COLOR = $00001000; Console supports colors
CONSOLE_FLAG_FONT = $00002000; Console supports font
CONSOLE_FLAG_FULLSCREEN = $00004000; Console supports creating a fullscreen window
CONSOLE_FLAG_AUTO_SCROLL = $00008000; Automatically scroll up on reaching the last line
CONSOLE_FLAG_DMA_TEXT = $00010000; Use DMA to draw text (Where applicable)
CONSOLE_FLAG_COLOR_REVERSE = $00020000; Console requires colors to be reversed for underlying hardware
CONSOLE_FLAG_TEXT_CARET = $00040000; Console supports a caret (Text cursor)
CONSOLE_FLAG_FOCUS_CARET = $00080000; Only show caret on the focused (active) window
 
CONSOLE_FLAG_DMA_MASK = CONSOLE_FLAG_DMA_BOX or CONSOLE_FLAG_DMA_LINE or CONSOLE_FLAG_DMA_FILL or CONSOLE_FLAG_DMA_CLEAR or CONSOLE_FLAG_DMA_SCROLL or CONSOLE_FLAG_DMA_TEXT;
Flags that cannot be changed by ConsoleDeviceUpdateFlag
CONSOLE_FLAG_INTERNAL = CONSOLE_FLAG_SINGLE_WINDOW or CONSOLE_FLAG_HARDWARE_CURSOR or CONSOLE_FLAG_HARDWARE_CARET or CONSOLE_FLAG_BLINK_CARET or CONSOLE_FLAG_TEXT_MODE or CONSOLE_FLAG_TEXT_BLINK or CONSOLE_FLAG_COLOR or CONSOLE_FLAG_FONT or CONSOLE_FLAG_FULLSCREEN or CONSOLE_FLAG_COLOR_REVERSE or CONSOLE_FLAG_TEXT_CARET;


Console device mode CONSOLE_MODE_*
CONSOLE_MODE_NONE = 0;  
CONSOLE_MODE_PIXEL = 1;  
CONSOLE_MODE_CHARACTER = 2;  


Console caret signature CARET_SIGNATURE*
CARET_SIGNATURE = $9A2D40E3;  


Console window signature WINDOW_SIGNATURE_*
WINDOW_SIGNATURE = $DE3A5C04;  


Console window state WINDOW_STATE_*
WINDOW_STATE_INVISIBLE = 0;  
WINDOW_STATE_VISIBLE = 1;  
 
WINDOW_STATE_MAX = 1;  


Console window mode WINDOW_MODE_*
WINDOW_MODE_NONE = 0;  
WINDOW_MODE_TEXT = 1;  
WINDOW_MODE_GRAPHICS = 2;  
 
WINDOW_MODE_MAX = 2;  


Console window flag WINDOW_FLAG_*
WINDOW_FLAG_NONE = $00000000;  
WINDOW_FLAG_LINE_WRAP = $00000001; Wrap long lines to the next line if set
WINDOW_FLAG_BUFFERED = $00000002; Buffer output for scroll back and redraw
WINDOW_FLAG_FULLSCREEN = $00000004; Window occupies the full screen
WINDOW_FLAG_AUTO_SCROLL = $00000008; Automatically scroll up on reaching the last line
WINDOW_FLAG_CHARACTER = $00000010; Console for this Window is character mode only
WINDOW_FLAG_AUTO_UPDATE = $00000020; Automatically update output of buffered window
WINDOW_FLAG_FOCUS_CURSOR = $00000040; Only show cursor (caret) on the focused (active) window
 
Flags that cannot be changed by ConsoleWindowUpdateFlag
WINDOW_FLAG_INTERNAL = WINDOW_FLAG_FULLSCREEN or WINDOW_FLAG_CHARACTER;


Console window draw flag WINDOW_DRAW_FLAG_*
WINDOW_DRAW_FLAG_NONE = $00000000;  
WINDOW_DRAW_FLAG_BODY = $00000001; Draw the Window body
WINDOW_DRAW_FLAG_TITLE = $00000002; Draw the Window title
WINDOW_DRAW_FLAG_BORDER = $00000004; Draw the Window border
 
WINDOW_DRAW_FLAG_ALL = WINDOW_DRAW_FLAG_BODY or WINDOW_DRAW_FLAG_TITLE or WINDOW_DRAW_FLAG_BORDER;


Console window history WINDOW_HISTORY_*
WINDOW_HISTORY_MAX_COUNT = 100;  


Framebuffer console FRAMEBUFFER_CONSOLE_*
FRAMEBUFFER_CONSOLE_TITLE = 'Ultibo Core (Release: ' + ULTIBO_RELEASE_NAME + ' Version: ' + ULTIBO_RELEASE_VERSION + ' Date: ' + ULTIBO_RELEASE_DATE + ')';  
FRAMEBUFFER_CONSOLE_DESCRIPTION = 'Framebuffer Console'; Description of the Framebuffer Console device


Type definitions



Cursor mode

TCursorMode = (CURSOR_MODE_INSERT,CURSOR_MODE_OVERWRITE);

Cursor state

TCursorState = (CURSORON,CURSOROFF);

Cursor shape

TCursorShape = (CURSOR_SHAPE_LINE,CURSOR_SHAPE_BAR,CURSOR_SHAPE_BLOCK); Line is a vertical line, Bar is a horizontal bar and Block is a solid block (All shapes inverse any character data under them)

Console char

PConsoleChar = ^TConsoleChar;

TConsoleChar = record

Ch:Char;  
Forecolor:LongWord;  
Backcolor:LongWord;  

Console point

TConsolePoint = record

X:LongWord;  
Y:LongWord;  

Console rect

TConsoleRect = record

X1:LongWord;  
Y1:LongWord;  
X2:LongWord;  
Y2:LongWord;  

Console properties

PConsoleProperties = ^TConsoleProperties;

TConsoleProperties = record

Flags:LongWord; Console device flags (eg CONSOLE_FLAG_FULLSCREEN)
Mode:LongWord; Console device mode (eg CONSOLE_MODE_PIXEL)
Width:LongWord; Console Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Height:LongWord; Console Height (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Format:LongWord; Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)

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 plot line

TConsoleDevicePlotLine = 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 circle

TConsoleDeviceDrawCircle = function(Console:PConsoleDevice; X,Y,Color,Width,Radius: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 add caret

TConsoleDeviceAddCaret = function(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;

Console device delete caret

TConsoleDeviceDeleteCaret = function(Console:PConsoleDevice; Handle:THandle):LongWord;

Console device update caret

TConsoleDeviceUpdateCaret = function(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord;

Console device update caret extended

TConsoleDeviceUpdateCaretEx = function(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;

Console device set cursor

TConsoleDeviceSetCursor = function(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;

Console device update cursor

TConsoleDeviceUpdateCursor = function(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):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

PConsoleDevice = ^TConsoleDevice;

TConsoleDevice = record

Device Properties
Device:TDevice; The Device entry for this Console device
Console Properties
ConsoleId:LongWord; Unique Id of this Console device in the Console device table
ConsoleState:LongWord; Console device state (eg CONSOLE_STATE_OPEN)
ConsoleMode:LongWord; Console device mode (eg CONSOLE_MODE_PIXEL)
DeviceOpen:TConsoleDeviceOpen; A device specific DeviceOpen method implementing a standard console device interface (Mandatory)
DeviceClose:TConsoleDeviceClose; A device specific DeviceClose method implementing a standard console device interface (Mandatory)
DeviceClear:TConsoleDeviceClear; A device specific DeviceClear method implementing a standard console device interface (Mandatory)
DeviceScroll:TConsoleDeviceScroll; A device specific DeviceScroll method implementing a standard console device interface (Mandatory)
DeviceDrawBox:TConsoleDeviceDrawBox; A device specific DeviceDrawBox method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DeviceDrawLine:TConsoleDeviceDrawLine; A device specific DeviceDrawLine method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DevicePlotLine:TConsoleDevicePlotLine; A device specific DevicePlotLine method implementing a standard console device interface (Or nil if the default method is suitable)
DeviceDrawChar:TConsoleDeviceDrawChar; A device specific DeviceDrawChar method implementing a standard console device interface (Mandatory)
DeviceDrawText:TConsoleDeviceDrawText; A device specific DeviceDrawText method implementing a standard console device interface (Mandatory)
DeviceDrawPixel:TConsoleDeviceDrawPixel; A device specific DeviceDrawPixel method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DeviceDrawBlock:TConsoleDeviceDrawBlock; A device specific DeviceDrawBlock method implementing a standard console device interface (Mandatory)
DeviceDrawCircle:TConsoleDeviceDrawCircle; A device specific DeviceDrawCircle method implementing a standard console device interface (Or nil if the default method is suitable)
DeviceDrawImage:TConsoleDeviceDrawImage; A device specific DeviceDrawImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DeviceDrawWindow:TConsoleDeviceDrawWindow; A device specific DeviceDrawWindow method implementing a standard console device interface (Mandatory)
DeviceGetPixel:TConsoleDeviceGetPixel; A device specific DeviceGetPixel method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DeviceGetImage:TConsoleDeviceGetImage; A device specific DeviceGetImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DevicePutText:TConsoleDevicePutText; A device specific DevicePutText method implementing a standard console device interface (Mandatory)
DeviceCopyImage:TConsoleDeviceCopyImage; A device specific DeviceCopyImage method implementing a standard console device interface (Mandatory for CONSOLE_MODE_PIXEL)
DeviceAddCaret:TConsoleDeviceAddCaret; A device specific DeviceAddCaret method implementing a standard console device interface (Optional)
DeviceDeleteCaret:TConsoleDeviceDeleteCaret; A device specific DeviceDeleteCaret method implementing a standard console device interface (Optional)
DeviceUpdateCaret:TConsoleDeviceUpdateCaret; A device specific DeviceUpdateCaret method implementing a standard console device interface (Optional)
DeviceUpdateCaretEx:TConsoleDeviceUpdateCaretEx; A device specific DeviceUpdateCaretEx method implementing a standard console device interface (Optional)
DeviceSetCursor:TConsoleDeviceSetCursor; A device specific DeviceSetCursor method implementing a standard console device interface (Or nil if the default method is suitable)(CONSOLE_MODE_CHARACTER only)
DeviceUpdateCursor:TConsoleDeviceUpdateCursor; A device specific DeviceUpdateCursor method implementing a standard console device interface (Or nil if the default method is suitable)(CONSOLE_MODE_CHARACTER only)
DeviceGetPosition:TConsoleDeviceGetPosition; A device specific DeviceGetPosition method implementing a standard console device interface (Mandatory)
DeviceGetProperties:TConsoleDeviceGetProperties; A device specific DeviceGetProperties method implementing a standard console device interface (Or nil if the default method is suitable)
Statistics Properties
OpenCount:LongWord;  
CloseCount:LongWord;  
ClearCount:LongWord;  
ScrollCount:LongWord;  
DrawCount:LongWord;  
GetCount:LongWord;  
PutCount:LongWord;  
CopyCount:LongWord;  
Driver Properties
Lock:TMutexHandle; Device lock
Width:LongWord; Console Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Height:LongWord; Console Height (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Format:LongWord; Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)
Forecolor:LongWord; Foreground Color
Backcolor:LongWord; Background Color
Borderwidth:LongWord; Border Width (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Bordercolor:LongWord; Border Color
Font Properties
Font:TFontHandle; Console Font
FontRatio:LongWord; Font Characters to Pixels Ratio (Normally 1 for Pixel Console/0 for Character Console)
Cursor Properties
CursorUpdate:LongBool; Flag to indicate if cursor update (Show/Hide) is in progress (CONSOLE_MODE_CHARACTER only)
CursorX:LongWord; Cursor X (Characters)(CONSOLE_MODE_CHARACTER only)
CursorY:LongWord; Cursor Y (Characters)(CONSOLE_MODE_CHARACTER only)
CursorWidth:LongWord; Cursor Width (Characters)(CONSOLE_MODE_CHARACTER only)
CursorHeight:LongWord; Cursor Height (Characters)(CONSOLE_MODE_CHARACTER only)
CursorVisible:LongBool; Cursor Visible On/Off (CONSOLE_MODE_CHARACTER only)
CursorChars:PChar; Buffer for cursor characters (CONSOLE_MODE_CHARACTER only)
CursorBuffer:PChar; Buffer for characters currently under cursor (CONSOLE_MODE_CHARACTER only)
Caret Properties
CaretFirst:PConsoleCaret;  
CaretLock:TCriticalSectionHandle;  
CaretCount:LongWord;  
Window Properties
WindowFirst:PConsoleWindow;  
WindowLock:TCriticalSectionHandle;  
WindowCount:LongWord;  
WindowDefault:TWindowHandle;  
Internal Properties
Prev:PConsoleDevice; Previous entry in Console device table
Next:PConsoleDevice; Next entry in Console device table

Console caret

TConsoleCaret = record

Caret Properties
Signature:LongWord; Signature for entry validation
X:LongWord; Caret X (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
Y:LongWord; Caret Y (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
Width:LongWord; Caret Width (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
Height:LongWord; Caret Height (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER)
OffsetX:LongWord; Caret Offset X (Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
OffsetY:LongWord; Caret Offset Y (Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER)
Visible:LongBool; Caret Visible On/Off
Blink:LongBool; Caret Blink On/Off
Reverse:LongBool; Caret Color Reverse or Inverse
Forecolor:LongWord; Caret Foreground Color
Backcolor:LongWord; Caret Background Color
Console:PConsoleDevice; Console device
Driver Properties
Handle:THandle; Device specific handle
Active:LongBool; Caret currently active (displayed) (Independent of Visible to account for Blink)
Image:Pointer; Device specific buffer for caret image
Buffer:Pointer; Device specific buffer for area underneath caret
Output:Pointer; Device specific buffer for curently displayed caret
Internal Properties
Prev:PConsoleCaret; Previous entry in Console Caret table
Next:PConsoleCaret; Next entry in Console Caret table

Window properties

PWindowProperties = ^TWindowProperties;

TWindowProperties = record

Position:LongWord; Console Window Position (eg CONSOLE_POSITION_TOP)
State:LongWord; Console Window State (eg WINDOW_STATE_VISIBLE)
Mode:LongWord; Console Window Mode (eg WINDOW_MODE_TEXT)
Flags:LongWord; Console Window Flags (eg WINDOW_FLAG_LINE_WRAP)
X1:LongWord; (Window X1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Y1:LongWord; (Window Y1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
X2:LongWord; (Window X2)Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Y2:LongWord; (Window Y2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Width:LongWord; Window Width in Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
Height:LongWord; Window Height in Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
OffsetX:LongWord; Window X Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
OffsetY:LongWord; Window Y Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
FontWidth:LongWord; Font Width (Pixels)
FontHeight:LongWord; Font Height (Pixels)
Borderwidth:LongWord; Current Border Width
Font:TFontHandle; Window Font
Console:PConsoleDevice; Window console

Console window enumeration callback

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

Console window completion callback

TConsoleWindowCompletion = function(Handle:TWindowHandle; var Buffer:String; Data:Pointer):LongWord;

Console window

PConsoleWindow = ^TConsoleWindow;

TConsoleWindow = record

Window Properties
Signature:LongWord; Signature for entry validation
Position:LongWord; Console Window Position (eg CONSOLE_POSITION_TOP)
WindowState:LongWord; Console Window State (eg WINDOW_STATE_VISIBLE)
WindowMode:LongWord; Console Window Mode (eg WINDOW_MODE_TEXT)
WindowFlags:LongWord; Console Window Flags (eg WINDOW_FLAG_LINE_WRAP)
X1:LongWord; (Window X1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Y1:LongWord; (Window Y1) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
X2:LongWord; (Window X2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Y2:LongWord; Window Y2) Console Relative (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Width:LongWord; Window Width in Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
Height:LongWord; Window Height in Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
OffsetX:LongWord; Window X Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
OffsetY:LongWord; Window Y Offset (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
MinX:LongWord; (Viewport X1) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
MinY:LongWord; (Viewport Y1) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
MaxX:LongWord; (Viewport X2) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
MaxY:LongWord; (Viewport Y2) Window Relative (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
X:LongWord; (Current X) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
Y:LongWord; (Current Y) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
Cols:LongWord; Viewport Columns (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
Rows:LongWord; Viewport Rows (Characters for WINDOW_MODE_TEXT/Pixels for WINDOW_MODE_GRAPHICS)
Format:LongWord; Color Format (eg COLOR_FORMAT_ARGB32)(Only applicable if CONSOLE_MODE_PIXEL)
Forecolor:LongWord; Current Foreground Color
Backcolor:LongWord; Current Background Color
Borderwidth:LongWord; Current Border Width
Bordercolor:LongWord; Current Border Color
Font Properties
Font:TFontHandle; Window Font
FontWidth:LongWord; Font Width (Pixels)
FontHeight:LongWord; Font Height (Pixels)
Cursor Properties
CursorX:LongWord; (Cursor X) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
CursorY:LongWord; (Cursor Y) Window Relative (Characters for WINDOW_MODE_TEXT/Not used for WINDOW_MODE_GRAPHICS)
CursorMode:LongWord; Cursor Mode (eg CURSOR_MODE_INSERT)
CursorBlink:Boolean; Cursor Blink On/Off
CursorState:TCursorState; Cursor State On/Off
CursorShape:TCursorShape; Cursor Shape Line/Bar/Block
CursorReverse:LongBool; Cursor Color Reverse or Inverse (WINDOW_MODE_TEXT only)
CursorForecolor:LongWord; Cursor Foreground Color (WINDOW_MODE_TEXT only)
CursorBackcolor:LongWord; Cursor Background Color (WINDOW_MODE_TEXT only)
Caret Properties
CaretX:LongWord; Caret X Console Relative (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
CaretY:LongWord; Caret Y Console Relative (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER)
CaretHandle:THandle; Caret (Cursor) Handle (or INVALID_HANDLE_VALUE)
History Properties
HistoryFirst:PConsoleHistory;  
HistoryLast:PConsoleHistory;  
HistoryCurrent:PConsoleHistory;  
HistoryCount:LongWord;  
Driver Properties
Lock:TMutexHandle; Window lock
Console:PConsoleDevice; Window console
Internal Properties
Prev:PConsoleWindow; Previous entry in Console Window table
Next:PConsoleWindow; Next entry in Console Window table

Console history

TConsoleHistory = record

History Properties
Value:PChar;  
Length:Integer;  
Internal Properties
Prev:PConsoleHistory; Previous entry in History table
Next:PConsoleHistory; Next entry in History table

Framebuffer console

PFramebufferConsole = ^TFramebufferConsole;

TFramebufferConsole = record

Console Properties
Console:TConsoleDevice;  
Framebuffer Properties
Framebuffer:PFramebufferDevice;  
DesktopX:LongWord; Desktop X (Left) Console Relative (Pixels)
DesktopY:LongWord; Desktop Y (Right) Console Relative (Pixels)
DesktopWidth:LongWord; Desktop (Width) Console Relative (Pixels)
DesktopHeight:LongWord; Desktop (Height) Console Relative (Pixels)
DesktopOffset:LongWord; Desktop (Offset)
DesktopColor:LongWord; Desktop (Color)
Buffer Properties
LineBuffer:Pointer; Buffer for device reads and writes (Size of one line)


Public variables


None defined

Function declarations



Initialization functions

procedure ConsoleInit;
Description: Initialize the Console unit and Console device table
Note Called only during system startup


Console functions

function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;
Description: Open a console device ready for drawing
Console The console device to open
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
Description: Close a console device to prevent drawing
Console The console device to close
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Description: Clear a console device using the specified color
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 Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Description: Scroll all or part of a console device in the specified direction
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


function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw an outline of a box on a console device
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 Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw a horizontal or vertical line on a console device
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 Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDevicePlotLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Draw a line in any direction on a console device
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 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


function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Draw a character on a console device
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 Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
Description: Draw a text string on a console device
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 Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
Description: Draw a pixel on a console device
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 Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
Description: Draw a filled block on a console device
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 Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceDrawCircle(Console:PConsoleDevice; X,Y,Color,Width,Radius:LongWord):LongWord;
Description: Draw a circle on a console device
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


function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Draw an image on a console device
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 The number of pixels to skip in the buffer after each row (Optional)
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
Description: Draw a console window on a console device
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


function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
Description: Read a pixel from a console device
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 Color is returned in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Read an image from a console device
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 The number of pixels to skip in the buffer after each row (Optional)
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Output a rectangular area of text to a console device
Console The console device to output to
Source The X and Y point in the source buffer to copy text from (Characters)
Dest The X and Y point on the console device to copy text to (Pixels for CONSOLE_MODE_PIXEL/Characters for CONSOLE_MODE_CHARACTER)
Buffer A pointer to a buffer of TConsoleChar structures which represent rows of text
Width The width of the area to be output (Characters)
Height The height of the area to be output (Characters)
Skip The number of characters to skip in the buffer after each row (Optional)
Return ERROR_SUCCESS if completed or another error code on failure
Note Source, Width, Height and Skip are based on character rows and columns not screen pixels.


function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Description: Copy an image within a console device
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


function ConsoleDeviceAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
Description: Create a new caret (cursor) of the specified size
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


function ConsoleDeviceDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
Description: Delete an existing caret (cursor)
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


function ConsoleDeviceUpdateCaret(Console:PConsoleDevice; Handle:THandle; X,Y:LongWord; Visible,Blink:Boolean):LongWord; inline;
Description: Update an existing carets position, visibility or blink
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


function ConsoleDeviceUpdateCaretEx(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;
Description: Update an existing carets position, colors, visibility, blink or reverse
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)
Forecolor The cursor foreground color if set or COLOR_NONE to disable
Backcolor The cursor background color if set or COLOR_NONE to disable
Visible If true then show the caret else hide it
Blink If true then blink the caret at the default blink rate
Reverse If true then enable reverse color else enable inverse color
Return ERROR_SUCCESS if completed or another error code on failure
Note Forecolor and Backcolor must be specified in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleDeviceSetCursor(Console:PConsoleDevice; Width,Height:LongWord; Chars:PChar):LongWord;
Description: Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only)
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 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


function ConsoleDeviceUpdateCursor(Console:PConsoleDevice; Enabled:Boolean; X,Y:LongInt; Relative:Boolean):LongWord;
Description: Update the position and state for the mouse cursor of a console device (CONSOLE_MODE_CHARACTER only)
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 For devices that don't support hardware mouse cursor a software cursor will be implemented


function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Get the coordinates of a console position from a console device
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


function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
Description: Get the current properties from a console device
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


function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;
Description: Check if a console device supports a flag value
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.


function ConsoleDeviceUpdateFlag(Console:PConsoleDevice; Flag:LongWord; Clear:Boolean):LongWord;
Description: Set or clear a flag on a console device
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


function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;
Description: Get the mode of a console device
Console The console device to get from
Return The mode of the console (eg CONSOLE_MODE_PIXEL) or CONSOLE_MODE_NONE on error


function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;
Description: Get the state of a console device
Console The console device to get from
Return The current state of the console (eg CONSOLE_STATE_OPEN)


function ConsoleDeviceCreate:PConsoleDevice;
Description: Create a new Console entry
Return Pointer to new Console entry or nil if Console could not be created


function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;
Description: Create a new Console entry
Size Size in bytes to allocate for new Console (Including the Console entry)
Return Pointer to new Console entry or nil if Console could not be created


function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;
Description: Destroy an existing Console entry
Console The console device to destroy
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;
Description: Register a new Console in the Console table
Console The console device to register
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;
Description: Deregister a Console from the Console table
Console The console device to deregister
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;
Description: Find a console device by ID in the console table
ConsoleId The ID number of the console to find
Return Pointer to console device entry or nil if not found


function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;
Description: Find a console device by its related device in the console table
Device Pointer to the related device to find
Return Pointer to console device entry or nil if not found


function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;
Description: Find a console device by name in the console table
Name The name of the console to find (eg Console0)
Return Pointer to console device entry or nil if not found


function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;
Description: Find a console device by description in the console table
Description The description of the console to find (eg Framebuffer Console (Framebuffer0))
Return Pointer to console device entry or nil if not found


function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;
Description: Enumerate all console devices in the console table
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


function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for console device changes
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)


Text console functions

function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
Description: Create a new Console window
Console The console device to create the new window on
Position 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 Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created


function ConsoleWindowCreateEx(Console:PConsoleDevice; Font:TFontHandle; Size,State,Mode,Position:LongWord; Default:Boolean):TWindowHandle;
Description: Create a new Console window
Console The console device to create the new window on
Font The handle of the default font for the new console window
Size The size in bytes to allocate for the new window entry (Defaults to SizeOf(TConsoleWindow))
State Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created
Mode The mode of the new console window (Normally WINDOW_MODE_TEXT)
Position 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 Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created


function ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;
Description: Close and Destroy an existing console window
Handle The handle of the window to destroy
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowShow(Handle:TWindowHandle):LongWord;
Description: Make an existing console window visible and show it on screen
Handle The handle of the window to show
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowHide(Handle:TWindowHandle):LongWord;
Description: Make an existing console window invisible and hide it on screen
Handle The handle of the window to hide
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowActivate(Handle:TWindowHandle):LongWord;
Description: Make an existing console window the active window
Handle The handle of the window to activate
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowDeactivate(Handle:TWindowHandle):LongWord;
Description: Make an existing console window inactive
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


function ConsoleWindowNext(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
Description: Get the next console window starting with the active window
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


function ConsoleWindowPrevious(Console:PConsoleDevice; Visible:Boolean):TWindowHandle;
Description: Get the previous console window starting with the active window
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


function ConsoleWindowAt(Console:PConsoleDevice; X,Y:LongWord; Visible:Boolean):TWindowHandle;
Description: Find the console window that X and Y coordinates are within
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.


function ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;
Description: Find an existing console window in the position specified
Console The console device to find the window on
Position The window position to find (eg CONSOLE_POSITION_FULL)
Return The handle of the existing window or INVALID_HANDLE_VALUE if not found


function ConsoleWindowEnumerate(Console:PConsoleDevice; Callback:TConsoleWindowEnumerate; Data:Pointer):LongWord;
Description: Enumerate existing console windows on the specified console device
Console The console device to enumerate windows for
Callback The function to call for each window enumerated
Data A pointer to private data to be passed to the callback (Optional)
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCheckFlag(Handle:TWindowHandle; Flag:LongWord):Boolean;
Description: Check an existing console window to determine if a flag is set or not
Handle The handle of the window to check
Flag The window flag to check for (eg WINDOW_FLAG_LINE_WRAP)
Return True if the flag is set, False if not set.


function ConsoleWindowUpdateFlag(Handle:TWindowHandle; Flag:LongWord; Clear:Boolean):LongWord;
Description: Set or clear a flag on an existing console window
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


function ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;
Description: Get the window mode of an existing console window
Handle The handle of the window to get the mode for
Return The window mode (eg WINDOW_MODE_TEXT)


function ConsoleWindowGetState(Handle:TWindowHandle):LongWord;
Description: Get the window state of an existing console window
Handle The handle of the window to get the state for
Return The window state (eg WINDOW_STATE_INVISIBLE)


function ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;
Description: Get the position of an existing console window
Handle The handle of the window to get the position for
Return The window position (eg CONSOLE_POSITION_FULL)


function ConsoleWindowSetPosition(Handle:TWindowHandle; Position:LongWord):LongWord;
Description: Set the position of an existing console window
Handle The handle of the window to set the position for
Position The new window position to set
Return ERROR_SUCCESS if completed or another error code on failure
Note The function will return ERROR_INVALID_PARAMETER if another window exists at the position


function ConsoleWindowGetProperties(Handle:TWindowHandle; Properties:PWindowProperties):LongWord;
Description: Get the properties for the specified console window
Handle The handle of the window to get the properties from
Properties Pointer to a TWindowProperties structure to fill in
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowGetMinX(Handle:TWindowHandle):LongWord;
Description: Get the current minimum X of the window viewport for an existing console window
Handle The handle of the window to get MinX for
Return The minimum X value for the current window viewport
Note For Text Console functions, X is based on character columns not screen pixels.


function ConsoleWindowGetMinY(Handle:TWindowHandle):LongWord;
Description: Get the current minimum Y of the window viewport for an existing console window
Handle The handle of the window to get MinY for
Return The minimum Y value for the current window viewport
Note For Text Console functions, Y is based on character rows not screen pixels.


function ConsoleWindowGetMaxX(Handle:TWindowHandle):LongWord;
Description: Get the current maximum X of the window viewport for an existing console window
Handle The handle of the window to get MaxX for
Return The maximum X value for the current window viewport
Note For Text Console functions, X is based on character columns not screen pixels.


function ConsoleWindowGetMaxY(Handle:TWindowHandle):LongWord;
Description: Get the current maximum Y of the window viewport for an existing console window
Handle The handle of the window to get MaxY for
Return The maximum Y value for the current window viewport
Note For Text Console functions, Y is based on character rows not screen pixels.


function ConsoleWindowGetRect(Handle:TWindowHandle):TConsoleRect; inline;
Description: Get the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window
Handle The handle of the window to get the rectangle for
Return The rectangle of the current window viewport
Note For Text Console functions, Rect is based on character rows and columns not screen pixels.


function ConsoleWindowSetRect(Handle:TWindowHandle; const ARect:TConsoleRect):LongWord; inline;
Description: Set the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window
Handle The handle of the window to set the rectangle for
Rect The rectangle to set for the window viewport
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Rect is based on character rows and columns not screen pixels.


function ConsoleWindowResetRect(Handle:TWindowHandle):LongWord; inline;
Description: Reset the window viewport for an existing console window to the maximum size
Handle The handle of the window to reset the viewport for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowGetViewport(Handle:TWindowHandle; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Get the X1,Y1,X2,Y2 of the window viewport for an existing console window
Handle The handle of the window to get the viewport for
X1 The left edge of the current viewport
Y1 The top edge of the current viewport
X2 The right edge of the current viewport
Y2 The bottom edge of the current viewport
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Viewport is based on character rows and columns not screen pixels.


function ConsoleWindowSetViewport(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord):LongWord;
Description: Set the X1,Y1,X2,Y2 of the window viewport for an existing console window
Handle The handle of the window to get the viewport for
X1 The left edge of the window viewport
Y1 The top edge of the window viewport
X2 The right edge of the window viewport
Y2 The bottom edge of the window viewport
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Viewport is based on character rows and columns not screen pixels.


function ConsoleWindowResetViewport(Handle:TWindowHandle):LongWord;
Description: Reset the window viewport for an existing console window to the maximum size
Handle The handle of the window to reset the viewport for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowGetX(Handle:TWindowHandle):LongWord;
Description: Get the current X (Column) position of an existing console window
Handle The handle of the window to get X for
Return The X value for the window
Note For Text Console functions, X is based on character columns not screen pixels.


function ConsoleWindowSetX(Handle:TWindowHandle; X:LongWord):LongWord;
Description: Set the current X (Column) position of an existing console window
Handle The handle of the window to set X for
X The new X value to set
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, X is based on character columns not screen pixels.


function ConsoleWindowGetY(Handle:TWindowHandle):LongWord;
Description: Get the current Y (Row) position of an existing console window
Handle The handle of the window to get Y for
Return The Y value for the window
Note For Text Console functions, Y is based on character rows not screen pixels.


function ConsoleWindowSetY(Handle:TWindowHandle; Y:LongWord):LongWord;
Description: Set the current Y (Row) position of an existing console window
Handle The handle of the window to set Y for
Y The new Y value to set
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Y is based on character rows not screen pixels.


function ConsoleWindowGetXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
Description: Get the current X and Y positions of an existing console window
Handle The handle of the window to get X and Y for
X The returned X value
Y The returned Y value
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowSetXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Set the current X and Y positions of an existing console window
Handle The handle of the window to set X and Y for
X The new X value
Y The new Y value
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowGetPoint(Handle:TWindowHandle):TConsolePoint;
Description: Get the point X,Y of an existing console window
Handle The handle of the window to get the point for
Return The current point of the window
Note For Text Console functions, Point is based on character rows and columns not screen pixels.


function ConsoleWindowSetPoint(Handle:TWindowHandle; const APoint:TConsolePoint):LongWord;
Description: Set the point X,Y of an existing console window
Handle The handle of the window to set the point for
Point The new point to set for the window
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Point is based on character rows and columns not screen pixels.


function ConsoleWindowGetCols(Handle:TWindowHandle):LongWord;
Description: Get the current columns of the window viewport for an existing console window
Handle The handle of the window to get columns for
Return The columns value for the current window viewport
Note For Text Console functions, Columns is based on character columns not screen pixels.


function ConsoleWindowGetRows(Handle:TWindowHandle):LongWord;
Description: Get the current rows of the window viewport for an existing console window
Handle The handle of the window to get rows for
Return The rows value for the current window viewport
Note For Text Console functions, Rows is based on character rows not screen pixels.


function ConsoleWindowGetWidth(Handle:TWindowHandle):LongWord;
Description: Get the absolute width of an existing console window
Handle The handle of the window to get the width for
Return The absolute width of the window
Note For Text Console functions, Width is based on character columns not screen pixels.


function ConsoleWindowGetHeight(Handle:TWindowHandle):LongWord;
Description: Get the absolute height of an existing console window
Handle The handle of the window to get the height for
Return The absolute height of the window
Note For Text Console functions, Height is based on character rows not screen pixels.


function ConsoleWindowGetFormat(Handle:TWindowHandle):LongWord;
Description: Get the color format of an existing console window
Handle The handle of the window to get the format for
Return The color format of the window (eg COLOR_FORMAT_ARGB32)


function ConsoleWindowGetForecolor(Handle:TWindowHandle):LongWord;
Description: Get the current foreground color of an existing console window
Handle The handle of the window to get the foreground color for
Return The foreground color of the window (eg COLOR_WHITE)


function ConsoleWindowSetForecolor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the current foreground color of an existing console window
Handle The handle of the window to set the foreground color for
Color The foreground color to set (eg COLOR_WHITE)
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowGetBackcolor(Handle:TWindowHandle):LongWord;
Description: Get the current background color of an existing console window
Handle The handle of the window to get the background color for
Return The background color of the window (eg COLOR_BLACK)


function ConsoleWindowSetBackcolor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the current background color of an existing console window
Handle The handle of the window to set the background color for
Color The background color to set (eg COLOR_BLACK)
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowGetFont(Handle:TWindowHandle):TFontHandle;
Description: Get the default font of an existing console window
Handle The handle of the window to get the default font for
Return The font handle of the default font or INVALID_HANDLE_VALUE on error


function ConsoleWindowSetFont(Handle:TWindowHandle; Font:TFontHandle):LongWord;
Description: Set the default font of an existing console window
Handle The handle of the window to set the default font for
Font The font handle of the default font to set
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console windows, setting the font also clears the window.


function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
Description: Get the current cursor X and Y positions of an existing console window
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 For Text Console functions, cursor X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Set the current cursor X and Y positions of an existing console window
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 For Text Console functions, cursor X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowGetCursorMode(Handle:TWindowHandle):TCursorMode;
Description: Get the current cursor mode of an existing console window
Handle The handle of the window to get the mode for
Return The current cursor mode (eg CURSOR_MODE_INSERT)


function ConsoleWindowSetCursorMode(Handle:TWindowHandle;CursorMode:TCursorMode):LongWord;
Description: Set the current cursor mode of an existing console window
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


function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;
Description: Get the current cursor blink state of an existing console window
Handle The handle of the window to get blink state for
Return True if blink is enabled, False if not or on error.


function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;
Description: Set the current cursor blink state of an existing console window
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


function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;
Description: Get the current cursor state of an existing console window
Handle The handle of the window to get the state for
Return The current cursor state (eg CURSOR_STATE_ON)


function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;
Description: Set the current cursor state of an existing console window
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


function ConsoleWindowGetCursorShape(Handle:TWindowHandle):TCursorShape;
Description: Get the current cursor shape of an existing console window
Handle The handle of the window to get the shape for
Return The current cursor shape (eg CURSOR_SHAPE_LINE)


function ConsoleWindowSetCursorShape(Handle:TWindowHandle; CursorShape:TCursorShape):LongWord;
Description: Set the current cursor shape of an existing console window
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


function ConsoleWindowGetCursorColor(Handle:TWindowHandle):LongWord;
Description: Get the current cursor color of an existing console window
Handle The handle of the window to get cursor color for
Return The cursor color of the window (eg COLOR_WHITE)
Note Color will be returned in the default color format (See COLOR_FORMAT_DEFAULT)


function ConsoleWindowSetCursorColor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the current cursor color of an existing console window
Handle The handle of the window to set the cursor color for
Color The cursor color to set (eg COLOR_WHITE)
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)


function ConsoleWindowGetCursorReverse(Handle:TWindowHandle):Boolean;
Description: Get the current cursor reverse state of an existing console window
Handle The handle of the window to get reverse state for
Return True if reverse color is enabled, False if inverse color is enabled


function ConsoleWindowSetCursorReverse(Handle:TWindowHandle; CursorReverse:Boolean):LongWord;
Description: Set the current cursor reverse state of an existing console window
Handle The handle of the window to set the reverse state for
CursorReverse True to enable reverse color, False to enable inverse color
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;
Description: Enable the cursor on an existing console window
Handle The handle of the window to enable the cursor for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;
Description: Disable the cursor on an existing console window
Handle The handle of the window to disable the cursor for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorLine(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a vertical line on an existing console window
Handle The handle of the window to change the cursor for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorBar(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a horizontal bar on an existing console window
Handle The handle of the window to change the cursor for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorBlock(Handle:TWindowHandle):LongWord;
Description: Change the cursor to a solid block on an existing console window
Handle The handle of the window to change the cursor for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Description: Move the cursor on an existing console window
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 For Text Console functions, X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;
Description: Set the blink state of the cursor on an existing console window
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


function ConsoleWindowCursorColor(Handle:TWindowHandle; Color:LongWord):LongWord;
Description: Set the color of the cursor on an existing console window
Handle The handle of the window to set the color for
Color The cursor color to set (eg COLOR_WHITE)
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)


function ConsoleWindowCursorReverse(Handle:TWindowHandle; Enabled:Boolean):LongWord;
Description: Set the reverse state of the cursor on an existing console window
Handle The handle of the window to set the reverse state for
Enabled True if the cursor shows in reverse colors, False if it shows in inverse colors
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowAddHistory(Handle:TWindowHandle; const Value:String):LongWord;
Description: Add a value to the command history table of an existing console window
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 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


function ConsoleWindowClearHistory(Handle:TWindowHandle):LongWord;
Description: Remove all entries from the command history table of an existing console window}
Handle The handle of the window to clear
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowFirstHistory(Handle:TWindowHandle):String;
Description: Get the first (oldest) command history value from an existing console window
Handle The handle of the window to get from
Return The command history value or an empty string on failure


function ConsoleWindowLastHistory(Handle:TWindowHandle):String;
Description: Get the last (most recent) command history value from an existing console window
Handle The handle of the window to get from
Return The command history value or an empty string on failure


function ConsoleWindowNextHistory(Handle:TWindowHandle):String;
Description: Get the next (after current) command history value from an existing console window
Handle The handle of the window to get from
Return The command history value or an empty string on failure


function ConsoleWindowPreviousHistory(Handle:TWindowHandle):String;
Description: Get the next (before current) command history value from an existing console window
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


function ConsoleWindowCurrentHistory(Handle:TWindowHandle):String;
Description: Get the current command history value from an existing console window
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


function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window up
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 Row is the starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up. Lines is the number of character lines to scroll up, Lines number of rows at the top will be discarded. The starting Row will be blanked with the background color.


function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window down
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 Row is the starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down. Lines is the number of character lines to scroll down, Lines number of rows at the bottom will be discarded. The starting Row will be blanked with the background color.


function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window left
Handle The handle of the window to scroll
Row The starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left.
Lines The number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left.
Col The starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left.
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 The starting Col will be blanked with the background color


function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
Description: Scroll the current viewport of an existing console window right
Handle The handle of the window to scroll
Row The starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right.
Lines The number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right.
Col The starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right.
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 The starting Col will be blanked with the background color


function ConsoleWindowClear(Handle:TWindowHandle):LongWord;
Description: Clear the current viewport of an existing console window
Handle The handle of the window to clear
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowClearEx(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord; Cursor:Boolean):LongWord;
Description: Clear part of the the current viewport of an existing console window
Handle The handle of the window to clear
X1 The left edge of the area to clear (relative to current viewport)
Y1 The top edge of the area to clear (relative to current viewport)
X2 The right edge of the area to clear (relative to current viewport)
Y2 The bottom edge of the area to clear (relative to current viewport)
Cursor If True update the cursor position after clearing
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Window is based on screen character rows and columns not screen pixels.


function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;
Description: Write text on an existing console window at the current position in the current color
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 The window will not scroll up at the end of the line


function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write text on an existing console window
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 foreground color to use (eg COLOR_WHITE)
Backcolor The background color to use (eg COLOR_BLACK)
Return ERROR_SUCCESS if completed or another error code on failure
Note 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


function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;
Description: Write text on an existing console window at the current position in the current color
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 The window will scroll up at the end of the line


function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write text on an existing console window
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 foreground color to use (eg COLOR_WHITE)
Backcolor The background color to use (eg COLOR_BLACK)
Return ERROR_SUCCESS if completed or another error code on failure
Note 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


function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;
Description: Write a character on an existing console window at the current position in the current color
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


function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Write a character on an existing console window
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 foreground color to use (eg COLOR_WHITE)
Backcolor The background color to use (eg COLOR_BLACK)
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, X and Y are based on character rows and columns not screen pixels.


function ConsoleWindowOutput(Handle:TWindowHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Output a rectangular area of text to a console window
Handle The console window to output to
Source The X and Y point in the source buffer to copy text from (Characters)
Dest The X and Y point on the console window to copy text to (Characters)
Buffer A pointer to a buffer of TConsoleChar structures which represent rows of text
Width The width of the area to be output (Characters)
Height The height of the area to be output (Characters)
Skip The number of characters to skip in the buffer after each row (Optional)
Return ERROR_SUCCESS if completed or another error code on failure
Note For Text Console functions, Source, Dest, Width, Height and Skip are based on character rows and columns not screen pixels.


function ConsoleWindowRead(Handle:TWindowHandle; var AText:String):LongWord;
Description: Read text input from the console and echo to an existing console window at the current position in the current color
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


function ConsoleWindowReadLn(Handle:TWindowHandle; var AText:String):LongWord;
Description: Read text input from the console and echo to an existing console window at the current position in the current color
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


function ConsoleWindowReadLnEx(Handle:TWindowHandle; var AText:String; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Scroll,History:Boolean; Completion:TConsoleWindowCompletion; Data:Pointer):LongWord;
Description: Read text input from the console and echo to an existing console window at the specified position in the specified color
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.


function ConsoleWindowReadChr(Handle:TWindowHandle; var AChr:Char):LongWord;
Description: Read one character input from the console and echo to an existing console window at the current position in the current color
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


function ConsoleWindowReadChrEx(Handle:TWindowHandle; var AChr:Char; const Prompt:String; X,Y,Forecolor,Backcolor:LongWord; Echo,Scroll:Boolean):LongWord;
Description: Read one character input from the console and optionally echo to an existing console window at the specified position in the specified color
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


CRT console functions

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


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


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


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


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


procedure ConsoleGotoXY(X,Y:Integer);
Description: Compatible with RTL Crt unit function GotoXY
See http://www.freepascal.org/docs-html-3.0.0/rtl/crt/gotoxy.html
Note For CRT Console functions, X and Y are based on character rows and columns not screen pixels.


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


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


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


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


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


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


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


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


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


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


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


function ConsoleWhereX:Integer;
Description: Compatible with RTL Crt unit function WhereX
See http://www.freepascal.org/docs-html-3.0.0/rtl/crt/wherex.html
Note For CRT Console functions, X is based on character columns not screen pixels.


function ConsoleWhereY:Integer;
Description: Compatible with RTL Crt unit function WhereY
See http://www.freepascal.org/docs-html-3.0.0/rtl/crt/wherey.html
Note For CRT Console functions, Y is based on character row not screen pixel.


procedure ConsoleWindow(X1,Y1,X2,Y2:Integer);
Description: Compatible with RTL Crt unit function Window
See http://www.freepascal.org/docs-html-3.0.0/rtl/crt/window.html
Note For CRT Console functions, X1, Y1, X2 and Y2 are based on character rows and columns not screen pixels.


procedure ConsoleScrollUp(Row,Lines:Integer);
Description: Scroll the default console window up
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 For CRT Console functions, Row and Lines are based on character rows and columns not screen pixels.


procedure ConsoleScrollDown(Row,Lines:Integer);
Description: Scroll the default console window down
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 For CRT Console functions, Row and Lines are based on character rows and columns not screen pixels.


procedure ConsoleWrite(const AText:String);
Description: Write text on the default console window at the current position in the current color
Text The text to write
Note The window will not scroll up at the end of the line


procedure ConsoleWriteLn(const AText:String);
Description: Write text on the default console window at the current position in the current color
Text The text to write
Note The window will scroll up at the end of the line


procedure ConsoleWriteChr(AChr:Char);
Description: Write a character on the default console window at the current position in the current color
Chr The character to write


procedure ConsoleRead(var AText:String);
Description: Read text from console input and echo to screen
Text The text read from the console input


procedure ConsoleReadLn(var AText:String);
Description: Read text from console input and echo to screen
Text The text read from the console input


procedure ConsoleReadChr(var AChr:Char);
Description: Read characters from console input and echo to screen
Chr The character read from the console input


RTL text IO functions

function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform TextIOWriteChar function
Note Not intended to be called directly by applications


RTL console functions

function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Description: Handler for platform ConsoleWriteChar function
Note Not intended to be called directly by applications


Framebuffer console functions

function FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;
Description: Implementation of ConsoleDeviceOpen API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceOpen instead


function FramebufferConsoleClose(Console:PConsoleDevice):LongWord;
Description: Implementation of ConsoleDeviceClose API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceClose instead


function FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceClear API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceClear instead


function FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Description: Implementation of ConsoleDeviceScroll API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceScroll instead


function FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawBox API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawBox instead


function FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawLine API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawLine instead


function FramebufferConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle;Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawChar API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawChar instead


function FramebufferConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawText API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawText instead


function FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawPixel API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawPixel instead


function FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawBlock API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawBlock instead


function FramebufferConsoleDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawImage API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawImage instead


function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle; Flags:LongWord):LongWord;
Description: Implementation of ConsoleDeviceDrawWindow API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead

Caller must hold the Window lock


function FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;
Description: Internal function used by FramebufferConsole to draw the console desktop
Note Not intended to be called directly by applications


function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetPixel API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceGetPixel instead


function FramebufferConsoleGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetImage API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceGetImage instead


function FramebufferConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Description: Implementation of ConsoleDevicePutText API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDevicePutText instead


function FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Description: Implementation of ConsoleDeviceCopyImage API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceCopyImage instead


procedure FramebufferConsoleCaretTimer(Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device
Note Not intended to be called directly by applications


procedure FramebufferConsoleShowCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device
Note Not intended to be called directly by applications

Caller must hold the console lock


procedure FramebufferConsoleHideCaret(Console:PConsoleDevice; Caret:PConsoleCaret);
Description: Internal function used by FramebufferConsole device
Note Not intended to be called directly by applications

Caller must hold the console lock


function FramebufferConsoleAddCaret(Console:PConsoleDevice; Width,Height,OffsetX,OffsetY:LongWord):THandle;
Description: Implementation of ConsoleDeviceAddCaret API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceAddCaret instead


function FramebufferConsoleDeleteCaret(Console:PConsoleDevice; Handle:THandle):LongWord;
Description: Implementation of ConsoleDeviceDeleteCaret API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceDeleteCaret instead


function FramebufferConsoleUpdateCaretEx(Console:PConsoleDevice; Handle:THandle; X,Y,Forecolor,Backcolor:LongWord; Visible,Blink,Reverse:Boolean):LongWord;
Description: Implementation of ConsoleDeviceUpdateCaretEx API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceUpdateCaretEx instead


function FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Description: Implementation of ConsoleDeviceGetPosition API for FramebufferConsole
Note Not intended to be called directly by applications, use ConsoleDeviceGetPosition instead


Console helper functions

function ConsoleDeviceGetCount:LongWord;
Description: Get the current console device count
Note None documented


function ConsoleDeviceGetDefault:PConsoleDevice;
Description: Get the current default console device
Note None documented


function ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;
Description: Set the current default console device
Note None documented


function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;
Description: Check if the supplied Console device is in the Console table
Note None documented


function ConsoleDeviceCaretCheck(Console:PConsoleDevice; Caret:PConsoleCaret):PConsoleCaret;
Description: Check if a console caret entry is valid
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


function ConsoleTypeToString(ConsoleType:LongWord):String;
Description: Convert a Console type value to a string
Note None documented


function ConsoleStateToString(ConsoleState:LongWord):String;
Description: Convert a Console state value to a string
Note None documented


function ConsoleDeviceGetDefaultFont:TFontHandle;
Description: Get the default console font
Note None documented


function ConsolePositiontoString(Position:LongWord):String;
Description: To be documented
Note None documented


function ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented
Note None documented


function ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented
Note None documented


function ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;
Description: To be documented
Note None documented


function ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Description: To be documented
Note None documented


Text console helper functions

function ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;
Description: Get the current console window count
Console The console device to get the window count for
Return The current number of console windows on the specified console device


function ConsoleWindowGetActive(Console:PConsoleDevice):TWindowHandle; inline;
Description: Get the current console active window
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


function ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;
Description: Get the current console default window
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


function ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Description: Set the current console default window
Console The console device to set the default window for
Return ERROR_SUCCESS if completed or another error code on failure


function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;
Description: Check if a console window entry is valid
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


function ConsoleWindowStateToString(WindowState:LongWord):String;
Description: Convert a Console Window state value to a string
Note None documented


function ConsoleWindowModeToString(WindowMode:LongWord):String;
Description: Convert a Console Window mode value to a string
Note None documented


function ConsoleWindowGetDefaultFont:TFontHandle;
Description: Get the default console window font
Note None documented


function ConsoleWindowRedirectOutput(Handle:TWindowHandle):Boolean;
Description: Redirect standard output to the console window specified by Handle
Handle The window handle to redirect output to (or INVALID_HANDLE_VALUE to stop redirection)
Return True if completed successfully or False if an error occurred
Note Redirects the output of the text files Output, ErrOutput, StdOut and StdErr which also redirects the output of Write, WriteLn and the standard C library.


Return to Unit Reference