From 325e9904daeeb3425c656d0ea9fa7b54e67c3be8 Mon Sep 17 00:00:00 2001 From: BenLand100 Date: Tue, 26 Jan 2010 04:44:41 +0000 Subject: [PATCH] Merged trunk into branch... git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@473 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- .../Projects/OCRBench/project1.lpi | 215 ++++++++------- .../Projects/OCRBench/unit1.pas | 14 +- .../Projects/SAMufasaGUI/project1.ico | Bin 0 -> 5102 bytes .../Projects/SAMufasaGUI/project1.lpi | 251 +++++++++--------- .../Projects/SAMufasaGUI/project1.lpr | 2 + .../Projects/SAMufasaGUI/project1.res | Bin 0 -> 6036 bytes .../Projects/SAMufasaGUI/testunit.pas | 2 +- .../Units/MMLCore/iomanager.pas | 88 ++++-- .../script-component/Units/MMLCore/ocr.pas | 12 +- .../Units/MMLCore/os_linux.pas | 9 +- .../Units/MMLCore/os_windows.pas | 7 + 11 files changed, 356 insertions(+), 244 deletions(-) create mode 100644 branches/script-component/Projects/SAMufasaGUI/project1.ico create mode 100644 branches/script-component/Projects/SAMufasaGUI/project1.res diff --git a/branches/script-component/Projects/OCRBench/project1.lpi b/branches/script-component/Projects/OCRBench/project1.lpi index ecec126..2d9400f 100644 --- a/branches/script-component/Projects/OCRBench/project1.lpi +++ b/branches/script-component/Projects/OCRBench/project1.lpi @@ -7,7 +7,7 @@ - + @@ -31,12 +31,12 @@ - + - + @@ -44,10 +44,10 @@ - - + + - + @@ -73,10 +73,10 @@ - - - - + + + + @@ -84,8 +84,8 @@ - - + + @@ -93,8 +93,8 @@ - - + + @@ -102,8 +102,8 @@ - - + + @@ -117,17 +117,15 @@ - - - - + + @@ -135,8 +133,8 @@ - - + + @@ -156,24 +154,26 @@ - - + + - - - + + + + + - - - - + + + + @@ -181,150 +181,175 @@ - - - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/branches/script-component/Projects/OCRBench/unit1.pas b/branches/script-component/Projects/OCRBench/unit1.pas index e0cb9ae..94e2a9d 100644 --- a/branches/script-component/Projects/OCRBench/unit1.pas +++ b/branches/script-component/Projects/OCRBench/unit1.pas @@ -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; diff --git a/branches/script-component/Projects/SAMufasaGUI/project1.ico b/branches/script-component/Projects/SAMufasaGUI/project1.ico new file mode 100644 index 0000000000000000000000000000000000000000..e350cac1260e299c73fe0c2e591e054f61a6a799 GIT binary patch literal 5102 zcmbuD32;^A8HO(|_bm6^{oZrV-I4%7!X|=%4O>_w5E4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project1.lpi index 3b30106..89413a5 100644 --- a/branches/script-component/Projects/SAMufasaGUI/project1.lpi +++ b/branches/script-component/Projects/SAMufasaGUI/project1.lpi @@ -10,12 +10,13 @@ <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"/> diff --git a/branches/script-component/Projects/SAMufasaGUI/project1.lpr b/branches/script-component/Projects/SAMufasaGUI/project1.lpr index 0db1af9..d925af1 100644 --- a/branches/script-component/Projects/SAMufasaGUI/project1.lpr +++ b/branches/script-component/Projects/SAMufasaGUI/project1.lpr @@ -35,6 +35,8 @@ libloader; //{$R project1.res} +{$R project1.res} + begin Application.Title:='Simba'; Application.Initialize; diff --git a/branches/script-component/Projects/SAMufasaGUI/project1.res b/branches/script-component/Projects/SAMufasaGUI/project1.res new file mode 100644 index 0000000000000000000000000000000000000000..da688d6fea2e1b4da3c776d967c0bfe518c48963 GIT binary patch literal 6036 zcmbuD3sltCoyR9hJO9VLpa1{7V4Prr8bB0DK@gFEA_P%EgHMKeFayI3%mWxf9%?jc z+NMb#=cFgcHf`E;yPI~i+q2tr-IMgRySC{jX`&`-)S5;`qeqi%&z|J;gx`Mee}JIJ z_Vh8HANT&B_jA9$$Gv}5DwWC$Bgz@NH~pl$X0OY*=MLqX(fH{tRW-wXG4Eg~nTjUj z)xOf=r9N*c9!LbE@$PD0ds{=%=X~B&+8+=4V~KdE+LsNbd^M|dVwFFY3iWlxvR=F( zo~rg`lJUw^AQI~Hr;7Tbfn*|;2&anziM~pIs;_vk)aUK<$D`p;D!pa?Xn2)(?p=++ zP&^$?XKw;3Udo{QlZikml}aRQlYvMy9SWo~N#HE@dE@>*bm|g){r-5i1qa2g$wV*{ zNGtu0L?&6=-|zFLv;DYjC>meB%vYj}8VscZ$!LEXGhfAS^ZNVyW6^-0o$$`P=#7Mu zq2j8Nd8cNc?+?X69LTamZ&fgqJ5JZmNTZy-&Fto*%-}ybt61^YXgru0N)=;5eTjHc zT_T=NCSobyr<#;AMgF`d{h2Pzq$!kbOZ0}|*YX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iE^6HAi=rn3L*FxqHVYd>KaFcRb`M?Dx)Yb(ceg(-Ir2ZlUQl0A zq1s%xQuWueeKbS=!7c6ind85wWr4-sduz)Ue|CPhWlm?utUV87Nprh4ALrS9HS=1= d&px82F$`;ILS>j~Yn1k7)wt50$94_Z{~wbAOWyzh literal 0 HcmV?d00001 diff --git a/branches/script-component/Projects/SAMufasaGUI/testunit.pas b/branches/script-component/Projects/SAMufasaGUI/testunit.pas index ece40ea..9883219 100644 --- a/branches/script-component/Projects/SAMufasaGUI/testunit.pas +++ b/branches/script-component/Projects/SAMufasaGUI/testunit.pas @@ -43,7 +43,7 @@ uses ColorBox , about, framefunctionlist, ocr, updateform, simbasettings; const - SimbaVersion = 462; + SimbaVersion = 469; type diff --git a/branches/script-component/Units/MMLCore/iomanager.pas b/branches/script-component/Units/MMLCore/iomanager.pas index 29405e9..4ae2e9b 100644 --- a/branches/script-component/Units/MMLCore/iomanager.pas +++ b/branches/script-component/Units/MMLCore/iomanager.pas @@ -222,7 +222,9 @@ interface procedure PressKey(key: Word); 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 diff --git a/branches/script-component/Units/MMLCore/ocr.pas b/branches/script-component/Units/MMLCore/ocr.pas index 661a5a5..b665f6c 100644 --- a/branches/script-component/Units/MMLCore/ocr.pas +++ b/branches/script-component/Units/MMLCore/ocr.pas @@ -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; diff --git a/branches/script-component/Units/MMLCore/os_linux.pas b/branches/script-component/Units/MMLCore/os_linux.pas index 19c23f0..7bb6c32 100644 --- a/branches/script-component/Units/MMLCore/os_linux.pas +++ b/branches/script-component/Units/MMLCore/os_linux.pas @@ -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; @@ -131,7 +133,12 @@ implementation keyinput.Free; inherited Destroy; end; - + + function TWindow.GetNativeWindow: x.TWindow; + begin + result := self.window; + end; + procedure TWindow.GetTargetDimensions(var w, h: integer); var Old_Handler: TXErrorHandler; diff --git a/branches/script-component/Units/MMLCore/os_windows.pas b/branches/script-component/Units/MMLCore/os_windows.pas index 79e4d17..91648c1 100644 --- a/branches/script-component/Units/MMLCore/os_windows.pas +++ b/branches/script-component/Units/MMLCore/os_windows.pas @@ -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);