You've already forked lazarus-ccr
Removes the LCL-CustomDrawn-Android example because it was moved to the lazarus repository
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2174 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="com.pascal.lcltest"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0">
|
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
|
||||||
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
|
|
||||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
|
|
||||||
<application android:label="@string/app_name"
|
|
||||||
android:icon="@drawable/icon"
|
|
||||||
android:debuggable="True">
|
|
||||||
<activity android:name="LCLActivity"
|
|
||||||
android:configChanges="orientation|keyboardHidden"
|
|
||||||
android:label="@string/app_name"
|
|
||||||
android:launchMode="singleTop">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
@ -1,17 +0,0 @@
|
|||||||
# This file is used to override default values used by the Ant build system.
|
|
||||||
#
|
|
||||||
# This file must be checked in Version Control Systems, as it is
|
|
||||||
# integral to the build system of your project.
|
|
||||||
|
|
||||||
# This file is only used by the Ant script.
|
|
||||||
|
|
||||||
# You can use this to override default values such as
|
|
||||||
# 'source.dir' for the location of your java source folder and
|
|
||||||
# 'out.dir' for the location of your output folder.
|
|
||||||
|
|
||||||
# You can also use it define how the release builds are signed by declaring
|
|
||||||
# the following properties:
|
|
||||||
# 'key.store' for the location of your keystore and
|
|
||||||
# 'key.alias' for the name of the key to use.
|
|
||||||
# The password will be asked during the build when you use the 'release' target.
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project name="LCLExample" default="help">
|
|
||||||
|
|
||||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
|
||||||
It contains the path to the SDK. It should *NOT* be checked into
|
|
||||||
Version Control Systems. -->
|
|
||||||
<loadproperties srcFile="local.properties" />
|
|
||||||
|
|
||||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
|
||||||
'android' tool to add properties to it.
|
|
||||||
This is the place to change some Ant specific build properties.
|
|
||||||
Here are some properties you may want to change/update:
|
|
||||||
|
|
||||||
source.dir
|
|
||||||
The name of the source directory. Default is 'src'.
|
|
||||||
out.dir
|
|
||||||
The name of the output directory. Default is 'bin'.
|
|
||||||
|
|
||||||
For other overridable properties, look at the beginning of the rules
|
|
||||||
files in the SDK, at tools/ant/build.xml
|
|
||||||
|
|
||||||
Properties related to the SDK location or the project target should
|
|
||||||
be updated using the 'android' tool with the 'update' action.
|
|
||||||
|
|
||||||
This file is an integral part of the build system for your
|
|
||||||
application and should be checked into Version Control Systems.
|
|
||||||
|
|
||||||
-->
|
|
||||||
<property file="ant.properties" />
|
|
||||||
|
|
||||||
<!-- The project.properties file is created and updated by the 'android'
|
|
||||||
tool, as well as ADT.
|
|
||||||
|
|
||||||
This contains project specific properties such as project target, and library
|
|
||||||
dependencies. Lower level build properties are stored in ant.properties
|
|
||||||
(or in .classpath for Eclipse projects).
|
|
||||||
|
|
||||||
This file is an integral part of the build system for your
|
|
||||||
application and should be checked into Version Control Systems. -->
|
|
||||||
<loadproperties srcFile="default.properties" />
|
|
||||||
|
|
||||||
<!-- quick check on sdk.dir -->
|
|
||||||
<fail
|
|
||||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
|
||||||
unless="sdk.dir"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
|
||||||
in between standard targets -->
|
|
||||||
<!--
|
|
||||||
<target name="-pre-build">
|
|
||||||
</target>
|
|
||||||
<target name="-pre-compile">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
/* This is typically used for code obfuscation.
|
|
||||||
Compiled code location: ${out.classes.absolute.dir}
|
|
||||||
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
|
||||||
<target name="-post-compile">
|
|
||||||
</target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Import the actual build file.
|
|
||||||
|
|
||||||
To customize existing targets, there are two options:
|
|
||||||
- Customize only one target:
|
|
||||||
- copy/paste the target into this file, *before* the
|
|
||||||
<import> task.
|
|
||||||
- customize it to your needs.
|
|
||||||
- Customize the whole content of build.xml
|
|
||||||
- copy/paste the content of the rules files (minus the top node)
|
|
||||||
into this file, replacing the <import> task.
|
|
||||||
- customize to your needs.
|
|
||||||
|
|
||||||
***********************
|
|
||||||
****** IMPORTANT ******
|
|
||||||
***********************
|
|
||||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
|
||||||
in order to avoid having your file be overridden by tools such as "android update project"
|
|
||||||
-->
|
|
||||||
<!-- version-tag: 1 -->
|
|
||||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,11 +0,0 @@
|
|||||||
# This file is automatically generated by Android Tools.
|
|
||||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
|
||||||
#
|
|
||||||
# This file must be checked in Version Control Systems.
|
|
||||||
#
|
|
||||||
# To customize properties used by the Ant build system use,
|
|
||||||
# "build.properties", and override values to adapt the script to your
|
|
||||||
# project structure.
|
|
||||||
|
|
||||||
# Project target.
|
|
||||||
target=android-8
|
|
@ -1,10 +0,0 @@
|
|||||||
# This file is automatically generated by Android Tools.
|
|
||||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
|
||||||
#
|
|
||||||
# This file must *NOT* be checked in Version Control Systems,
|
|
||||||
# as it contains information specific to your local configuration.
|
|
||||||
|
|
||||||
# location of the SDK. This is only used by Ant
|
|
||||||
# For customization when using a Version Control System, please read the
|
|
||||||
# header note.
|
|
||||||
sdk.dir=/home/felipe/Programas/android-sdk-linux
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">LCL Test</string>
|
|
||||||
</resources>
|
|
@ -1,71 +0,0 @@
|
|||||||
package com.pascal.lcltest;
|
|
||||||
|
|
||||||
import android.app.*;
|
|
||||||
import android.content.*;
|
|
||||||
import android.os.*;
|
|
||||||
import android.widget.*;
|
|
||||||
import android.util.*;
|
|
||||||
import android.graphics.*;
|
|
||||||
import android.view.*;
|
|
||||||
|
|
||||||
public class LCLActivity extends Activity
|
|
||||||
{
|
|
||||||
// Our drawing surface
|
|
||||||
private class LCLSurface extends SurfaceView
|
|
||||||
{
|
|
||||||
public LCLSurface(Context context)
|
|
||||||
{
|
|
||||||
super(context);
|
|
||||||
// Allows View.postInvalidate() to work
|
|
||||||
setWillNotDraw(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override protected void onDraw(Canvas canvas)
|
|
||||||
{
|
|
||||||
int lWidth = getWidth();
|
|
||||||
int lHeight = getHeight();
|
|
||||||
|
|
||||||
Log.v("?", "LCLSurface.onDraw width=" + Integer.toString(lWidth)
|
|
||||||
+ " height=" + Integer.toString(lHeight));
|
|
||||||
|
|
||||||
Bitmap lclbitmap = Bitmap.createBitmap(lWidth, lHeight, Bitmap.Config.ARGB_8888);
|
|
||||||
LCLDrawToBitmap(lWidth, lHeight, lclbitmap);
|
|
||||||
canvas.drawBitmap(lclbitmap, 0, 0, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
// TextView tv = new TextView(this);
|
|
||||||
// tv.setText( Integer.toString(intFromJNI()) );
|
|
||||||
// setContentView(tv);
|
|
||||||
LCLSurface lclsurface = new LCLSurface(this);
|
|
||||||
setContentView(lclsurface);
|
|
||||||
lclsurface.postInvalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
// JNI table of functions
|
|
||||||
public native String stringFromJNI();
|
|
||||||
public native int intFromJNI();
|
|
||||||
public native int LCLDrawToBitmap(int width, int height, Bitmap bitmap);
|
|
||||||
|
|
||||||
public long nativeCodeLoaded=0;
|
|
||||||
|
|
||||||
static
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Log.i("JNI", "Trying to load liblclapp.so");
|
|
||||||
System.loadLibrary("lclapp");
|
|
||||||
}
|
|
||||||
catch(UnsatisfiedLinkError ule)
|
|
||||||
{
|
|
||||||
Log.e("JNI", "WARNING: Could not load liblclapp.so");
|
|
||||||
ule.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<CONFIG>
|
|
||||||
<ProjectOptions>
|
|
||||||
<Version Value="9"/>
|
|
||||||
<General>
|
|
||||||
<Flags>
|
|
||||||
<MainUnitHasCreateFormStatements Value="False"/>
|
|
||||||
<MainUnitHasTitleStatement Value="False"/>
|
|
||||||
</Flags>
|
|
||||||
<SessionStorage Value="InProjectDir"/>
|
|
||||||
<MainUnit Value="0"/>
|
|
||||||
<Title Value="androidlcltest"/>
|
|
||||||
<UseAppBundle Value="False"/>
|
|
||||||
<ResourceType Value="res"/>
|
|
||||||
</General>
|
|
||||||
<i18n>
|
|
||||||
<EnableI18N LFM="False"/>
|
|
||||||
</i18n>
|
|
||||||
<VersionInfo>
|
|
||||||
<StringTable ProductVersion=""/>
|
|
||||||
</VersionInfo>
|
|
||||||
<MacroValues Count="1">
|
|
||||||
<Macro1 Name="LCLWidgetType" Value="customdrawn"/>
|
|
||||||
</MacroValues>
|
|
||||||
<BuildModes Count="1">
|
|
||||||
<Item1 Name="Default" Default="True"/>
|
|
||||||
</BuildModes>
|
|
||||||
<PublishOptions>
|
|
||||||
<Version Value="2"/>
|
|
||||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
|
||||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
|
||||||
</PublishOptions>
|
|
||||||
<RunParams>
|
|
||||||
<local>
|
|
||||||
<FormatVersion Value="1"/>
|
|
||||||
</local>
|
|
||||||
</RunParams>
|
|
||||||
<RequiredPackages Count="1">
|
|
||||||
<Item1>
|
|
||||||
<PackageName Value="LCL"/>
|
|
||||||
</Item1>
|
|
||||||
</RequiredPackages>
|
|
||||||
<Units Count="2">
|
|
||||||
<Unit0>
|
|
||||||
<Filename Value="androidlcltest.lpr"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<UnitName Value="androidlcltest"/>
|
|
||||||
</Unit0>
|
|
||||||
<Unit1>
|
|
||||||
<Filename Value="mainform.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="Form1"/>
|
|
||||||
<ResourceBaseClass Value="Form"/>
|
|
||||||
<UnitName Value="mainform"/>
|
|
||||||
</Unit1>
|
|
||||||
</Units>
|
|
||||||
</ProjectOptions>
|
|
||||||
<CompilerOptions>
|
|
||||||
<Version Value="11"/>
|
|
||||||
<Target>
|
|
||||||
<Filename Value="android/libs/armeabi/libmain.so"/>
|
|
||||||
</Target>
|
|
||||||
<SearchPaths>
|
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
|
||||||
<Libraries Value="/home/felipe/Programas/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/;/home/felipe/Programas/android-ndk-r5/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/lib/gcc/arm-eabi/4.4.0/"/>
|
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
|
||||||
</SearchPaths>
|
|
||||||
<CodeGeneration>
|
|
||||||
<RelocatableUnit Value="True"/>
|
|
||||||
<TargetCPU Value="arm"/>
|
|
||||||
<TargetOS Value="linux"/>
|
|
||||||
</CodeGeneration>
|
|
||||||
<Linking>
|
|
||||||
<Debugging>
|
|
||||||
<GenerateDebugInfo Value="False"/>
|
|
||||||
<UseLineInfoUnit Value="False"/>
|
|
||||||
<StripSymbols Value="True"/>
|
|
||||||
</Debugging>
|
|
||||||
<Options>
|
|
||||||
<ExecutableType Value="Library"/>
|
|
||||||
</Options>
|
|
||||||
</Linking>
|
|
||||||
<Other>
|
|
||||||
<CompilerMessages>
|
|
||||||
<UseMsgFile Value="True"/>
|
|
||||||
</CompilerMessages>
|
|
||||||
<CustomOptions Value="-dANDROID -Xd -Cccdecl"/>
|
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
|
||||||
</Other>
|
|
||||||
</CompilerOptions>
|
|
||||||
<Debugging>
|
|
||||||
<Exceptions Count="3">
|
|
||||||
<Item1>
|
|
||||||
<Name Value="EAbort"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<Name Value="ECodetoolError"/>
|
|
||||||
</Item2>
|
|
||||||
<Item3>
|
|
||||||
<Name Value="EFOpenError"/>
|
|
||||||
</Item3>
|
|
||||||
</Exceptions>
|
|
||||||
</Debugging>
|
|
||||||
</CONFIG>
|
|
@ -1,23 +0,0 @@
|
|||||||
library androidlcltest;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
{$define Android}
|
|
||||||
|
|
||||||
uses
|
|
||||||
{$ifdef Android}
|
|
||||||
cmem,
|
|
||||||
android_native_app_glue,
|
|
||||||
{$endif}
|
|
||||||
Interfaces,
|
|
||||||
Forms,
|
|
||||||
mainform;
|
|
||||||
|
|
||||||
exports //android_main name 'android_main',
|
|
||||||
ANativeActivity_onCreate name 'ANativeActivity_onCreate';
|
|
||||||
|
|
||||||
begin
|
|
||||||
Application.Initialize;
|
|
||||||
Application.CreateForm(TForm1, Form1);
|
|
||||||
Application.Run;
|
|
||||||
end.
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
object Form1: TForm1
|
|
||||||
Left = 313
|
|
||||||
Height = 240
|
|
||||||
Top = 186
|
|
||||||
Width = 320
|
|
||||||
Caption = 'Form1'
|
|
||||||
OnPaint = FormPaint
|
|
||||||
LCLVersion = '0.9.31'
|
|
||||||
end
|
|
@ -1,38 +0,0 @@
|
|||||||
unit mainform;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
|
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
{ TForm1 }
|
|
||||||
|
|
||||||
TForm1 = class(TForm)
|
|
||||||
procedure FormPaint(Sender: TObject);
|
|
||||||
private
|
|
||||||
{ private declarations }
|
|
||||||
public
|
|
||||||
{ public declarations }
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
Form1: TForm1;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
{$R *.lfm}
|
|
||||||
|
|
||||||
{ TForm1 }
|
|
||||||
|
|
||||||
procedure TForm1.FormPaint(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Canvas.Brush.Color := clRed;
|
|
||||||
Canvas.Rectangle(10, 10, 100, 100);
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
Reference in New Issue
Block a user