You've already forked lazarus-ccr
Improves the android bindings generator
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1747 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -39,7 +39,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="13">
|
<Units Count="16">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="android_bindings_generator.pas"/>
|
<Filename Value="android_bindings_generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="15" Y="14"/>
|
<CursorPos X="15" Y="14"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="29"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -61,49 +61,41 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="33" Y="38"/>
|
<CursorPos X="33" Y="38"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="29"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidmenu.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidmenu.pas"/>
|
||||||
<UnitName Value="androidmenu"/>
|
<UnitName Value="androidmenu"/>
|
||||||
<EditorIndex Value="5"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="51"/>
|
<TopLine Value="51"/>
|
||||||
<CursorPos X="25" Y="24"/>
|
<CursorPos X="25" Y="24"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidutil.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidutil.pas"/>
|
||||||
<UnitName Value="androidutil"/>
|
<UnitName Value="androidutil"/>
|
||||||
<EditorIndex Value="4"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidview.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidview.pas"/>
|
||||||
<UnitName Value="androidview"/>
|
<UnitName Value="androidview"/>
|
||||||
<EditorIndex Value="7"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="187"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="1" Y="219"/>
|
<CursorPos X="82" Y="10"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androiddialog.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androiddialog.pas"/>
|
||||||
<UnitName Value="androiddialog"/>
|
<UnitName Value="androiddialog"/>
|
||||||
<EditorIndex Value="9"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidinputevent.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidinputevent.pas"/>
|
||||||
@ -111,15 +103,15 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="9"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/android/src/com/pascal/turbochessclock/AndroidMenu.java"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/android/src/com/pascal/turbochessclock/AndroidMenu.java"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="5"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="81"/>
|
<TopLine Value="27"/>
|
||||||
<CursorPos X="56" Y="104"/>
|
<CursorPos X="1" Y="29"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Java"/>
|
<DefaultSyntaxHighlighter Value="Java"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
@ -127,23 +119,20 @@
|
|||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="android_sdk_bindings_gen"/>
|
<UnitName Value="android_sdk_bindings_gen"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="307"/>
|
<TopLine Value="79"/>
|
||||||
<CursorPos X="72" Y="331"/>
|
<CursorPos X="47" Y="110"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="29"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidapp.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidapp.pas"/>
|
||||||
<UnitName Value="androidapp"/>
|
<UnitName Value="androidapp"/>
|
||||||
<EditorIndex Value="8"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="16" Y="22"/>
|
<CursorPos X="1" Y="60"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/androidpipescomm.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/androidpipescomm.pas"/>
|
||||||
@ -151,147 +140,174 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="9"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
<Filename Value="../../../fpcbuild/fpcsrc/rtl/objpas/sysutils/sysstrh.inc"/>
|
<Filename Value="../../../fpcbuild/fpcsrc/rtl/objpas/sysutils/sysstrh.inc"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="92"/>
|
<TopLine Value="92"/>
|
||||||
<CursorPos X="18" Y="116"/>
|
<CursorPos X="18" Y="116"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="9"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit11>
|
</Unit11>
|
||||||
<Unit12>
|
<Unit12>
|
||||||
<Filename Value="../../../p-tools/turbochessclock4android/android/src/com/pascal/turbochessclock/AndroidView.java"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/android/src/com/pascal/turbochessclock/AndroidView.java"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="4"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="183"/>
|
<TopLine Value="177"/>
|
||||||
<CursorPos X="39" Y="177"/>
|
<CursorPos X="39" Y="177"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="15"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Java"/>
|
<DefaultSyntaxHighlighter Value="Java"/>
|
||||||
</Unit12>
|
</Unit12>
|
||||||
|
<Unit13>
|
||||||
|
<Filename Value="../../../p-tools/systeminfo4android/androidpipescomm.pas"/>
|
||||||
|
<UnitName Value="androidpipescomm"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="114"/>
|
||||||
|
<CursorPos X="115" Y="3"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit13>
|
||||||
|
<Unit14>
|
||||||
|
<Filename Value="sdk_level_7/android_all.pas"/>
|
||||||
|
<UnitName Value="android_all"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="5"/>
|
||||||
|
<CursorPos X="92" Y="5"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit14>
|
||||||
|
<Unit15>
|
||||||
|
<Filename Value="../../../p-tools/systeminfo4android/javalang.pas"/>
|
||||||
|
<UnitName Value="javalang"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit15>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="18" Column="26" TopLine="1"/>
|
<Caret Line="309" Column="32" TopLine="305"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="124" Column="120" TopLine="101"/>
|
<Caret Line="26" Column="35" TopLine="1"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="66" Column="44" TopLine="40"/>
|
<Caret Line="305" Column="54" TopLine="305"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="21" Column="27" TopLine="1"/>
|
<Caret Line="24" Column="59" TopLine="1"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="88" Column="3" TopLine="80"/>
|
<Caret Line="22" Column="27" TopLine="1"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="128" Column="3" TopLine="66"/>
|
<Caret Line="23" Column="17" TopLine="1"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="19" Column="61" TopLine="1"/>
|
<Caret Line="32" Column="22" TopLine="1"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="21" Column="37" TopLine="2"/>
|
<Caret Line="38" Column="33" TopLine="1"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="39" Column="18" TopLine="38"/>
|
<Caret Line="209" Column="25" TopLine="194"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="301" Column="70" TopLine="267"/>
|
<Caret Line="27" Column="26" TopLine="2"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="22" Column="35" TopLine="1"/>
|
<Caret Line="25" Column="29" TopLine="1"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="237" Column="100" TopLine="196"/>
|
<Caret Line="326" Column="6" TopLine="301"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="189" Column="3" TopLine="148"/>
|
<Caret Line="22" Column="81" TopLine="12"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="247" Column="65" TopLine="219"/>
|
<Caret Line="90" Column="37" TopLine="64"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="246" Column="49" TopLine="223"/>
|
<Caret Line="28" Column="17" TopLine="1"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="154" Column="16" TopLine="145"/>
|
<Caret Line="22" Column="19" TopLine="3"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="211" Column="20" TopLine="188"/>
|
<Caret Line="27" Column="19" TopLine="1"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="26" Column="63" TopLine="1"/>
|
<Caret Line="354" Column="1" TopLine="352"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="309" Column="32" TopLine="305"/>
|
<Caret Line="102" Column="5" TopLine="72"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="26" Column="35" TopLine="1"/>
|
<Caret Line="98" Column="1" TopLine="72"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="305" Column="54" TopLine="305"/>
|
<Caret Line="27" Column="15" TopLine="1"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="../../../p-tools/turbochessclock4android/android/src/com/pascal/turbochessclock/AndroidMenu.java"/>
|
||||||
<Caret Line="24" Column="59" TopLine="1"/>
|
<Caret Line="90" Column="15" TopLine="53"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="22" Column="27" TopLine="1"/>
|
<Caret Line="438" Column="51" TopLine="433"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="23" Column="17" TopLine="1"/>
|
<Caret Line="403" Column="65" TopLine="379"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="32" Column="22" TopLine="1"/>
|
<Caret Line="391" Column="22" TopLine="379"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="sdk_level_7/android_all.pas"/>
|
||||||
<Caret Line="38" Column="33" TopLine="1"/>
|
<Caret Line="363" Column="24" TopLine="333"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="209" Column="25" TopLine="194"/>
|
<Caret Line="122" Column="21" TopLine="97"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="27" Column="26" TopLine="2"/>
|
<Caret Line="138" Column="4" TopLine="98"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="25" Column="29" TopLine="1"/>
|
<Caret Line="432" Column="91" TopLine="386"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="326" Column="6" TopLine="301"/>
|
<Caret Line="416" Column="64" TopLine="392"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -13,7 +13,9 @@ type
|
|||||||
|
|
||||||
TAndroidSDKBindingsGen = class
|
TAndroidSDKBindingsGen = class
|
||||||
private
|
private
|
||||||
FSourceFile, FPasOutputClasses, FPasOutputConsts, FPasOutputIDs, FPasOutputImpl: TStringList;
|
FSourceFile: TStringList;
|
||||||
|
FPasOutputTypes, FPasOutputClassesForward, FPasOutputClasses,
|
||||||
|
FPasOutputConsts, FPasOutputIDs, FPasOutputImpl, FPasOutputMessages: TStringList;
|
||||||
FJavaOutputIDs, FJavaOutputMethods: TStringList;
|
FJavaOutputIDs, FJavaOutputMethods: TStringList;
|
||||||
FClassName, FClassNamePas: string; // Class name of the class currently being parsed
|
FClassName, FClassNamePas: string; // Class name of the class currently being parsed
|
||||||
FClassNum, FMethodNum: Integer;
|
FClassNum, FMethodNum: Integer;
|
||||||
@ -23,6 +25,7 @@ type
|
|||||||
procedure ProcessModelMethod(ASourceLine: string);
|
procedure ProcessModelMethod(ASourceLine: string);
|
||||||
procedure ProcessModelConstructor(ASourceLine: string);
|
procedure ProcessModelConstructor(ASourceLine: string);
|
||||||
procedure ProcessModelConst(ASourceLine: string);
|
procedure ProcessModelConst(ASourceLine: string);
|
||||||
|
procedure ProcessModelCallbackSetterCaller(ASourceLine: string);
|
||||||
function GetNextWord(ALine: string; var AStartPos: Integer): string;
|
function GetNextWord(ALine: string; var AStartPos: Integer): string;
|
||||||
function GetPascalTypeName(ABaseName: string): string;
|
function GetPascalTypeName(ABaseName: string): string;
|
||||||
function PassByReference(ABaseName: string): Boolean;
|
function PassByReference(ABaseName: string): Boolean;
|
||||||
@ -68,19 +71,52 @@ begin
|
|||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.Add('interface');
|
lPasOutputFile.Add('interface');
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add('uses javalang, androidpipescomm;');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.Add('type');
|
lPasOutputFile.Add('type');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add(' { Forward declaration of classes }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.AddStrings(FPasOutputClassesForward);
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add(' { Types }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.AddStrings(FPasOutputTypes);
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add(' { Classes }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.AddStrings(FPasOutputClasses);
|
lPasOutputFile.AddStrings(FPasOutputClasses);
|
||||||
lPasOutputFile.Add(' end;');
|
lPasOutputFile.Add(' end;');
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add('function HandleMessage(AFirstInt: Integer): Boolean;');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.Add('implementation');
|
lPasOutputFile.Add('implementation');
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.Add('const');
|
lPasOutputFile.Add('const');
|
||||||
|
lPasOutputFile.Add(' { Constants }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.AddStrings(FPasOutputConsts);
|
lPasOutputFile.AddStrings(FPasOutputConsts);
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add(' { IDs }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.AddStrings(FPasOutputIDs);
|
lPasOutputFile.AddStrings(FPasOutputIDs);
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add('{ Implementation of Classes }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.AddStrings(FPasOutputImpl);
|
lPasOutputFile.AddStrings(FPasOutputImpl);
|
||||||
lPasOutputFile.Add('');
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add('{ Message Handling }');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
|
lPasOutputFile.Add('function HandleMessage(AFirstInt: Integer): Boolean;');
|
||||||
|
lPasOutputFile.Add('var');
|
||||||
|
lPasOutputFile.Add(' lInt: Integer;');
|
||||||
|
lPasOutputFile.Add(' lPascalPointer: PtrInt = -1;');
|
||||||
|
lPasOutputFile.Add('begin');
|
||||||
|
lPasOutputFile.Add(' case AFirstInt of');
|
||||||
|
lPasOutputFile.AddStrings(FPasOutputMessages);
|
||||||
|
lPasOutputFile.Add(' end;');
|
||||||
|
lPasOutputFile.Add('end;');
|
||||||
|
lPasOutputFile.Add('');
|
||||||
lPasOutputFile.Add('end.');
|
lPasOutputFile.Add('end.');
|
||||||
|
|
||||||
lPasOutputFile.SaveToFile(APasOutputFile);
|
lPasOutputFile.SaveToFile(APasOutputFile);
|
||||||
@ -137,6 +173,13 @@ begin
|
|||||||
ProcessModelConst(ASourceLine);
|
ProcessModelConst(ASourceLine);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Callbacks
|
||||||
|
if lCurWord = 'callbacksettercaller' then
|
||||||
|
begin
|
||||||
|
ProcessModelCallbackSetterCaller(ASourceLine);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAndroidSDKBindingsGen.ProcessModelClass(ASourceLine: string);
|
procedure TAndroidSDKBindingsGen.ProcessModelClass(ASourceLine: string);
|
||||||
@ -167,6 +210,7 @@ begin
|
|||||||
FPasOutputIDs.Add(' // ' + FClassNamePas);
|
FPasOutputIDs.Add(' // ' + FClassNamePas);
|
||||||
FJavaOutputIDs.Add(' // ' + FClassName);
|
FJavaOutputIDs.Add(' // ' + FClassName);
|
||||||
FPasOutputConsts.Add(' { ' + FClassNamePas + ' }');
|
FPasOutputConsts.Add(' { ' + FClassNamePas + ' }');
|
||||||
|
FPasOutputClassesForward.Add(' ' + FClassNamePas + ' = class;')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAndroidSDKBindingsGen.ProcessModelMethod(
|
procedure TAndroidSDKBindingsGen.ProcessModelMethod(
|
||||||
@ -175,7 +219,7 @@ var
|
|||||||
lReaderPos: Integer = 1;
|
lReaderPos: Integer = 1;
|
||||||
lParamNum: Integer = 1;
|
lParamNum: Integer = 1;
|
||||||
lCurWord, lParentClassName: string;
|
lCurWord, lParentClassName: string;
|
||||||
lMethodReturn, lMethodReturnPas, lMethodName, lParamType, lParamTypePas, lParamName: string;
|
lMethodReturn, lMethodReturnPas, lMethodName, lParamType, lParamTypePas, lParamName, lParamPrefix: string;
|
||||||
DeclarationBase, TmpStr, lIDString: string;
|
DeclarationBase, TmpStr, lIDString: string;
|
||||||
FPasOutputImplCurLine: Integer;
|
FPasOutputImplCurLine: Integer;
|
||||||
lJavaParamVar, lJavaParams, lJavaParamSelf: string;
|
lJavaParamVar, lJavaParams, lJavaParamSelf: string;
|
||||||
@ -223,14 +267,13 @@ begin
|
|||||||
if (lParamType = 'virtual') or (lParamType = 'override') then Continue;
|
if (lParamType = 'virtual') or (lParamType = 'override') then Continue;
|
||||||
|
|
||||||
lParamTypePas := GetPascalTypeName(lParamType);
|
lParamTypePas := GetPascalTypeName(lParamType);
|
||||||
if PassByReference(lParamType) then
|
lParamName := GetNextWord(ASourceLine, lReaderPos);
|
||||||
lParamName := 'var ' + GetNextWord(ASourceLine, lReaderPos)
|
if PassByReference(lParamType) then lParamPrefix := 'var '
|
||||||
else
|
else lParamPrefix := '';
|
||||||
lParamName := GetNextWord(ASourceLine, lReaderPos);
|
|
||||||
|
|
||||||
if lParamName = '' then Break;
|
if lParamName = '' then Break;
|
||||||
|
|
||||||
TmpStr := TmpStr + lParamName + ': ' + lParamTypePas + '; ';
|
TmpStr := TmpStr + lParamPrefix + lParamName + ': ' + lParamTypePas + '; ';
|
||||||
|
|
||||||
// Pascal parameter sending
|
// Pascal parameter sending
|
||||||
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(Integer(' + lParamName + '));');
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(Integer(' + lParamName + '));');
|
||||||
@ -257,7 +300,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
||||||
FPasOutputImpl.Add(' Result := Boolean(vAndroidPipesComm.WaitForIntReturn());');
|
FPasOutputImpl.Add(' Result := ' + lMethodReturnPas + '(vAndroidPipesComm.WaitForIntReturn());');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FPasOutputClasses.Add(' ' + DeclarationBase + TmpStr);
|
FPasOutputClasses.Add(' ' + DeclarationBase + TmpStr);
|
||||||
@ -336,12 +379,78 @@ begin
|
|||||||
FPasOutputConsts.Add(Format(' %s = %s;', [lConstName, lConstValue]));
|
FPasOutputConsts.Add(Format(' %s = %s;', [lConstName, lConstValue]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// callbacksettercaller setOnClickListener callOnClickListener OnClickCallback = procedure (v: TView) of object;
|
||||||
|
procedure TAndroidSDKBindingsGen.ProcessModelCallbackSetterCaller(ASourceLine: string);
|
||||||
|
var
|
||||||
|
lReaderPos: Integer = 1;
|
||||||
|
lCurWord: string;
|
||||||
|
lSetterName, lCallerName, lCallbackName, lCallbackDeclaration: string;
|
||||||
|
lIDSetter, lIDStart, lIDFinished: String;
|
||||||
|
begin
|
||||||
|
if ASourceLine = '' then Exit;
|
||||||
|
|
||||||
|
lSetterName := GetNextWord(ASourceLine, lReaderPos);
|
||||||
|
lSetterName := GetNextWord(ASourceLine, lReaderPos);
|
||||||
|
lCallerName := GetNextWord(ASourceLine, lReaderPos);
|
||||||
|
lCallbackDeclaration := Copy(ASourceLine, lReaderPos, Length(ASourceLine));
|
||||||
|
lCallbackDeclaration := Trim(lCallbackDeclaration);
|
||||||
|
lCallbackName := GetNextWord(ASourceLine, lReaderPos);
|
||||||
|
|
||||||
|
lIDSetter := GetIDString(lSetterName);
|
||||||
|
AddOutputIDs(lIDSetter);
|
||||||
|
lIDStart := GetIDString(lCallbackName + '_Start');
|
||||||
|
AddOutputIDs(lIDStart);
|
||||||
|
lIDFinished := GetIDString(lCallbackName + '_Finished');
|
||||||
|
AddOutputIDs(lIDFinished);
|
||||||
|
|
||||||
|
FPasOutputTypes.Add(' T' + lCallbackDeclaration);
|
||||||
|
|
||||||
|
FPasOutputClasses.Add(' public');
|
||||||
|
FPasOutputClasses.Add(' ' + lCallbackName + ': T' + lCallbackName + ';');
|
||||||
|
FPasOutputClasses.Add(' procedure ' + lSetterName + '(ACallback: T' + lCallbackName + ');');
|
||||||
|
FPasOutputClasses.Add(' procedure ' + lCallerName + '();');
|
||||||
|
FPasOutputClasses.Add(' public');
|
||||||
|
|
||||||
|
FPasOutputImpl.Add('procedure ' + FClassNamePas + '.' + lSetterName + '(ACallback: T' + lCallbackName + ');');
|
||||||
|
FPasOutputImpl.Add('begin');
|
||||||
|
FPasOutputImpl.Add(' OnClickListener := ACallback;');
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendByte(ShortInt(amkUICommand));');
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(' + lIDSetter + ');');
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(Index); // Self, Java Index');
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(PtrInt(Self)); // Self, Pascal pointer');
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.WaitForReturn();');
|
||||||
|
FPasOutputImpl.Add('end;');
|
||||||
|
FPasOutputImpl.Add('');
|
||||||
|
FPasOutputImpl.Add('procedure ' + FClassNamePas + '.' + lCallerName + '();');
|
||||||
|
FPasOutputImpl.Add('begin');
|
||||||
|
FPasOutputImpl.Add(' if Assigned(OnClickListener) then OnClickListener(Self);');
|
||||||
|
FPasOutputImpl.Add('end;');
|
||||||
|
|
||||||
|
// Method type and name
|
||||||
|
FPasOutputMessages.Add(' ' + lIDStart + ':');
|
||||||
|
FPasOutputMessages.Add(' begin');
|
||||||
|
FPasOutputMessages.Add(' lPascalPointer := vAndroidPipesComm.ReadInt();');
|
||||||
|
FPasOutputMessages.Add(' TTextView(lPascalPointer).callOnClickListener();');
|
||||||
|
FPasOutputMessages.Add(' vAndroidPipesComm.SendMessage(amkUICommand, ' + lIDFinished + ');');
|
||||||
|
FPasOutputMessages.Add(' end;');
|
||||||
|
{ amkUI_MenuItem_setOnMenuItemClickListener_Start:
|
||||||
|
begin
|
||||||
|
lInt := ReadInt();
|
||||||
|
lMenuItem := TMenuItem(FindItemIdInList(MenuItems, lInt));
|
||||||
|
if lMenuItem <> nil then
|
||||||
|
lInt := lMenuItem.callOnMenuItemClickListener();
|
||||||
|
vAndroidPipesComm.SendMessage(amkUICommand, amkUI_MenuItem_setOnMenuItemClickListener_Finished);
|
||||||
|
vAndroidPipesComm.SendInt(lInt);
|
||||||
|
end;
|
||||||
|
end;}
|
||||||
|
end;
|
||||||
|
|
||||||
{ Reads one word in a string, starting at AStartPos (1-based index)
|
{ Reads one word in a string, starting at AStartPos (1-based index)
|
||||||
and going up to a space or comma or ( or ) or another separator }
|
and going up to a space or comma or ( or ) or another separator }
|
||||||
function TAndroidSDKBindingsGen.GetNextWord(ALine: string;
|
function TAndroidSDKBindingsGen.GetNextWord(ALine: string;
|
||||||
var AStartPos: Integer): string;
|
var AStartPos: Integer): string;
|
||||||
const
|
const
|
||||||
WordSeparators = [' ','(',')','[',']',',',';',#9{TAB}];
|
WordSeparators = [' ','(',')','[',']',',',';',':',#9{TAB}];
|
||||||
var
|
var
|
||||||
lState: Integer = 0;
|
lState: Integer = 0;
|
||||||
begin
|
begin
|
||||||
@ -423,11 +532,15 @@ end;
|
|||||||
constructor TAndroidSDKBindingsGen.Create;
|
constructor TAndroidSDKBindingsGen.Create;
|
||||||
begin
|
begin
|
||||||
FSourceFile := TStringList.Create;
|
FSourceFile := TStringList.Create;
|
||||||
|
|
||||||
|
FPasOutputTypes := TStringList.Create;
|
||||||
|
FPasOutputClassesForward := TStringList.Create;
|
||||||
FPasOutputClasses := TStringList.Create;
|
FPasOutputClasses := TStringList.Create;
|
||||||
FPasOutputImpl := TStringList.Create;
|
FPasOutputImpl := TStringList.Create;
|
||||||
FPasOutputIDs := TStringList.Create;
|
FPasOutputIDs := TStringList.Create;
|
||||||
|
|
||||||
FPasOutputConsts := TStringList.Create;
|
FPasOutputConsts := TStringList.Create;
|
||||||
|
FPasOutputMessages := TStringList.Create;
|
||||||
|
|
||||||
FJavaOutputIDs := TStringList.Create;
|
FJavaOutputIDs := TStringList.Create;
|
||||||
FJavaOutputMethods := TStringList.Create;
|
FJavaOutputMethods := TStringList.Create;
|
||||||
|
|
||||||
@ -437,11 +550,15 @@ end;
|
|||||||
destructor TAndroidSDKBindingsGen.Destroy;
|
destructor TAndroidSDKBindingsGen.Destroy;
|
||||||
begin
|
begin
|
||||||
FSourceFile.Free;
|
FSourceFile.Free;
|
||||||
|
|
||||||
|
FPasOutputTypes.Free;
|
||||||
|
FPasOutputClassesForward.Free;
|
||||||
FPasOutputClasses.Free;
|
FPasOutputClasses.Free;
|
||||||
FPasOutputImpl.Free;
|
FPasOutputImpl.Free;
|
||||||
FPasOutputIDs.Free;
|
FPasOutputIDs.Free;
|
||||||
|
|
||||||
FPasOutputConsts.Free;
|
FPasOutputConsts.Free;
|
||||||
|
FPasOutputMessages.Free;
|
||||||
|
|
||||||
FJavaOutputIDs.Free;
|
FJavaOutputIDs.Free;
|
||||||
FJavaOutputMethods.Free;
|
FJavaOutputMethods.Free;
|
||||||
|
|
||||||
|
@ -45,26 +45,22 @@ const GONE = 8;
|
|||||||
procedure addView(View child, LayoutParams params);
|
procedure addView(View child, LayoutParams params);
|
||||||
procedure addView(View child);
|
procedure addView(View child);
|
||||||
|
|
||||||
[LinearLayout] TViewGroup
|
[LinearLayout] ViewGroup
|
||||||
constructor Create();
|
constructor Create();
|
||||||
procedure setOrientation(int orientation);
|
procedure setOrientation(int orientation);
|
||||||
const HORIZONTAL = 0;
|
const HORIZONTAL = 0;
|
||||||
const VERTICAL = 1;
|
const VERTICAL = 1;
|
||||||
|
|
||||||
[AbsoluteLayout] TViewGroup
|
[AbsoluteLayout] ViewGroup
|
||||||
constructor Create();
|
constructor Create();
|
||||||
|
|
||||||
[AbsoluteLayout_LayoutParams] LayoutParams
|
[AbsoluteLayout_LayoutParams] LayoutParams
|
||||||
constructor Create(int param_width, int param_height, int param_x, int param_y);
|
constructor Create(int param_width, int param_height, int param_x, int param_y);
|
||||||
# TOnClickCallback = procedure (v: TView) of object;
|
|
||||||
|
|
||||||
[TextView] View
|
[TextView] View
|
||||||
# protected
|
|
||||||
# OnClickListener: TOnClickCallback;
|
|
||||||
constructor Create(); virtual;
|
constructor Create(); virtual;
|
||||||
method void setText(CharSequence AText); virtual;
|
method void setText(CharSequence AText); virtual;
|
||||||
# procedure setOnClickListener(ACallback: TOnClickCallback);
|
callbacksettercaller setOnClickListener callOnClickListener OnClickListener = procedure (v: TView) of object;
|
||||||
# procedure callOnClickListener();
|
|
||||||
method void setTextSize(int unit_; float size);
|
method void setTextSize(int unit_; float size);
|
||||||
|
|
||||||
[EditText] TextView
|
[EditText] TextView
|
||||||
@ -81,9 +77,9 @@ method void setText(CharSequence AText); override;
|
|||||||
constructor Create();
|
constructor Create();
|
||||||
method int getCurrentHour();
|
method int getCurrentHour();
|
||||||
method void setCurrentHour(int currentHour);
|
method void setCurrentHour(int currentHour);
|
||||||
method int getCurrentMinute: Integer;
|
method int getCurrentMinute;
|
||||||
method void setCurrentMinute(int currentMinute);
|
method void setCurrentMinute(int currentMinute);
|
||||||
method boolean is24HourView: Boolean;
|
method boolean is24HourView;
|
||||||
method void setIs24HourView(boolean AIs24HourView);
|
method void setIs24HourView(boolean AIs24HourView);
|
||||||
|
|
||||||
[ScrollView] FrameLayout
|
[ScrollView] FrameLayout
|
||||||
|
Reference in New Issue
Block a user