Initial import of XobotOS into the public repo

This commit is contained in:
Miguel de Icaza 2012-04-30 17:55:59 -04:00
Коммит f20db6295e
20992 изменённых файлов: 5956527 добавлений и 0 удалений

10
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,10 @@
/Debug
/build
/bin
/upstream
/ipch/
/*.pidb
/*.suo
/*.sdf
/*.opensdf
/*.userprefs

Просмотреть файл

@ -0,0 +1,12 @@
#Mon Oct 24 21:46:34 CEST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

118
README Normal file
Просмотреть файл

@ -0,0 +1,118 @@
XobotOS project
===============
XobotOS is a Xamarin research project that explored porting Android
4.0 from Java/Dalvik to C# to explore the performance and memory
footprint benefits of C#.
XobotOS is a semi-automated port of the Android 4.0 source code from
Java to C#. The automated parts were ported using an improved version
of Sharpen that can compile more advanced Java constructs and supports
generics. Most of the manual bits of code fall in two categories (a)
code to integrate with the host operating system and (b) replace the
Java JNI code used to call into C, with the ECMA CLI P/Invoke
functionality.
License
=======
The various components of XobotOS are licensed under the same license
as their upstream providers. The C# versions of Android is licensed
under the terms of the Apache 2 license, while the improved version of
Sharpen is licensed under the GPL.
XobotOS Source Code
===================
XobotOS is made up of the following sources:
sharpen:
* Our updated version of Sharpen, see below for changes.
android/generated:
* Fully translated Java to C# code, classes that have been
translated in this way contain the attribute [Sharpen.Sharpened]
* Empty C# stubs based on the Java declaration: these are
needed as intermediate steps to get things to build in the
new C# world. Classes with empty stubs are decorated with
the [Sharpen.NakedStub] attribute
android/extra-sources:
* Custom written code that either fine tunes the port,
provides an alternative optimized version to a class or
provides a runtime facility.
android/api:
* XML files that describe the translation process from Java to C#.
android/upstream:
* Google's Android 4.0 source code.
libxobotos:
* Glue code to integrate with various Android C++ libraries as
well as the Linux X11 host that sets up the toplevel window
and the optional OpenGL context.
* Mostly calls into Skia, Jpeg, OpenGL and ICU libraries.
binaries:
* Libraries to get you started without requiring you to build Skia,
and other native Android tools.
* Screenshots, videos, and some basic precompiled samples.
monodevelop:
* Add-in to build native XobotOS applications with MonoDevelop
samples:
* Ported samples to C# using XobotOS
external:
* Native libraries needed to build the unmanaged libxobotos C library
Sharpen
=======
The outcome of this project is a vastly improved Sharpen tool that is
able to port very sophisticated and advanced Java codebases from Java
to C#. This code lives in the "sharpen" directory.
This modified version of Sharpen can cope with the following enhancements:
* Java generics
* XML-driven translation process
* Type remapping for native Java types to C# types, and supports
for custom type mappings.
* Support for translating code that does native interop
* Support for generating C's .c and .h files for native glue
(to assist in P/Invoke support)
* Add attribute-supported translations
* Improved incremental compilation
Documentation on the improved Sharpen engine will be posted in the
future so other developers can more easily port Java code to C#.
Support
=======
This code is provided as-is, and we do not offer support for any bits
of code here, nor does Xamarin plan on continuing evolving XobotOS at
this point.

140
README.build Normal file
Просмотреть файл

@ -0,0 +1,140 @@
PREREQUISITES:
==============
(*) Do not attempt to run this on OpenSuSE 12.1.
If you do have OpenSuSE 12.1, then start Eclipse, create a simple "Hello World"
in Java, compile and run it - if that works for you without crashing, then you
may be lucky.
They did something in their glibc that's causing random crashes in Sun's JVM,
this has made Eclipse so unstable that I had to downgrade to OpenSuSE 11.4
(*) Prior to building, you need to increase memory size in Eclipse
(http://wiki.oseems.com/application/eclipse/fix-gc-overhead-limit-exceeded)
I'm using -Xms2048m and -Xmx4096m.
(*) To get Fonts working on Linux, you must follow these instructions:
http://code.google.com/p/chromium/wiki/LinuxOpenSuseBuildInstructions
(creating all these symlinks is required).
SETTING THINGS UP:
==================
You need to create to separate Eclipse workspaces for this and checkout the
XobotOS module in each of these. I'm using /work/workspace and /work/test.
If you start Eclipse for the first time, then it'll ask you for the workspace
directory. Once it created that, checkout XobotOS in it.
In Eclipse, do File / Import / General / Existing Projects into Workspace,
select /work/workspace/XobotOS as root directory, then it should offer you to
import 5 projects. Select sharpen.core and sharpen.xobotos (sharpen.feature
and sharpen.site are not used at the moment, and you do not want 'android' in
this workspace). Make sure _not_ to copy them into the workspace, that checkbox
must not be checked.
When imported, you should see the 'sharpen.core' and 'sharpen.xobotos' projects.
Select Project / Build automatically.
Open sharpen.xobotos/plugin.xml. At the top of the "Overview" tab, you should
see four buttons, the leftmost of these is "Launch an Eclipse application".
Click it, and another instance of Eclipse will start.
The first time this inferior instance of Eclipse starts up, it will ask you for
a workspace directory. Checkout XobotOS inside that directory, then do the import
as described above, but only select the 'android' module.
You are now ready :-)
You only need to follow the instructions in this section the first time that you're
running this in Eclipse. Eclipse remembers which projects you had open and your last
run configuration, so when you come back, you can simply start Eclipse, then do
Run / Run (or Run / Debug to debug it).
RUNNING THE BUILDER:
====================
Well, that's easy.
Simply do Project / Build, then get some coffee or take a walk ....
Current time for a full build is about 10 minutes on my machine.
When done, all the generated sources are placed in the output/ directory and
XobotOS-debug.csproj is automatically updated.
BUILDING THE C# SOURCES:
========================
There is a XobotOS-debug.sln file in the top level directory (/work/test/XobotOS/XobotOS-debug.sln),
simply open this in MonoDevelop or use xbuild.
It is highly recommended to close the solution in MonoDevelop before doing a full build.
BUILDING THE C# SOURCES FROM GITHUB:
====================================
You can also directly compile the C# sources from github:
After checking out or updating, simply open XobotOS.sln in MonoDevelop.
Note that there are two solutions:
* XobotOS.sln uses the sources from github.
* XobotOS-debug.sln uses the freshly convereted files from the android/output
directory.
BUILDING THE SAMPLES:
=====================
This is a little bit complicated and still unstable, but here's how it should work:
First, check http://code.google.com/p/skia/wiki/GettingStartedOnLinux or
http://code.google.com/p/skia/wiki/GettingStartedOnWindows and install all the
prerequisites listed in there.
On Linux, you also need to follow these instructions:
http://code.google.com/p/chromium/wiki/LinuxOpenSuseBuildInstructions.
Create a directory called 'build' if it doesn't already exist, cd into that directory,
then run
(cd .. && python gyp_xobotos)
This will generate a Makefile in the build/ directory, running 'make' will
build all the native Skia and Android code.
The output gets placed in build/Debug/lib.target. You either have to add that
directory to your LD_LIBRARY_PATH or manually copy the libxobotos.so.
Open XobotOS.sln or XobotOS-debug.sln in MonoDevelop (depending on whether you
want to use the sources from github or the newly converted ones, see above)
and build the solution.
SAMPLE ARCHITECTURE:
====================
There's a class called XobotOS.Runtime.ActivityManager which is responsible
for running a sample Activity.
We use a modified version of Android's 'aapt' tool called 'xorpt', which compiles
the AndroidManifest.xml and the resources into a '<assembly>-res.zip' and also
creates a R.cs.
TestActivity.csproj has a pre-build rule which automatically runs xorpt:
<CustomCommands>
<CustomCommands>
<Command type="BeforeBuild" command="${TargetDir}/xorpt p -f -S res -F TestActivity-res.zip -J . -M AndroidManifest.xml -I ${SolutionDir}/android/system-root/framework/framework-res.apk" workingdir="${ProjectDir}" pauseExternalConsole="true" />
</CustomCommands>
</CustomCommands>
On startup, ActivityManager uses android.content.pm.PackageParser to parse the
resource file and get the startup activity from the AndroidManifest.xml.
We already support constructing a view from XML.

14
README.devices Normal file
Просмотреть файл

@ -0,0 +1,14 @@
XobotOS now has experimental multi-device support.
See http://developer.android.com/guide/practices/screens_support.html and
http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
XobotOS.exe now takes an optional '--device=handheld' or '--device=tablet'
argument to run with a different screen size. This must be given as first
argument, before the assembly:
$ mono --debug ../build/Debug/XobotOS.exe --device=tablet ../build/Debug/Fragments.dll
samples/Fragments demonstrate an app that looks and behaves differently on a
handheld and a tablet.

170
README.pinvoke Normal file
Просмотреть файл

@ -0,0 +1,170 @@
What this is and what this not is
---------------------------------
The marshaling code has been designed to specifically address the needs for
XobotOS, it is a general managed <-> native marshaler for .NET applications.
One important design principle is correcness and robustness over performance
or beauty of the generated code. The generated code may look very ugly and
it's also a bit bloated - but it also makes it very difficult to make any
mistakes.
Four different layers
---------------------
In XobotOS, we have four different layers:
(a) The Java source code that will be automatically converted to C#
(b) An intermediate layer of generated C code - this should be regarded as
strictly private, an implementation detail that may change at any time.
(c) A C++ library.
Android's JNI glue code contains both the Java <-> native marshaling code
as well as some added functionality on top of it.
In XobotOS, I separated this additional functionality from the marshaling
code and put it into a separate C++ library.
All the code has been manually written and this library could also be
re-used by other projects.
(d) The Skia / Android native libraries.
From a user's point of view, the public APIs in (a) simply call into (c)/(d),
the intermediate layer is just an internal implementation detail.
Marshaling classes and instance pointers
----------------------------------------
The native Java API is a huge mess and also very inconsistent:
* They use the 32-bit 'int' type for pointers everywhere.
* A native instance method may or may not take the native 'this' pointer;
sometimes they use native JNI reflection to get it.
Which means that the type 'int' in a method signature could mean three
different things: a pointer, an enum or an integer.
Therefor, an XML entry is required.
A special word about 'structs'
------------------------------
The term 'struct' is misleading since a valuetype struct does not exist in Java.
Several 'structs' that you would expect to be valuetypes are in fact classes
in XobotOS - for instance android.graphics.Rect. These cannot be turned into
valuetypes as this would chance semantics in a way that neither the converter
nor the compiler would be able to detect.
Consider this:
void hello (Foo foo)
{
foo.hello = 9;
foo = new Foo ();
foo.hello = 15;
}
int test ()
{
Foo foo = new Foo ();
foo.hello = 3;
hello (foo);
return foo.hello;
}
What's the result of test() ?
Well, it's 9 is Foo is a class, 3 if it's a struct - and 15 if it's a struct
and you add the 'ref' modifier to hello().
An additional difficulty is that 'structs' like android.graphics.Rect may
sometimes be null - and the corresponding C++ Skia function also allows a NULL
argument.
Different marshaling modes
--------------------------
Marshaling info for arrays, strings and structs is created automatically, XML
entries are only used to specify special marshaling modes.
There are three different marshaling modes:
* The default is "read-only" - 'const Foo&' is used as native type.
Specifying 'flags="ALLOW_NULL' in the XML turns it into 'const Foo*' and
null checks are added both on the native and the managed side.
("read-only" means accidentally passing this to a function that expects a
non-const reference/pointer would yield a compilation error; there is no
protection against the native code explicitly casting this to non-const and
writing into it).
* "writable" (mode="REF" in the XML) means that the native code may modify and
the modification will be automatically marshaled back into managed code.
This mode is not allowed for strings.
For arrays, it means that the native code may modify its elements - but it
must not touch the length or address of the array.
For structs, each of its members will be marshaled according to the rules in
this section. However, a different marshaling mode may be specified for
individual members.
'Foo&' is used as native type - or 'Foo*' for ALLOW_NULL.
* "out" (mode="OUT" in the XML).
The native code creates and returns a new instance of the type - 'Foo&' is
used for structs and 'Foo*' for arrays, strings and when used as a return value.
This mode may be used to return complex data structures such as strings or
arrays of arrays from native code.
When looking at the C++ API:
* 'const Foo&' - no special marshal flags have been used, parameter is passed
"IN" and may not be null.
* 'Foo&' - native code may modify this.
* 'const Foo*' - may be null
* 'Foo*' - native code may modify this, may be null.
Special handling of arrays
--------------------------
When marshaling an array of a blittable type, the marshaling code passes a
pointer to the actual managed array elements to the native code using
GCHandle.AddrOfPinnedObject().
C++ API for arrays and structures
---------------------------------
For structures, the C++ API must define the data type - the marshaling code
simply takes care of marshaling it to the managed side and vice-versa.
For arrays, there's a template type 'NativeArray<T>' in <MarshalHelper.h>,
it provides a non-copyable representation of a managed array with an API to
access its elemements, automatically checking bounds.
For strings, 'NativeString' derives from 'NativeElement<char16_t>' and
provides some extra functionality like conversion to and from
android::String16.
Intermediate representation of structs
--------------------------------------
Marshaling structs is a little bit difficult because they may contain
non-blittable elements such as arrays, strings or other structs.
Internally, arrays and strings are turned into a structure containing their
length and address and when these types are used as struct members, special
marshaling code must be generated.

96
README.samples Normal file
Просмотреть файл

@ -0,0 +1,96 @@
Quick tutorial on how to create a new sample application in MonoDevelop.
Setting up the Project:
* Create a new library project and add a reference to XobotOS-debug
(don't worry, XobotOS-debug is an executable project)
* Create your AndroidManifest.xml and res/ directory.
For instance:
===[AndroidManifest.xml]===
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="XobotOS.ScrollView">
<application android:name="TestApplication"
android:label="XobotOS Scroll View">
<activity android:name="TestActivity">
</activity>
</application>
</manifest>
====
====[res/layout/scroll_view.xml]====
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:src="@drawable/venus"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</ScrollView>
====
* Create your Application and Activity classes as specified in the manifest.
* To build the resources, you need to run xorpt.pl prior to building:
Go to Project / Options / Build / Custom Command, then add a new
"Before Build" command.
Command: ${SolutionDir}/xorpt.pl ${ProjectDir} ${ProjectConfigName}
Working Directory: ${ProjectDir}
Don't check Run on external console.
This will add the following to the .csproj:
<CustomCommands>
<CustomCommands>
<Command type="BeforeBuild" command="${SolutionDir}/xorpt.pl ${ProjectDir} ${ProjectConfigName}" workingdir="${ProjectDir}" />
</CustomCommands>
</CustomCommands>
* Build the project.
This will run xorpt and generate the ProjectName-res.zip in the project
directory.
Xorpt (XobotOS Resource Packaging Tool) is a slightly modified version of
Android's aapt tool, which creates a R.cs and packages the
AndroidManifest.xml and all resources into a resources .zip file.
We embed this resource file in the assembly.
* Add the generated R.cs to the build.
* Add the generated ProjectName-res.zip as an embedded resource called
"XobotOS.Resources" (you must use this name).
To do this, add the file, then
right-click / Build Action / EmbeddedResource
right-click / Properties and set Resource ID to "XobotOS.Resources".
* Now you can simply access your resources, for instance:
public class TestActivity : Activity
{
protected override void onCreate (android.os.Bundle savedInstanceState)
{
base.onCreate (savedInstanceState);
setContentView (R.layout.scroll_view);
}
}
* Rebuild the project to make sure the resource file is embedded.
To run this, simply run XobotOS.exe and pass it the assembly filename as
command-line argument.

79
XobotOS.sln Normal file
Просмотреть файл

@ -0,0 +1,79 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{562B6196-A830-46F2-83AF-66C333A2C994}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrollView", "samples\ScrollView\ScrollView.csproj", "{648EFBBE-93CA-48BC-8840-62A818808C9A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListActivity", "samples\ListActivity\ListActivity.csproj", "{6BF2BACD-6DBA-4F24-B68B-440B2447CF90}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaTests", "samples\SkiaTests\SkiaTests.csproj", "{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fragments", "samples\Fragments\Fragments.csproj", "{6CC68F68-321A-424D-A2F7-3A9FBD67D609}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.XobotBinding", "monodevelop\MonoDevelop.XobotBinding.csproj", "{39C2F1AE-D8D1-4D6A-8769-9252485B51AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XobotOS", "android\XobotOS.csproj", "{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E}.Debug|x86.ActiveCfg = Debug|x86
{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E}.Debug|x86.Build.0 = Debug|x86
{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E}.Release|x86.ActiveCfg = Release|x86
{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E}.Release|x86.Build.0 = Release|x86
{39C2F1AE-D8D1-4D6A-8769-9252485B51AC}.Debug|x86.ActiveCfg = Debug|Any CPU
{39C2F1AE-D8D1-4D6A-8769-9252485B51AC}.Debug|x86.Build.0 = Debug|Any CPU
{39C2F1AE-D8D1-4D6A-8769-9252485B51AC}.Release|x86.ActiveCfg = Release|Any CPU
{39C2F1AE-D8D1-4D6A-8769-9252485B51AC}.Release|x86.Build.0 = Release|Any CPU
{648EFBBE-93CA-48BC-8840-62A818808C9A}.Debug|x86.ActiveCfg = Debug|Any CPU
{648EFBBE-93CA-48BC-8840-62A818808C9A}.Debug|x86.Build.0 = Debug|Any CPU
{648EFBBE-93CA-48BC-8840-62A818808C9A}.Release|x86.ActiveCfg = Release|Any CPU
{648EFBBE-93CA-48BC-8840-62A818808C9A}.Release|x86.Build.0 = Release|Any CPU
{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}.Debug|x86.ActiveCfg = Debug|Any CPU
{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}.Debug|x86.Build.0 = Debug|Any CPU
{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}.Release|x86.ActiveCfg = Release|Any CPU
{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}.Release|x86.Build.0 = Release|Any CPU
{6BF2BACD-6DBA-4F24-B68B-440B2447CF90}.Debug|x86.ActiveCfg = Debug|Any CPU
{6BF2BACD-6DBA-4F24-B68B-440B2447CF90}.Debug|x86.Build.0 = Debug|Any CPU
{6BF2BACD-6DBA-4F24-B68B-440B2447CF90}.Release|x86.ActiveCfg = Release|Any CPU
{6BF2BACD-6DBA-4F24-B68B-440B2447CF90}.Release|x86.Build.0 = Release|Any CPU
{6CC68F68-321A-424D-A2F7-3A9FBD67D609}.Debug|x86.ActiveCfg = Debug|Any CPU
{6CC68F68-321A-424D-A2F7-3A9FBD67D609}.Debug|x86.Build.0 = Debug|Any CPU
{6CC68F68-321A-424D-A2F7-3A9FBD67D609}.Release|x86.ActiveCfg = Release|Any CPU
{6CC68F68-321A-424D-A2F7-3A9FBD67D609}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{648EFBBE-93CA-48BC-8840-62A818808C9A} = {562B6196-A830-46F2-83AF-66C333A2C994}
{6BF2BACD-6DBA-4F24-B68B-440B2447CF90} = {562B6196-A830-46F2-83AF-66C333A2C994}
{1EE8F2DF-9EF8-4A44-AB70-CB7CB54A282E} = {562B6196-A830-46F2-83AF-66C333A2C994}
{6CC68F68-321A-424D-A2F7-3A9FBD67D609} = {562B6196-A830-46F2-83AF-66C333A2C994}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = android\XobotOS.csproj
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
$1.ResourceNamePolicy = FileFormatDefault
$0.TextStylePolicy = $2
$2.inheritsSet = null
$2.scope = text/x-csharp
$0.CSharpFormattingPolicy = $3
$3.inheritsSet = Mono
$3.inheritsScope = text/x-csharp
$3.scope = text/x-csharp
$0.TextStylePolicy = $4
$4.FileWidth = 120
$4.RemoveTrailingWhitespace = True
$4.EolMarker = Unix
$4.inheritsSet = Mono
$4.inheritsScope = text/plain
$4.scope = text/plain
$0.StandardHeader = $5
$5.Text =
$5.IncludeInNewFiles = True
EndGlobalSection
EndGlobal

Двоичные данные
XobotOS.snk Normal file

Двоичный файл не отображается.

6
android/.classpath Normal file
Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="upstream"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

8
android/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,8 @@
/bin/
/obj/
/.settings/
/output/
/logfile.txt
/thestubs.dll
/*.userprefs
/*.pidb

27
android/.project Normal file
Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>sharpen.xobotos.sharpenXobotBuilder</name>
<arguments>
<dictionary>
<key>configFile</key>
<value>converter-config.xml</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>sharpen.xobotos.sharpenXobotNature</nature>
</natures>
</projectDescription>

154
android/README Normal file
Просмотреть файл

@ -0,0 +1,154 @@
Building
========
Prior to building, you need to increase memory size in Eclipse
(http://wiki.oseems.com/application/eclipse/fix-gc-overhead-limit-exceeded)
I'm using -Xms2048m and -Xmx4096m.
Directory Layout
================
upstream
This contains the Java code from Ice Cream Sandwich.
Getting the sources from ICS is a very tricky
process. There is not a single place where you can
just go and grab stuff, you have to run a full build,
then manually copy files and do the bouncycastle
rename. Many of the .java files are also
auto-generated from .idl files during the ICS build.
api
This contains the definition of how we drive the
Sharpen translation process. This is a Xamarin
extension, since Sharpen did not have this.
api/api-def.xml is the main file which drives the
translation process.
It is included from converter-config.xml.
extra-sources
These are C# source files that we write by hand.
They are partial classes that contain a custom
implementation for some methods.
Whenever some method in a fully sharpened class
doesn't compile, a quick solution is to add a remove
entry for it to the api-def, then implement it in one
of these partial classes. This directory does not
contain any stubs, only real code.
manual-stubs
is for stubs that have been manually modified or
completely hand-written. These are mostly for some of
the low-level classes like java.lang.
naked-stubs
Used for a build performance optimization
When removed, the exact same files will be regenerated
in the output directory.
This directory is listed as an extra source directory,
so everything in there won't ever be regenerated,
cutting the build time down to half. That's a very
important performance optimization, a total build took
about ten minutes with the old builder and still takes
about two minutes with the new one.
output
The real output directory of the builder.
Use the XobotOS-debug.sln in the top-level directory to
compile the freshly generated files.
generated
A copy of the 'output' directory on github.
Use the XobotOS.sln in the top-level directory to build
these files.
system-root
The ANDROID_ROOT environment variable must point to this
directory, it contains the framework resources.
Attributes
==========
Class-level attributes for the generated output:
[Sharpen.Sharpened]
The class is fully translated by sharpen.
Example:
stubs/android/widget/AdapterView.cs
[Sharpen.Stub]
The code generated contains method signatures, constants and
definitions, but the bodies throw NotImplementedException
Example:
stubs/android/view/accessibility/AccessibilityManager.cs
[Sharpen.NakedStub]
Only the type definition is included, no methods or members.
Used to simplify the build process.
Example:
naked-stubs/dalvik/bytecode/Opcodes.cs
[Sharpen.EditedStub]
I mostly use [Sharpen.EditedStub] for stuff in the
manual-stubs directory, to mark that I made manual changes to
the output.
[Sharpen.NativeStub]
Used to mark native methods without [DllImport].
Other attributes:
[Sharpen.Comment]
Attribute can be used to add arbitrary comments; these can be
inserted by using a <comment> entry in the api-def. Could be
useful, for instance when stubbing out a single method in a
fully sharpened file, to tell why it had to be stubbed out.
[Sharpen.Proxy]
Is Used when we generate a proxy method. For example:
stubs/android/text/SpannableStringBuilder.cs
The append() methods have the wrong return type, so
we must provide an explicit interface implementation for
java.lang.Appendable and android.text.Editable.
[Sharpen.ImplementsInterface] and [Sharpen.OverridesMethod]
These are only used for debugging. A frequent failure in
newly sharpened classes is that that C# compiler complains
about method overrides or interface implementations - often
either the base class is a stub without private members or
something is wrong with the method's signature. These
attributes specify what Eclipse's JDT DOM API thinks the
method overrides / implements and helps me quickly fix these
issues.

40
android/README.upstream Normal file
Просмотреть файл

@ -0,0 +1,40 @@
* Copy all files from
frameworks/base/core/java/*
frameworks/base/media/java/*
frameworks/base/graphics/java/*
frameworks/base/telephony/java/*
frameworks/base/location/java/*
frameworks/base/voip/java/*
frameworks/base/wifi/java/*
frameworks/base/keystore/java/*
frameworks/base/opengl/java/*
frameworks/base/drm/java/*
frameworks/base/sax/java/*
libcore/dalvik/src/main/java/*
libcore/junit/src/main/java/*
libcore/luni/src/main/java/*
libcore/json/src/main/java/*
external/libphonenumber/java/src/*
external/jsr305/ri/src/main/java/*
external/apache-http/src/*
external/bouncycastle/src/main/java/*
external/nist-sip/java/*
external/guava/src/*
external/tagsoup/src/*
external/libphonenumber/java/src/*
out/target/common/R/*
to upstream-ics
* From out/target/common/obj/APPS/framework-res_intermediates/src/android:
Copy Manifest.java and R.java to upstream-ics/android
* From out/target/common/obj/APPS/framework_intermediates/src:
Copy */java/* to upstream-ics
* Replace all references to com.android.org.bouncycastle to org.bouncycastle

5200
android/XobotOS.csproj Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

49
android/XobotOS.csproj.in Normal file
Просмотреть файл

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{67942F02-5F09-4D4E-AB98-C44E48CF6AAC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>XobotOS</RootNamespace>
<AssemblyName>XobotOS</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\XobotOS.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\build\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>1</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoWarn>672,693,169,414,649,618,628,659,612</NoWarn>
<Commandlineparameters>ListActivity.dll</Commandlineparameters>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\build\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<Commandlineparameters>ListActivity.dll</Commandlineparameters>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<EmbeddedResource Include="system-root\framework\framework-res.apk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>XobotOS.Resources</LogicalName>
</EmbeddedResource>
</ItemGroup>
@FILELIST@
</Project>

Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.animation">
<namespace name="android.animation">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Animator</include>
<include>AnimatorInflater</include>
<include>AnimatorListenerAdapter</include>
<include>TimeInterpolator</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/stub">
<location-filter>
<include>ValueAnimator</include>
<include>PropertyValuesHolder</include>
</location-filter>
<main-type>
<field>
<filter>
<name>sIntEvaluator</name>
<name>sFloatEvaluator</name>
</filter>
<modify>
<field-initializer />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="FloatEvaluator" output="/output/naked-stub" />
<compilation-unit name="ObjectAnimator" output="/output/stub">
<main-type partial="true">
<constructor name="ObjectAnimator(T,android.util.Property)" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/stub" />
</namespace>
</api-definition>

263
android/api/android-app.xml Normal file
Просмотреть файл

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.app">
<!-- Namespace: android.app -->
<!-- -->
<!-- Full stubs for most of the classes. -->
<!-- -->
<namespace name="android.app" output="/output/stub">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Application</include>
<include>Fragment</include>
</location-filter>
</compilation-unit>
<compilation-unit name="Activity" output="/output/sharpen-no-docs">
<main-type partial="true">
<field>
<filter>
<name>mHandler</name>
<name>mInstanceTracker</name>
</filter>
<modify>
<field-initializer />
</modify>
</field>
<method name="finish" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="IApplicationThread" output="/output/sharpen" />
<compilation-unit name="IActivityManager" output="/output/sharpen" />
<compilation-unit name="ApplicationThreadNative" />
<compilation-unit name="ActivityThread" output="/output/sharpen">
<main-type partial="true">
<field>
<filter>
<name>mAppThread</name>
<name>mGcIdler</name>
<name>mLooper</name>
<name>mH</name>
</filter>
<modify>
<field-initializer />
</modify>
</field>
<field>
<filter>
<name>mAllApplications</name>
<name>mInstrumentation</name>
<name>mInstrumentationAppDir</name>
<name>mInstrumentationAppPackage</name>
<name>mInstrumentedAppDir</name>
<name>mSystemContext</name>
<name>TAG</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
<field>
<modify>
<visibility>PRIVATE</visibility>
</modify>
</field>
<method>
<filter>
<name>getPackageInfo</name>
<name>getPackageInfoNoCheck</name>
<name>getSystemContext</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</method>
<method name="getApplicationThread">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</method>
<method output="/output/stub">
<filter>
<name>ensureJitEnabled</name>
<name>scheduleGcIdler</name>
<name>unscheduleGcIdler</name>
<name>doGcIfNeeded</name>
<name>handleReceiver</name>
<name>handleCreateBackupAgent</name>
<name>handleDestroyBackupAgent</name>
<name>handleCreateService</name>
<name>handleDestroyService</name>
<name>handleResumeActivity</name>
<name>handleProfilerControl</name>
<name>handleDumpHeap</name>
<name>handleBindApplication</name>
<name>handleLowMemory</name>
<name>finishInstrumentation</name>
<name>installProvider</name>
<name>installContentProviders</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>systemMain</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>attach</name>
<name>main</name>
</filter>
</method>
<constructor name="ActivityThread" output="/output/partial" />
<type name="ActivityClientRecord" />
<type name="ResourcesKey" />
<type name="ApplicationThread" output="/output/stub">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
<type recursive="true" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="ApplicationPackageManager" output="/output/sharpen">
<main-type partial="true">
<method output="/output/stub">
<filter>
<name>getInstalledPackages</name>
<name>getInstalledApplications</name>
<name>handlePackageBroadcast</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>getResourcesForApplication(android.content.pm.ApplicationInfo)</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="ContextImpl" output="/output/sharpen">
<main-type partial="true">
<method output="/output/stub">
<filter>
<name>sendOrderedBroadcast</name>
<name>sendStickyOrderedBroadcast</name>
<name>registerReceiverInternal</name>
<name>createDropBoxManager</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>getPackageManager</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="FragmentManager" output="/output/sharpen">
<type name="FragmentManagerImpl" partial="true">
<method output="/output/partial">
<filter>
<name>execPendingActions</name>
</filter>
</method>
</type>
</compilation-unit>
<compilation-unit name="LoadedApk" output="/output/sharpen">
<main-type partial="true">
<method output="/output/stub">
<filter>
<name>initializeJavaContextClassLoader</name>
<name>removeContextRegistrations</name>
<name>forgetReceiverDispatcher</name>
<name>forgetServiceDispatcher</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>getClassLoader</name>
</filter>
</method>
<type name="WarningContextClassLoader" output="/output/naked-stub" />
<type name="ReceiverDispatcher" output="/output/stub">
<type name="Args" output="/output/nothing" />
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Instrumentation" output="/output/stub">
<main-type partial="true">
<field name="mPerfMetrics">
<modify>
<field-initializer />
</modify>
</field>
<constructor output="/output/sharpen" />
<method output="/output/sharpen">
<filter>
<name>newActivity</name>
<name>onException</name>
<name>callApplicationOnCreate</name>
<name>callActivityOnStart</name>
<name>checkStartActivityResult</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>newApplication</name>
<name>callActivityOnCreate</name>
<name>callActivityOnPostCreate</name>
<name>execStartActivity</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="SharedPreferencesImpl">
<main-type>
<type name="MemoryCommitResult">
<field name="writtenToDiskLatch">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
<type name="EditorImpl">
<field name="mModified">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>ListActivity</include>
<include>ListFragment</include>
</location-filter>
</compilation-unit>
<compilation-unit name="DownloadManager" output="/output/api-stub" />
<compilation-unit output="/output/stub">
<location-filter>
<exclude>UiModeManager</exclude>
<exclude>FullBackupAgent</exclude>
</location-filter>
</compilation-unit>
<namespace name="admin">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IDevicePolicyManager</include>
<include>DevicePolicyManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="internal">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>AlertController</include>
<include>ActionBarImpl</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/naked-stub"/>
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.content">
<!-- Namespace: android.content -->
<!-- -->
<!-- The stubs that we create for this namespace include all the -->
<!-- private API (methods, properties, nested classes and fields). -->
<!-- -->
<namespace name="android.content" output="/output/stub">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>ComponentName</include>
<include>Context</include>
<include>ContextWrapper</include>
<include>SyncActivityTooManyDeletes</include>
</location-filter>
</compilation-unit>
<compilation-unit name="AsyncTaskLoader">
<main-type>
<type name="LoadTask">
<field name="done">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ContentProvider">
<main-type>
<remove-members>
<member-kind>ANONYMOUS_CLASS</member-kind>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="ContentResolver" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>openInputStream</name>
<name>openAssetFileDescriptor</name>
<name>getResourceId</name>
<name>modeToMode</name>
<name>acquireProvider</name>
<name>acquireExistingProvider</name>
<name>startSync</name>
<name>cancelSync</name>
<name>getCurrentSync</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="Intent" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>parseUri</name>
<name>getIntentOld</name>
<name>getParcelableExtra</name>
<name>removeCategory</name>
<name>toUri</name>
<name>readFromParcel</name>
<name>writeToParcel</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="SyncAdapterType">
<binding auto-rename-fields="true" />
</compilation-unit>
<namespace name="pm">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>ActivityInfo</include>
<include>ApplicationInfo</include>
<include>ComponentInfo</include>
<include>ConfigurationInfo</include>
<include>FeatureInfo</include>
<include>InstrumentationInfo</include>
<include>PackageInfo</include>
<include>PackageInfoLite</include>
<include>PackageItemInfo</include>
<include>PackageManager</include>
<include>PermissionInfo</include>
<include>ProviderInfo</include>
<include>ServiceInfo</include>
<include>UserInfo</include>
</location-filter>
</compilation-unit>
<compilation-unit name="PackageParser" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>loadCertificates</name>
<name>collectCertificates</name>
<name>parseVerifier</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace>
<namespace name="res" output="/output/sharpen">
<template-include-file file="api/resources/asset-manager.xml" />
<template-include-file file="api/resources/string-block.xml" />
<template-include-file file="api/resources/resources.xml" />
<template-include-file file="api/resources/xml-block.xml" />
<compilation-unit name="AssetFileDescriptor" output="/output/stub" />
<compilation-unit name="CompatibilityInfo">
<main-type>
<type name="Translator">
<constructor>
<modify>
<remove-chained-invocation>true</remove-chained-invocation>
</modify>
</constructor>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Configuration">
<main-type>
<method name="readFromParcel" output="/output/stub" />
<method name="writeToParcel" output="/output/stub" />
</main-type>
</compilation-unit>
</namespace>
<namespace name="internal">
<compilation-unit>
<location-filter>
<include>PackageMonitor</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/naked-stub" />
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.graphics">
<!-- Namespace: android.graphics -->
<!-- -->
<!-- We have full stubs for android.graphics -->
<!-- -->
<templates>
<marshal-info class="native-enum" id="PorterDuff-Mode">
<native-type>SkPorterDuff::Mode</native-type>
</marshal-info>
<binding id="native-int-enum" class="enum-binding">
<base-type>int</base-type>
<value-field>nativeInt</value-field>
</binding>
<binding id="nullable-native-int-enum" class="enum-binding">
<base-type>int</base-type>
<value-field>nativeInt</value-field>
<nullable>true</nullable>
</binding>
</templates>
<namespace name="android.graphics" output="/output/sharpen">
<template-include-file file="api/graphics/draw-filter.xml" />
<template-include-file file="api/graphics/mask-filter.xml" />
<template-include-file file="api/graphics/path-effect.xml" />
<template-include-file file="api/graphics/color-filter.xml" />
<template-include-file file="api/graphics/rasterizer.xml" />
<template-include-file file="api/graphics/xfermode.xml" />
<template-include-file file="api/graphics/shader.xml" />
<template-include-file file="api/graphics/bitmap.xml" />
<template-include-file file="api/graphics/canvas.xml" />
<template-include-file file="api/graphics/path.xml" />
<template-include-file file="api/graphics/paint.xml" />
<template-include-file file="api/graphics/rect.xml" />
<template-include-file file="api/graphics/matrix.xml" />
<template-include-file file="api/graphics/region.xml" />
<template-include-file file="api/graphics/typeface.xml" />
<template-include-file file="api/graphics/path-measure.xml" />
<template-include-file file="api/graphics/color.xml" />
<template-include-file file="api/graphics/interpolator.xml" />
<template-include-file file="api/graphics/nine-patch.xml" />
<template-include-file file="api/graphics/picture.xml" />
<compilation-unit name="Camera" output="/output/stub">
<main-type>
<native-type />
<method name="nativeApplyToCanvas">
<native kind="INSTANCE">
<signature>
<parameter marshal="/android.graphics/Canvas/Canvas" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PixelFormat">
<main-type>
<method name="getPixelFormatInfo" output="/output/nothing" />
<method name="nativeClassInit" output="/output/nothing" />
<remove-members>
<member-kind>STATIC_CONSTRUCTOR</member-kind>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="PorterDuff">
<main-type>
<enum name="Mode">
<binding reference="/android.graphics/native-int-enum" />
</enum>
</main-type>
</compilation-unit>
<compilation-unit name="SurfaceTexture" output="/output/stub">
<main-type>
<modify>
<comment
text="This is using native code outside of Skia for 3D rendering." />
</modify>
</main-type>
</compilation-unit>
<compilation-unit name="YuvImage">
<main-type>
<method name="compressToJpeg" output="/output/stub">
<modify>
<comment text="java.io has not yet been ported." />
</modify>
</method>
<method name="nativeCompressToJpeg" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/stub">
<location-filter>
<include>Camera</include>
<include>BitmapRegionDecoder</include>
<include>Movie</include>
</location-filter>
</compilation-unit>
<namespace name="drawable">
<template-include-file file="api/graphics/drawables.xml" />
</namespace>
</namespace>
</api-definition>

145
android/api/android-os.xml Normal file
Просмотреть файл

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition>
<namespace name="android.os" output="/output/stub">
<compilation-unit>
<location-filter>
<include>IBinder</include>
<include>Binder</include>
<include>ResultReceiver</include>
<include>PatternMatcher</include>
<include>Parcelable</include>
<include>IInterface</include>
<include>FileObserver</include>
<include>RemoteException</include>
<include>FileUtils</include>
<include>Environment</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<include>ParcelFileDescriptor</include>
<include>Parcel</include>
<include>Looper</include>
<include>Handler</include>
<include>ServiceManager</include>
<include>IPowerManager</include>
<include>PowerManager</include>
</location-filter>
</compilation-unit>
<compilation-unit name="AsyncTask" output="/output/api-stub">
<main-type>
<type output="/output/naked-stub"/>
</main-type>
</compilation-unit>
<compilation-unit name="RecoverySystem">
<main-type>
<remove-members>
<member-kind>METHOD</member-kind>
<name>RecoverySystem()</name>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="Bundle" output="/output/sharpen">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>getSparseParcelableArray</name>
<name>putSparseParcelableArray</name>
<name>unparcel</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="StrictMode">
<main-type partial="true">
<field>
<filter>
<name>sVmPolicy</name>
<name>sThisThreadSpanState</name>
</filter>
<modify>
<field-initializer />
</modify>
</field>
<field name="NO_OP_SPAN" output="/output/partial" />
<method output="/output/partial">
<filter>
<name>incrementExpectedActivityCount</name>
<name>decrementExpectedActivityCount</name>
<name>enterCriticalSpan</name>
</filter>
</method>
<remove-members>
<member-kind>FIELD</member-kind>
<name>sDropboxCallsInFlight</name>
</remove-members>
<type name="Span" output="/output/sharpen" />
<type name="InstanceCountViolation">
<remove-members>
<member-kind>FIELD</member-kind>
<name>FAKE_STACK</name>
</remove-members>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Build" output="/output/sharpen">
<main-type partial="true">
<field name="RADIO">
<modify>
<field-initializer code="null" />
</modify>
</field>
<method output="/output/partial">
<filter>
<name>getRadioVersion</name>
<name>getString</name>
<name>getLong</name>
</filter>
</method>
<type name="VERSION">
<field name="SDK_INT">
<modify>
<field-initializer code="VERSION_CODES.ICE_CREAM_SANDWICH" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Message" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>writeToParcel</name>
<name>readFromParcel</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="Process">
<type name="ZygoteStartFailedEx" output="/output/naked-stub" />
<main-type partial="true">
<method name="myUid" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/naked-stub"/>
<namespace name="storage">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IMountShutdownObserver</include>
<include>StorageManager</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/naked-stub"/>
</namespace>
<namespace name="internal">
<compilation-unit>
<location-filter>
<include>IResultReceiver</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/naked-stub"/>
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,202 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.text">
<!-- Namespace: android.text -->
<!-- -->
<!-- We have full stubs for most of these classes -->
<!-- -->
<namespace name="android.text" output="/output/stub">
<templates>
<action class="action-list" id="spannable-string-action">
<action class="modify-method">
<filter>
<name>setSpan</name>
<name>removeSpan</name>
</filter>
<visibility>PUBLIC</visibility>
</action>
</action>
</templates>
<compilation-unit>
<location-filter>
<include>AndroidCharacter</include>
<include>AndroidBidi</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>BoringLayout</include>
<include>DynamicLayout</include>
<include>StaticLayout</include>
</location-filter>
</compilation-unit>
<compilation-unit name="SpannableStringBuilder" output="/output/sharpen">
<main-type partial="true">
<action reference="$spannable-string-action"/>
<remove-members>
<member-kind>METHOD</member-kind>
<name>getSpans</name>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>SpannableString</include>
<include>SpannableStringInternal</include>
</location-filter>
<main-type partial="true">
<remove-members>
<member-kind>METHOD</member-kind>
<name>getSpans</name>
</remove-members>
<method name="setSpan">
<modify>
<visibility>PUBLIC</visibility>
</modify>
</method>
<method name="removeSpan">
<modify>
<visibility>PUBLIC</visibility>
</modify>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="Html">
<main-type>
<method name="fromHtml" output="/output/stub"/>
</main-type>
</compilation-unit>
<compilation-unit name="Layout" output="/output/sharpen">
<main-type>
<type name="Directions">
<modify>
<visibility>PUBLIC</visibility>
</modify>
<field name="mDirections">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
<enum name="Alignment">
<binding nullable="true"/>
</enum>
<field name="EMOJI_FACTORY">
<modify>
<field-initializer />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="AutoText" output="/output/stub">
<main-type>
<field name="TRIE_NULL">
<modify>
<field-initializer code="unchecked ((char)-1)" />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="TextLine" output="/output/sharpen">
<main-type partial="true">
<remove-members>
<name>handleRun</name>
</remove-members>
<type name="SpanSet" partial="true">
<remove-members>
<member-kind>CONSTRUCTOR</member-kind>
</remove-members>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="TextDirectionHeuristics" output="/output/sharpen">
<main-type>
<enum name="TriState">
<modify>
<visibility>PUBLIC</visibility>
</modify>
</enum>
</main-type>
</compilation-unit>
<compilation-unit name="TextUtils" output="/output/sharpen">
<main-type partial="true">
<method name="copySpansFrom" output="/output/stub">
<modify>
<comment text="FIXME: android.text.Spanned.getSpans()"/>
</modify>
</method>
<method name="commaEllipsize" output="/output/stub">
<modify>
<comment text="FIXME: Implicit conversion from float to int"/>
</modify>
</method>
<method name="join(java.lang.CharSequence.java.lang.Iteraboe)" output="/output/partial" />
<enum name="TruncateAt">
<binding nullable="true"/>
</enum>
<field name="ELLIPSIS_NORMAL">
<modify>
<field-initializer code='"..."' />
</modify>
</field>
<field name="ELLIPSIS_TWO_DOTS">
<modify>
<field-initializer code='".."' />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="PackedObjectVector" output="/output/sharpen">
<main-type partial="true">
<method name="insertAt" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen"/>
<namespace name="method">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>ArrowKeyMovementMethod</include>
<include>BaseMovementMethod</include>
<include>MovementMethod</include>
<include>WordIterator</include>
<include>BaseKeyListener</include>
<include>MetaKeyKeyListener</include>
<include>TransformationMethod</include>
<include>ReplacementTransformationMethod</include>
<include>SingleLineTransformationMethod</include>
<include>CharacterPickerDialog</include>
</location-filter>
</compilation-unit>
<compilation-unit name="TextKeyListener" output="/output/sharpen">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>initPrefs</name>
<name>updatePrefs</name>
<name>getPrefs</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="Touch" output="/output/sharpen">
<main-type partial="true">
<method name="onTouchEvent" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="QwertyKeyListener" output="/output/sharpen">
<main-type>
<type name="Replaced">
<field name="mText">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit output="/output/stub"/>
</namespace>
<namespace output="/output/stub" recursive="true"/>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.util">
<namespace name="android.util">
<compilation-unit output="/output/stub">
<location-filter>
<include>Config</include>
<include>ConfigBuildFlags</include>
<include>Pool</include>
<include>Singleton</include>
<include>ReflectiveProperty</include>
<include>LruCache</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<exclude>FastImmutableArraySet</exclude>
<include>EventLog</include>
<include>Printer</include>
</location-filter>
</compilation-unit>
<compilation-unit name="Xml" output="/output/stub">
<main-type partial="true">
<method name="asAttributeSet" output="/output/sharpen" />
<enum name="Encoding" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter regex="true">
<include>.*Exception</include>
</location-filter>
</compilation-unit>
<compilation-unit name="DisplayMetrics" output="/output/sharpen">
<main-type>
<field name="DENSITY_DEVICE">
<modify>
<field-initializer code="DENSITY_DEFAULT" />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="Log" output="/output/sharpen">
<main-type partial="true">
<type name="TerribleFailure">
<binding visibility="INTERNAL" />
</type>
<type name="TerribleFailureHandler">
<binding visibility="INTERNAL" />
</type>
<method name="setWtfHandler">
<binding visibility="INTERNAL" />
</method>
<method name="isLoggable" output="/output/partial" />
<method name="println_native" output="/output/partial" />
<remove-members>
<member-kind>CONSTRUCTOR</member-kind>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="Slog" output="/output/sharpen" />
<compilation-unit name="LogWriter" output="/output/sharpen" />
<compilation-unit name="MathUtils" output="/output/sharpen">
<main-type partial="true">
<field name="sRandom" output="/output/nothing" />
<method name="randomSeed" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="SparseArray" output="/output/sharpen">
<main-type partial="true" />
</compilation-unit>
<compilation-unit name="DebugUtils" output="/output/sharpen">
<main-type>
<method name="isObjectSelected" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="TimeUtils" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>getTimeZone</name>
<name>getTimeZoneDatabaseVersion</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="TypedValue" output="/output/sharpen">
<main-type partial="true">
<native-struct id="TypedValue"
native-type="AssetManagerGlue::TypedValue">
<include>AssetManagerGlue.h</include>
<member name="type" native-name="mType" />
<member name="data" native-name="mData" />
<member name="string" value="null" />
<member name="assetCookie" native-name="mAssetCookie" />
<member name="resourceId" native-name="mResourceId" />
<member name="density" native-name="mDensity" />
</native-struct>
<method name="toString" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="LocaleUtil" output="/output/stub">
<main-type partial="true">
<method name="getLayoutDirectionFromLocale" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Property</include>
<include>IntProperty</include>
<include>FloatProperty</include>
<include>LongSparseArray</include>
<include>SparseBooleanArray</include>
<include>SparseIntArray</include>
<include>StateSet</include>
<include>FloatMath</include>
<include>AttributeSet</include>
<include>XmlPullAttributes</include>
<include>Pair</include>
<include>Pools</include>
<include>Poolable</include>
<include>PoolableManager</include>
<include>FinitePool</include>
<include>SynchronizedPool</include>
</location-filter>
</compilation-unit>
<namespace name="internal">
<compilation-unit name="XmlUtils" output="/output/sharpen">
<main-type>
<method name="writeMapXml" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="FastXmlSerializer" output="/output/sharpen">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>flushBytes</name>
<name>setOutput(java.io.OutputStream,java.lang.String)</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<include>FastMath</include>
<include>Predicate</include>
</location-filter>
</compilation-unit>
<compilation-unit name="ArrayUtils" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>emptyArray</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,265 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.view">
<!-- Namespace: android.view -->
<!-- -->
<!-- We have full stubs for android.view -->
<!-- -->
<namespace name="android.view" output="/output/stub">
<template-include-file file="api/view/motion-event.xml" />
<template-include-file file="api/view/velocity-tracker.xml" />
<compilation-unit output="/output/sharpen">
<location-filter>
<include>ActionMode</include>
<include>ActionProvider</include>
<include>CollapsibleActionView</include>
<include>CompatibilityInfoHolder</include>
<include>ContextMenu</include>
<include>ContextThemeWrapper</include>
<include>DisplayList</include>
<include>DragEvent</include>
<include>FallbackEventHandler</include>
<include>FocusFinder</include>
<include>FocusFinderHelper</include>
<include>GestureDetector</include>
<include>Gravity</include>
<include>HapticFeedbackConstants</include>
<include>HardwareCanvas</include>
<include>HardwareLayer</include>
<include>IApplicationToken</include>
<include>InflateException</include>
<include>InputEvent</include>
<include>InputEventConsistencyVerifier</include>
<include>InputHandler</include>
<include>InputQueue</include>
<include>IOnKeyguardExitResult</include>
<include>IRotationWatcher</include>
<include>LayoutInflater</include>
<include>Menu</include>
<include>MenuItem</include>
<include>OrientationListener</include>
<include>ScaleGestureDetector</include>
<include>SoundEffectConstants</include>
<include>SubMenu</include>
<include>SurfaceHolder</include>
<include>SurfaceSession</include>
<include>SurfaceView</include>
<include>TextureView</include>
<include>TouchDelegate</include>
<include>ViewManager</include>
<include>ViewParent</include>
<include>ViewStub</include>
<include>ViewTreeObserver</include>
<include>Window</include>
<include>WindowManagerPolicy</include>
</location-filter>
</compilation-unit>
<compilation-unit name="HardwareRenderer">
<main-type partial="true">
<method name="isAvailable" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="ViewGroup" output="/output/sharpen">
<main-type>
<binding>
<!-- Required for 'import static' -->
</binding>
</main-type>
</compilation-unit>
<compilation-unit name="View" output="/output/sharpen">
<main-type partial="true">
<binding>
<!-- Required for 'import static' -->
</binding>
<type name="TransformationInfo">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
<type name="AttachInfo" partial="true">
<type name="InvalidateInfo">
<field name="sPool">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ViewConfiguration" output="/output/sharpen">
<main-type partial="true">
<constructor name="ViewConfiguration(android.content.Context)" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="KeyEvent" output="/output/sharpen">
<main-type partial="true" />
</compilation-unit>
<compilation-unit name="MenuInflater">
<main-type>
<field name="ACTION_VIEW_CONSTRUCTOR_SIGNATURE">
<modify>
<field-type type="System.Type[]"/>
</modify>
</field>
<field name="ACTION_PROVIDER_CONSTRUCTOR_SIGNATURE">
<modify>
<field-type type="System.Type[]"/>
</modify>
</field>
<type name="InflatedOnMenuItemClickListener">
<field name="PARAM_TYPES">
<modify>
<field-type type="System.Type[]"/>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ViewRootImpl" output="/output/sharpen">
<main-type partial="true">
<method name="getRunQueue" output="/output/sharpen" />
<method name="isInTouchMode" output="/output/partial" />
<method output="/output/stub" />
<constructor output="/output/stub" />
<field>
<filter>
<name>mResizeInterpolator</name>
<name>mSurface</name>
</filter>
<modify>
<field-initializer />
</modify>
</field>
<type name="AccessibilityInteractionController" output="/output/stub">
<field name="mPool">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
<type name="RunQueue" />
<type recursive="true" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="GLES20RecordingCanvas">
<main-type>
<field name="sPool">
<modify>
<field-initializer code="null" />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="VolumePanel" output="/output/naked-stub"/>
<compilation-unit name="WindowManager" output="/output/sharpen">
<main-type>
<type name="LayoutParams">
<method name="toString" output="/output/nothing" />
</type>
</main-type>
</compilation-unit>
<compilation-unit name="WindowManagerImpl" output="/output/sharpen">
</compilation-unit>
<compilation-unit name="Display" output="/output/sharpen">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>init</name>
<name>nativeClassInit</name>
<name>getWindowManager</name>
<name>getRawWidth</name>
<name>getRawHeight</name>
<name>getOrientation</name>
<name>getDisplayCount</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>getRawWidthNative</name>
<name>getRawHeightNative</name>
</filter>
</method>
</main-type>
</compilation-unit>
<namespace name="accessibility">
<compilation-unit name="AccessibilityManager" output="/output/sharpen">
<main-type partial="true">
<method name="isEnabled" output="/output/partial" />
<method name="getInstance" output="/output/partial" />
<method output="/output/stub" />
<remove-members>
<member-kind>CONSTRUCTOR</member-kind>
</remove-members>
</main-type>
</compilation-unit>
</namespace>
<namespace name="animation" output="/output/sharpen" />
<namespace name="textservice">
<compilation-unit name="SpellCheckerSession">
<main-type>
<type name="SpellCheckerSessionListenerImpl">
<field name="mPendingTasks">
<modify>
<field-type type="System.Collections.Generic.Queue&lt;SpellCheckerParams&gt;"/>
<field-initializer code="new System.Collections.Generic.Queue&lt;SpellCheckerParams&gt; ()" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
</namespace>
<namespace name="inputmethod">
<compilation-unit name="InputMethodManager" output="/output/sharpen">
<main-type>
<method output="/output/stub">
<filter>
<name>doDump</name>
<name>dump</name>
<name>getShortcutInputMethodsAndSubtypes</name>
</filter>
</method>
<field name="mClient">
<modify>
<field-initializer />
</modify>
</field>
<anonymous-class output="/output/stub" />
<type recursive="true" output="/output/stub" />
</main-type>
</compilation-unit>
</namespace>
<namespace name="internal.menu" output="/output/sharpen">
<compilation-unit>
<location-filter>
<include>ListMenuPresenter</include>
<include>IconMenuPresenter</include>
</location-filter>
<main-type>
<method output="/output/stub">
<filter>
<name>saveHierarchyState</name>
<name>restoreHierarchyState</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="MenuBuilder">
<main-type>
<method output="/output/stub">
<filter>
<name>restoreActionViewStates</name>
<name>dispatchRestoreInstanceState</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace>
<namespace recursive="true"/>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="android.widget">
<!-- Namespace: android.widget -->
<!-- -->
<!-- Work in progress -->
<!-- -->
<namespace name="android.widget" output="/output/sharpen">
<compilation-unit name="TextView">
<main-type recursive="true">
<method>
<filter>
<name>InsertionPointCursorController</name>
<name>SelectionModifierCursorController</name>
</filter>
<modify>
<visibility>PUBLIC</visibility>
</modify>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="EditText">
<main-type partial="true">
<method name="getText" output="/output/partial" />
<method name="selectAll" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="ListView">
<main-type>
<field name="mHeaderViewInfos">
<modify>
<field-initializer code="new java.util.ArrayList&lt;FixedViewInfo&gt; ()" />
</modify>
</field>
<field name="mFooterViewInfos">
<modify>
<field-initializer code="new java.util.ArrayList&lt;FixedViewInfo&gt; ()" />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit name="RelativeLayout">
<main-type>
<type name="LayoutParams">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="GridLayout">
<main-type>
<type recursive="true">
<constructor>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</constructor>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ImageView">
<main-type>
<enum name="ScaleType">
<binding reference="/android.graphics/native-int-enum" />
</enum>
</main-type>
</compilation-unit>
<compilation-unit name="TableRow">
<main-type>
<type name="LayoutParams">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="OverScroller">
<main-type>
<type name="SplineOverScroller">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="TabHost">
<main-type>
<type>
<filter>
<name>IndicatorStrategy</name>
<name>ContentStrategy</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
<type name="TabSpec">
<constructor>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</constructor>
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit>
<location-filter>
<include>CheckBox</include>
<include>ToggleButton</include>
<include>RadioButton</include>
</location-filter>
<main-type>
<method name="onPopulateAccessibilityEvent" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="AbsListView">
<main-type>
<type name="RecycleBin">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="NumberPicker">
<main-type>
<type name="SetSelectionCommand">
<field>
<filter>
<name>mSelectionStart</name>
<name>mSelectionEnd</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
<type name="ChangeCurrentByOneFromLongPressCommand">
<method name="setIncrement">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</method>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ExpandableListView">
<main-type>
<type name="SavedState" output="/output/stub" />
</main-type>
</compilation-unit>
<compilation-unit name="AdapterView">
<main-type partial="true">
<type>
<filter>
<name>OnItemClickListener</name>
<name>OnItemLongClickListener</name>
<name>OnItemSelectedListener</name>
</filter>
<binding is-event-interface="true" />
</type>
</main-type>
</compilation-unit>
<compilation-unit name="ActivityChooserView">
<main-type>
<type name="Callbacks">
<method name="onItemClick">
<parameter>
<binding>
<auto-cast type="android.widget.IAdapterView" />
</binding>
</parameter>
</method>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="SuggestionsAdapter">
<main-type>
<!-- This type is used in a static import in SearchView; we must always -->
<!-- parse it to correctly resolve the static import. -->
<binding />
</main-type>
</compilation-unit>
<compilation-unit name="SearchView">
<main-type>
<type name="SearchAutoComplete">
<method name="isEmpty">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</method>
</type>
</main-type>
</compilation-unit>
<compilation-unit output="/output/stub">
<location-filter>
<!-- android.os.HandlerThread -->
<include>Filter</include>
<include>VideoView</include>
<include>RemoteViews</include>
<include>AdapterViewAnimator</include>
<include>ActivityChooserModel</include>
<include>RemoteViewsAdapter</include>
<include>RemoteViewsService</include>
<include>CalendarView</include>
<include>QuickContactBadge</include>
<include>DoubleDigitManager</include>
<include>MediaController</include>
<include>SimpleExpandableListAdapter</include>
<include>AlphabetIndexer</include>
<include>DateTimeView</include>
<include>SlidingDrawer</include>
<include>DigitalClock</include>
<include>DatePicker</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/sharpen" />
<namespace name="internal">
<compilation-unit name="LockPatternUtils" output="/output/stub">
<main-type>
<field name="sHaveNonZeroPatternFile">
<modify>
<field-initializer code="null" />
</modify>
</field>
<field name="sHaveNonZeroPasswordFile">
<modify>
<field-initializer code="null" />
</modify>
</field>
</main-type>
</compilation-unit>
<compilation-unit output="/output/stub">
<location-filter>
<include>RotarySelector</include>
<include>PasswordEntryKeyboardHelper</include>
<include>PointerLocationView</include>
<include>WaveView</include>
<include>DigitalClock</include>
<include>TransportControlView</include>
<include>SlidingTab</include>
<include>LockPatternView</include>
</location-filter>
</compilation-unit>
<namespace name="multiwaveview">
<compilation-unit output="/output/stub">
<location-filter>
<include>Tweener</include>
<include>MultiWaveView</include>
</location-filter>
</compilation-unit>
</namespace>
</namespace>
</namespace>
</api-definition>

283
android/api/api-def.xml Normal file
Просмотреть файл

@ -0,0 +1,283 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition>
<templates>
<templates id="output">
<output-type id="stub" class="stub">
<remove-docs>true</remove-docs>
<remove-static-constructor>true</remove-static-constructor>
</output-type>
<output-type id="sharpen" class="sharpen"/>
<output-type id="sharpen-no-docs" class="sharpen">
<remove-docs>true</remove-docs>
</output-type>
<output-type id="api-stub" class="stub">
<remove-fields>true</remove-fields>
<remove-non-public>true</remove-non-public>
<remove-docs>true</remove-docs>
<remove-static-constructor>true</remove-static-constructor>
<remove-anonymous-classes>true</remove-anonymous-classes>
</output-type>
<output-type id="naked-stub" class="naked-stub"/>
<output-type id="nothing" class="nothing"/>
<output-type id="partial" class="nothing"/>
</templates>
<native-config id="native">
<dll-name>libxobotos.dll</dll-name>
<output-dir>glue</output-dir>
<function-prefix>libxobotos</function-prefix>
<include>libxobotos.h</include>
<marshal-info class="native-pointer" id="Pointer" />
</native-config>
</templates>
<include-file file="api/android-app.xml"/>
<include-file file="api/android-content.xml"/>
<include-file file="api/android-graphics.xml"/>
<include-file file="api/android-text.xml"/>
<include-file file="api/android-view.xml"/>
<include-file file="api/android-widget.xml"/>
<include-file file="api/android-animation.xml"/>
<include-file file="api/android-os.xml"/>
<include-file file="api/android-util.xml"/>
<include-file file="api/other-namespaces.xml"/>
<namespace>
<compilation-unit name="android.internal.R" output="/output/sharpen">
<binding auto-rename-fields="true" />
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>java.math.RoundingMode</include>
<include>android.Manifest</include>
<include>android.R</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.provider">
<compilation-unit output="output/stub">
<location-filter>
<include>BaseColumns</include>
<include>SyncStateContract</include>
<include>Applications</include>
<include>CalendarContract</include>
<include>Contacts</include>
<include>MediaStore</include>
<include>Telephony</include>
</location-filter>
</compilation-unit>
<compilation-unit name="ContactsContract" output="/output/stub">
<main-type>
<type name="StatusUpdates" abstract="true">
<remove-members>
<member-kind>CONSTRUCTOR</member-kind>
</remove-members>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="BrowserContract" output="output/stub">
<main-type>
<type name="Accounts">
<field name="CONTENT_URI">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="DrmStore" output="output/stub">
<main-type>
<type>
<filter>
<name>Images</name>
<name>Audio</name>
</filter>
<field name="CONTENT_URI">
<modify>
<field-initializer code="null" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Settings" output="output/stub">
<main-type>
<type name="System" output="output/nothing"/>
</main-type>
</compilation-unit>
</namespace>
<namespace name="android.database" output="/output/stub">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Observable</include>
</location-filter>
</compilation-unit>
<namespace recursive="true" />
</namespace>
<namespace name="android.media">
<compilation-unit output="output/stub">
<location-filter>
<include>IRemoteControlDisplay</include>
<include>IAudioFocusDispatcher</include>
<include>AudioSystem</include>
<include>AudioManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.emoji">
<templates>
<output-type id="custom-output" class="stub">
<remove-chained-constructors>true</remove-chained-constructors>
<remove-fields>false</remove-fields>
<remove-non-public>true</remove-non-public>
<remove-docs>true</remove-docs>
</output-type>
</templates>
<compilation-unit output="$custom-output">
<location-filter>
<include>EmojiFactory</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.policy.internal" output="/output/sharpen" />
<namespace name="android.appwidget" output="/output/sharpen">
<compilation-unit output="/output/stub">
<location-filter>
<include>AppWidgetHost</include>
<include>AppWidgetHostView</include>
</location-filter>
</compilation-unit>
<namespace recursive="true" />
</namespace>
<namespace name="android.statusbar.internal" output="/output/sharpen" />
<namespace name="android.inputmethodservice" output="output/stub"/>
<namespace name="android.drm">
<compilation-unit name="DrmStore" output="/output/stub">
</compilation-unit>
</namespace>
<namespace name="android.telephony">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>TelephonyManager</include>
</location-filter>
</compilation-unit>
<namespace name="internal">
<compilation-unit name="Call">
<binding auto-rename-fields="true" />
</compilation-unit>
<compilation-unit name="SmsMessageBase">
<binding auto-rename-fields="true" />
</compilation-unit>
</namespace>
</namespace>
<namespace name="android.accounts">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Account</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IAccountManager</include>
<include>IAccountManagerResponse</include>
<include>AccountManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.speech">
<compilation-unit name="RecognizerIntent" output="/output/sharpen" />
</namespace>
<namespace name="android.net">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IConnectivityManager</include>
<include>INetworkPolicyManager</include>
<include>IThrottleManager</include>
<include>ConnectivityManager</include>
<include>NetworkPolicyManager</include>
<include>ThrottleManager</include>
</location-filter>
</compilation-unit>
<namespace name="wifi">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IWifiManager</include>
<include>WifiManager</include>
</location-filter>
</compilation-unit>
<namespace name="p2p">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IWifiP2pManager</include>
<include>WifiP2pManager</include>
</location-filter>
</compilation-unit>
</namespace>
</namespace>
</namespace>
<namespace name="android.location">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>ICountryDetector</include>
<include>ILocationManager</include>
<include>CountryDetector</include>
<include>LocationManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.nfc">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>NfcManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="android.hardware.usb">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>IUsbManager</include>
<include>UsbManager</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="martin" output="/output/sharpen">
<template-include-file file="api/test.xml"/>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,321 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Bitmap">
<native-handle id="NativeBitmap">
<name>NativeBitmap</name>
<type>android.graphics.Bitmap</type>
<include>BitmapGlue.h</include>
<class>BitmapGlue</class>
<field>mNativeBitmap</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativeBitmap"
id="Bitmap" />
<marshal-info class="native-class" native-handle="NativeBitmap"
flags="ALLOW_NULL" id="Bitmap-AllowNull" />
<marshal-info class="native-enum" id="Bitmap-Config">
<managed-type>android.graphics.Bitmap.Config</managed-type>
<native-type>SkBitmap::Config</native-type>
</marshal-info>
<compilation-unit name="Bitmap">
<main-type partial="true" native-handle="NativeBitmap" >
<enum name="Config">
<binding>
<base-type>int</base-type>
<value-field>nativeInt</value-field>
<constructor-method>nativeToConfig</constructor-method>
</binding>
</enum>
<enum name="CompressFormat">
<binding reference="/android.graphics/native-int-enum" />
</enum>
<method name="nativeConfig(int)">
<native name="config" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeCopy(int,int,boolean)">
<native name="copy" kind="INSTANCE">
<signature>
<return-type marshal="Bitmap" />
<parameter marshal="Bitmap" />
<parameter marshal="Bitmap-Config" />
</signature>
</native>
</method>
<method name="nativeCreate(int[],int,int,int,int,int,boolean)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Bitmap" />
<parameter flags="ALLOW_NULL" />
<parameter index="5" marshal="Bitmap-Config" />
</signature>
</native>
</method>
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="nativeErase(int,int)">
<native name="eraseColor" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeExtractAlpha(int,int,int[])">
<native name="extractAlpha" kind="INSTANCE">
<signature>
<return-type marshal="Bitmap" />
<parameter marshal="Bitmap" />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="nativeGenerationId(int)">
<native name="getGenerationID" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeGetPixel(int,int,int)">
<native name="getPixel" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeGetPixels(int,int[],int,int,int,int,int,int)">
<native name="getPixels" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="nativeHasAlpha(int)">
<native name="hasAlpha" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeHeight(int)">
<native name="height" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativePrepareToDraw(int)">
<native name="prepareToDraw" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeRecycle(int)">
<native name="recycle" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeRowBytes(int)">
<native name="rowBytes" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeSameAs(int,int)">
<native name="sameAs" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeSetHasAlpha(int,boolean)">
<native name="setHasAlpha" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeSetPixel(int,int,int,int)">
<native name="setPixel" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="nativeSetPixels(int,int[],int,int,int,int,int,int)">
<native name="setPixels" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
<parameter />
</signature>
</native>
</method>
<method name="nativeWidth(int)">
<native name="width" kind="INSTANCE">
<signature>
<parameter marshal="Bitmap" />
</signature>
</native>
</method>
<method name="compress" output="/output/stub">
<modify>
<comment text="java.io has not yet been ported." />
</modify>
</method>
<method output="/output/stub">
<filter>
<name>createFromParcel</name>
<name>writeToParcel</name>
</filter>
<modify>
<comment text="Parcel has not yet been ported." />
</modify>
</method>
<method output="/output/nothing">
<filter>
<name>nativeCompress</name>
<name>nativeCopyPixelsFromBuffer</name>
<name>nativeCopyPixelsToBuffer</name>
<name>nativeCreateFromParcel</name>
<name>nativeWriteToParcel</name>
</filter>
</method>
<method name="copyPixelsFromBuffer" output="/output/stub">
<modify>
<comment text="java.nio.Buffer has not yet been ported." />
</modify>
</method>
<method name="copyPixelsToBuffer" output="/output/partial" />
<method name="extractAlpha">
<variable name="nativePaint">
<binding native-handle="/android.graphics/Paint/NativePaint" />
</variable>
</method>
<method name="ni">
<binding native-handle="NativeBitmap" />
</method>
<constructor name="Bitmap(int,byte[],boolean,byte[],int)"
output="/output/nothing">
<parameter>
<binding native-handle="NativeBitmap" />
</parameter>
</constructor>
<constructor name="Bitmap(int)">
<parameter>
<binding native-handle="NativeBitmap" />
</parameter>
</constructor>
<field name="CREATOR">
<modify>
<field-initializer code="null" />
</modify>
</field>
<anonymous-class output="/output/nothing" />
<type name="BitmapFinalizer">
<constructor>
<parameter>
<binding native-handle="NativeBitmap" />
</parameter>
</constructor>
<field name="mNativeBitmap">
<binding native-handle="NativeBitmap" />
</field>
<remove-members>
<member-kind>DESTRUCTOR</member-kind>
</remove-members>
</type>
<field name="mBuffer">
<modify>
<visibility>PRIVATE</visibility>
</modify>
</field>
<field name="mIsMutable" output="/output/nothing" />
<method name="isMutable()">
<native name="isMutable" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="BitmapFactory">
<main-type partial="true">
<native-type />
<method
name="nativeDecodeByteArray(byte[],int,int,android.graphics.BitmapFactory.Options)">
<native name="decodeByteArray" kind="STATIC">
<class>BitmapFactoryGlue</class>
<include>BitmapFactoryGlue.h</include>
<signature>
<return-type marshal="Bitmap" />
<parameter index="3" mode="REF" />
</signature>
</native>
</method>
<method name="nativeSetDefaultConfig(int)">
<native name="setDefaultConfig" kind="STATIC">
<class>BitmapFactoryGlue</class>
<include>BitmapFactoryGlue.h</include>
<signature>
<parameter marshal="Bitmap-Config" />
</signature>
</native>
</method>
<method
name="nativeDecodeAsset(int,android.graphics.Rect,android.graphics.BitmapFactory.Options)">
<native kind="PROXY">
<class>BitmapFactoryGlue</class>
<include>BitmapFactoryGlue.h</include>
<signature>
<return-type marshal="Bitmap" />
<parameter marshal="/android.content/AssetManager/Asset" />
<parameter />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="decodeFile" output="/output/partial" />
<method output="/output/nothing">
<filter>
<name>nativeDecodeFileDescriptor</name>
<name>nativeIsSeekable</name>
</filter>
</method>
<method output="/output/stub">
<filter>
<name>decodeFile</name>
<name>decodeFileDescriptor</name>
</filter>
</method>
<type name="Options">
<native-struct id="BitmapFactory-Options"
native-type="BitmapFactoryGlue::Options">
<include>BitmapFactoryGlue.h</include>
<member name="inMutable" native-name="isMutable" mode="IN" />
<member name="inJustDecodeBounds" native-name="justDecodeBounds"
mode="IN" />
<member name="inSampleSize" native-name="sampleSize" mode="IN" />
<member name="inDither" native-name="doDither" mode="IN" />
<member name="inPurgeable" native-name="isPurgeable" mode="IN" />
<member name="inPreferredConfig" native-name="config"
marshal="Bitmap-Config" mode="IN" />
<member name="inBitmap" native-name="bitmap" marshal="Bitmap"
mode="IN" />
<member name="outWidth" native-name="width" mode="OUT" />
<member name="outHeight" native-name="height" mode="OUT" />
</native-struct>
<method name="requestCancel" output="/output/nothing" />
<method name="requestCancelDecode" output="/output/stub" />
</type>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,597 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Canvas">
<native-handle id="NativeCanvas">
<name>NativeCanvas</name>
<type>android.graphics.Canvas</type>
<include>CanvasGlue.h</include>
<class>SkCanvas</class>
<field>mNativeCanvas</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeCanvas"
id="Canvas" />
<marshal-info class="native-enum" id="Canvas-EdgeType">
<native-type>SkCanvas::EdgeType</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Canvas-SaveFlags">
<native-type>SkCanvas::SaveFlags</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Canvas-VertexMode">
<native-type>SkCanvas::VertexMode</native-type>
</marshal-info>
<compilation-unit name="Canvas">
<main-type partial="true" native-handle="NativeCanvas" >
<method name="clipRect(android.graphics.Rect)">
<native name="clipIRect" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="clipRect(android.graphics.RectF)">
<native name="clipRect" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="clipRect(float,float,float,float)">
<native name="clipRect" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true" />
</native>
</method>
<method name="clipRect(int,int,int,int)">
<native name="clipIRect" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true" />
</native>
</method>
<method name="drawLines(float[],int,int,android.graphics.Paint)">
<native name="drawLines" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true">
<parameter />
<parameter index="3" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="drawPoint(float,float,android.graphics.Paint)">
<native name="drawPoint" kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="2" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="drawPoints(float[],int,int,android.graphics.Paint)">
<native name="drawPoints" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true">
<parameter />
<parameter index="3" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="freeCaches()">
<native name="freeCaches" kind="STATIC">
<class>CanvasGlue</class>
</native>
</method>
<method name="getHeight()">
<native name="getHeight" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true" />
</native>
</method>
<method name="getSaveCount()">
<native name="getSaveCount" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getWidth()">
<native name="getWidth" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true" />
</native>
</method>
<method name="initRaster(int)">
<native name="create" kind="STATIC">
<class>CanvasGlue</class>
<signature>
<return-type marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap-AllowNull" />
</signature>
</native>
</method>
<method name="isOpaque()">
<native name="isOpaque" kind="PROXY">
<class>CanvasGlue</class>
<signature implicit-instance="true" />
</native>
</method>
<method name="nativeDrawBitmapMatrix(int,int,int,int)">
<native name="drawBitmapMatrix" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method
name="nativeDrawBitmapMesh(int,int,int,int,float[],int,int[],int,int)">
<native name="drawBitmapMesh" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter index="4" />
<parameter index="6" flags="ALLOW_NULL" />
<parameter index="8"
marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method
name="nativeDrawVertices(int,int,int,float[],int,float[],int,int[],int,short[],int,int,int)">
<native name="drawVertices" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="Canvas-VertexMode" />
<parameter index="3" />
<parameter index="5" flags="ALLOW_NULL" />
<parameter index="7" flags="ALLOW_NULL" />
<parameter index="9" flags="ALLOW_NULL" />
<parameter index="12" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="nativeSetDrawFilter(int,int)">
<native name="setDrawFilter" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/DrawFilter/DrawFilter-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="native_clipPath(int,int,int)">
<native name="clipPath" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter marshal="/android.graphics/Region/Region-Op" />
</signature>
</native>
</method>
<method name="native_clipRect(int,float,float,float,float,int)">
<native name="clipRectValues" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter index="5" marshal="/android.graphics/Region/Region-Op" />
</signature>
</native>
</method>
<method name="native_clipRegion(int,int,int)">
<native name="clipRegion" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Region/Region" />
<parameter marshal="/android.graphics/Region/Region-Op" />
</signature>
</native>
</method>
<method name="native_concat(int,int)">
<native name="concat" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
</signature>
</native>
</method>
<method name="native_drawARGB(int,int,int,int,int)">
<native name="drawARGB" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
</signature>
</native>
</method>
<method
name="native_drawArc(int,android.graphics.RectF,float,float,boolean,int)">
<native name="drawArc" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="5" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method
name="native_drawBitmap(int,int,android.graphics.Rect,android.graphics.Rect,int,int,int)">
<native name="drawBitmapRect" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter flags="ALLOW_NULL" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method
name="native_drawBitmap(int,int,android.graphics.Rect,android.graphics.RectF,int,int,int)">
<native name="drawBitmapRectF" native-name="drawBitmapRect"
kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter flags="ALLOW_NULL" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method name="native_drawBitmap(int,int,float,float,int,int,int,int)">
<native name="drawBitmap" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter index="4"
marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method
name="native_drawBitmap(int,int[],int,int,float,float,int,int,boolean,int)">
<native name="drawBitmapColors" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="9"
marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method name="native_drawCircle(int,float,float,float,int)">
<native name="drawCircle" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter index="4" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawColor(int,int)">
<native name="drawColor" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Color/Color" />
</signature>
</native>
</method>
<method name="native_drawColor(int,int,int)">
<native name="drawColor" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Color/Color" />
<parameter marshal="/android.graphics/Xfermode/Xfermode-Mode" />
</signature>
</native>
</method>
<method name="native_drawLine(int,float,float,float,float,int)">
<native name="drawLine" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter index="5" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawOval(int,android.graphics.RectF,int)">
<native name="drawOval" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawPaint(int,int)">
<native name="drawPaint" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawPath(int,int,int)">
<native name="drawPath" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawPicture(int,int)">
<native name="drawPicture" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Picture/Picture" mode="INSTANCE" />
</signature>
</native>
</method>
<method name="native_drawRGB(int,int,int,int)">
<native name="drawRGB" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
</signature>
</native>
</method>
<method name="native_drawRect(int,android.graphics.RectF,int)">
<native name="drawRect" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawRect(int,float,float,float,float,int)">
<native name="drawRect" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter index="5" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method
name="native_drawRoundRect(int,android.graphics.RectF,float,float,int)">
<native name="drawRoundRect" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="4" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_drawText(int,char[],int,int,float,float,int,int)">
<native name="drawTextC" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="7" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method
name="native_drawText(int,java.lang.String,int,int,float,float,int,int)">
<native name="drawTextS" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="7" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method
name="native_drawTextRun(int,char[],int,int,int,int,float,float,int,int)">
<native name="drawTextRunC" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="9" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method
name="native_drawTextRun(int,java.lang.String,int,int,int,int,float,float,int,int)">
<native name="drawTextRunS" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter index="9" marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
<method name="native_getCTM(int,int)">
<native name="getCTM" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Matrix/Matrix"
mode="OUT" />
</signature>
</native>
</method>
<method name="native_getClipBounds(int,android.graphics.Rect)">
<native name="getClipBoundsIRect" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="native_quickReject(int,android.graphics.RectF,int)">
<native name="quickReject" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter />
<parameter marshal="Canvas-EdgeType" />
</signature>
</native>
</method>
<method name="native_quickReject(int,float,float,float,float,int)">
<native name="quickReject" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter index="5" marshal="Canvas-EdgeType" />
</signature>
</native>
</method>
<method name="native_quickReject(int,int,int)">
<native name="quickReject" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter marshal="Canvas-EdgeType" />
</signature>
</native>
</method>
<method name="native_saveLayer(int,android.graphics.RectF,int,int)">
<native name="saveLayer" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
<parameter marshal="Canvas-SaveFlags" />
</signature>
</native>
</method>
<method name="native_saveLayer(int,float,float,float,float,int,int)">
<native name="saveLayerValues" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter index="5"
marshal="/android.graphics/Paint/Paint-AllowNull" />
<parameter marshal="Canvas-SaveFlags" />
</signature>
</native>
</method>
<method name="native_saveLayerAlpha(int,android.graphics.RectF,int,int)">
<native name="saveLayerAlpha" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter flags="ALLOW_NULL" />
<parameter index="3" marshal="Canvas-SaveFlags" />
</signature>
</native>
</method>
<method name="native_saveLayerAlpha(int,float,float,float,float,int,int)">
<native name="saveLayerAlphaValues" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter index="6" marshal="Canvas-SaveFlags" />
</signature>
</native>
</method>
<method name="native_setBitmap(int,int)">
<native name="setBitmap" kind="PROXY">
<class>CanvasGlue</class>
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Bitmap/Bitmap-AllowNull" />
</signature>
</native>
</method>
<method name="native_setMatrix(int,int)">
<native name="setMatrix" kind="INSTANCE">
<signature>
<parameter marshal="Canvas" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
</signature>
</native>
</method>
<method name="restore()">
<native name="restore" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="restoreToCount(int)">
<native name="restoreToCount" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="rotate(float)">
<native name="rotate" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="save()">
<native name="save" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="save(int)">
<native name="save" kind="INSTANCE">
<signature implicit-instance="true">
<parameter marshal="Canvas-SaveFlags" />
</signature>
</native>
</method>
<method name="scale(float,float)">
<native name="scale" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="skew(float,float)">
<native name="skew" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="translate(float,float)">
<native name="translate" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setBitmap">
<variable name="pointer">
<binding native-handle="/android.graphics/Bitmap/NativeBitmap" />
</variable>
</method>
<method name="setDrawFilter">
<variable name="nativeFilter">
<binding native-handle="/android.graphics/DrawFilter/NativeDrawFilter" />
</variable>
</method>
<remove-members>
<member-kind>CONSTRUCTOR</member-kind>
</remove-members>
<enum>
<filter>
<name>EdgeType</name>
<name>VertexMode</name>
</filter>
<binding reference="/android.graphics/native-int-enum" />
</enum>
<type name="CanvasFinalizer" output="/output/nothing" />
<field name="mFinalizer" output="/output/nothing" />
<method output="/output/stub">
<filter>
<name>drawPosText</name>
<name>drawTextOnPath</name>
</filter>
<modify>
<comment
text="This requires frameworks/base/core/jni/android/graphics/TextLayout.cpp." />
</modify>
</method>
<method output="/output/nothing">
<filter>
<name>native_drawPosText</name>
<name>native_drawTextOnPath</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="ColorFilter">
<native-handle id="NativeColorFilter">
<name>NativeFilter</name>
<type>android.graphics.ColorFilter</type>
<include>ColorFilterGlue.h</include>
<class>SkColorFilter</class>
<field>native_instance</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeColorFilter"
id="ColorFilter" />
<marshal-info class="native-class" native-handle="NativeColorFilter"
flags="ALLOW_NULL" id="ColorFilter-AllowNull" />
<compilation-unit name="ColorFilter">
<main-type abstract="true" native-handle="NativeColorFilter" >
<field name="nativeColorFilter">
<binding pointer="true" />
</field>
<method name="finalizer" output="/output/nothing" />
<remove-members>
<member-kind>DESTRUCTOR</member-kind>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="ColorMatrixColorFilter">
<main-type>
<native-type />
<method name="nativeColorMatrixFilter(float[])">
<native name="ColorMatrixFilter_create" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="ColorFilter" />
</signature>
</native>
</method>
<method name="nColorMatrixFilter(int,float[])">
<native name="ColorMatrixFilter_postCreate" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/ColorFilter/ColorFilter"
mode="REF" />
<parameter />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="LightingColorFilter">
<main-type>
<native-type />
<method name="native_CreateLightingFilter">
<native name="LightingFilter_create" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="ColorFilter" />
</signature>
</native>
</method>
<method name="nCreateLightingFilter(int,int,int)">
<native name="LightingFilter_postCreate" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/ColorFilter/ColorFilter"
mode="REF" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PorterDuffColorFilter">
<main-type>
<native-type />
<method name="native_CreatePorterDuffFilter">
<native name="PorterDuffFilter_create" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="ColorFilter" />
<parameter marshal="/android.graphics/Color/Color" />
<parameter marshal="/android.graphics/PorterDuff-Mode" />
</signature>
</native>
</method>
<method name="nCreatePorterDuffFilter(int,int,int)">
<native name="PorterDuffFilter_postCreate" kind="STATIC">
<class>ColorFilterGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="ColorFilter" mode="REF" />
<parameter marshal="/android.graphics/Color/Color" />
<parameter marshal="/android.graphics/PorterDuff-Mode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Color">
<marshal-info class="native-enum" id="Color">
<native-type>SkColor</native-type>
</marshal-info>
<compilation-unit name="Color">
<main-type partial="true">
<native-type />
<field>
<filter>
<name>BLACK</name>
<name>DKGRAY</name>
<name>GRAY</name>
<name>LTGRAY</name>
<name>WHITE</name>
<name>RED</name>
<name>GREEN</name>
<name>BLUE</name>
<name>YELLOW</name>
<name>CYAN</name>
<name>MAGENTA</name>
<name>TRANSPARENT</name>
</filter>
<modify>
<visibility>PUBLIC</visibility>
</modify>
</field>
<method name="parseColor(java.lang.String)" output="/output/partial" />
<method name="nativeRGBToHSV(int,int,int,float[])">
<native name="Color_RGBToHSV" kind="STATIC">
<class>ShaderGlue</class>
<include>ShaderGlue.h</include>
<signature>
<parameter index="3" mode="REF" />
</signature>
</native>
</method>
<method name="nativeHSVToColor(int,float[])">
<native name="Color_HSVToColor" kind="STATIC">
<class>ShaderGlue</class>
<include>ShaderGlue.h</include>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="DrawFilter">
<native-handle id="NativeDrawFilter">
<name>NativeDrawFilter</name>
<type>android.graphics.DrawFilter</type>
<include>DrawFilterGlue.h</include>
<class>SkDrawFilter</class>
<field>mNativeInt</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeDrawFilter"
id="DrawFilter" />
<marshal-info class="native-class" native-handle="NativeDrawFilter"
flags="ALLOW_NULL" id="DrawFilter-AllowNull" />
<compilation-unit name="DrawFilter">
<main-type abstract="true" native-handle="NativeDrawFilter" >
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PaintFlagsDrawFilter">
<main-type>
<native-type />
<method name="nativeConstructor(int,int)">
<native name="PaintFlagsDrawFilter_create" kind="STATIC">
<class>DrawFilterGlue</class>
<signature>
<return-type marshal="DrawFilter" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Drawables" output="/output/sharpen">
<compilation-unit name="GradientDrawable">
<main-type>
<type name="GradientState">
<field>
<filter>
<name>mUseLevel</name>
<name>mUseLevelForShape</name>
<name>mCenterX</name>
<name>mCenterY</name>
<name>mGradientRadius</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="StateListDrawable">
<main-type>
<type name="StateListState">
<method name="indexOfStateSet">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</method>
</type>
</main-type>
</compilation-unit>
<namespace name="shapes" output="/output/sharpen">
<compilation-unit name="Shape">
<main-type>
<method name="clone()">
<binding>
<rename>Clone</rename>
</binding>
</method>
</main-type>
</compilation-unit>
</namespace>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Interpolator">
<native-handle id="NativeInterpolator">
<name>NativeInterpolator</name>
<type>android.graphics.Interpolator</type>
<include>InterpolatorGlue.h</include>
<class>InterpolatorGlue</class>
<field>native_instance</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativeInterpolator" id="Interpolator" />
<marshal-info class="native-enum" id="InterpolatorBase-Result">
<native-type>SkInterpolatorBase::Result</native-type>
</marshal-info>
<compilation-unit name="Interpolator">
<main-type native-handle="NativeInterpolator">
<method name="nativeConstructor(int,int)">
<native name="constructor" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Interpolator" />
</signature>
</native>
</method>
<method name="nativeReset(int,int,int)">
<native name="reset" kind="INSTANCE">
<signature>
<parameter marshal="Interpolator" />
</signature>
</native>
</method>
<method name="nativeSetKeyFrame(int,int,int,float[],float[])">
<native name="setKeyFrame" kind="INSTANCE">
<signature>
<parameter marshal="Interpolator" />
<parameter index="3" />
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="nativeSetRepeatMirror(int,float,boolean)">
<native name="setRepeatMirror" kind="INSTANCE">
<signature>
<parameter marshal="Interpolator" />
</signature>
</native>
</method>
<method name="nativeTimeToValues(int,int,float[])">
<native name="timeToValues" kind="INSTANCE">
<signature>
<return-type marshal="InterpolatorBase-Result" />
<parameter marshal="Interpolator" />
<parameter index="2" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" native-handle="NativeInterpolator" />
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="MaskFilter">
<native-handle marshal="MaskFilter" id="NativeMaskFilter">
<name>NativeFilter</name>
<type>android.graphics.MaskFilter</type>
<include>MaskFilterGlue.h</include>
<class>SkMaskFilter</class>
<field>native_instance</field>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-enum" id="BlurMaskFilter-Blur">
<native-type>SkBlurMaskFilter::BlurStyle</native-type>
</marshal-info>
<marshal-info class="native-class" native-handle="NativeMaskFilter"
id="MaskFilter" />
<marshal-info class="native-class" native-handle="NativeMaskFilter"
flags="ALLOW_NULL" id="MaskFilter-AllowNull" />
<compilation-unit name="MaskFilter">
<main-type abstract="true" native-handle="NativeMaskFilter" >
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="BlurMaskFilter">
<main-type>
<native-type />
<enum name="Blur">
<binding>
<base-type>int</base-type>
<value-field>native_int</value-field>
</binding>
</enum>
<method name="nativeConstructor(float,int)">
<native name="constructor" native-name="Create" kind="STATIC">
<class>SkBlurMaskFilter</class>
<signature>
<return-type marshal="MaskFilter" />
<parameter index="1" marshal="BlurMaskFilter-Blur" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="EmbossMaskFilter">
<main-type>
<native-type />
<method name="nativeConstructor(float[],float,float,float)">
<native name="constructor" native-name="Emboss_create" kind="STATIC">
<class>MaskFilterGlue</class>
<signature>
<return-type marshal="MaskFilter" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="TableMaskFilter">
<main-type>
<native-type />
<method name="nativeNewTable(byte[])">
<native name="newTable" native-name="Table_create" kind="STATIC">
<class>MaskFilterGlue</class>
<signature>
<return-type marshal="MaskFilter" />
</signature>
</native>
</method>
<method name="nativeNewClip(int,int)">
<native name="newClip" native-name="Table_createClip" kind="STATIC">
<class>MaskFilterGlue</class>
<signature>
<return-type marshal="MaskFilter" />
</signature>
</native>
</method>
<method name="nativeNewGamma(float)">
<native name="newGamma" native-name="Table_createGamma" kind="STATIC">
<class>MaskFilterGlue</class>
<signature>
<return-type marshal="MaskFilter" />
</signature>
</native>
</method>
<constructor name="TableMaskFilter(int)">
<parameter>
<binding native-handle="NativeMaskFilter" />
</parameter>
</constructor>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,329 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Matrix">
<native-handle id="NativeMatrix">
<name>NativeMatrix</name>
<type>android.graphics.Matrix</type>
<include>MatrixGlue.h</include>
<class>MatrixGlue</class>
<field>native_instance</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativeMatrix"
id="Matrix" />
<marshal-info class="native-class" native-handle="NativeMatrix"
flags="ALLOW_NULL" id="Matrix-AllowNull" />
<marshal-info class="native-enum" id="Matrix-ScaleToFit">
<native-type>SkMatrix::ScaleToFit</native-type>
</marshal-info>
<compilation-unit name="Matrix">
<main-type native-handle="NativeMatrix" >
<enum name="ScaleToFit">
<binding reference="/android.graphics/native-int-enum" />
</enum>
<method name="ni">
<binding native-handle="NativeMatrix" />
</method>
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="native_create(int)">
<native name="constructor" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Matrix" />
<parameter marshal="Matrix-AllowNull" />
</signature>
</native>
</method>
<method name="native_equals(int,int)">
<native name="equals" kind="STATIC">
<class>MatrixGlue</class>
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_getValues(int,float[])">
<native name="getValues" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="native_invert(int,int)">
<native name="invert" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" mode="REF" />
</signature>
</native>
</method>
<method name="native_isIdentity(int)">
<native name="isIdentity" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_mapPoints(int,float[],int,float[],int,int,boolean)">
<native name="mapPoints" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="native_mapRadius(int,float)">
<native name="mapRadius" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method
name="native_mapRect(int,android.graphics.RectF,android.graphics.RectF)">
<native name="mapRect" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter mode="REF" />
<parameter />
</signature>
</native>
</method>
<method name="native_postConcat(int,int)">
<native name="postConcat" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postRotate(int,float)">
<native name="postRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postRotate(int,float,float,float)">
<native name="postRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postScale(int,float,float)">
<native name="postScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postScale(int,float,float,float,float)">
<native name="postScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postSkew(int,float,float)">
<native name="postSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postSkew(int,float,float,float,float)">
<native name="postSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_postTranslate(int,float,float)">
<native name="postTranslate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preConcat(int,int)">
<native name="preConcat" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preRotate(int,float)">
<native name="preRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preRotate(int,float,float,float)">
<native name="preRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preScale(int,float,float)">
<native name="preScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preScale(int,float,float,float,float)">
<native name="preScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preSkew(int,float,float)">
<native name="preSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preSkew(int,float,float,float,float)">
<native name="preSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_preTranslate(int,float,float)">
<native name="preTranslate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_rectStaysRect(int)">
<native name="rectStaysRect" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_reset(int)">
<native name="reset" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_set(int,int)">
<native name="set" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setConcat(int,int,int)">
<native name="setConcat" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setPolyToPoly(int,float[],int,float[],int,int)">
<native name="setPolyToPoly" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method
name="native_setRectToRect(int,android.graphics.RectF,android.graphics.RectF,int)">
<native name="setRectToRect" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
<parameter />
<parameter />
<parameter marshal="Matrix-ScaleToFit" />
</signature>
</native>
</method>
<method name="native_setRotate(int,float)">
<native name="setRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setRotate(int,float,float,float)">
<native name="setRotate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setScale(int,float,float)">
<native name="setScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setScale(int,float,float,float,float)">
<native name="setScale" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setSinCos(int,float,float)">
<native name="setSinCos" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setSinCos(int,float,float,float,float)">
<native name="setSinCos" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setSkew(int,float,float)">
<native name="setSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setSkew(int,float,float,float,float)">
<native name="setSkew" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setTranslate(int,float,float)">
<native name="setTranslate" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
<method name="native_setValues(int,float[])">
<native name="setValues" kind="INSTANCE">
<signature>
<parameter marshal="Matrix" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="NinePath">
<compilation-unit name="NinePatch">
<main-type>
<native-type />
<method name="getTransparentRegion(android.graphics.Rect)">
<variable name="r">
<binding native-handle="/android.graphics/Region/NativeRegion" />
</variable>
</method>
<method name="isNinePatchChunk(byte[])">
<native kind="STATIC">
<class>NinePatchGlue</class>
<include>NinePatchGlue.h</include>
<signature>
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="validateNinePatchChunk(int,byte[])">
<native kind="STATIC">
<class>NinePatchGlue</class>
<include>NinePatchGlue.h</include>
<signature>
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter />
</signature>
</native>
</method>
<method
name="nativeGetTransparentRegion(int,byte[],android.graphics.Rect)">
<native name="getTransparentRegion" kind="STATIC">
<class>NinePatchGlue</class>
<include>NinePatchGlue.h</include>
<signature>
<return-type marshal="/android.graphics/Region/Region" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter />
<parameter />
</signature>
</native>
</method>
<method
name="nativeDraw(int,android.graphics.RectF,int,byte[],int,int,int)">
<native name="drawF" native-name="draw" kind="PROXY">
<class>NinePatchGlue</class>
<include>NinePatchGlue.h</include>
<signature>
<parameter marshal="/android.graphics/Canvas/Canvas" />
<parameter mode="REF" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
<method
name="nativeDraw(int,android.graphics.Rect,int,byte[],int,int,int)">
<native name="drawI" native-name="draw" kind="PROXY">
<class>NinePatchGlue</class>
<include>NinePatchGlue.h</include>
<signature>
<parameter marshal="/android.graphics/Canvas/Canvas" />
<parameter mode="REF" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter />
<parameter marshal="/android.graphics/Paint/Paint-AllowNull" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,580 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Paint">
<native-handle id="NativePaint">
<name>NativePaint</name>
<type>android.graphics.Paint</type>
<include>PaintGlue.h</include>
<class>PaintGlue</class>
<field>mNativePaint</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativePaint"
id="Paint" />
<marshal-info class="native-class" native-handle="NativePaint"
flags="ALLOW_NULL" id="Paint-AllowNull" />
<marshal-info class="native-enum" id="Paint-Style">
<native-type>SkPaint::Style</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Paint-Cap">
<native-type>SkPaint::Cap</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Paint-Join">
<native-type>SkPaint::Join</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Paint-Align">
<native-type>SkPaint::Align</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Paint-Hinting">
<native-type>SkPaint::Hinting</native-type>
</marshal-info>
<compilation-unit name="Paint">
<main-type native-handle="NativePaint">
<enum>
<filter>
<name>Style</name>
<name>Cap</name>
<name>Join</name>
<name>Align</name>
</filter>
<binding reference="/android.graphics/native-int-enum" />
</enum>
<type name="FontMetrics">
<native-struct native-type="SkPaint::FontMetrics">
<member name="top" native-name="fTop" />
<member name="ascent" native-name="fAscent" />
<member name="descent" native-name="fDescent" />
<member name="bottom" native-name="fBottom" />
<member name="leading" native-name="fLeading" />
</native-struct>
</type>
<type name="FontMetricsInt">
<native-struct native-type="PaintGlue::FontMetricsInt">
<member name="top" native-name="top" />
<member name="ascent" native-name="ascent" />
<member name="descent" native-name="descent" />
<member name="bottom" native-name="bottom" />
<member name="leading" native-name="leading" />
</native-struct>
</type>
<method name="ascent()">
<native name="ascent" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="descent()">
<native name="descent" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="getAlpha()">
<native name="getAlpha" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getColor()">
<native name="getColor" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getFlags()">
<native name="getFlags" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getFontMetrics(android.graphics.Paint.FontMetrics)">
<native name="getFontMetrics" kind="INSTANCE">
<signature implicit-instance="true">
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="getFontMetricsInt(android.graphics.Paint.FontMetricsInt)">
<native name="getFontMetricsInt" kind="INSTANCE">
<signature implicit-instance="true">
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="getHinting()">
<native name="getHinting" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getStrokeMiter()">
<native name="getStrokeMiter" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getStrokeWidth()">
<native name="getStrokeWidth" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getTextScaleX()">
<native name="getTextScaleX" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getTextSize()">
<native name="getTextSize" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getTextSkewX()">
<native name="getTextSkewX" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="nSetShadowLayer(float,float,float,int)">
<native name="setShadowLayer" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method
name="nativeGetCharArrayBounds(int,char[],int,int,android.graphics.Rect)">
<native name="getCharArrayBounds" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="4" mode="OUT" />
</signature>
</native>
</method>
<method
name="nativeGetStringBounds(int,java.lang.String,int,int,android.graphics.Rect)">
<native name="getStringBounds" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="4" mode="OUT" />
</signature>
</native>
</method>
<method name="native_breakText(char[],int,int,float,float[])">
<native name="breakTextC" native-name="breakTextC" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
<parameter index="4" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="native_breakText(java.lang.String,boolean,float,float[])">
<native name="breakTextS" native-name="breakTextS" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
<parameter index="3" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="native_getFillPath(int,int,int)">
<native name="getFillPath" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter marshal="/android.graphics/Path/Path" mode="OUT" />
</signature>
</native>
</method>
<method
name="native_getFontMetrics(int,android.graphics.Paint.FontMetrics)">
<native name="getFontMetrics" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="native_getStrokeCap(int)">
<native name="getStrokeCap" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="native_getStrokeJoin(int)">
<native name="getStrokeJoin" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="native_getStyle(int)">
<native name="getStyle" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="native_getTextAlign(int)">
<native name="getTextAlign" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method output="/output/stub">
<filter>
<name>getTextGlyphs</name>
</filter>
<modify>
<comment
text="This requires frameworks/base/core/jni/android/graphics/TextLayout.cpp." />
</modify>
</method>
<method output="/output/nothing">
<filter>
<name>native_getTextGlyphs</name>
</filter>
</method>
<method
name="native_getTextRunAdvances(int,char[],int,int,int,int,int,float[],int,int)">
<native name="getTextRunAdvancesC" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="7" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method
name="native_getTextRunAdvances(int,java.lang.String,int,int,int,int,int,float[],int,int)">
<native name="getTextRunAdvancesS" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="7" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="native_getTextPath(int,int,char[],int,int,float,float,int)">
<native name="getTextPathC" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter index="2" />
<parameter index="7" marshal="/android.graphics/Path/Path"
mode="OUT" />
</signature>
</native>
</method>
<method
name="native_getTextPath(int,int,java.lang.String,int,int,float,float,int)">
<native name="getTextPathS" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter index="2" />
<parameter index="7" marshal="/android.graphics/Path/Path"
mode="OUT" />
</signature>
</native>
</method>
<method name="native_getTextWidths(int,char[],int,int,float[])"
output="/output/stub">
<native name="getTextWidthsC" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="4" mode="REF" />
</signature>
</native>
</method>
<method name="native_getTextWidths(int,java.lang.String,int,int,float[])"
output="/output/stub">
<native name="getTextWidthsS" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
<parameter index="4" mode="REF" />
</signature>
</native>
</method>
<method name="native_getTextRunCursor(int,char[],int,int,int,int,int)">
<native name="getTextRunCursorC" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
</signature>
</native>
</method>
<method
name="native_getTextRunCursor(int,java.lang.String,int,int,int,int,int)">
<native name="getTextRunCursorS" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter />
</signature>
</native>
</method>
<method name="native_init()">
<native name="init" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Paint" />
</signature>
</native>
</method>
<method name="native_initWithPaint(int)">
<native name="initWithPaint" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Paint" />
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="native_measureText(char[],int,int)">
<native name="measureTextC" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="native_measureText(java.lang.String)">
<native name="measureTextS2" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="native_measureText(java.lang.String,int,int)">
<native name="measureTextS" kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="native_reset(int)">
<native name="reset" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="native_set(int,int)">
<native name="set" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="Paint" />
</signature>
</native>
</method>
<method name="setColorFilter(android.graphics.ColorFilter)">
<variable name="filterNative">
<binding native-handle="/android.graphics/ColorFilter/NativeColorFilter" />
</variable>
</method>
<method name="native_setColorFilter(int,int)">
<native name="setColorFilter" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/ColorFilter/ColorFilter-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setMaskFilter(android.graphics.MaskFilter)">
<variable name="maskfilterNative">
<binding native-handle="/android.graphics/MaskFilter/NativeMaskFilter" />
</variable>
</method>
<method name="native_setMaskFilter(int,int)">
<native name="setMaskFilter" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/MaskFilter/MaskFilter-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setPathEffect(android.graphics.PathEffect)">
<variable name="effectNative">
<binding native-handle="/android.graphics/PathEffect/NativePathEffect" />
</variable>
</method>
<method name="native_setPathEffect(int,int)">
<native name="setPathEffect" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/PathEffect/PathEffect-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setRasterizer(android.graphics.Rasterizer)">
<variable name="rasterizerNative">
<binding native-handle="/android.graphics/Rasterizer/NativeRasterizer" />
</variable>
</method>
<method name="native_setRasterizer(int,int)">
<native name="setRasterizer" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/Rasterizer/Rasterizer-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setShader(android.graphics.Shader)">
<variable name="shaderNative">
<binding native-handle="/android.graphics/Shader/NativeShader" />
</variable>
</method>
<method name="native_setShader(int,int)">
<native name="setShader" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/Shader/Shader-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="native_setStrokeCap(int,int)">
<native name="setStrokeCap" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="Paint-Cap" />
</signature>
</native>
</method>
<method name="native_setStrokeJoin(int,int)">
<native name="setStrokeJoin" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="Paint-Join" />
</signature>
</native>
</method>
<method name="native_setStyle(int,int)">
<native name="setStyle" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="Paint-Style" />
</signature>
</native>
</method>
<method name="native_setTextAlign(int,int)">
<native name="setTextAlign" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="Paint-Align" />
</signature>
</native>
</method>
<method name="setTypeface(android.graphics.Typeface)">
<variable name="typefaceNative">
<binding native-handle="/android.graphics/Typeface/NativeTypeface" />
</variable>
</method>
<method name="native_setTypeface(int,int)">
<native name="setTypeface" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/Typeface/Typeface-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setXfermode(android.graphics.Xfermode)">
<variable name="xfermodeNative">
<binding native-handle="/android.graphics/Xfermode/NativeXfermode" />
</variable>
</method>
<method name="native_setXfermode(int,int)">
<native name="setXfermode" return-void="true" kind="INSTANCE">
<signature>
<parameter marshal="Paint" />
<parameter marshal="/android.graphics/Xfermode/Xfermode-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="setAlpha(int)">
<native name="setAlpha" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setAntiAlias(boolean)">
<native name="setAntiAlias" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setColor(int)">
<native name="setColor" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setDither(boolean)">
<native name="setDither" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setFakeBoldText(boolean)">
<native name="setFakeBoldText" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setFilterBitmap(boolean)">
<native name="setFilterBitmap" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setFlags(int)">
<native name="setFlags" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setHinting(int)">
<native name="setHinting" kind="INSTANCE">
<signature implicit-instance="true">
<parameter marshal="Paint-Hinting" />
</signature>
</native>
</method>
<method name="setLinearText(boolean)">
<native name="setLinearText" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setStrikeThruText(boolean)">
<native name="setStrikeThruText" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setStrokeMiter(float)">
<native name="setStrokeMiter" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setStrokeWidth(float)">
<native name="setStrokeWidth" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setSubpixelText(boolean)">
<native name="setSubpixelText" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setTextScaleX(float)">
<native name="setTextScaleX" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setTextSize(float)">
<native name="setTextSize" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setTextSkewX(float)">
<native name="setTextSkewX" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="setUnderlineText(boolean)">
<native name="setUnderlineText" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="PathEffect">
<native-handle marshal="PathEffect" id="NativePathEffect">
<name>NativePathEffect</name>
<type>android.graphics.PathEffect</type>
<include>SkPathEffect.h</include>
<class>SkPathEffect</class>
<field>native_instance</field>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativePathEffect"
id="PathEffect" />
<marshal-info class="native-class" native-handle="NativePathEffect"
flags="ALLOW_NULL" id="PathEffect-AllowNull" />
<native-handle parent="NativePathEffect" id="NativeComposePathEffect">
<name>NativePathEffect</name>
<type>android.graphics.ComposePathEffect</type>
<include>SkPathEffect.h</include>
<class>SkComposePathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativeComposePathEffect"
id="ComposePathEffect" />
<native-handle parent="NativePathEffect" id="NativeCornerPathEffect">
<name>NativePathEffect</name>
<type>android.graphics.CornerPathEffect</type>
<include>SkCornerPathEffect.h</include>
<class>SkCornerPathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativeCornerPathEffect"
id="CornerPathEffect" />
<native-handle parent="NativePathEffect" id="NativeDashPathEffect">
<name>NativePathEffect</name>
<type>android.graphics.DashPathEffect</type>
<include>PathEffectGlue.h</include>
<class>SkDashPathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativeDashPathEffect"
id="DashPathEffect" />
<native-handle parent="NativePathEffect" id="NativeDiscretePathEffect">
<name>NativePathEffect</name>
<type>android.graphics.DiscretePathEffect</type>
<include>SkDiscretePathEffect.h</include>
<class>SkDiscretePathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativeDiscretePathEffect"
id="DiscretePathEffect" />
<marshal-info class="native-enum" id="PathDashPathEffect-Style">
<native-type>SkPath1DPathEffect::Style</native-type>
</marshal-info>
<native-handle parent="NativePathEffect" id="NativePathDashPathEffect">
<name>NativePathEffect</name>
<type>android.graphics.PathDashPathEffect</type>
<include>Sk1DPathEffect.h</include>
<class>SkPath1DPathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativePathDashPathEffect"
id="PathDashPathEffect" />
<native-handle parent="NativePathEffect" id="NativeSumPathEffect">
<name>NativePathEffect</name>
<type>android.graphics.SumPathEffect</type>
<include>SkPathEffect.h</include>
<class>SkSumPathEffect</class>
</native-handle>
<marshal-info class="native-class" native-handle="NativeSumPathEffect"
id="SumPathEffect" />
<compilation-unit name="PathEffect">
<main-type abstract="true" native-handle="NativePathEffect" >
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="ComposePathEffect">
<main-type native-handle="NativeComposePathEffect" >
<method name="nativeCreate(int,int)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="ComposePathEffect" />
<parameter marshal="/android.graphics/PathEffect/PathEffect"
mode="REF" />
<parameter marshal="/android.graphics/PathEffect/PathEffect"
mode="REF" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="CornerPathEffect">
<main-type native-handle="NativeCornerPathEffect" >
<method name="nativeCreate(float)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="CornerPathEffect" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="DashPathEffect">
<main-type native-handle="NativeDashPathEffect" >
<method name="nativeCreate(float[],float)">
<native name="Dash_constructor" kind="STATIC">
<class>PathEffectGlue</class>
<signature>
<return-type marshal="DashPathEffect" />
<parameter />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="DiscretePathEffect">
<main-type native-handle="NativeDiscretePathEffect" >
<method name="nativeCreate(float,float)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="DiscretePathEffect" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PathDashPathEffect">
<main-type native-handle="NativePathDashPathEffect" >
<enum name="Style">
<binding>
<base-type>int</base-type>
<value-field>native_style</value-field>
</binding>
</enum>
<method name="nativeCreate(int,float,float,int)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="PathDashPathEffect" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter index="3" marshal="PathDashPathEffect-Style" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="SumPathEffect">
<main-type native-handle="NativeSumPathEffect" >
<method name="nativeCreate(int,int)">
<native name="create" kind="CONSTRUCTOR">
<signature>
<return-type marshal="SumPathEffect" />
<parameter marshal="/android.graphics/PathEffect/PathEffect"
mode="REF" />
<parameter marshal="/android.graphics/PathEffect/PathEffect"
mode="REF" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="PathMeasure">
<native-handle id="NativePathMeasure">
<name>NativePathMeasure</name>
<type>android.graphics.PathMeasure</type>
<include>PathMeasureGlue.h</include>
<class>PathMeasureGlue</class>
<field>native_instance</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativePathMeasure" id="PathMeasure" />
<marshal-info class="native-enum" id="PathMeasure-MatrixFlags">
<native-type>SkPathMeasure::MatrixFlags</native-type>
</marshal-info>
<compilation-unit name="PathMeasure">
<main-type native-handle="NativePathMeasure" >
<method name="native_create(int,boolean)">
<native name="create" kind="STATIC">
<class>PathMeasureGlue</class>
<signature>
<return-type marshal="PathMeasure" />
<parameter marshal="/android.graphics/Path/Path-AllowNull" />
</signature>
</native>
</method>
<method name="native_setPath(int,int,boolean)">
<native name="setPath" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
<parameter marshal="/android.graphics/Path/Path-AllowNull" />
</signature>
</native>
</method>
<method name="native_getLength(int)">
<native name="getLength" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
</signature>
</native>
</method>
<method name="native_getPosTan(int,float,float[],float[])">
<native name="getPosTan" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
<parameter index="2" mode="REF" flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="native_getMatrix(int,float,int,int)">
<native name="getMatrix" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
<parameter index="2" marshal="/android.graphics/Matrix/Matrix" mode="REF" />
<parameter marshal="PathMeasure-MatrixFlags" />
</signature>
</native>
</method>
<method name="native_getSegment(int,float,float,int,boolean)">
<native name="getSegment" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
<parameter index="3" marshal="/android.graphics/Path/Path" mode="REF" />
</signature>
</native>
</method>
<method name="native_isClosed(int)">
<native name="isClosed" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
</signature>
</native>
</method>
<method name="native_nextContour(int)">
<native name="isClosed" kind="INSTANCE">
<signature>
<parameter marshal="PathMeasure" />
</signature>
</native>
</method>
<method name="native_destroy(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,331 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Path">
<native-handle id="NativePath">
<name>NativePath</name>
<type>android.graphics.Path</type>
<include>PathGlue.h</include>
<class>PathGlue</class>
<field>mNativePath</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativePath"
id="Path" />
<marshal-info class="native-class" native-handle="NativePath"
flags="ALLOW_NULL" id="Path-AllowNull" />
<marshal-info class="native-enum" id="Path-FillType">
<native-type>SkPath::FillType</native-type>
</marshal-info>
<marshal-info class="native-enum" id="Path-Direction">
<native-type>SkPath::Direction</native-type>
</marshal-info>
<compilation-unit name="Path">
<main-type native-handle="NativePath" >
<enum name="Direction">
<binding reference="/android.graphics/nullable-native-int-enum" />
</enum>
<enum name="FillType">
<binding reference="/android.graphics/native-int-enum" />
</enum>
<constructor name="Path(android.graphics.Path)">
<variable name="valNative">
<binding native-handle="NativePath" />
</variable>
</constructor>
<method name="offset(float,float,android.graphics.Path)">
<variable name="dstNative">
<binding native-handle="NativePath" />
</variable>
</method>
<method name="transform(android.graphics.Matrix,android.graphics.Path)">
<variable name="dstNative">
<binding native-handle="NativePath" />
</variable>
</method>
<method name="ni">
<binding native-handle="NativePath" />
</method>
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="init1()">
<native name="init1" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Path" />
</signature>
</native>
</method>
<method name="init2(int)">
<native name="init2" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Path" />
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_addArc(int,android.graphics.RectF,float,float)">
<native name="addArc" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
</signature>
</native>
</method>
<method name="native_addCircle(int,float,float,float,int)">
<native name="addCircle" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter index="4" marshal="Path-Direction" />
</signature>
</native>
</method>
<method name="native_addOval(int,android.graphics.RectF,int)">
<native name="addOval" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
<parameter marshal="Path-Direction" />
</signature>
</native>
</method>
<method name="native_addPath(int,int)">
<native name="addPath" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_addPath(int,int,float,float)">
<native name="addPath" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_addPath(int,int,int)">
<native name="addPath" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="Path" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
</signature>
</native>
</method>
<method name="native_addRect(int,android.graphics.RectF,int)">
<native name="addRect" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
<parameter marshal="Path-Direction" />
</signature>
</native>
</method>
<method name="native_addRect(int,float,float,float,float,int)">
<native name="addRect" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter index="5" marshal="Path-Direction" />
</signature>
</native>
</method>
<method
name="native_addRoundRect(int,android.graphics.RectF,float,float,int)">
<native name="addRoundRect" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
<parameter index="4" marshal="Path-Direction" />
</signature>
</native>
</method>
<method name="native_addRoundRect(int,android.graphics.RectF,float[],int)">
<native name="addRoundRect" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
<parameter index="3" marshal="Path-Direction" />
</signature>
</native>
</method>
<method
name="native_arcTo(int,android.graphics.RectF,float,float,boolean)">
<native name="arcTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter />
</signature>
</native>
</method>
<method name="native_close(int)">
<native name="close" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_computeBounds(int,android.graphics.RectF)">
<native name="getBounds" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="native_cubicTo(int,float,float,float,float,float,float)">
<native name="cubicTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_getFillType(int)">
<native name="getFillType" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_incReserve(int,int)">
<native name="incReserve" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_isEmpty(int)">
<native name="isEmpty" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_isRect(int,android.graphics.RectF)">
<native name="isRect" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="native_lineTo(int,float,float)">
<native name="lineTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_moveTo(int,float,float)">
<native name="moveTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_offset(int,float,float)">
<native name="offset" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_offset(int,float,float,int)">
<native name="offset" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter index="3" marshal="Path" mode="OUT" />
</signature>
</native>
</method>
<method name="native_quadTo(int,float,float,float,float)">
<native name="quadTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_rCubicTo(int,float,float,float,float,float,float)">
<native name="rCubicTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_rLineTo(int,float,float)">
<native name="rLineTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_rMoveTo(int,float,float)">
<native name="rMoveTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_rQuadTo(int,float,float,float,float)">
<native name="rQuadTo" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_reset(int)">
<native name="reset" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_rewind(int)">
<native name="rewind" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_set(int,int)">
<native name="set" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_setFillType(int,int)">
<native name="setFillType" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="Path-FillType" />
</signature>
</native>
</method>
<method name="native_setLastPoint(int,float,float)">
<native name="setLastPt" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
</signature>
</native>
</method>
<method name="native_transform(int,int)">
<native name="transform" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
</signature>
</native>
</method>
<method name="native_transform(int,int,int)">
<native name="transform" kind="INSTANCE">
<signature>
<parameter marshal="Path" />
<parameter marshal="/android.graphics/Matrix/Matrix" />
<parameter marshal="Path" mode="OUT" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Picture">
<native-handle id="NativePicture">
<name>NativePicture</name>
<type>android.graphics.Picture</type>
<include>PictureGlue.h</include>
<class>PictureGlue</class>
<field>mNativePicture</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativePicture"
id="Picture" />
<marshal-info class="native-class" native-handle="NativePicture"
flags="ALLOW_NULL" id="Picture-AllowNull" />
<compilation-unit name="Picture">
<main-type native-handle="NativePicture" >
<method name="beginRecording(int,int)">
<variable name="ni">
<binding native-handle="/android.graphics/Canvas/NativeCanvas" />
</variable>
</method>
<method name="getWidth()">
<native name="width" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getHeight()">
<native name="height" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="nativeConstructor(int)">
<native name="create" kind="STATIC">
<class>PictureGlue</class>
<signature>
<return-type marshal="Picture" />
<parameter marshal="Picture-AllowNull" />
</signature>
</native>
</method>
<method name="nativeDraw(int,int)">
<native name="draw" kind="STATIC">
<class>PictureGlue</class>
<signature>
<parameter marshal="/android.graphics/Canvas/Canvas"
mode="REF" />
<parameter marshal="Picture" mode="REF" />
</signature>
</native>
</method>
<method name="nativeBeginRecording(int,int,int)">
<native name="beginRecording" kind="INSTANCE">
<signature>
<return-type marshal="/android.graphics/Canvas/Canvas" />
<parameter marshal="Picture" />
</signature>
</native>
</method>
<method name="nativeEndRecording(int)">
<native name="endRecording" kind="INSTANCE">
<signature>
<parameter marshal="Picture" />
</signature>
</native>
</method>
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
<method output="/output/stub">
<filter>
<name>createFromStream</name>
<name>writeToStream</name>
</filter>
<modify>
<comment text="java.io has not yet been ported." />
</modify>
</method>
<method output="/output/nothing">
<filter>
<name>nativeCreateFromStream</name>
<name>nativeWriteToStream</name>
</filter>
</method>
<method name="ni">
<binding native-handle="NativePicture" />
</method>
<constructor name="Picture(int)">
<parameter>
<binding native-handle="NativePicture" />
</parameter>
</constructor>
<type name="RecordingCanvas">
<constructor>
<parameter index="1">
<binding native-handle="/android.graphics/Canvas/NativeCanvas" />
</parameter>
</constructor>
</type>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Rasterizer">
<native-handle id="NativeRasterizer">
<name>NativeRasterizer</name>
<type>android.graphics.Rasterizer</type>
<include>RasterizerGlue.h</include>
<class>SkRasterizer</class>
<field>native_instance</field>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeRasterizer"
id="Rasterizer" />
<marshal-info class="native-class" native-handle="NativeRasterizer"
flags="ALLOW_NULL" id="Rasterizer-AllowNull" />
<compilation-unit name="Rasterizer">
<main-type abstract="true" native-handle="NativeRasterizer" >
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="LayerRasterizer">
<main-type>
<native-type />
<method name="nativeConstructor()">
<native name="LayerRasterizer_create" kind="STATIC">
<class>RasterizerGlue</class>
<signature>
<return-type marshal="Rasterizer" />
</signature>
</native>
</method>
<method name="nativeAddLayer(int,int,float,float)">
<native name="LayerRasterizer_addLayer" kind="STATIC">
<class>RasterizerGlue</class>
<signature>
<parameter marshal="Rasterizer" mode="REF" />
<parameter marshal="/android.graphics/Paint/Paint" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Rect">
<compilation-unit name="Rect">
<main-type>
<native-struct native-type="SkIRect">
<member name="left" native-name="fLeft" />
<member name="top" native-name="fTop" />
<member name="right" native-name="fRight" />
<member name="bottom" native-name="fBottom" />
</native-struct>
<binding />
<field name="FLATTENED_PATTERN" output="/output/nothing" />
<method name="unflattenFromString" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit name="RectF">
<main-type>
<native-struct native-type="SkRect">
<member name="left" native-name="fLeft" />
<member name="top" native-name="fTop" />
<member name="right" native-name="fRight" />
<member name="bottom" native-name="fBottom" />
</native-struct>
<binding />
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Region">
<native-handle id="NativeRegion">
<name>NativeRegion</name>
<type>android.graphics.Region</type>
<include>RegionGlue.h</include>
<class>RegionGlue</class>
<field>mNativeRegion</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativeRegion"
id="Region" />
<marshal-info class="native-enum" id="Region-Op">
<native-type>SkRegion::Op</native-type>
</marshal-info>
<native-handle id="NativeRegionIterator">
<name>NativeRegionIterator</name>
<type>android.graphics.RegionIterator</type>
<include>RegionGlue.h</include>
<class>RegionIteratorGlue</class>
<field>mNativeIter</field>
<property>nativeInstance</property>
</native-handle>
<marshal-info class="native-class" native-handle="NativeRegionIterator"
id="RegionIterator" />
<compilation-unit name="Region">
<main-type partial="true" native-handle="NativeRegion" >
<enum name="Op">
<binding reference="/android.graphics/native-int-enum" />
</enum>
<constructor name="Region(int)">
<parameter>
<binding native-handle="NativeRegion" />
</parameter>
</constructor>
<constructor name="Region(int,int)">
<parameter>
<binding native-handle="NativeRegion" />
</parameter>
<parameter>
<binding native-handle="NativeRegion" />
</parameter>
</constructor>
<method name="ni">
<binding native-handle="NativeRegion" />
</method>
<anonymous-class output="/output/nothing" />
<method name="contains(int,int)">
<native name="contains" kind="INSTANCE">
<signature implicit-instance="true">
</signature>
</native>
</method>
<method name="isComplex()">
<native name="isComplex" kind="INSTANCE">
<signature implicit-instance="true">
</signature>
</native>
</method>
<method name="isEmpty()">
<native name="isEmpty" kind="INSTANCE">
<signature implicit-instance="true">
</signature>
</native>
</method>
<method name="isRect()">
<native name="isRect" kind="INSTANCE">
<signature implicit-instance="true">
</signature>
</native>
</method>
<method name="nativeConstructor()">
<native name="constructor" kind="CONSTRUCTOR">
<signature>
<return-type marshal="Region" />
</signature>
</native>
</method>
<method name="nativeCreateFromParcel(android.os.Parcel)"
output="/output/nothing" />
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="nativeEquals(int,int)">
<native name="equals" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="nativeGetBoundaryPath(int,int)">
<native name="getBoundaryPath" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter marshal="/android.graphics/Path/Path" mode="OUT" />
</signature>
</native>
</method>
<method name="nativeGetBounds(int,android.graphics.Rect)">
<native name="getBounds" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="nativeOp(int,android.graphics.Rect,int,int)">
<native name="rectOp" native-name="op" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter />
<parameter marshal="Region" />
<parameter index="3" marshal="Region-Op" />
</signature>
</native>
</method>
<method name="nativeOp(int,int,int,int)">
<native name="op" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter marshal="Region" />
<parameter marshal="Region" />
<parameter marshal="Region-Op" />
</signature>
</native>
</method>
<method name="nativeOp(int,int,int,int,int,int)">
<native name="recOp" native-name="op" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter index="5" marshal="Region-Op" />
</signature>
</native>
</method>
<method name="nativeSetPath(int,int,int)">
<native name="setPath" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter marshal="/android.graphics/Path/Path" />
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="nativeSetRect(int,int,int,int,int)">
<native name="setRect" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="nativeSetRegion(int,int)">
<native name="setRegion" kind="INSTANCE">
<signature>
<parameter marshal="Region" />
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="nativeToString(int)" output="/output/nothing" />
<method name="toString" output="/output/partial" />
<method name="writeToParcel" output="/output/stub" />
<method name="nativeWriteToParcel" output="/output/nothing" />
<method name="quickContains(int,int,int,int)">
<native name="quickContains" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="quickReject(android.graphics.Region)">
<native name="quickReject" kind="INSTANCE">
<signature implicit-instance="true">
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="quickReject(int,int,int,int)">
<native name="quickRejectRect" kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="scale(float,android.graphics.Region)">
<native name="scale" kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="1" marshal="Region" mode="OUT" />
</signature>
</native>
</method>
<method name="translate(int,int,android.graphics.Region)">
<native name="translate" kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="2" marshal="Region" mode="OUT" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="RegionIterator">
<main-type native-handle="NativeRegionIterator" >
<method name="nativeConstructor(int)">
<native name="constructor" kind="CONSTRUCTOR">
<signature>
<return-type marshal="RegionIterator" />
<parameter marshal="Region" />
</signature>
</native>
</method>
<method name="nativeNext(int,android.graphics.Rect)">
<native name="next" kind="INSTANCE">
<signature>
<parameter marshal="RegionIterator" />
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="nativeDestructor(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,284 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Shader">
<native-handle id="NativeShader">
<name>NativeShader</name>
<type>android.graphics.Shader</type>
<include>ShaderGlue.h</include>
<class>SkShader</class>
<field>native_instance</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeShader"
id="Shader" />
<marshal-info class="native-class" native-handle="NativeShader"
flags="ALLOW_NULL" id="Shader-AllowNull" />
<marshal-info class="native-enum" id="Shader-TileMode">
<native-type>SkShader::TileMode</native-type>
</marshal-info>
<compilation-unit name="Shader">
<main-type abstract="true" native-handle="NativeShader" >
<field name="native_shader">
<binding pointer="true" />
</field>
<method name="nativeDestructor(int,int)" output="/output/nothing" />
<method name="nativeSetLocalMatrix(int,int,int)">
<native name="setLocalMatrix" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<parameter marshal="/android.graphics/Shader/Shader-AllowNull" mode="REF" />
<parameter mode="REMOVE" />
<parameter marshal="/android.graphics/Matrix/Matrix-AllowNull" />
</signature>
</native>
</method>
<remove-members>
<member-kind>DESTRUCTOR</member-kind>
</remove-members>
<enum name="TileMode">
<binding reference="/android.graphics/nullable-native-int-enum" />
</enum>
</main-type>
</compilation-unit>
<compilation-unit name="BitmapShader">
<main-type>
<native-type />
<constructor>
<variable name="b">
<binding native-handle="/android.graphics/Bitmap/NativeBitmap" />
</variable>
</constructor>
<method name="nativeCreate(int,int,int)">
<native name="BitmapShader_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativePostCreate(int,int,int,int)">
<native name="BitmapShader_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/android.graphics/Bitmap/Bitmap" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="ComposeShader">
<main-type>
<native-type />
<method name="nativeCreate1(int,int,int)">
<native name="ComposeShader_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/android.graphics/Xfermode/Xfermode-AllowNull"
mode="REF" />
</signature>
</native>
</method>
<method name="nativeCreate2(int,int,int)">
<native name="ComposeShader_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/android.graphics/PorterDuff-Mode" />
</signature>
</native>
</method>
<method name="nativePostCreate1(int,int,int,int)">
<native name="ComposeShader_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/native/Pointer" />
<parameter marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Xfermode/Xfermode"
mode="REF" />
</signature>
</native>
</method>
<method name="nativePostCreate2(int,int,int,int)">
<native name="ComposeShader_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter marshal="/native/Pointer" />
<parameter marshal="/native/Pointer" />
<parameter marshal="/android.graphics/PorterDuff-Mode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="LinearGradient">
<main-type>
<native-type />
<method name="nativeCreate1(float,float,float,float,int[],float[],int)">
<native name="LinearGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter index="4" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativeCreate2(float,float,float,float,int,int,int)">
<native name="LinearGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter index="6"
marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method
name="nativePostCreate1(int,float,float,float,float,int[],float[],int)">
<native name="LinearGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter index="5" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativePostCreate2(int,float,float,float,float,int,int,int)">
<native name="LinearGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter index="7"
marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="RadialGradient">
<main-type>
<native-type />
<method name="nativeCreate1(float,float,float,int[],float[],int)">
<native name="RadialGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter index="3" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativeCreate2(float,float,float,int,int,int)">
<native name="RadialGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter index="5"
marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativePostCreate1(int,float,float,float,int[],float[],int)">
<native name="RadialGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter index="4" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
<method name="nativePostCreate2(int,float,float,float,int,int,int)">
<native name="RadialGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter index="6"
marshal="/android.graphics/Shader/Shader-TileMode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="SweepGradient">
<main-type>
<native-type />
<method name="nativeCreate1(float,float,int[],float[])">
<native name="SweepGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
<parameter index="2" />
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="nativeCreate2(float,float,int,int)">
<native name="SweepGradient_create" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/android.graphics/Shader/Shader" />
</signature>
</native>
</method>
<method name="nativePostCreate1(int,float,float,int[],float[])">
<native name="SweepGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
<parameter index="3" />
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="nativePostCreate2(int,float,float,int,int)">
<native name="SweepGradient_postCreate" kind="STATIC">
<class>ShaderGlue</class>
<signature>
<return-type marshal="/native/Pointer" />
<parameter marshal="/android.graphics/Shader/Shader"
mode="REF" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Typeface">
<native-handle id="NativeTypeface">
<name>NativeTypeface</name>
<type>android.graphics.Typeface</type>
<include>TypefaceGlue.h</include>
<class>SkTypeface</class>
<field>native_instance</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeTypeface"
id="Typeface" />
<marshal-info class="native-class" native-handle="NativeTypeface"
flags="ALLOW_NULL" id="Typeface-AllowNull" />
<marshal-info class="native-enum" id="Typeface-Style">
<native-type>SkTypeface::Style</native-type>
</marshal-info>
<compilation-unit name="Typeface">
<main-type native-handle="NativeTypeface" >
<constructor name="Typeface(int)">
<parameter>
<binding native-handle="NativeTypeface" />
</parameter>
</constructor>
<method name="create(android.graphics.Typeface,int)">
<variable name="ni">
<binding native-handle="NativeTypeface" />
</variable>
</method>
<method name="nativeCreate(java.lang.String,int)">
<native name="createFromName" kind="STATIC">
<class>TypefaceGlue</class>
<signature>
<return-type marshal="Typeface" />
<parameter flags="ALLOW_NULL" />
<parameter marshal="Typeface-Style" />
</signature>
</native>
</method>
<method name="createFromAsset" output="/output/stub" />
<method name="nativeCreateFromAsset" output="/output/nothing" />
<method name="nativeCreateFromFile(java.lang.String)">
<native name="createFromFile" kind="STATIC">
<class>TypefaceGlue</class>
<signature>
<return-type marshal="Typeface" />
</signature>
</native>
</method>
<method name="nativeCreateFromTypeface(int,int)">
<native name="createFromTypeface" native-name="CreateFromTypeface"
kind="STATIC">
<class>SkTypeface</class>
<signature>
<return-type marshal="Typeface" />
<parameter marshal="Typeface-AllowNull" />
<parameter index="1" marshal="Typeface-Style" />
</signature>
</native>
</method>
<method name="nativeGetStyle(int)">
<native name="style" kind="INSTANCE">
<signature>
<return-type marshal="Typeface-Style" />
<parameter marshal="Typeface" />
</signature>
</native>
</method>
<method name="nativeUnref(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="setGammaForText(float,float)" output="/output/stub" />
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Xfermode">
<native-handle id="NativeXfermode">
<name>NativeXfermode</name>
<type>android.graphics.Xfermode</type>
<include>XfermodeGlue.h</include>
<class>SkXfermode</class>
<field>native_instance</field>
<property>nativeInstance</property>
<has-refcount>true</has-refcount>
</native-handle>
<marshal-info class="native-class" native-handle="NativeXfermode"
id="Xfermode" />
<marshal-info class="native-class" native-handle="NativeXfermode"
flags="ALLOW_NULL" id="Xfermode-AllowNull" />
<marshal-info class="native-enum" id="Xfermode-Mode">
<native-type>SkXfermode::Mode</native-type>
</marshal-info>
<marshal-info class="native-enum" id="AvoidXfermode-Mode">
<native-type>SkAvoidXfermode::Mode</native-type>
</marshal-info>
<compilation-unit name="Xfermode">
<main-type abstract="true" native-handle="NativeXfermode" >
<method name="finalizer(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="AvoidXfermode">
<main-type>
<native-type />
<enum name="Mode">
<binding reference="/android.graphics/native-int-enum" />
</enum>
<method name="nativeCreate(int,int,int)">
<native name="Avoid_create" kind="STATIC">
<class>XfermodeGlue</class>
<signature>
<return-type marshal="Xfermode" />
<parameter marshal="/android.graphics/Color/Color" />
<parameter index="2" marshal="AvoidXfermode-Mode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PixelXorXfermode">
<main-type>
<native-type />
<method name="nativeCreate(int)">
<native name="PixelXor_create" kind="STATIC">
<class>XfermodeGlue</class>
<signature>
<return-type marshal="Xfermode" />
<parameter marshal="/android.graphics/Color/Color" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="PorterDuffXfermode">
<main-type>
<native-type />
<method name="nativeCreateXfermode(int)">
<native name="PorterDuff_create" kind="STATIC">
<class>XfermodeGlue</class>
<signature>
<return-type marshal="Xfermode" />
<parameter marshal="/android.graphics/PorterDuff-Mode" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

141
android/api/java-io.xml Normal file
Просмотреть файл

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="java.io">
<namespace name="java.io" output="/output/api-stub">
<compilation-unit output="/output/sharpen">
<location-filter regex="true">
<include>.*Exception</include>
<include>IOError</include>
</location-filter>
<location-filter>
<include>BufferedInputStream</include>
<include>BufferedOutputStream</include>
<include>BufferedReader</include>
<include>BufferedWriter</include>
<include>CharArrayReader</include>
<include>CharArrayWriter</include>
<include>Closeable</include>
<include>Externalizable</include>
<include>FileFilter</include>
<include>FilenameFilter</include>
<include>FilePermission</include>
<include>FileReader</include>
<include>FileWriter</include>
<include>FilterInputStream</include>
<include>FilterOutputStream</include>
<include>FilterReader</include>
<include>FilterWriter</include>
<include>Flushable</include>
<include>HistoricalCharsetNames</include>
<include>InputStream</include>
<include>ObjectInput</include>
<include>ObjectInputValidation</include>
<include>ObjectOutput</include>
<include>OptionalDataException</include>
<include>OutputStream</include>
<include>OutputStreamWriter</include>
<include>PrintWriter</include>
<include>PushbackInputStream</include>
<include>PushbackReader</include>
<include>Reader</include>
<include>Serializable</include>
<include>SerializablePermission</include>
<include>SerializationHandleMap</include>
<include>StringBufferInputStream</include>
<include>StringReader</include>
<include>StringWriter</include>
<include>SyncFailedException</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/naked-stub">
<location-filter>
<include>EmulatedFields</include>
<include>EmulatedFieldsForDumping</include>
<include>EmulatedFieldsForLoading</include>
<include>ObjectStreamClass</include>
<include>ObjectStreamConstants</include>
<include>SequenceInputStream</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>PrintStream</include>
<include>Writer</include>
</location-filter>
</compilation-unit>
<compilation-unit name="Console" output="/output/sharpen">
<main-type partial="true">
<field name="console" output="/output/nothing" />
<method name="makeConsole" output="/output/nothing" />
<method name="readPassword()" output="/output/stub" />
<method name="setEcho" output="/output/nothing" />
<method name="setEchoImpl" output="/output/nothing" />
<type name="ConsoleReader" partial="true">
<constructor output="/output/partial" />
</type>
</main-type>
</compilation-unit>
<compilation-unit name="File" output="/output/sharpen">
<main-type partial="true" sealed="true">
<remove-members>
<member-kind>STATIC_CONSTRUCTOR</member-kind>
</remove-members>
<constructor output="/output/partial"/>
<method output="/output/partial">
<filter>
<name>canExecute</name>
<name>canRead</name>
<name>canWrite</name>
<name>delete</name>
<name>exists</name>
<name>getAbsolutePath</name>
<name>isDirectory</name>
<name>isFile</name>
<name>lastModified</name>
<name>length</name>
</filter>
</method>
<method output="/output/stub">
<filter>
<name>deleteOnExit</name>
<name>setExecutable</name>
<name>setReadable</name>
<name>setWritable</name>
<name>setLastModified</name>
<name>mkdir</name>
<name>createNewFile</name>
<name>createTempFile</name>
<name>renameTo</name>
<name>toURL</name>
<name>getTotalSpace</name>
<name>getUsableSpace</name>
<name>getFreeSpace</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>doAccess</name>
<name>doChmod</name>
<name>setLastModifiedImpl</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="InputStreamReader" output="/output/sharpen">
<main-type partial="true">
<constructor name="InputStreamReader(java.io.InputStream,java.lang.String)" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="StreamTokenizer">
<main-type>
<constructor>
<modify>
<remove-chained-invocation>true</remove-chained-invocation>
</modify>
</constructor>
</main-type>
</compilation-unit>
<compilation-unit name="ByteArrayInputStream">
<binding auto-rename-fields="true" />
</compilation-unit>
</namespace>
</api-definition>

116
android/api/java-nio.xml Normal file
Просмотреть файл

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="java.nio">
<namespace name="java.nio">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>IntBuffer</include>
<include>ShortBuffer</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<include>DirectByteBuffer</include>
<include>ReadOnlyDirectByteBuffer</include>
<include>ReadWriteDirectByteBuffer</include>
<include>MappedByteBuffer</include>
<include>MappedByteBufferAdapter</include>
</location-filter>
</compilation-unit>
<compilation-unit name="ByteOrder" output="/output/sharpen">
<main-type>
<method name="isLittleEndian">
<binding rename="Sharpen.Util.IsLittleEndian" />
</method>
<remove-members>
<name>isLittleEndian</name>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="Buffer" output="/output/sharpen">
<binding auto-rename-fields="true" />
</compilation-unit>
<compilation-unit name="ByteBuffer" output="/output/sharpen">
<binding auto-rename-fields="true" />
<main-type partial="true">
<remove-members>
<name>allocateDirect</name>
<name>put(java.nio.ByteBuffer)</name>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit name="CharBuffer" output="/output/sharpen">
<main-type partial="true">
<remove-members>
<name>subSequence</name>
</remove-members>
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter regex="true">
<include>.*Buffer</include>
<include>.*Adapter</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<exclude>DatagramChannelImpl</exclude>
<exclude>FileChannelImpl</exclude>
<exclude>PipeImpl</exclude>
<exclude>SelectionKeyImpl</exclude>
<exclude>SelectorImpl</exclude>
<exclude>SelectorProviderImpl</exclude>
<exclude>ServerSocketChannelImpl</exclude>
<exclude>SocketChannelImpl</exclude>
</location-filter>
</compilation-unit>
<namespace name="charset">
<compilation-unit name="Charset" output="/output/sharpen">
<main-type partial="true">
<constructor output="/output/partial" />
<field output="/output/nothing">
<filter>
<name>CACHED_CHARSETS</name>
<name>aliasesSet</name>
</filter>
</field>
<method output="/output/partial">
<filter>
<name>getDefaultCharset</name>
<name>availableCharsets</name>
<name>forName</name>
<name>forNameUEE</name>
<name>isSupported</name>
<name>compareTo</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>cacheCharset</name>
</filter>
</method>
<method output="/output/stub">
<filter>
<name>forNameEE</name>
<name>aliases</name>
</filter>
</method>
</main-type>
</compilation-unit>
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Charsets</include>
<include>CharacterCodingException</include>
<include>CharsetDecoder</include>
<include>CharsetEncoder</include>
<include>CodingErrorAction</include>
<include>CoderMalfunctionError</include>
<include>CoderResult</include>
<include>IllegalCharsetNameException</include>
<include>MalformedInputException</include>
<include>UnmappableCharacterException</include>
<include>UnsupportedCharsetException</include>
</location-filter>
</compilation-unit>
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="java.util.collections">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>Collection</include>
<include>Set</include>
<include>Map</include>
<include>MapEntry</include>
<include>List</include>
<include>Dictionary</include>
<include>Queue</include>
<include>AbstractSet</include>
<include>AbstractCollection</include>
<include>AbstractSequentialList</include>
<include>HashSet</include>
<include>ListIterator</include>
<include>ArrayList</include>
<include>SortedMap</include>
<include>SortedSet</include>
<include>NavigableMap</include>
<include>NavigableSet</include>
<include>Comparator</include>
<include>LinkedHashMap</include>
<include>LinkedHashSet</include>
<include>Iterator</include>
<include>Stack</include>
<include>EnumMap</include>
<include>EnumSet</include>
</location-filter>
</compilation-unit>
<compilation-unit name="AbstractMap" output="/output/sharpen">
<binding auto-rename-fields="true" />
</compilation-unit>
<compilation-unit name="AbstractList" output="/output/sharpen">
<main-type>
<type recursive="true">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="HashMap" output="/output/sharpen">
<main-type>
<field name="serialPersistentFields" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit name="Hashtable" output="/output/sharpen">
<main-type partial="true">
<method name="hashCode" output="/output/partial" />
<method name="toString" output="/output/partial" />
<type name="HashtableEntry">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Collections" output="/output/stub">
<main-type>
<field output="/output/nothing" />
<method name="reverseOrder" output="/output/sharpen" />
<type name="ReverseComparator" output="/output/sharpen">
<field name="INSTANCE">
<modify>
<field-type type="ReverseComparator&lt;T&gt;" />
<field-initializer code="new ReverseComparator&lt;T&gt;()" />
</modify>
</field>
</type>
<type output="/output/sharpen">
<filter>
<name>ReverseComparator2</name>
<name>SynchronizedCollection</name>
<name>SynchronizedList</name>
<name>SynchronizedRandomAccessList</name>
<name>UnmodifiableCollection</name>
<name>UnmodifiableRandomAccessList</name>
<name>UnmodifiableList</name>
<name>UnmodifiableSet</name>
<name>UnmodifiableMap</name>
</filter>
</type>
<method output="/output/sharpen">
<filter>
<name>unmodifiableCollection</name>
<name>unmodifiableList</name>
<name>unmodifiableSet</name>
<name>unmodifiableMap</name>
</filter>
</method>
<type recursive="true" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit name="TreeMap" output="/output/sharpen">
<binding auto-rename-fields="true" />
<main-type partial="true">
<type name="BoundedMap" partial="true">
<method name="writeReplace" output="/output/partial" />
</type>
<enum>
<binding>
<extract-enum value-field="ID" />
</binding>
</enum>
</main-type>
</compilation-unit>
<compilation-unit name="TreeSet" output="/output/sharpen">
<main-type partial="true">
<method name="clone" output="/output/partial" />
</main-type>
</compilation-unit>
<compilation-unit name="LinkedList" output="/output/sharpen">
<binding auto-rename-fields="true" />
<main-type partial="true">
<method name="addAll" output="/output/partial" />
<field name="voidLink">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
<type name="Link">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
<type name="LinkIterator">
<modify>
<visibility>INTERNAL</visibility>
</modify>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Vector" output="/output/sharpen">
<main-type partial="true">
<constructor name="Vector(int,int)" output="/output/partial" />
<method output="/output/partial">
<filter>
<name>newElementArray</name>
</filter>
</method>
<method>
<filter>
<name>grow</name>
<name>growBy</name>
<name>growByOne</name>
</filter>
<variable name="newData">
<binding>
<modify-type type="object[]" />
</binding>
</variable>
</method>
</main-type>
</compilation-unit>
<compilation-unit name="WeakHashMap" output="/output/sharpen">
<main-type partial="true">
<type name="Entry" partial="true">
<constructor output="/output/partial" />
<method name="equals" output="/output/partial" />
</type>
<method output="/output/partial">
<filter>
<name>newEntryArray</name>
<name>poll</name>
</filter>
</method>
</main-type>
</compilation-unit>
<namespace name="concurrent">
<compilation-unit name="CopyOnWriteArrayList" output="/output/sharpen">
<main-type partial="true">
<constructor output="/output/partial">
<filter>
<name>CopyOnWriteArrayList(java.util.Collection)</name>
<name>CopyOnWriteArrayList(E[])</name>
</filter>
</constructor>
<method name="toArray(T[])" output="/output/partial"/>
<type>
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="FutureTask" output="/output/stub" />
<namespace name="locks">
<compilation-unit name="AbstractQueuedSynchronizer" output="/output/api-stub" />
</namespace>
</namespace>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="java.util.regex">
<native-handle id="NativeRegexPattern">
<name>NativeRegexPattern</name>
<type>java.util.regex.Pattern</type>
<include>RegexPatternGlue.h</include>
<class>icu_46::RegexPattern</class>
<field>address</field>
</native-handle>
<native-handle id="NativeRegexMatcher">
<name>NativeRegexMatcher</name>
<type>java.util.regex.Matcher</type>
<include>RegexMatcherGlue.h</include>
<class>icu_46::RegexMatcher</class>
<field>address</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeRegexPattern"
id="RegexPattern" />
<marshal-info class="native-class" native-handle="NativeRegexMatcher"
id="RegexMatcher" />
<compilation-unit name="Pattern" output="/output/sharpen">
<main-type native-handle="NativeRegexPattern" >
<method name="compileImpl(java.lang.String,int)">
<native name="compile" kind="STATIC">
<class>RegexPatternGlue</class>
<signature>
<return-type marshal="RegexPattern" />
<parameter />
</signature>
</native>
</method>
<method name="closeImpl(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="Matcher" output="/output/sharpen">
<main-type native-handle="NativeRegexMatcher" >
<method name="openImpl(int)">
<native name="open" kind="STATIC">
<class>RegexMatcherGlue</class>
<signature>
<return-type marshal="RegexMatcher" />
<parameter marshal="RegexPattern" />
</signature>
</native>
</method>
<method name="closeImpl(int)">
<native kind="DESTRUCTOR" />
</method>
<method name="findImpl(int,java.lang.String,int,int[])">
<native name="find" kind="PROXY">
<class>RegexMatcherGlue</class>
<signature>
<parameter marshal="RegexMatcher" />
<parameter flags="ALLOW_NULL" />
<parameter index="3" mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="findNextImpl(int,java.lang.String,int[])">
<native name="findNext" kind="PROXY">
<class>RegexMatcherGlue</class>
<signature>
<parameter marshal="RegexMatcher" />
<parameter flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="groupCountImpl(int)">
<native name="groupCount" kind="INSTANCE">
<signature>
<parameter marshal="RegexMatcher" />
</signature>
</native>
</method>
<method name="hitEndImpl(int)">
<native name="hitEnd" kind="INSTANCE">
<signature>
<parameter marshal="RegexMatcher" />
</signature>
</native>
</method>
<method name="requireEndImpl(int)">
<native name="requireEnd" kind="INSTANCE">
<signature>
<parameter marshal="RegexMatcher" />
</signature>
</native>
</method>
<method name="lookingAtImpl(int,java.lang.String,int[])">
<native name="lookingAt" kind="PROXY">
<class>RegexMatcherGlue</class>
<signature>
<parameter marshal="RegexMatcher" />
<parameter flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="matchesImpl(int,java.lang.String,int[])">
<native name="matches" kind="PROXY">
<class>RegexMatcherGlue</class>
<signature>
<parameter marshal="RegexMatcher" />
<parameter flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="setInputImpl(int,java.lang.String,int,int)">
<native name="setInput" kind="PROXY">
<class>RegexMatcherGlue</class>
<signature>
<parameter marshal="RegexMatcher" />
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="useAnchoringBoundsImpl(int,boolean)">
<native name="useAnchoringBounds" kind="INSTANCE">
<signature>
<parameter marshal="RegexMatcher" />
</signature>
</native>
</method>
<method name="useTransparentBoundsImpl(int,boolean)">
<native name="useTransparentBounds" kind="INSTANCE">
<signature>
<parameter marshal="RegexMatcher" />
</signature>
</native>
</method>
</main-type>
</compilation-unit>
</namespace-templates>

97
android/api/java-util.xml Normal file
Просмотреть файл

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="java.util">
<namespace name="java.util">
<template-include-file file="api/java-util-collections.xml" />
<compilation-unit output="/output/sharpen">
<location-filter regex="true">
<include>.*Exception</include>
</location-filter>
<location-filter>
<include>Formattable</include>
<include>FormattableFlags</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/stub">
<location-filter>
<include>SimpleTimeZone</include>
<include>TimeZone</include>
</location-filter>
</compilation-unit>
<compilation-unit name="Calendar" output="/output/stub">
<binding auto-rename-fields="true" />
</compilation-unit>
<compilation-unit name="Formatter" output="/output/sharpen">
<binding auto-rename-fields="true" />
<main-type partial="true">
<constructor name="Formatter(java.io.File,java.lang.String,java.util.Locale)" output="/output/stub"/>
<field name="conversionType">
<modify>
<field-initializer code="unchecked((char)UNSET)" />
</modify>
</field>
<field name="cachedDecimalFormat" output="/output/nothing"/>
<method output="/output/partial">
<filter>
<name>transform(java.util.Formatter.FormatToken,java.lang.Object)</name>
<name>transformFromCharacter</name>
<name>transformFromInteger</name>
<name>transformFromFloat</name>
<name>transformFromDateTime</name>
<name>transformA</name>
<name>transformE</name>
<name>transformF</name>
<name>transformG</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>appendT</name>
<name>getDecimalFormat</name>
<name>transformFromBigInteger</name>
</filter>
</method>
<type name="CachedDecimalFormat" output="/output/nothing"/>
<type name="FormatToken">
<field name="conversionType">
<modify>
<field-initializer code="unchecked((char)UNSET)" />
</modify>
</field>
</type>
</main-type>
</compilation-unit>
<compilation-unit name="Arrays" output="/output/stub">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>checkOffsetAndCount</name>
<name>copyOf(U[],int,java.lang.Class)</name>
</filter>
</method>
<method output="/output/sharpen">
<filter>
<name>equals</name>
<name>fill</name>
<name>checkStartAndEnd</name>
<name>copyOf</name>
<name>copyOfRange</name>
<name>asList</name>
</filter>
</method>
<type name="ArrayList" output="/output/sharpen" />
</main-type>
</compilation-unit>
<compilation-unit output="/output/api-stub">
<location-filter>
<include>Formatter</include>
</location-filter>
</compilation-unit>
<namespace name="regex" output="/output/sharpen">
<template-include-file file="api/java-util-regex.xml" />
</namespace>
<namespace name="jar">
<compilation-unit name="Pack200" output="/output/api-stub" />
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="org.xmlpull">
<namespace name="org.xmlpull.v1" output="/output/sharpen">
<compilation-unit name="XmlPullParserException">
<main-type>
<method name="printStackTrace" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit />
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<api-definition id="other-namespaces">
<include-file file="api/java-io.xml" />
<include-file file="api/java-nio.xml" />
<include-file file="api/java-util.xml" />
<include-file file="api/org-xmlpull.xml" />
<!-- Stuff that's referenced somewhere, but we're not interested it. -->
<namespace name="java.security">
<compilation-unit output="/output/api-stub">
<location-filter>
<include>BasicPermission</include>
<include>Permission</include>
</location-filter>
</compilation-unit>
</namespace>
<namespace name="java.text">
<compilation-unit output="/output/stub">
<location-filter>
<exclude>AttributedString</exclude>
<include>Format</include>
<include>DateFormat</include>
<include>DateFormatSymbols</include>
<include>AttributedCharacterIterator</include>
<include>Collator</include>
</location-filter>
</compilation-unit>
<compilation-unit name="CharacterIterator" output="/output/sharpen">
<main-type>
<method name="clone">
<binding rename="Clone" />
</method>
</main-type>
</compilation-unit>
<compilation-unit name="StringCharacterIterator" output="/output/sharpen" />
<compilation-unit name="SimpleDateFormat" output="/output/stub">
<main-type>
<method name="parseNumber(int,java.lang.String,java.text.ParsePosition)"
output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit name="BreakIterator" output="/output/sharpen">
<main-type partial="true">
<field name="wrapped" output="/output/nothing" />
<constructor output="/output/nothing" />
<method output="/output/partial">
<filter>
<name>getAvailableLocales</name>
<name>getCharacterInstance(java.util.Locale)</name>
<name>getLineInstance(java.util.Locale)</name>
<name>getSentenceInstance(java.util.Locale)</name>
<name>getWordInstance(java.util.Locale)</name>
<name>isBoundary</name>
<name>preceding</name>
<name>setText</name>
<name>clone</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace>
<namespace name="java.lang">
<compilation-unit output="/output/sharpen">
<location-filter regex="true">
<include>.*Exception</include>
</location-filter>
<location-filter>
<include>AssertionError</include>
<include>Runnable</include>
</location-filter>
</compilation-unit>
<compilation-unit output="/output/nothing">
<location-filter>
<include>IntegralToString</include>
<include>RealToString</include>
</location-filter>
</compilation-unit>
<compilation-unit name="AbstractStringBuilder"
output="/output/sharpen">
<main-type>
<binding visibility="PUBLIC" />
</main-type>
</compilation-unit>
<compilation-unit name="Iterable" output="/output/sharpen" />
<compilation-unit output="/output/sharpen">
<location-filter>
<include>StringBuffer</include>
<include>StringBuilder</include>
</location-filter>
<main-type partial="true">
<method name="append(int)" output="/output/partial" />
<method name="append(long)" output="/output/partial" />
<method name="append(double)" output="/output/partial" />
<method name="append(float)" output="/output/partial" />
<method name="appendCodePoint" output="/output/stub" />
<field name="serialPersistentFields" output="/output/nothing" />
</main-type>
</compilation-unit>
<compilation-unit name="ClassLoader" output="/output/sharpen">
<type output="/output/naked-stub" />
<main-type partial="true">
<type name="SystemClassLoader" output="/output/partial" />
<method output="/output/stub">
<filter>
<name>defineClass</name>
<name>getResources</name>
<name>getResourceAsStream</name>
<name>findResources</name>
<name>getPackage</name>
<name>getPackages</name>
<name>definePackage</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>createSystemClassLoader</name>
<name>findLoadedClass</name>
<name>findSystemClass</name>
</filter>
</method>
</main-type>
</compilation-unit>
</namespace>
<namespace name="java.net">
<compilation-unit output="/output/sharpen">
<location-filter>
<include>UnknownHostException</include>
<include>URISyntaxException</include>
</location-filter>
</compilation-unit>
<compilation-unit name="URI" output="/output/sharpen">
<main-type partial="true">
<method output="/output/partial">
<filter>
<name>isValidHost</name>
<name>isValidDomainName</name>
</filter>
</method>
<method name="toURL" output="/output/stub" />
</main-type>
</compilation-unit>
</namespace>
<namespace name="dalvik.system">
<compilation-unit name="CloseGuard" output="/output/sharpen" />
</namespace>
<namespace name="libcore">
<namespace name="io">
<compilation-unit name="Streams" output="/output/sharpen">
<main-type>
<field name="skipBuffer">
<modify>
<field-type type="XobotOS.Runtime.AtomicReference&lt;byte[]&gt;" />
<field-initializer code="XobotOS.Runtime.AtomicReference.create&lt;byte[]&gt;(null)" />
</modify>
</field>
</main-type>
</compilation-unit>
</namespace>
<namespace name="util">
<compilation-unit name="EmptyArray" output="/output/sharpen" />
<compilation-unit name="Objects" output="/output/sharpen" />
</namespace>
<namespace name="net">
<compilation-unit name="UriCodec" output="/output/sharpen" />
<namespace name="url">
<compilation-unit name="UrlUtils" output="/output/sharpen" />
</namespace>
</namespace>
</namespace>
</api-definition>

Просмотреть файл

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="AssetManager">
<native-handle id="NativeAssetManager">
<name>NativeAssetManager</name>
<type>android.content.res.AssetManager</type>
<include>AssetManagerGlue.h</include>
<class>AssetManagerGlue</class>
<field>mObject</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeAssetManager"
id="AssetManager" />
<native-handle id="NativeAsset">
<name>NativeAsset</name>
<type>android.content.res.AssetManager.AssetInputStream</type>
<include>AssetManagerGlue.h</include>
<class>android::Asset</class>
<field>mAsset</field>
</native-handle>
<marshal-info class="native-enum" id="Asset-AccessMode">
<native-type>android::Asset::AccessMode</native-type>
</marshal-info>
<marshal-info class="native-class" native-handle="NativeAsset"
id="Asset" />
<compilation-unit name="AssetManager" output="/output/sharpen-no-docs">
<main-type partial="true" native-handle="NativeAssetManager" >
<method output="/output/stub">
<filter>
<name>open</name>
<name>openFd</name>
<name>openNonAssetFd</name>
</filter>
</method>
<method output="/output/partial">
<filter>
<name>createTheme</name>
<name>incRefsLocked</name>
<name>decRefsLocked</name>
</filter>
</method>
<remove-members>
<member-kind>DESTRUCTOR</member-kind>
</remove-members>
<constructor output="/output/partial" />
<method name="init()">
<native kind="CONSTRUCTOR">
<signature>
<return-type marshal="AssetManager" />
</signature>
</native>
</method>
<method name="setConfiguration(int,int,java.lang.String,int,int,int,int,int,int,int,int,int,int,int,int,int,int)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="2" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="addAssetPath(java.lang.String)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
</signature>
</native>
</method>
<method name="getStringBlockCount()">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getNativeStringBlock(int)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<return-type marshal="/android.content/StringBlock/StringBlock" />
</signature>
</native>
</method>
<method name="newTheme()">
<native kind="INSTANCE">
<signature implicit-instance="true">
<return-type marshal="/android.content/Resources/Theme" />
</signature>
</native>
</method>
<method name="applyStyle(int,int,int,int,int[],int[],int[])">
<native kind="INSTANCE">
<signature>
<parameter marshal="/android.content/Resources/Theme" />
<parameter index="3"
marshal="/android.content/XmlBlock/XmlParser-AllowNull" mode="REF" />
<parameter flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="applyThemeStyle(int,int,boolean)">
<native kind="INSTANCE">
<signature>
<parameter marshal="/android.content/Resources/Theme" />
</signature>
</native>
</method>
<method name="copyTheme(int,int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="/android.content/Resources/Theme" />
<parameter marshal="/android.content/Resources/Theme" />
</signature>
</native>
</method>
<method name="getThemeValue(int,int,android.util.TypedValue,boolean)">
<parameter>
<binding native-handle="/android.content/Resources/NativeTheme" />
</parameter>
</method>
<method
name="loadThemeAttributeValue(int,int,android.util.TypedValue,boolean)">
<native kind="INSTANCE">
<signature>
<parameter marshal="/android.content/Resources/Theme" />
<parameter index="2" mode="OUT" />
</signature>
</native>
</method>
<method name="openXmlAssetNative(int,java.lang.String)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<return-type marshal="/android.content/XmlBlock/XmlBlock" />
<parameter index="1" />
</signature>
</native>
</method>
<method name="openXmlBlockAsset(int,java.lang.String)">
<variable name="xmlBlock">
<binding native-handle="/android.content/XmlBlock/NativeXmlBlock" />
</variable>
</method>
<method name="retrieveAttributes(int,int[],int[],int[])">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter marshal="/android.content/XmlBlock/XmlParser" mode="INSTANCE" />
<parameter index="2" mode="REF" flags="ALLOW_NULL" />
<parameter mode="REF" flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method
name="loadResourceValue(int,short,android.util.TypedValue,boolean)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="2" mode="OUT" />
</signature>
</native>
</method>
<method name="openNonAsset(int,java.lang.String,int)">
<variable name="asset">
<binding native-handle="NativeAsset" />
</variable>
</method>
<method name="openNonAssetNative(int,java.lang.String,int)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<return-type marshal="Asset" />
<parameter index="1" />
<parameter marshal="Asset-AccessMode" />
</signature>
</native>
</method>
<method name="readAssetChar(int)">
<native kind="PROXY">
<class>AssetManagerGlue</class>
<signature>
<parameter marshal="Asset" />
</signature>
</native>
</method>
<method name="readAsset(int,byte[],int,int)">
<native kind="PROXY">
<class>AssetManagerGlue</class>
<signature>
<parameter marshal="Asset" />
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="seekAsset(int,long,int)">
<native kind="PROXY">
<class>AssetManagerGlue</class>
<signature>
<parameter marshal="Asset" />
</signature>
</native>
</method>
<method name="getAssetLength(int)">
<native kind="PROXY">
<class>AssetManagerGlue</class>
<signature>
<parameter marshal="Asset" />
</signature>
</native>
</method>
<method name="getAssetRemainingLength(int)">
<native kind="PROXY">
<class>AssetManagerGlue</class>
<signature>
<parameter marshal="Asset" />
</signature>
</native>
</method>
<method name="destroyAsset(int)" output="/output/nothing" />
<method name="getArraySize(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="retrieveArray(int,int[])">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter index="1" mode="REF" />
</signature>
</native>
</method>
<method name="getArrayIntResource(int)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<return-type />
</signature>
</native>
</method>
<method name="getResourceIdentifier(java.lang.String,java.lang.String,java.lang.String)">
<native kind="INSTANCE">
<signature implicit-instance="true">
<parameter />
<parameter flags="ALLOW_NULL" />
<parameter flags="ALLOW_NULL" />
</signature>
</native>
</method>
<method name="getResourceName(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getResourcePackageName(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getResourceTypeName(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getResourceEntryName(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getArrayStringInfo(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<method name="getArrayStringResource(int)">
<native kind="INSTANCE">
<signature implicit-instance="true" />
</native>
</method>
<type name="AssetInputStream" partial="true" native-handle="NativeAsset" >
<method name="getAssetInt">
<binding native-handle="NativeAsset" />
</method>
<constructor name="AssetInputStream(int)">
<modify>
<visibility>INTERNAL</visibility>
</modify>
<parameter>
<binding native-handle="NativeAsset" />
</parameter>
</constructor>
<destructor output="/output/nothing" />
<method name="close" output="/output/partial" />
</type>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Resources">
<native-handle id="NativeTheme">
<name>NativeTheme</name>
<type>android.content.res.Resources.Theme</type>
<include>AssetManagerGlue.h</include>
<class>AssetManagerGlue::Theme</class>
<field>mTheme</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeTheme" id="Theme" />
<compilation-unit name="Resources" output="/output/sharpen">
<main-type partial="true">
<field name="EMPTY_ARRAY" output="/output/nothing" />
<method name="emptySparseArray" output="/output/nothing" />
<method output="/output/stub">
<filter>
<name>getQuantityText</name>
<name>openRawResource</name>
<name>openRawResourceFd</name>
<name>parseBundleExtras</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>getPluralRule</name>
<name>attrForQuantityCode</name>
<name>stringForQuantityCode</name>
</filter>
</method>
<type name="Theme" partial="true" native-handle="NativeTheme" >
<method name="dump" output="/output/stub" />
<destructor output="/output/nothing" />
</type>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="StringBlock">
<native-handle id="NativeStringBlock">
<name>NativeStringBlock</name>
<type>android.content.res.StringBlock</type>
<include>AssetManagerGlue.h</include>
<class>AssetManagerGlue::StringBlock</class>
<field>mNative</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeStringBlock"
id="StringBlock" />
<compilation-unit name="StringBlock" output="/output/sharpen-no-docs">
<main-type partial="true" native-handle="NativeStringBlock" >
<constructor name="StringBlock(int,boolean)">
<parameter>
<binding native-handle="NativeStringBlock" />
</parameter>
</constructor>
<constructor output="/output/stub" />
<method name="nativeCreate" output="/output/stub" />
<method name="nativeGetSize(int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="StringBlock" />
</signature>
</native>
</method>
<method name="nativeGetString(int,int)">
<native kind="INSTANCE">
<signature>
<return-type />
<parameter marshal="StringBlock" />
</signature>
</native>
</method>
<method name="nativeGetStyle(int,int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="StringBlock" />
</signature>
</native>
</method>
<method name="nativeDestroy(int)">
<native kind="DESTRUCTOR" />
</method>
<remove-members>
<member-kind>DESTRUCTOR</member-kind>
</remove-members>
<type name="StyleIDs">
<field>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
<type recursive="true" output="/output/stub" />
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="XmlBlock">
<native-handle id="NativeXmlBlock">
<name>NativeXmlBlock</name>
<type>android.content.res.XmlBlock</type>
<include>AssetManagerGlue.h</include>
<class>AssetManagerGlue::XmlBlock</class>
<field>mNative</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeXmlBlock"
id="XmlBlock" />
<native-handle id="NativeXmlParser">
<name>NativeXmlParser</name>
<type>android.content.res.XmlBlock.Parser</type>
<include>AssetManagerGlue.h</include>
<class>AssetManagerGlue::XmlParser</class>
<field>mParseState</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeXmlParser"
id="XmlParser" />
<marshal-info class="native-class" native-handle="NativeXmlParser"
flags="ALLOW_NULL" id="XmlParser-AllowNull" />
<compilation-unit name="XmlBlock" output="/output/sharpen">
<main-type partial="true" native-handle="NativeXmlBlock" >
<constructor name="XmlBlock(android.content.res.AssetManager,int)">
<parameter index="1">
<binding native-handle="NativeXmlBlock" />
</parameter>
</constructor>
<method name="nativeGetStringBlock(int)">
<native kind="INSTANCE">
<signature>
<return-type marshal="/android.content/StringBlock/StringBlock" />
<parameter marshal="XmlBlock" />
</signature>
</native>
</method>
<method name="newParser" />
<method name="nativeCreateParseState(int)">
<native kind="INSTANCE">
<signature>
<return-type marshal="XmlParser" />
<parameter marshal="XmlBlock" />
</signature>
</native>
</method>
<method name="nativeNext(int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetNamespace(int)">
<native name="getElementNamespaceID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetName(int)">
<native name="getElementNameID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetText(int)">
<native name="getTextID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetLineNumber(int)">
<native name="getLineNumber" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeCount(int)">
<native name="getAttributeCount" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeNamespace(int,int)">
<native name="getAttributeNamespaceID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeName(int,int)">
<native name="getAttributeNameID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeResource(int,int)">
<native name="getAttributeNameResID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeDataType(int,int)">
<native name="getAttributeDataType" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeData(int,int)">
<native name="getAttributeData" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetAttributeStringValue(int,int)">
<native name="getAttributeValueStringID" kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method
name="nativeGetAttributeIndex(int,java.lang.String,java.lang.String)">
<native kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
<parameter flags="ALLOW_NULL" />
<parameter />
</signature>
</native>
</method>
<method name="nativeGetIdAttribute(int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetClassAttribute(int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeGetStyleAttribute(int)">
<native kind="INSTANCE">
<signature>
<parameter marshal="XmlParser" />
</signature>
</native>
</method>
<method name="nativeDestroy" output="/output/nothing" />
<method name="nativeDestroyParseState" output="/output/nothing" />
<method name="decOpenCountLocked" output="/output/partial" />
<constructor output="/output/stub" />
<type name="Parser" partial="true" native-handle="NativeXmlParser" >
<constructor name="Parser(int,android.content.res.XmlBlock)">
<parameter>
<binding native-handle="NativeXmlParser" />
</parameter>
</constructor>
<method name="close" output="/output/partial" />
</type>
</main-type>
</compilation-unit>
</namespace-templates>

97
android/api/test.xml Normal file
Просмотреть файл

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="Test">
<native-handle id="NativeTest">
<name>NativeTest</name>
<type>Test</type>
<include>MartinTest.h</include>
<class>MartinTest</class>
<field>mObject</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeTest"
id="Test" />
<compilation-unit name="Test" output="/output/sharpen-no-docs">
<main-type native-handle="NativeTest" >
<type name="Foo">
<native-struct id="Monkey" native-type="MartinTest::Foo">
<member name="hello" />
<member name="a" />
</native-struct>
</type>
<type name="Blittable">
<native-struct id="Blittable" native-type="MartinTest::Blittable">
<member name="hello" />
</native-struct>
</type>
<type name="Complex">
<native-struct id="Complex" native-type="MartinTest::Complex">
<member name="foo" />
<member name="str" />
</native-struct>
</type>
<method name="dumpMemoryUsage">
<native kind="STATIC" />
</method>
<method name="hello(int[])">
<native kind="STATIC">
<signature>
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="foo(martin.Test.Foo)">
<native kind="STATIC" />
</method>
<method name="bar(martin.Test.Foo[])">
<native kind="STATIC" />
</method>
<method name="refFunc(martin.Test.Foo)">
<native kind="STATIC">
<signature>
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="outFunc(martin.Test.Foo)">
<native kind="STATIC">
<signature>
<parameter mode="OUT" />
</signature>
</native>
</method>
<method name="retFunc()">
<native kind="STATIC" />
</method>
<method name="blittableFunc(martin.Test.Blittable)">
<native kind="STATIC" />
</method>
<method name="blittableRef(martin.Test.Blittable)">
<native kind="STATIC">
<signature>
<parameter mode="REF" />
</signature>
</native>
</method>
<method name="complex(martin.Test.Complex)">
<native kind="STATIC" />
</method>
<method name="complexRet()">
<native kind="STATIC" />
</method>
<method name="stringFunc(java.lang.String)">
<native kind="STATIC" />
</method>
<method name="stringArray(java.lang.String[])">
<native kind="STATIC" />
</method>
<method name="returnString()">
<native kind="STATIC" />
</method>
<method name="returnStringArray()">
<native kind="STATIC" />
</method>
<method name="returnIntArray()">
<native kind="STATIC" />
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="MotionEvent">
<native-handle id="NativeMotionEvent">
<name>NativeMotionEvent</name>
<type>android.view.MotionEvent</type>
<include>MotionEventGlue.h</include>
<class>MotionEventGlue</class>
<property>nativeInstance</property>
<field>mNativePtr</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeMotionEvent"
id="MotionEvent" />
<marshal-info class="native-class" native-handle="NativeMotionEvent"
flags="ALLOW_NULL" id="MotionEvent-AllowNull" />
<compilation-unit name="MotionEvent" output="/output/sharpen-no-docs">
<main-type native-handle="NativeMotionEvent" >
<field name="HISTORY_CURRENT">
<modify>
<field-initializer code="unchecked(-(int)0x80000000)" />
</modify>
</field>
<method name="nativeInitialize">
<native kind="STATIC" name="initialize">
<signature>
<return-type marshal="MotionEvent" />
<parameter marshal="MotionEvent-AllowNull" mode="REF" />
</signature>
</native>
</method>
<method name="nativeCopy(int,int,boolean)">
<native kind="STATIC" name="copy">
<signature>
<return-type marshal="MotionEvent" />
<parameter marshal="MotionEvent-AllowNull" mode="REF" />
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method
name="nativeAddBatch(int,long,android.view.MotionEvent.PointerCoords[],int)">
<native kind="INSTANCE" name="addBatch">
<signature>
<parameter marshal="MotionEvent" />
<parameter index="2" />
</signature>
</native>
</method>
<method name="nativeGetDeviceId(int)">
<native kind="INSTANCE" name="getDeviceId">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetSource(int)">
<native kind="INSTANCE" name="getSource">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeSetSource(int,int)">
<native kind="INSTANCE" name="setSource" return-void="true">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetAction(int)">
<native kind="INSTANCE" name="getAction">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeSetAction(int,int)">
<native kind="INSTANCE" name="setAction">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeIsTouchEvent(int)">
<native kind="INSTANCE" name="isTouchEvent">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetFlags(int)">
<native kind="INSTANCE" name="getFlags">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeSetFlags(int,int)">
<native kind="INSTANCE" name="setFlags">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetEdgeFlags(int)">
<native kind="INSTANCE" name="getEdgeFlags">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeSetEdgeFlags(int,int)">
<native kind="INSTANCE" name="setEdgeFlags">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetMetaState(int)">
<native kind="INSTANCE" name="getMetaState">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetButtonState(int)">
<native kind="INSTANCE" name="getButtonState">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeOffsetLocation(int,float,float)">
<native kind="INSTANCE" name="offsetLocation">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetXOffset(int)">
<native kind="INSTANCE" name="getXOffset">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetYOffset(int)">
<native kind="INSTANCE" name="getYOffset">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetXPrecision(int)">
<native kind="INSTANCE" name="getXPrecision">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetYPrecision(int)">
<native kind="INSTANCE" name="getYPrecision">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetDownTimeNanos(int)">
<native kind="INSTANCE" name="getDownTime">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeSetDownTimeNanos(int,long)">
<native kind="INSTANCE" name="setDownTime">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetPointerCount(int)">
<native kind="INSTANCE" name="getPointerCount">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetPointerId(int,int)">
<native kind="INSTANCE" name="getPointerId">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetToolType(int,int)">
<native kind="INSTANCE" name="getToolType">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeFindPointerIndex(int,int)">
<native kind="INSTANCE" name="findPointerIndex">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetHistorySize(int)">
<native kind="INSTANCE" name="getHistorySize">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetEventTimeNanos(int,int)">
<native kind="INSTANCE" name="getEventTimeNanos">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetRawAxisValue(int,int,int,int)">
<native kind="INSTANCE" name="getRawAxisValue">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeGetAxisValue(int,int,int,int)">
<native kind="INSTANCE" name="getAxisValue">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method name="nativeScale(int,float)">
<native kind="INSTANCE" name="scale">
<signature>
<parameter marshal="MotionEvent" />
</signature>
</native>
</method>
<method
name="nativeGetPointerCoords(int,int,int,android.view.MotionEvent.PointerCoords)">
<native kind="INSTANCE" name="getPointerCoords">
<signature>
<parameter marshal="MotionEvent" />
<parameter index="3" mode="OUT" />
</signature>
</native>
</method>
<method
name="nativeGetPointerProperties(int,int,android.view.MotionEvent.PointerProperties)">
<native kind="INSTANCE" name="getPointerProperties">
<signature>
<parameter marshal="MotionEvent" />
<parameter index="2" mode="OUT" />
</signature>
</native>
</method>
<method output="/output/stub">
<filter>
<name>transform</name>
<name>createFromParcelBody</name>
<name>writeToParcel</name>
</filter>
</method>
<method output="/output/nothing">
<filter>
<name>nativeTransform</name>
<name>nativeReadFromParcel</name>
<name>nativeWriteToParcel</name>
</filter>
</method>
<method name="nativeDispose(int)">
<native kind="DESTRUCTOR" />
</method>
<type name="PointerProperties">
<native-struct id="PointerProperties"
native-type="MotionEventGlue::Properties">
<member name="id" native-name="id" />
<member name="toolType" native-name="toolType" />
</native-struct>
</type>
<type name="PointerCoords">
<native-struct id="PointerCoords"
native-type="MotionEventGlue::Coords">
<member name="mPackedAxisBits" native-name="packedAxisBits" />
<member name="mPackedAxisValues" native-name="packedAxisValues"
flags="ALLOW_NULL" />
<member name="x" />
<member name="y" />
<member name="pressure" />
<member name="size" />
<member name="touchMajor" />
<member name="touchMinor" />
<member name="toolMajor" />
<member name="toolMinor" />
<member name="orientation" />
</native-struct>
<field>
<filter>
<name>mPackedAxisBits</name>
<name>mPackedAxisValues</name>
</filter>
<modify>
<visibility>INTERNAL</visibility>
</modify>
</field>
</type>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<namespace-templates id="VelocityTracker">
<native-handle id="NativeVelocityTracker">
<name>NativeVelocityTracker</name>
<type>android.view.VelocityTracker</type>
<include>VelocityTrackerGlue.h</include>
<class>VelocityTrackerGlue</class>
<field>mPtr</field>
</native-handle>
<marshal-info class="native-class" native-handle="NativeVelocityTracker"
id="VelocityTracker" />
<compilation-unit name="VelocityTracker" output="/output/sharpen-no-docs">
<main-type partial="true" native-handle="NativeVelocityTracker" >
<method name="nativeInitialize()">
<native kind="CONSTRUCTOR">
<signature>
<return-type marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="nativeClear(int)">
<native kind="INSTANCE" name="clear">
<signature>
<parameter marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="nativeAddMovement(int,android.view.MotionEvent)">
<native kind="INSTANCE" name="addMovement">
<signature>
<parameter marshal="VelocityTracker" />
<parameter marshal="/android.view/MotionEvent/MotionEvent" />
</signature>
</native>
</method>
<method name="nativeComputeCurrentVelocity(int,int,float)">
<native kind="INSTANCE" name="computeCurrentVelocity">
<signature>
<parameter marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="nativeGetXVelocity(int,int)">
<native kind="INSTANCE" name="getXVelocity">
<signature>
<parameter marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="nativeGetYVelocity(int,int)">
<native kind="INSTANCE" name="getYVelocity">
<signature>
<parameter marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="getEstimator" output="/output/stub" />
<method
name="nativeGetEstimator(int,int,int,int,android.view.VelocityTracker.Estimator)" output="/output/stub">
<native kind="INSTANCE" name="getEstimator">
<signature>
<parameter marshal="VelocityTracker" />
</signature>
</native>
</method>
<method name="nativeDispose(int)">
<native kind="DESTRUCTOR" />
</method>
</main-type>
</compilation-unit>
</namespace-templates>

Просмотреть файл

@ -0,0 +1,122 @@
<configuration>
<log-file append="false">
<path>logfile.txt</path>
</log-file>
<map-namespace>
<from>^com\.android\.internal$</from>
<to>android.internal</to>
</map-namespace>
<map-namespace>
<from>^com\.android\.internal\.textservice$</from>
<to>android.view.textservice.internal</to>
</map-namespace>
<map-namespace>
<from>^com\.android\.internal\.(\w+)(\..+)?$</from>
<to>android.$1.internal$2</to>
</map-namespace>
<source-info>
<!-- Known problems -->
<location-filter must-match="true">
<exclude>android.net.LocalSocketAddress</exclude>
<exclude>android.net.vpn.VpnType</exclude>
<exclude>android.net.wifi.SupplicantState</exclude>
<exclude>android.renderscript.ProgramStore</exclude>
<exclude>android.renderscript.Primitive</exclude>
<exclude>android.renderscript.Dimension</exclude>
<exclude>android.renderscript.Sampler</exclude>
<exclude>android.renderscript.Element</exclude>
<exclude>android.renderscript.ProgramFragment</exclude>
<exclude>android.renderscript.RenderScript</exclude>
<exclude>android.view.ViewDebug</exclude>
<exclude>android.webkit.WebSettings</exclude>
<exclude>java.lang.reflect.Proxy</exclude>
<exclude>java.lang.Byte</exclude>
<exclude>java.lang.Short</exclude>
<exclude>java.lang.Integer</exclude>
<exclude>java.lang.Long</exclude>
<exclude>java.lang.Float</exclude>
<exclude>java.lang.Double</exclude>
<exclude>java.lang.Boolean</exclude>
<exclude>java.lang.Character</exclude>
<exclude>java.lang.Object</exclude>
<exclude>java.lang.String</exclude>
<exclude>java.lang.Void</exclude>
<exclude>java.lang.Class</exclude>
<exclude>java.lang.Number</exclude>
<exclude>java.lang.Enum</exclude>
<exclude>java.lang.Throwable</exclude>
<exclude>java.lang.Exception</exclude>
<exclude>java.lang.Error</exclude>
<exclude>java.lang.Math</exclude>
<exclude>java.lang.InterruptedException</exclude>
<exclude>java.lang.IndexOutOfBoundsException</exclude>
<exclude>java.lang.IllegalArgumentException</exclude>
<exclude>java.lang.ArrayIndexOutOfBoundsException</exclude>
<exclude>java.lang.System</exclude>
<exclude>java.lang.FindBugsSuppressWarnings</exclude>
<exclude>java.lang.SuppressWarnings</exclude>
<exclude>java.lang.Override</exclude>
<exclude>java.net.HttpURLConnection</exclude>
<exclude>java.util.ResourceBundle</exclude>
<exclude>java.util.UUID</exclude>
<exclude>java.util.Date</exclude>
<exclude>java.util.IdentityHashMap</exclude>
<exclude>java.util.concurrent.ConcurrentLinkedDeque</exclude>
<exclude>java.util.concurrent.ScheduledThreadPoolExecutor</exclude>
<exclude>java.util.concurrent.AbstractExecutorService</exclude>
<exclude>javax.security.auth.PrivateCredentialPermission</exclude>
<exclude>javax.sip.DialogState</exclude>
<exclude>libcore.icu.TimeZones</exclude>
<exclude>android.internal.widget.RotarySelector</exclude>
<exclude>java.math.RoundingMode</exclude>
<exclude>android.view.VolumePanel</exclude>
<!-- ICS -->
<exclude>org.bouncycastle.crypto.engines.AESFastEngine</exclude>
<exclude>org.bouncycastle.crypto.engines.AESEngine</exclude>
<exclude>org.apache.harmony.security.asn1.BerInputStream</exclude>
</location-filter>
<location-filter substring="true" must-match="true">
<include>java.lang.ref.</include>
<exclude>java.lang.annotation</exclude>
<exclude>android.annotation</exclude>
<exclude>com.google.common</exclude>
<exclude>org.apache.harmony.luni.lang.reflect</exclude>
</location-filter>
<location-filter regex="true" must-match="true">
<exclude>java\.util\.concurrent\..*package-info</exclude>
<exclude>javax\.annotation\..*</exclude>
<exclude>android\.test\..*</exclude>
<exclude>android\.tests\..*</exclude>
</location-filter>
<extra-csharp-sources>manual-stubs</extra-csharp-sources>
<extra-csharp-sources>naked-stubs</extra-csharp-sources>
<extra-csharp-sources>extra-sources</extra-csharp-sources>
<extra-csharp-sources>xobotos</extra-csharp-sources>
<extra-csharp-sources>sharpen</extra-csharp-sources>
<source-folder>upstream</source-folder>
<output-folder>output</output-folder>
<csproject-file>
<path>XobotOS.csproj</path>
<filelist-file>XobotOS.csproj.filelist</filelist-file>
<template-file>XobotOS.csproj.in</template-file>
</csproject-file>
</source-info>
<api-def>api/api-def.xml</api-def>
<native-config>
<dll-name>libxobotos.dll</dll-name>
<output-dir>glue</output-dir>
<function-prefix>libxobotos</function-prefix>
<include>libxobotos.h</include>
</native-config>
</configuration>

Просмотреть файл

@ -0,0 +1,13 @@
using System;
using java.lang;
namespace Sharpen
{
public static class ExtensionMethods
{
public static CharSequence SubSequence (this string str, int start, int length) {
return CharSequenceProxy.Wrap (str.Substring (start, length));
}
}
}

Просмотреть файл

@ -0,0 +1,167 @@
using System;
using System.Collections;
using System.Collections.Generic;
using java.lang;
using java.util;
namespace java.lang
{
public interface Iterable : Iterable<object>
{
}
}
namespace Sharpen
{
public class IterableProxy : IEnumerable, IEnumerator
{
private readonly Iterable iterable;
public IterableProxy (Iterable iterable)
{
this.iterable = iterable;
}
#region IEnumerable implementation
public IEnumerator GetEnumerator ()
{
return this;
}
#endregion
#region IEnumerator implementation
public bool MoveNext ()
{
throw new NotImplementedException ();
}
public void Reset ()
{
throw new NotImplementedException ();
}
public object Current {
get {
throw new NotImplementedException ();
}
}
#endregion
public static IterableProxy Create (Iterable iterable)
{
return new IterableProxy (iterable);
}
public static IterableProxy<T> Create<T> (Iterable<T> iterable)
{
return new IterableProxy<T> (iterable);
}
}
public class IteratorProxy<T> : IEnumerator<T>
{
new private readonly Iterator<T> iterator;
private T current;
public IteratorProxy (Iterator<T> iterator)
{
this.iterator = iterator;
}
#region IEnumerator[T] implementation
public T Current {
get {
return current;
}
}
#endregion
#region IEnumerator implementation
public bool MoveNext ()
{
if (!iterator.hasNext ())
return false;
current = iterator.next ();
return true;
}
public void Reset ()
{
throw new System.NotSupportedException ();
}
object IEnumerator.Current {
get {
return current;
}
}
#endregion
#region IDisposable implementation
public void Dispose ()
{
;
}
#endregion
}
public class IterableProxy<T> : IEnumerable<T>
{
new private readonly Iterable<T> iterable;
public IterableProxy (Iterable<T> iterable)
{
this.iterable = iterable;
}
#region IEnumerable[T] implementation
public IEnumerator<T> GetEnumerator ()
{
return new IteratorProxy<T> (iterable.iterator ());
}
#endregion
#region IEnumerable implementation
IEnumerator IEnumerable.GetEnumerator ()
{
return new IteratorProxy<T> (iterable.iterator ());
}
#endregion
}
public static class IteratorExtensions
{
private class EnumeratorProxy<T> : Iterator<T>
{
IEnumerator<T> enumerator;
internal EnumeratorProxy (IEnumerator<T> enumerator)
{
this.enumerator = enumerator;
}
#region Iterator[T] implementation
public bool hasNext ()
{
return enumerator.MoveNext ();
}
public T next ()
{
return enumerator.Current;
}
public void remove ()
{
throw new System.NotSupportedException ();
}
#endregion
}
public static Iterator<T> iterator<T> (this ICollection<T> collection)
{
return new EnumeratorProxy<T> (collection.GetEnumerator ());
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
using Sharpen;
namespace android.content.res
{
/// <summary>The XML parsing interface returned for an XML resource.</summary>
/// <remarks>
/// The XML parsing interface returned for an XML resource. This is a standard
/// XmlPullParser interface, as well as an extended AttributeSet interface and
/// an additional close() method on this interface for the client to indicate
/// when it is done reading the resource.
/// </remarks>
[Sharpen.Sharpened]
public interface XmlResourceParser : org.xmlpull.v1.XmlPullParser, android.util.AttributeSet
{
/// <summary>
/// Returns a short text describing the current parser state, including
/// the position, a
/// description of the current event and the data source if known.
/// </summary>
/// <remarks>
/// Returns a short text describing the current parser state, including
/// the position, a
/// description of the current event and the data source if known.
/// This method is especially useful to provide meaningful
/// error messages and for debugging purposes.
/// </remarks>
string getPositionDescription();
/// <summary>Close this interface to the resource.</summary>
/// <remarks>
/// Close this interface to the resource. Calls on the interface are no
/// longer value after this call.
/// </remarks>
void close();
}
}

Просмотреть файл

@ -0,0 +1,657 @@
using Sharpen;
using System;
using XobotOS.Runtime;
namespace android.os
{
/// <summary>
/// A Handler allows you to send and process
/// <see cref="Message">Message</see>
/// and Runnable
/// objects associated with a thread's
/// <see cref="MessageQueue">MessageQueue</see>
/// . Each Handler
/// instance is associated with a single thread and that thread's message
/// queue. When you create a new Handler, it is bound to the thread /
/// message queue of the thread that is creating it -- from that point on,
/// it will deliver messages and runnables to that message queue and execute
/// them as they come out of the message queue.
/// <p>There are two main uses for a Handler: (1) to schedule messages and
/// runnables to be executed as some point in the future; and (2) to enqueue
/// an action to be performed on a different thread than your own.
/// <p>Scheduling messages is accomplished with the
/// <see cref="post(java.lang.Runnable)">post(java.lang.Runnable)</see>
/// ,
/// <see cref="postAtTime(java.lang.Runnable, long)">postAtTime(java.lang.Runnable, long)
/// </see>
/// ,
/// <see cref="postDelayed(java.lang.Runnable, long)">postDelayed(java.lang.Runnable, long)
/// </see>
/// ,
/// <see cref="sendEmptyMessage(int)">sendEmptyMessage(int)</see>
/// ,
/// <see cref="sendMessage(Message)">sendMessage(Message)</see>
/// ,
/// <see cref="sendMessageAtTime(Message, long)">sendMessageAtTime(Message, long)</see>
/// , and
/// <see cref="sendMessageDelayed(Message, long)">sendMessageDelayed(Message, long)</see>
/// methods. The <em>post</em> versions allow
/// you to enqueue Runnable objects to be called by the message queue when
/// they are received; the <em>sendMessage</em> versions allow you to enqueue
/// a
/// <see cref="Message">Message</see>
/// object containing a bundle of data that will be
/// processed by the Handler's
/// <see cref="handleMessage(Message)">handleMessage(Message)</see>
/// method (requiring that
/// you implement a subclass of Handler).
/// <p>When posting or sending to a Handler, you can either
/// allow the item to be processed as soon as the message queue is ready
/// to do so, or specify a delay before it gets processed or absolute time for
/// it to be processed. The latter two allow you to implement timeouts,
/// ticks, and other timing-based behavior.
/// <p>When a
/// process is created for your application, its main thread is dedicated to
/// running a message queue that takes care of managing the top-level
/// application objects (activities, broadcast receivers, etc) and any windows
/// they create. You can create your own threads, and communicate back with
/// the main application thread through a Handler. This is done by calling
/// the same <em>post</em> or <em>sendMessage</em> methods as before, but from
/// your new thread. The given Runnable or Message will then be scheduled
/// in the Handler's message queue and processed when appropriate.
/// </summary>
[Sharpen.Sharpened]
public class Handler
{
private const bool FIND_POTENTIAL_LEAKS = false;
private static readonly string TAG = "Handler";
/// <summary>
/// Callback interface you can use when instantiating a Handler to avoid
/// having to implement your own subclass of Handler.
/// </summary>
/// <remarks>
/// Callback interface you can use when instantiating a Handler to avoid
/// having to implement your own subclass of Handler.
/// </remarks>
public interface Callback
{
bool handleMessage (Message msg);
}
/// <summary>Subclasses must implement this to receive messages.</summary>
/// <remarks>Subclasses must implement this to receive messages.</remarks>
public virtual void handleMessage (Message msg)
{
}
/// <summary>Handle system messages here.</summary>
/// <remarks>Handle system messages here.</remarks>
public virtual void dispatchMessage (Message msg)
{
if (msg.callback != null) {
handleCallback (msg);
} else {
if (mCallback != null) {
if (mCallback.handleMessage (msg)) {
return;
}
}
handleMessage (msg);
}
}
/// <summary>
/// Default constructor associates this handler with the queue for the
/// current thread.
/// </summary>
/// <remarks>
/// Default constructor associates this handler with the queue for the
/// current thread.
/// If there isn't one, this handler won't be able to receive messages.
/// </remarks>
public Handler ()
{
mCallback = null;
}
/// <summary>
/// Constructor associates this handler with the queue for the
/// current thread and takes a callback interface in which you can handle
/// messages.
/// </summary>
/// <remarks>
/// Constructor associates this handler with the queue for the
/// current thread and takes a callback interface in which you can handle
/// messages.
/// </remarks>
public Handler (Handler.Callback callback)
{
mCallback = callback;
}
/// <summary>Use the provided queue instead of the default one.</summary>
/// <remarks>Use the provided queue instead of the default one.</remarks>
public Handler (Looper looper)
{
throw new NotSupportedException ();
}
/// <summary>
/// Use the provided queue instead of the default one and take a callback
/// interface in which to handle messages.
/// </summary>
/// <remarks>
/// Use the provided queue instead of the default one and take a callback
/// interface in which to handle messages.
/// </remarks>
public Handler (Looper looper, Handler.Callback callback)
{
throw new NotSupportedException ();
}
/// <summary>Returns a string representing the name of the specified message.</summary>
/// <remarks>
/// Returns a string representing the name of the specified message.
/// The default implementation will either return the class name of the
/// message callback if any, or the hexadecimal representation of the
/// message "what" field.
/// </remarks>
/// <param name="message">The message whose name is being queried</param>
public virtual string getMessageName (Message message)
{
if (message.callback != null) {
return message.callback.GetType ().FullName;
}
return "0x" + Sharpen.Util.IntToHexString (message.what);
}
/// <summary>
/// Returns a new
/// <see cref="Message">Message</see>
/// from the global message pool. More efficient than
/// creating and allocating new instances. The retrieved message has its handler set to this instance (Message.target == this).
/// If you don't want that facility, just call Message.obtain() instead.
/// </summary>
public Message obtainMessage ()
{
return Message.obtain (this);
}
/// <summary>
/// Same as
/// <see cref="obtainMessage()">obtainMessage()</see>
/// , except that it also sets the what member of the returned Message.
/// </summary>
/// <param name="what">Value to assign to the returned Message.what field.</param>
/// <returns>A Message from the global message pool.</returns>
public Message obtainMessage (int what)
{
return Message.obtain (this, what);
}
/// <summary>
/// Same as
/// <see cref="obtainMessage()">obtainMessage()</see>
/// , except that it also sets the what and obj members
/// of the returned Message.
/// </summary>
/// <param name="what">Value to assign to the returned Message.what field.</param>
/// <param name="obj">Value to assign to the returned Message.obj field.</param>
/// <returns>A Message from the global message pool.</returns>
public Message obtainMessage (int what, object obj)
{
return Message.obtain (this, what, obj);
}
/// <summary>
/// Same as
/// <see cref="obtainMessage()">obtainMessage()</see>
/// , except that it also sets the what, arg1 and arg2 members of the returned
/// Message.
/// </summary>
/// <param name="what">Value to assign to the returned Message.what field.</param>
/// <param name="arg1">Value to assign to the returned Message.arg1 field.</param>
/// <param name="arg2">Value to assign to the returned Message.arg2 field.</param>
/// <returns>A Message from the global message pool.</returns>
public Message obtainMessage (int what, int arg1, int arg2)
{
return Message.obtain (this, what, arg1, arg2);
}
/// <summary>
/// Same as
/// <see cref="obtainMessage()">obtainMessage()</see>
/// , except that it also sets the what, obj, arg1,and arg2 values on the
/// returned Message.
/// </summary>
/// <param name="what">Value to assign to the returned Message.what field.</param>
/// <param name="arg1">Value to assign to the returned Message.arg1 field.</param>
/// <param name="arg2">Value to assign to the returned Message.arg2 field.</param>
/// <param name="obj">Value to assign to the returned Message.obj field.</param>
/// <returns>A Message from the global message pool.</returns>
public Message obtainMessage (int what, int arg1, int arg2, object obj)
{
return Message.obtain (this, what, arg1, arg2, obj);
}
/// <summary>Causes the Runnable r to be added to the message queue.</summary>
/// <remarks>
/// Causes the Runnable r to be added to the message queue.
/// The runnable will be run on the thread to which this handler is
/// attached.
/// </remarks>
/// <param name="r">The Runnable that will be executed.</param>
/// <returns>
/// Returns true if the Runnable was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool post (java.lang.Runnable r)
{
return sendMessageDelayed (getPostMessage (r), 0);
}
/// <summary>
/// Causes the Runnable r to be added to the message queue, to be run
/// at a specific time given by <var>uptimeMillis</var>.
/// </summary>
/// <remarks>
/// Causes the Runnable r to be added to the message queue, to be run
/// at a specific time given by <var>uptimeMillis</var>.
/// <b>The time-base is
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// .</b>
/// The runnable will be run on the thread to which this handler is attached.
/// </remarks>
/// <param name="r">The Runnable that will be executed.</param>
/// <param name="uptimeMillis">
/// The absolute time at which the callback should run,
/// using the
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// time-base.
/// </param>
/// <returns>
/// Returns true if the Runnable was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting. Note that a
/// result of true does not mean the Runnable will be processed -- if
/// the looper is quit before the delivery time of the message
/// occurs then the message will be dropped.
/// </returns>
public bool postAtTime (java.lang.Runnable r, long uptimeMillis)
{
return sendMessageAtTime (getPostMessage (r), uptimeMillis);
}
/// <summary>
/// Causes the Runnable r to be added to the message queue, to be run
/// at a specific time given by <var>uptimeMillis</var>.
/// </summary>
/// <remarks>
/// Causes the Runnable r to be added to the message queue, to be run
/// at a specific time given by <var>uptimeMillis</var>.
/// <b>The time-base is
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// .</b>
/// The runnable will be run on the thread to which this handler is attached.
/// </remarks>
/// <param name="r">The Runnable that will be executed.</param>
/// <param name="uptimeMillis">
/// The absolute time at which the callback should run,
/// using the
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// time-base.
/// </param>
/// <returns>
/// Returns true if the Runnable was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting. Note that a
/// result of true does not mean the Runnable will be processed -- if
/// the looper is quit before the delivery time of the message
/// occurs then the message will be dropped.
/// </returns>
/// <seealso cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</seealso>
public bool postAtTime (java.lang.Runnable r, object token, long uptimeMillis)
{
return sendMessageAtTime (getPostMessage (r, token), uptimeMillis);
}
/// <summary>
/// Causes the Runnable r to be added to the message queue, to be run
/// after the specified amount of time elapses.
/// </summary>
/// <remarks>
/// Causes the Runnable r to be added to the message queue, to be run
/// after the specified amount of time elapses.
/// The runnable will be run on the thread to which this handler
/// is attached.
/// </remarks>
/// <param name="r">The Runnable that will be executed.</param>
/// <param name="delayMillis">
/// The delay (in milliseconds) until the Runnable
/// will be executed.
/// </param>
/// <returns>
/// Returns true if the Runnable was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting. Note that a
/// result of true does not mean the Runnable will be processed --
/// if the looper is quit before the delivery time of the message
/// occurs then the message will be dropped.
/// </returns>
public bool postDelayed (java.lang.Runnable r, long delayMillis)
{
return sendMessageDelayed (getPostMessage (r), delayMillis);
}
/// <summary>Posts a message to an object that implements Runnable.</summary>
/// <remarks>
/// Posts a message to an object that implements Runnable.
/// Causes the Runnable r to executed on the next iteration through the
/// message queue. The runnable will be run on the thread to which this
/// handler is attached.
/// <b>This method is only for use in very special circumstances -- it
/// can easily starve the message queue, cause ordering problems, or have
/// other unexpected side-effects.</b>
/// </remarks>
/// <param name="r">The Runnable that will be executed.</param>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool postAtFrontOfQueue (java.lang.Runnable r)
{
return sendMessageAtFrontOfQueue (getPostMessage (r));
}
/// <summary>Remove any pending posts of Runnable r that are in the message queue.</summary>
/// <remarks>Remove any pending posts of Runnable r that are in the message queue.</remarks>
public void removeCallbacks (java.lang.Runnable r)
{
; // FIXME
}
/// <summary>
/// Remove any pending posts of Runnable <var>r</var> with Object
/// <var>token</var> that are in the message queue.
/// </summary>
/// <remarks>
/// Remove any pending posts of Runnable <var>r</var> with Object
/// <var>token</var> that are in the message queue. If <var>token</var> is null,
/// all callbacks will be removed.
/// </remarks>
public void removeCallbacks (java.lang.Runnable r, object token)
{
; // FIXME
}
/// <summary>
/// Pushes a message onto the end of the message queue after all pending messages
/// before the current time.
/// </summary>
/// <remarks>
/// Pushes a message onto the end of the message queue after all pending messages
/// before the current time. It will be received in
/// <see cref="handleMessage(Message)">handleMessage(Message)</see>
/// ,
/// in the thread attached to this handler.
/// </remarks>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool sendMessage (Message msg)
{
return sendMessageDelayed (msg, 0);
}
/// <summary>Sends a Message containing only the what value.</summary>
/// <remarks>Sends a Message containing only the what value.</remarks>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool sendEmptyMessage (int what)
{
return sendEmptyMessageDelayed (what, 0);
}
/// <summary>
/// Sends a Message containing only the what value, to be delivered
/// after the specified amount of time elapses.
/// </summary>
/// <remarks>
/// Sends a Message containing only the what value, to be delivered
/// after the specified amount of time elapses.
/// </remarks>
/// <seealso cref="sendMessageDelayed(Message, long)"></seealso>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool sendEmptyMessageDelayed (int what, long delayMillis)
{
Message msg = Message.obtain ();
msg.what = what;
return sendMessageDelayed (msg, delayMillis);
}
/// <summary>
/// Sends a Message containing only the what value, to be delivered
/// at a specific time.
/// </summary>
/// <remarks>
/// Sends a Message containing only the what value, to be delivered
/// at a specific time.
/// </remarks>
/// <seealso cref="sendMessageAtTime(Message, long)">sendMessageAtTime(Message, long)
/// </seealso>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool sendEmptyMessageAtTime (int what, long uptimeMillis)
{
Message msg = Message.obtain ();
msg.what = what;
return sendMessageAtTime (msg, uptimeMillis);
}
/// <summary>
/// Enqueue a message into the message queue after all pending messages
/// before (current time + delayMillis).
/// </summary>
/// <remarks>
/// Enqueue a message into the message queue after all pending messages
/// before (current time + delayMillis). You will receive it in
/// <see cref="handleMessage(Message)">handleMessage(Message)</see>
/// , in the thread attached to this handler.
/// </remarks>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting. Note that a
/// result of true does not mean the message will be processed -- if
/// the looper is quit before the delivery time of the message
/// occurs then the message will be dropped.
/// </returns>
public bool sendMessageDelayed (Message msg, long delayMillis)
{
if (delayMillis < 0) {
delayMillis = 0;
}
return sendMessageAtTime (msg, SystemClock.uptimeMillis () + delayMillis);
}
/// <summary>
/// Enqueue a message into the message queue after all pending messages
/// before the absolute time (in milliseconds) <var>uptimeMillis</var>.
/// </summary>
/// <remarks>
/// Enqueue a message into the message queue after all pending messages
/// before the absolute time (in milliseconds) <var>uptimeMillis</var>.
/// <b>The time-base is
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// .</b>
/// You will receive it in
/// <see cref="handleMessage(Message)">handleMessage(Message)</see>
/// , in the thread attached
/// to this handler.
/// </remarks>
/// <param name="uptimeMillis">
/// The absolute time at which the message should be
/// delivered, using the
/// <see cref="SystemClock.uptimeMillis()">SystemClock.uptimeMillis()</see>
/// time-base.
/// </param>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting. Note that a
/// result of true does not mean the message will be processed -- if
/// the looper is quit before the delivery time of the message
/// occurs then the message will be dropped.
/// </returns>
public virtual bool sendMessageAtTime (Message msg, long uptimeMillis)
{
XobotActivityManager.SendMessage (this, msg, uptimeMillis);
return true;
}
/// <summary>
/// Enqueue a message at the front of the message queue, to be processed on
/// the next iteration of the message loop.
/// </summary>
/// <remarks>
/// Enqueue a message at the front of the message queue, to be processed on
/// the next iteration of the message loop. You will receive it in
/// <see cref="handleMessage(Message)">handleMessage(Message)</see>
/// , in the thread attached to this handler.
/// <b>This method is only for use in very special circumstances -- it
/// can easily starve the message queue, cause ordering problems, or have
/// other unexpected side-effects.</b>
/// </remarks>
/// <returns>
/// Returns true if the message was successfully placed in to the
/// message queue. Returns false on failure, usually because the
/// looper processing the message queue is exiting.
/// </returns>
public bool sendMessageAtFrontOfQueue (Message msg)
{
throw new NotSupportedException ();
}
/// <summary>
/// Remove any pending posts of messages with code 'what' that are in the
/// message queue.
/// </summary>
/// <remarks>
/// Remove any pending posts of messages with code 'what' that are in the
/// message queue.
/// </remarks>
public void removeMessages (int what)
{
; // FIXME
}
/// <summary>
/// Remove any pending posts of messages with code 'what' and whose obj is
/// 'object' that are in the message queue.
/// </summary>
/// <remarks>
/// Remove any pending posts of messages with code 'what' and whose obj is
/// 'object' that are in the message queue. If <var>token</var> is null,
/// all messages will be removed.
/// </remarks>
public void removeMessages (int what, object @object)
{
; // FIXME
}
/// <summary>
/// Remove any pending posts of callbacks and sent messages whose
/// <var>obj</var> is <var>token</var>.
/// </summary>
/// <remarks>
/// Remove any pending posts of callbacks and sent messages whose
/// <var>obj</var> is <var>token</var>. If <var>token</var> is null,
/// all callbacks and messages will be removed.
/// </remarks>
public void removeCallbacksAndMessages (object token)
{
; // FIXME
}
/// <summary>
/// Check if there are any pending posts of messages with code 'what' in
/// the message queue.
/// </summary>
/// <remarks>
/// Check if there are any pending posts of messages with code 'what' in
/// the message queue.
/// </remarks>
public bool hasMessages (int what)
{
return false;
}
/// <summary>
/// Check if there are any pending posts of messages with code 'what' and
/// whose obj is 'object' in the message queue.
/// </summary>
/// <remarks>
/// Check if there are any pending posts of messages with code 'what' and
/// whose obj is 'object' in the message queue.
/// </remarks>
public bool hasMessages (int what, object @object)
{
return false;
}
// if we can get rid of this method, the handler need not remember its loop
// we could instead export a getMessageQueue() method...
public Looper getLooper ()
{
throw new NotSupportedException ();
}
public void dump (android.util.Printer pw, string prefix)
{
pw.println (prefix + this + " @ " + SystemClock.uptimeMillis ());
}
[Sharpen.OverridesMethod(@"java.lang.Object")]
public override string ToString ()
{
return String.Format ("Handler ({0}) {{{0:x}}}", GetType().FullName, GetHashCode ());
}
private Message getPostMessage (java.lang.Runnable r)
{
Message m = Message.obtain ();
m.callback = r;
return m;
}
private Message getPostMessage (java.lang.Runnable r, object token)
{
Message m = Message.obtain ();
m.obj = token;
m.callback = r;
return m;
}
private void handleCallback (Message message)
{
message.callback.run ();
}
protected readonly Handler.Callback mCallback;
}
}

Просмотреть файл

@ -0,0 +1,194 @@
using Sharpen;
using System;
using System.Threading;
namespace android.os
{
/// <summary>Core timekeeping facilities.</summary>
/// <remarks>
/// Core timekeeping facilities.
/// <p> Three different clocks are available, and they should not be confused:
/// <ul>
/// <li> <p>
/// <see cref="java.lang.System.currentTimeMillis()">System.currentTimeMillis()</see>
/// is the standard "wall" clock (time and date) expressing milliseconds
/// since the epoch. The wall clock can be set by the user or the phone
/// network (see
/// <see cref="setCurrentTimeMillis(long)">setCurrentTimeMillis(long)</see>
/// ), so the time may jump
/// backwards or forwards unpredictably. This clock should only be used
/// when correspondence with real-world dates and times is important, such
/// as in a calendar or alarm clock application. Interval or elapsed
/// time measurements should use a different clock. If you are using
/// System.currentTimeMillis(), consider listening to the
/// <see cref="android.content.Intent.ACTION_TIME_TICK">ACTION_TIME_TICK</see>
/// ,
/// <see cref="android.content.Intent.ACTION_TIME_CHANGED">ACTION_TIME_CHANGED</see>
/// and
/// <see cref="android.content.Intent.ACTION_TIMEZONE_CHANGED">ACTION_TIMEZONE_CHANGED
/// </see>
///
/// <see cref="android.content.Intent">Intent</see>
/// broadcasts to find out when the time changes.
/// <li> <p>
/// <see cref="uptimeMillis()">uptimeMillis()</see>
/// is counted in milliseconds since the
/// system was booted. This clock stops when the system enters deep
/// sleep (CPU off, display dark, device waiting for external input),
/// but is not affected by clock scaling, idle, or other power saving
/// mechanisms. This is the basis for most interval timing
/// such as
/// <see cref="java.lang.Thread.sleep(long)">Thread.sleep(millls)</see>
/// ,
/// <see cref="System.Threading.Monitor.Wait(long)">Object.wait(millis)</see>
/// , and
/// <see cref="java.lang.System.nanoTime()">System.nanoTime()</see>
/// . This clock is guaranteed
/// to be monotonic, and is the recommended basis for the general purpose
/// interval timing of user interface events, performance measurements,
/// and anything else that does not need to measure elapsed time during
/// device sleep. Most methods that accept a timestamp value expect the
/// <see cref="uptimeMillis()">uptimeMillis()</see>
/// clock.
/// <li> <p>
/// <see cref="elapsedRealtime()">elapsedRealtime()</see>
/// is counted in milliseconds since the
/// system was booted, including deep sleep. This clock should be used
/// when measuring time intervals that may span periods of system sleep.
/// </ul>
/// There are several mechanisms for controlling the timing of events:
/// <ul>
/// <li> <p> Standard functions like
/// <see cref="java.lang.Thread.sleep(long)">Thread.sleep(millis)</see>
/// and
/// <see cref="System.Threading.Monitor.Wait(long)">Object.wait(millis)</see>
/// are always available. These functions use the
/// <see cref="uptimeMillis()">uptimeMillis()</see>
/// clock; if the device enters sleep, the remainder of the time will be
/// postponed until the device wakes up. These synchronous functions may
/// be interrupted with
/// <see cref="java.lang.Thread.interrupt()">Thread.interrupt()</see>
/// , and
/// you must handle
/// <see cref="System.Exception">System.Exception</see>
/// .
/// <li> <p>
/// <see cref="sleep(long)">SystemClock.sleep(millis)</see>
/// is a utility function
/// very similar to
/// <see cref="java.lang.Thread.sleep(long)">Thread.sleep(millis)</see>
/// , but it
/// ignores
/// <see cref="System.Exception">System.Exception</see>
/// . Use this function for delays if
/// you do not use
/// <see cref="java.lang.Thread.interrupt()">Thread.interrupt()</see>
/// , as it will
/// preserve the interrupted state of the thread.
/// <li> <p> The
/// <see cref="Handler">Handler</see>
/// class can schedule asynchronous
/// callbacks at an absolute or relative time. Handler objects also use the
/// <see cref="uptimeMillis()">uptimeMillis()</see>
/// clock, and require an
/// <see cref="Looper">event loop</see>
/// (normally present in any GUI application).
/// <li> <p> The
/// <see cref="android.app.AlarmManager">android.app.AlarmManager</see>
/// can trigger one-time or
/// recurring events which occur even when the device is in deep sleep
/// or your application is not running. Events may be scheduled with your
/// choice of
/// <see cref="java.lang.System.currentTimeMillis()">java.lang.System.currentTimeMillis()
/// </see>
/// (RTC) or
/// <see cref="elapsedRealtime()">elapsedRealtime()</see>
/// (ELAPSED_REALTIME), and cause an
/// <see cref="android.content.Intent">android.content.Intent</see>
/// broadcast when they occur.
/// </ul>
/// </remarks>
public static class SystemClock
{
// This space intentionally left blank.
/// <summary>Waits a given number of milliseconds (of uptimeMillis) before returning.
/// </summary>
/// <remarks>
/// Waits a given number of milliseconds (of uptimeMillis) before returning.
/// Similar to
/// <see cref="java.lang.Thread.sleep(long)">java.lang.Thread.sleep(long)</see>
/// , but does not throw
/// <see cref="System.Exception">System.Exception</see>
/// ;
/// <see cref="java.lang.Thread.interrupt()">java.lang.Thread.interrupt()</see>
/// events are
/// deferred until the next interruptible operation. Does not return until
/// at least the specified number of milliseconds has elapsed.
/// </remarks>
/// <param name="ms">to sleep before returning, in milliseconds of uptime.</param>
public static void sleep (long ms)
{
Thread.Sleep ((int)ms);
}
/// <summary>Sets the current wall time, in milliseconds.</summary>
/// <remarks>
/// Sets the current wall time, in milliseconds. Requires the calling
/// process to have appropriate permissions.
/// </remarks>
/// <returns>if the clock was successfully set to the specified time.</returns>
[Sharpen.Stub]
public static bool setCurrentTimeMillis (long millis)
{
throw new System.NotImplementedException ();
}
/// <summary>Returns milliseconds since boot, not counting time spent in deep sleep.</summary>
/// <remarks>
/// Returns milliseconds since boot, not counting time spent in deep sleep.
/// <b>Note:</b> This value may get reset occasionally (before it would
/// otherwise wrap around).
/// </remarks>
/// <returns>milliseconds of non-sleep uptime since boot.</returns>
public static long uptimeMillis ()
{
return unchecked ((uint) System.Environment.TickCount);
}
/// <summary>Returns milliseconds since boot, including time spent in sleep.</summary>
/// <remarks>Returns milliseconds since boot, including time spent in sleep.</remarks>
/// <returns>elapsed milliseconds since boot.</returns>
public static long elapsedRealtime ()
{
return uptimeMillis ();
}
/// <summary>Returns milliseconds running in the current thread.</summary>
/// <remarks>Returns milliseconds running in the current thread.</remarks>
/// <returns>elapsed milliseconds in the thread</returns>
[Sharpen.Stub]
public static long currentThreadTimeMillis ()
{
throw new System.NotImplementedException ();
}
/// <summary>Returns microseconds running in the current thread.</summary>
/// <remarks>Returns microseconds running in the current thread.</remarks>
/// <returns>elapsed microseconds in the thread</returns>
/// <hide></hide>
[Sharpen.Stub]
public static long currentThreadTimeMicro ()
{
throw new System.NotImplementedException ();
}
/// <summary>Returns current wall time in microseconds.</summary>
/// <remarks>Returns current wall time in microseconds.</remarks>
/// <returns>elapsed microseconds in wall time</returns>
/// <hide></hide>
public static long currentTimeMicro ()
{
return DateTime.Now.Ticks;
}
}
}

Просмотреть файл

@ -0,0 +1,122 @@
using Sharpen;
using System;
namespace android.os
{
/// <summary>Gives access to the system properties store.</summary>
/// <remarks>
/// Gives access to the system properties store. The system properties
/// store contains a list of string key-value pairs.
/// <hide></hide>
/// </remarks>
[Sharpen.Sharpened]
public class SystemProperties
{
public const int PROP_NAME_MAX = 31;
public const int PROP_VALUE_MAX = 91;
/// <summary>Get the value for the given key.</summary>
/// <remarks>Get the value for the given key.</remarks>
/// <returns>an empty string if the key isn't found</returns>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
[Sharpen.Stub]
public static string get (string key)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
return string.Empty;
}
/// <summary>Get the value for the given key.</summary>
/// <remarks>Get the value for the given key.</remarks>
/// <returns>if the key isn't found, return def if it isn't null, or an empty string otherwise
/// </returns>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
[Sharpen.Stub]
public static string get (string key, string def)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
return def;
}
/// <summary>Get the value for the given key, and return as an integer.</summary>
/// <remarks>Get the value for the given key, and return as an integer.</remarks>
/// <param name="key">the key to lookup</param>
/// <param name="def">a default value to return</param>
/// <returns>
/// the key parsed as an integer, or def if the key isn't found or
/// cannot be parsed
/// </returns>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
[Sharpen.Stub]
public static int getInt (string key, int def)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
return def;
}
/// <summary>Get the value for the given key, and return as a long.</summary>
/// <remarks>Get the value for the given key, and return as a long.</remarks>
/// <param name="key">the key to lookup</param>
/// <param name="def">a default value to return</param>
/// <returns>
/// the key parsed as a long, or def if the key isn't found or
/// cannot be parsed
/// </returns>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
[Sharpen.Stub]
public static long getLong (string key, long def)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
return def;
}
/// <summary>Get the value for the given key, returned as a boolean.</summary>
/// <remarks>
/// Get the value for the given key, returned as a boolean.
/// Values 'n', 'no', '0', 'false' or 'off' are considered false.
/// Values 'y', 'yes', '1', 'true' or 'on' are considered true.
/// (case sensitive).
/// If the key does not exist, or has any other value, then the default
/// result is returned.
/// </remarks>
/// <param name="key">the key to lookup</param>
/// <param name="def">a default value to return</param>
/// <returns>
/// the key parsed as a boolean, or def if the key isn't found or is
/// not able to be parsed as a boolean.
/// </returns>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
[Sharpen.Stub]
public static bool getBoolean (string key, bool def)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
return def;
}
/// <summary>Set the value for the given key.</summary>
/// <remarks>Set the value for the given key.</remarks>
/// <exception cref="System.ArgumentException">if the key exceeds 32 characters</exception>
/// <exception cref="System.ArgumentException">if the value exceeds 92 characters</exception>
[Sharpen.Stub]
public static void set (string key, string val)
{
if (key.Length > PROP_NAME_MAX) {
throw new ArgumentException ("key.length > " + PROP_NAME_MAX);
}
if (val != null && val.Length > PROP_VALUE_MAX) {
throw new ArgumentException ("val.length > " + PROP_VALUE_MAX);
}
throw new NotImplementedException ();
}
}
}

Просмотреть файл

@ -0,0 +1,33 @@
using System;
using XobotOS.Runtime;
using android.content;
using android.view;
namespace android.policy.@internal
{
[Sharpen.Sharpened]
public static class PolicyManager
{
public static Window makeNewWindow (Context context)
{
return XobotActivityManager.CreateMainWindow (context);
}
public static LayoutInflater makeNewLayoutInflater(Context context)
{
return new XobotLayoutInflater (context);
}
[Sharpen.Stub]
public static WindowManagerPolicy makeNewWindowManager()
{
throw new NotImplementedException ();
}
[Sharpen.Stub]
public static FallbackEventHandler makeNewFallbackEventHandler(Context context)
{
throw new NotImplementedException ();
}
}
}

Просмотреть файл

@ -0,0 +1,83 @@
using System;
using Sharpen;
namespace android.util
{
/// <summary>
/// Math routines similar to those found in
/// <see cref="System.Math">System.Math</see>
/// . Performs
/// computations on
/// <code>float</code>
/// values directly without incurring the overhead
/// of conversions to and from
/// <code>double</code>
/// .
/// <p>On one platform,
/// <code>FloatMath.sqrt(100)</code>
/// executes in one third of the
/// time required by
/// <code>java.lang.Math.sqrt(100)</code>
/// .</p>
/// </summary>
[Sharpen.Sharpened]
public static class FloatMath
{
/// <summary>Returns the float conversion of the most positive (i.e.</summary>
/// <remarks>
/// Returns the float conversion of the most positive (i.e. closest to
/// positive infinity) integer value which is less than the argument.
/// </remarks>
/// <param name="value">to be converted</param>
/// <returns>the floor of value</returns>
public static float floor (float value)
{
return (float)Math.Floor (value);
}
/// <summary>Returns the float conversion of the most negative (i.e.</summary>
/// <remarks>
/// Returns the float conversion of the most negative (i.e. closest to
/// negative infinity) integer value which is greater than the argument.
/// </remarks>
/// <param name="value">to be converted</param>
/// <returns>the ceiling of value</returns>
public static float ceil (float value)
{
return (float)Math.Ceiling (value);
}
/// <summary>Returns the closest float approximation of the sine of the argument.</summary>
/// <remarks>Returns the closest float approximation of the sine of the argument.</remarks>
/// <param name="angle">to compute the cosine of, in radians</param>
/// <returns>the sine of angle</returns>
public static float sin (float angle)
{
return (float)Math.Sin (angle);
}
/// <summary>Returns the closest float approximation of the cosine of the argument.</summary>
/// <remarks>Returns the closest float approximation of the cosine of the argument.</remarks>
/// <param name="angle">to compute the cosine of, in radians</param>
/// <returns>the cosine of angle</returns>
public static float cos (float angle)
{
return (float)Math.Cos (angle);
}
/// <summary>
/// Returns the closest float approximation of the square root of the
/// argument.
/// </summary>
/// <remarks>
/// Returns the closest float approximation of the square root of the
/// argument.
/// </remarks>
/// <param name="value">to compute sqrt of</param>
/// <returns>the square root of value</returns>
public static float sqrt (float value)
{
return (float)Math.Sqrt (value);
}
}
}

Просмотреть файл

@ -0,0 +1,404 @@
using System;
using Sharpen;
namespace android.util
{
/// <summary>SparseArrays map longs to Objects.</summary>
/// <remarks>
/// SparseArrays map longs to Objects. Unlike a normal array of Objects,
/// there can be gaps in the indices. It is intended to be more efficient
/// than using a HashMap to map Longs to Objects.
/// </remarks>
/// <hide></hide>
[Sharpen.Sharpened]
public class LongSparseArray<E>
{
private struct Entry
{
public bool IsDeleted;
public E Value;
public Entry (E value)
{
this.Value = value;
this.IsDeleted = false;
}
}
private bool mGarbage = false;
/// <summary>Creates a new SparseArray containing no mappings.</summary>
/// <remarks>Creates a new SparseArray containing no mappings.</remarks>
public LongSparseArray () : this(10)
{
}
/// <summary>
/// Creates a new SparseArray containing no mappings that will not
/// require any additional memory allocation to store the specified
/// number of mappings.
/// </summary>
/// <remarks>
/// Creates a new SparseArray containing no mappings that will not
/// require any additional memory allocation to store the specified
/// number of mappings.
/// </remarks>
public LongSparseArray (int initialCapacity)
{
initialCapacity = android.util.@internal.ArrayUtils.idealIntArraySize (initialCapacity
);
mKeys = new long[initialCapacity];
mValues = new Entry[initialCapacity];
mSize = 0;
}
/// <returns>A copy of all keys contained in the sparse array.</returns>
public virtual long[] getKeys ()
{
int length = mKeys.Length;
long[] result = new long[length];
System.Array.Copy (mKeys, 0, result, 0, length);
return result;
}
/// <summary>Sets all supplied keys to the given unique value.</summary>
/// <remarks>Sets all supplied keys to the given unique value.</remarks>
/// <param name="keys">Keys to set</param>
/// <param name="uniqueValue">Value to set all supplied keys to</param>
public virtual void setValues (long[] keys, E uniqueValue)
{
int length = keys.Length;
{
for (int i = 0; i < length; i++) {
put (keys [i], uniqueValue);
}
}
}
/// <summary>
/// Gets the Object mapped from the specified key, or <code>null</code>
/// if no such mapping has been made.
/// </summary>
/// <remarks>
/// Gets the Object mapped from the specified key, or <code>null</code>
/// if no such mapping has been made.
/// </remarks>
public virtual E get (long key)
{
return get (key, default (E));
}
/// <summary>
/// Gets the Object mapped from the specified key, or the specified Object
/// if no such mapping has been made.
/// </summary>
/// <remarks>
/// Gets the Object mapped from the specified key, or the specified Object
/// if no such mapping has been made.
/// </remarks>
public virtual E get (long key, E valueIfKeyNotFound)
{
int i = binarySearch (mKeys, 0, mSize, key);
if (i < 0 || mValues [i].IsDeleted) {
return valueIfKeyNotFound;
} else {
return mValues [i].Value;
}
}
/// <summary>Removes the mapping from the specified key, if there was any.</summary>
/// <remarks>Removes the mapping from the specified key, if there was any.</remarks>
public virtual void delete (long key)
{
int i = binarySearch (mKeys, 0, mSize, key);
if (i >= 0) {
if (!mValues [i].IsDeleted) {
mValues [i].IsDeleted = true;
mGarbage = true;
}
}
}
/// <summary>
/// Alias for
/// <see cref="LongSparseArray{E}.delete(long)">LongSparseArray&lt;E&gt;.delete(long)
/// </see>
/// .
/// </summary>
public virtual void remove (long key)
{
delete (key);
}
private void gc ()
{
// Log.e("SparseArray", "gc start with " + mSize);
int n = mSize;
int o = 0;
long[] keys = mKeys;
Entry[] values = mValues;
{
for (int i = 0; i < n; i++) {
Entry val = values [i];
if (!val.IsDeleted) {
if (i != o) {
keys [o] = keys [i];
values [o] = val;
}
o++;
}
}
}
mGarbage = false;
mSize = o;
}
// Log.e("SparseArray", "gc end with " + mSize);
/// <summary>
/// Adds a mapping from the specified key to the specified value,
/// replacing the previous mapping from the specified key if there
/// was one.
/// </summary>
/// <remarks>
/// Adds a mapping from the specified key to the specified value,
/// replacing the previous mapping from the specified key if there
/// was one.
/// </remarks>
public virtual void put (long key, E value)
{
int i = binarySearch (mKeys, 0, mSize, key);
if (i >= 0) {
mValues [i] = new Entry (value);
} else {
i = ~i;
if (i < mSize && mValues [i].IsDeleted) {
mKeys [i] = key;
mValues [i] = new Entry (value);
return;
}
if (mGarbage && mSize >= mKeys.Length) {
gc ();
// Search again because indices may have changed.
i = ~binarySearch (mKeys, 0, mSize, key);
}
if (mSize >= mKeys.Length) {
int n = android.util.@internal.ArrayUtils.idealIntArraySize (mSize + 1);
long[] nkeys = new long[n];
Entry[] nvalues = new Entry[n];
// Log.e("SparseArray", "grow " + mKeys.length + " to " + n);
System.Array.Copy (mKeys, 0, nkeys, 0, mKeys.Length);
System.Array.Copy (mValues, 0, nvalues, 0, mValues.Length);
mKeys = nkeys;
mValues = nvalues;
}
if (mSize - i != 0) {
// Log.e("SparseArray", "move " + (mSize - i));
System.Array.Copy (mKeys, i, mKeys, i + 1, mSize - i);
System.Array.Copy (mValues, i, mValues, i + 1, mSize - i);
}
mKeys [i] = key;
mValues [i] = new Entry (value);
mSize++;
}
}
/// <summary>
/// Returns the number of key-value mappings that this SparseArray
/// currently stores.
/// </summary>
/// <remarks>
/// Returns the number of key-value mappings that this SparseArray
/// currently stores.
/// </remarks>
public virtual int size ()
{
if (mGarbage) {
gc ();
}
return mSize;
}
/// <summary>
/// Given an index in the range <code>0...size()-1</code>, returns
/// the key from the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </summary>
/// <remarks>
/// Given an index in the range <code>0...size()-1</code>, returns
/// the key from the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </remarks>
public virtual long keyAt (int index)
{
if (mGarbage) {
gc ();
}
return mKeys [index];
}
/// <summary>
/// Given an index in the range <code>0...size()-1</code>, returns
/// the value from the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </summary>
/// <remarks>
/// Given an index in the range <code>0...size()-1</code>, returns
/// the value from the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </remarks>
public virtual E valueAt (int index)
{
if (mGarbage) {
gc ();
}
return mValues [index].Value;
}
/// <summary>
/// Given an index in the range <code>0...size()-1</code>, sets a new
/// value for the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </summary>
/// <remarks>
/// Given an index in the range <code>0...size()-1</code>, sets a new
/// value for the <code>index</code>th key-value mapping that this
/// SparseArray stores.
/// </remarks>
public virtual void setValueAt (int index, E value)
{
if (mGarbage) {
gc ();
}
mValues [index].Value = value;
}
/// <summary>
/// Returns the index for which
/// <see cref="LongSparseArray{E}.keyAt(int)">LongSparseArray&lt;E&gt;.keyAt(int)</see>
/// would return the
/// specified key, or a negative number if the specified
/// key is not mapped.
/// </summary>
public virtual int indexOfKey (long key)
{
if (mGarbage) {
gc ();
}
return binarySearch (mKeys, 0, mSize, key);
}
/// <summary>
/// Returns an index for which
/// <see cref="LongSparseArray{E}.valueAt(int)">LongSparseArray&lt;E&gt;.valueAt(int)
/// </see>
/// would return the
/// specified key, or a negative number if no keys map to the
/// specified value.
/// Beware that this is a linear search, unlike lookups by key,
/// and that multiple keys can map to the same value and this will
/// find only one of them.
/// </summary>
public virtual int indexOfValue (E value)
{
if (mGarbage) {
gc ();
}
{
for (int i = 0; i < mSize; i++) {
if (mValues [i].Value.Equals (value)) {
return i;
}
}
}
return -1;
}
/// <summary>Removes all key-value mappings from this SparseArray.</summary>
/// <remarks>Removes all key-value mappings from this SparseArray.</remarks>
public virtual void clear ()
{
int n = mSize;
for (int i = 0; i < n; i++)
mValues [i] = new Entry (default (E));
mSize = 0;
mGarbage = false;
}
/// <summary>
/// Puts a key/value pair into the array, optimizing for the case where
/// the key is greater than all existing keys in the array.
/// </summary>
/// <remarks>
/// Puts a key/value pair into the array, optimizing for the case where
/// the key is greater than all existing keys in the array.
/// </remarks>
public virtual void append (long key, E value)
{
if (mSize != 0 && key <= mKeys [mSize - 1]) {
put (key, value);
return;
}
if (mGarbage && mSize >= mKeys.Length) {
gc ();
}
int pos = mSize;
if (pos >= mKeys.Length) {
int n = android.util.@internal.ArrayUtils.idealIntArraySize (pos + 1);
long[] nkeys = new long[n];
Entry[] nvalues = new Entry[n];
// Log.e("SparseArray", "grow " + mKeys.length + " to " + n);
System.Array.Copy (mKeys, 0, nkeys, 0, mKeys.Length);
System.Array.Copy (mValues, 0, nvalues, 0, mValues.Length);
mKeys = nkeys;
mValues = nvalues;
}
mKeys [pos] = key;
mValues [pos] = new Entry (value);
mSize = pos + 1;
}
private static int binarySearch (long[] a, int start, int len, long key)
{
int high = start + len;
int low = start - 1;
int guess;
while (high - low > 1) {
guess = (high + low) / 2;
if (a [guess] < key) {
low = guess;
} else {
high = guess;
}
}
if (high == start + len) {
return ~(start + len);
} else {
if (a [high] == key) {
return high;
} else {
return ~high;
}
}
}
private void checkIntegrity ()
{
{
for (int i = 1; i < mSize; i++) {
if (mKeys [i] <= mKeys [i - 1]) {
{
for (int j = 0; j < mSize; j++) {
android.util.Log.e ("FAIL", j + ": " + mKeys [j] + " -> " + mValues [j]);
}
}
throw new java.lang.RuntimeException ();
}
}
}
}
private long[] mKeys;
private Entry[] mValues;
private int mSize;
}
}

Просмотреть файл

@ -0,0 +1,789 @@
using Sharpen;
using System;
namespace android.view
{
/// <summary>Describes the keys provided by a keyboard device and their associated labels.
/// </summary>
/// <remarks>Describes the keys provided by a keyboard device and their associated labels.
/// </remarks>
[Sharpen.Sharpened]
public class KeyCharacterMap
{
/// <summary>The id of the device's primary built in keyboard is always 0.</summary>
/// <remarks>The id of the device's primary built in keyboard is always 0.</remarks>
[System.ObsoleteAttribute(@"This constant should no longer be used because there is no guarantee that a device has a built-in keyboard that can be used for typing text. There might not be a built-in keyboard, the built-in keyboard might be a NUMERIC or SPECIAL_FUNCTION keyboard, or there might be multiple keyboards installed including external keyboards. When interpreting key presses received from the framework, applications should use the device id specified in the KeyEvent received. When synthesizing key presses for delivery elsewhere or when translating key presses from unknown keyboards, applications should use the special VIRTUAL_KEYBOARD device id.")]
public const int BUILT_IN_KEYBOARD = 0;
/// <summary>
/// The id of a generic virtual keyboard with a full layout that can be used to
/// synthesize key events.
/// </summary>
/// <remarks>
/// The id of a generic virtual keyboard with a full layout that can be used to
/// synthesize key events. Typically used with
/// <see cref="getEvents(char[])">getEvents(char[])</see>
/// .
/// </remarks>
public const int VIRTUAL_KEYBOARD = -1;
/// <summary>A numeric (12-key) keyboard.</summary>
/// <remarks>
/// A numeric (12-key) keyboard.
/// <p>
/// A numeric keyboard supports text entry using a multi-tap approach.
/// It may be necessary to tap a key multiple times to generate the desired letter
/// or symbol.
/// </p><p>
/// This type of keyboard is generally designed for thumb typing.
/// </p>
/// </remarks>
public const int NUMERIC = 1;
/// <summary>A keyboard with all the letters, but with more than one letter per key.</summary>
/// <remarks>
/// A keyboard with all the letters, but with more than one letter per key.
/// <p>
/// This type of keyboard is generally designed for thumb typing.
/// </p>
/// </remarks>
public const int PREDICTIVE = 2;
/// <summary>A keyboard with all the letters, and maybe some numbers.</summary>
/// <remarks>
/// A keyboard with all the letters, and maybe some numbers.
/// <p>
/// An alphabetic keyboard supports text entry directly but may have a condensed
/// layout with a small form factor. In contrast to a
/// <see cref="FULL">full keyboard</see>
/// , some
/// symbols may only be accessible using special on-screen character pickers.
/// In addition, to improve typing speed and accuracy, the framework provides
/// special affordances for alphabetic keyboards such as auto-capitalization
/// and toggled / locked shift and alt keys.
/// </p><p>
/// This type of keyboard is generally designed for thumb typing.
/// </p>
/// </remarks>
public const int ALPHA = 3;
/// <summary>A full PC-style keyboard.</summary>
/// <remarks>
/// A full PC-style keyboard.
/// <p>
/// A full keyboard behaves like a PC keyboard. All symbols are accessed directly
/// by pressing keys on the keyboard without on-screen support or affordances such
/// as auto-capitalization.
/// </p><p>
/// This type of keyboard is generally designed for full two hand typing.
/// </p>
/// </remarks>
public const int FULL = 4;
/// <summary>A keyboard that is only used to control special functions rather than for typing.
/// </summary>
/// <remarks>
/// A keyboard that is only used to control special functions rather than for typing.
/// <p>
/// A special function keyboard consists only of non-printing keys such as
/// HOME and POWER that are not actually used for typing.
/// </p>
/// </remarks>
public const int SPECIAL_FUNCTION = 5;
/// <summary>
/// This private-use character is used to trigger Unicode character
/// input by hex digits.
/// </summary>
/// <remarks>
/// This private-use character is used to trigger Unicode character
/// input by hex digits.
/// </remarks>
public const char HEX_INPUT = '\uEF00';
/// <summary>
/// This private-use character is used to bring up a character picker for
/// miscellaneous symbols.
/// </summary>
/// <remarks>
/// This private-use character is used to bring up a character picker for
/// miscellaneous symbols.
/// </remarks>
public const char PICKER_DIALOG_INPUT = '\uEF01';
/// <summary>Modifier keys may be chorded with character keys.</summary>
/// <remarks>Modifier keys may be chorded with character keys.</remarks>
/// <seealso>{#link #getModifierBehavior()} for more details.</seealso>
public const int MODIFIER_BEHAVIOR_CHORDED = 0;
/// <summary>
/// Modifier keys may be chorded with character keys or they may toggle
/// into latched or locked states when pressed independently.
/// </summary>
/// <remarks>
/// Modifier keys may be chorded with character keys or they may toggle
/// into latched or locked states when pressed independently.
/// </remarks>
/// <seealso>{#link #getModifierBehavior()} for more details.</seealso>
public const int MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED = 1;
private static android.util.SparseArray<KeyCharacterMap> sInstances =
new android.util.SparseArray<KeyCharacterMap> ();
private readonly int mDeviceId;
private KeyCharacterMap (int deviceId)
{
mDeviceId = deviceId;
}
/// <summary>Loads the key character maps for the keyboard with the specified device id.
/// </summary>
/// <remarks>Loads the key character maps for the keyboard with the specified device id.
/// </remarks>
/// <param name="deviceId">The device id of the keyboard.</param>
/// <returns>The associated key character map.</returns>
/// <exception>
/// {@link UnavailableException} if the key character map
/// could not be loaded because it was malformed or the default key character map
/// is missing from the system.
/// </exception>
public static KeyCharacterMap load (int deviceId)
{
lock (sInstances) {
KeyCharacterMap map = sInstances.get (deviceId);
if (map == null) {
map = new KeyCharacterMap (deviceId);
sInstances.put (deviceId, map);
}
return map;
}
}
/// <summary>
/// Gets the Unicode character generated by the specified key and meta
/// key state combination.
/// </summary>
/// <remarks>
/// Gets the Unicode character generated by the specified key and meta
/// key state combination.
/// <p>
/// Returns the Unicode character that the specified key would produce
/// when the specified meta bits (see
/// <see cref="android.text.method.MetaKeyKeyListener">android.text.method.MetaKeyKeyListener
/// </see>
/// )
/// were active.
/// </p><p>
/// Returns 0 if the key is not one that is used to type Unicode
/// characters.
/// </p><p>
/// If the return value has bit
/// <see cref="COMBINING_ACCENT">COMBINING_ACCENT</see>
/// set, the
/// key is a "dead key" that should be combined with another to
/// actually produce a character -- see
/// <see cref="getDeadChar(int, int)">getDeadChar(int, int)</see>
/// --
/// after masking with
/// <see cref="COMBINING_ACCENT_MASK">COMBINING_ACCENT_MASK</see>
/// .
/// </p>
/// </remarks>
/// <param name="keyCode">The key code.</param>
/// <param name="metaState">The meta key modifier state.</param>
/// <returns>The associated character or combining accent, or 0 if none.</returns>
public virtual int get (int keyCode, int metaState)
{
int ch = KeyEvent.GetUnicodeChar (keyCode, metaState);
int map = COMBINING.get (ch);
if (map != 0) {
return map;
} else {
return ch;
}
}
/// <summary>
/// Gets the fallback action to perform if the application does not
/// handle the specified key.
/// </summary>
/// <remarks>
/// Gets the fallback action to perform if the application does not
/// handle the specified key.
/// <p>
/// When an application does not handle a particular key, the system may
/// translate the key to an alternate fallback key (specified in the
/// fallback action) and dispatch it to the application.
/// The event containing the fallback key is flagged
/// with
/// <see cref="KeyEvent.FLAG_FALLBACK">KeyEvent.FLAG_FALLBACK</see>
/// .
/// </p>
/// </remarks>
/// <param name="keyCode">The key code.</param>
/// <param name="metaState">The meta key modifier state.</param>
/// <param name="outFallbackAction">The fallback action object to populate.</param>
/// <returns>True if a fallback action was found, false otherwise.</returns>
/// <hide></hide>
[Sharpen.Stub]
public virtual bool getFallbackAction (int keyCode, int metaState, KeyCharacterMap
.FallbackAction outFallbackAction)
{
if (outFallbackAction == null) {
throw new System.ArgumentException ("fallbackAction must not be null");
}
metaState = KeyEvent.normalizeMetaState (metaState);
throw new NotImplementedException ();
}
/// <summary>Gets the number or symbol associated with the key.</summary>
/// <remarks>
/// Gets the number or symbol associated with the key.
/// <p>
/// The character value is returned, not the numeric value.
/// If the key is not a number, but is a symbol, the symbol is retuned.
/// </p><p>
/// This method is intended to to support dial pads and other numeric or
/// symbolic entry on keyboards where certain keys serve dual function
/// as alphabetic and symbolic keys. This method returns the number
/// or symbol associated with the key independent of whether the user
/// has pressed the required modifier.
/// </p><p>
/// For example, on one particular keyboard the keys on the top QWERTY row generate
/// numbers when ALT is pressed such that ALT-Q maps to '1'. So for that keyboard
/// when
/// <see cref="getNumber(int)">getNumber(int)</see>
/// is called with
/// <see cref="KeyEvent.KEYCODE_Q">KeyEvent.KEYCODE_Q</see>
/// it returns '1'
/// so that the user can type numbers without pressing ALT when it makes sense.
/// </p>
/// </remarks>
/// <param name="keyCode">The key code.</param>
/// <returns>The associated numeric or symbolic character, or 0 if none.</returns>
[Sharpen.Stub]
public virtual char getNumber (int keyCode)
{
throw new NotImplementedException ();
}
/// <summary>
/// Gets the first character in the character array that can be generated
/// by the specified key code.
/// </summary>
/// <remarks>
/// Gets the first character in the character array that can be generated
/// by the specified key code.
/// <p>
/// This is a convenience function that returns the same value as
/// <see cref="getMatch(int, char[], int)">getMatch(keyCode, chars, 0)</see>
/// .
/// </p>
/// </remarks>
/// <param name="keyCode">The keycode.</param>
/// <param name="chars">The array of matching characters to consider.</param>
/// <returns>The matching associated character, or 0 if none.</returns>
public virtual char getMatch (int keyCode, char[] chars)
{
return getMatch (keyCode, chars, 0);
}
/// <summary>
/// Gets the first character in the character array that can be generated
/// by the specified key code.
/// </summary>
/// <remarks>
/// Gets the first character in the character array that can be generated
/// by the specified key code. If there are multiple choices, prefers
/// the one that would be generated with the specified meta key modifier state.
/// </remarks>
/// <param name="keyCode">The key code.</param>
/// <param name="chars">The array of matching characters to consider.</param>
/// <param name="metaState">The preferred meta key modifier state.</param>
/// <returns>The matching associated character, or 0 if none.</returns>
[Sharpen.Stub]
public virtual char getMatch (int keyCode, char[] chars, int metaState)
{
if (chars == null) {
throw new System.ArgumentException ("chars must not be null.");
}
metaState = KeyEvent.normalizeMetaState (metaState);
throw new NotImplementedException ();
}
/// <summary>Gets the primary character for this key.</summary>
/// <remarks>
/// Gets the primary character for this key.
/// In other words, the label that is physically printed on it.
/// </remarks>
/// <param name="keyCode">The key code.</param>
/// <returns>The display label character, or 0 if none (eg. for non-printing keys).</returns>
[Sharpen.Stub]
public virtual char getDisplayLabel (int keyCode)
{
throw new NotImplementedException ();
}
/// <summary>Get the character that is produced by putting accent on the character c.
/// </summary>
/// <remarks>
/// Get the character that is produced by putting accent on the character c.
/// For example, getDeadChar('`', 'e') returns &egrave;.
/// </remarks>
/// <param name="accent">The accent character. eg. '`'</param>
/// <param name="c">The basic character.</param>
/// <returns>The combined character, or 0 if the characters cannot be combined.</returns>
public static int getDeadChar (int accent, int c)
{
return DEAD.get ((accent << 16) | c);
}
/// <summary>Describes the character mappings associated with a key.</summary>
/// <remarks>Describes the character mappings associated with a key.</remarks>
[System.ObsoleteAttribute(@"instead use KeyCharacterMap.getDisplayLabel(int) ,KeyCharacterMap.getNumber(int) and KeyCharacterMap.get(int, int) ."
)]
public class KeyData
{
public const int META_LENGTH = 4;
/// <summary>
/// The display label (see
/// <see cref="#getDisplayLabel">#getDisplayLabel</see>
/// ).
/// </summary>
public char displayLabel;
/// <summary>
/// The "number" value (see
/// <see cref="#getNumber">#getNumber</see>
/// ).
/// </summary>
public char number;
/// <summary>
/// The character that will be generated in various meta states
/// (the same ones used for
/// <see cref="#get">#get</see>
/// and defined as
/// <see cref="KeyEvent.META_SHIFT_ON">KeyEvent.META_SHIFT_ON</see>
/// and
/// <see cref="KeyEvent.META_ALT_ON">KeyEvent.META_ALT_ON</see>
/// ).
/// <table>
/// <tr><th>Index</th><th align="left">Value</th></tr>
/// <tr><td>0</td><td>no modifiers</td></tr>
/// <tr><td>1</td><td>caps</td></tr>
/// <tr><td>2</td><td>alt</td></tr>
/// <tr><td>3</td><td>caps + alt</td></tr>
/// </table>
/// </summary>
public char[] meta = new char[META_LENGTH];
}
/// <summary>Get the character conversion data for a given key code.</summary>
/// <remarks>Get the character conversion data for a given key code.</remarks>
/// <param name="keyCode">The keyCode to query.</param>
/// <param name="results">
/// A
/// <see cref="KeyData">KeyData</see>
/// instance that will be filled with the results.
/// </param>
/// <returns>True if the key was mapped. If the key was not mapped, results is not modified.
/// </returns>
[System.ObsoleteAttribute(@"instead use getDisplayLabel(int) ,getNumber(int) or get(int, int) .")]
[Sharpen.Stub]
public virtual bool getKeyData (int keyCode, KeyCharacterMap.KeyData results)
{
throw new NotImplementedException ();
}
/// <summary>
/// Get an array of KeyEvent objects that if put into the input stream
/// could plausibly generate the provided sequence of characters.
/// </summary>
/// <remarks>
/// Get an array of KeyEvent objects that if put into the input stream
/// could plausibly generate the provided sequence of characters. It is
/// not guaranteed that the sequence is the only way to generate these
/// events or that it is optimal.
/// <p>
/// This function is primarily offered for instrumentation and testing purposes.
/// It may fail to map characters to key codes. In particular, the key character
/// map for the
/// <see cref="BUILT_IN_KEYBOARD">built-in keyboard</see>
/// device id may be empty.
/// Consider using the key character map associated with the
/// <see cref="VIRTUAL_KEYBOARD">virtual keyboard</see>
/// device id instead.
/// </p><p>
/// For robust text entry, do not use this function. Instead construct a
/// <see cref="KeyEvent">KeyEvent</see>
/// with action code
/// <see cref="KeyEvent.ACTION_MULTIPLE">KeyEvent.ACTION_MULTIPLE</see>
/// that contains
/// the desired string using
/// <see cref="KeyEvent.KeyEvent(long, string, int, int)">KeyEvent.KeyEvent(long, string, int, int)
/// </see>
/// .
/// </p>
/// </remarks>
/// <param name="chars">The sequence of characters to generate.</param>
/// <returns>
/// An array of
/// <see cref="KeyEvent">KeyEvent</see>
/// objects, or null if the given char array
/// can not be generated using the current key character map.
/// </returns>
[Sharpen.Stub]
public virtual KeyEvent[] getEvents (char[] chars)
{
if (chars == null) {
throw new System.ArgumentException ("chars must not be null.");
}
throw new NotImplementedException ();
}
/// <summary>Returns true if the specified key produces a glyph.</summary>
/// <remarks>Returns true if the specified key produces a glyph.</remarks>
/// <param name="keyCode">The key code.</param>
/// <returns>True if the key is a printing key.</returns>
public virtual bool isPrintingKey (int keyCode)
{
int type = Sharpen.CharHelper.GetType (getDisplayLabel (keyCode));
switch (type) {
case Sharpen.CharHelper.SPACE_SEPARATOR:
case Sharpen.CharHelper.LINE_SEPARATOR:
case Sharpen.CharHelper.PARAGRAPH_SEPARATOR:
case Sharpen.CharHelper.CONTROL:
case Sharpen.CharHelper.FORMAT:
{
return false;
}
default:
{
return true;
break;
}
}
}
/// <summary>Gets the keyboard type.</summary>
/// <remarks>
/// Gets the keyboard type.
/// Returns
/// <see cref="NUMERIC">NUMERIC</see>
/// ,
/// <see cref="PREDICTIVE">PREDICTIVE</see>
/// ,
/// <see cref="ALPHA">ALPHA</see>
/// or
/// <see cref="FULL">FULL</see>
/// .
/// <p>
/// Different keyboard types have different semantics. Refer to the documentation
/// associated with the keyboard type constants for details.
/// </p>
/// </remarks>
/// <returns>The keyboard type.</returns>
[Sharpen.Stub]
public virtual int getKeyboardType ()
{
return FULL;
}
/// <summary>
/// Gets a constant that describes the behavior of this keyboard's modifier keys
/// such as
/// <see cref="KeyEvent.KEYCODE_SHIFT_LEFT">KeyEvent.KEYCODE_SHIFT_LEFT</see>
/// .
/// <p>
/// Currently there are two behaviors that may be combined:
/// </p>
/// <ul>
/// <li>Chorded behavior: When the modifier key is pressed together with one or more
/// character keys, the keyboard inserts the modified keys and
/// then resets the modifier state when the modifier key is released.</li>
/// <li>Toggled behavior: When the modifier key is pressed and released on its own
/// it first toggles into a latched state. When latched, the modifier will apply
/// to next character key that is pressed and will then reset itself to the initial state.
/// If the modifier is already latched and the modifier key is pressed and release on
/// its own again, then it toggles into a locked state. When locked, the modifier will
/// apply to all subsequent character keys that are pressed until unlocked by pressing
/// the modifier key on its own one more time to reset it to the initial state.
/// Toggled behavior is useful for small profile keyboards designed for thumb typing.
/// </ul>
/// <p>
/// This function currently returns
/// <see cref="MODIFIER_BEHAVIOR_CHORDED">MODIFIER_BEHAVIOR_CHORDED</see>
/// when the
/// <see cref="getKeyboardType()">keyboard type</see>
/// is
/// <see cref="FULL">FULL</see>
/// or
/// <see cref="SPECIAL_FUNCTION">SPECIAL_FUNCTION</see>
/// and
/// <see cref="MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED">MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED
/// </see>
/// otherwise.
/// In the future, the function may also take into account global keyboard
/// accessibility settings, other user preferences, or new device capabilities.
/// </p>
/// </summary>
/// <returns>The modifier behavior for this keyboard.</returns>
/// <seealso>
///
/// <see cref="MODIFIER_BEHAVIOR_CHORDED">MODIFIER_BEHAVIOR_CHORDED</see>
/// </seealso>
/// <seealso>
///
/// <see cref="MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED">MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED
/// </see>
/// </seealso>
public virtual int getModifierBehavior ()
{
switch (getKeyboardType ()) {
case FULL:
case SPECIAL_FUNCTION:
{
return MODIFIER_BEHAVIOR_CHORDED;
}
default:
{
return MODIFIER_BEHAVIOR_CHORDED_OR_TOGGLED;
break;
}
}
}
/// <summary>
/// Queries the framework about whether any physical keys exist on the
/// any keyboard attached to the device that are capable of producing the given key code.
/// </summary>
/// <remarks>
/// Queries the framework about whether any physical keys exist on the
/// any keyboard attached to the device that are capable of producing the given key code.
/// </remarks>
/// <param name="keyCode">The key code to query.</param>
/// <returns>True if at least one attached keyboard supports the specified key code.</returns>
public static bool deviceHasKey (int keyCode)
{
int[] codeArray = new int[1];
codeArray [0] = keyCode;
bool[] ret = deviceHasKeys (codeArray);
return ret [0];
}
/// <summary>
/// Queries the framework about whether any physical keys exist on the
/// any keyboard attached to the device that are capable of producing the given
/// array of key codes.
/// </summary>
/// <remarks>
/// Queries the framework about whether any physical keys exist on the
/// any keyboard attached to the device that are capable of producing the given
/// array of key codes.
/// </remarks>
/// <param name="keyCodes">The array of key codes to query.</param>
/// <returns>
/// A new array of the same size as the key codes array whose elements
/// are set to true if at least one attached keyboard supports the corresponding key code
/// at the same index in the key codes array.
/// </returns>
public static bool[] deviceHasKeys (int[] keyCodes)
{
bool[] ret = new bool[keyCodes.Length];
IWindowManager wm = Display.getWindowManager ();
try {
wm.hasKeys (keyCodes, ret);
} catch (android.os.RemoteException) {
}
// no fallback; just return the empty array
return ret;
}
/// <summary>
/// Maps Unicode combining diacritical to display-form dead key
/// (display character shifted left 16 bits).
/// </summary>
/// <remarks>
/// Maps Unicode combining diacritical to display-form dead key
/// (display character shifted left 16 bits).
/// </remarks>
private static android.util.SparseIntArray COMBINING = new android.util.SparseIntArray
();
/// <summary>
/// Maps combinations of (display-form) dead key and second character
/// to combined output character.
/// </summary>
/// <remarks>
/// Maps combinations of (display-form) dead key and second character
/// to combined output character.
/// </remarks>
private static android.util.SparseIntArray DEAD = new android.util.SparseIntArray
();
private const int ACUTE = '\u00B4' << 16;
private const int GRAVE = '`' << 16;
private const int CIRCUMFLEX = '^' << 16;
private const int TILDE = '~' << 16;
private const int UMLAUT = '\u00A8' << 16;
public const int COMBINING_ACCENT = unchecked((int)(0x80000000));
/// <summary>
/// Mask the return value from
/// <see cref="get(int, int)">get(int, int)</see>
/// with this value to get
/// a printable representation of the accent character of a "dead key."
/// </summary>
public const int COMBINING_ACCENT_MASK = unchecked((int)(0x7FFFFFFF));
static KeyCharacterMap ()
{
COMBINING.put ('\u0300', (GRAVE >> 16) | COMBINING_ACCENT);
COMBINING.put ('\u0301', (ACUTE >> 16) | COMBINING_ACCENT);
COMBINING.put ('\u0302', (CIRCUMFLEX >> 16) | COMBINING_ACCENT);
COMBINING.put ('\u0303', (TILDE >> 16) | COMBINING_ACCENT);
COMBINING.put ('\u0308', (UMLAUT >> 16) | COMBINING_ACCENT);
DEAD.put (ACUTE | 'A', '\u00C1');
DEAD.put (ACUTE | 'C', '\u0106');
DEAD.put (ACUTE | 'E', '\u00C9');
DEAD.put (ACUTE | 'G', '\u01F4');
DEAD.put (ACUTE | 'I', '\u00CD');
DEAD.put (ACUTE | 'K', '\u1E30');
DEAD.put (ACUTE | 'L', '\u0139');
DEAD.put (ACUTE | 'M', '\u1E3E');
DEAD.put (ACUTE | 'N', '\u0143');
DEAD.put (ACUTE | 'O', '\u00D3');
DEAD.put (ACUTE | 'P', '\u1E54');
DEAD.put (ACUTE | 'R', '\u0154');
DEAD.put (ACUTE | 'S', '\u015A');
DEAD.put (ACUTE | 'U', '\u00DA');
DEAD.put (ACUTE | 'W', '\u1E82');
DEAD.put (ACUTE | 'Y', '\u00DD');
DEAD.put (ACUTE | 'Z', '\u0179');
DEAD.put (ACUTE | 'a', '\u00E1');
DEAD.put (ACUTE | 'c', '\u0107');
DEAD.put (ACUTE | 'e', '\u00E9');
DEAD.put (ACUTE | 'g', '\u01F5');
DEAD.put (ACUTE | 'i', '\u00ED');
DEAD.put (ACUTE | 'k', '\u1E31');
DEAD.put (ACUTE | 'l', '\u013A');
DEAD.put (ACUTE | 'm', '\u1E3F');
DEAD.put (ACUTE | 'n', '\u0144');
DEAD.put (ACUTE | 'o', '\u00F3');
DEAD.put (ACUTE | 'p', '\u1E55');
DEAD.put (ACUTE | 'r', '\u0155');
DEAD.put (ACUTE | 's', '\u015B');
DEAD.put (ACUTE | 'u', '\u00FA');
DEAD.put (ACUTE | 'w', '\u1E83');
DEAD.put (ACUTE | 'y', '\u00FD');
DEAD.put (ACUTE | 'z', '\u017A');
DEAD.put (CIRCUMFLEX | 'A', '\u00C2');
DEAD.put (CIRCUMFLEX | 'C', '\u0108');
DEAD.put (CIRCUMFLEX | 'E', '\u00CA');
DEAD.put (CIRCUMFLEX | 'G', '\u011C');
DEAD.put (CIRCUMFLEX | 'H', '\u0124');
DEAD.put (CIRCUMFLEX | 'I', '\u00CE');
DEAD.put (CIRCUMFLEX | 'J', '\u0134');
DEAD.put (CIRCUMFLEX | 'O', '\u00D4');
DEAD.put (CIRCUMFLEX | 'S', '\u015C');
DEAD.put (CIRCUMFLEX | 'U', '\u00DB');
DEAD.put (CIRCUMFLEX | 'W', '\u0174');
DEAD.put (CIRCUMFLEX | 'Y', '\u0176');
DEAD.put (CIRCUMFLEX | 'Z', '\u1E90');
DEAD.put (CIRCUMFLEX | 'a', '\u00E2');
DEAD.put (CIRCUMFLEX | 'c', '\u0109');
DEAD.put (CIRCUMFLEX | 'e', '\u00EA');
DEAD.put (CIRCUMFLEX | 'g', '\u011D');
DEAD.put (CIRCUMFLEX | 'h', '\u0125');
DEAD.put (CIRCUMFLEX | 'i', '\u00EE');
DEAD.put (CIRCUMFLEX | 'j', '\u0135');
DEAD.put (CIRCUMFLEX | 'o', '\u00F4');
DEAD.put (CIRCUMFLEX | 's', '\u015D');
DEAD.put (CIRCUMFLEX | 'u', '\u00FB');
DEAD.put (CIRCUMFLEX | 'w', '\u0175');
DEAD.put (CIRCUMFLEX | 'y', '\u0177');
DEAD.put (CIRCUMFLEX | 'z', '\u1E91');
DEAD.put (GRAVE | 'A', '\u00C0');
DEAD.put (GRAVE | 'E', '\u00C8');
DEAD.put (GRAVE | 'I', '\u00CC');
DEAD.put (GRAVE | 'N', '\u01F8');
DEAD.put (GRAVE | 'O', '\u00D2');
DEAD.put (GRAVE | 'U', '\u00D9');
DEAD.put (GRAVE | 'W', '\u1E80');
DEAD.put (GRAVE | 'Y', '\u1EF2');
DEAD.put (GRAVE | 'a', '\u00E0');
DEAD.put (GRAVE | 'e', '\u00E8');
DEAD.put (GRAVE | 'i', '\u00EC');
DEAD.put (GRAVE | 'n', '\u01F9');
DEAD.put (GRAVE | 'o', '\u00F2');
DEAD.put (GRAVE | 'u', '\u00F9');
DEAD.put (GRAVE | 'w', '\u1E81');
DEAD.put (GRAVE | 'y', '\u1EF3');
DEAD.put (TILDE | 'A', '\u00C3');
DEAD.put (TILDE | 'E', '\u1EBC');
DEAD.put (TILDE | 'I', '\u0128');
DEAD.put (TILDE | 'N', '\u00D1');
DEAD.put (TILDE | 'O', '\u00D5');
DEAD.put (TILDE | 'U', '\u0168');
DEAD.put (TILDE | 'V', '\u1E7C');
DEAD.put (TILDE | 'Y', '\u1EF8');
DEAD.put (TILDE | 'a', '\u00E3');
DEAD.put (TILDE | 'e', '\u1EBD');
DEAD.put (TILDE | 'i', '\u0129');
DEAD.put (TILDE | 'n', '\u00F1');
DEAD.put (TILDE | 'o', '\u00F5');
DEAD.put (TILDE | 'u', '\u0169');
DEAD.put (TILDE | 'v', '\u1E7D');
DEAD.put (TILDE | 'y', '\u1EF9');
DEAD.put (UMLAUT | 'A', '\u00C4');
DEAD.put (UMLAUT | 'E', '\u00CB');
DEAD.put (UMLAUT | 'H', '\u1E26');
DEAD.put (UMLAUT | 'I', '\u00CF');
DEAD.put (UMLAUT | 'O', '\u00D6');
DEAD.put (UMLAUT | 'U', '\u00DC');
DEAD.put (UMLAUT | 'W', '\u1E84');
DEAD.put (UMLAUT | 'X', '\u1E8C');
DEAD.put (UMLAUT | 'Y', '\u0178');
DEAD.put (UMLAUT | 'a', '\u00E4');
DEAD.put (UMLAUT | 'e', '\u00EB');
DEAD.put (UMLAUT | 'h', '\u1E27');
DEAD.put (UMLAUT | 'i', '\u00EF');
DEAD.put (UMLAUT | 'o', '\u00F6');
DEAD.put (UMLAUT | 't', '\u1E97');
DEAD.put (UMLAUT | 'u', '\u00FC');
DEAD.put (UMLAUT | 'w', '\u1E85');
DEAD.put (UMLAUT | 'x', '\u1E8D');
DEAD.put (UMLAUT | 'y', '\u00FF');
}
/// <summary>
/// Thrown by
/// <see cref="KeyCharacterMap.load(int)">KeyCharacterMap.load(int)</see>
/// when a key character map could not be loaded.
/// </summary>
[System.Serializable]
public class UnavailableException : android.util.AndroidRuntimeException
{
public UnavailableException (string msg) : base(msg)
{
}
}
/// <summary>
/// Specifies a substitute key code and meta state as a fallback action
/// for an unhandled key.
/// </summary>
/// <remarks>
/// Specifies a substitute key code and meta state as a fallback action
/// for an unhandled key.
/// </remarks>
/// <hide></hide>
public sealed class FallbackAction
{
public int keyCode;
public int metaState;
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@
using System;
namespace java.lang
{
public interface Appendable
{
Appendable append(char c);
Appendable append(CharSequence csq);
Appendable append(CharSequence csq, int start, int end);
}
}

Просмотреть файл

@ -0,0 +1,16 @@
namespace java.lang
{
public interface CharSequence
{
int Length {
get;
}
char this [int index] {
get;
}
CharSequence SubSequence (int start, int end);
}
}

Просмотреть файл

@ -0,0 +1,119 @@
using System;
namespace java.lang
{
public class CharSequenceProxy : CharSequence
{
private readonly CharSequence _proxy;
public CharSequenceProxy (CharSequence proxy)
{
this._proxy = proxy;
}
public CharSequenceProxy (string str)
{
this._proxy = new StringProxy (str);
}
#region CharSequence implementation
public int Length {
get { return _proxy.Length; }
}
public char this [int index] {
get { return _proxy [index]; }
}
public CharSequence SubSequence (int start, int end)
{
return _proxy.SubSequence (start, end);
}
#endregion
[System.Obsolete("Use the Length property.", true)]
public int length ()
{
return _proxy.Length;
}
[System.Obsolete("Use the indexer.", true)]
public char charAt (int index)
{
return _proxy [index];
}
public CharSequence Proxy {
get { return _proxy; }
}
public static CharSequenceProxy Wrap (string str)
{
return str != null ? new CharSequenceProxy (new StringProxy (str)) : null;
}
public static implicit operator CharSequenceProxy (string str)
{
return Wrap (str);
}
public static bool IsStringProxy (CharSequence csq)
{
return csq is StringProxy;
}
public static string UnWrap (CharSequence csq)
{
if (csq == null)
throw new ArgumentException ();
if (csq is CharSequenceProxy) {
CharSequenceProxy proxy = (CharSequenceProxy)csq;
StringProxy sp = proxy.Proxy as StringProxy;
if (sp == null)
throw new ArgumentException ();
return sp.ToString ();
} else if (csq is StringProxy) {
StringProxy sp = (StringProxy)csq;
return sp.ToString ();
} else {
throw new ArgumentException ();
}
}
public override string ToString ()
{
return _proxy.ToString ();
}
private class StringProxy : CharSequence
{
private readonly string _str;
public StringProxy (string str)
{
this._str = str;
}
#region CharSequence implementation
public int Length {
get { return _str.Length; }
}
public char this [int index] {
get { return _str [index]; }
}
public CharSequence SubSequence (int start, int end)
{
return CharSequenceProxy.Wrap (_str.Substring (start, end - start));
}
#endregion
public override string ToString ()
{
return _str;
}
}
}
}

Просмотреть файл

@ -0,0 +1,27 @@
using Sharpen;
using System;
namespace java.lang
{
/// <summary>Thrown when a class loader is unable to find a class.</summary>
/// <remarks>Thrown when a class loader is unable to find a class.</remarks>
[System.Serializable]
[Sharpen.Sharpened]
public class ClassNotFoundException : Exception
{
private const long serialVersionUID = 9176873029745254542L;
public ClassNotFoundException ()
{
}
public ClassNotFoundException (string detailMessage) : base(detailMessage, null)
{
}
public ClassNotFoundException (string detailMessage, Exception exception)
: base(detailMessage, exception)
{
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
using Sharpen;
namespace java.lang
{
public interface Comparable : Comparable<object>
{ }
public interface Comparable<T>
{
int compareTo(T another);
}
}

Просмотреть файл

@ -0,0 +1,83 @@
using Sharpen;
using System;
namespace java.lang
{
/// <summary>
/// <code>RuntimeException</code>
/// is the superclass of all classes that represent
/// exceptional conditions which occur as a result of executing an application in
/// the VM. Unlike checked exceptions (exceptions where the type
/// doesn't extend
/// <code>RuntimeException</code>
/// or
/// <see cref="Exception">Exception</see>
/// ), the compiler does
/// not require code to handle runtime exceptions.
/// </summary>
[System.Serializable]
[Sharpen.Sharpened]
public class RuntimeException : Exception
{
private const long serialVersionUID = -7034897190745766939L;
/// <summary>
/// Constructs a new
/// <code>RuntimeException</code>
/// that includes the current stack
/// trace.
/// </summary>
public RuntimeException()
{
}
/// <summary>
/// Constructs a new
/// <code>RuntimeException</code>
/// with the current stack trace
/// and the specified detail message.
/// </summary>
/// <param name="detailMessage">the detail message for this exception.</param>
public RuntimeException(string detailMessage) : base(detailMessage)
{
}
/// <summary>
/// Constructs a new
/// <code>RuntimeException</code>
/// with the current stack trace,
/// the specified detail message and the specified cause.
/// </summary>
/// <param name="detailMessage">the detail message for this exception.</param>
/// <param name="throwable">the cause of this exception.</param>
public RuntimeException(string detailMessage, Exception throwable) : base(
detailMessage, throwable)
{
}
/// <summary>
/// Constructs a new
/// <code>RuntimeException</code>
/// with the current stack trace
/// and the specified cause.
/// </summary>
/// <param name="throwable">the cause of this exception.</param>
public RuntimeException(Exception throwable) : base("Runtime Exception", throwable)
{
}
Exception inner;
new public Exception InnerException {
get {
if (inner != null)
return inner;
return base.InnerException;
}
internal set {
inner = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,45 @@
using System;
using ST = System.Threading;
namespace java.lang
{
public class Thread
{
readonly ST.Thread thread;
static readonly ST.ThreadLocal<Thread> current_thread = new ST.ThreadLocal<Thread> ();
Runnable target;
private Thread (ST.Thread thread)
{
this.thread = thread;
}
public Thread (string name)
{
throw new NotImplementedException ();
}
public virtual void run ()
{
if (target != null)
target.run ();
}
public long getId ()
{
return thread.ManagedThreadId;
}
public static void sleep (long time)
{
ST.Thread.Sleep ((int)time);
}
public static Thread currentThread ()
{
if (!current_thread.IsValueCreated)
current_thread.Value = new Thread (ST.Thread.CurrentThread);
return current_thread.Value;
}
}
}

Просмотреть файл

@ -0,0 +1,42 @@
using Sharpen;
using ST = System.Threading;
namespace java.lang
{
[Sharpen.Sharpened]
public class ThreadLocal<T>
{
ST.ThreadLocal<T> local;
private void initialize ()
{
local = new ST.ThreadLocal<T> (initialValue);
}
public ThreadLocal ()
{
initialize ();
}
public virtual T get()
{
return local.Value;
}
protected internal virtual T initialValue()
{
return default (T);
}
public virtual void set(T value)
{
local.Value = value;
}
public virtual void remove()
{
local.Dispose ();
initialize ();
}
}
}

Просмотреть файл

@ -0,0 +1,31 @@
using Sharpen;
namespace java.lang.@ref
{
public class WeakReference<T> : System.WeakReference
{
public WeakReference (T r) : base (r)
{
}
public virtual T get ()
{
object obj = Target;
if (obj == null)
return default (T);
return (T)obj;
}
public void clear ()
{
Target = null;
}
}
public class WeakReference : WeakReference<object>
{
public WeakReference (object r) : base(r)
{
}
}
}

Просмотреть файл

@ -0,0 +1,65 @@
using System;
using SCG = System.Collections.Generic;
namespace java.util
{
public class _HashMap<K,V> : SCG.Dictionary<K,V>
{
bool has_null_key;
V null_value;
public V remove (K key)
{
V item;
if (key == null) {
has_null_key = false;
item = null_value;
null_value = default (V);
} else {
item = this [key];
base.Remove (key);
}
return item;
}
public V get (K key)
{
if (key == null)
return null_value;
if (!ContainsKey (key))
return default (V);
return this [key];
}
public void put (K key, V item)
{
if (key == null) {
has_null_key = true;
null_value = item;
return;
}
this [key] = item;
}
public int size ()
{
return Count;
}
public KeyCollection keys ()
{
return Keys;
}
public ValueCollection values ()
{
return Values;
}
public void clear ()
{
Clear ();
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
using System;
namespace java.util
{
public class _WeakHashMap<K,V> : _HashMap<K,V>
{ }
}

Просмотреть файл

@ -0,0 +1,266 @@
using Sharpen;
using System;
namespace libcore.io
{
/// <summary>Unsafe access to memory.</summary>
/// <remarks>Unsafe access to memory.</remarks>
[Sharpen.Sharpened]
public sealed class Memory
{
/// <summary>Used to optimize nio heap buffer bulk get operations.</summary>
/// <remarks>
/// Used to optimize nio heap buffer bulk get operations. 'dst' must be a primitive array.
/// 'dstOffset' is measured in units of 'sizeofElements' bytes.
/// </remarks>
public static void unsafeBulkGet (object dst, int dstOffset, int byteCount, byte[]
src, int srcOffset, int sizeofElements, bool swap)
{
Array dstArray = dst as Array;
if (dstArray == null)
throw new ArgumentException ();
if (swap)
throw new NotImplementedException ();
Array.Copy (src, srcOffset * sizeofElements, dstArray,
dstOffset * sizeofElements, byteCount * sizeofElements);
}
/// <summary>Used to optimize nio heap buffer bulk put operations.</summary>
/// <remarks>
/// Used to optimize nio heap buffer bulk put operations. 'src' must be a primitive array.
/// 'srcOffset' is measured in units of 'sizeofElements' bytes.
/// </remarks>
public static void unsafeBulkPut (byte[] dst, int dstOffset, int byteCount, object
src, int srcOffset, int sizeofElements, bool swap)
{
Array srcArray = src as Array;
if (srcArray == null)
throw new ArgumentException ();
if (swap)
throw new NotImplementedException ();
Array.Copy (srcArray, srcOffset * sizeofElements, dst,
dstOffset * sizeofElements, byteCount * sizeofElements);
}
public static int peekInt (byte[] src, int offset, java.nio.ByteOrder order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
return (((src [offset++] & unchecked((int)(0xff))) << 24) | ((src [offset++] & unchecked(
(int)(0xff))) << 16) | ((src [offset++] & unchecked((int)(0xff))) << 8) | ((src [offset
] & unchecked((int)(0xff))) << 0));
} else {
return (((src [offset++] & unchecked((int)(0xff))) << 0) | ((src [offset++] & unchecked(
(int)(0xff))) << 8) | ((src [offset++] & unchecked((int)(0xff))) << 16) | ((src [offset
] & unchecked((int)(0xff))) << 24));
}
}
public static long peekLong (byte[] src, int offset, java.nio.ByteOrder order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
int h = ((src [offset++] & unchecked((int)(0xff))) << 24) | ((src [offset++] & unchecked(
(int)(0xff))) << 16) | ((src [offset++] & unchecked((int)(0xff))) << 8) | ((src [offset
++] & unchecked((int)(0xff))) << 0);
int l = ((src [offset++] & unchecked((int)(0xff))) << 24) | ((src [offset++] & unchecked(
(int)(0xff))) << 16) | ((src [offset++] & unchecked((int)(0xff))) << 8) | ((src [offset
] & unchecked((int)(0xff))) << 0);
return (((long)h) << 32) | ((long)l) & unchecked((long)(0xffffffffL));
} else {
int l = ((src [offset++] & unchecked((int)(0xff))) << 0) | ((src [offset++] & unchecked(
(int)(0xff))) << 8) | ((src [offset++] & unchecked((int)(0xff))) << 16) | ((src [offset
++] & unchecked((int)(0xff))) << 24);
int h = ((src [offset++] & unchecked((int)(0xff))) << 0) | ((src [offset++] & unchecked(
(int)(0xff))) << 8) | ((src [offset++] & unchecked((int)(0xff))) << 16) | ((src [offset
] & unchecked((int)(0xff))) << 24);
return (((long)h) << 32) | ((long)l) & unchecked((long)(0xffffffffL));
}
}
public static short peekShort (byte[] src, int offset, java.nio.ByteOrder order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
return (short)((src [offset] << 8) | (src [offset + 1] & unchecked((int)(0xff))));
} else {
return (short)((src [offset + 1] << 8) | (src [offset] & unchecked((int)(0xff))));
}
}
public static void pokeInt (byte[] dst, int offset, int value, java.nio.ByteOrder
order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
dst [offset++] = unchecked((byte)((value >> 24) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((value >> 16) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((value >> 8) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((value >> 0) & unchecked((int)(0xff))));
} else {
dst [offset++] = unchecked((byte)((value >> 0) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((value >> 8) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((value >> 16) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((value >> 24) & unchecked((int)(0xff))));
}
}
public static void pokeLong (byte[] dst, int offset, long value, java.nio.ByteOrder
order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
int i = (int)(value >> 32);
dst [offset++] = unchecked((byte)((i >> 24) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 16) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 8) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 0) & unchecked((int)(0xff))));
i = (int)value;
dst [offset++] = unchecked((byte)((i >> 24) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 16) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 8) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((i >> 0) & unchecked((int)(0xff))));
} else {
int i = (int)value;
dst [offset++] = unchecked((byte)((i >> 0) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 8) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 16) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 24) & unchecked((int)(0xff))));
i = (int)(value >> 32);
dst [offset++] = unchecked((byte)((i >> 0) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 8) & unchecked((int)(0xff))));
dst [offset++] = unchecked((byte)((i >> 16) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((i >> 24) & unchecked((int)(0xff))));
}
}
public static void pokeShort (byte[] dst, int offset, short value, java.nio.ByteOrder
order)
{
if (order == java.nio.ByteOrder.BIG_ENDIAN) {
dst [offset++] = unchecked((byte)((value >> 8) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((value >> 0) & unchecked((int)(0xff))));
} else {
dst [offset++] = unchecked((byte)((value >> 0) & unchecked((int)(0xff))));
dst [offset] = unchecked((byte)((value >> 8) & unchecked((int)(0xff))));
}
}
#if FIXME
/// <summary>Copies 'byteCount' bytes from the source to the destination.</summary>
/// <remarks>
/// Copies 'byteCount' bytes from the source to the destination. The objects are either
/// instances of DirectByteBuffer or byte[]. The offsets in the byte[] case must include
/// the Buffer.arrayOffset if the array came from a Buffer.array call. We could make this
/// private and provide the four type-safe variants, but then ByteBuffer.put(ByteBuffer)
/// would need to work out which to call based on whether the source and destination buffers
/// are direct or not.
/// </remarks>
/// <hide>make type-safe before making public?</hide>
public static void memmove(object dstObject, int dstOffset, object srcObject, int
srcOffset, long byteCount)
{
}
public static byte peekByte(int address)
{
}
public static int peekInt(int address, bool swap)
{
}
public static long peekLong(int address, bool swap)
{
}
public static short peekShort(int address, bool swap)
{
}
public static void peekByteArray(int address, byte[] dst, int dstOffset, int byteCount
)
{
}
public static void peekCharArray(int address, char[] dst, int dstOffset, int charCount
, bool swap)
{
}
public static void peekDoubleArray(int address, double[] dst, int dstOffset, int
doubleCount, bool swap)
{
}
public static void peekFloatArray(int address, float[] dst, int dstOffset, int floatCount
, bool swap)
{
}
public static void peekIntArray(int address, int[] dst, int dstOffset, int intCount
, bool swap)
{
}
public static void peekLongArray(int address, long[] dst, int dstOffset, int longCount
, bool swap)
{
}
public static void peekShortArray(int address, short[] dst, int dstOffset, int shortCount
, bool swap)
{
}
public static void pokeByte(int address, byte value)
{
}
public static void pokeInt(int address, int value, bool swap)
{
}
public static void pokeLong(int address, long value, bool swap)
{
}
public static void pokeShort(int address, short value, bool swap)
{
}
public static void pokeByteArray(int address, byte[] src, int offset, int count)
{
}
public static void pokeCharArray(int address, char[] src, int offset, int count,
bool swap)
{
}
public static void pokeDoubleArray(int address, double[] src, int offset, int count
, bool swap)
{
}
public static void pokeFloatArray(int address, float[] src, int offset, int count
, bool swap)
{
}
public static void pokeIntArray(int address, int[] src, int offset, int count, bool
swap)
{
}
public static void pokeLongArray(int address, long[] src, int offset, int count,
bool swap)
{
}
public static void pokeShortArray(int address, short[] src, int offset, int count
, bool swap)
{
}
#endif
}
}

Просмотреть файл

@ -0,0 +1,24 @@
using Sharpen;
namespace libcore.io
{
[Sharpen.Sharpened]
public sealed class SizeOf
{
internal const int CHAR = 2;
internal const int DOUBLE = 8;
internal const int FLOAT = 4;
internal const int INT = 4;
internal const int LONG = 8;
internal const int SHORT = 2;
public SizeOf()
{
}
}
}

Просмотреть файл

@ -0,0 +1,22 @@
using System;
using android.util;
namespace android.animation
{
partial class ObjectAnimator
{
/// <summary>Private utility constructor that initializes the target object and property being animated.
/// </summary>
/// <remarks>Private utility constructor that initializes the target object and property being animated.
/// </remarks>
/// <param name="target">The object whose property is to be animated.</param>
/// <param name="property">The property being animated.</param>
internal ObjectAnimator (object target, Property<object, object> property)
{
mTarget = target;
setProperty (property);
}
}
}

Просмотреть файл

@ -0,0 +1,40 @@
using System;
using XobotOS.Runtime;
using android.content;
using android.view;
namespace android.app
{
partial class Activity
{
internal void attach (Context context, Application application, Window window)
{
mApplication = application;
mWindow = window;
attachBaseContext (context);
mFragments.attachActivity (this);
mWindow.setCallback (this);
}
public virtual void finish ()
{
if (mParent == null) {
int resultCode;
Intent resultData;
lock (this) {
resultCode = mResultCode;
resultData = mResultData;
}
if (resultData != null) {
resultData.setAllowFds (false);
}
XobotActivityManager.FinishActivity (this, resultCode, resultData);
mFinished = true;
} else {
mParent.finishFromChild (this);
}
}
}
}

Просмотреть файл

@ -0,0 +1,39 @@
using System;
using XobotOS.Runtime;
using android.content.res;
namespace android.app
{
partial class ActivityThread
{
internal ActivityThread ()
{
sThreadLocal.set (this);
mSystemThread = true;
mInstrumentation = new Instrumentation ();
ContextImpl context = new ContextImpl ();
context.init (getSystemContext ().mPackageInfo, null, this);
var res = context.getResources ();
mConfiguration = res.getConfiguration ();
XobotActivityManager.DeviceConfig.updateConfig (mConfiguration);
res.updateConfiguration (mConfiguration, res.getDisplayMetrics ());
applyConfigurationToResourcesLocked (mConfiguration, mResCompatibilityInfo);
applyCompatConfiguration ();
Application app = new Application ();
app.attach (context);
mAllApplications.add (app);
mInitialApplication = app;
app.onCreate ();
}
internal static ActivityThread systemMain ()
{
return new ActivityThread ();
}
}
}

Просмотреть файл

@ -0,0 +1,26 @@
using System;
using XobotOS.Runtime;
using android.content.pm;
using android.content.res;
namespace android.app
{
partial class ApplicationPackageManager
{
/// <exception cref="android.content.pm.PackageManager.NameNotFoundException"></exception>
[Sharpen.OverridesMethod(@"android.content.pm.PackageManager")]
public override Resources getResourcesForApplication (ApplicationInfo app)
{
if (app.packageName.Equals ("system")) {
return mContext.mMainThread.getSystemContext ().getResources ();
}
Resources r = mContext.mMainThread.getTopLevelResources (
app.publicSourceDir, mContext.mPackageInfo);
if (r != null) {
return r;
}
throw new NameNotFoundException ("Unable to open " + app.publicSourceDir);
}
}
}

Просмотреть файл

@ -0,0 +1,21 @@
using System;
using XobotOS.Runtime;
using android.content.pm;
namespace android.app
{
partial class ContextImpl
{
[Sharpen.OverridesMethod(@"android.content.Context")]
public override PackageManager getPackageManager ()
{
if (mPackageManager != null)
return mPackageManager;
mPackageManager = new XobotPackageManager (this);
return mPackageManager;
}
}
}

Просмотреть файл

@ -0,0 +1,43 @@
using System;
using XobotOS.Runtime;
namespace android.app
{
partial class FragmentManagerImpl
{
/// <summary>Only call from main thread!</summary>
public bool execPendingActions ()
{
if (mExecutingActions)
throw new InvalidOperationException ("Recursive entry to executePendingTransactions");
if (!XobotActivityManager.IsMainThread)
throw new InvalidOperationException ("Must be called from main thread of process");
bool didSomething = false;
while (true) {
int numActions;
lock (this) {
if (mPendingActions == null || mPendingActions.size () == 0)
return didSomething;
numActions = mPendingActions.size ();
if (mTmpActions == null || mTmpActions.Length < numActions) {
mTmpActions = new java.lang.Runnable[numActions];
}
mPendingActions.toArray (mTmpActions);
mPendingActions.clear ();
mActivity.mHandler.removeCallbacks (mExecCommit);
}
mExecutingActions = true;
{
for (int i = 0; i < numActions; i++) {
mTmpActions [i].run ();
mTmpActions [i] = null;
}
}
mExecutingActions = false;
didSomething = true;
}
}
}
}

Просмотреть файл

@ -0,0 +1,178 @@
using System;
using XobotOS.Runtime;
using java.lang;
using android.os;
using android.content;
namespace android.app
{
partial class Instrumentation
{
/// <summary>
/// Perform instantiation of the process's
/// <see cref="Application">Application</see>
/// object. The
/// default implementation provides the normal system behavior.
/// </summary>
/// <param name="cl">The ClassLoader with which to instantiate the object.</param>
/// <param name="className">
/// The name of the class implementing the Application
/// object.
/// </param>
/// <param name="context">The context to initialize the application with</param>
/// <returns>The newly instantiated Application object.</returns>
/// <exception cref="java.lang.InstantiationException"></exception>
/// <exception cref="System.MemberAccessException"></exception>
/// <exception cref="System.TypeLoadException"></exception>
public virtual Application newApplication (ClassLoader cl, string klass, Context context)
{
return newApplication (cl.loadClass (klass), context);
}
/// <summary>
/// Perform instantiation of the process's
/// <see cref="Application">Application</see>
/// object. The
/// default implementation provides the normal system behavior.
/// </summary>
/// <param name="clazz">The class used to create an Application object from.</param>
/// <param name="context">The context to initialize the application with</param>
/// <returns>The newly instantiated Application object.</returns>
/// <exception cref="java.lang.InstantiationException"></exception>
/// <exception cref="System.MemberAccessException"></exception>
/// <exception cref="System.TypeLoadException"></exception>
internal static Application newApplication (Type klass, Context context)
{
Application app = (Application)Activator.CreateInstance (klass);
app.attach (context);
return app;
}
/// <summary>
/// Perform calling of an activity's
/// <see cref="Activity.onCreate(android.os.Bundle)">Activity.onCreate(android.os.Bundle)
/// </see>
/// method. The default implementation simply calls through to that method.
/// </summary>
/// <param name="activity">The activity being created.</param>
/// <param name="icicle">
/// The previously frozen state (or null) to pass through to
/// onCreate().
/// </param>
public virtual void callActivityOnCreate (Activity activity, Bundle icicle)
{
activity.performCreate (icicle);
}
/// <summary>
/// Perform calling of an activity's
/// <see cref="Activity.onPostCreate(android.os.Bundle)">Activity.onPostCreate(android.os.Bundle)
/// </see>
/// method.
/// The default implementation simply calls through to that method.
/// </summary>
/// <param name="activity">The activity being created.</param>
/// <param name="icicle">
/// The previously frozen state (or null) to pass through to
/// onPostCreate().
/// </param>
public virtual void callActivityOnPostCreate (Activity activity, Bundle icicle)
{
activity.onPostCreate (icicle);
}
/// <summary>Execute a startActivity call made by the application.</summary>
/// <remarks>
/// Execute a startActivity call made by the application. The default
/// implementation takes care of updating any active
/// <see cref="ActivityMonitor">ActivityMonitor</see>
/// objects and dispatches this call to the system activity manager; you can
/// override this to watch for the application to start an activity, and
/// modify what happens when it does.
/// <p>This method returns an
/// <see cref="ActivityResult">ActivityResult</see>
/// object, which you can
/// use when intercepting application calls to avoid performing the start
/// activity action but still return the result the application is
/// expecting. To do this, override this method to catch the call to start
/// activity so that it returns a new ActivityResult containing the results
/// you would like the application to see, and don't call up to the super
/// class. Note that an application is only expecting a result if
/// <var>requestCode</var> is &gt;= 0.
/// <p>This method throws
/// <see cref="android.content.ActivityNotFoundException">android.content.ActivityNotFoundException
/// </see>
/// if there was no Activity found to run the given Intent.
/// </remarks>
/// <param name="who">The Context from which the activity is being started.</param>
/// <param name="contextThread">
/// The main thread of the Context from which the activity
/// is being started.
/// </param>
/// <param name="token">
/// Internal token identifying to the system who is starting
/// the activity; may be null.
/// </param>
/// <param name="target">
/// Which activity is performing the start (and thus receiving
/// any result); may be null if this call is not being made
/// from an activity.
/// </param>
/// <param name="intent">The actual Intent to start.</param>
/// <param name="requestCode">
/// Identifier for this request's result; less than zero
/// if the caller is not expecting a result.
/// </param>
/// <returns>
/// To force the return of a particular result, return an
/// ActivityResult object containing the desired data; otherwise
/// return null. The default implementation always returns null.
/// </returns>
/// <exception cref="android.content.ActivityNotFoundException">android.content.ActivityNotFoundException
/// </exception>
/// <seealso cref="Activity.startActivity(android.content.Intent)">Activity.startActivity(android.content.Intent)
/// </seealso>
/// <seealso cref="Activity.startActivityForResult(android.content.Intent, int)">Activity.startActivityForResult(android.content.Intent, int)
/// </seealso>
/// <seealso cref="Activity.startActivityFromChild(Activity, android.content.Intent, int)
/// "><hide></hide></seealso>
public virtual ActivityResult execStartActivity (Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode)
{
IApplicationThread whoThread = (IApplicationThread)contextThread;
if (mActivityMonitors != null) {
lock (mSync) {
int N = mActivityMonitors.size ();
{
for (int i = 0; i < N; i++) {
ActivityMonitor am = mActivityMonitors.get (i);
if (am.match (who, null, intent)) {
am.mHits++;
if (am.isBlocking ()) {
return requestCode >= 0 ? am.getResult () : null;
}
break;
}
}
}
}
}
try {
intent.setAllowFds (false);
int result = XobotActivityManager.StartActivity (
whoThread, intent, intent.resolveTypeIfNeeded (who.getContentResolver ()), target,
requestCode);
checkStartActivityResult (result, intent);
} catch (RemoteException) {
}
return null;
}
[Sharpen.Stub]
public virtual ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token,
Fragment target, Intent intent, int requestCode)
{
throw new System.NotImplementedException();
}
}
}

Просмотреть файл

@ -0,0 +1,44 @@
using System;
using System.Reflection;
using XobotOS.Runtime;
using java.lang;
namespace android.app
{
partial class LoadedApk
{
public ClassLoader getClassLoader ()
{
if (mClassLoader != null)
return mClassLoader;
ContextImpl context = mActivityThread.getSystemContext();
XobotPackageManager pm = (XobotPackageManager)context.getPackageManager ();
Assembly asm = pm.GetAssembly (mPackageName);
mClassLoader = new AssemblyClassLoader (asm, mPackageName);
return mClassLoader;
}
private class AssemblyClassLoader : ClassLoader
{
private readonly Assembly asm;
private readonly string packageName;
public AssemblyClassLoader(Assembly asm, string packageName)
: base (ClassLoader.getSystemClassLoader ())
{
this.asm = asm;
this.packageName = packageName;
}
protected internal override Type findClass (string className)
{
if (className.StartsWith ("."))
className = packageName + className;
return asm.GetType (className);
}
}
}
}

Просмотреть файл

@ -0,0 +1,66 @@
using System;
using System.Reflection;
namespace android.content.res
{
partial class AssetManager
{
public AssetManager ()
{
lock (this) {
mObject = init ();
addAssetPath(Assembly.GetExecutingAssembly ().Location);
ensureSystemAssets ();
}
}
private AssetManager (bool isSystem)
{
mObject = init ();
addAssetPath(Assembly.GetExecutingAssembly ().Location);
}
internal Resources.Theme.NativeTheme createTheme ()
{
lock (this) {
if (!mOpen) {
throw new java.lang.RuntimeException ("Assetmanager has been closed");
}
Resources.Theme.NativeTheme res = newTheme ();
incRefsLocked ();
return res;
}
}
private void incRefsLocked ()
{
mNumRefs++;
}
private void incRefsLocked (int id)
{
mNumRefs++;
}
private void decRefsLocked (int id)
{
mNumRefs--;
}
partial class AssetInputStream
{
[Sharpen.OverridesMethod(@"java.io.InputStream")]
public sealed override void close ()
{
lock (this._enclosing) {
if (this.mAsset != null) {
this.mAsset.Dispose ();
this.mAsset = null;
this._enclosing.decRefsLocked (this.GetHashCode ());
}
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,23 @@
namespace android.content.res
{
partial class Resources
{
partial class Theme
{
#if FIXME
[Sharpen.Stub]
public void applyStyle (int resid, bool force)
{
; // FIXME
}
[Sharpen.Stub]
public void setTo (Theme other)
{
; // FIXME
}
#endif
}
}
}

Просмотреть файл

@ -0,0 +1,35 @@
using Sharpen;
using System;
namespace android.content.res
{
partial class XmlBlock
{
private void decOpenCountLocked ()
{
mOpenCount--;
if (mOpenCount == 0) {
mNative.Dispose ();
if (mAssets != null) {
mAssets.xmlBlockGone (GetHashCode ());
}
}
}
partial class Parser
{
[Sharpen.ImplementsInterface(@"android.content.res.XmlResourceParser")]
public void close ()
{
lock (this.mBlock) {
if (this.mParseState != null) {
this.mParseState.Dispose ();
this.mParseState = null;
this.mBlock.decOpenCountLocked ();
}
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,55 @@
namespace android.graphics
{
partial class Bitmap
{
/// <noinspection>UnusedDeclaration</noinspection>
internal Bitmap (NativeBitmap nativeBitmap)
{
if ((nativeBitmap == null) || nativeBitmap.IsInvalid)
throw new java.lang.RuntimeException ("internal error: native bitmap is null");
mNativeBitmap = nativeBitmap;
}
/// <summary>
/// Copy the bitmap's pixels into the specified buffer (allocated by the
/// caller).
/// </summary>
/// <remarks>
/// Copy the bitmap's pixels into the specified buffer (allocated by the
/// caller). An exception is thrown if the buffer is not large enough to
/// hold all of the pixels (taking into account the number of bytes per
/// pixel) or if the Buffer subclass is not one of the support types
/// (ByteBuffer, ShortBuffer, IntBuffer).
/// </remarks>
public void copyPixelsToBuffer (java.nio.Buffer dst)
{
int elements = dst.remaining ();
int shift;
if (dst is java.nio.ByteBuffer) {
shift = 0;
} else {
if (dst is java.nio.ShortBuffer) {
shift = 1;
} else {
if (dst is java.nio.IntBuffer) {
shift = 2;
} else {
throw new java.lang.RuntimeException ("unsupported Buffer subclass");
}
}
}
long bufferSize = (long)elements << shift;
long pixelSize = getByteCount ();
if (bufferSize < pixelSize) {
throw new java.lang.RuntimeException ("Buffer not large enough for pixels");
}
// FIXME
// nativeCopyPixelsToBuffer (mNativeBitmap, dst);
// now update the buffer's position
int position = dst.position ();
// FIXME: Needed to add an explicit cast to int.
position += (int)(pixelSize >> shift);
dst.position (position);
}
}
}

Просмотреть файл

@ -0,0 +1,24 @@
using System;
using System.IO;
namespace android.graphics
{
partial class BitmapFactory
{
public static Bitmap decodeFile(string pathName, Options opts)
{
using (FileStream stream = File.OpenRead(pathName)) {
byte[] contents = new byte[stream.Length];
if (stream.Read (contents, 0, contents.Length) != contents.Length)
throw new IOException("Failed to read bitmap.");
return decodeByteArray(contents, 0, contents.Length, opts);
}
}
public static Bitmap decodeFile(string pathName)
{
return decodeFile(pathName, null);
}
}
}

Просмотреть файл

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;
namespace android.graphics
{
partial class Canvas
{
internal Canvas(IntPtr native)
: this (new NativeCanvas(native))
{ }
internal Canvas(NativeCanvas native)
{
mNativeCanvas = native;
mDensity = android.util.DisplayMetrics.DENSITY_DEFAULT;
}
/// <summary>Construct an empty raster canvas.</summary>
/// <remarks>
/// Construct an empty raster canvas. Use setBitmap() to specify a bitmap to
/// draw into. The initial target density is
/// <see cref="Bitmap.DENSITY_NONE">Bitmap.DENSITY_NONE</see>
/// ;
/// this will typically be replaced when a target bitmap is set for the
/// canvas.
/// </remarks>
public Canvas()
{
// 0 means no native bitmap
mNativeCanvas = initRaster(null);
}
/// <summary>Construct a canvas with the specified bitmap to draw into.</summary>
/// <remarks>
/// Construct a canvas with the specified bitmap to draw into. The bitmap
/// must be mutable.
/// <p>The initial target density of the canvas is the same as the given
/// bitmap's density.
/// </remarks>
/// <param name="bitmap">Specifies a mutable bitmap for the canvas to draw into.</param>
public Canvas(android.graphics.Bitmap bitmap)
{
if (!bitmap.isMutable())
{
throw new System.InvalidOperationException("Immutable bitmap passed to Canvas constructor"
);
}
throwIfRecycled(bitmap);
mNativeCanvas = initRaster(bitmap.nativeInstance);
mBitmap = bitmap;
mDensity = bitmap.mDensity;
}
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше