You've already forked lazarus-ccr
androidlcl: Advances to implementing reading text values
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1819 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -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="40"/>
|
<UsageCount Value="42"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -59,9 +59,9 @@
|
|||||||
<UnitName Value="mainform"/>
|
<UnitName Value="mainform"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="6"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="80" Y="15"/>
|
<CursorPos X="3" Y="39"/>
|
||||||
<UsageCount Value="40"/>
|
<UsageCount Value="42"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -117,12 +117,11 @@
|
|||||||
<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="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="8"/>
|
<TopLine Value="476"/>
|
||||||
<CursorPos X="20" Y="45"/>
|
<CursorPos X="1" Y="497"/>
|
||||||
<UsageCount Value="40"/>
|
<UsageCount Value="42"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
@ -201,9 +200,9 @@
|
|||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="129"/>
|
<TopLine Value="59"/>
|
||||||
<CursorPos X="41" Y="147"/>
|
<CursorPos X="1" Y="81"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="None"/>
|
<DefaultSyntaxHighlighter Value="None"/>
|
||||||
</Unit18>
|
</Unit18>
|
||||||
@ -230,7 +229,7 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="26" Y="9"/>
|
<CursorPos X="26" Y="9"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
@ -244,11 +243,12 @@
|
|||||||
<Unit23>
|
<Unit23>
|
||||||
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
||||||
<UnitName Value="android_all"/>
|
<UnitName Value="android_all"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="128"/>
|
<TopLine Value="132"/>
|
||||||
<CursorPos X="20" Y="132"/>
|
<CursorPos X="23" Y="147"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit23>
|
</Unit23>
|
||||||
<Unit24>
|
<Unit24>
|
||||||
@ -256,9 +256,9 @@
|
|||||||
<UnitName Value="androidpipescomm"/>
|
<UnitName Value="androidpipescomm"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="222"/>
|
<TopLine Value="38"/>
|
||||||
<CursorPos X="10" Y="139"/>
|
<CursorPos X="15" Y="62"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit24>
|
</Unit24>
|
||||||
<Unit25>
|
<Unit25>
|
||||||
@ -270,123 +270,127 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="29" HistoryIndex="28">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="76" Column="28" TopLine="41"/>
|
<Caret Line="582" Column="99" TopLine="507"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="582" Column="99" TopLine="507"/>
|
<Caret Line="524" Column="1" TopLine="507"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="524" Column="1" TopLine="507"/>
|
<Caret Line="525" Column="1" TopLine="507"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="525" Column="1" TopLine="507"/>
|
<Caret Line="528" Column="1" TopLine="507"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="528" Column="1" TopLine="507"/>
|
<Caret Line="529" Column="1" TopLine="507"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="529" Column="1" TopLine="507"/>
|
<Caret Line="532" Column="1" TopLine="507"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="532" Column="1" TopLine="507"/>
|
<Caret Line="535" Column="1" TopLine="507"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="535" Column="1" TopLine="507"/>
|
<Caret Line="539" Column="1" TopLine="507"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="539" Column="1" TopLine="507"/>
|
<Caret Line="541" Column="1" TopLine="507"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="541" Column="1" TopLine="507"/>
|
<Caret Line="542" Column="36" TopLine="526"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="542" Column="36" TopLine="526"/>
|
<Caret Line="145" Column="23" TopLine="99"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="145" Column="23" TopLine="99"/>
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="1" Column="1" TopLine="1"/>
|
<Caret Line="143" Column="21" TopLine="99"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="143" Column="21" TopLine="99"/>
|
<Caret Line="145" Column="23" TopLine="99"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
|
||||||
<Caret Line="145" Column="23" TopLine="99"/>
|
|
||||||
</Position15>
|
|
||||||
<Position16>
|
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="42" Column="20" TopLine="3"/>
|
<Caret Line="42" Column="20" TopLine="3"/>
|
||||||
</Position16>
|
</Position15>
|
||||||
<Position17>
|
<Position16>
|
||||||
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
||||||
<Caret Line="666" Column="17" TopLine="653"/>
|
<Caret Line="666" Column="17" TopLine="653"/>
|
||||||
</Position17>
|
</Position16>
|
||||||
<Position18>
|
<Position17>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="864" Column="22" TopLine="858"/>
|
<Caret Line="864" Column="22" TopLine="858"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
|
<Caret Line="150" Column="1" TopLine="103"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="150" Column="1" TopLine="103"/>
|
<Caret Line="42" Column="1" TopLine="1"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="42" Column="1" TopLine="1"/>
|
<Caret Line="151" Column="1" TopLine="108"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="151" Column="1" TopLine="108"/>
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="1" Column="1" TopLine="1"/>
|
<Caret Line="37" Column="1" TopLine="14"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
<Caret Line="37" Column="1" TopLine="14"/>
|
<Caret Line="267" Column="1" TopLine="220"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="267" Column="1" TopLine="220"/>
|
<Caret Line="797" Column="48" TopLine="781"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="797" Column="48" TopLine="781"/>
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="1" Column="1" TopLine="1"/>
|
<Caret Line="33" Column="29" TopLine="1"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="33" Column="29" TopLine="1"/>
|
<Caret Line="410" Column="23" TopLine="396"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<Caret Line="410" Column="23" TopLine="396"/>
|
<Caret Line="552" Column="23" TopLine="512"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="552" Column="23" TopLine="512"/>
|
<Caret Line="15" Column="80" TopLine="6"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
|
<Caret Line="486" Column="65" TopLine="468"/>
|
||||||
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -185,6 +185,7 @@ begin
|
|||||||
ADest.Add(' float lResult_float;');
|
ADest.Add(' float lResult_float;');
|
||||||
ADest.Add(' int lResult_int;');
|
ADest.Add(' int lResult_int;');
|
||||||
ADest.Add(' boolean lResult_boolean;');
|
ADest.Add(' boolean lResult_boolean;');
|
||||||
|
ADest.Add(' CharSequence lResult_CharSequence;');
|
||||||
ADest.Add(' Display lResult_Display;');
|
ADest.Add(' Display lResult_Display;');
|
||||||
ADest.Add('');
|
ADest.Add('');
|
||||||
ADest.Add(' switch (Buffer)');
|
ADest.Add(' switch (Buffer)');
|
||||||
@ -452,6 +453,11 @@ begin
|
|||||||
TmpStr := TmpStr + ');';
|
TmpStr := TmpStr + ');';
|
||||||
FPasOutputImpl.Add(' vAndroidPipesComm.WaitForReturn();');
|
FPasOutputImpl.Add(' vAndroidPipesComm.WaitForReturn();');
|
||||||
end
|
end
|
||||||
|
else if (lMethodReturn = 'CharSequence') or (lMethodReturn = 'String') then
|
||||||
|
begin
|
||||||
|
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
||||||
|
FPasOutputImpl.Add(' Result := vAndroidPipesComm.WaitForStringReturn();');
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
||||||
@ -487,7 +493,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
FJavaOutputMethods.Add(' lResult_' + lMethodReturn + ' = ' + lJavaParamSelf + '.' + lMethodName + '(' + lJavaParams + ');');
|
FJavaOutputMethods.Add(' lResult_' + lMethodReturn + ' = ' + lJavaParamSelf + '.' + lMethodName + '(' + lJavaParams + ');');
|
||||||
if IsBasicJavaType(lMethodReturn) then
|
if IsBasicJavaType(lMethodReturn) or (lMethodReturn = 'CharSequence') or (lMethodReturn = 'String') then
|
||||||
FJavaOutputMethods.Add(' MyAndroidPipesComm.' + GetJavaResultFunction(lMethodReturn) + '(lResult_' + lMethodReturn + ');')
|
FJavaOutputMethods.Add(' MyAndroidPipesComm.' + GetJavaResultFunction(lMethodReturn) + '(lResult_' + lMethodReturn + ');')
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -808,8 +814,9 @@ end;
|
|||||||
function TAndroidSDKBindingsGen.GetJavaResultFunction(AReturnType: string
|
function TAndroidSDKBindingsGen.GetJavaResultFunction(AReturnType: string
|
||||||
): string;
|
): string;
|
||||||
begin
|
begin
|
||||||
if AReturnType = 'boolean' then Result := 'SendBoolResult'
|
if AReturnType = 'boolean' then Result := 'SendBoolResult'
|
||||||
else if AReturnType = 'float' then Result := 'SendFloatResult'
|
else if AReturnType = 'float' then Result := 'SendFloatResult'
|
||||||
|
else if (AReturnType = 'CharSequence') or (AReturnType = 'String') then Result := 'SendStringResult'
|
||||||
else Result := 'SendIntResult';
|
else Result := 'SendIntResult';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2,19 +2,11 @@ object Form1: TForm1
|
|||||||
Left = 479
|
Left = 479
|
||||||
Height = 414
|
Height = 414
|
||||||
Top = 137
|
Top = 137
|
||||||
Width = 434
|
Width = 433
|
||||||
Caption = 'Android Bindings Generator'
|
Caption = 'Android Bindings Generator'
|
||||||
ClientHeight = 414
|
ClientHeight = 414
|
||||||
ClientWidth = 434
|
ClientWidth = 433
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '0.9.31'
|
||||||
object Label1: TLabel
|
|
||||||
Left = 8
|
|
||||||
Height = 18
|
|
||||||
Top = 8
|
|
||||||
Width = 43
|
|
||||||
Caption = 'Label1'
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object editInputPath: TDirectoryEdit
|
object editInputPath: TDirectoryEdit
|
||||||
Left = 88
|
Left = 88
|
||||||
Height = 25
|
Height = 25
|
||||||
|
@ -16,7 +16,6 @@ type
|
|||||||
Button1: TButton;
|
Button1: TButton;
|
||||||
Button2: TButton;
|
Button2: TButton;
|
||||||
editInputPath: TDirectoryEdit;
|
editInputPath: TDirectoryEdit;
|
||||||
Label1: TLabel;
|
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
|
@ -73,6 +73,7 @@ constructor Create(Activity); virtual;
|
|||||||
method void setText(CharSequence AText); virtual;
|
method void setText(CharSequence AText); virtual;
|
||||||
callbacksettercaller setOnClickListener callOnClickListener OnClickListener = procedure (v: TView) of object;
|
callbacksettercaller setOnClickListener callOnClickListener OnClickListener = procedure (v: TView) of object;
|
||||||
method void setTextSize(int unit_; float size);
|
method void setTextSize(int unit_; float size);
|
||||||
|
method CharSequence getText()
|
||||||
|
|
||||||
[EditText] TextView
|
[EditText] TextView
|
||||||
constructor Create(Activity); override;
|
constructor Create(Activity); override;
|
||||||
|
Reference in New Issue
Block a user