2007-09-28 14:26:28 +02:00
|
|
|
|
|
|
|
|
|
{ <20> FreePascal 2.2.0 <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> cp866 <20><> ॠ<><E0A5A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. }
|
|
|
|
|
{-$codepage cp866}
|
|
|
|
|
|
2007-09-12 18:34:21 +02:00
|
|
|
|
{$mode objfpc}
|
|
|
|
|
{$smartlink on}
|
|
|
|
|
{$apptype console}
|
|
|
|
|
|
|
|
|
|
{ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᬠ<EFBFBD>ਢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>믮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ਫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᮫쭮<EFBFBD>,
|
2007-09-28 14:26:28 +02:00
|
|
|
|
<EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD>४⨢<EFBFBD> console <EFBFBD><EFBFBD>易⥫쭠, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢨<EFBFBD> <EFBFBD>⮩
|
2007-09-12 18:34:21 +02:00
|
|
|
|
<EFBFBD><EFBFBD>४⨢<EFBFBD> <EFBFBD>।<EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㭪樨
|
|
|
|
|
Write, WriteLn, Read, ReadLn <EFBFBD>⭮<EFBFBD><EFBFBD>⥫쭮 <EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD>⭮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᮫<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD>뢮<EFBFBD><EFBFBD>.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
program Example;
|
|
|
|
|
|
|
|
|
|
{ <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㭪樨 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>騥 <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD> 'kos_' <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ମ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᨬ묨
|
|
|
|
|
<EFBFBD> ॠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <EFBFBD><EFBFBD><EFBFBD> KolibriOS. <EFBFBD><EFBFBD> <EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
<EFBFBD>ਫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>⥣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>᪨ <EFBFBD><EFBFBD> ४<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>뭮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>⮤<EFBFBD>, <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>騥
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㭪樨, <EFBFBD> <EFBFBD>⤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>㫨 (<EFBFBD> <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠪ樨).
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
procedure DoPaint;
|
|
|
|
|
{ <20>뢮<EFBFBD> ᮤ<>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> }
|
|
|
|
|
begin
|
|
|
|
|
kos_begindraw();
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{<7B><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC> <20><><EFBFBD><EFBFBD>}
|
2007-09-12 18:34:21 +02:00
|
|
|
|
kos_definewindow(200, 200, 200, 50, $23AABBCC);
|
|
|
|
|
{kos_definewindow <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뢮<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
2007-09-28 14:26:28 +02:00
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⤥<EFBFBD>쭮<EFBFBD> <EFBFBD>㭪樥<EFBFBD> kos_setcaption}
|
|
|
|
|
{<7B>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>}
|
2007-09-12 18:34:21 +02:00
|
|
|
|
kos_setcaption('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{<7B>뢮<EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD>}
|
2007-09-12 18:34:21 +02:00
|
|
|
|
kos_drawtext(3, 8, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...');
|
|
|
|
|
kos_enddraw();
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure DoKey;
|
|
|
|
|
{ <20><>ࠡ<EFBFBD>⪠ ᮡ<><E1AEA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> }
|
|
|
|
|
var
|
|
|
|
|
Key: DWord;
|
|
|
|
|
Notes: array[0..3] of Byte;
|
|
|
|
|
begin
|
|
|
|
|
Key := kos_getkey();
|
|
|
|
|
{<7B><><EFBFBD><EFBFBD>ࠨ<EFBFBD><E0A0A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>}
|
|
|
|
|
Notes[0] := $90;
|
|
|
|
|
Notes[1] := Key shr 8;
|
|
|
|
|
Notes[2] := $00;
|
|
|
|
|
{<7B><><EFBFBD><EFBFBD>ந<EFBFBD><E0AEA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
|
2007-09-28 14:26:28 +02:00
|
|
|
|
kos_speaker(@Notes);
|
2007-09-12 18:34:21 +02:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function DoButton: Boolean;
|
|
|
|
|
{ <20><>ࠡ<EFBFBD>⪠ ᮡ<><E1AEA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> GUI }
|
|
|
|
|
var
|
|
|
|
|
Button: DWord;
|
|
|
|
|
begin
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
|
2007-09-12 18:34:21 +02:00
|
|
|
|
Button := kos_getbutton();
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{<7B> [x], <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0AEA2><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨥ <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
|
|
|
|
|
Result := Button <> 1;
|
2007-09-12 18:34:21 +02:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ProcessMessage: Boolean;
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ࠡ<EFBFBD>⪠ ᮡ<EFBFBD>⨩.
|
|
|
|
|
|
|
|
|
|
@return: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> False, <EFBFBD> <EFBFBD>뫮 ᮡ<EFBFBD>⨥ <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><EFBFBD> <EFBFBD>ਫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2007-09-12 18:34:21 +02:00
|
|
|
|
@rtype: True <EFBFBD><EFBFBD><EFBFBD> False }
|
|
|
|
|
var
|
|
|
|
|
Event: DWord;
|
|
|
|
|
begin
|
2007-09-28 14:26:28 +02:00
|
|
|
|
Result := True;
|
2007-09-12 18:34:21 +02:00
|
|
|
|
{<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮡ<><E1AEA1><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>⥬<EFBFBD>}
|
|
|
|
|
Event := kos_getevent();
|
|
|
|
|
case Event of
|
|
|
|
|
SE_PAINT : DoPaint; {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>}
|
|
|
|
|
SE_KEYBOARD: DoKey; {ᮡ<>⨥ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
|
|
|
|
|
SE_BUTTON : Result := DoButton; {ᮡ먥 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-09-28 14:26:28 +02:00
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><EFBFBD> <EFBFBD>ਫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> False}
|
2007-09-12 18:34:21 +02:00
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure MainLoop;
|
|
|
|
|
{ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 横<> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> }
|
|
|
|
|
var
|
|
|
|
|
ThreadSlot: TThreadSlot;
|
|
|
|
|
begin
|
|
|
|
|
{<7B><><EFBFBD><EFBFBD>ࠨ<EFBFBD><E0A0A8><EFBFBD><EFBFBD> ᮡ<><E1AEA1><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>⮢<EFBFBD> <20><>ࠡ<EFBFBD><E0A0A1>뢠<EFBFBD><EBA2A0>}
|
|
|
|
|
kos_maskevents(ME_PAINT or ME_KEYBOARD or ME_BUTTON);
|
2007-09-28 14:26:28 +02:00
|
|
|
|
{<7B><>ࠡ<EFBFBD>⪠ ᮡ<>⨩}
|
|
|
|
|
while ProcessMessage do;
|
2007-09-12 18:34:21 +02:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
2007-09-28 14:26:28 +02:00
|
|
|
|
WriteLn('Look for a new window, I''m just a konsole ;-)');
|
2007-09-12 18:34:21 +02:00
|
|
|
|
MainLoop;
|
|
|
|
|
end.
|