Difference between revisions of "Unit Console"
Line 243: | Line 243: | ||
---- | ---- | ||
− | '' | + | |
+ | '''Console specific types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TCursorState = (CURSORON,CURSOROFF);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Console char types''' | ||
+ | |||
+ | <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%;"| | ||
+ | |- | ||
+ | | <code>Forecolor:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Backcolor:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Console point types''' | ||
+ | |||
+ | <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%;"| | ||
+ | |- | ||
+ | | <code>Y:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Console rect types''' | ||
+ | |||
+ | <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%;"| | ||
+ | |- | ||
+ | | <code>Y1:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>X2:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Y2:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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 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 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 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 types''' | ||
+ | |||
+ | <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>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>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>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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CloseCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ClearCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ScrollCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>DrawCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PutCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CopyCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |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"|''Window Properties'' | ||
+ | |- | ||
+ | | <code>WindowFirst:PConsoleWindow;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WindowLock:TCriticalSectionHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WindowCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WindowDefault:TWindowHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | |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> | ||
+ | |||
+ | '''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''' | ||
+ | |||
+ | <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>CursorTimer:TTimerHandle;</code> | ||
+ | | Cursor Timer (or INVALID_HANDLE_VALUE) | ||
+ | |- | ||
+ | |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> | ||
+ | |||
+ | '''Framebuffer console specific types''' | ||
+ | |||
+ | <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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Framebuffer Properties'' | ||
+ | |- | ||
+ | | <code>Framebuffer:PFramebufferDevice;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <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 === |
Revision as of 05:55, 16 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo Console interface unit
To be documented
Constants
CONSOLE_*
CONSOLE_TYPE_*
CONSOLE_STATE_*
CONSOLE_FLAG_*
CONSOLE_MODE_*
WINDOW_SIGNATURE_*
WINDOW_STATE_*
WINDOW_MODE_*
WINDOW_FLAG_*
CURSOR_MODE_*
FRAMEBUFFER_CONSOLE_*
Type definitions
Console specific types
TCursorState = (CURSORON,CURSOROFF);
|
Console char types
Console point types
TConsolePoint = record
Console rect types
TConsoleRect = record
Console properties
Console enumeration callback
TConsoleEnumerate = function(Console:PConsoleDevice; Data:Pointer):LongWord;
|
Console notification callback
TConsoleNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Console device open
TConsoleDeviceOpen = function(Console:PConsoleDevice):LongWord;
|
Console device close
TConsoleDeviceClose = function(Console:PConsoleDevice):LongWord;
|
Console device clear
TConsoleDeviceClear = function(Console:PConsoleDevice; Color:LongWord):LongWord;
|
Console device scroll"
TConsoleDeviceScroll = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
|
Console device draw box
TConsoleDeviceDrawBox = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
|
Console device draw line
TConsoleDeviceDrawLine = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
|
Console device draw char
TConsoleDeviceDrawChar = function(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char;X,Y,Forecolor,Backcolor:LongWord):LongWord;
|
Console device draw text
TConsoleDeviceDrawText = function(Console:PConsoleDevice; Handle:TFontHandle; const Text:String;X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
|
Console device draw pixel
TConsoleDeviceDrawPixel = function(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
|
Console device draw block
TConsoleDeviceDrawBlock = function(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
|
Console device draw image
TConsoleDeviceDrawImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
|
Console device draw window
TConsoleDeviceDrawWindow = function(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
|
Console device get pixel
TConsoleDeviceGetPixel = function(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
|
Console device get image
TConsoleDeviceGetImage = function(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
|
Console device put text
TConsoleDevicePutText = function(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
|
Console device copy image
TConsoleDeviceCopyImage = function(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
|
Console device get position
TConsoleDeviceGetPosition = function(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
|
Console device get properties
TConsoleDeviceGetProperties = function(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
|
Console device types
Window properties
Console window enumeration callback
TConsoleWindowEnumerate = function(Console:PConsoleDevice; Handle:TWindowHandle; Data:Pointer):LongWord;
|
Console window
Framebuffer console specific types
Public variables
None defined
Function declarations
Initialization functions
Console functions
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
function ConsoleDeviceClear(Console:PConsoleDevice; Color:LongWord):LongWord;
function ConsoleDeviceClose(Console:PConsoleDevice):LongWord;
function ConsoleDeviceScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
function ConsoleDeviceDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function ConsoleDeviceDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function ConsoleDeviceDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function ConsoleDeviceDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
function ConsoleDeviceDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
function ConsoleDeviceDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
function ConsoleDeviceDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function ConsoleDeviceDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
function ConsoleDeviceGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
function ConsoleDeviceGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function ConsoleDevicePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
function ConsoleDeviceCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
function ConsoleDeviceGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleDeviceGetProperties(Console:PConsoleDevice; Properties:PConsoleProperties):LongWord;
function ConsoleDeviceCheckFlag(Console:PConsoleDevice; Flag:LongWord):Boolean;
function ConsoleDeviceGetMode(Console:PConsoleDevice):LongWord;
function ConsoleDeviceGetState(Console:PConsoleDevice):LongWord;
function ConsoleDeviceCreateEx(Size:LongWord):PConsoleDevice;
function ConsoleDeviceDestroy(Console:PConsoleDevice):LongWord;
function ConsoleDeviceRegister(Console:PConsoleDevice):LongWord;
function ConsoleDeviceDeregister(Console:PConsoleDevice):LongWord;
function ConsoleDeviceFind(ConsoleId:LongWord):PConsoleDevice;
function ConsoleDeviceFindByDevice(Device:PDevice):PConsoleDevice;
function ConsoleDeviceFindByName(const Name:String):PConsoleDevice; inline;
function ConsoleDeviceFindByDescription(const Description:String):PConsoleDevice; inline;
function ConsoleDeviceEnumerate(Callback:TConsoleEnumerate; Data:Pointer):LongWord;
function ConsoleDeviceNotification(Console:PConsoleDevice; Callback:TConsoleNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Text console functions
function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
function ConsoleWindowCreateEx(Console:PConsoleDevice; Font:TFontHandle; Size,State,Mode,Position:LongWord; Default:Boolean):TWindowHandle;
function ConsoleWindowDestroy(Handle:TWindowHandle):LongWord;
function ConsoleWindowShow(Handle:TWindowHandle):LongWord;
function ConsoleWindowHide(Handle:TWindowHandle):LongWord;
function ConsoleWindowFind(Console:PConsoleDevice; Position:LongWord):TWindowHandle;
function ConsoleWindowEnumerate(Console:PConsoleDevice; Callback:TConsoleWindowEnumerate; Data:Pointer):LongWord;
function ConsoleWindowCheckFlag(Handle:TWindowHandle; Flag:LongWord):Boolean;
function ConsoleWindowGetMode(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetState(Handle:TWindowHandle):LongWord;
function ConsoleWindowCreate(Console:PConsoleDevice; Position:LongWord; Default:Boolean):TWindowHandle;
function ConsoleWindowGetPosition(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetPosition(Handle:TWindowHandle; Position:LongWord):LongWord;
function ConsoleWindowGetProperties(Handle:TWindowHandle; Properties:PWindowProperties):LongWord;
function ConsoleWindowGetMinX(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMinY(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMaxX(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetMaxY(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetRect(Handle:TWindowHandle):TConsoleRect; inline;
function ConsoleWindowSetRect(Handle:TWindowHandle; const ARect:TConsoleRect):LongWord; inline;
function ConsoleWindowResetRect(Handle:TWindowHandle):LongWord; inline;
function ConsoleWindowGetViewport(Handle:TWindowHandle; var X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleWindowSetViewport(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord):LongWord;
function ConsoleWindowResetViewport(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetX(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetX(Handle:TWindowHandle; X:LongWord):LongWord;
function ConsoleWindowGetY(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetY(Handle:TWindowHandle; Y:LongWord):LongWord;
function ConsoleWindowGetXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
function ConsoleWindowSetXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowGetPoint(Handle:TWindowHandle):TConsolePoint;
function ConsoleWindowSetPoint(Handle:TWindowHandle; const APoint:TConsolePoint):LongWord;
function ConsoleWindowGetCols(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetRows(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetWidth(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetHeight(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetFormat(Handle:TWindowHandle):LongWord;
function ConsoleWindowGetForecolor(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetForecolor(Handle:TWindowHandle; Color:LongWord):LongWord;
function ConsoleWindowGetBackcolor(Handle:TWindowHandle):LongWord;
function ConsoleWindowSetBackcolor(Handle:TWindowHandle; Color:LongWord):LongWord;
function ConsoleWindowGetFont(Handle:TWindowHandle):TFontHandle;
function ConsoleWindowSetFont(Handle:TWindowHandle; Font:TFontHandle):LongWord;
function ConsoleWindowGetCursorXY(Handle:TWindowHandle; var X,Y:LongWord):LongWord;
function ConsoleWindowSetCursorXY(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowGetCursorBlink(Handle:TWindowHandle):Boolean;
function ConsoleWindowSetCursorBlink(Handle:TWindowHandle; CursorBlink:Boolean):LongWord;
function ConsoleWindowGetCursorState(Handle:TWindowHandle):TCursorState;
function ConsoleWindowSetCursorState(Handle:TWindowHandle; CursorState:TCursorState):LongWord;
function ConsoleWindowCursorOn(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorOff(Handle:TWindowHandle):LongWord;
function ConsoleWindowCursorMove(Handle:TWindowHandle; X,Y:LongWord):LongWord;
function ConsoleWindowCursorBlink(Handle:TWindowHandle; Enabled:Boolean):LongWord;
function ConsoleWindowScrollUp(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
function ConsoleWindowScrollDown(Handle:TWindowHandle; Row,Lines:LongWord):LongWord;
function ConsoleWindowScrollLeft(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
function ConsoleWindowScrollRight(Handle:TWindowHandle; Row,Col,Lines,Chars:LongWord):LongWord;
function ConsoleWindowClear(Handle:TWindowHandle):LongWord;
function ConsoleWindowClearEx(Handle:TWindowHandle; X1,Y1,X2,Y2:LongWord; Cursor:Boolean):LongWord;
function ConsoleWindowWrite(Handle:TWindowHandle; const AText:String):LongWord;
function ConsoleWindowWriteEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowWriteLn(Handle:TWindowHandle; const AText:String):LongWord;
function ConsoleWindowWriteLnEx(Handle:TWindowHandle; const AText:String; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowWriteChr(Handle:TWindowHandle; AChr:Char):LongWord;
function ConsoleWindowWriteChrEx(Handle:TWindowHandle; AChr:Char; X,Y:LongWord; Forecolor,Backcolor:LongWord):LongWord;
function ConsoleWindowOutput(Handle:TWindowHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
CRT console functions
procedure ConsoleAssignCrt(var F:Text);
procedure ConsoleGotoXY(X,Y:Integer);
function ConsoleKeypressed:Boolean;
procedure ConsoleTextBackground(Color:LongWord);
procedure ConsoleTextColor(Color:LongWord);
procedure ConsoleTextMode(Mode:Integer);
procedure ConsoleWindow(X1,Y1,X2,Y2:Integer);
procedure ConsoleRead(var AText:String);
procedure ConsoleReadLn(var AText:String);
procedure ConsoleReadChr(var AChr:Char);
RTL console functions
function SysConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean;
Framebuffer console functions
function FramebufferConsoleOpen(Console:PConsoleDevice):LongWord;
function FramebufferConsoleClose(Console:PConsoleDevice):LongWord;
function FramebufferConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
function FramebufferConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
function FramebufferConsoleDrawBox(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function FramebufferConsoleDrawLine(Console:PConsoleDevice; X1,Y1,X2,Y2,Color,Width:LongWord):LongWord;
function FramebufferConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle;Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
function FramebufferConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
function FramebufferConsoleDrawPixel(Console:PConsoleDevice; X,Y,Color:LongWord):LongWord;
function FramebufferConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
function FramebufferConsoleDrawImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function FramebufferConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
function FramebufferConsoleDrawDesktop(Console:PConsoleDevice):LongWord;
function FramebufferConsoleGetPixel(Console:PConsoleDevice; X,Y:LongWord; var Color:LongWord):LongWord;
function FramebufferConsoleGetImage(Console:PConsoleDevice; X,Y:LongWord; Buffer:Pointer; Width,Height,Format,Skip:LongWord):LongWord;
function FramebufferConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
function FramebufferConsoleCopyImage(Console:PConsoleDevice; const Source,Dest:TConsolePoint; Width,Height:LongWord):LongWord;
function FramebufferConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Console helper functions
function ConsoleDeviceGetCount:LongWord; inline;
function ConsoleDeviceGetDefault:PConsoleDevice; inline;
function ConsoleDeviceSetDefault(Console:PConsoleDevice):LongWord;
function ConsoleDeviceCheck(Console:PConsoleDevice):PConsoleDevice;
function ConsoleFramebufferDeviceAdd(Framebuffer:PFramebufferDevice):LongWord;
function ConsoleFramebufferDeviceRemove(Framebuffer:PFramebufferDevice):LongWord;
function ConsoleFramebufferDeviceEnum(Framebuffer:PFramebufferDevice; Data:Pointer):LongWord;
function ConsoleFramebufferDeviceNotify(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
Text console helper functions
function ConsoleWindowGetCount(Console:PConsoleDevice):LongWord; inline;
function ConsoleWindowGetDefault(Console:PConsoleDevice):TWindowHandle; inline;
function ConsoleWindowSetDefault(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
function ConsoleWindowCheck(Console:PConsoleDevice; Window:PConsoleWindow):PConsoleWindow;
Return to Unit Reference