1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-17 06:45:11 -05:00

Some more changes.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@214 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-11-08 16:55:00 +00:00
parent 13fe985504
commit 571ea97bd7
4 changed files with 135 additions and 74 deletions

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/> <Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="1"/> <ActiveEditorIndexAtStart Value="2"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <ProjectVersion Value=""/>
@ -220,8 +220,8 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="Client"/> <UnitName Value="Client"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="31"/> <TopLine Value="1"/>
<EditorIndex Value="2"/> <EditorIndex Value="4"/>
<UsageCount Value="201"/> <UsageCount Value="201"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit25> </Unit25>
@ -273,8 +273,8 @@
<Unit32> <Unit32>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<UnitName Value="Input"/> <UnitName Value="Input"/>
<CursorPos X="21" Y="72"/> <CursorPos X="30" Y="136"/>
<TopLine Value="301"/> <TopLine Value="119"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="79"/> <UsageCount Value="79"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -305,9 +305,9 @@
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/> <Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="mmlpsthread"/> <UnitName Value="mmlpsthread"/>
<CursorPos X="33" Y="160"/> <CursorPos X="44" Y="167"/>
<TopLine Value="152"/> <TopLine Value="42"/>
<EditorIndex Value="3"/> <EditorIndex Value="5"/>
<UsageCount Value="202"/> <UsageCount Value="202"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit36> </Unit36>
@ -1178,7 +1178,7 @@
<UnitName Value="framescript"/> <UnitName Value="framescript"/>
<CursorPos X="13" Y="98"/> <CursorPos X="13" Y="98"/>
<TopLine Value="87"/> <TopLine Value="87"/>
<EditorIndex Value="6"/> <EditorIndex Value="8"/>
<UsageCount Value="106"/> <UsageCount Value="106"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit161> </Unit161>
@ -1595,154 +1595,158 @@
<UnitName Value="MouseAndKeyInput"/> <UnitName Value="MouseAndKeyInput"/>
<CursorPos X="18" Y="41"/> <CursorPos X="18" Y="41"/>
<TopLine Value="26"/> <TopLine Value="26"/>
<EditorIndex Value="4"/> <EditorIndex Value="6"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit223> </Unit223>
<Unit224> <Unit224>
<Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/keyinputintf.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
<UnitName Value="KeyInputIntf"/> <UnitName Value="KeyInputIntf"/>
<CursorPos X="3" Y="29"/> <CursorPos X="5" Y="34"/>
<TopLine Value="16"/> <TopLine Value="24"/>
<EditorIndex Value="5"/> <EditorIndex Value="7"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit224> </Unit224>
<Unit225> <Unit225>
<Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<UnitName Value="MMLKeyInput"/> <UnitName Value="MMLKeyInput"/>
<CursorPos X="1" Y="25"/> <CursorPos X="49" Y="23"/>
<TopLine Value="1"/> <TopLine Value="11"/>
<EditorIndex Value="2"/>
<UsageCount Value="20"/> <UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit225> </Unit225>
<Unit226> <Unit226>
<Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/xkeyinput.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/xkeyinput.pas"/>
<UnitName Value="XKeyInput"/> <UnitName Value="XKeyInput"/>
<CursorPos X="1" Y="1"/> <CursorPos X="5" Y="36"/>
<TopLine Value="1"/> <TopLine Value="29"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit226> </Unit226>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="framescript.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="101" Column="1" TopLine="90"/> <Caret Line="834" Column="80" TopLine="831"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="framescript.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="97" Column="39" TopLine="92"/> <Caret Line="198" Column="1" TopLine="187"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="931" Column="1" TopLine="923"/> <Caret Line="839" Column="1" TopLine="839"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="829" Column="1" TopLine="829"/> <Caret Line="837" Column="30" TopLine="831"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="840" Column="7" TopLine="831"/> <Caret Line="203" Column="49" TopLine="188"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="833" Column="6" TopLine="831"/> <Caret Line="949" Column="10" TopLine="946"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="834" Column="6" TopLine="831"/> <Caret Line="57" Column="18" TopLine="46"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="559" Column="3" TopLine="550"/> <Caret Line="176" Column="15" TopLine="161"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="833" Column="7" TopLine="831"/> <Caret Line="51" Column="28" TopLine="38"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="646" Column="1" TopLine="635"/> <Caret Line="145" Column="15" TopLine="127"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="testunit.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/>
<Caret Line="834" Column="79" TopLine="823"/> <Caret Line="41" Column="17" TopLine="32"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="testunit.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/>
<Caret Line="198" Column="15" TopLine="187"/> <Caret Line="53" Column="8" TopLine="32"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="testunit.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/>
<Caret Line="834" Column="80" TopLine="831"/> <Caret Line="41" Column="18" TopLine="26"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="198" Column="1" TopLine="187"/> <Caret Line="39" Column="41" TopLine="24"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="839" Column="1" TopLine="839"/> <Caret Line="35" Column="45" TopLine="24"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="837" Column="30" TopLine="831"/> <Caret Line="69" Column="29" TopLine="55"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="203" Column="49" TopLine="188"/> <Caret Line="131" Column="20" TopLine="119"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="testunit.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="949" Column="10" TopLine="946"/> <Caret Line="77" Column="10" TopLine="61"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="57" Column="18" TopLine="46"/> <Caret Line="71" Column="29" TopLine="51"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/xkeyinput.pas"/>
<Caret Line="176" Column="15" TopLine="161"/> <Caret Line="36" Column="17" TopLine="28"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="51" Column="28" TopLine="38"/> <Caret Line="71" Column="35" TopLine="51"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="145" Column="15" TopLine="127"/> <Caret Line="27" Column="13" TopLine="1"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="41" Column="17" TopLine="32"/> <Caret Line="11" Column="3" TopLine="1"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/xkeyinput.pas"/>
<Caret Line="53" Column="8" TopLine="32"/> <Caret Line="33" Column="27" TopLine="19"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/mouseandkeyinput.pas"/> <Filename Value="../../../../Documents/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
<Caret Line="41" Column="18" TopLine="26"/> <Caret Line="34" Column="19" TopLine="24"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="39" Column="41" TopLine="24"/> <Caret Line="21" Column="11" TopLine="11"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="35" Column="45" TopLine="24"/> <Caret Line="23" Column="17" TopLine="7"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="69" Column="29" TopLine="55"/> <Caret Line="13" Column="30" TopLine="1"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/mmlkeyinput.pas"/>
<Caret Line="131" Column="20" TopLine="119"/> <Caret Line="28" Column="13" TopLine="1"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="../../Units/MMLCore/input.pas"/> <Filename Value="../../Units/MMLCore/input.pas"/>
<Caret Line="77" Column="10" TopLine="61"/> <Caret Line="35" Column="36" TopLine="21"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>

View File

@ -157,7 +157,6 @@ begin
SyncInfo:= TheSyncInfo; SyncInfo:= TheSyncInfo;
SetLength(PluginsToLoad,0); SetLength(PluginsToLoad,0);
Client := TClient.Create; Client := TClient.Create;
Client.MInput.SendText('hoi');
PSScript := TPSScript.Create(nil); PSScript := TPSScript.Create(nil);
PSScript.UsePreProcessor:= True; PSScript.UsePreProcessor:= True;
PSScript.OnNeedFile := @RequireFile; PSScript.OnNeedFile := @RequireFile;

View File

@ -32,7 +32,7 @@ uses
mufasatypes, // for common mufasa types mufasatypes, // for common mufasa types
windowutil, // for mufasa window utils windowutil, // for mufasa window utils
{$IFDEF LINUX} {$IFDEF LINUX}
ctypes,x, xlib,xtest, XKeyInput, lclintf;// for X* stuff ctypes,x, xlib,xtest, MMLKeyInput, lclintf;// for X* stuff
// do non silent keys/mouse with XTest / TKeyInput. // do non silent keys/mouse with XTest / TKeyInput.
{Later on we should use xdotool, as it allows silent input} {Later on we should use xdotool, as it allows silent input}
{$ENDIF} {$ENDIF}
@ -68,7 +68,7 @@ type
// Not used yet. // Not used yet.
Silent: Boolean; Silent: Boolean;
{$IFDEF LINUX} {$IFDEF LINUX}
KeyInput: TXKeyInput; KeyInput: TMMLKeyInput;
{$ENDIF} {$ENDIF}
end; end;
@ -131,7 +131,7 @@ begin
inherited Create; inherited Create;
Self.Client := Client; Self.Client := Client;
{$IFDEF LINUX} {$IFDEF LINUX}
Self.KeyInput := TXKeyInput.Create; Self.KeyInput := TMMLKeyInput.Create;
{$ENDIF} {$ENDIF}
end; end;

View File

@ -0,0 +1,58 @@
unit MMLKeyInput;
{
This file is part of the Mufasa Macro Library (MML)
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
MML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MML is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MML. If not, see <http://www.gnu.org/licenses/>.
See the file COPYING, included in this distribution,
for details about the copyright.
MMLKeyInput class for Keyboard input in MML.
}
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, XKeyInput;
type
TMMLKeyInput = class(TXKeyInput)
public
{ Override these two methods,
as the original class calls ProcessMessages;
}
procedure Down(Key: Word);
procedure Up(Key: Word);
end;
implementation
uses LCLType;
procedure TMMLKeyInput.Down(Key: Word);
begin
DoDown(Key);
end;
procedure TMMLKeyInput.Up(Key: Word);
begin
DoUp(Key);
end;
end.