git-svn-id: https://spexeah.com:8443/svn/Asuro@746 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron
2018-05-22 03:33:51 +00:00
parent 4a1d7a942d
commit 8066634367
97 changed files with 422 additions and 123 deletions

View File

@ -27,6 +27,8 @@ procedure run(Params : PParamList);
begin
if Handle = 0 then begin
Handle:= newWindow(20, 40, 63, 14, 'NETLOG');
clearWND(Handle);
registerEventHandler(Handle, EVENT_CLOSE, void(@OnClose));
end;
end;

View File

@ -3,7 +3,7 @@ unit shell;
interface
uses
Console, RTC, terminal, strings, asuro;
Console, RTC, terminal, strings, asuro, tracer;
procedure init();
function getTaskbarColorsPtr : puint32;
@ -197,24 +197,38 @@ end;
procedure init();
begin
tracer.push_trace('shell.init.1');
Takbar_Colors:= console.combinecolors($0000, $FFFF);
tracer.push_trace('shell.init.2');
Explore_Colors:= console.combinecolors($01C3, $07EE);
tracer.push_trace('shell.init.3');
Desktop_Colors:= console.combinecolors($FFFF, $34DB);
tracer.push_trace('shell.init.4');
DesktopHandle:= Console.newWindow(0, 0, 159, 63, 'DESKTOP');
tracer.push_trace('shell.init.5');
TaskBarHandle:= Console.newWindow(0, 63, 159, 1, 'SHELL');
tracer.push_trace('shell.init.6');
console.bordersEnabled(TaskBarHandle, false);
tracer.push_trace('shell.init.7');
console.setShellWindow(TaskBarHandle, false);
tracer.push_trace('shell.init.8');
console.bordersEnabled(DesktopHandle, false);
tracer.push_trace('shell.init.9');
console.setShellWindow(DesktopHandle, false);
tracer.push_trace('shell.init.10');
console.registerEventHandler(TaskBarHandle, EVENT_DRAW, void(@Draw));
tracer.push_trace('shell.init.11');
console.registerEventHandler(TaskBarHandle, EVENT_MOUSE_CLICK, void(@OnMouseClick));
tracer.push_trace('shell.init.12');
console.registerEventHandler(DesktopHandle, EVENT_DRAW, void(@onBaseDraw));
tracer.push_trace('shell.init.13');
terminal.registerCommand('BACKGROUND', @Command_Background, 'Hide/Show background - usage: BACKGROUND <hide/show>');
tracer.push_trace('shell.init.14');
terminal.registerCommand('COLORS', @Command_Colors, 'Set the desktop colors');
end;

View File

@ -71,7 +71,7 @@ function done(id : uint32) : boolean;
implementation
uses
RTC;
RTC, cpu;
var
TERMINAL_HWND : HWND = 0;
@ -520,6 +520,27 @@ begin
terminal.halt(555, @teapot_halt);
end;
var
c1, c2 : uint64;
first : boolean = true;
procedure testt(Params : PParamList);
var
diff : uint32;
begin
if first then begin
c1:= Counters.c64;
first:= false;
end else begin
c2:= Counters.c64;
diff:= c2 - c1;
writeIntWND(diff, getTerminalHWND);
writeStringlnWND('ms', getTerminalHWND);
c1:= c2;
end;
end;
procedure init;
begin
console.writestringln('TERMINAL: INIT BEGIN.');
@ -533,6 +554,7 @@ begin
registerCommandEx('SERIAL', @SendSerial, 'Send ''helloworld'' through COM1.', true);
registerCommand('REBOOT', @Reboot, 'Reboot the system.');
registerCommandEx('LOLWUT', @teapot, '?', true);
registerCommandEx('TEST', @testt, '?', true);
console.writestringln('TERMINAL: INIT END.');
end;

41
src/prog/vmlog.pas Normal file
View File

@ -0,0 +1,41 @@
unit vmlog;
interface
uses
console, terminal, keyboard, util, strings, tracer;
procedure init();
function getVMLogHWND : HWND;
implementation
var
Handle : HWND = 0;
function getVMLogHWND : HWND;
begin
getVMLogHWND:= Handle;
end;
procedure OnClose();
begin
Handle:= 0;
end;
procedure run(Params : PParamList);
begin
if Handle = 0 then begin
Handle:= newWindow(20, 40, 63, 14, 'VMLOG');
clearWND(Handle);
registerEventHandler(Handle, EVENT_CLOSE, void(@OnClose));
end;
end;
procedure init();
begin
tracer.push_trace('vmlog.init');
terminal.registerCommand('VMLOG', @Run, 'View virtual-machine event log.');
end;
end.