Difference between revisions of "Unit Console"
Line 2,885: | Line 2,885: | ||
! '''Note''' | ! '''Note''' | ||
| None documented | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 | ||
|- | |- | ||
|} | |} | ||
Line 2,894: | Line 2,909: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre> | <pre style="border: 0; padding-bottom:0px;">function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications |
|- | |- | ||
|} | |} | ||
Line 3,269: | Line 3,284: | ||
! '''Note''' | ! '''Note''' | ||
| None documented | | 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. | ||
|- | |- | ||
|} | |} |
Revision as of 03:39, 26 July 2017
Return to Unit Reference
Description
Ultibo Console interface unit
To be documented
Constants
CONSOLE_*
CONSOLE_NAME_PREFIX = 'Console';
|
Name prefix for Console Devices |
CONSOLE_TYPE_*
CONSOLE_TYPE_NONE = 0;
|
|
CONSOLE_TYPE_FRAMEBUFFER = 1;
|
|
CONSOLE_TYPE_SERIAL = 2;
|
|
CONSOLE_TYPE_REMOTE = 3;
|
|
CONSOLE_TYPE_LCD = 4;
|
CONSOLE_STATE_*
CONSOLE_STATE_CLOSED = 0;
|
|
CONSOLE_STATE_OPEN = 1;
|
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 |
CONSOLE_FLAG_SINGLE_CURSOR = $00000100;
|
Console supports only one cursor (Not one per window) |
CONSOLE_FLAG_BLINK_CURSOR = $00000200;
|
Console supports blinking cursor |
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_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;
|
CONSOLE_MODE_*
CONSOLE_MODE_NONE = 0;
|
|
CONSOLE_MODE_PIXEL = 1;
|
|
CONSOLE_MODE_CHARACTER = 2;
|
WINDOW_SIGNATURE_*
WINDOW_SIGNATURE = $DE3A5C04;
|
WINDOW_STATE_*
WINDOW_STATE_INVISIBLE = 0;
|
|
WINDOW_STATE_VISIBLE = 1;
|
WINDOW_MODE_*
WINDOW_MODE_NONE = 0;
|
|
WINDOW_MODE_TEXT = 1;
|
|
WINDOW_MODE_GRAPHICS = 2;
|
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 |
CURSOR_MODE_*
CURSOR_MODE_INSERT = 0;
|
|
CURSOR_MODE_OVERWRITE = 1;
|
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 state
TCursorState = (CURSORON,CURSOROFF);
|
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 draw char
TConsoleDeviceDrawChar = function(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char;X,Y,Forecolor,Backcolor:LongWord):LongWord;
|
Console device draw text
TConsoleDeviceDrawText = function(Console:PConsoleDevice; Handle:TFontHandle; const Text:String;X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
|
Console device draw pixel
TConsoleDeviceDrawPixel = function(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
|
Console device draw block
TConsoleDeviceDrawBlock = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
|
Console device draw image
TConsoleDeviceDrawImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
|
Console device draw window
TConsoleDeviceDrawWindow = function(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
|
Console device get pixel
TConsoleDeviceGetPixel = function(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
|
Console device get image
TConsoleDeviceGetImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
|
Console device put text
TConsoleDevicePutText = function(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
|
Console device copy image
TConsoleDeviceCopyImage = function(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
|
Console device get position
TConsoleDeviceGetPosition = function(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
|
Console device get properties
TConsoleDeviceGetProperties = function(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
|
Console device
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) |
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) |
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) |
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) |
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 |
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
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 |
CursorTimer:TTimerHandle;
|
Cursor Timer (or INVALID_HANDLE_VALUE) |
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 |
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;
Note | None documented |
---|
Console functions
function ConsoleDeviceOpen(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Note | Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT) |
---|
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Note | None documented |
---|
function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
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;
Note | Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT) |
---|
function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
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;
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;
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;
Note | Color must be specified in the default color format (See COLOR_FORMAT_DEFAULT) |
---|
function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
Skip | The number of pixels to skip in the buffer after each row (Optional) |
---|
function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Note | None documented |
---|
function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
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;
Skip | The number of pixels to skip in the buffer after each row (Optional) |
---|
function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
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, Heigth and Skip are based on character rows and columns not screen pixels |
function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Note | None documented |
---|
function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Note | None documented |
---|
function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
Note | None documented |
---|
function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;
Note | None documented |
---|
function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceCreate:PConsoleDevice;
Return | Pointer to new Console entry or nil if Console could not be created |
---|
function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;
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;
Note | None documented |
---|
function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;
Note | None documented |
---|
function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;
Note | None documented |
---|
function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;
Note | None documented |
---|
function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;
Note | None documented |
---|
function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
Text console functions
function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
Console | The console device to create the new window on |
---|---|
Position | The console position to create the new window at (eg CONSOLE_POSITION_FULL) |
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;
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) |
Return | Handle to new Console window or INVALID_HANDLE_VALUE if Console window could not be created |
function ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;
Handle | The handle of the window to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ConsoleWindowShow(Handle:TWindowHandle):LongWord;
Handle | The handle of the window to show |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ConsoleWindowHide(Handle:TWindowHandle):LongWord;
Handle | The handle of the window to hide |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;
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;
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;
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 ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;
Handle | The handle of the window to get the mode for |
---|---|
Return | The window mode (eg WINDOW_MODE_TEXT) |
function ConsoleWindowGetState(Handle:TWindowHandle):LongWord;
Handle | The handle of the window to get the state for |
---|---|
Return | The window state (eg WINDOW_STATE_INVISIBLE) |
function ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
Note | None documented |
---|
function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Note | None documented |
---|
function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;
Note | None documented |
---|
function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;
Note | None documented |
---|
function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;
Note | None documented |
---|
function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;
Note | None documented |
---|
function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;
Note | None documented |
---|
function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;
Note | None documented |
---|
function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;
Note | None documented |
---|
function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;
Note | None documented |
---|
function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
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;
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;
Row | Row is the starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left |
---|---|
Lines | Lines is the number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left |
Col | Col is the starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left |
Char | Chars is the number of characters to scroll left, Chars number of columnss at the left will be discarded |
Note | The starting Col will be blanked with the background color |
function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
Row | Row is the starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right |
---|---|
Lines | Lines is the number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right |
Col | Col is the starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right |
Char | Chars is the number of characters to scroll right, Chars number of columns at the right will be discarded |
Note | The starting Col will be blanked with the background color |
function ConsoleWindowClear(Handle:TWindowHandle):LongWord;
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;
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;
Note | None documented |
---|
function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
Note | For Text Console functions, X and Y are based on screen character rows and columns not screen pixels |
---|
function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;
Note | None documented |
---|
function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
Note | For Text Console functions, X and Y are based on character rows and columns not screen pixels |
---|
function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;
Note | None documented |
---|
function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
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;
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. |
CRT console functions
procedure ConsoleAssignCrt(var F:Text);
procedure ConsoleClrEol;
procedure ConsoleClrScr;
procedure ConsoleDelay(MS:Word);
procedure ConsoleDelLine;
procedure ConsoleGotoXY(X,Y:Integer);
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;
procedure ConsoleInsLine;
function ConsoleKeypressed:Boolean;
procedure ConsoleLowVideo;
procedure ConsoleNormVideo;
procedure ConsoleNoSound;
function ConsoleReadKey:Char;
See | http://www.freepascal.org/docs-html-3.0.0/rtl/crt/readkey.html |
---|---|
Note | For extended key scan codes see: http://www.freepascal.org/docs-html/rtl/keyboard/kbdscancode.html |
procedure ConsoleSound(Hz:Word);
procedure ConsoleTextBackground(Color:LongWord);
procedure ConsoleTextColor(Color:LongWord);
procedure ConsoleTextMode(Mode:Integer);
function ConsoleWhereX:Integer;
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;
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);
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);
Note | For CRT Console functions, Row and Lines are based on character rows and columns not screen pixels |
---|
procedure ConsoleScrollDown(Row,Lines:Integer);
Note | For CRT Console functions, Row and Lines are based on character rows and columns not screen pixels |
---|
procedure ConsoleWrite(const AText:String);
Note | None documented |
---|
procedure ConsoleWriteLn(const AText:String);
Note | None documented |
---|
procedure ConsoleWriteChr(AChr:Char);
Note | None documented |
---|
procedure ConsoleRead(var AText:String);
Note | None documented |
---|
procedure ConsoleReadLn(var AText:String);
Note | None documented |
---|
procedure ConsoleReadChr(var AChr:Char);
Note | None documented |
---|
RTL text IO functions
function SysTextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Note | Not intended to be called directly by applications |
---|
RTL console functions
function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Note | Not intended to be called directly by applications |
---|
Framebuffer console functions
function FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceOpen instead |
---|
function FramebufferConsoleClose(Console:PConsoleDevice):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceClose instead |
---|
function FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceClear instead |
---|
function FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceScroll instead |
---|
function FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawBox instead |
---|
function FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
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;
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;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawText instead |
---|
function FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawPixel instead |
---|
function FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
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;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawImage instead |
---|
function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead. Caller must hold the Window lock |
---|
function FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;
Note | Not intended to be called directly by applications |
---|
function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
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;
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;
Note | Not intended to be called directly by applications, use ConsoleDevicePutText instead |
---|
function FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceCopyImage instead |
---|
function FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceGetPosition instead |
---|
Console helper functions
function ConsoleDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function ConsoleDeviceGetDefault:PConsoleDevice; inline;
Note | None documented |
---|
function ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;
Note | None documented |
---|
function ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;
Note | None documented |
---|
function ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;
Note | None documented |
---|
function ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;
Note | None documented |
---|
function ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Note | None documented |
---|
Text console helper functions
function ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;
Note | None documented |
---|
function ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;
Note | None documented |
---|
function ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Note | None documented |
---|
function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;
Note | None documented |
---|
function ConsoleWindowRedirectOutput(Handle:TWindowHandle):Boolean;
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