summaryrefslogtreecommitdiffstats
path: root/widget/android/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'widget/android/bindings')
-rw-r--r--widget/android/bindings/AccessibilityEvent-classes.txt3
-rw-r--r--widget/android/bindings/AndroidBuild-classes.txt5
-rw-r--r--widget/android/bindings/AndroidDragEvent-classes.txt3
-rw-r--r--widget/android/bindings/AndroidGraphics-classes.txt10
-rw-r--r--widget/android/bindings/AndroidInputType-classes.txt3
-rw-r--r--widget/android/bindings/AndroidProcess-classes.txt5
-rw-r--r--widget/android/bindings/AndroidRect-classes.txt2
-rw-r--r--widget/android/bindings/InetAddress-classes.txt6
-rw-r--r--widget/android/bindings/JavaBuiltins-classes.txt25
-rw-r--r--widget/android/bindings/JavaExceptions-classes.txt8
-rw-r--r--widget/android/bindings/KeyEvent-classes.txt3
-rw-r--r--widget/android/bindings/MediaCodec-classes.txt15
-rw-r--r--widget/android/bindings/MotionEvent-classes.txt3
-rw-r--r--widget/android/bindings/SurfaceTexture-classes.txt5
-rw-r--r--widget/android/bindings/ViewConfiguration-classes.txt1
-rw-r--r--widget/android/bindings/moz.build55
16 files changed, 152 insertions, 0 deletions
diff --git a/widget/android/bindings/AccessibilityEvent-classes.txt b/widget/android/bindings/AccessibilityEvent-classes.txt
new file mode 100644
index 0000000000..b54e3ce105
--- /dev/null
+++ b/widget/android/bindings/AccessibilityEvent-classes.txt
@@ -0,0 +1,3 @@
+# We only use constants from AccessibilityEvent
+[android.view.accessibility.AccessibilityEvent = skip:true]
+<field> = skip:false
diff --git a/widget/android/bindings/AndroidBuild-classes.txt b/widget/android/bindings/AndroidBuild-classes.txt
new file mode 100644
index 0000000000..a76aa12c66
--- /dev/null
+++ b/widget/android/bindings/AndroidBuild-classes.txt
@@ -0,0 +1,5 @@
+[android.os.Build]
+<field> = noLiteral:true
+
+[android.os.Build$VERSION]
+<field> = noLiteral:true
diff --git a/widget/android/bindings/AndroidDragEvent-classes.txt b/widget/android/bindings/AndroidDragEvent-classes.txt
new file mode 100644
index 0000000000..368f500139
--- /dev/null
+++ b/widget/android/bindings/AndroidDragEvent-classes.txt
@@ -0,0 +1,3 @@
+# We only use constants from DragEvent
+[android.view.DragEvent = skip:true]
+<field> = skip:false
diff --git a/widget/android/bindings/AndroidGraphics-classes.txt b/widget/android/bindings/AndroidGraphics-classes.txt
new file mode 100644
index 0000000000..452ba404e8
--- /dev/null
+++ b/widget/android/bindings/AndroidGraphics-classes.txt
@@ -0,0 +1,10 @@
+[android.graphics.Bitmap = skip:true]
+copyPixelsFromBuffer(Ljava/nio/Buffer;)V =
+createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap; =
+
+[android.graphics.Bitmap$Config = skip:true]
+valueOf(Ljava/lang/String;)Landroid/graphics/Bitmap$Config; =
+ALPHA_8 =
+ARGB_8888 =
+RGBA_F16 =
+RGB_565 = \ No newline at end of file
diff --git a/widget/android/bindings/AndroidInputType-classes.txt b/widget/android/bindings/AndroidInputType-classes.txt
new file mode 100644
index 0000000000..fa1138dce4
--- /dev/null
+++ b/widget/android/bindings/AndroidInputType-classes.txt
@@ -0,0 +1,3 @@
+# We only use constants from InputType
+[android.text.InputType = skip:true]
+<field> = skip:false
diff --git a/widget/android/bindings/AndroidProcess-classes.txt b/widget/android/bindings/AndroidProcess-classes.txt
new file mode 100644
index 0000000000..a6929ac5bc
--- /dev/null
+++ b/widget/android/bindings/AndroidProcess-classes.txt
@@ -0,0 +1,5 @@
+[android.os.Process = skip:true]
+setThreadPriority =
+getThreadPriority =
+myTid =
+THREAD_PRIORITY_URGENT_AUDIO =
diff --git a/widget/android/bindings/AndroidRect-classes.txt b/widget/android/bindings/AndroidRect-classes.txt
new file mode 100644
index 0000000000..76d3094a9f
--- /dev/null
+++ b/widget/android/bindings/AndroidRect-classes.txt
@@ -0,0 +1,2 @@
+[android.graphics.Rect]
+[android.graphics.RectF]
diff --git a/widget/android/bindings/InetAddress-classes.txt b/widget/android/bindings/InetAddress-classes.txt
new file mode 100644
index 0000000000..65788be252
--- /dev/null
+++ b/widget/android/bindings/InetAddress-classes.txt
@@ -0,0 +1,6 @@
+# We only want getByAddress(String, byte[])
+[java.net.InetAddress = skip:true]
+getByAddress(Ljava/lang/String;[B)Ljava/net/InetAddress; = skip:false
+
+[java.net.UnknownHostException = skip:true]
+<init>()V =
diff --git a/widget/android/bindings/JavaBuiltins-classes.txt b/widget/android/bindings/JavaBuiltins-classes.txt
new file mode 100644
index 0000000000..c6be5dde34
--- /dev/null
+++ b/widget/android/bindings/JavaBuiltins-classes.txt
@@ -0,0 +1,25 @@
+[java.lang.Boolean = skip:true]
+# Use static fields for boxing boolean.
+TRUE =
+FALSE =
+booleanValue =
+
+[java.lang.Double = skip:true]
+<init>(D)V =
+
+[java.lang.Integer = skip:true]
+# Use valueOf() for boxing int; don't use constructor
+# because some Integer values are cached.
+valueOf(I)Ljava/lang/Integer; =
+
+[java.lang.Long = skip:true]
+valueOf(J)Ljava/lang/Long; =
+
+[java.lang.Number = skip:true]
+# Use doubleValue() for unboxing Double/Float/Long.
+doubleValue =
+# Use intValue() for unboxing Byte/Int/Short.
+intValue =
+
+[java.lang.String = skip:true]
+valueOf(Ljava/lang/Object;)Ljava/lang/String; =
diff --git a/widget/android/bindings/JavaExceptions-classes.txt b/widget/android/bindings/JavaExceptions-classes.txt
new file mode 100644
index 0000000000..ebaff375d5
--- /dev/null
+++ b/widget/android/bindings/JavaExceptions-classes.txt
@@ -0,0 +1,8 @@
+[java.lang.IllegalStateException = skip:true]
+<init>(Ljava/lang/String;)V =
+
+[java.lang.IllegalArgumentException = skip:true]
+<init>(Ljava/lang/String;)V =
+
+[java.lang.Throwable = skip:true]
+getMessage()Ljava/lang/String; =
diff --git a/widget/android/bindings/KeyEvent-classes.txt b/widget/android/bindings/KeyEvent-classes.txt
new file mode 100644
index 0000000000..6001a5025b
--- /dev/null
+++ b/widget/android/bindings/KeyEvent-classes.txt
@@ -0,0 +1,3 @@
+# We only use constants from KeyEvent
+[android.view.KeyEvent = skip:true]
+<field> = skip:false
diff --git a/widget/android/bindings/MediaCodec-classes.txt b/widget/android/bindings/MediaCodec-classes.txt
new file mode 100644
index 0000000000..a68b86e148
--- /dev/null
+++ b/widget/android/bindings/MediaCodec-classes.txt
@@ -0,0 +1,15 @@
+[android.media.MediaCodec = exceptionMode:nsresult]
+[android.media.MediaCodec$BufferInfo = exceptionMode:nsresult]
+[android.media.MediaCodec$CryptoInfo = exceptionMode:nsresult]
+
+# We only use constants from CodecCapabilities
+[android.media.MediaCodecInfo$CodecCapabilities = skip:true]
+<field> = skip:false
+
+# We only use constants from KeyStatus
+[android.media.MediaDrm$KeyStatus = skip:true]
+<field> = skip:false
+[android.media.AudioFormat = skip:true]
+<field> = skip:false
+
+[android.media.MediaFormat = exceptionMode:nsresult]
diff --git a/widget/android/bindings/MotionEvent-classes.txt b/widget/android/bindings/MotionEvent-classes.txt
new file mode 100644
index 0000000000..17874a16af
--- /dev/null
+++ b/widget/android/bindings/MotionEvent-classes.txt
@@ -0,0 +1,3 @@
+# We only use constants from MotionEvent
+[android.view.MotionEvent = skip:true]
+<field> = skip:false
diff --git a/widget/android/bindings/SurfaceTexture-classes.txt b/widget/android/bindings/SurfaceTexture-classes.txt
new file mode 100644
index 0000000000..554c8e7c3f
--- /dev/null
+++ b/widget/android/bindings/SurfaceTexture-classes.txt
@@ -0,0 +1,5 @@
+[android.graphics.SurfaceTexture = exceptionMode:nsresult]
+[android.view.Surface = exceptionMode:nsresult]
+<init>(Landroid/view/SurfaceControl;)V = stubName:FromSurfaceControl, exceptionMode:abort
+[android.view.SurfaceControl = exceptionMode:nsresult]
+isValid()Z = exceptionMode:abort
diff --git a/widget/android/bindings/ViewConfiguration-classes.txt b/widget/android/bindings/ViewConfiguration-classes.txt
new file mode 100644
index 0000000000..cf8689f25a
--- /dev/null
+++ b/widget/android/bindings/ViewConfiguration-classes.txt
@@ -0,0 +1 @@
+[android.view.ViewConfiguration = exceptionMode:nsresult]
diff --git a/widget/android/bindings/moz.build b/widget/android/bindings/moz.build
new file mode 100644
index 0000000000..f3f4d138ff
--- /dev/null
+++ b/widget/android/bindings/moz.build
@@ -0,0 +1,55 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+with Files("**"):
+ BUG_COMPONENT = ("GeckoView", "General")
+
+# List of stems to generate .cpp and .h files for. To add a stem, add it to
+# this list and ensure that $(stem)-classes.txt exists in this directory.
+generated = [
+ "AccessibilityEvent",
+ "AndroidBuild",
+ "AndroidDragEvent",
+ "AndroidGraphics",
+ "AndroidInputType",
+ "AndroidProcess",
+ "AndroidRect",
+ "InetAddress",
+ "JavaBuiltins",
+ "JavaExceptions",
+ "KeyEvent",
+ "MediaCodec",
+ "MotionEvent",
+ "SurfaceTexture",
+ "ViewConfiguration",
+]
+
+SOURCES += ["!%s.cpp" % stem for stem in generated]
+
+EXPORTS += ["!%s.h" % stem for stem in generated]
+
+# The recursive make backend treats the first output specially: it's passed as
+# an open FileAvoidWrite to the invoked script. That doesn't work well with
+# the Gradle task that generates all of the outputs, so we add a dummy first
+# output.
+t = tuple(
+ ["sdk_bindings"]
+ + ["%s.cpp" % stem for stem in generated]
+ + ["%s.h" % stem for stem in generated]
+)
+
+GeneratedFile(
+ *t,
+ script="/mobile/android/gradle.py",
+ entry_point="generate_sdk_bindings",
+ inputs=["%s-classes.txt" % stem for stem in generated]
+)
+
+FINAL_LIBRARY = "xul"
+
+LOCAL_INCLUDES += [
+ "/widget/android",
+]