Unit terminal

Description

Prog->Terminal - Interactive Command Line Environment.

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TParamList  
Record THistory  
Record TCommand  

Functions and Procedures

procedure run;
procedure init;
procedure registerCommand(command : pchar; method : TCommandMethod; description : pchar);
procedure registerCommandEx(command : pchar; method : TCommandMethod; description : pchar; hide : boolean);
function getParams(buf : TCommandBuffer) : PParamList;
function paramCount(params : PParamList) : uint32;
function getParam(index : uint32; params : PParamList) : pchar;
procedure setWorkingDirectory(str : pchar);
function getWorkingDirectory: pchar;
function getTerminalHWND: uint32;
function halt(id : uint32; cb : THaltCallback) : boolean;
function done(id : uint32) : boolean;

Types

THaltCallback = procedure();
PParamList = ˆTParamList;
PHistory = ˆTHistory;
TCommandBuffer = array[0..1023] of byte;
TCommandMethod = procedure(params : PParamList);

Variables

buffer: TCommandBuffer;
History: PHistory;
bIndex: uint32 = 0;
Commands: array[0..65534] of TCommand;
Working_Directory: PChar = '/';
Halted: Boolean = false;
HaltID: uint32 = 0;
HaltCB: THaltCallback = nil;

Description

Functions and Procedures

procedure run;
 
procedure init;
 
procedure registerCommand(command : pchar; method : TCommandMethod; description : pchar);
 
procedure registerCommandEx(command : pchar; method : TCommandMethod; description : pchar; hide : boolean);
 
function getParams(buf : TCommandBuffer) : PParamList;
 
function paramCount(params : PParamList) : uint32;
 
function getParam(index : uint32; params : PParamList) : pchar;
 
procedure setWorkingDirectory(str : pchar);
 
function getWorkingDirectory: pchar;
 
function getTerminalHWND: uint32;
 
function halt(id : uint32; cb : THaltCallback) : boolean;
 
function done(id : uint32) : boolean;
 

Types

THaltCallback = procedure();
 
PParamList = ˆTParamList;
 
PHistory = ˆTHistory;
 
TCommandBuffer = array[0..1023] of byte;
 
TCommandMethod = procedure(params : PParamList);
 

Variables

buffer: TCommandBuffer;
 
History: PHistory;
 
bIndex: uint32 = 0;
 
Commands: array[0..65534] of TCommand;
 
Working_Directory: PChar = '/';
 
Halted: Boolean = false;
 
HaltID: uint32 = 0;
 
HaltCB: THaltCallback = nil;
 

Author


Generated by PasDoc 0.16.0.