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

View File

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

View File

@ -32,7 +32,7 @@ uses
mufasatypes, // for common mufasa types
windowutil, // for mufasa window utils
{$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.
{Later on we should use xdotool, as it allows silent input}
{$ENDIF}
@ -68,7 +68,7 @@ type
// Not used yet.
Silent: Boolean;
{$IFDEF LINUX}
KeyInput: TXKeyInput;
KeyInput: TMMLKeyInput;
{$ENDIF}
end;
@ -131,7 +131,7 @@ begin
inherited Create;
Self.Client := Client;
{$IFDEF LINUX}
Self.KeyInput := TXKeyInput.Create;
Self.KeyInput := TMMLKeyInput.Create;
{$ENDIF}
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.