1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-26 03:02:15 -05:00

Merged trunk into branch...

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@473 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
BenLand100 2010-01-26 04:44:41 +00:00
parent 487a4fe303
commit 325e9904da
11 changed files with 356 additions and 244 deletions

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/>
<Icon Value="0"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="7"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -31,12 +31,12 @@
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="20">
<Units Count="23">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<UsageCount Value="67"/>
<UsageCount Value="69"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
@ -44,10 +44,10 @@
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="103" Y="81"/>
<TopLine Value="67"/>
<CursorPos X="30" Y="15"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="67"/>
<UsageCount Value="69"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
@ -73,10 +73,10 @@
<Unit4>
<Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/>
<CursorPos X="25" Y="50"/>
<TopLine Value="31"/>
<EditorIndex Value="4"/>
<UsageCount Value="34"/>
<CursorPos X="27" Y="48"/>
<TopLine Value="30"/>
<EditorIndex Value="7"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@ -84,8 +84,8 @@
<UnitName Value="ocr"/>
<CursorPos X="73" Y="16"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="34"/>
<EditorIndex Value="9"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
@ -93,8 +93,8 @@
<UnitName Value="bitmaps"/>
<CursorPos X="18" Y="81"/>
<TopLine Value="47"/>
<EditorIndex Value="12"/>
<UsageCount Value="33"/>
<EditorIndex Value="14"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
@ -102,8 +102,8 @@
<UnitName Value="ocrutil"/>
<CursorPos X="39" Y="208"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="33"/>
<EditorIndex Value="6"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
@ -117,17 +117,15 @@
<UnitName Value="tpa"/>
<CursorPos X="5" Y="557"/>
<TopLine Value="535"/>
<EditorIndex Value="11"/>
<UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<UnitName Value="mufasatypesutil"/>
<CursorPos X="25" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="30"/>
<EditorIndex Value="12"/>
<UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
@ -135,8 +133,8 @@
<UnitName Value="finder"/>
<CursorPos X="78" Y="455"/>
<TopLine Value="432"/>
<EditorIndex Value="5"/>
<UsageCount Value="27"/>
<EditorIndex Value="8"/>
<UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
@ -156,24 +154,26 @@
<UnitName Value="files"/>
<CursorPos X="7" Y="103"/>
<TopLine Value="34"/>
<EditorIndex Value="8"/>
<UsageCount Value="24"/>
<EditorIndex Value="11"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<UnitName Value="colourpicker"/>
<CursorPos X="20" Y="56"/>
<TopLine Value="37"/>
<UsageCount Value="10"/>
<CursorPos X="48" Y="238"/>
<TopLine Value="226"/>
<EditorIndex Value="1"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<UnitName Value="windowselector"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="10"/>
<UsageCount Value="16"/>
<CursorPos X="1" Y="33"/>
<TopLine Value="12"/>
<EditorIndex Value="13"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
@ -181,150 +181,175 @@
<UnitName Value="Window"/>
<CursorPos X="94" Y="338"/>
<TopLine Value="323"/>
<EditorIndex Value="2"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<UnitName Value="MufasaTypes"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="277"/>
<EditorIndex Value="1"/>
<UsageCount Value="14"/>
<EditorIndex Value="5"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fontloader"/>
<CursorPos X="34" Y="121"/>
<CursorPos X="42" Y="106"/>
<TopLine Value="89"/>
<EditorIndex Value="7"/>
<UsageCount Value="22"/>
<EditorIndex Value="10"/>
<UsageCount Value="24"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="48" Y="61"/>
<TopLine Value="37"/>
<EditorIndex Value="2"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<UnitName Value="IOManager"/>
<CursorPos X="87" Y="102"/>
<TopLine Value="227"/>
<EditorIndex Value="4"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<UnitName Value="os_windows"/>
<CursorPos X="65" Y="64"/>
<TopLine Value="45"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit22>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="191" Column="50" TopLine="183"/>
<Filename Value="unit1.pas"/>
<Caret Line="11" Column="26" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="9" Column="66" TopLine="1"/>
<Caret Line="84" Column="26" TopLine="66"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="34" Column="16" TopLine="1"/>
<Caret Line="87" Column="22" TopLine="69"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="149" Column="13" TopLine="117"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="73" Column="41" TopLine="55"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
<Caret Line="135" Column="69" TopLine="124"/>
<Caret Line="11" Column="24" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="340" Column="78" TopLine="325"/>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="11" TopLine="71"/>
</Position6>
<Position7>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="62" Column="64" TopLine="46"/>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="48" Column="27" TopLine="30"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="43" TopLine="74"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="35" TopLine="51"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="89" Column="13" TopLine="71"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="41" Column="32" TopLine="34"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<Caret Line="8" Column="25" TopLine="1"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="66" Column="28" TopLine="45"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="71" Column="47" TopLine="51"/>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="6" TopLine="82"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="1" TopLine="67"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="200" Column="37" TopLine="194"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="85" Column="41" TopLine="66"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="348" Column="85" TopLine="330"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="46" Column="37" TopLine="16"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="40" Column="1" TopLine="16"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="17" Column="73" TopLine="1"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="54" Column="20" TopLine="23"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="233" Column="33" TopLine="215"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="59" Column="1" TopLine="25"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="32" Column="16" TopLine="14"/>
</Position17>
<Position18>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="63" Column="22" TopLine="28"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="8" Column="99" TopLine="1"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="60" Column="28" TopLine="31"/>
<Filename Value="unit1.pas"/>
<Caret Line="12" Column="56" TopLine="5"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="79" Column="59" TopLine="58"/>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="29" TopLine="65"/>
</Position20>
<Position21>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="101" Column="18" TopLine="71"/>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position21>
<Position22>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="65" Column="13" TopLine="56"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="34" TopLine="56"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="128" Column="18" TopLine="100"/>
<Filename Value="unit1.pas"/>
<Caret Line="36" Column="18" TopLine="18"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="57" Column="21" TopLine="39"/>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="47" TopLine="70"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="143" Column="16" TopLine="109"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="226" Column="37" TopLine="196"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="114" Column="30" TopLine="96"/>
<Filename Value="unit1.pas"/>
<Caret Line="87" Column="60" TopLine="69"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="105" Column="14" TopLine="78"/>
<Filename Value="unit1.pas"/>
<Caret Line="95" Column="79" TopLine="70"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="103" Column="9" TopLine="85"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="191" Column="107" TopLine="170"/>
</Position28>
<Position29>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="176" Column="56" TopLine="145"/>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="8" TopLine="1"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="80" Column="59" TopLine="40"/>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<Caret Line="167" Column="15" TopLine="144"/>
</Position30>
</JumpHistory>
</ProjectOptions>

View File

@ -6,7 +6,9 @@ interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, Client, MufasaTypes, Bitmaps, ocr, windowselector,window;
StdCtrls, ExtCtrls, Client, MufasaTypes, Bitmaps, ocr, windowselector,
{$IFDEF MSWINDOWS} os_windows, {$ENDIF}
{$IFDEF LINUX} os_linux {$ENDIF};
type
@ -31,7 +33,7 @@ type
BitmapPath: String;
FontPath: String;
CliW: TMWindow;
CliW: TIOManager;
UseClient: Boolean;
{ private declarations }
public
@ -79,14 +81,14 @@ begin
Form1.Image1.Canvas.Rectangle(0, 0, Form1.Image1.Canvas.Width, Form1.Image1.Canvas.Height);
// create and init client
C := TClient.Create;
C := TClient.Create('');
bmp := TMufasaBitmap.Create;
if UseClient then
C.MWindow.SetWindow(CliW)
C.IOManager.SetTarget(TWindow(CliW.GetImageTarget).GetNativeWindow())
else
begin
bmp.LoadFromFile(BitmapPath);
C.MWindow.SetTarget(bmp);
C.IOManager.SetTarget(bmp);
end;
Shadow :=FShadow.Checked;
@ -158,7 +160,7 @@ Var
begin
UseClient := True;
if not assigned(CliW) then
CliW := TMWindow.Create;
CliW := TIOManager.Create;
WS := TMWindowSelector.Create(CliW);
CliW.SetTarget(WS.Drag{$IFDEF WINDOWS},w_Window{$ENDIF});
end;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -10,12 +10,13 @@
<TargetFileExt Value=""/>
<Title Value="Simba"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="0"/>
<Icon Value="0"/>
<ActiveEditorIndexAtStart Value="10"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value="0403"/>
<CharSet Value="04E2"/>
<Language Value="0421"/>
<CharSet Value="03A4"/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
@ -139,11 +140,9 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="1" Y="557"/>
<TopLine Value="540"/>
<EditorIndex Value="10"/>
<CursorPos X="3" Y="1550"/>
<TopLine Value="1548"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="../Compilertje/Units/CogatUnits/compinput.pas"/>
@ -191,7 +190,7 @@
<UnitName Value="Client"/>
<CursorPos X="15" Y="67"/>
<TopLine Value="49"/>
<EditorIndex Value="3"/>
<EditorIndex Value="7"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit20>
@ -266,9 +265,9 @@
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mmlpsthread"/>
<CursorPos X="1" Y="465"/>
<TopLine Value="492"/>
<EditorIndex Value="6"/>
<CursorPos X="31" Y="260"/>
<TopLine Value="243"/>
<EditorIndex Value="10"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit30>
@ -350,7 +349,7 @@
<UnitName Value="bitmaps"/>
<CursorPos X="12" Y="93"/>
<TopLine Value="83"/>
<EditorIndex Value="13"/>
<EditorIndex Value="11"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit42>
@ -495,11 +494,9 @@
</Unit63>
<Unit64>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
<CursorPos X="23" Y="107"/>
<TopLine Value="7"/>
<EditorIndex Value="11"/>
<UsageCount Value="45"/>
<Loaded Value="True"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="90"/>
<UsageCount Value="44"/>
</Unit64>
<Unit65>
<Filename Value="../../Units/PascalScript/uPSCompiler.pas"/>
@ -538,10 +535,8 @@
<IsPartOfProject Value="True"/>
<UnitName Value="plugins"/>
<CursorPos X="34" Y="70"/>
<TopLine Value="71"/>
<EditorIndex Value="7"/>
<TopLine Value="49"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit70>
<Unit71>
<Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/>
@ -627,10 +622,8 @@
<IsPartOfProject Value="True"/>
<UnitName Value="windowselector"/>
<CursorPos X="37" Y="34"/>
<TopLine Value="176"/>
<EditorIndex Value="9"/>
<TopLine Value="12"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit82>
<Unit83>
<Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/objpas/classes/classesh.inc"/>
@ -713,9 +706,11 @@
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="ocr"/>
<CursorPos X="50" Y="739"/>
<CursorPos X="82" Y="720"/>
<TopLine Value="720"/>
<EditorIndex Value="1"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit94>
<Unit95>
<Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/>
@ -770,9 +765,9 @@
<Unit103>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/window.inc"/>
<CursorPos X="12" Y="63"/>
<TopLine Value="29"/>
<EditorIndex Value="1"/>
<UsageCount Value="20"/>
<TopLine Value="30"/>
<EditorIndex Value="5"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit103>
<Unit104>
@ -892,11 +887,9 @@
<ComponentName Value="ScriptFrame"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="framescript"/>
<CursorPos X="23" Y="72"/>
<TopLine Value="223"/>
<EditorIndex Value="8"/>
<CursorPos X="1" Y="101"/>
<TopLine Value="98"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit120>
<Unit121>
<Filename Value="../../../lazarus/lcl/include/pagecontrol.inc"/>
@ -1546,7 +1539,9 @@
<UnitName Value="ocrutil"/>
<CursorPos X="52" Y="609"/>
<TopLine Value="585"/>
<EditorIndex Value="3"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit216>
<Unit217>
<Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/filutilh.inc"/>
@ -1595,7 +1590,7 @@
<UnitName Value="framefunctionlist"/>
<CursorPos X="26" Y="295"/>
<TopLine Value="7"/>
<UsageCount Value="189"/>
<UsageCount Value="182"/>
</Unit223>
<Unit224>
<Filename Value="../../../usr/local/share/lazarus/lcl/comctrls.pp"/>
@ -1622,7 +1617,9 @@
<UnitName Value="fontloader"/>
<CursorPos X="59" Y="173"/>
<TopLine Value="151"/>
<EditorIndex Value="4"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit227>
<Unit228>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
@ -1650,7 +1647,7 @@
<UnitName Value="simpleanalyzer"/>
<CursorPos X="52" Y="104"/>
<TopLine Value="193"/>
<UsageCount Value="176"/>
<UsageCount Value="169"/>
</Unit231>
<Unit232>
<Filename Value="../../Units/Misc/mPasLex.pas"/>
@ -1708,10 +1705,10 @@
</Unit239>
<Unit240>
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
<CursorPos X="89" Y="99"/>
<TopLine Value="78"/>
<EditorIndex Value="2"/>
<UsageCount Value="31"/>
<CursorPos X="40" Y="59"/>
<TopLine Value="36"/>
<EditorIndex Value="6"/>
<UsageCount Value="27"/>
<Loaded Value="True"/>
</Unit240>
<Unit241>
@ -1727,7 +1724,7 @@
<UnitName Value="updater"/>
<CursorPos X="38" Y="211"/>
<TopLine Value="65"/>
<UsageCount Value="149"/>
<UsageCount Value="142"/>
</Unit242>
<Unit243>
<Filename Value="updateform.pas"/>
@ -1738,7 +1735,7 @@
<ComponentState Value="1"/>
<CursorPos X="111" Y="102"/>
<TopLine Value="207"/>
<UsageCount Value="144"/>
<UsageCount Value="137"/>
</Unit243>
<Unit244>
<Filename Value="../../../Documents/lazarus/lcl/fileutil.pas"/>
@ -1859,7 +1856,7 @@
<UnitName Value="simbasettings"/>
<CursorPos X="26" Y="9"/>
<TopLine Value="11"/>
<UsageCount Value="107"/>
<UsageCount Value="100"/>
</Unit261>
<Unit262>
<Filename Value="../../Units/MMLAddon/settings.pas"/>
@ -1897,7 +1894,7 @@
<UnitName Value="reportbug"/>
<CursorPos X="53" Y="23"/>
<TopLine Value="21"/>
<UsageCount Value="90"/>
<UsageCount Value="83"/>
</Unit266>
<Unit267>
<Filename Value="../../Units/Synapse/synsock.pas"/>
@ -1954,7 +1951,7 @@
<UnitName Value="newinternets"/>
<CursorPos X="37" Y="171"/>
<TopLine Value="153"/>
<UsageCount Value="86"/>
<UsageCount Value="79"/>
</Unit274>
<Unit275>
<Filename Value="reportbug.lrs"/>
@ -2000,19 +1997,19 @@
<Unit281>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<UnitName Value="IOManager"/>
<CursorPos X="24" Y="617"/>
<TopLine Value="605"/>
<CursorPos X="67" Y="53"/>
<TopLine Value="34"/>
<EditorIndex Value="0"/>
<UsageCount Value="34"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit281>
<Unit282>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="36" Y="69"/>
<TopLine Value="34"/>
<EditorIndex Value="5"/>
<UsageCount Value="33"/>
<TopLine Value="56"/>
<EditorIndex Value="9"/>
<UsageCount Value="29"/>
<Loaded Value="True"/>
</Unit282>
<Unit283>
@ -2025,10 +2022,10 @@
<Unit284>
<Filename Value="../../Units/MMLCore/os_windows.pas"/>
<UnitName Value="os_windows"/>
<CursorPos X="9" Y="75"/>
<TopLine Value="67"/>
<EditorIndex Value="14"/>
<UsageCount Value="29"/>
<CursorPos X="22" Y="164"/>
<TopLine Value="155"/>
<EditorIndex Value="12"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
</Unit284>
<Unit285>
@ -2049,11 +2046,9 @@
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="libloader"/>
<CursorPos X="11" Y="141"/>
<TopLine Value="116"/>
<EditorIndex Value="12"/>
<UsageCount Value="44"/>
<Loaded Value="True"/>
<CursorPos X="1" Y="149"/>
<TopLine Value="128"/>
<UsageCount Value="37"/>
</Unit287>
<Unit288>
<Filename Value="../../Units/MMLAddon/tpa.pas"/>
@ -2064,10 +2059,10 @@
</Unit288>
<Unit289>
<Filename Value="../../Units/PascalScript/x86.inc"/>
<CursorPos X="1" Y="162"/>
<TopLine Value="145"/>
<EditorIndex Value="4"/>
<UsageCount Value="19"/>
<CursorPos X="8" Y="157"/>
<TopLine Value="140"/>
<EditorIndex Value="8"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit289>
<Unit290>
@ -2088,130 +2083,128 @@
<UnitName Value="tpa"/>
<CursorPos X="70" Y="1393"/>
<TopLine Value="1364"/>
<EditorIndex Value="2"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit292>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<JumpHistory Count="29" HistoryIndex="28">
<Position1>
<Filename Value="framescript.pas"/>
<Caret Line="73" Column="41" TopLine="54"/>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/window.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="testunit.pas"/>
<Caret Line="1550" Column="3" TopLine="1548"/>
<Filename Value="../../Units/PascalScript/x86.inc"/>
<Caret Line="592" Column="60" TopLine="584"/>
</Position2>
<Position3>
<Filename Value="testunit.pas"/>
<Caret Line="541" Column="21" TopLine="518"/>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="36" Column="17" TopLine="27"/>
</Position3>
<Position4>
<Filename Value="testunit.pas"/>
<Caret Line="536" Column="30" TopLine="519"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="48" Column="50" TopLine="34"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="97" Column="54" TopLine="73"/>
<Caret Line="345" Column="27" TopLine="311"/>
</Position5>
<Position6>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="240" Column="69" TopLine="223"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="69" Column="36" TopLine="56"/>
</Position6>
<Position7>
<Filename Value="testunit.pas"/>
<Caret Line="550" Column="46" TopLine="532"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="201" Column="29" TopLine="195"/>
</Position7>
<Position8>
<Filename Value="testunit.pas"/>
<Caret Line="636" Column="33" TopLine="613"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="372" Column="45" TopLine="348"/>
</Position8>
<Position9>
<Filename Value="testunit.pas"/>
<Caret Line="1439" Column="24" TopLine="1422"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="202" Column="29" TopLine="177"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="46" Column="30" TopLine="32"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="346" Column="59" TopLine="328"/>
</Position10>
<Position11>
<Filename Value="testunit.pas"/>
<Caret Line="1718" Column="79" TopLine="1699"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="47" Column="34" TopLine="34"/>
</Position11>
<Position12>
<Filename Value="testunit.pas"/>
<Caret Line="1711" Column="38" TopLine="1696"/>
<Filename Value="../../Units/MMLCore/tpa.pas"/>
<Caret Line="76" Column="21" TopLine="58"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="38" Column="31" TopLine="17"/>
<Filename Value="../../Units/MMLCore/tpa.pas"/>
<Caret Line="77" Column="21" TopLine="58"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="600" Column="15" TopLine="564"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="31" Column="54" TopLine="23"/>
</Position14>
<Position15>
<Filename Value="testunit.pas"/>
<Caret Line="1718" Column="10" TopLine="1702"/>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="85" Column="37" TopLine="69"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="45" Column="1" TopLine="28"/>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="25" Column="12" TopLine="12"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="46" Column="1" TopLine="29"/>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="26" Column="12" TopLine="12"/>
</Position17>
<Position18>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="48" Column="1" TopLine="31"/>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="20" Column="13" TopLine="12"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="254" Column="1" TopLine="237"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="656" Column="23" TopLine="625"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="45" Column="1" TopLine="28"/>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="63" Column="34" TopLine="37"/>
</Position20>
<Position21>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="46" Column="1" TopLine="29"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="710" Column="61" TopLine="692"/>
</Position21>
<Position22>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="48" Column="1" TopLine="31"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="55" Column="42" TopLine="37"/>
</Position22>
<Position23>
<Filename Value="testunit.pas"/>
<Caret Line="557" Column="1" TopLine="540"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="714" Column="22" TopLine="692"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="462" Column="32" TopLine="445"/>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="55" Column="29" TopLine="37"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="45" Column="1" TopLine="28"/>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<Caret Line="79" Column="10" TopLine="61"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="461" Column="69" TopLine="455"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="729" Column="26" TopLine="702"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="464" Column="1" TopLine="447"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="712" Column="8" TopLine="703"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="134" Column="45" TopLine="116"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="721" Column="23" TopLine="703"/>
</Position28>
<Position29>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="133" Column="83" TopLine="116"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="751" Column="10" TopLine="720"/>
</Position29>
<Position30>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<Caret Line="141" Column="11" TopLine="116"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
@ -2230,6 +2223,12 @@
<OptimizationLevel Value="2"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
<GenerateDwarf Value="True"/>
</Debugging>
</Linking>
<Other>
<CustomOptions Value="-dUseCThreads
-dM_MEMORY_DEBUG
@ -2239,6 +2238,12 @@
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Source Value="../../Units/MMLCore/libloader.pas"/>
<Line Value="60"/>
</Item1>
</BreakPoints>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>

View File

@ -35,6 +35,8 @@ libloader;
//{$R project1.res}
{$R project1.res}
begin
Application.Title:='Simba';
Application.Initialize;

View File

@ -43,7 +43,7 @@ uses
ColorBox , about, framefunctionlist, ocr, updateform, simbasettings;
const
SimbaVersion = 462;
SimbaVersion = 469;
type

View File

@ -223,6 +223,8 @@ interface
procedure SendText(text: string);
function isKeyDown(key: Word): Boolean;
function GetImageTarget: TTarget;
protected
keymouse: TTarget;
image: TTarget;
@ -231,6 +233,7 @@ interface
bothsame: boolean;
procedure SetImageTarget(target: TTarget);
procedure SetKeyMouseTarget(target: TTarget);
procedure SetBothTargets(target: TTarget);
procedure NativeInit; virtual; abstract;
@ -290,6 +293,12 @@ begin
image:= target;
bothsame:= false;
end;
function TIOManager_Abstract.GetImageTarget: TTarget;
begin
result := image;
end;
procedure TIOManager_Abstract.SetKeyMouseTarget(target: TTarget);
begin
if not(bothsame) then keymouse.Free();
@ -340,17 +349,34 @@ begin
result:= frozen <> nil;
end;
function TIOManager_Abstract.GetColor(x,y : integer) : TColor; begin result:= image.GetColor(x,y); end;
function TIOManager_Abstract.ReturnData(xs,ys,width,height: integer): TRetData; begin result:= image.ReturnData(xs,ys,width,height); end;
procedure TIOManager_Abstract.FreeReturnData; begin image.freeReturnData(); end;
function TIOManager_Abstract.GetColor(x,y : integer) : TColor;
begin
result:= image.GetColor(x,y);
end;
function TIOManager_Abstract.ReturnData(xs,ys,width,height: integer): TRetData;
begin
result:= image.ReturnData(xs,ys,width,height);
end;
procedure TIOManager_Abstract.FreeReturnData;
begin
image.freeReturnData();
end;
function TIOManager_Abstract.SetTarget(ArrPtr: PRGB32; Size: TPoint): integer;
begin
SetImageTarget(TRawTarget.Create(ArrPtr,Size.X,Size.Y));
end;
function TIOManager_Abstract.SetTarget(bmp : TMufasaBitmap) : integer;
begin
SetImageTarget(TRawTarget.Create(bmp.FData,bmp.width,bmp.height));
end;
function TIOManager_Abstract.SetTarget(ArrPtr: PRGB32; Size: TPoint): integer; begin SetImageTarget(TRawTarget.Create(ArrPtr,Size.X,Size.Y)); end;
function TIOManager_Abstract.SetTarget(bmp : TMufasaBitmap) : integer; begin SetImageTarget(TRawTarget.Create(bmp.FData,bmp.width,bmp.height)); end;
function TIOManager_Abstract.SetTarget(name: string; initargs: pointer): integer;
var
client: TEIOS_Client;
begin
if not eios_controller.ClientExists(name) then raise Exception.Create('EIOS Client by specified name does not exist');
if not eios_controller.ClientExists(name) then
raise Exception.Create('EIOS Client by specified name does not exist');
client:= eios_controller.GetClient(name);
SetBothTargets(TEIOS_Target.Create(client, initargs));
end;
@ -369,10 +395,23 @@ begin
{not sure if image needs activation or not, if its a native window keymouse == image so it should be good.}
end;
procedure TIOManager_Abstract.GetMousePos(var X, Y: Integer); begin keymouse.GetMousePosition(x,y) end;
procedure TIOManager_Abstract.SetMousePos(X, Y: Integer); begin keymouse.MoveMouse(x,y); end;
procedure TIOManager_Abstract.HoldMouse(x,y : integer; button: TClickType); begin keymouse.ReleaseMouse(x,y,button); end;
procedure TIOManager_Abstract.ReleaseMouse(x,y : integer; button: TClickType); begin keymouse.ReleaseMouse(x,y,button); end;
procedure TIOManager_Abstract.GetMousePos(var X, Y: Integer);
begin
keymouse.GetMousePosition(x,y)
end;
procedure TIOManager_Abstract.SetMousePos(X, Y: Integer);
begin
keymouse.MoveMouse(x,y);
end;
procedure TIOManager_Abstract.HoldMouse(x,y : integer; button: TClickType);
begin
keymouse.HoldMouse(x,y,button);
end;
procedure TIOManager_Abstract.ReleaseMouse(x,y : integer; button: TClickType);
begin
keymouse.ReleaseMouse(x,y,button);
end;
procedure TIOManager_Abstract.ClickMouse(X, Y: Integer; button: TClickType);
begin
HoldMouse(x,y,button);
@ -380,11 +419,28 @@ begin
ReleaseMouse(x,y,button);
end;
procedure TIOManager_Abstract.KeyUp(key: Word); begin keymouse.ReleaseKey(key) end;
procedure TIOManager_Abstract.KeyDown(key: Word); begin keymouse.HoldKey(key) end;
procedure TIOManager_Abstract.PressKey(key: Word); begin keyup(key); keydown(key); end;
procedure TIOManager_Abstract.SendText(text: string); begin keymouse.SendString(text); end;
function TIOManager_Abstract.isKeyDown(key: Word): Boolean; begin result:= keymouse.IsKeyHeld(key); end;
procedure TIOManager_Abstract.KeyUp(key: Word);
begin
keymouse.ReleaseKey(key)
end;
procedure TIOManager_Abstract.KeyDown(key: Word);
begin
keymouse.HoldKey(key)
end;
procedure TIOManager_Abstract.PressKey(key: Word);
begin
keyup(key);
keydown(key);
end;
procedure TIOManager_Abstract.SendText(text: string);
begin
keymouse.SendString(text);
end;
function TIOManager_Abstract.isKeyDown(key: Word): Boolean;
begin
result:= keymouse.IsKeyHeld(key);
end;
//***implementation*** TTarget

View File

@ -54,7 +54,7 @@ uses
procedure FilterShadowBitmap(bmp: TMufasaBitmap);
procedure FilterCharsBitmap(bmp: TMufasaBitmap);
function GetTextAt(atX, atY, font, minspacing, maxspacing, color, len: integer): string;
function GetTextAt(atX, atY, minspacing, maxspacing, color, tol, len: integer; font: string): string;
function TextToFontTPA(Text, font: String; var w, h: integer): TPointArray;
function TextToFontBitmap(Text, font: String): TMufasaBitmap;
function TextToMask(Text, font: String): TMask;
@ -704,9 +704,17 @@ begin
result := GetUpTextAtEx(atX, atY, false);
end;
function TMOCR.GetTextAt(atX, atY, font, minspacing, maxspacing, color, len: integer): string;
function TMOCR.GetTextAt(atX, atY, minspacing, maxspacing, color, tol, len: integer; font: string): string;
var
fD: TocrData;
TPA: TPointArray;
begin
fD := Fonts.GetFont(font);
SetLength(TPA, 0);
TClient(Client).MFinder.FindColorsTolerance(TPA, color, atX, atY, {fuck}0, {fuck}0, tol);
end;

View File

@ -57,6 +57,8 @@ interface
procedure HoldKey(key: integer); override;
procedure ReleaseKey(key: integer); override;
function IsKeyHeld(key: integer): boolean; override;
function GetNativeWindow: x.TWindow;
private
display: PDisplay;
screennum: integer;
@ -132,6 +134,11 @@ implementation
inherited Destroy;
end;
function TWindow.GetNativeWindow: x.TWindow;
begin
result := self.window;
end;
procedure TWindow.GetTargetDimensions(var w, h: integer);
var
Old_Handler: TXErrorHandler;

View File

@ -58,6 +58,8 @@ interface
procedure HoldKey(key: integer); override;
procedure ReleaseKey(key: integer); override;
function IsKeyHeld(key: integer): boolean; override;
function GetNativeWindow: Hwnd;
private
handle: Hwnd;
dc: HDC;
@ -160,6 +162,11 @@ implementation
inherited Destroy;
end;
function TWindow.GetNativeWindow: Hwnd;
begin
result := handle;
end;
function TWindow.TargetValid: boolean;
begin
result:= IsWindow(handle);