changeset 10538:d04c3870a057 jdk-10+13

Merge
author kcr
date Fri, 16 Jun 2017 16:13:53 -0700
parents 7b44520c8003 5d7ee8322b11
children 985b1a61741e 81f59e2aafb0
files .hgtags buildSrc/armv5sf.gradle buildSrc/armv6sf.gradle buildSrc/armv7hf.gradle buildSrc/armv7sf.gradle buildSrc/x86egl.gradle dependencies/jdk.jdeps/module-info.java.extra modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensApplication.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensClipboardDelegate.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensCursor.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensDnDClipboard.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensLogger.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensMenuBarDelegate.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensMenuDelegate.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensPixels.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensPlatformFactory.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensRobot.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensSystemClipboard.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensTimer.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensTouchInputSupport.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensView.java modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensWindow.java modules/javafx.graphics/src/main/native-glass/lens/LensApplication.c modules/javafx.graphics/src/main/native-glass/lens/LensCommon.h modules/javafx.graphics/src/main/native-glass/lens/LensCursor.c modules/javafx.graphics/src/main/native-glass/lens/LensCursorImages.c modules/javafx.graphics/src/main/native-glass/lens/LensCursorImages.h modules/javafx.graphics/src/main/native-glass/lens/LensInputEvents.c modules/javafx.graphics/src/main/native-glass/lens/LensLogger.c modules/javafx.graphics/src/main/native-glass/lens/LensLogger.h modules/javafx.graphics/src/main/native-glass/lens/LensPixels.c modules/javafx.graphics/src/main/native-glass/lens/LensRobot.c modules/javafx.graphics/src/main/native-glass/lens/LensScreen.c modules/javafx.graphics/src/main/native-glass/lens/LensView.c modules/javafx.graphics/src/main/native-glass/lens/LensWindow.c modules/javafx.graphics/src/main/native-glass/lens/android/android.c modules/javafx.graphics/src/main/native-glass/lens/android/android.h modules/javafx.graphics/src/main/native-glass/lens/android/com_oracle_dalvik_FXActivity.h modules/javafx.graphics/src/main/native-glass/lens/android/com_oracle_dalvik_FXActivity_InternalSurfaceView.h modules/javafx.graphics/src/main/native-glass/lens/cursor/fbCursor/fbCursor.c modules/javafx.graphics/src/main/native-glass/lens/cursor/nullCursor/nullCursor.c modules/javafx.graphics/src/main/native-glass/lens/dalvik/dalvikConst.h modules/javafx.graphics/src/main/native-glass/lens/dalvik/dalvikInput.c modules/javafx.graphics/src/main/native-glass/lens/dalvik/dalvikInput.h modules/javafx.graphics/src/main/native-glass/lens/dalvik/dalvikUtils.c modules/javafx.graphics/src/main/native-glass/lens/dalvik/dalvikUtils.h modules/javafx.graphics/src/main/native-glass/lens/dalvik/screen.c modules/javafx.graphics/src/main/native-glass/lens/input/LensInput.h modules/javafx.graphics/src/main/native-glass/lens/input/android/androidInput.c modules/javafx.graphics/src/main/native-glass/lens/input/android/androidInput.h modules/javafx.graphics/src/main/native-glass/lens/input/android/androidLens.c modules/javafx.graphics/src/main/native-glass/lens/input/android/androidLens.h modules/javafx.graphics/src/main/native-glass/lens/input/udev/udevInput.c modules/javafx.graphics/src/main/native-glass/lens/input/x11Container/x11Input.c modules/javafx.graphics/src/main/native-glass/lens/lensRFB/lensRFB.h modules/javafx.graphics/src/main/native-glass/lens/lensRFB/rfb.c modules/javafx.graphics/src/main/native-glass/lens/lensRFB/wrapped_rfb.h modules/javafx.graphics/src/main/native-glass/lens/lensport/dispmanCursor.c modules/javafx.graphics/src/main/native-glass/lens/lensport/fbRobot.c modules/javafx.graphics/src/main/native-glass/lens/lensport/imx6Cursor.c modules/javafx.graphics/src/main/native-glass/lens/lensport/initPlatform.c modules/javafx.graphics/src/main/native-glass/lens/lensport/lensPort.h modules/javafx.graphics/src/main/native-glass/lens/lensport/lensPortInternal.h modules/javafx.graphics/src/main/native-glass/lens/lensport/lensPortLogger.h modules/javafx.graphics/src/main/native-glass/lens/lensport/omapCursor.c modules/javafx.graphics/src/main/native-glass/lens/lensport/wrapped_bcm.h modules/javafx.graphics/src/main/native-glass/lens/lensport/wrapped_functions.c modules/javafx.graphics/src/main/native-glass/lens/wm/LensWindowManager.c modules/javafx.graphics/src/main/native-glass/lens/wm/LensWindowManager.h modules/javafx.graphics/src/main/native-glass/lens/wm/robot.c modules/javafx.graphics/src/main/native-glass/lens/wm/screen/androidScreen.c modules/javafx.graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c modules/javafx.graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c modules/javafx.graphics/src/main/native-glass/lens/wm/screen/headlessScreen.c modules/javafx.graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c
diffstat 468 files changed, 532949 insertions(+), 27307 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jun 15 10:32:49 2017 -0700
+++ b/.hgtags	Fri Jun 16 16:13:53 2017 -0700
@@ -421,6 +421,7 @@
 6ad0ed6f061ef4d1097e3553dab0081908d38c6a jdk-9+158
 6b195a6a6b038622b2508e570d2e76026e88e8f1 jdk-9+159
 ba188ce090552f8c5042aa69873828ebd87231c6 jdk-9+160
+dd3f736d2b8e0defbf8844a7576af3dfcb132841 jdk-10+0
 ea2666fc4b4cbd4a2585b634d298f8e3a6c26e25 jdk-9+161
 c76d1ddec8f4b734f7b06262edd36c0790de1787 jdk-9+162
 eec7ea4e8513856952a9e76d71100db23e94a04f jdk-9+163
@@ -431,7 +432,15 @@
 ce676c14b7d117855ebc73048534f56c0d325951 jdk-9+168
 351df411f9ebe81b882369a87a1b1491c9103a4d jdk-9+169
 ceb6024c48e22c8de065851260b7dae03113d654 jdk-9+170
+48902e8e83a912b001d81b69f6658c23129ed13e jdk-10+9
 1c8b7879f34ce55cc64efb5360c57eed311c595c jdk-9+171
+0f9a9a173cfef814ffa36eb6060a11649a2f223d jdk-10+10
 51d33b49c0886ff9544e35b62f800e280f67fd38 jdk-9+172
+ba08f42ce1927a0bab69b20d01af1de016a84daa jdk-10+11
+ba08f42ce1927a0bab69b20d01af1de016a84daa jdk-10+11
 9c95e8f07c287ca3bed7bf5ac8630603ef3d9d90 jdk-9+173
 e2e6c9400594dbdf14cc22254063d861a4c04d97 jdk-9+174
+0000000000000000000000000000000000000000 jdk-10+11
+0000000000000000000000000000000000000000 jdk-10+11
+6d823df2395587de18c4e9bde333bd3903111bc0 jdk-10+11
+554a6fb76ff31f5eabdc71f54d68ffa8a9a5a800 jdk-10+12
--- a/build.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ b/build.gradle	Fri Jun 16 16:13:53 2017 -0700
@@ -595,7 +595,6 @@
                 rootProject.dependencies.add(fetchToolsConfig, "javafx:$basename:$ver", {
                     artifact {
                         name = basename
-                        version = ver
                         type = ext
                     }
                 })
@@ -706,7 +705,7 @@
             commandLine ant, "-Dbuild.compiler=javac1.7"
         }
         if ((conf != null) && !rootProject.defaultHostTarget.equals(conf)) {
-            def targetProperties = rootProject.ext[t.trim().toUpperCase()]
+            def targetProperties = rootProject.ext[conf.trim().toUpperCase()]
             args("-Dcross.platform=$conf")
             if (targetProperties.containsKey('arch')) {
                 args("-Dcross.platform.arch=${targetProperties.arch}")
@@ -988,7 +987,6 @@
     if (!targetProperties.containsKey('includeSWT')) targetProperties.includeSWT = true
     if (!targetProperties.containsKey('includeSwing')) targetProperties.includeSwing = true
     if (!targetProperties.containsKey('includeNull3d')) targetProperties.includeNull3d = true
-    if (!targetProperties.containsKey('includeLens')) targetProperties.includeLens = false
     if (!targetProperties.containsKey('includeMonocle')) targetProperties.includeMonocle = false
     if (!targetProperties.containsKey('includeEGL')) targetProperties.includeEGL = false
 
@@ -2036,19 +2034,12 @@
             "-DCSS_META_DATA_TEST_DIR=$cssDir"
     }
 
-    // TODO JDK-8174944 Css2Bin really should be moved out and put into buildSrc if it can be
-    // TODO could change script to dynamically locate all .css files and create bss for them, probably better
-    // TODO also not sure there is any benefit to having css files in the the runtime modules at all
     processResources << {
-        ["$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/fxvk.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/highcontrast.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css ->
+        def cssFiles = fileTree(dir: "$moduleDir/com/sun/javafx/scene/control/skin")
+        cssFiles.include "**/*.css"
+        cssFiles.each { css ->
+            logger.info("converting CSS to BSS ${css}");
+
             javaexec {
                 executable = JAVA
                 workingDir = project.projectDir
@@ -2059,8 +2050,6 @@
         }
     }
 
-    // TODO - if the above TODO regarding Css2Bin is fixed, this should also
-    // be fixed.
     processShimsResources.dependsOn(project.task("copyShimBss", type: Copy) {
         from project.moduleDir
         into project.moduleShimsDir
@@ -2303,7 +2292,9 @@
     compileJava.options.compilerArgs.addAll([
             "--add-exports=java.base/sun.security.timestamp=jdk.packager",
             "--add-exports=java.base/sun.security.x509=jdk.packager",
-            "--add-exports=jdk.jdeps/com.sun.tools.jdeps=jdk.packager",
+
+            // Note: retain jdk.jlink qualified export for cases where the JDK does
+            // not contain the jdk.packager module.
             "--add-exports=jdk.jlink/jdk.tools.jlink.internal.packager=jdk.packager",
 
             // Note: not in extras...
@@ -2553,8 +2544,10 @@
         }
     }
 
-    assemble.dependsOn compileLauncher;
-    assemble.dependsOn buildJavaPackager
+    if (COMPILE_FXPACKAGER) {
+        assemble.dependsOn compileLauncher;
+        assemble.dependsOn buildJavaPackager
+    }
 
     classes << {
         // Copy all of the download libraries to libs directory for the sake of the IDEs
@@ -3423,21 +3416,6 @@
 
         compile.options.compilerArgs += ["-XDignore.symbol.file", "-encoding", "UTF-8"]
 
-        // If I am a module....
-        if (project.hasProperty('moduleSourcePath') &&
-                (project.hasProperty('buildModule') && project.buildModule)) {
-            project.compileJava {
-                options.compilerArgs.addAll([
-                    '-implicit:none',
-                    '--module-source-path', project.moduleSourcePath
-                    ])
-            }
-            // no jars needed for modules
-            project.jar.enabled = false
-
-            // and redirect the resources into the module
-            project.processResources.destinationDir = project.moduleDir
-        }
         // we use a custom javadoc command
         project.javadoc.enabled = false
 
@@ -3449,6 +3427,22 @@
         }
     } // tasks with javaCompile
 
+    // If I am a module....
+    if (project.hasProperty('moduleSourcePath') &&
+            (project.hasProperty('buildModule') && project.buildModule)) {
+        project.compileJava {
+            options.compilerArgs.addAll([
+                '-implicit:none',
+                '--module-source-path', project.moduleSourcePath
+                ])
+        }
+        // no jars needed for modules
+        project.jar.enabled = false
+
+        // and redirect the resources into the module
+        project.processResources.destinationDir = project.moduleDir
+    }
+
     if (project.hasProperty('moduleSourcePathShim') &&
             project.sourceSets.hasProperty('shims')) {
 
@@ -4087,10 +4081,6 @@
                     exclude ("com/sun/prism/es2/EGL*")
                 }
 
-                if (!targetProperties.includeLens) {
-                    exclude ("com/sun/glass/ui/lens")
-                }
-
                 if (!targetProperties.includeMonocle) {
                     exclude ("com/sun/glass/ui/monocle")
                     exclude("com/sun/prism/es2/Monocle*")
@@ -4165,6 +4155,11 @@
             final File javafxProperties = file("${moduleLibDir}/javafx.properties")
             outputs.file(javafxProperties)
 
+            if (targetProperties.containsKey("javafxPlatformProperties")) {
+                final File javafxPlatformProperties = file("${moduleLibDir}/javafx.platform.properties")
+                outputs.file(javafxPlatformProperties)
+            }
+
             doLast {
                 mkdir moduleLibDir
 
@@ -4185,8 +4180,6 @@
                 // Embedded builds define this file as well
                 if (targetProperties.containsKey("javafxPlatformProperties")) {
                     final File javafxPlatformProperties = file("${moduleLibDir}/javafx.platform.properties")
-                    outputs.file(javafxPlatformProperties)
-
                     javafxPlatformProperties.delete()
                     javafxPlatformProperties << targetProperties.javafxPlatformProperties
                     javafxPlatformProperties << "\n"
--- a/build.properties	Thu Jun 15 10:32:49 2017 -0700
+++ b/build.properties	Fri Jun 16 16:13:53 2017 -0700
@@ -33,7 +33,7 @@
 # Note: The expected value for suffix is one of [-alpha, -beta, -ea] 
 # Note: For fcs builds the suffix should be blank
 jfx.release.suffix=-ea
-jfx.release.major.version=9
+jfx.release.major.version=10
 jfx.release.minor.version=0
 jfx.release.security.version=0
 jfx.release.patch.version=0
@@ -48,10 +48,10 @@
 #
 ##############################################################################
 
-javadoc.bottom=<font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 9-ea</b></font>
+javadoc.bottom=<font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 10-ea</b></font>
 
-javadoc.title=JavaFX 9
-javadoc.header=JavaFX&nbsp;9
+javadoc.title=JavaFX 10
+javadoc.header=JavaFX&nbsp;10
 
 ##############################################################################
 #
--- a/buildSrc/armv5sf.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,577 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-ext.ARMV5SF = [:]
-def crossLibsPackage="armv6sf-02"
-
-// Define the location of the sdk and toolchain
-def sdk=file("${rootProject.CROSS_TOOLS_DIR}/${crossLibsPackage}")
-
-def compilerHome
-def compilerPrefix
-if (IS_LINUX) {
-    fetchExternalTools('ARMV5SF',
-            ["${crossLibsPackage}.tgz",
-             "arm-linaro-4.7.tgz" ],
-            rootProject.CROSS_TOOLS_DIR,
-            rootProject.IS_IMPORT_CROSS_TOOLS)
-
-    compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/arm-linaro-4.7")
-    compilerPrefix="arm-linux-gnueabi-"
-}
-
-if (rootProject.hasProperty("ARMV5SF_COMPILER")) {
-    logger.quiet "Using alternate ARMV5SF_COMPILER $rootProject.ARMV5SF_COMPILER"
-    compilerHome=file(rootProject.ARMV5SF_COMPILER);
-}
-if (rootProject.hasProperty("ARMV5SF_COMPILER_PREFIX")) {
-    logger.quiet "Using alternate ARMV5SF_COMPILER_PREFIX $rootProject.ARMV5SF_COMPILER_PREFIX"
-    compilerPrefix="${rootProject.ARMV5SF_COMPILER_PREFIX}"
-}
-def jniPlatform
-if (IS_LINUX) {
-    jniPlatform="linux"
-} else if (IS_MAC) {
-    jniPlatform="darwin"
-} else {
-    fail "armv5sf Cannot build on this platform"
-    return;
-}
-
-def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
-def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
-
-// Declare whether this particular target file applies to the current system
-ARMV5SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
-if (!ARMV5SF.canBuild) {
-    if (!compilerHome.exists()) println "armv5sf Missing compiler $compilerHome"
-    if (!sdk.exists()) println "armv5sf Missing sdk $sdk"
-    fail("armv5sF missing required tools")
-}
-
-// Lambda for naming the generated libs
-ARMV5SF.library = { name -> return "lib${name}.so" as String }
-
-ARMV5SF.compileSwing = false;
-ARMV5SF.compileSWT = false;
-ARMV5SF.compileFXPackager = false;
-ARMV5SF.compileWebnodeNative = false;
-ARMV5SF.compileMediaNative = false;
-
-ARMV5SF.includeLens = false
-ARMV5SF.includeMonocle = true
-ARMV5SF.includeNull3d = true
-ARMV5SF.includeEGL = true
-ARMV5SF.includeSwing = false
-ARMV5SF.includeSWT = false
-ARMV5SF.includeGTK = true
-
-ARMV5SF.javafxPlatformDefault="monocle"
-
-// Libraries end up in the sdk/lib/arm directory for arm builds
-ARMV5SF.arch = "arm"
-ARMV5SF.libDest = "lib"
-
-def commonFlags = [
-        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
-        "-Wextra", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
-// Specify the compilation parameters and link parameters
-def ccFlags = [
-        commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
-//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
-def linkFlags = ["-shared", commonFlags].flatten()
-
-// Specify the compilation parameters and link parameters
-def extraCFlags = [
-        ccFlags,
-        "-march=armv5", "-mfloat-abi=softfp", "-mfpu=vfp",
-        "-I$sdk/usr/include",
-        "-D_GNU_SOURCE", "-DOMAP3"].flatten();
-
-//See if we should build for imx6
-def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
-if (imxHeader.exists()) {
-        extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
-}
-
-def extraLFlags = [
-        linkFlags,
-        "-L$sdk/usr/lib",
-        "-L$sdk/usr/lib/arm-linux-gnueabi",
-        "-L$sdk/lib/arm-linux-gnueabi"
-        ].flatten()
-
-def x11CFlags = [extraCFlags, "-DUSE_XSHM"].flatten()
-def x11LFlags = [extraLFlags, "-lX11", "-lXext"].flatten()
-def eglCFlags = [extraCFlags].flatten()
-def eglLFlags = [extraLFlags].flatten()
-def dfbCFlags = ["-I$sdk/usr/include/directfb"]
-def dfbLFlags = ["-ldl"]
-// TODO dfb.args=disable-module=ps2mouse,disable-module=keyboard
-
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
-def monocleCFlags = [
-        extraCFlags,
-        "-Werror",
-        "-I", file("${project("graphics").projectDir}/src/main/native-glass/monocle/")].flatten();
-def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
-def glassCFlags = ["-ffast-math"]
-def glassLFlags = []
-
-def fontCFlags = [extraCFlags].flatten()
-def fontLFlags = [extraLFlags].flatten()
-
-def iioCFlags = [extraCFlags].flatten()
-def iioLFlags = [extraLFlags].flatten()
-
-def es2CFlags = [extraCFlags].flatten()
-def es2LFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2EglfbCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2EglfbLFlags = [extraLFlags, eglLFlags].flatten()
-def es2MonocleCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2MonocleFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2X11CFlags = [extraCFlags, eglCFlags, x11CFlags, "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
-def es2X11LFlags = [extraLFlags, x11LFlags, eglLFlags, "-lXdmcp", "-lXau"].flatten()
-
-def prismSWCFlags = [extraCFlags].flatten()
-def prismSWLFlags = [extraLFlags].flatten()
-
-def mediaCFlags = [extraCFlags,
-    "-I$sdk/usr/include/gstreamer-0.10",
-    "-I$sdk/usr/include/glib-2.0",
-    "-I$sdk/usr/lib/arm-linux-gnueabi/glib-2.0/include",
-    "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
-def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
-    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
-
-def webCFlags = [extraCFlags].flatten()
-def webLFlags = [extraLFlags].flatten()
-
-def gtkCFlags = [extraCFlags].flatten()
-def gtkLFlags = [extraLFlags].flatten()
-
-def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
-
-def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabi -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
-
-gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
-gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
-
-def monoclePlatformAdditions = """
-monocle.glass.platform=Monocle
-monocle.prism.order=es2,sw
-monocle.prism.eglfb=true
-monocle.prism.lcdtext=false
-monocle.prism.maxvram=128m
-monocle.prism.targetvram=112m
-monocle.use.egl=true
-monocle.use.gles2=true
-monocle.embedded=monocle
-monocle.com.sun.javafx.isEmbedded=true
-monocle.doNativeComposite=true
-monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
-monocle.prism.glDepthSize=0
-monocle.com.sun.javafx.gestures.zoom=true
-monocle.com.sun.javafx.gestures.rotate=true
-monocle.com.sun.javafx.gestures.scroll=true"""
-
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.maxTextureSize=2048
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
-def gtkPlatformAdditions = """
-gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-gtk.glass.platform=gtk
-gtk.prism.order=sw
-gtk.com.sun.javafx.isEmbedded=true
-gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
-gtk.com.sun.javafx.gestures.zoom=true
-gtk.com.sun.javafx.gestures.rotate=true
-gtk.com.sun.javafx.gestures.scroll=true"""
-
-def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
-def pangoLinkFlags = [extraLFlags];
-
-def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include "
-
-def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
-
-pangoCCFlags.addAll(pangoCFlags_pkgconfig.split(" "))
-pangoLinkFlags.addAll(pangoLFlags_pkgconfig.split(" "))
-
-def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
-                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
-def freetypeLinkFlags = []
-
-def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
-def freetypeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lfreetype"
-
-freetypeCCFlags.addAll(freetypeCFlags_pkgconfig.split(" "))
-freetypeLinkFlags.addAll(freetypeLFlags_pkgconfig.split(" "))
-
-ARMV5SF.javafxPlatformProperties = "javafx.platform=${ARMV5SF.javafxPlatformDefault}"
-
-ARMV5SF.glass = [:]
-ARMV5SF.glass.javahInclude = [
-    "com/sun/glass/events/**",
-    "com/sun/glass/ui/*"]
-ARMV5SF.glass.variants = [ ]
-if (ARMV5SF.includeLens) {
-    ARMV5SF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    ARMV5SF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    ARMV5SF.javafxPlatformProperties = ARMV5SF.javafxPlatformProperties + lensPlatformAdditions
-}
-if (ARMV5SF.includeMonocle) {
-    ARMV5SF.glass.variants.addAll("monocle", "monocle_x11");
-    ARMV5SF.glass.javahInclude.addAll(
-        "com/sun/glass/ui/monocle/*",
-        "com/sun/glass/ui/monocle/dispman/*",
-        "com/sun/glass/ui/monocle/mx6/*",
-        "com/sun/glass/ui/monocle/linux/*",
-        "com/sun/glass/ui/monocle/util/*",
-        "com/sun/glass/ui/monocle/x11/*");
-    ARMV5SF.javafxPlatformProperties = ARMV5SF.javafxPlatformProperties + monoclePlatformAdditions
-}
-if (ARMV5SF.includeGTK) {
-    ARMV5SF.glass.variants.addAll("gtk");
-    ARMV5SF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
-    ARMV5SF.javafxPlatformProperties = ARMV5SF.javafxPlatformProperties + gtkPlatformAdditions
-}
-
-ARMV5SF.glass.lib = "glass"
-
-ARMV5SF.glass.lensport = [:]
-ARMV5SF.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-ARMV5SF.glass.lensport.compiler = compiler
-ARMV5SF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/")].flatten()
-ARMV5SF.glass.lensport.linker = linker
-ARMV5SF.glass.lensport.linkFlags = [lensLFlags].flatten()
-ARMV5SF.glass.lensport.lib = "lens_porting"
-
-ARMV5SF.glass.monocle = [:]
-ARMV5SF.glass.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/mx6"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/linux"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util") ]
-ARMV5SF.glass.monocle.compiler = compiler
-ARMV5SF.glass.monocle.ccFlags = monocleCFlags
-ARMV5SF.glass.monocle.linker = linker
-ARMV5SF.glass.monocle.linkFlags = monocleLFlags
-ARMV5SF.glass.monocle.lib = "glass_monocle"
-
-ARMV5SF.glass.monocle_x11 = [:]
-ARMV5SF.glass.monocle_x11.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/x11") ]
-ARMV5SF.glass.monocle_x11.compiler = compiler
-ARMV5SF.glass.monocle_x11.ccFlags = monocleCFlags
-ARMV5SF.glass.monocle_x11.linker = linker
-ARMV5SF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
-ARMV5SF.glass.monocle_x11.lib = "glass_monocle_x11"
-
-ARMV5SF.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
-// TODO use /headless/headlessScreen when using headless
-ARMV5SF.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c")]
-ARMV5SF.glass.eglfb.compiler = compiler
-ARMV5SF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
-ARMV5SF.glass.eglfb.linker = linker
-ARMV5SF.glass.eglfb.linkFlags = [lensLFlags].flatten()
-ARMV5SF.glass.eglfb.lib = "glass_lens_eglfb"
-
-ARMV5SF.glass.directfb = [:]
-ARMV5SF.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c")]
-ARMV5SF.glass.directfb.compiler = compiler
-ARMV5SF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
-ARMV5SF.glass.directfb.linker = linker
-ARMV5SF.glass.directfb.linkFlags = [lensLFlags].flatten()
-ARMV5SF.glass.directfb.lib = "glass_lens_dfb"
-
-ARMV5SF.glass.fb = [:]
-ARMV5SF.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV5SF.glass.fb.compiler = compiler
-ARMV5SF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV5SF.glass.fb.linker = linker
-ARMV5SF.glass.fb.linkFlags = [lensLFlags].flatten()
-ARMV5SF.glass.fb.lib = "glass_lens_fb"
-
-ARMV5SF.glass.eglx11 = [:]
-ARMV5SF.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-ARMV5SF.glass.eglx11.compiler = compiler
-ARMV5SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags].flatten()
-ARMV5SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV5SF.glass.eglx11.linker = linker
-ARMV5SF.glass.eglx11.linkFlags = [lensLFlags].flatten()
-ARMV5SF.glass.eglx11.lib = "glass_lens_eglx11"
-
-ARMV5SF.glass.gtk = [:]
-ARMV5SF.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
-ARMV5SF.glass.gtk.compiler = compiler
-ARMV5SF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
-ARMV5SF.glass.gtk.linker = linker
-ARMV5SF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
-ARMV5SF.glass.gtk.lib = "glass"
-
-ARMV5SF.decora = [:]
-ARMV5SF.decora.compiler = compiler
-ARMV5SF.decora.ccFlags = extraCFlags
-ARMV5SF.decora.linker = linker
-ARMV5SF.decora.linkFlags = extraLFlags
-ARMV5SF.decora.lib = "decora_sse"
-
-ARMV5SF.prism = [:]
-ARMV5SF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
-ARMV5SF.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
-ARMV5SF.prism.compiler = compiler
-ARMV5SF.prism.ccFlags = es2CFlags
-ARMV5SF.prism.linker = linker
-ARMV5SF.prism.linkFlags = es2LFlags
-ARMV5SF.prism.lib = "prism_common"
-
-ARMV5SF.prismSW = [:]
-ARMV5SF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
-ARMV5SF.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
-ARMV5SF.prismSW.compiler = compiler
-ARMV5SF.prismSW.ccFlags = prismSWCFlags
-ARMV5SF.prismSW.linker = linker
-ARMV5SF.prismSW.linkFlags = prismSWLFlags
-ARMV5SF.prismSW.lib = "prism_sw"
-
-ARMV5SF.iio = [:]
-ARMV5SF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
-ARMV5SF.iio.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-iio"),
-    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
-ARMV5SF.iio.compiler = compiler
-ARMV5SF.iio.ccFlags = iioCFlags
-ARMV5SF.iio.linker = linker
-ARMV5SF.iio.linkFlags = iioLFlags
-ARMV5SF.iio.lib = "javafx_iio"
-
-ARMV5SF.prismES2 = [:]
-ARMV5SF.prismES2.variants = ["eglfb", "monocle"]
-ARMV5SF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
-
-ARMV5SF.prismES2.eglfb = [:]
-ARMV5SF.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglWrapper"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-ARMV5SF.prismES2.eglfb.compiler = compiler
-ARMV5SF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV5SF.glass.lensport.nativeSource ].flatten()
-ARMV5SF.prismES2.eglfb.linker = linker
-ARMV5SF.prismES2.eglfb.linkFlags = es2EglfbLFlags
-ARMV5SF.prismES2.eglfb.lib = "prism_es2_eglfb"
-
-ARMV5SF.prismES2.monocle= [:]
-ARMV5SF.prismES2.monocle.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
-]
-ARMV5SF.prismES2.monocle.compiler = compiler
-ARMV5SF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV5SF.glass.lensport.nativeSource ].flatten()
-ARMV5SF.prismES2.monocle.linker = linker
-ARMV5SF.prismES2.monocle.linkFlags = es2EglfbLFlags
-ARMV5SF.prismES2.monocle.lib = "prism_es2_monocle"
-
-ARMV5SF.prismES2.eglx11 = [:]
-ARMV5SF.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-ARMV5SF.prismES2.eglx11.compiler = compiler
-ARMV5SF.prismES2.eglx11.ccFlags = es2X11CFlags
-ARMV5SF.prismES2.eglx11.linker = linker
-ARMV5SF.prismES2.eglx11.linkFlags = es2X11LFlags
-ARMV5SF.prismES2.eglx11.lib = "prism_es2_eglx11"
-
-def closedDir = file("$projectDir/../rt-closed")
-ARMV5SF.font = [:]
-ARMV5SF.font.javahInclude = [
-    "com/sun/javafx/font/**/*",
-    "com/sun/javafx/text/**/*"]
-ARMV5SF.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
-ARMV5SF.font.compiler = compiler
-ARMV5SF.font.ccFlags = fontCFlags
-ARMV5SF.font.linker = linker
-ARMV5SF.font.linkFlags = fontLFlags
-ARMV5SF.font.lib = "javafx_font"
-
-ARMV5SF.fontT2K = [:]
-ARMV5SF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
-ARMV5SF.fontT2K.nativeSource = [
-        file("$closedDir/javafx-font-t2k-native/src"),
-        file("$closedDir/javafx-font-t2k-native/src/layout")]
-ARMV5SF.fontT2K.compiler = compiler
-ARMV5SF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
-ARMV5SF.fontT2K.linker = linker
-ARMV5SF.fontT2K.linkFlags = fontLFlags
-ARMV5SF.fontT2K.lib = "javafx_font_t2k"
-
-ARMV5SF.fontFreetype = [:]
-ARMV5SF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
-ARMV5SF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
-ARMV5SF.fontFreetype.compiler = compiler
-ARMV5SF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
-ARMV5SF.fontFreetype.linker = linker
-ARMV5SF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
-ARMV5SF.fontFreetype.lib = "javafx_font_freetype"
-
-ARMV5SF.fontPango = [:]
-ARMV5SF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
-ARMV5SF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
-ARMV5SF.fontPango.compiler = compiler
-ARMV5SF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
-ARMV5SF.fontPango.linker = linker
-ARMV5SF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV5SF.fontPango.lib = "javafx_font_pango"
-
-ARMV5SF.webkit = [:]
-ARMV5SF.webkit.binDir   = "$compilerHome/bin"
-ARMV5SF.webkit.compiler = compiler
-ARMV5SF.webkit.linker   = linker
-ARMV5SF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
-ARMV5SF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
-ARMV5SF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
-ARMV5SF.webkit.ccFlags  = extraCFlags.join(' ')
-ARMV5SF.webkit.linkFlags = extraLFlags.join(' ')
-
-ARMV5SF.disableMedia = true
-ARMV5SF.media = [:]
-ARMV5SF.media.compiler = compiler
-ARMV5SF.media.linker = linker
-ARMV5SF.media.extra_cflags = mediaCFlags.join(' ')
-ARMV5SF.media.extra_ldflags = mediaLFlags.join(' ')
-
-ARMV5SF.deploy = [:]
-ARMV5SF.deploy.publicLibraryFilter = [
-  "fxavcodecplugin-52.so",
-  "fxavcodecplugin-53.so",
-  "fxplugins.so",
-  "libjfxwebkit.so",
-  "libgstplugins-lite.so",
-  "libgstreamer-lite.so",
-  "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
-]
-ARMV5SF.deploy.compressBigJar=true
--- a/buildSrc/armv6hf.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ b/buildSrc/armv6hf.gradle	Fri Jun 16 16:13:53 2017 -0700
@@ -81,7 +81,6 @@
 ARMV6HF.compileWebnodeNative = false;
 ARMV6HF.compileMediaNative = false;
 
-ARMV6HF.includeLens = false
 ARMV6HF.includeMonocle = true
 ARMV6HF.includeNull3d = true
 ARMV6HF.includeEGL = true
@@ -128,7 +127,6 @@
         "-L$sdk/usr/lib/arm-linux-gnueabihf",
         "-L$sdk/opt/vc/lib"].flatten()
 
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
 def monocleCFlags = [
         extraCFlags,
         "-Werror",
@@ -190,70 +188,6 @@
 monocle.com.sun.javafx.gestures.rotate=true
 monocle.com.sun.javafx.gestures.scroll=true"""
 
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
 def gtkPlatformAdditions = """
 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
@@ -293,11 +227,6 @@
     "com/sun/glass/events/**",
     "com/sun/glass/ui/*"]
 ARMV6HF.glass.variants = [ ]
-if (ARMV6HF.includeLens) {
-    ARMV6HF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    ARMV6HF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + lensPlatformAdditions
-}
 if (ARMV6HF.includeMonocle) {
     ARMV6HF.glass.variants.addAll("monocle", "monocle_x11");
     ARMV6HF.glass.javahInclude.addAll(
@@ -317,16 +246,6 @@
 
 ARMV6HF.glass.lib = "glass"
 
-ARMV6HF.glass.lensport = [:]
-ARMV6HF.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-ARMV6HF.glass.lensport.compiler = compiler
-ARMV6HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/") ].flatten()
-ARMV6HF.glass.lensport.linker = linker
-ARMV6HF.glass.lensport.linkFlags = [lensLFlags].flatten()
-ARMV6HF.glass.lensport.lib = "lens_porting"
-
 ARMV6HF.glass.monocle = [:]
 ARMV6HF.glass.monocle.nativeSource = [
         file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
@@ -350,70 +269,15 @@
 ARMV6HF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
 ARMV6HF.glass.monocle_x11.lib = "glass_monocle_x11"
 
-ARMV6HF.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
-// TODO use /headless/headlessScreen when using headless
-ARMV6HF.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV6HF.glass.eglfb.compiler = compiler
-ARMV6HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
-ARMV6HF.glass.eglfb.linker = linker
-ARMV6HF.glass.eglfb.linkFlags = [lensLFlags].flatten()
-ARMV6HF.glass.eglfb.lib = "glass_lens_eglfb"
-
-ARMV6HF.glass.directfb = [:]
-ARMV6HF.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c") ]
-ARMV6HF.glass.directfb.compiler = compiler
-ARMV6HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
-ARMV6HF.glass.directfb.linker = linker
-ARMV6HF.glass.directfb.linkFlags = [lensLFlags].flatten()
-ARMV6HF.glass.directfb.lib = "glass_lens_dfb"
-
-ARMV6HF.glass.fb = [:]
-ARMV6HF.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV6HF.glass.fb.compiler = compiler
-ARMV6HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV6HF.glass.fb.linker = linker
-ARMV6HF.glass.fb.linkFlags = [lensLFlags].flatten()
-ARMV6HF.glass.fb.lib = "glass_lens_fb"
-
-ARMV6HF.glass.eglx11 = [:]
-ARMV6HF.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-ARMV6HF.glass.eglx11.compiler = compiler
-ARMV6HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV6HF.glass.eglx11.linker = linker
-ARMV6HF.glass.eglx11.linkFlags = [lensLFlags].flatten()
-ARMV6HF.glass.eglx11.lib = "glass_lens_eglx11"
+FileTree ft_gtk = fileTree("${project(":graphics").projectDir}/src/main/native-glass/gtk/") {
+    exclude("**/launcher.c")
+}
+File gen_headers = new File("${project(":graphics").buildDir}/gensrc/headers/javafx.graphics")
 
 ARMV6HF.glass.gtk = [:]
-ARMV6HF.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
+ARMV6HF.glass.gtk.nativeSource = ft_gtk.getFiles()
 ARMV6HF.glass.gtk.compiler = compiler
-ARMV6HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
+ARMV6HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX", "-I${gen_headers}"].flatten()
 ARMV6HF.glass.gtk.linker = linker
 ARMV6HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
 ARMV6HF.glass.gtk.lib = "glass"
@@ -455,22 +319,9 @@
 ARMV6HF.iio.lib = "javafx_iio"
 
 ARMV6HF.prismES2 = [:]
-ARMV6HF.prismES2.variants = ["eglfb", "monocle"]
+ARMV6HF.prismES2.variants = ["monocle"]
 ARMV6HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
 
-ARMV6HF.prismES2.eglfb = [:]
-ARMV6HF.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglWrapper"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-ARMV6HF.prismES2.eglfb.compiler = compiler
-ARMV6HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten()
-ARMV6HF.prismES2.eglfb.linker = linker
-ARMV6HF.prismES2.eglfb.linkFlags = [ es2EglfbLFlags, "-dl" ] .flatten()
-ARMV6HF.prismES2.eglfb.lib = "prism_es2_eglfb"
-
 ARMV6HF.prismES2.monocle= [:]
 ARMV6HF.prismES2.monocle.nativeSource = [
     file("${project("graphics").projectDir}/src/main/native-prism-es2"),
@@ -478,23 +329,11 @@
     file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
 ]
 ARMV6HF.prismES2.monocle.compiler = compiler
-ARMV6HF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten()
+ARMV6HF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", "-I${gen_headers}" ].flatten()
 ARMV6HF.prismES2.monocle.linker = linker
 ARMV6HF.prismES2.monocle.linkFlags =[  es2EglfbLFlags, "-ldl" ].flatten()
 ARMV6HF.prismES2.monocle.lib = "prism_es2_monocle"
 
-ARMV6HF.prismES2.eglx11 = [:]
-ARMV6HF.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-ARMV6HF.prismES2.eglx11.compiler = compiler
-ARMV6HF.prismES2.eglx11.ccFlags = es2X11CFlags
-ARMV6HF.prismES2.eglx11.linker = linker
-ARMV6HF.prismES2.eglx11.linkFlags = es2X11LFlags
-ARMV6HF.prismES2.eglx11.lib = "prism_es2_eglx11"
-
 def closedDir = file("$projectDir/../rt-closed")
 ARMV6HF.font = [:]
 ARMV6HF.font.javahInclude = [
@@ -562,6 +401,5 @@
   "libgstplugins-lite.so",
   "libgstreamer-lite.so",
   "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
 ]
 ARMV6HF.deploy.compressBigJar=true
--- a/buildSrc/armv6sf.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,577 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-ext.ARMV6SF = [:]
-def crossLibsPackage="armv6sf-02"
-
-// Define the location of the sdk and toolchain
-def sdk=file("${rootProject.CROSS_TOOLS_DIR}/${crossLibsPackage}")
-
-def compilerHome
-def compilerPrefix
-if (IS_LINUX) {
-    fetchExternalTools('ARMV6SF',
-            ["${crossLibsPackage}.tgz",
-             "arm-linaro-4.7.tgz" ],
-            rootProject.CROSS_TOOLS_DIR,
-            rootProject.IS_IMPORT_CROSS_TOOLS)
-
-    compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/arm-linaro-4.7")
-    compilerPrefix="arm-linux-gnueabi-"
-}
-
-if (rootProject.hasProperty("ARMV6SF_COMPILER")) {
-    logger.quiet "Using alternate ARMV6SF_COMPILER $rootProject.ARMV6SF_COMPILER"
-    compilerHome=file(rootProject.ARMV6SF_COMPILER);
-}
-if (rootProject.hasProperty("ARMV6SF_COMPILER_PREFIX")) {
-    logger.quiet "Using alternate ARMV6SF_COMPILER_PREFIX $rootProject.ARMV6SF_COMPILER_PREFIX"
-    compilerPrefix="${rootProject.ARMV6SF_COMPILER_PREFIX}"
-}
-def jniPlatform
-if (IS_LINUX) {
-    jniPlatform="linux"
-} else if (IS_MAC) {
-    jniPlatform="darwin"
-} else {
-    fail "armv6sf Cannot build on this platform"
-    return;
-}
-
-def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
-def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
-
-// Declare whether this particular target file applies to the current system
-ARMV6SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
-if (!ARMV6SF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
-    fail("armv6sf missing required tools")
-}
-
-// Lambda for naming the generated libs
-ARMV6SF.library = { name -> return "lib${name}.so" as String }
-
-ARMV6SF.compileSwing = false;
-ARMV6SF.compileSWT = false;
-ARMV6SF.compileFXPackager = false;
-ARMV6SF.compileWebnodeNative = false;
-ARMV6SF.compileMediaNative = false;
-
-ARMV6SF.includeLens = false
-ARMV6SF.includeMonocle = true
-ARMV6SF.includeNull3d = true
-ARMV6SF.includeEGL = true
-ARMV6SF.includeSwing = false
-ARMV6SF.includeSWT = false
-ARMV6SF.includeGTK = true
-
-ARMV6SF.javafxPlatformDefault="monocle"
-
-// Libraries end up in the sdk/lib/arm directory for arm builds
-ARMV6SF.arch = "arm"
-ARMV6SF.libDest = "lib"
-
-def commonFlags = [
-        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
-        "-Wextra", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
-// Specify the compilation parameters and link parameters
-def ccFlags = [
-        commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
-//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
-def linkFlags = ["-shared", commonFlags].flatten()
-
-// Specify the compilation parameters and link parameters
-def extraCFlags = [
-        ccFlags,
-        "-march=armv6", "-mfloat-abi=softfp", "-mfpu=vfp",
-        "-I$sdk/usr/include",
-        "-D_GNU_SOURCE", "-DOMAP3"].flatten();
-
-//See if we should build for imx6
-def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
-if (imxHeader.exists()) {
-        extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
-}
-
-def extraLFlags = [
-        linkFlags,
-        "-L$sdk/usr/lib",
-        "-L$sdk/usr/lib/arm-linux-gnueabi",
-        "-L$sdk/lib/arm-linux-gnueabi"
-        ].flatten()
-
-def x11CFlags = [extraCFlags, "-DUSE_XSHM"].flatten()
-def x11LFlags = [extraLFlags, "-lX11", "-lXext"].flatten()
-def eglCFlags = [extraCFlags].flatten()
-def eglLFlags = [extraLFlags].flatten()
-def dfbCFlags = ["-I$sdk/usr/include/directfb"]
-def dfbLFlags = ["-ldl"]
-// TODO dfb.args=disable-module=ps2mouse,disable-module=keyboard
-
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
-def monocleCFlags = [
-        extraCFlags,
-        "-Werror",
-        "-I", file("${project("graphics").projectDir}/src/main/native-glass/monocle/")].flatten();
-def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
-def glassCFlags = ["-ffast-math"]
-def glassLFlags = []
-
-def fontCFlags = [extraCFlags].flatten()
-def fontLFlags = [extraLFlags].flatten()
-
-def iioCFlags = [extraCFlags].flatten()
-def iioLFlags = [extraLFlags].flatten()
-
-def es2CFlags = [extraCFlags].flatten()
-def es2LFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2EglfbCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2EglfbLFlags = [extraLFlags, eglLFlags].flatten()
-def es2MonocleCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2MonocleFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2X11CFlags = [extraCFlags, eglCFlags, x11CFlags, "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
-def es2X11LFlags = [extraLFlags, x11LFlags, eglLFlags, "-lXdmcp", "-lXau"].flatten()
-
-def prismSWCFlags = [extraCFlags].flatten()
-def prismSWLFlags = [extraLFlags].flatten()
-
-def mediaCFlags = [extraCFlags,
-    "-I$sdk/usr/include/gstreamer-0.10",
-    "-I$sdk/usr/include/glib-2.0",
-    "-I$sdk/usr/lib/arm-linux-gnueabi/glib-2.0/include",
-    "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
-def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
-    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
-
-def webCFlags = [extraCFlags].flatten()
-def webLFlags = [extraLFlags].flatten()
-
-def gtkCFlags = [extraCFlags].flatten()
-def gtkLFlags = [extraLFlags].flatten()
-
-def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
-
-def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabi -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
-
-gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
-gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
-
-def monoclePlatformAdditions = """
-monocle.glass.platform=Monocle
-monocle.prism.order=es2,sw
-monocle.prism.eglfb=true
-monocle.prism.lcdtext=false
-monocle.prism.maxvram=128m
-monocle.prism.targetvram=112m
-monocle.use.egl=true
-monocle.use.gles2=true
-monocle.embedded=monocle
-monocle.com.sun.javafx.isEmbedded=true
-monocle.doNativeComposite=true
-monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
-monocle.prism.glDepthSize=0
-monocle.com.sun.javafx.gestures.zoom=true
-monocle.com.sun.javafx.gestures.rotate=true
-monocle.com.sun.javafx.gestures.scroll=true"""
-
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.maxTextureSize=2048
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
-def gtkPlatformAdditions = """
-gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-gtk.glass.platform=gtk
-gtk.prism.order=sw
-gtk.com.sun.javafx.isEmbedded=true
-gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
-gtk.com.sun.javafx.gestures.zoom=true
-gtk.com.sun.javafx.gestures.rotate=true
-gtk.com.sun.javafx.gestures.scroll=true"""
-
-def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
-def pangoLinkFlags = [extraLFlags];
-
-def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include "
-
-def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
-
-pangoCCFlags.addAll(pangoCFlags_pkgconfig.split(" "))
-pangoLinkFlags.addAll(pangoLFlags_pkgconfig.split(" "))
-
-def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
-                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
-def freetypeLinkFlags = []
-
-def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
-def freetypeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lfreetype"
-
-freetypeCCFlags.addAll(freetypeCFlags_pkgconfig.split(" "))
-freetypeLinkFlags.addAll(freetypeLFlags_pkgconfig.split(" "))
-
-ARMV6SF.javafxPlatformProperties = "javafx.platform=${ARMV6SF.javafxPlatformDefault}"
-
-ARMV6SF.glass = [:]
-ARMV6SF.glass.javahInclude = [
-    "com/sun/glass/events/**",
-    "com/sun/glass/ui/*"]
-ARMV6SF.glass.variants = [ ]
-if (ARMV6SF.includeLens) {
-    ARMV6SF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    ARMV6SF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + lensPlatformAdditions
-}
-if (ARMV6SF.includeMonocle) {
-    ARMV6SF.glass.variants.addAll("monocle", "monocle_x11");
-    ARMV6SF.glass.javahInclude.addAll(
-        "com/sun/glass/ui/monocle/*",
-        "com/sun/glass/ui/monocle/dispman/*",
-        "com/sun/glass/ui/monocle/mx6/*",
-        "com/sun/glass/ui/monocle/linux/*",
-        "com/sun/glass/ui/monocle/util/*",
-        "com/sun/glass/ui/monocle/x11/*");
-    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + monoclePlatformAdditions
-}
-if (ARMV6SF.includeGTK) {
-    ARMV6SF.glass.variants.addAll("gtk");
-    ARMV6SF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
-    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + gtkPlatformAdditions
-}
-
-ARMV6SF.glass.lib = "glass"
-
-ARMV6SF.glass.lensport = [:]
-ARMV6SF.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-ARMV6SF.glass.lensport.compiler = compiler
-ARMV6SF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/")].flatten()
-ARMV6SF.glass.lensport.linker = linker
-ARMV6SF.glass.lensport.linkFlags = [lensLFlags].flatten()
-ARMV6SF.glass.lensport.lib = "lens_porting"
-
-ARMV6SF.glass.monocle = [:]
-ARMV6SF.glass.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/mx6"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/linux"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util") ]
-ARMV6SF.glass.monocle.compiler = compiler
-ARMV6SF.glass.monocle.ccFlags = monocleCFlags
-ARMV6SF.glass.monocle.linker = linker
-ARMV6SF.glass.monocle.linkFlags = monocleLFlags
-ARMV6SF.glass.monocle.lib = "glass_monocle"
-
-ARMV6SF.glass.monocle_x11 = [:]
-ARMV6SF.glass.monocle_x11.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/x11") ]
-ARMV6SF.glass.monocle_x11.compiler = compiler
-ARMV6SF.glass.monocle_x11.ccFlags = monocleCFlags
-ARMV6SF.glass.monocle_x11.linker = linker
-ARMV6SF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
-ARMV6SF.glass.monocle_x11.lib = "glass_monocle_x11"
-
-ARMV6SF.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
-// TODO use /headless/headlessScreen when using headless
-ARMV6SF.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c")]
-ARMV6SF.glass.eglfb.compiler = compiler
-ARMV6SF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
-ARMV6SF.glass.eglfb.linker = linker
-ARMV6SF.glass.eglfb.linkFlags = [lensLFlags].flatten()
-ARMV6SF.glass.eglfb.lib = "glass_lens_eglfb"
-
-ARMV6SF.glass.directfb = [:]
-ARMV6SF.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c")]
-ARMV6SF.glass.directfb.compiler = compiler
-ARMV6SF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
-ARMV6SF.glass.directfb.linker = linker
-ARMV6SF.glass.directfb.linkFlags = [lensLFlags].flatten()
-ARMV6SF.glass.directfb.lib = "glass_lens_dfb"
-
-ARMV6SF.glass.fb = [:]
-ARMV6SF.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV6SF.glass.fb.compiler = compiler
-ARMV6SF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV6SF.glass.fb.linker = linker
-ARMV6SF.glass.fb.linkFlags = [lensLFlags].flatten()
-ARMV6SF.glass.fb.lib = "glass_lens_fb"
-
-ARMV6SF.glass.eglx11 = [:]
-ARMV6SF.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-ARMV6SF.glass.eglx11.compiler = compiler
-ARMV6SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags].flatten()
-ARMV6SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV6SF.glass.eglx11.linker = linker
-ARMV6SF.glass.eglx11.linkFlags = [lensLFlags].flatten()
-ARMV6SF.glass.eglx11.lib = "glass_lens_eglx11"
-
-ARMV6SF.glass.gtk = [:]
-ARMV6SF.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
-ARMV6SF.glass.gtk.compiler = compiler
-ARMV6SF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
-ARMV6SF.glass.gtk.linker = linker
-ARMV6SF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
-ARMV6SF.glass.gtk.lib = "glass"
-
-ARMV6SF.decora = [:]
-ARMV6SF.decora.compiler = compiler
-ARMV6SF.decora.ccFlags = extraCFlags
-ARMV6SF.decora.linker = linker
-ARMV6SF.decora.linkFlags = extraLFlags
-ARMV6SF.decora.lib = "decora_sse"
-
-ARMV6SF.prism = [:]
-ARMV6SF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
-ARMV6SF.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
-ARMV6SF.prism.compiler = compiler
-ARMV6SF.prism.ccFlags = es2CFlags
-ARMV6SF.prism.linker = linker
-ARMV6SF.prism.linkFlags = es2LFlags
-ARMV6SF.prism.lib = "prism_common"
-
-ARMV6SF.prismSW = [:]
-ARMV6SF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
-ARMV6SF.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
-ARMV6SF.prismSW.compiler = compiler
-ARMV6SF.prismSW.ccFlags = prismSWCFlags
-ARMV6SF.prismSW.linker = linker
-ARMV6SF.prismSW.linkFlags = prismSWLFlags
-ARMV6SF.prismSW.lib = "prism_sw"
-
-ARMV6SF.iio = [:]
-ARMV6SF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
-ARMV6SF.iio.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-iio"),
-    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
-ARMV6SF.iio.compiler = compiler
-ARMV6SF.iio.ccFlags = iioCFlags
-ARMV6SF.iio.linker = linker
-ARMV6SF.iio.linkFlags = iioLFlags
-ARMV6SF.iio.lib = "javafx_iio"
-
-ARMV6SF.prismES2 = [:]
-ARMV6SF.prismES2.variants = ["eglfb", "monocle"]
-ARMV6SF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
-
-ARMV6SF.prismES2.eglfb = [:]
-ARMV6SF.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglWrapper"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-ARMV6SF.prismES2.eglfb.compiler = compiler
-ARMV6SF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV6SF.glass.lensport.nativeSource ].flatten()
-ARMV6SF.prismES2.eglfb.linker = linker
-ARMV6SF.prismES2.eglfb.linkFlags = es2EglfbLFlags
-ARMV6SF.prismES2.eglfb.lib = "prism_es2_eglfb"
-
-ARMV6SF.prismES2.monocle= [:]
-ARMV6SF.prismES2.monocle.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
-]
-ARMV6SF.prismES2.monocle.compiler = compiler
-ARMV6SF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV6SF.glass.lensport.nativeSource ].flatten()
-ARMV6SF.prismES2.monocle.linker = linker
-ARMV6SF.prismES2.monocle.linkFlags = es2EglfbLFlags
-ARMV6SF.prismES2.monocle.lib = "prism_es2_monocle"
-
-ARMV6SF.prismES2.eglx11 = [:]
-ARMV6SF.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-ARMV6SF.prismES2.eglx11.compiler = compiler
-ARMV6SF.prismES2.eglx11.ccFlags = es2X11CFlags
-ARMV6SF.prismES2.eglx11.linker = linker
-ARMV6SF.prismES2.eglx11.linkFlags = es2X11LFlags
-ARMV6SF.prismES2.eglx11.lib = "prism_es2_eglx11"
-
-def closedDir = file("$projectDir/../rt-closed")
-ARMV6SF.font = [:]
-ARMV6SF.font.javahInclude = [
-    "com/sun/javafx/font/**/*",
-    "com/sun/javafx/text/**/*"]
-ARMV6SF.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
-ARMV6SF.font.compiler = compiler
-ARMV6SF.font.ccFlags = fontCFlags
-ARMV6SF.font.linker = linker
-ARMV6SF.font.linkFlags = fontLFlags
-ARMV6SF.font.lib = "javafx_font"
-
-ARMV6SF.fontT2K = [:]
-ARMV6SF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
-ARMV6SF.fontT2K.nativeSource = [
-        file("$closedDir/javafx-font-t2k-native/src"),
-        file("$closedDir/javafx-font-t2k-native/src/layout")]
-ARMV6SF.fontT2K.compiler = compiler
-ARMV6SF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
-ARMV6SF.fontT2K.linker = linker
-ARMV6SF.fontT2K.linkFlags = fontLFlags
-ARMV6SF.fontT2K.lib = "javafx_font_t2k"
-
-ARMV6SF.fontFreetype = [:]
-ARMV6SF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
-ARMV6SF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
-ARMV6SF.fontFreetype.compiler = compiler
-ARMV6SF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
-ARMV6SF.fontFreetype.linker = linker
-ARMV6SF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
-ARMV6SF.fontFreetype.lib = "javafx_font_freetype"
-
-ARMV6SF.fontPango = [:]
-ARMV6SF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
-ARMV6SF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
-ARMV6SF.fontPango.compiler = compiler
-ARMV6SF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
-ARMV6SF.fontPango.linker = linker
-ARMV6SF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV6SF.fontPango.lib = "javafx_font_pango"
-
-ARMV6SF.webkit = [:]
-ARMV6SF.webkit.binDir   = "$compilerHome/bin"
-ARMV6SF.webkit.compiler = compiler
-ARMV6SF.webkit.linker   = linker
-ARMV6SF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
-ARMV6SF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
-ARMV6SF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
-ARMV6SF.webkit.ccFlags  = extraCFlags.join(' ')
-ARMV6SF.webkit.linkFlags = extraLFlags.join(' ')
-
-ARMV6SF.disableMedia = true
-ARMV6SF.media = [:]
-ARMV6SF.media.compiler = compiler
-ARMV6SF.media.linker = linker
-ARMV6SF.media.extra_cflags = mediaCFlags.join(' ')
-ARMV6SF.media.extra_ldflags = mediaLFlags.join(' ')
-
-ARMV6SF.deploy = [:]
-ARMV6SF.deploy.publicLibraryFilter = [
-  "fxavcodecplugin-52.so",
-  "fxavcodecplugin-53.so",
-  "fxplugins.so",
-  "libjfxwebkit.so",
-  "libgstplugins-lite.so",
-  "libgstreamer-lite.so",
-  "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
-]
-ARMV6SF.deploy.compressBigJar=true
--- a/buildSrc/armv7hf.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,567 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-ext.ARMV7HF = [:]
-
-// Define the location of the sdk and toolchain
-def crossLibsPackage="armv6hf-02"
-def sdk=file("${rootProject.CROSS_TOOLS_DIR}/$crossLibsPackage")
-def compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
-def compilerPrefix
-def jniPlatform
-if (IS_LINUX) {
-    fetchExternalTools('ARMV7HF',
-            ["${crossLibsPackage}.tgz",
-             "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tgz" ],
-            rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
-
-    compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
-    compilerPrefix="arm-linux-gnueabihf-"
-    jniPlatform="linux"
-} else if (IS_MAC) {
-    fetchExternalTools('ARMV7HF',
-            ["${crossLibsPackage}.tgz"],
-            rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
-
-    compilerHome=file("/usr/local/arm-linux")
-    compilerPrefix="arm-linux-"
-    jniPlatform="darwin"
-} else {
-    fail("armv7hf Cannot build on this platform")
-}
-
-if (rootProject.hasProperty("ARMV7HF_COMPILER")) {
-    logger.quiet "Using alternate ARMV7HF_COMPILER $rootProject.ARMV7HF_COMPILER"
-    compilerHome=file(rootProject.ARMV7HF_COMPILER);
-}
-if (rootProject.hasProperty("ARMV7HF_COMPILER_PREFIX")) {
-    logger.quiet "Using alternate ARMV7HF_COMPILER_PREFIX $rootProject.ARMV7HF_COMPILER_PREFIX"
-    compilerPrefix="${rootProject.ARMV7HF_COMPILER_PREFIX}"
-}
-
-def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
-def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
-
-// Declare whether this particular target file applies to the current system
-ARMV7HF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
-if (!ARMV7HF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
-    fail("armv7hf missing required tools")
-}
-
-// Lambda for naming the generated libs
-ARMV7HF.library = { name -> return "lib${name}.so" as String }
-
-ARMV7HF.compileSwing = false;
-ARMV7HF.compileSWT = false;
-ARMV7HF.compileFXPackager = false;
-ARMV7HF.compileWebnodeNative = false;
-ARMV7HF.compileMediaNative = false;
-
-ARMV7HF.includeLens = false
-ARMV7HF.includeMonocle = true
-ARMV7HF.includeNull3d = true
-ARMV7HF.includeEGL = true
-ARMV7HF.includeSwing = false
-ARMV7HF.includeSWT = false
-ARMV7HF.includeGTK = true
-
-ARMV7HF.javafxPlatformDefault="monocle"
-
-// Libraries end up in the sdk/lib/arm directory for arm builds
-ARMV7HF.arch = "arm"
-ARMV7HF.libDest = "lib"
-
-def commonFlags = [
-        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
-        "-Wextra", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
-// Specify the compilation parameters and link parameters
-def ccFlags = [
-        commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
-//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
-def linkFlags = ["-shared", commonFlags].flatten()
-
-// Specify the compilation parameters and link parameters
-def extraCFlags = [
-        ccFlags,
-        "-mthumb", "-march=armv7-a", "-mfloat-abi=hard", "-mfpu=vfp",
-        "-I$sdk/usr/include",
-        "-I$sdk/opt/vc/include",
-        "-I$sdk/opt/vc/include/interface/vcos/pthreads",
-        "-I$sdk/opt/vc/include/interface/vmcs_host/linux",
-        "-DOMAP3", "-DUSE_DISPMAN"].flatten();
-
-//See if we should build for imx6
-def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
-if (imxHeader.exists()) {
-        extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
-}
-
-def extraLFlags = [
-        linkFlags,
-        "-L$sdk/lib/arm-linux-gnueabihf",
-        "-L$sdk/usr/lib",
-        "-L$sdk/usr/lib/arm-linux-gnueabihf",
-        "-L$sdk/opt/vc/lib"].flatten()
-
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
-def monocleCFlags = [
-        extraCFlags,
-        "-Werror",
-        "-I", file("${project("graphics").projectDir}/src/main/native-glass/monocle/")].flatten();
-def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
-
-def fontCFlags = [extraCFlags].flatten()
-def fontLFlags = [extraLFlags, "-ldl"].flatten()
-
-def iioCFlags = [extraCFlags,
-         "-Wno-main" // suppress warnings about using main as a variable, 3rd party code
-         ].flatten()
-def iioLFlags = [extraLFlags].flatten()
-
-def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2EglfbLFlags = [extraLFlags].flatten()
-def es2MonocleCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2MonocleLFlags = [extraLFlags].flatten()
-
-def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
-def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
-
-def mediaCFlags = [extraCFlags,
-    "-I$sdk/usr/include/gstreamer-0.10",
-    "-I$sdk/usr/include/glib-2.0",
-    "-I$sdk/usr/lib/arm-linux-gnueabihf/glib-2.0/include",
-    "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
-def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
-    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
-
-def webCFlags = [extraCFlags].flatten()
-def webLFlags = [extraLFlags].flatten()
-
-def gtkCFlags = [extraCFlags].flatten()
-def gtkLFlags = [extraLFlags].flatten()
-
-def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
-
-def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabihf -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
-
-gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
-gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
-
-def monoclePlatformAdditions = """
-monocle.glass.platform=Monocle
-monocle.prism.order=es2,sw
-monocle.prism.eglfb=true
-monocle.prism.lcdtext=false
-monocle.prism.maxvram=128m
-monocle.prism.targetvram=112m
-monocle.use.egl=true
-monocle.use.gles2=true
-monocle.embedded=monocle
-monocle.com.sun.javafx.isEmbedded=true
-monocle.doNativeComposite=true
-monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
-monocle.prism.glDepthSize=0
-monocle.com.sun.javafx.gestures.zoom=true
-monocle.com.sun.javafx.gestures.rotate=true
-monocle.com.sun.javafx.gestures.scroll=true"""
-
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
-def gtkPlatformAdditions = """
-gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-gtk.glass.platform=gtk
-gtk.prism.order=sw
-gtk.com.sun.javafx.isEmbedded=true
-gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
-gtk.com.sun.javafx.gestures.zoom=true
-gtk.com.sun.javafx.gestures.rotate=true
-gtk.com.sun.javafx.gestures.scroll=true"""
-
-def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
-def pangoLinkFlags = [extraLFlags];
-
-def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include"
-
-def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
-
-pangoCCFlags.addAll(pangoCFlags_pkgconfig.split(" "))
-pangoLinkFlags.addAll(pangoLFlags_pkgconfig.split(" "))
-
-def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
-                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
-def freetypeLinkFlags = []
-
-def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
-def freetypeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lfreetype"
-
-freetypeCCFlags.addAll(freetypeCFlags_pkgconfig.split(" "))
-freetypeLinkFlags.addAll(freetypeLFlags_pkgconfig.split(" "))
-
-ARMV7HF.javafxPlatformProperties = "javafx.platform=${ARMV7HF.javafxPlatformDefault}"
-
-ARMV7HF.glass = [:]
-ARMV7HF.glass.javahInclude = [
-    "com/sun/glass/events/**",
-    "com/sun/glass/ui/*"]
-ARMV7HF.glass.variants = [ ]
-if (ARMV7HF.includeLens) {
-    ARMV7HF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    ARMV7HF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    ARMV7HF.javafxPlatformProperties = ARMV7HF.javafxPlatformProperties + lensPlatformAdditions
-}
-if (ARMV7HF.includeMonocle) {
-    ARMV7HF.glass.variants.addAll("monocle", "monocle_x11");
-    ARMV7HF.glass.javahInclude.addAll(
-        "com/sun/glass/ui/monocle/*",
-        "com/sun/glass/ui/monocle/dispman/*",
-        "com/sun/glass/ui/monocle/mx6/*",
-        "com/sun/glass/ui/monocle/linux/*",
-        "com/sun/glass/ui/monocle/util/*",
-        "com/sun/glass/ui/monocle/x11/*");
-    ARMV7HF.javafxPlatformProperties = ARMV7HF.javafxPlatformProperties + monoclePlatformAdditions
-}
-if (ARMV7HF.includeGTK) {
-    ARMV7HF.glass.variants.addAll("gtk");
-    ARMV7HF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
-    ARMV7HF.javafxPlatformProperties = ARMV7HF.javafxPlatformProperties + gtkPlatformAdditions
-}
-
-ARMV7HF.glass.lib = "glass"
-
-ARMV7HF.glass.lensport = [:]
-ARMV7HF.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-ARMV7HF.glass.lensport.compiler = compiler
-ARMV7HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/") ].flatten()
-ARMV7HF.glass.lensport.linker = linker
-ARMV7HF.glass.lensport.linkFlags = [lensLFlags].flatten()
-ARMV7HF.glass.lensport.lib = "lens_porting"
-
-ARMV7HF.glass.monocle = [:]
-ARMV7HF.glass.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/dispman"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/mx6"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/linux"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util") ]
-ARMV7HF.glass.monocle.compiler = compiler
-ARMV7HF.glass.monocle.ccFlags = monocleCFlags
-ARMV7HF.glass.monocle.linker = linker
-ARMV7HF.glass.monocle.linkFlags = monocleLFlags
-ARMV7HF.glass.monocle.lib = "glass_monocle"
-
-ARMV7HF.glass.monocle_x11 = [:]
-ARMV7HF.glass.monocle_x11.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/x11") ]
-ARMV7HF.glass.monocle_x11.compiler = compiler
-ARMV7HF.glass.monocle_x11.ccFlags = monocleCFlags
-ARMV7HF.glass.monocle_x11.linker = linker
-ARMV7HF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
-ARMV7HF.glass.monocle_x11.lib = "glass_monocle_x11"
-
-ARMV7HF.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
-// TODO use /headless/headlessScreen when using headless
-ARMV7HF.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV7HF.glass.eglfb.compiler = compiler
-ARMV7HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
-ARMV7HF.glass.eglfb.linker = linker
-ARMV7HF.glass.eglfb.linkFlags = [lensLFlags].flatten()
-ARMV7HF.glass.eglfb.lib = "glass_lens_eglfb"
-
-ARMV7HF.glass.directfb = [:]
-ARMV7HF.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c") ]
-ARMV7HF.glass.directfb.compiler = compiler
-ARMV7HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
-ARMV7HF.glass.directfb.linker = linker
-ARMV7HF.glass.directfb.linkFlags = [lensLFlags].flatten()
-ARMV7HF.glass.directfb.lib = "glass_lens_dfb"
-
-ARMV7HF.glass.fb = [:]
-ARMV7HF.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV7HF.glass.fb.compiler = compiler
-ARMV7HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV7HF.glass.fb.linker = linker
-ARMV7HF.glass.fb.linkFlags = [lensLFlags].flatten()
-ARMV7HF.glass.fb.lib = "glass_lens_fb"
-
-ARMV7HF.glass.eglx11 = [:]
-ARMV7HF.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-ARMV7HF.glass.eglx11.compiler = compiler
-ARMV7HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV7HF.glass.eglx11.linker = linker
-ARMV7HF.glass.eglx11.linkFlags = [lensLFlags].flatten()
-ARMV7HF.glass.eglx11.lib = "glass_lens_eglx11"
-
-ARMV7HF.glass.gtk = [:]
-ARMV7HF.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
-ARMV7HF.glass.gtk.compiler = compiler
-ARMV7HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
-ARMV7HF.glass.gtk.linker = linker
-ARMV7HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
-ARMV7HF.glass.gtk.lib = "glass"
-
-ARMV7HF.decora = [:]
-ARMV7HF.decora.compiler = compiler
-ARMV7HF.decora.ccFlags = extraCFlags
-ARMV7HF.decora.linker = linker
-ARMV7HF.decora.linkFlags = extraLFlags
-ARMV7HF.decora.lib = "decora_sse"
-
-ARMV7HF.prism = [:]
-ARMV7HF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
-ARMV7HF.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
-ARMV7HF.prism.compiler = compiler
-ARMV7HF.prism.ccFlags = [extraCFlags].flatten()
-ARMV7HF.prism.linker = linker
-ARMV7HF.prism.linkFlags = [extraLFlags].flatten()
-ARMV7HF.prism.lib = "prism_common"
-
-ARMV7HF.prismSW = [:]
-ARMV7HF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
-ARMV7HF.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
-ARMV7HF.prismSW.compiler = compiler
-ARMV7HF.prismSW.ccFlags = [extraCFlags].flatten()
-ARMV7HF.prismSW.linker = linker
-ARMV7HF.prismSW.linkFlags = [extraLFlags].flatten()
-ARMV7HF.prismSW.lib = "prism_sw"
-
-ARMV7HF.iio = [:]
-ARMV7HF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
-ARMV7HF.iio.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-iio"),
-    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
-ARMV7HF.iio.compiler = compiler
-ARMV7HF.iio.ccFlags = iioCFlags
-ARMV7HF.iio.linker = linker
-ARMV7HF.iio.linkFlags = iioLFlags
-ARMV7HF.iio.lib = "javafx_iio"
-
-ARMV7HF.prismES2 = [:]
-ARMV7HF.prismES2.variants = ["eglfb", "monocle"]
-ARMV7HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
-
-ARMV7HF.prismES2.eglfb = [:]
-ARMV7HF.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglWrapper"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-ARMV7HF.prismES2.eglfb.compiler = compiler
-ARMV7HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV7HF.glass.lensport.nativeSource ].flatten()
-ARMV7HF.prismES2.eglfb.linker = linker
-ARMV7HF.prismES2.eglfb.linkFlags = [ es2EglfbLFlags, "-dl" ] .flatten()
-ARMV7HF.prismES2.eglfb.lib = "prism_es2_eglfb"
-
-ARMV7HF.prismES2.monocle= [:]
-ARMV7HF.prismES2.monocle.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
-]
-ARMV7HF.prismES2.monocle.compiler = compiler
-ARMV7HF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV7HF.glass.lensport.nativeSource ].flatten()
-ARMV7HF.prismES2.monocle.linker = linker
-ARMV7HF.prismES2.monocle.linkFlags =[  es2EglfbLFlags, "-ldl" ].flatten()
-ARMV7HF.prismES2.monocle.lib = "prism_es2_monocle"
-
-ARMV7HF.prismES2.eglx11 = [:]
-ARMV7HF.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-ARMV7HF.prismES2.eglx11.compiler = compiler
-ARMV7HF.prismES2.eglx11.ccFlags = es2X11CFlags
-ARMV7HF.prismES2.eglx11.linker = linker
-ARMV7HF.prismES2.eglx11.linkFlags = es2X11LFlags
-ARMV7HF.prismES2.eglx11.lib = "prism_es2_eglx11"
-
-def closedDir = file("$projectDir/../rt-closed")
-ARMV7HF.font = [:]
-ARMV7HF.font.javahInclude = [
-    "com/sun/javafx/font/**/*",
-    "com/sun/javafx/text/**/*"]
-ARMV7HF.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
-ARMV7HF.font.compiler = compiler
-ARMV7HF.font.ccFlags = fontCFlags
-ARMV7HF.font.linker = linker
-ARMV7HF.font.linkFlags = fontLFlags
-ARMV7HF.font.lib = "javafx_font"
-
-ARMV7HF.fontT2K = [:]
-ARMV7HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
-ARMV7HF.fontT2K.nativeSource = [
-        file("$closedDir/javafx-font-t2k-native/src"),
-        file("$closedDir/javafx-font-t2k-native/src/layout")]
-ARMV7HF.fontT2K.compiler = compiler
-ARMV7HF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
-ARMV7HF.fontT2K.linker = linker
-ARMV7HF.fontT2K.linkFlags = fontLFlags
-ARMV7HF.fontT2K.lib = "javafx_font_t2k"
-
-ARMV7HF.fontFreetype = [:]
-ARMV7HF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class*"]
-ARMV7HF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
-ARMV7HF.fontFreetype.compiler = compiler
-ARMV7HF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
-ARMV7HF.fontFreetype.linker = linker
-ARMV7HF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags, "-ldl"].flatten()
-ARMV7HF.fontFreetype.lib = "javafx_font_freetype"
-
-ARMV7HF.fontPango = [:]
-ARMV7HF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
-ARMV7HF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
-ARMV7HF.fontPango.compiler = compiler
-ARMV7HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
-ARMV7HF.fontPango.linker = linker
-ARMV7HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV7HF.fontPango.lib = "javafx_font_pango"
-
-ARMV7HF.webkit = [:]
-ARMV7HF.webkit.binDir   = "$compilerHome/bin"
-ARMV7HF.webkit.compiler = compiler
-ARMV7HF.webkit.linker   = linker
-ARMV7HF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
-ARMV7HF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
-ARMV7HF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
-ARMV7HF.webkit.ccFlags  = extraCFlags.join(' ')
-ARMV7HF.webkit.linkFlags = extraLFlags.join(' ')
-
-ARMV7HF.disableMedia = true
-ARMV7HF.media = [:]
-ARMV7HF.media.compiler = compiler
-ARMV7HF.media.linker = linker
-ARMV7HF.media.extra_cflags = mediaCFlags.join(' ')
-ARMV7HF.media.extra_ldflags = mediaLFlags.join(' ')
-
-ARMV7HF.deploy = [:]
-ARMV7HF.deploy.publicLibraryFilter = [
-  "fxavcodecplugin-52.so",
-  "fxavcodecplugin-53.so",
-  "fxplugins.so",
-  "libjfxwebkit.so",
-  "libgstplugins-lite.so",
-  "libgstreamer-lite.so",
-  "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
-]
-ARMV7HF.deploy.compressBigJar=true
--- a/buildSrc/armv7sf.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,577 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-ext.ARMV7SF = [:]
-def crossLibsPackage="armv6sf-02"
-
-// Define the location of the sdk and toolchain
-def sdk=file("${rootProject.CROSS_TOOLS_DIR}/${crossLibsPackage}")
-
-def compilerHome
-def compilerPrefix
-if (IS_LINUX) {
-    fetchExternalTools('ARMV7SF',
-            ["${crossLibsPackage}.tgz",
-             "arm-linaro-4.7.tgz" ],
-            rootProject.CROSS_TOOLS_DIR,
-            rootProject.IS_IMPORT_CROSS_TOOLS)
-
-    compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/arm-linaro-4.7")
-    compilerPrefix="arm-linux-gnueabi-"
-}
-
-if (rootProject.hasProperty("ARMV7SF_COMPILER")) {
-    logger.quiet "Using alternate ARMV7SF_COMPILER $rootProject.ARMV7SF_COMPILER"
-    compilerHome=file(rootProject.ARMV7SF_COMPILER);
-}
-if (rootProject.hasProperty("ARMV7SF_COMPILER_PREFIX")) {
-    logger.quiet "Using alternate ARMV7SF_COMPILER_PREFIX $rootProject.ARMV7SF_COMPILER_PREFIX"
-    compilerPrefix="${rootProject.ARMV7SF_COMPILER_PREFIX}"
-}
-def jniPlatform
-if (IS_LINUX) {
-    jniPlatform="linux"
-} else if (IS_MAC) {
-    jniPlatform="darwin"
-} else {
-    fail "armv7sf Cannot build on this platform"
-    return;
-}
-
-def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
-def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
-
-// Declare whether this particular target file applies to the current system
-ARMV7SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
-if (!ARMV7SF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
-    fail("armv7sf missing required tools")
-}
-
-// Lambda for naming the generated libs
-ARMV7SF.library = { name -> return "lib${name}.so" as String }
-
-ARMV7SF.compileSwing = false;
-ARMV7SF.compileSWT = false;
-ARMV7SF.compileFXPackager = false;
-ARMV7SF.compileWebnodeNative = false;
-ARMV7SF.compileMediaNative = false;
-
-ARMV7SF.includeLens = false
-ARMV7SF.includeMonocle = true
-ARMV7SF.includeNull3d = true
-ARMV7SF.includeEGL = true
-ARMV7SF.includeSwing = false
-ARMV7SF.includeSWT = false
-ARMV7SF.includeGTK = true
-
-ARMV7SF.javafxPlatformDefault="monocle"
-
-// Libraries end up in the sdk/lib/arm directory for arm builds
-ARMV7SF.arch = "arm"
-ARMV7SF.libDest = "lib"
-
-def commonFlags = [
-        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
-        "-Wextra", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
-// Specify the compilation parameters and link parameters
-def ccFlags = [
-        commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
-//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
-def linkFlags = ["-shared", commonFlags].flatten()
-
-// Specify the compilation parameters and link parameters
-def extraCFlags = [
-        ccFlags,
-        "-mthumb", "-march=armv7-a", "-mfloat-abi=softfp", "-mfpu=vfp",
-        "-I$sdk/usr/include",
-        "-D_GNU_SOURCE", "-DOMAP3"].flatten();
-
-//See if we should build for imx6
-def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
-if (imxHeader.exists()) {
-        extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
-}
-
-def extraLFlags = [
-        linkFlags,
-        "-L$sdk/usr/lib",
-        "-L$sdk/usr/lib/arm-linux-gnueabi",
-        "-L$sdk/lib/arm-linux-gnueabi"
-        ].flatten()
-
-def x11CFlags = [extraCFlags, "-DUSE_XSHM"].flatten()
-def x11LFlags = [extraLFlags, "-lX11", "-lXext"].flatten()
-def eglCFlags = [extraCFlags].flatten()
-def eglLFlags = [extraLFlags].flatten()
-def dfbCFlags = ["-I$sdk/usr/include/directfb"]
-def dfbLFlags = ["-ldl"]
-// TODO dfb.args=disable-module=ps2mouse,disable-module=keyboard
-
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
-def monocleCFlags = [
-        extraCFlags,
-        "-Werror",
-        "-I", file("${project("graphics").projectDir}/src/main/native-glass/monocle/")].flatten();
-def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
-def glassCFlags = ["-ffast-math"]
-def glassLFlags = []
-
-def fontCFlags = [extraCFlags].flatten()
-def fontLFlags = [extraLFlags].flatten()
-
-def iioCFlags = [extraCFlags].flatten()
-def iioLFlags = [extraLFlags].flatten()
-
-def es2CFlags = [extraCFlags].flatten()
-def es2LFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2EglfbCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2EglfbLFlags = [extraLFlags, eglLFlags].flatten()
-def es2MonocleCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
-def es2MonocleFlags = [extraLFlags, eglLFlags].flatten()
-
-def es2X11CFlags = [extraCFlags, eglCFlags, x11CFlags, "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
-def es2X11LFlags = [extraLFlags, x11LFlags, eglLFlags, "-lXdmcp", "-lXau"].flatten()
-
-def prismSWCFlags = [extraCFlags].flatten()
-def prismSWLFlags = [extraLFlags].flatten()
-
-def mediaCFlags = [extraCFlags,
-    "-I$sdk/usr/include/gstreamer-0.10",
-    "-I$sdk/usr/include/glib-2.0",
-    "-I$sdk/usr/lib/arm-linux-gnueabi/glib-2.0/include",
-    "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
-def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
-    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
-
-def webCFlags = [extraCFlags].flatten()
-def webLFlags = [extraLFlags].flatten()
-
-def gtkCFlags = [extraCFlags].flatten()
-def gtkLFlags = [extraLFlags].flatten()
-
-def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
-
-def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabi -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
-
-gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
-gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
-
-def monoclePlatformAdditions = """
-monocle.glass.platform=Monocle
-monocle.prism.order=es2,sw
-monocle.prism.eglfb=true
-monocle.prism.lcdtext=false
-monocle.prism.maxvram=128m
-monocle.prism.targetvram=112m
-monocle.use.egl=true
-monocle.use.gles2=true
-monocle.embedded=monocle
-monocle.com.sun.javafx.isEmbedded=true
-monocle.doNativeComposite=true
-monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
-monocle.prism.glDepthSize=0
-monocle.com.sun.javafx.gestures.zoom=true
-monocle.com.sun.javafx.gestures.rotate=true
-monocle.com.sun.javafx.gestures.scroll=true"""
-
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.maxTextureSize=2048
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
-def gtkPlatformAdditions = """
-gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-gtk.glass.platform=gtk
-gtk.prism.order=sw
-gtk.com.sun.javafx.isEmbedded=true
-gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
-gtk.com.sun.javafx.gestures.zoom=true
-gtk.com.sun.javafx.gestures.rotate=true
-gtk.com.sun.javafx.gestures.scroll=true"""
-
-def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
-def pangoLinkFlags = [extraLFlags];
-
-def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabi/glib-2.0/include "
-
-def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
-
-pangoCCFlags.addAll(pangoCFlags_pkgconfig.split(" "))
-pangoLinkFlags.addAll(pangoLFlags_pkgconfig.split(" "))
-
-def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
-                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
-def freetypeLinkFlags = []
-
-def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
-def freetypeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lfreetype"
-
-freetypeCCFlags.addAll(freetypeCFlags_pkgconfig.split(" "))
-freetypeLinkFlags.addAll(freetypeLFlags_pkgconfig.split(" "))
-
-ARMV7SF.javafxPlatformProperties = "javafx.platform=${ARMV7SF.javafxPlatformDefault}"
-
-ARMV7SF.glass = [:]
-ARMV7SF.glass.javahInclude = [
-    "com/sun/glass/events/**",
-    "com/sun/glass/ui/*"]
-ARMV7SF.glass.variants = [ ]
-if (ARMV7SF.includeLens) {
-    ARMV7SF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    ARMV7SF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    ARMV7SF.javafxPlatformProperties = ARMV7SF.javafxPlatformProperties + lensPlatformAdditions
-}
-if (ARMV7SF.includeMonocle) {
-    ARMV7SF.glass.variants.addAll("monocle", "monocle_x11");
-    ARMV7SF.glass.javahInclude.addAll(
-        "com/sun/glass/ui/monocle/*",
-        "com/sun/glass/ui/monocle/dispman/*",
-        "com/sun/glass/ui/monocle/mx6/*",
-        "com/sun/glass/ui/monocle/linux/*",
-        "com/sun/glass/ui/monocle/util/*",
-        "com/sun/glass/ui/monocle/x11/*");
-    ARMV7SF.javafxPlatformProperties = ARMV7SF.javafxPlatformProperties + monoclePlatformAdditions
-}
-if (ARMV7SF.includeGTK) {
-    ARMV7SF.glass.variants.addAll("gtk");
-    ARMV7SF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
-    ARMV7SF.javafxPlatformProperties = ARMV7SF.javafxPlatformProperties + gtkPlatformAdditions
-}
-
-ARMV7SF.glass.lib = "glass"
-
-ARMV7SF.glass.lensport = [:]
-ARMV7SF.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-ARMV7SF.glass.lensport.compiler = compiler
-ARMV7SF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/")].flatten()
-ARMV7SF.glass.lensport.linker = linker
-ARMV7SF.glass.lensport.linkFlags = [lensLFlags].flatten()
-ARMV7SF.glass.lensport.lib = "lens_porting"
-
-ARMV7SF.glass.monocle = [:]
-ARMV7SF.glass.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/mx6"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/linux"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util") ]
-ARMV7SF.glass.monocle.compiler = compiler
-ARMV7SF.glass.monocle.ccFlags = monocleCFlags
-ARMV7SF.glass.monocle.linker = linker
-ARMV7SF.glass.monocle.linkFlags = monocleLFlags
-ARMV7SF.glass.monocle.lib = "glass_monocle"
-
-ARMV7SF.glass.monocle_x11 = [:]
-ARMV7SF.glass.monocle_x11.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/x11") ]
-ARMV7SF.glass.monocle_x11.compiler = compiler
-ARMV7SF.glass.monocle_x11.ccFlags = monocleCFlags
-ARMV7SF.glass.monocle_x11.linker = linker
-ARMV7SF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
-ARMV7SF.glass.monocle_x11.lib = "glass_monocle_x11"
-
-ARMV7SF.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
-// TODO use /headless/headlessScreen when using headless
-ARMV7SF.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c")]
-ARMV7SF.glass.eglfb.compiler = compiler
-ARMV7SF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
-ARMV7SF.glass.eglfb.linker = linker
-ARMV7SF.glass.eglfb.linkFlags = [lensLFlags].flatten()
-ARMV7SF.glass.eglfb.lib = "glass_lens_eglfb"
-
-ARMV7SF.glass.directfb = [:]
-ARMV7SF.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c")]
-ARMV7SF.glass.directfb.compiler = compiler
-ARMV7SF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
-ARMV7SF.glass.directfb.linker = linker
-ARMV7SF.glass.directfb.linkFlags = [lensLFlags].flatten()
-ARMV7SF.glass.directfb.lib = "glass_lens_dfb"
-
-ARMV7SF.glass.fb = [:]
-ARMV7SF.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
-ARMV7SF.glass.fb.compiler = compiler
-ARMV7SF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV7SF.glass.fb.linker = linker
-ARMV7SF.glass.fb.linkFlags = [lensLFlags].flatten()
-ARMV7SF.glass.fb.lib = "glass_lens_fb"
-
-ARMV7SF.glass.eglx11 = [:]
-ARMV7SF.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-ARMV7SF.glass.eglx11.compiler = compiler
-ARMV7SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags].flatten()
-ARMV7SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-ARMV7SF.glass.eglx11.linker = linker
-ARMV7SF.glass.eglx11.linkFlags = [lensLFlags].flatten()
-ARMV7SF.glass.eglx11.lib = "glass_lens_eglx11"
-
-ARMV7SF.glass.gtk = [:]
-ARMV7SF.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
-ARMV7SF.glass.gtk.compiler = compiler
-ARMV7SF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
-ARMV7SF.glass.gtk.linker = linker
-ARMV7SF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
-ARMV7SF.glass.gtk.lib = "glass"
-
-ARMV7SF.decora = [:]
-ARMV7SF.decora.compiler = compiler
-ARMV7SF.decora.ccFlags = extraCFlags
-ARMV7SF.decora.linker = linker
-ARMV7SF.decora.linkFlags = extraLFlags
-ARMV7SF.decora.lib = "decora_sse"
-
-ARMV7SF.prism = [:]
-ARMV7SF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
-ARMV7SF.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
-ARMV7SF.prism.compiler = compiler
-ARMV7SF.prism.ccFlags = es2CFlags
-ARMV7SF.prism.linker = linker
-ARMV7SF.prism.linkFlags = es2LFlags
-ARMV7SF.prism.lib = "prism_common"
-
-ARMV7SF.prismSW = [:]
-ARMV7SF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
-ARMV7SF.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
-ARMV7SF.prismSW.compiler = compiler
-ARMV7SF.prismSW.ccFlags = prismSWCFlags
-ARMV7SF.prismSW.linker = linker
-ARMV7SF.prismSW.linkFlags = prismSWLFlags
-ARMV7SF.prismSW.lib = "prism_sw"
-
-ARMV7SF.iio = [:]
-ARMV7SF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
-ARMV7SF.iio.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-iio"),
-    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
-ARMV7SF.iio.compiler = compiler
-ARMV7SF.iio.ccFlags = iioCFlags
-ARMV7SF.iio.linker = linker
-ARMV7SF.iio.linkFlags = iioLFlags
-ARMV7SF.iio.lib = "javafx_iio"
-
-ARMV7SF.prismES2 = [:]
-ARMV7SF.prismES2.variants = ["eglfb", "monocle"]
-ARMV7SF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
-
-ARMV7SF.prismES2.eglfb = [:]
-ARMV7SF.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglWrapper"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-ARMV7SF.prismES2.eglfb.compiler = compiler
-ARMV7SF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV7SF.glass.lensport.nativeSource ].flatten()
-ARMV7SF.prismES2.eglfb.linker = linker
-ARMV7SF.prismES2.eglfb.linkFlags = es2EglfbLFlags
-ARMV7SF.prismES2.eglfb.lib = "prism_es2_eglfb"
-
-ARMV7SF.prismES2.monocle= [:]
-ARMV7SF.prismES2.monocle.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
-]
-ARMV7SF.prismES2.monocle.compiler = compiler
-ARMV7SF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV7SF.glass.lensport.nativeSource ].flatten()
-ARMV7SF.prismES2.monocle.linker = linker
-ARMV7SF.prismES2.monocle.linkFlags = es2EglfbLFlags
-ARMV7SF.prismES2.monocle.lib = "prism_es2_monocle"
-
-ARMV7SF.prismES2.eglx11 = [:]
-ARMV7SF.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-ARMV7SF.prismES2.eglx11.compiler = compiler
-ARMV7SF.prismES2.eglx11.ccFlags = es2X11CFlags
-ARMV7SF.prismES2.eglx11.linker = linker
-ARMV7SF.prismES2.eglx11.linkFlags = es2X11LFlags
-ARMV7SF.prismES2.eglx11.lib = "prism_es2_eglx11"
-
-def closedDir = file("$projectDir/../rt-closed")
-ARMV7SF.font = [:]
-ARMV7SF.font.javahInclude = [
-    "com/sun/javafx/font/**/*",
-    "com/sun/javafx/text/**/*"]
-ARMV7SF.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
-ARMV7SF.font.compiler = compiler
-ARMV7SF.font.ccFlags = fontCFlags
-ARMV7SF.font.linker = linker
-ARMV7SF.font.linkFlags = fontLFlags
-ARMV7SF.font.lib = "javafx_font"
-
-ARMV7SF.fontT2K = [:]
-ARMV7SF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
-ARMV7SF.fontT2K.nativeSource = [
-        file("$closedDir/javafx-font-t2k-native/src"),
-        file("$closedDir/javafx-font-t2k-native/src/layout")]
-ARMV7SF.fontT2K.compiler = compiler
-ARMV7SF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
-ARMV7SF.fontT2K.linker = linker
-ARMV7SF.fontT2K.linkFlags = fontLFlags
-ARMV7SF.fontT2K.lib = "javafx_font_t2k"
-
-ARMV7SF.fontFreetype = [:]
-ARMV7SF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
-ARMV7SF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
-ARMV7SF.fontFreetype.compiler = compiler
-ARMV7SF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
-ARMV7SF.fontFreetype.linker = linker
-ARMV7SF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
-ARMV7SF.fontFreetype.lib = "javafx_font_freetype"
-
-ARMV7SF.fontPango = [:]
-ARMV7SF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
-ARMV7SF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
-ARMV7SF.fontPango.compiler = compiler
-ARMV7SF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
-ARMV7SF.fontPango.linker = linker
-ARMV7SF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-ARMV7SF.fontPango.lib = "javafx_font_pango"
-
-ARMV7SF.webkit = [:]
-ARMV7SF.webkit.binDir   = "$compilerHome/bin"
-ARMV7SF.webkit.compiler = compiler
-ARMV7SF.webkit.linker   = linker
-ARMV7SF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
-ARMV7SF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
-ARMV7SF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
-ARMV7SF.webkit.ccFlags  = extraCFlags.join(' ')
-ARMV7SF.webkit.linkFlags = extraLFlags.join(' ')
-
-ARMV7SF.disableMedia = true
-ARMV7SF.media = [:]
-ARMV7SF.media.compiler = compiler
-ARMV7SF.media.linker = linker
-ARMV7SF.media.extra_cflags = mediaCFlags.join(' ')
-ARMV7SF.media.extra_ldflags = mediaLFlags.join(' ')
-
-ARMV7SF.deploy = [:]
-ARMV7SF.deploy.publicLibraryFilter = [
-  "fxavcodecplugin-52.so",
-  "fxavcodecplugin-53.so",
-  "fxplugins.so",
-  "libjfxwebkit.so",
-  "libgstplugins-lite.so",
-  "libgstreamer-lite.so",
-  "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
-]
-ARMV7SF.deploy.compressBigJar=true
--- a/buildSrc/x86egl.gradle	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,585 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-ext.X86EGL = [:]
-
-def sdk
-def compilerHome
-def compilerPrefix
-def pkgconfig
-def jniPlatform
-if (IS_MAC) {
-    jniPlatform="darwin"
-    fetchExternalTools('X86EGL', [ "x86egl-01.tgz" ],
-        rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
-    sdk=file("${rootProject.CROSS_TOOLS_DIR}/x86egl-01")
-    pkgconfig="${sdk}/bin/pkg-config"
-} else {
-    jniPlatform="linux"
-    sdk=""
-    pkgconfig="pkg-config"
-}
-
-if (rootProject.hasProperty("X86EGL_COMPILER")) {
-    logger.quiet "Using alternate X86EGL_COMPILER $rootProject.X86EGL_COMPILER"
-    compilerHome=file(rootProject.X86EGL_COMPILER);
-} else {
-    compilerHome=file("/usr");
-}
-if (rootProject.hasProperty("X86EGL_COMPILER_PREFIX")) {
-    logger.quiet "Using alternate X86EGL_COMPILER_PREFIX $rootProject.X86EGL_COMPILER_PREFIX"
-    compilerPrefix="${rootProject.X86EGL_COMPILER_PREFIX}"
-} else {
-    compilerPrefix=""
-}
-
-def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
-def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
-
-// Declare whether this particular target file applies to the current system
-X86EGL.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists()
-if (!X86EGL.canBuild) {
-    return;
-}
-
-// Lambda for naming the generated libs
-X86EGL.library = { name -> return "lib${name}.so" as String }
-
-X86EGL.compileSwing = false;
-X86EGL.compileSWT = false;
-X86EGL.compileFXPackager = false;
-X86EGL.compileWebnodeNative = false;
-X86EGL.compileMediaNative = false;
-
-X86EGL.includeLens = false
-X86EGL.includeMonocle = true
-X86EGL.includeNull3d = true
-X86EGL.includeEGL = true
-X86EGL.includeSwing = false
-X86EGL.includeSWT = false
-X86EGL.includeGTK = true
-
-X86EGL.javafxPlatformDefault="monocle"
-
-if (rootProject.hasProperty("X86EGL_ARCH")) {
-    X86EGL.arch = X86EGL_ARCH
-} else {
-    X86EGL.arch = OS_ARCH
-}
-X86EGL.libDest = "lib"
-
-def commonFlags = [
-        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
-        "-Wextra", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
-// Specify the compilation parameters and link parameters
-def ccFlags = [
-        commonFlags,
-        "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
-//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
-def linkFlags = ["-shared", commonFlags].flatten()
-
-// Specify the compilation parameters and link parameters
-def extraCFlags = [
-        "-I", "-L",
-        ccFlags,
-        "-I$sdk/usr/include",
-        "-DEGL_X11_FB_CONTAINER"].flatten();
-def extraLFlags = [
-        "-I", "-L",
-        "-L$sdk/usr/lib",
-        "-L$sdk/usr/lib/i386-linux-gnu",
-        linkFlags].flatten()
-
-def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
-def monocleCFlags = [
-        extraCFlags,
-        "-Werror",
-        "-I", file("${project("graphics").projectDir}/src/main/native-glass/monocle/")].flatten();
-def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
-
-def fontCFlags = [extraCFlags].flatten()
-def fontLFlags = [extraLFlags].flatten()
-
-def iioCFlags = [extraCFlags].flatten()
-def iioLFlags = [extraLFlags].flatten()
-
-def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-ffast-math" ].flatten()
-def es2EglfbLFlags = [extraLFlags].flatten()
-
-def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
-def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
-
-def mediaCFlags = [extraCFlags,
-    "-I${sdk}/usr/include/gstreamer-0.10",
-    "-I${sdk}/usr/include/glib-2.0",
-    "-DENABLE.nativeSource=1", "-DENABLE_GST_FFMPEG=1"].flatten()
-def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
-    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
-
-def webCFlags = [extraCFlags].flatten()
-def webLFlags = [extraLFlags].flatten()
-
-def gtkCFlags = [extraCFlags].flatten()
-def gtkLFlags = [extraLFlags].flatten()
-// Create $buildDir/x86egl_tools.properties file and load props from it
-setupTools("x86egl_tools",
-        { propFile ->
-            ByteArrayOutputStream results = new ByteArrayOutputStream();
-
-            exec {
-                commandLine("$pkgconfig", "--cflags", "gtk+-2.0",
-                        "gthread-2.0", "xtst");
-                setStandardOutput(results);
-            }
-            propFile << "cflags=" << results.toString().trim() << "\n";
-
-            results = new ByteArrayOutputStream();
-            exec {
-                commandLine "$pkgconfig", "--libs", "gtk+-2.0",
-                        "gthread-2.0", "xtst"
-                standardOutput = results
-            }
-            propFile << "libs=" << results.toString().trim();
-        },
-        { properties ->
-            gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
-            gtkLFlags.addAll(properties.getProperty("libs").split(" "))
-        }
-)
-
-def monoclePlatformAdditions = """
-monocle.glass.platform=Monocle
-monocle.prism.order=es2,sw
-monocle.prism.eglfb=true
-monocle.prism.lcdtext=false
-monocle.prism.maxvram=128m
-monocle.prism.targetvram=112m
-monocle.use.egl=true
-monocle.use.gles2=true
-monocle.embedded=monocle
-monocle.com.sun.javafx.isEmbedded=true
-monocle.doNativeComposite=true
-monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
-monocle.prism.glDepthSize=0
-monocle.com.sun.javafx.gestures.zoom=true
-monocle.com.sun.javafx.gestures.rotate=true
-monocle.com.sun.javafx.gestures.scroll=true"""
-
-def lensPlatformAdditions = """
-directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-directfb.glass.platform=Lens
-directfb.glass.lens=dfb
-directfb.prism.order=sw
-directfb.com.sun.javafx.isEmbedded=true
-directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-directfb.com.sun.javafx.gestures.zoom=true
-directfb.com.sun.javafx.gestures.rotate=true
-directfb.com.sun.javafx.gestures.scroll=true
-eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglfb.glass.platform=Lens
-eglfb.glass.lens=eglfb
-eglfb.prism.order=es2
-eglfb.prism.eglfb=true
-eglfb.prism.lcdtext=false
-eglfb.prism.maxvram=128m
-eglfb.prism.targetvram=112m
-eglfb.use.egl=true
-eglfb.use.gles2=true
-eglfb.embedded=eglfb
-eglfb.com.sun.javafx.isEmbedded=true
-eglfb.doNativeComposite=true
-eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglfb.prism.glDepthSize=0
-eglfb.com.sun.javafx.gestures.zoom=true
-eglfb.com.sun.javafx.gestures.rotate=true
-eglfb.com.sun.javafx.gestures.scroll=true
-fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-fb.glass.platform=Lens
-fb.glass.lens=fb
-fb.prism.order=sw
-fb.com.sun.javafx.isEmbedded=true
-fb.glass.restrictWindowToScreen=true
-fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
-fb.com.sun.javafx.gestures.zoom=true
-fb.com.sun.javafx.gestures.rotate=true
-fb.com.sun.javafx.gestures.scroll=true
-eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-eglx11.glass.platform=Lens
-eglx11.glass.lens=eglx11
-eglx11.prism.order=es2
-eglx11.prism.eglx11=true
-eglx11.prism.lcdtext=false
-eglx11.prism.maxvram=128m
-eglx11.prism.targetvram=112m
-eglx11.use.egl=true
-eglx11.use.gles2=true
-eglx11.embedded=eglx11
-eglx11.com.sun.javafx.isEmbedded=true
-eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
-eglx11.prism.glDepthSize=0
-eglx11.com.sun.javafx.gestures.zoom=true
-eglx11.com.sun.javafx.gestures.rotate=true
-eglx11.com.sun.javafx.gestures.scroll=true"""
-
-def gtkPlatformAdditions = """
-gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
-gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
-gtk.glass.platform=gtk
-gtk.prism.order=sw
-gtk.com.sun.javafx.isEmbedded=true
-gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
-gtk.com.sun.javafx.gestures.zoom=true
-gtk.com.sun.javafx.gestures.rotate=true
-gtk.com.sun.javafx.gestures.scroll=true"""
-
-def pangoCCFlags = ["-D_ENABLE_PANGO"];
-def pangoLinkFlags = [];
-setupTools("x86egl_pango_tools",
-        { propFile ->
-            ByteArrayOutputStream results = new ByteArrayOutputStream();
-            exec {
-                commandLine "$pkgconfig", "--cflags", "pangoft2"
-                standardOutput = results
-            }
-            propFile << "cflags=" << results.toString().trim() << "\n";
-
-            results = new ByteArrayOutputStream();
-            exec {
-                commandLine "$pkgconfig", "--libs", "pangoft2"
-                standardOutput = results
-            }
-            propFile << "libs=" << results.toString().trim();
-        },
-        { properties ->
-            pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
-            pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
-        }
-)
-
-def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
-                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
-def freetypeLinkFlags = []
-setupTools("x86egl_freetype_tools",
-    { propFile ->
-        ByteArrayOutputStream results = new ByteArrayOutputStream();
-        exec {
-            commandLine "pkg-config", "--cflags", "freetype2"
-            standardOutput = results
-        }
-        propFile << "cflags=" << results.toString().trim() << "\n";
-
-        results = new ByteArrayOutputStream();
-        exec {
-            commandLine "pkg-config", "--libs", "freetype2"
-            standardOutput = results
-        }
-        propFile << "libs=" << results.toString().trim();
-    },
-    { properties ->
-        freetypeCCFlags.addAll(properties.getProperty("cflags").split(" "))
-        freetypeLinkFlags.addAll(properties.getProperty("libs").split(" "))
-    }
-)
-
-X86EGL.javafxPlatformProperties = "javafx.platform=${X86EGL.javafxPlatformDefault}"
-
-X86EGL.glass = [:]
-X86EGL.glass.javahInclude = [
-    "com/sun/glass/events/**",
-    "com/sun/glass/ui/*"]
-X86EGL.glass.variants = [ ]
-if (X86EGL.includeLens) {
-    X86EGL.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
-    X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
-    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + lensPlatformAdditions
-}
-if (X86EGL.includeMonocle) {
-    X86EGL.glass.variants.addAll("monocle", "monocle_x11");
-    X86EGL.glass.javahInclude.addAll(
-        "com/sun/glass/ui/monocle/*",
-        "com/sun/glass/ui/monocle/dispman/*",
-        "com/sun/glass/ui/monocle/mx6/*",
-        "com/sun/glass/ui/monocle/linux/*",
-        "com/sun/glass/ui/monocle/util/*",
-        "com/sun/glass/ui/monocle/x11/*");
-    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + monoclePlatformAdditions
-}
-if (X86EGL.includeGTK) {
-    X86EGL.glass.variants.addAll("gtk");
-    X86EGL.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
-    X86EGL.javafxPlatformProperties = X86EGL.javafxPlatformProperties + gtkPlatformAdditions
-}
-
-X86EGL.glass.lib = "glass"
-
-X86EGL.glass.monocle = [:]
-X86EGL.glass.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/linux"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util") ]
-X86EGL.glass.monocle.compiler = compiler
-X86EGL.glass.monocle.ccFlags = monocleCFlags
-X86EGL.glass.monocle.linker = linker
-X86EGL.glass.monocle.linkFlags = monocleLFlags
-X86EGL.glass.monocle.lib = "glass_monocle"
-
-X86EGL.glass.monocle_x11 = [:]
-X86EGL.glass.monocle_x11.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/util"),
-        file("${project("graphics").projectDir}/src/main/native-glass/monocle/x11") ]
-X86EGL.glass.monocle_x11.compiler = compiler
-X86EGL.glass.monocle_x11.ccFlags = monocleCFlags
-X86EGL.glass.monocle_x11.linker = linker
-X86EGL.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
-X86EGL.glass.monocle_x11.lib = "glass_monocle_x11"
-
-X86EGL.glass.lensport = [:]
-X86EGL.glass.lensport.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-X86EGL.glass.lensport.compiler = compiler
-X86EGL.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
-    "-DLENSPORT", "-I", file("${project("graphics").projectDir}/src/main/native-glass/lens/") ].flatten()
-X86EGL.glass.lensport.linker = linker
-X86EGL.glass.lensport.linkFlags = [lensLFlags].flatten()
-X86EGL.glass.lensport.lib = "lens_porting"
-
-X86EGL.glass.eglfb = [:]
-// TODO when building headless, use lens/cursor/nullcursor/
-// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
-
-// TODO when USE_RFB is specified use lens/rfb
-
-// TODO use /headless/headlessScreen when using headless
-X86EGL.glass.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c") ]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-X86EGL.glass.eglfb.compiler = compiler
-X86EGL.glass.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
-X86EGL.glass.eglfb.linker = linker
-X86EGL.glass.eglfb.linkFlags = [lensLFlags].flatten()
-X86EGL.glass.eglfb.lib = "glass_lens_eglfb"
-
-X86EGL.glass.directfb = [:]
-X86EGL.glass.directfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/dfbScreen.c"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-X86EGL.glass.directfb.compiler = compiler
-X86EGL.glass.directfb.ccFlags = ["-ffast-math", extraCFlags,
-        "-I${sdk}/usr/include/directfb", "-DLINUX"].flatten()
-X86EGL.glass.directfb.linker = linker
-X86EGL.glass.directfb.linkFlags = [lensLFlags].flatten()
-X86EGL.glass.directfb.lib = "glass_lens_dfb"
-
-X86EGL.glass.fb = [:]
-X86EGL.glass.fb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/fbdevScreen.c"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/lensport") ]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-X86EGL.glass.fb.compiler = compiler
-X86EGL.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-X86EGL.glass.fb.linker = linker
-X86EGL.glass.fb.linkFlags = [lensLFlags].flatten()
-X86EGL.glass.fb.lib = "glass_lens_fb"
-
-X86EGL.glass.eglx11 = [:]
-X86EGL.glass.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-glass/lens"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/cursor/fbCursor"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/input/udev"),
-    file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
-    //file("${project("graphics").projectDir}/src/main/native-glass/lens/wm/screen")]
-X86EGL.glass.eglx11.compiler = compiler
-X86EGL.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
-X86EGL.glass.eglx11.linker = linker
-X86EGL.glass.eglx11.linkFlags = [lensLFlags].flatten()
-X86EGL.glass.eglx11.lib = "glass_lens_eglx11"
-
-X86EGL.glass.gtk = [:]
-X86EGL.glass.gtk.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/gtk")
-X86EGL.glass.gtk.compiler = compiler
-X86EGL.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
-X86EGL.glass.gtk.linker = linker
-X86EGL.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
-X86EGL.glass.gtk.lib = "glass"
-
-X86EGL.decora = [:]
-X86EGL.decora.compiler = compiler
-X86EGL.decora.ccFlags = extraCFlags
-X86EGL.decora.linker = linker
-X86EGL.decora.linkFlags = extraLFlags
-X86EGL.decora.lib = "decora_sse"
-
-X86EGL.prism = [:]
-X86EGL.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
-X86EGL.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
-X86EGL.prism.compiler = compiler
-X86EGL.prism.ccFlags = [extraCFlags].flatten()
-X86EGL.prism.linker = linker
-X86EGL.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
-X86EGL.prism.lib = "prism_common"
-
-X86EGL.prismSW = [:]
-X86EGL.prismSW.javahInclude = ["com/sun/pisces/**/*"]
-X86EGL.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
-X86EGL.prismSW.compiler = compiler
-X86EGL.prismSW.ccFlags = [extraCFlags].flatten()
-X86EGL.prismSW.linker = linker
-X86EGL.prismSW.linkFlags = [extraLFlags].flatten()
-X86EGL.prismSW.lib = "prism_sw"
-
-X86EGL.iio = [:]
-X86EGL.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
-X86EGL.iio.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-iio"),
-    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
-X86EGL.iio.compiler = compiler
-X86EGL.iio.ccFlags = iioCFlags
-X86EGL.iio.linker = linker
-X86EGL.iio.linkFlags = iioLFlags
-X86EGL.iio.lib = "javafx_iio"
-
-X86EGL.prismES2 = [:]
-X86EGL.prismES2.variants = ["eglfb", "monocle"]
-X86EGL.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
-
-X86EGL.prismES2.eglfb = [:]
-X86EGL.prismES2.eglfb.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglfb")
-]
-X86EGL.prismES2.eglfb.compiler = compiler
-X86EGL.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
-X86EGL.prismES2.eglfb.linker = linker
-X86EGL.prismES2.eglfb.linkFlags = es2EglfbLFlags
-X86EGL.prismES2.eglfb.lib = "prism_es2_eglfb"
-
-X86EGL.prismES2.eglx11 = [:]
-X86EGL.prismES2.eglx11.nativeSource = [
-    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-    file("${project("graphics").projectDir}/src/main/native-prism-es2/eglx11")
-]
-X86EGL.prismES2.eglx11.compiler = compiler
-X86EGL.prismES2.eglx11.ccFlags = es2X11CFlags
-X86EGL.prismES2.eglx11.linker = linker
-X86EGL.prismES2.eglx11.linkFlags = es2X11LFlags
-X86EGL.prismES2.eglx11.lib = "prism_es2_eglx11"
-
-X86EGL.prismES2.monocle= [:]
-X86EGL.prismES2.monocle.nativeSource = [
-        file("${project("graphics").projectDir}/src/main/native-prism-es2"),
-        file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
-        file("${project("graphics").projectDir}/src/main/native-prism-es2/monocle")
-]
-X86EGL.prismES2.monocle.compiler = compiler
-X86EGL.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
-X86EGL.prismES2.monocle.linker = linker
-X86EGL.prismES2.monocle.linkFlags = es2EglfbLFlags
-X86EGL.prismES2.monocle.lib = "prism_es2_monocle"
-
-def closedDir = file("$projectDir/../rt-closed")
-X86EGL.font = [:]
-X86EGL.font.javahInclude = [
-    "com/sun/javafx/font/**/*",
-    "com/sun/javafx/text/**/*"]
-X86EGL.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
-X86EGL.font.compiler = compiler
-X86EGL.font.ccFlags = fontCFlags
-X86EGL.font.linker = linker
-X86EGL.font.linkFlags = fontLFlags
-X86EGL.font.lib = "javafx_font"
-
-X86EGL.fontT2K = [:]
-X86EGL.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
-X86EGL.fontT2K.nativeSource = [
-        file("$closedDir/javafx-font-t2k-native/src"),
-        file("$closedDir/javafx-font-t2k-native/src/layout")]
-X86EGL.fontT2K.compiler = compiler
-X86EGL.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
-X86EGL.fontT2K.linker = linker
-X86EGL.fontT2K.linkFlags = fontLFlags
-X86EGL.fontT2K.lib = "javafx_font_t2k"
-
-X86EGL.fontFreetype = [:]
-X86EGL.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
-X86EGL.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
-X86EGL.fontFreetype.compiler = compiler
-X86EGL.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, freetypeCCFlags].flatten()
-X86EGL.fontFreetype.linker = linker
-X86EGL.fontFreetype.linkFlags = [linkFlags, freetypeLinkFlags].flatten()
-X86EGL.fontFreetype.lib = "javafx_font_freetype"
-
-X86EGL.fontPango = [:]
-X86EGL.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
-X86EGL.fontPango.nativeSource = ["src/main/native-font/pango.c"]
-X86EGL.fontPango.compiler = compiler
-X86EGL.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
-X86EGL.fontPango.linker = linker
-X86EGL.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
-X86EGL.fontPango.lib = "javafx_font_pango"
-
-X86EGL.disableMedia = true
-X86EGL.media =[:]
-X86EGL.media.compiler = compiler
-X86EGL.media.linker = linker
-X86EGL.media.lib = "ar"
-
-X86EGL.deploy = [:]
-X86EGL.deploy.publicLibraryFilter = [
-  "fxavcodecplugin-52.so",
-  "fxavcodecplugin-53.so",
-  "fxplugins.so",
-  "libjfxwebkit.so",
-  "libgstplugins-lite.so",
-  "libgstreamer-lite.so",
-  "libprism_es2_eglx11.so",
-  "libglass_lens_fb.so"
-]
-X86EGL.deploy.compressBigJar=true
--- a/dependencies/jdk.jdeps/module-info.java.extra	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-exports com.sun.tools.jdeps to jdk.packager;
--- a/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -89,7 +89,7 @@
         String version = VersionInfo.getVersion();
         // Need to update major version number when we develop the next
         // major release.
-        assertTrue(version.startsWith("9"));
+        assertTrue(version.startsWith("10"));
         String runtimeVersion = VersionInfo.getRuntimeVersion();
         assertTrue(runtimeVersion.startsWith(version));
     }
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1289,11 +1289,11 @@
                                 hideSubmenu();
                             }
 
+                            selectedBackground = MenuItemContainer.this;
+                            requestFocus();  // request Focus on hover
                             final Menu menu = (Menu) item;
                             if (menu.isDisable()) return;
-                            selectedBackground = MenuItemContainer.this;
                             menu.show();
-                            requestFocus();  // request Focus on hover
                         };
                     } else {
                         removeEventHandler(MouseEvent.MOUSE_ENTERED, mouseEnteredEventHandler);
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ReadOnlyUnbackedObservableList.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ReadOnlyUnbackedObservableList.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.NoSuchElementException;
 
 import javafx.beans.InvalidationListener;
 import com.sun.javafx.collections.ListListenerHelper;
@@ -288,6 +289,7 @@
         throw new UnsupportedOperationException("Not supported.");
     }
 
+    // Iterator to traverse the list of selected indices in both directions.
     private static class SelectionListIterator<E> implements ListIterator<E> {
         private int pos;
         private final ReadOnlyUnbackedObservableList<E> list;
@@ -306,6 +308,9 @@
         }
 
         @Override public E next() {
+            if (!hasNext()) {
+                throw new NoSuchElementException();
+            }
             return list.get(pos++);
         }
 
@@ -314,11 +319,14 @@
         }
 
         @Override public E previous() {
-            return list.get(pos--);
+            if (!hasPrevious()) {
+                throw new NoSuchElementException();
+            }
+            return list.get(--pos);
         }
 
         @Override public int nextIndex() {
-            return pos + 1;
+            return pos;
         }
 
         @Override public int previousIndex() {
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/ChoiceBox.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/ChoiceBox.java	Fri Jun 16 16:13:53 2017 -0700
@@ -225,11 +225,11 @@
     public final ReadOnlyBooleanProperty showingProperty() { return showing.getReadOnlyProperty(); }
     private void setShowing(boolean value) {
         // these events will not fire if the showing property is bound
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWING) :
-                new Event(ComboBoxBase.ON_HIDING));
+        Event.fireEvent(this, value ? new Event(ON_SHOWING) :
+                new Event(ON_HIDING));
         showing.set(value);
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWN) :
-                new Event(ComboBoxBase.ON_HIDDEN));
+        Event.fireEvent(this, value ? new Event(ON_SHOWN) :
+                new Event(ON_HIDDEN));
     }
 
     /**
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/MenuButton.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/MenuButton.java	Fri Jun 16 16:13:53 2017 -0700
@@ -214,11 +214,11 @@
     };
     private void setShowing(boolean value) {
         // these events will not fire if the showing property is bound
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWING) :
-                new Event(ComboBoxBase.ON_HIDING));
+        Event.fireEvent(this, value ? new Event(ON_SHOWING) :
+                new Event(ON_HIDING));
         showing.set(value);
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWN) :
-                new Event(ComboBoxBase.ON_HIDDEN));
+        Event.fireEvent(this, value ? new Event(ON_SHOWN) :
+                new Event(ON_HIDDEN));
     }
     public final boolean isShowing() { return showing.get(); }
     public final ReadOnlyBooleanProperty showingProperty() { return showing.getReadOnlyProperty(); }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/Tab.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/Tab.java	Fri Jun 16 16:13:53 2017 -0700
@@ -371,7 +371,11 @@
      */
     public final ObjectProperty<Node> contentProperty() {
         if (content == null) {
-            content = new SimpleObjectProperty<Node>(this, "content");
+            content = new SimpleObjectProperty<Node>(this, "content") {
+                @Override protected void invalidated() {
+                    updateDisabled();
+                }
+            };
         }
         return content;
     }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/TextInputControl.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/TextInputControl.java	Fri Jun 16 16:13:53 2017 -0700
@@ -564,6 +564,11 @@
         final boolean nonEmptySelection = getSelection().getLength() > 0;
         String oldText = getText(change.start, change.end);
         int adjustmentAmount = replaceText(change.start, change.end, change.text, change.getAnchor(), change.getCaretPosition());
+        String newText = getText(change.start, change.start + change.text.length() - adjustmentAmount);
+        if (newText.equals(oldText)) {
+            // Undo record not required as there is no change in the text.
+            return;
+        }
 
         // If you select some stuff and type anything, then we need to
         // create an undo record. If the range is a single character and
@@ -571,7 +576,6 @@
         // we don't need to create a new undo record. In all other cases
         // we do.
         int endOfUndoChange = undoChange == undoChangeHead ? -1 : undoChange.start + undoChange.newText.length();
-        String newText = getText(change.start, change.start + change.text.length() - adjustmentAmount);
         if (createNewUndoRecord || nonEmptySelection || endOfUndoChange == -1 || forceNewUndoRecord ||
                 (endOfUndoChange != change.start && endOfUndoChange != change.end) || change.end - change.start > 1) {
             undoChange = undoChange.add(change.start, oldText, newText);
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ColorPalette.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ColorPalette.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -244,6 +244,7 @@
         }
         for (int i = 0; i < numEmpty; i++) {
             ColorSquare emptySquare = new ColorSquare();
+            emptySquare.setDisable(true);
             customColorGrid.add(emptySquare, customColumnIndex, customRowIndex);
             customColumnIndex++;
         }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/LabeledSkinBase.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/LabeledSkinBase.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -305,12 +305,23 @@
         // Get the preferred width of the text
         final Labeled labeled = getSkinnable();
         final Font font = text.getFont();
-        final String string = labeled.getText();
+        String string = labeled.getText();
         boolean emptyText = string == null || string.isEmpty();
-        double widthPadding = leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+        double widthPadding = leftInset + rightInset;
 
-        double textWidth = emptyText ? 0 : Utils.computeTextWidth(font, string, 0);
+        if (!isIgnoreText()) {
+            widthPadding += leftLabelPadding() + rightLabelPadding();
+        }
+
+        double textWidth = 0.0;
+        if (!emptyText) {
+            if (labeled.isMnemonicParsing()) {
+                if (string.contains("_") && (string.indexOf("_") != string.length()-1)) {
+                    string = string.replaceFirst("_", "");
+                }
+            }
+            textWidth = Utils.computeTextWidth(font, string, 0);
+        }
 
         // Fix for RT-39889
         double graphicWidth = graphic == null ? 0.0 :
@@ -335,8 +346,12 @@
         final Font font = text.getFont();
         final ContentDisplay contentDisplay = labeled.getContentDisplay();
         final double gap = labeled.getGraphicTextGap();
-        width -= leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+
+        width -= leftInset + rightInset;
+
+        if (!isIgnoreText()) {
+            width -= leftLabelPadding() + rightLabelPadding();
+        }
 
         String str = labeled.getText();
         if (str != null && str.endsWith("\n")) {
@@ -366,7 +381,13 @@
             }
         }
 
-        return topInset + h + bottomInset + topLabelPadding() + bottomLabelPadding();
+        double padding = topInset + bottomInset;
+
+        if (!isIgnoreText()) {
+            padding += topLabelPadding() + bottomLabelPadding();
+        }
+
+        return  h + padding;
     }
 
     /** {@inheritDoc} */
@@ -394,7 +415,11 @@
             }
         }
 
-        return topInset + topLabelPadding() + h;
+        double offset = topInset + h;
+        if (!isIgnoreText()) {
+            offset += topLabelPadding();
+        }
+        return offset;
     }
 
     /**
@@ -461,10 +486,12 @@
         final boolean ignoreGraphic = isIgnoreGraphic();
         final boolean ignoreText = isIgnoreText();
 
-        x += leftLabelPadding();
-        y += topLabelPadding();
-        w -= leftLabelPadding() + rightLabelPadding();
-        h -= topLabelPadding() + bottomLabelPadding();
+        if (!ignoreText) {
+            x += leftLabelPadding();
+            y += topLabelPadding();
+            w -= leftLabelPadding() + rightLabelPadding();
+            h -= topLabelPadding() + bottomLabelPadding();
+        }
 
         // Compute some standard useful numbers for the graphic, text, and gap
         double graphicWidth;
@@ -784,8 +811,12 @@
             width = Math.max(minTextWidth, graphic.minWidth(-1));
         }
 
-        return width + leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+        double padding = leftInset + rightInset;
+        if (!isIgnoreText()) {
+            padding += leftLabelPadding() + rightLabelPadding();
+        }
+
+        return width + padding;
     }
 
     private double computeMinLabeledPartHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
@@ -818,7 +849,11 @@
             }
         }
 
-        return topInset + h + bottomInset + topLabelPadding() - bottomLabelPadding();
+        double padding = topInset + bottomInset;
+        if (!isIgnoreText()) {
+            padding += topLabelPadding() - bottomLabelPadding();
+        }
+        return h + padding;
     }
 
     double topLabelPadding() {
@@ -1019,8 +1054,12 @@
                     (labeled.getContentDisplay() == ContentDisplay.LEFT ||
                     labeled.getContentDisplay() == ContentDisplay.RIGHT);
 
-            double availableWidth = labeled.getWidth() - snappedLeftInset() - leftLabelPadding() -
-                                    snappedRightInset() - rightLabelPadding();
+            double availableWidth = labeled.getWidth() -
+                    snappedLeftInset() - snappedRightInset();
+
+            if (!isIgnoreText()) {
+                availableWidth -= leftLabelPadding() + rightLabelPadding();
+            }
             availableWidth = Math.max(availableWidth, 0);
 
             if (w == -1) {
@@ -1038,8 +1077,12 @@
                     (labeled.getContentDisplay() == ContentDisplay.TOP ||
                     labeled.getContentDisplay() == ContentDisplay.BOTTOM);
 
-            double availableHeight = labeled.getHeight() - snappedTopInset() - topLabelPadding() -
-                                     snappedBottomInset() - bottomLabelPadding();
+            double availableHeight = labeled.getHeight() -
+                    snappedTopInset() - snappedBottomInset();
+
+            if (!isIgnoreText()) {
+                availableHeight -= topLabelPadding() + bottomLabelPadding();
+            }
             availableHeight = Math.max(availableHeight, 0);
 
             if (h == -1) {
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Fri Jun 16 16:13:53 2017 -0700
@@ -148,6 +148,7 @@
     private EventHandler<MouseEvent> mouseEventHandler;
     private ChangeListener<Boolean> menuBarFocusedPropertyListener;
     private ChangeListener<Scene> sceneChangeListener;
+    private ChangeListener<Boolean> menuVisibilityChangeListener;
 
     private boolean pendingDismiss = false;
 
@@ -347,15 +348,14 @@
             }
         });
 
+        menuVisibilityChangeListener = (ov, t, t1) -> {
+            rebuildUI();
+        };
+
         rebuildUI();
         control.getMenus().addListener((ListChangeListener<Menu>) c -> {
             rebuildUI();
         });
-        for (final Menu menu : getSkinnable().getMenus()) {
-            menu.visibleProperty().addListener((ov, t, t1) -> {
-                rebuildUI();
-            });
-        }
 
         if (Toolkit.getToolkit().getSystemMenu().isSupported()) {
             control.useSystemMenuBarProperty().addListener(valueModel -> {
@@ -820,6 +820,8 @@
         for (Menu m : getSkinnable().getMenus()) {
             // remove action listeners
             updateActionListeners(m, false);
+
+            m.visibleProperty().removeListener(menuVisibilityChangeListener);
         }
         for (Node n : container.getChildren()) {
             // Stop observing menu's showing & disable property for changes.
@@ -920,6 +922,9 @@
 
         getSkinnable().focusedProperty().addListener(menuBarFocusedPropertyListener);
         for (final Menu menu : getSkinnable().getMenus()) {
+
+            menu.visibleProperty().addListener(menuVisibilityChangeListener);
+
             if (!menu.isVisible()) continue;
             final MenuBarButton menuButton = new MenuBarButton(this, menu);
             menuButton.setFocusTraversable(false);
@@ -1048,6 +1053,7 @@
             openMenu = null;
             openMenuButton = (MenuBarButton)container.getChildren().get(focusedMenuIndex);
             openMenuButton.clearHover();
+            openMenuButton.disarm();
             openMenuButton = null;
             menuModeEnd();
         }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java	Fri Jun 16 16:13:53 2017 -0700
@@ -26,6 +26,7 @@
 package javafx.scene.control.skin;
 
 import com.sun.javafx.scene.NodeHelper;
+import com.sun.javafx.scene.control.skin.Utils;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -55,6 +56,7 @@
 import javafx.scene.shape.ArcType;
 import javafx.scene.shape.Circle;
 import javafx.scene.text.Text;
+import javafx.scene.text.TextBoundsType;
 import javafx.scene.transform.Scale;
 import javafx.util.Duration;
 import javafx.css.CssMetaData;
@@ -90,13 +92,12 @@
      *                                                                         *
      **************************************************************************/
 
-    // JDK-8090129: This constant should not be static, because the
+    // JDK-8149818: This constant should not be static, because the
     // Locale may change between instances.
+
+    /** DONE string is just used to know the size of Done as that is the biggest text we need to allow for */
     private final String DONE = ControlResources.getString("ProgressIndicator.doneString");
 
-    /** doneText is just used to know the size of done as that is the biggest text we need to allow for */
-    private final Text doneText = new Text(DONE);
-
     final Duration CLIPPED_DELAY = new Duration(300);
     final Duration UNCLIPPED_DELAY = new Duration(0);
 
@@ -125,8 +126,6 @@
 
         this.control = control;
 
-        doneText.getStyleClass().add("text");
-
         // register listeners
         registerChangeListener(control.indeterminateProperty(), e -> initialize());
         registerChangeListener(control.progressProperty(), e -> updateProgress());
@@ -432,6 +431,8 @@
         private StackPane tick;
         private Arc arcShape;
         private Circle indicatorCircle;
+        private double doneTextWidth;
+        private double doneTextHeight;
 
         public DeterminateIndicator(ProgressIndicator control, ProgressIndicatorSkin s, Paint fillOverride) {
 
@@ -446,6 +447,11 @@
             text.setTextOrigin(VPos.TOP);
             text.getStyleClass().setAll("text", "percentage");
 
+            registerChangeListener(text.fontProperty(), o -> {
+                doneTextWidth = Utils.computeTextWidth(text.getFont(), DONE, 0);
+                doneTextHeight = Utils.computeTextHeight(text.getFont(), DONE, 0, TextBoundsType.LOGICAL_VERTICAL_CENTER);
+            });
+
             // The circular background for the progress pie piece
             indicator = new StackPane();
             indicator.setScaleShape(false);
@@ -503,7 +509,6 @@
 
         @Override protected void layoutChildren() {
             // Position and size the circular background
-            double doneTextHeight = doneText.getLayoutBounds().getHeight();
             final double left = control.snappedLeftInset();
             final double right = control.snappedRightInset();
             final double top = control.snappedTopInset();
@@ -583,7 +588,7 @@
             final double tLeft = tick.snappedLeftInset();
             final double tRight = tick.snappedRightInset();
             final double indicatorWidth = indicatorMax + progressMax + tLeft + tRight + progressMax + indicatorMax;
-            return left + Math.max(indicatorWidth, doneText.getLayoutBounds().getWidth()) + right;
+            return left + Math.max(indicatorWidth, doneTextWidth) + right;
         }
 
         @Override protected double computePrefHeight(double width) {
@@ -602,7 +607,7 @@
             final double tTop = tick.snappedTopInset();
             final double tBottom = tick.snappedBottomInset();
             final double indicatorHeight = indicatorMax + progressMax + tTop + tBottom + progressMax + indicatorMax;
-            return top + indicatorHeight + textGap + doneText.getLayoutBounds().getHeight() + bottom;
+            return top + indicatorHeight + textGap + doneTextHeight + bottom;
         }
 
         @Override protected double computeMaxWidth(double height) {
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextAreaSkin.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextAreaSkin.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -182,7 +182,7 @@
         };
         caretPosition.addListener((observable, oldValue, newValue) -> {
             targetCaretX = -1;
-            if (newValue.intValue() > oldValue.intValue()) {
+            if (control.getWidth() > 0) {
                 setForwardBias(true);
             }
         });
--- a/modules/javafx.controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -508,7 +508,6 @@
 .accordion:disabled > .titled-pane > .title,
 .tab-pane > .tab-header-area > .headers-region > .tab:disabled,
 .menu:disabled,
-.menu-item:disabled > .label,
 .menu-item:disabled,
 .list-cell:filled:selected:focused:disabled,
 .list-cell:filled:selected:disabled,
@@ -1220,7 +1219,7 @@
     -fx-padding: 0.666667em; /* 8 */
     -fx-shape: "M-0.25,6.083c0.843-0.758,4.583,4.833,5.75,4.833S14.5-1.5,15.917-0.917c1.292,0.532-8.75,17.083-10.5,17.083C3,16.167-1.083,6.833-0.25,6.083z";
 }
-.progress-indicator > .percentage {
+.progress-indicator > .determinate-indicator > .percentage {
     -fx-font-size: 0.916667em; /* 11pt - 1 less than the default font */
     -fx-fill: -fx-text-background-color;
 }
@@ -1985,11 +1984,13 @@
 }
 /* the color over which the user is hovering */
 .color-palette-region > .color-square.hover-square {
-    -fx-background-color: -fx-faint-focus-color, -fx-focus-color;
+    -fx-background-color: -fx-faint-focus-color, white;
     -fx-background-insets: -3,-1;
     -fx-background-radius: 5,0;
     -fx-scale-x: 1.5;
     -fx-scale-y: 1.5;
+    -fx-border-color: -fx-focus-color;
+    -fx-border-insets: -1, -1;
 }
 /* ------- CUSTOM COLOR DIALOG ------- */
 .custom-color-dialog > .color-rect-pane {
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,8 @@
 import javafx.scene.control.SingleSelectionModel;
 import javafx.scene.layout.StackPane;
 import javafx.stage.Stage;
+import javafx.event.Event;
+import javafx.event.EventHandler;
 
 import org.junit.Before;
 import org.junit.Ignore;
@@ -531,4 +533,42 @@
         assertEquals("selecting previous must move over separator", 1, sm.getSelectedIndex());
         assertEquals("oranges", sm.getSelectedItem());
     }
+
+    boolean onShowingPass;
+    boolean onShownPass;
+    boolean onHidingPass;
+    boolean onHiddenPass;
+    @Test public void test_jdk_8175963_showHideEvents() {
+        ChoiceBox box = new ChoiceBox();
+        box.getItems().setAll("1");
+
+        box.setOnShowing(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_SHOWING",
+                event.getEventType(), ChoiceBox.ON_SHOWING);
+            onShowingPass = true;
+        });
+        box.setOnShown(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_SHOWN",
+                event.getEventType(), ChoiceBox.ON_SHOWN);
+            onShownPass = true;
+        });
+        box.setOnHiding(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_HIDING",
+                event.getEventType(), ChoiceBox.ON_HIDING);
+            onHidingPass = true;
+        });
+        box.setOnHidden(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_HIDDEN",
+                event.getEventType(), ChoiceBox.ON_HIDDEN);
+            onHiddenPass = true;
+        });
+
+        box.show();
+        box.hide();
+
+        assertTrue("OnShowing event not received", onShowingPass);
+        assertTrue("onShown event not received", onShownPass);
+        assertTrue("onHiding event not received", onHidingPass);
+        assertTrue("onHidden event not received", onHiddenPass);
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
 import javafx.application.Platform;
 import javafx.beans.binding.Bindings;
 import javafx.beans.property.ObjectProperty;
@@ -1830,4 +1832,90 @@
         model.clearAndSelect(0);
         model.clearAndSelect(2);
     }
+
+    @Test public void test_jdk_8145887_selectedIndices_ListIterator() {
+        int selectIndices[] = { 4, 7, 9 };
+        ListView<Integer> lv = new ListView<>();
+        for (int i = 0; i < 10; ++i) {
+            lv.getItems().add(i);
+        }
+
+        MultipleSelectionModel msm = lv.getSelectionModel();
+        msm.setSelectionMode(SelectionMode.MULTIPLE);
+        for (int i = 0 ; i < selectIndices.length; ++i) {
+            msm.select(selectIndices[i]);
+        }
+
+        ListIterator iter = lv.getSelectionModel().getSelectedIndices().listIterator();
+
+        // Step 1. Initial values
+        assertEquals(0, iter.nextIndex());
+        assertEquals(-1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(false, iter.hasPrevious());
+
+        // Step 2. Iterate forward.
+        assertEquals(4, iter.next());
+        assertEquals(1, iter.nextIndex());
+        assertEquals(0, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 3. Iterate forward.
+        // Values would be at similar state of Step 2.
+        assertEquals(7, iter.next());
+
+        // Step 4. Iterate forward to Last element.
+        assertEquals(9, iter.next());
+        assertEquals(3, iter.nextIndex());
+        assertEquals(2, iter.previousIndex());
+        assertEquals(false, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 5. Verify NoSuchElementException by next()
+        try {
+            iter.next();
+        } catch (Exception e) {
+            assert(e instanceof NoSuchElementException);
+        }
+
+        // Step 6. Iterate backward to Last element.
+        assertEquals(9, iter.previous());
+        assertEquals(2, iter.nextIndex());
+        assertEquals(1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 7. Iterate forward to Last element.
+        assertEquals(9, iter.next());
+        assertEquals(3, iter.nextIndex());
+        assertEquals(2, iter.previousIndex());
+        assertEquals(false, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 8. Iterate forward to last element.
+        // Values would be at Same state of Step 2.
+        assertEquals(9, iter.previous());
+
+        // Step 9. Iterate backward.
+        assertEquals(7, iter.previous());
+        assertEquals(1, iter.nextIndex());
+        assertEquals(0, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 10. Iterate back to first element.
+        assertEquals(4, iter.previous());
+        assertEquals(0, iter.nextIndex());
+        assertEquals(-1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(false, iter.hasPrevious());
+
+        // Step 11. Verify NoSuchElementException by previous()
+        try {
+            iter.previous();
+        } catch (Exception e) {
+            assert(e instanceof NoSuchElementException);
+        }
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuBarTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuBarTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -552,6 +552,49 @@
         assertEquals(menu.showingProperty().get(), false);
     }
 
+    @Test public void testMenuBarUpdateOnMenuVisibilityChange() {
+        VBox root = new VBox();
+        Menu menu1 = new Menu("Menu1");
+        Menu menu2 = new Menu("Menu2");
+
+        menuBar.getMenus().addAll(menu1, menu2);
+
+        root.getChildren().addAll(menuBar);
+        startApp(root);
+        tk.firePulse();
+
+        MenuBarSkin skin = (MenuBarSkin)menuBar.getSkin();
+        assertTrue(skin != null);
+
+        // Test menuBar height to be non-zero as both menus are
+        // visible by default
+        int x = Double.compare(menuBar.getHeight(), 0.0);
+        assertTrue(x > 0);
+
+        // Test menubar height to be zero in case all of its
+        // children are invisible
+        menu1.setVisible(false);
+        menu2.setVisible(false);
+        tk.firePulse();
+
+        assertEquals(menuBar.getHeight(), 0.0, 0.0001);
+
+        // Test menuBar height to be non-zero if another menu is added
+        Menu menu3 = new Menu("Menu3");
+        menuBar.getMenus().add(menu3);
+        tk.firePulse();
+
+        x = Double.compare(menuBar.getHeight(), 0.0);
+        assertTrue(x > 0);
+
+        // Test menuBar height to be zero in case all of its
+        // children are invisible
+        menu3.setVisible(false);
+        tk.firePulse();
+
+        assertEquals(menuBar.getHeight(), 0.0, 0.0001);
+    }
+
     @Test public void testRemovingMenuItemFromMenuNotInScene() {
         VBox root = new VBox();
         Menu menu = new Menu("Menu");
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuButtonTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuButtonTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,12 +30,16 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.geometry.Side;
 import javafx.scene.Scene;
+import javafx.scene.Group;
+import javafx.scene.control.ContentDisplay;
 import javafx.scene.control.Button;
 import javafx.scene.control.MenuButton;
 import javafx.scene.control.MenuItem;
 import javafx.scene.layout.VBox;
 import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
+import javafx.event.Event;
+import javafx.event.EventHandler;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -260,4 +264,64 @@
         assertEquals(.5, mb.getOpacity(), 0.00001);
 
     }
+
+    @Test public void testSetContentDisplayGraphicOnly() {
+        Button btn = new Button("1234");
+
+        MenuButton mb1 = new MenuButton("Sample Text", btn);
+        mb1.setStyle("-fx-label-padding:0;");
+        mb1.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+
+        MenuButton mb2 = new MenuButton("Sample Text", btn);
+        mb2.setStyle("-fx-label-padding:100;");
+        mb2.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+
+        Scene scene = new Scene(new Group(mb1, mb2), 400, 400);
+        Stage stage = new Stage();
+        stage.setScene(scene);
+        stage.show();
+        Toolkit.getToolkit().firePulse();
+
+        // label-padding should not affect GRAPHIC_ONLY MenuButton size
+        assertEquals(mb1.getWidth(), mb2.getWidth(), 0.00001);
+        assertEquals(mb1.getHeight(), mb2.getHeight(), 0.00001);
+    }
+
+    boolean onShowingPass;
+    boolean onShownPass;
+    boolean onHidingPass;
+    boolean onHiddenPass;
+    @Test public void test_jdk_8175963_showHideEvents() {
+        MenuItem it1 = new MenuItem("1");
+        MenuButton mbtn = new MenuButton("MenuButton", null, it1);
+
+        mbtn.addEventHandler(MenuButton.ON_SHOWING, event -> {
+            assertEquals("event is not of type MenuButton.ON_SHOWING",
+                event.getEventType(), MenuButton.ON_SHOWING);
+            onShowingPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_SHOWN, event -> {
+            assertEquals("event is not of type MenuButton.ON_SHOWN",
+                event.getEventType(), MenuButton.ON_SHOWN);
+            onShownPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_HIDING, event -> {
+            assertEquals("event is not of type MenuButton.ON_HIDING",
+                event.getEventType(), MenuButton.ON_HIDING);
+            onHidingPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_HIDDEN, event -> {
+            assertEquals("event is not of type  MenuButton.ON_HIDDEN",
+                event.getEventType(), MenuButton.ON_HIDDEN);
+            onHiddenPass = true;
+        });
+
+        mbtn.show();
+        mbtn.hide();
+
+        assertTrue("OnShowing event not received", onShowingPass);
+        assertTrue("onShown event not received", onShownPass);
+        assertTrue("onHiding event not received", onHidingPass);
+        assertTrue("onHidden event not received", onHiddenPass);
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/TabTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/TabTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,6 +48,7 @@
 import javafx.scene.control.TabShim;
 import javafx.scene.control.Tooltip;
 import javafx.scene.shape.Rectangle;
+import javafx.scene.layout.VBox;
 import static org.junit.Assert.*;
 
 
@@ -471,4 +472,14 @@
         assertFalse(tab.isDisable());
         assertFalse(tab.isDisabled());
     }
+
+    @Test public void setDisableOnTabPaneContentAndSeeValue() {
+        VBox vBox = new VBox();
+        dummyTabPane.getTabs().add(tab);
+        tab.setDisable(true);
+        tab.setContent(vBox);
+        assertTrue(vBox.isDisable());
+        assertTrue(vBox.isDisabled());
+        tab.setContent(null);
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/TextInputControlTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/TextInputControlTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -35,10 +35,15 @@
 import javafx.beans.value.ObservableValue;
 import javafx.css.CssMetaData;
 import javafx.css.StyleableProperty;
+import javafx.event.EventHandler;
 import javafx.scene.Scene;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
 import javafx.scene.input.Clipboard;
 import javafx.scene.input.ClipboardContent;
 import javafx.scene.text.Font;
+import javafx.scene.layout.StackPane;
+import javafx.stage.Stage;
 import java.util.Arrays;
 import java.util.Collection;
 import javafx.scene.control.IndexRange;
@@ -46,11 +51,14 @@
 import javafx.scene.control.TextArea;
 import javafx.scene.control.TextField;
 import javafx.scene.control.TextInputControl;
+import com.sun.javafx.tk.Toolkit;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
+import test.com.sun.javafx.scene.control.infrastructure.KeyEventFirer;
+import test.com.sun.javafx.pgstub.StubToolkit;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
@@ -359,6 +367,37 @@
         assertEquals(0, textInput.getAnchor());
     }
 
+    // Test for JDK-8178417
+    @Test public void caretPositionUndo() {
+        Toolkit tk = (StubToolkit)Toolkit.getToolkit();
+        StackPane root = new StackPane();
+        Scene scene = new Scene(root);
+        Stage stage = new Stage();
+        String text = "01234";
+
+        textInput.setText(text);
+        stage.setScene(scene);
+        root.getChildren().removeAll();
+        root.getChildren().add(textInput);
+        stage.show();
+        tk.firePulse();
+
+        KeyEventFirer keyboard = new KeyEventFirer(textInput);
+        keyboard.doKeyPress(KeyCode.HOME);
+
+        for(int i = 1; i < text.length() + 1; ++i) {
+            keyboard.doKeyPress(KeyCode.RIGHT);
+            tk.firePulse();
+        }
+        for(int i = 1; i < text.length() + 1; ++i) {
+            textInput.undo();
+        }
+        assertEquals(text.length(), textInput.getCaretPosition());
+        root.getChildren().removeAll();
+        stage.hide();
+        tk.firePulse();
+    }
+
     /******************************************************
      * Test for length                                    *
      *****************************************************/
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/LabelSkinTest.java	Thu Jun 15 10:32:49 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/LabelSkinTest.java	Fri Jun 16 16:13:53 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,10 @@
 import javafx.scene.text.Font;
 import javafx.scene.text.Text;
 import javafx.scene.text.TextAlignment;
+import com.sun.javafx.tk.Toolkit;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -1983,6 +1987,40 @@
         assertEquals(500, label.maxHeight(-1), 0);
     }
 
+    /* Test for checking width of label with/without mnemonic */
+    @Test public void labelMnemonicTest() {
+        Label l1 = new Label("Hello");
+        Label l2 = new Label("_Hello");
+        Label l3 = new Label("He_llo");
+        Label l4 = new Label("Hello_");
+        Label l5 = new Label("_Hello");
+
+        l1.setMnemonicParsing(true);
+        l2.setMnemonicParsing(true);
+        l3.setMnemonicParsing(true);
+        l4.setMnemonicParsing(true);
+        l5.setMnemonicParsing(false);
+
+        Toolkit tk = Toolkit.getToolkit();
+
+        Scene scene = new Scene(new Group(l1, l2, l3, l4, l5));
+        Stage stage = new Stage();
+        stage.setScene(scene);
+        stage.show();
+        tk.firePulse();
+
+        assertEquals(l1.getWidth(), l2.getWidth(), 0);
+        assertEquals(l2.getWidth(), l3.getWidth(), 0);
+
+        // l4 label does not have a mnemonic ==> l4 width is greater than l1 width
+        int x = Double.compare(l1.getWidth(), l4.getWidth());
+        assertTrue(x < 0);
+
+        // labels with no mnemonic
+        assertEquals(l4.getWidth(), l5.getWidth(), 0);
+    }
+
+
     /****************************************************************************
      *                                                                          *
      * Tests for updateDisplayedText                                            *
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensApplication.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1806 +0,0 @@
-/*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.glass.ui.lens;
-
-import java.io.File;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.LinkedList;
-
-import com.sun.glass.events.KeyEvent;
-import com.sun.glass.events.MouseEvent;
-import com.sun.glass.events.TouchEvent;
-import com.sun.glass.events.ViewEvent;
-import com.sun.glass.events.WindowEvent;
-import com.sun.glass.ui.Application;
-import com.sun.glass.ui.Clipboard;
-import com.sun.glass.ui.CommonDialogs.ExtensionFilter;
-import com.sun.glass.ui.CommonDialogs.FileChooserResult;
-import com.sun.glass.ui.Cursor;
-import com.sun.glass.ui.EventLoop;
-import com.sun.glass.ui.Menu;
-import com.sun.glass.ui.MenuBar;
-import com.sun.glass.ui.Pixels;
-import com.sun.glass.ui.Robot;
-import com.sun.glass.ui.Screen;
-import com.sun.glass.ui.Size;
-import com.sun.glass.ui.Timer;
-import com.sun.glass.ui.View;
-import com.sun.glass.ui.Window;
-import sun.util.logging.PlatformLogger.Level;
-import java.util.Arrays;
-import java.util.Iterator;
-
-final class LensApplication extends Application {
-
-    /** Bit to indicate that a device has touch support */
-    private static final int DEVICE_TOUCH = 0;
-    /** Bit to indicate that a device has multitouch support */
-    private static final int DEVICE_MULTITOUCH = 1;
-    /** Bit to indicate that a device has relative motion pointer support */
-    private static final int DEVICE_POINTER = 2;
-    /** Bit to indicate that a device has arrow keys and a select key */
-    private static final int DEVICE_5WAY = 3;
-    /** Bit to indicate that a device has a full PC keyboard */
-    private static final int DEVICE_PC_KEYBOARD = 4;
-    /** Largest bit used in device capability bitmasks */
-    private static final int DEVICE_MAX = 4;
-    /** A running count of the numbers of devices with each device capability */
-    private int[] deviceFlags = new int[DEVICE_MAX + 1];
-
-    /**
-     * Values of -1 mean that these variables are not set. We will reset them to -1 whenever we
-     * get a non-touch move event.
-     */
-    private int previousTouchMoveX = -1;
-    private int previousTouchMoveY = -1;
-    private int previousTouchMoveScreenX = -1;
-    private int previousTouchMoveScreenY = -1;
-
-    /** True if the application wishes to show the cursor */
-    private boolean cursorVisible = true;
-
-    Menu windowMenu;
-    Menu editMenu;
-    Menu fileMenu;
-
-    private static final Object invokeAndWaitLock = new Object();
-    private static Runnable waitingFor;
-
-    private static int activeEventLoopThreads = 0;
-    private static final Object activeEventLoopLock = new Object();
-
-    private static boolean doComposite = true;
-
-    static private boolean isInitialized = false;
-
-    // setup for JNI
-    private static native void _initIDs();
-
-    // initialize any native display connection/state
-    private static native boolean _initialize();
-
-    private static native void _notifyRenderingEnd();
-
-    private EventLoop dndEventLoop;
-
-    private static void initLibrary() {
-        final String lensProperty = "glass.lens";
-        final String platform = AccessController.doPrivileged(
-                (PrivilegedAction<String>) () -> System.getProperty(lensProperty, ""));
-
-        doComposite = AccessController.doPrivileged((PrivilegedAction<Boolean>) () -> Boolean.getBoolean("doNativeComposite"));
-
-        if (isInitialized) {
-            //make sure we make this only once
-            return;
-        }
-
-        LensLogger.getLogger().info("LensApplication initialization");
-
-        if (platform.equals("")) {
-            LensLogger.getLogger().severe(
-                "System property " + lensProperty + " not defined");
-        }
-
-        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
-            Application.loadNativeLibrary("glass_lens_" + platform);
-            return null;
-        });
-        _initIDs();
-        isInitialized = true;
-        LensLogger.getLogger().info("LensApplication initialization done");
-    }
-
-    static {
-        LensApplication.initLibrary();
-    }
-
-    //cache the singleton object for native layer usage
-    native void registerApplication();
-
-    //package protected to be used only by LensPlatformFactory
-    LensApplication() {
-        super();
-        LensLogger.getLogger().fine("LensApplication ctor called, registering in"
-                                    + " native layer");
-        registerApplication();
-    }
-
-    private static abstract class Event {
-        abstract void dispatch();
-    }
-
-    private static class RunnableEvent extends Event {
-        private boolean wait;
-        private Runnable runnable;
-
-        RunnableEvent(boolean wait, Runnable runnable) {
-            this.wait = wait;
-            this.runnable = runnable;
-        }
-
-        @Override
-        void dispatch() {
-            runnable.run();
-            if (wait) {
-                synchronized (invokeAndWaitLock) {
-                    waitingFor = null;
-                    invokeAndWaitLock.notify();
-                }
-            }
-        }
-
-        @Override
-        public String toString() {
-            return "RunnableEvent[runnable=" + runnable + ",wait=" + wait + "]";
-        }
-    }
-
-    @Override
-    public boolean hasWindowManager() {
-        return false;
-    }
-
-    /**
-     * This class is used to handle key events
-     *
-     */
-    private static class LensKeyEvent extends Event {
-
-        //the view object to notify
-        private LensView view;
-
-        //type of the event (pressed, released...)
-        // as defined in KeyEvent.java
-        private int type;
-
-        //key code
-        private int keyCode;
-
-        //bit mask of modifiers (shift, ctrl...)
-        private int modifiers;
-
-        // A buffer holding the char key sequence, can be 0 length
-        private char[] chars;
-
-        LensKeyEvent(LensView view, int type, int keyCode, int modifiers,
-                     char[] chars) {
-            this.view = view;
-            this.type = type;
-            this.keyCode = keyCode;
-            this.modifiers = modifiers;
-            this.chars = chars;
-        }
-
-        @Override
-        void dispatch() {
-            view._notifyKey(type, keyCode, chars, modifiers);
-        }
-
-        @Override
-        public String toString() {
-            return "LensKeyEvent[view=" + view
-                   + ",type=" + type
-                   + ",keyCode=" + keyCode
-                   + ",modifiers=" + modifiers
-                   + ",chars=" + String.valueOf(chars)
-                   + "]";
-        }
-    }
-
-    /**
-     * This class is used to handle window related events
-     *
-     */
-    private static class LensWindowEvent extends Event {
-
-        static enum EType {
-            CLOSE, DESTROY, EXPOSE, FOCUS, MOVE, RESIZE, UNGRAB, FOCUS_DISABLED
-        };
-
-        private EType type;
-
-        // The window object to notify
-        private LensWindow window;
-        //The event that invoked this notification, as described
-        // in WindowEvent class
-        private int windowEvent;
-        //Window parameters for update
-        private int x;
-        private int y;
-        private int width;
-        private int height;
-
-        /**
-         * Generic constructor, used when no parameters need to be
-         * updated
-         *
-         * @param type LensApplication event
-         * @param window the window to notify
-         * @param windowEvent one of the events described in WindowEvent
-         *                    class
-         */
-        LensWindowEvent(EType type, LensWindow window, int windowEvent) {
-            this.type = type;
-            this.window         = window;
-            this.windowEvent    = windowEvent;
-        }
-
-        /**
-         * Use this constructor when window parameters have been changed
-         *
-         *
-         * @param type LensApplication event
-         * @param window the window to notify
-         * @param windowEvent one of the events described in WindowEvent
-         *                    class
-         * @param x
-         * @param y
-         * @param width
-         * @param height
-         */
-        LensWindowEvent(EType type, LensWindow window, int windowEvent,
-                        int x, int y,
-                        int width, int height) {
-            this.type = type;
-            this.window         = window;
-            this.windowEvent    = windowEvent;
-            this.x              = x;
-            this.y              = y;
-            this.width          = width;
-            this.height         = height;
-        }
-
-        @Override
-        void dispatch() {
-            switch (type) {
-                case FOCUS:
-                    window._notifyFocus(windowEvent);
-                    break;
-                case MOVE:
-                    window._notifyMove(x, y);
-                    break;
-                case RESIZE:
-                    window._notifyResize(windowEvent, width, height);
-                    break;
-                case UNGRAB:
-                    window._notifyFocusUngrab();
-                    break;
-                case DESTROY:
-                    window._notifyDestroy();
-                    break;
-                case CLOSE:
-                    window._notifyClose();
-                    break;
-                case EXPOSE:
-                    window._notifyExpose(x, y, width, height);
-                    break;
-                case FOCUS_DISABLED:
-                    window._notifyFocusDisabled();
-                    break;
-
-                default:
-                    LensLogger.getLogger().severe(
-                        "Unrecognized window event type");
-            }
-        }
-
-        @Override
-        public String toString() {
-            return super.toString() + "[window=" + window
-                   + ",type=" + type
-                   + ",windowEvent=" + windowEvent
-                   + ",x=" + x
-                   + ",y=" + y
-                   + ",width=" + width
-                   + ",height=" + height
-                   + "]";
-        }
-
-    }
-    private static class LensMouseEvent extends Event {
-
-        private LensView target;
-        private int action;
-        private int x, y, absx, absy;
-        private int button;
-        private int modifiers;
-        private boolean isPopupTrigger;
-        private boolean isSynthesized;
-
-        LensMouseEvent(LensView target,
-                       int action,
-                       int x, int y,
-                       int absx, int absy,
-                       int button,
-                       int modifiers,
-                       boolean isPopupTrigger,
-                       boolean isSynthesized) {
-            this.target = target;
-            this.action = action;
-            this.x = x;
-            this.y = y;
-            this.absx = absx;
-            this.absy = absy;
-            this.button = button;
-            this.modifiers = modifiers;
-            this.isPopupTrigger = isPopupTrigger;
-            this.isSynthesized = isSynthesized;
-        }
-
-        @Override
-        void dispatch() {
-            target._notifyMouse(
-                action, button,
-                x, y,
-                absx, absy,
-                modifiers,
-                isPopupTrigger, isSynthesized);
-        }
-
-        @Override
-        public String toString() {
-            return "LensMouseEvent[target=" + target
-                   + ",action=" + action
-                   + ",x=" + x
-                   + ",y=" + y
-                   + ",absx=" + absx
-                   + ",absy=" + absy
-                   + ",button=" + button
-                   + ",modifiers=" + modifiers
-                   + ",isPopupTrigger=" + isPopupTrigger
-                   + ",isSynthesized=" + isSynthesized
-                   + "]";
-        }
-    }
-
-    private static class LensScrollEvent extends Event {
-        private LensView target;
-        private int x, y;
-        private int absx, absy;
-        private double deltaX, deltaY;
-        private int modifiers;
-        private int lines;
-        private int chars;
-        private int defaultLines;
-        private int defaultChars;
-        private double xMultiplier, yMultiplier;
-
-        LensScrollEvent(LensView target,
-                        int x, int y, int absx, int absy,
-                        double deltaX, double deltaY, int modifiers, int lines, int chars,
-                        int defaultLines, int defaultChars,
-                        double xMultiplier, double yMultiplier) {
-
-            this.target = target;
-            this.x = x;
-            this.y = y;
-            this.absx = absx;
-            this.absy = absy;
-            this.deltaX = deltaX;
-            this.deltaY = deltaY;
-            this.modifiers = modifiers;
-            this.lines = lines;
-            this.chars = chars;
-            this.defaultLines = defaultLines;
-            this.defaultChars = defaultChars;
-            this.xMultiplier = xMultiplier;
-            this.yMultiplier = yMultiplier;
-        }
-
-        @Override
-        void dispatch() {
-            target._notifyScroll(
-                x, y,
-                absx, absy,
-                deltaX, deltaY,
-                modifiers,
-                lines, chars,
-                defaultLines, defaultChars,
-                xMultiplier, yMultiplier);
-        }
-
-        @Override
-        public String toString() {
-            return "LensScrollEvent[target=" + target
-                   + ",x=" + x
-                   + ",y=" + y
-                   + ",absx=" + absx
-                   + ",absy=" + absy
-                   + ",deltaX=" + deltaX
-                   + ",deltaY=" + deltaY
-                   + ",modifiers=" + modifiers
-                   + ",lines=" + lines
-                   + ",chars=" + chars
-                   + ",defaultLines=" + defaultLines
-                   + ",defaultChars=" + defaultChars
-                   + ",xMultiplier=" + xMultiplier
-                   + ",yMultiplier=" + yMultiplier
-                   + "]";
-        }
-    }
-
-    private static class LensTouchEvent extends Event {
-
-        private LensView view;
-        private int state;
-        private long id;
-        private int x;
-        private int y;
-        private int absX;
-        private int absY;
-
-        LensTouchEvent(LensView view, int state, long id,
-                       int x, int y, int absX, int absY) {
-            this.view = view;
-            this.state = state;
-            this.id = id;
-            this.x = x;
-            this.y = y;
-            this.absX = absX;
-            this.absY = absY;
-        }
-
-        @Override
-        void dispatch() {
-            LensTouchInputSupport.postTouchEvent(view, state, id, x, y, absX, absY);
-        }
-
-        @Override
-        public String toString() {
-            return "LensTouchEvent[view=" + view
-                   + ",state=" + state
-                   + ",id=" + id
-                   + ",x=" + x
-                   + ",y=" + y
-                   + ",absX=" + absX
-                   + ",absY=" + absY
-                   + "]";
-        }
-    }
-
-    private static class LensMultiTouchEvent extends Event {
-
-        private LensView view;
-        private int[] states;
-        private long[] ids;
-        private int[] xs;
-        private int[] ys;
-        private int dx;
-        private int dy;
-
-        LensMultiTouchEvent(LensView view, int[] states, long[] ids,
-                       int[] xs, int[] ys, int dx, int dy) {
-            this.view = view;
-            this.states = states;
-            this.ids = ids;
-            this.xs = xs;
-            this.ys = ys;
-            this.dx = dx;
-            this.dy = dy;
-        }
-
-        @Override
-        void dispatch() {
-            LensTouchInputSupport.postMultiTouchEvent(
-                    view, states, ids, xs, ys, dx, dy);
-        }
-
-        @Override
-        public String toString() {
-            return "LensMultiTouchEvent[view=" + view
-                    + ", ids " + Arrays.toString(ids)
-                    + ", states " + Arrays.toString(states)
-                    + ", xs " + Arrays.toString(xs)
-                    + ", ys " + Arrays.toString(ys)
-                    + "]";
-        }
-    }
-
-    private static class LensViewEvent extends Event {
-        private LensView target;
-        private int x, y, width, height;
-        private int viewEventType;
-
-        LensViewEvent(LensView view, int viewEventType,
-                      int x, int y, int width, int height) {
-            this.target = view;
-            this.x = x;
-            this.y = y;
-            this.width = width;
-            this.height = height;
-            this.viewEventType = viewEventType;
-        }
-
-        @Override
-        void dispatch() {
-            target._notifyViewEvent(viewEventType);
-        }
-
-        @Override
-        public String toString() {
-            return "LensViewEvent[target=" + target
-                   + ", x=" + x
-                   + ", y=" + y
-                   + ", width=" + width
-                   + ", height=" + height
-                   + ", event type code " + viewEventType
-                   + ", event type name "
-                   + ViewEvent.getTypeString(viewEventType);
-        }
-    }
-
-    private class LensDragEvent extends Event {
-        int x, y, absx, absy;
-        DragActions action;
-        LensView view;
-
-        //This variable are used to overcome an enum limitation (you can't
-        //use switch clause on custom values enum)
-        final int ENTER = DragActions.ENTER.getValue();
-        final int LEAVE = DragActions.LEAVE.getValue();
-        final int OVER = DragActions.OVER.getValue();
-        final int DROP = DragActions.DROP.getValue();
-
-        LensDragEvent(LensView view, int x, int y, int absx, int absy, DragActions action) {
-            this.absx = absx;
-            this.absy = absy;
-            this.x = x;
-            this.y = y;
-            this.action = action;
-            this.view = view;
-        }
-        @Override
-        void dispatch() {
-            if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                LensLogger.getLogger().finest("processing drag  " + action);
-            }
-            switch (action) {
-                case ENTER:
-                    view._notifyDragEnter(x, y, absx, absy, Clipboard.ACTION_COPY_OR_MOVE);
-                    break;
-                case LEAVE:
-                    view._notifyDragLeave();
-                    break;
-                case OVER:
-                    view._notifyDragOver(x, y, absx, absy, Clipboard.ACTION_COPY_OR_MOVE);
-                    break;
-                case DROP:
-                    view._notifyDragDrop(x, y, absx, absy, Clipboard.ACTION_COPY_OR_MOVE);
-                    leaveDndEventLoop(null);
-                    break;
-                default:
-                    return;
-            }
-        }
-
-        @Override
-        public String toString() {
-            return "LensDragEvent[x=" + x
-                    + ", y=" + y
-                    + ", absx=" + absx
-                    + ", absy=" + absy
-                    + ", action " + action
-                    + ", view "
-                    + view;
-        }
-    }
-
-
-    private class LensMenuEvent extends Event {
-        LensView view;
-        int x;
-        int y;
-        int xAbs;
-        int yAbs;
-        boolean isKeyboardTrigger;
-
-        LensMenuEvent(LensView view, int x, int y, int xAbs,
-                      int yAbs, boolean isKeyboardTrigger) {
-            this.view = view;
-            this.x = x;
-            this.y = y;
-            this.xAbs = xAbs;
-            this.yAbs = yAbs;
-            this.isKeyboardTrigger = isKeyboardTrigger;
-        }
-
-        @Override
-        void dispatch() {
-            view._notifyMenu(x, y, xAbs, yAbs, isKeyboardTrigger);
-        }
-
-        @Override
-        public String toString() {
-            return "LensMenuEvent[view=" + view
-                   + ", x=" + x
-                   + ", y=" + y
-                   + ", absx=" + xAbs
-                   + ", absy=" + yAbs
-                   + ", isKeyboardTrigger=" + isKeyboardTrigger + "]";
-        }
-    }
-
-    private class LensDeviceEvent extends Event {
-        private int flags;
-        private boolean attach;
-        LensDeviceEvent(int flags, boolean attach) {
-            this.flags = flags;
-            this.attach = attach;
-        }
-        @Override
-        void dispatch() {
-            for (int i = 0; i <= DEVICE_MAX; i++) {
-                if ((flags & (1 << i)) != 0) {
-                    if (attach) {
-                        deviceFlags[i] ++;
-                    } else {
-                        deviceFlags[i] --;
-                    }
-                }
-            }
-
-            if ((flags & (1 << DEVICE_POINTER)) != 0) {
-                // Turn on/off cursor image
-                if (attach && (deviceFlags[DEVICE_POINTER] == 1) && cursorVisible) {
-                     LensCursor.setVisible_impl(true);
-                } else if (!attach && (deviceFlags[DEVICE_POINTER] == 0)) {
-                    LensCursor.setVisible_impl(false);
-                }
-            }
-        }
-    }
-
-    private class LensScreenEvent extends Event {
-         @Override
-         void dispatch() {
-             Screen.notifySettingsChanged();
-         }
-     }
-
-    private final LinkedList<Event> eventList = new LinkedList<Event>();
-
-    private void postEvent(Event e) {
-        if (Thread.currentThread() == getEventThread()) {
-            try {
-                e.dispatch();
-            } catch (Exception ex) {
-                reportException(ex);
-            }
-        } else {
-            synchronized (eventList) {
-                eventList.addLast(e);
-                eventList.notify();
-            }
-        }
-    }
-
-    /** Posts a mouse event, filtering out sequences of similar motion or drag
-     * events. */
-    private void postMouseEvent(LensView view, int eventType,
-                                int x, int y, int absx, int absy,
-                                int button, int modifiers,
-                                boolean isPopupTrigger, boolean isSynthesized) {
-        synchronized (eventList) {
-            if (!eventList.isEmpty() && (eventType == MouseEvent.DRAG
-                    || eventType == MouseEvent.MOVE)) {
-                Iterator <Event>events = eventList.descendingIterator();
-                while (events.hasNext()) {
-                    Event lastEvent = events.next();
-                    if (lastEvent instanceof LensMouseEvent) {
-                        LensMouseEvent e = (LensMouseEvent) lastEvent;
-                        if (e.target == view
-                                && e.action == eventType
-                                && e.button == button
-                                && e.modifiers == modifiers
-                                && e.isPopupTrigger == isPopupTrigger
-                                && e.isSynthesized == isSynthesized) {
-                            // rewrite the coordinates of the scheduled event with
-                            // the coordinates of this event.
-                            e.x = x;
-                            e.y = y;
-                            e.absx = absx;
-                            e.absy = absy;
-                            return;
-                        }
-                    }
-                }
-            }
-            postEvent(new LensMouseEvent(view, eventType, x, y, absx, absy,
-                                         button, modifiers, isPopupTrigger,
-                                         isSynthesized));
-        }
-    }
-
-    private static class RunLoopControl {
-        boolean active; // thread should continue to process events.
-        Object release; // object to return with on leave nested
-    }
-
-    // our stack of nested run loops - note using LinkedList because we
-    // are already using that class for events.
-    LinkedList<RunLoopControl> activeRunLoops = new LinkedList<RunLoopControl>();
-
-    @Override
-    protected Object _enterNestedEventLoop() {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("_enterNestedEventLoop");
-        }
-
-        // we are being called on the current active event thread
-        // via dispatch, so it is stalled until we return.
-
-        // start our nested loop, which will block until that exits
-        Object ret = _runLoop();
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("Resuming event loop");
-        }
-
-        // and return the value that was passed into leaveNested
-        return ret;
-    }
-
-
-    @Override
-    protected void _leaveNestedEventLoop(Object retValue) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("_leaveNestedEventLoop");
-        }
-
-        // we are being called from dispatch of the current running
-        // event thread. We want to cause this thread to exit, and
-        // restart the nested on.
-
-        RunLoopControl current = activeRunLoops.pop();
-        assert current != null;
-
-        // let the current run loop die when we return to dispatch.
-        current.active = false;
-        // and give it the ret object so it will return it to the
-        // blocked nesting call.
-        current.release = retValue;
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("_leaveNestedEventLoop");
-        }
-
-        // when we return from this dispatched event, we will exit
-        // because we are no longer active, and then the nested
-        // call can return the release value we just provided.
-
-    }
-
-    private Object _runLoop() {
-        // Note: this method can be recursively called
-        // so do not add any platform initialization code here !
-
-        final RunLoopControl control = new RunLoopControl();
-
-        //push this new instance on the stack
-        activeRunLoops.push(control);
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("Starting event loop");
-        }
-
-        control.active = true;
-        while (control.active) {
-            Event event;
-            synchronized (eventList) {
-                if (eventList.isEmpty()) {
-                    try {
-                        eventList.wait();
-                    } catch (InterruptedException e) {
-                        continue;
-                    }
-                }
-                if (eventList.isEmpty()) {
-                    continue;
-                }
-                event = eventList.removeFirst();
-            }
-
-            if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                LensLogger.getLogger().fine("Processing " + event);
-            }
-
-            try {
-                event.dispatch();
-            } catch (Exception e) {
-                reportException(e);
-            }
-        }
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("Leaving event loop");
-        }
-
-        return control.release;
-    }
-
-    private static  void registerEventLoop() {
-        synchronized (activeEventLoopLock) {
-            activeEventLoopThreads ++;
-            LensLogger.getLogger().info(
-                "activeEventLoopThreads := " + activeEventLoopThreads);
-            activeEventLoopLock.notifyAll();
-        }
-    }
-
-    private static  void unregisterEventLoop() {
-        synchronized (activeEventLoopLock) {
-            activeEventLoopThreads --;
-            LensLogger.getLogger().info(
-                "activeEventLoopThreads := " + activeEventLoopThreads);
-            activeEventLoopLock.notifyAll();
-        }
-    }
-
-    private static  void waitEventLoopsToFinish() {
-        synchronized (activeEventLoopLock) {
-            try {
-                LensLogger.getLogger().info("Waiting for all event loops to finish");
-                while (activeEventLoopThreads > 0) {
-                    LensLogger.getLogger().info(
-                        "activeEventLoopThreads = " + activeEventLoopThreads);
-                    activeEventLoopLock.wait();
-                }
-            } catch (InterruptedException e) {
-                LensLogger.getLogger().severe("interrupted");
-            }
-        }
-    }
-
-    @Override
-    protected void runLoop(Runnable launchable) {
-        _invokeLater(launchable);
-        long stackSize = AccessController.doPrivileged(
-                (PrivilegedAction<Long>) () -> Long.getLong("glass.lens.stackSize", 0));
-        Thread toolkitThread = new Thread(new ThreadGroup("Events"),
-                () -> {
-                    if (!_initialize()) {
-                        LensLogger.getLogger().severe("Display failed initialization");
-                        throw new RuntimeException("Display failed initialization");
-                    }
-                    _runLoop();
-                }, "Lens Event Thread", stackSize);
-        setEventThread(toolkitThread);
-        toolkitThread.start();
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            @Override public void run() {
-                shutdown();
-            }
-        });
-    }
-
-    private static int nativeThreadCounter = 0;
-
-    // Call into the native impl to start up any native device input queues
-    // needed. Native will upcall to createNativeEventThread to start any threads.
-    private native void nativeEventLoop(final LensApplication lensApp,
-                                        long nativeEventHandler,
-                                        long nativeWindow);
-
-    // Note: this Native event thread is designed to listen for events
-    // from native sources. For example, it may poll some native input devices.
-    // It is *not* the same as the FX event thred.
-    private static void createNativeEventThread(final long nativeEventHandler,
-                                                final long data) {
-
-        final LensApplication lensApplication =
-            (LensApplication)Application.GetApplication();
-
-        Thread eventThread = new Thread(() -> {
-            registerEventLoop();
-            lensApplication.nativeEventLoop(lensApplication,
-                                            nativeEventHandler, data);
-
-            //when the native function return
-            //event loop has exited
-            unregisterEventLoop();
-        }, ("Lens Native Event Thread " + (nativeThreadCounter++)));
-
-        LensLogger.getLogger().info("Starting native event thread");
-
-        eventThread.setDaemon(true);
-        eventThread.start();
-    }
-
-    Object enterDnDEventLoop() {
-        dndEventLoop = createEventLoop();
-        return dndEventLoop.enter();
-    }
-
-    void leaveDndEventLoop(Object value) {
-        dndEventLoop.leave(value);
-    }
-
-    native void shutdown();
-
-    @Override
-    protected void finishTerminating() {
-        LensLogger.getLogger().info("Finishing terminating");
-
-        shutdown();
-        synchronized (eventList) {
-            eventList.clear();
-            while (!activeRunLoops.isEmpty()) {
-                RunLoopControl control = activeRunLoops.pop();
-                control.active = false;
-            }
-            eventList.notify();
-        }
-
-        super.finishTerminating();
-    }
-
-    @Override
-    protected boolean _supportsTransparentWindows() {
-        return true;
-    }
-
-    @Override protected boolean _supportsUnifiedWindows() {
-        return false;
-    }
-
-    //*******************************************************************
-    // Runloop/Event queue support additions
-
-    //Window events
-
-    /**
-     * handles the following window events WindowEvent.MINIMIZE /
-     * MAXIMIZE /RESTORE / RESIZE
-     * See Window.java::notifyResize() for more information
-     *
-     * @param window the window object which this event belongs to
-     * @param  eventType WindowEvent.MINIMIZE / MAXIMIZE /RESTORE /
-     *                   RESIZE
-     * @param width new width
-     * @param height new height
-     */
-    protected void notifyWindowResize(LensWindow window,
-                                      int eventType,
-                                      int width, int height) {
-        if (LensLogger.getLogger().isLoggable(Level.INFO)) {
-            LensLogger.getLogger().info(
-                "notifyResize with "+WindowEvent.getEventName(eventType)+
-                " event "+ window + " to " + width + "x" + height);
-        }
-        if (window != null) {
-            postEvent(new LensWindowEvent(LensWindowEvent.EType.RESIZE,
-                                          window,
-                                          eventType, 0, 0,
-                                          width, height));
-        }
-    }
-
-    /**
-     * Notify JFX that the window have been moved and provide the
-     * new coordinates.
-     *
-     * This notification can be either response for JFX request to
-     * change the window location, or user have changed it. The
-     * later case will happen when window a manager is used.
-     *
-     * @param window The window which this event belongs to
-     * @param x new X coordinate of the window
-     * @param y new Y Coordinate of the window
-     */
-    protected void notifyWindowMove(LensWindow window, int x, int y) {
-        if (LensLogger.getLogger().isLoggable(Level.INFO)) {
-            LensLogger.getLogger().info(
-                "Move " + window + " to " + x + "," + y);
-        }
-        postEvent(new LensWindowEvent(LensWindowEvent.EType.MOVE,
-                                      window,
-                                      WindowEvent.MOVE,
-                                      x, y,
-                                      0, 0));
-    }
-
-    /**
-     * This notification informs JFX on window events that doesn't
-     * requires additional information for handling the
-     * notification. For example window have gained/lost focus.
-     *
-     * @param window The window which this event belongs to
-     * @param windowEvent the event type as defined in WindowEvent
-     *                    class.
-     */
-    protected void notifyWindowEvent(LensWindow window, int windowEvent) {
-
-
-        LensWindowEvent.EType etype = null;
-        switch (windowEvent) {
-            case WindowEvent.FOCUS_GAINED:
-                etype = LensWindowEvent.EType.FOCUS;
-                break;
-            case WindowEvent.FOCUS_LOST:
-                etype = LensWindowEvent.EType.FOCUS;
-                break;
-            case WindowEvent.DESTROY:
-                etype = LensWindowEvent.EType.DESTROY;
-                break;
-            case WindowEvent.CLOSE:
-                etype = LensWindowEvent.EType.CLOSE;
-                break;
-            case WindowEvent.FOCUS_UNGRAB:
-                etype = LensWindowEvent.EType.UNGRAB;
-                break;
-            case WindowEvent.FOCUS_DISABLED:
-                etype = LensWindowEvent.EType.FOCUS_DISABLED;
-                break;
-            default:
-                LensLogger.getLogger().warning("Unsupported event type ("+
-                    WindowEvent.getEventName(windowEvent)+") skipping event");
-                return;
-        }
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine(
-                "notifyWindowEvent eventType = " +
-                WindowEvent.getEventName(windowEvent));
-        }
-
-        if (etype != null) {
-            postEvent(new LensWindowEvent(etype, window, windowEvent));
-        }
-    }
-
-    protected void windowExpose(LensWindow window, int x, int y, int width,
-                                int height) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine(
-                "Expose " + window + " "
-                + x + "," + y + "+" + width + "x" + height);
-        }
-        postEvent(new LensWindowEvent(LensWindowEvent.EType.EXPOSE,
-                                      window, WindowEvent.RESIZE,
-                                      x, y, width, height));
-    }
-
-
-    //Input events
-
-
-    /**
-     * Notify key event from native layer
-     *
-     * @param view  the window which the view is related to
-     * @param type event type (KeyEvent.PRESS ...)
-     * @param keyCode key code for the event (KeyEvent.VK_*)
-     * @param modifiers bit mask of key modifiers
-     *                  (KeyEvent.MODIFIER_*)
-     * @param chars char sequence buffer. can be 0 length, must not
-     *              be null
-     */
-    private void notifyKeyEvent(LensView view, int type , int keyCode,
-                                int modifiers, char[] chars) {
-        try {
-            if (LensLogger.getLogger().isLoggable(Level.FINER)) {
-                LensLogger.getLogger().finer("Key event on " + view);
-            }
-            postEvent(new LensKeyEvent(view, type, keyCode,
-                                       modifiers , chars));
-        } catch (Exception e) {
-            reportException(e);
-        }
-    }
-
-    /**
-     * Notify mouse event from native layer
-     *
-     * @param view the window which the view is related to
-     * @param eventType one of MouseEvent constants
-     * @param x location of event inside the view
-     * @param y location of event inside the view
-     * @param absx location of event on the screen
-     * @param absy location of event on the screen
-     * @param button currently pressed button, required only in applicable events
-     *               such as MouseEvent.DOWN
-     * @param modifiers mask of currently pressed special keys and mouse
-     *                  buttons. always required
-     * @param isPopupTrigger true when event is context menu hint (usually right
-     *                       button release)
-     * @param isSynthesized used when event is logical such MouseEvent.CLICK
-     */
-
-    void notifyMouseEvent(LensView view, int eventType,
-                          int x, int y, int absx, int absy,
-                          int button, int modifiers,
-                          boolean isPopupTrigger, boolean isSynthesized) {
-
-        try {
-            if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                LensLogger.getLogger().finest("Mouse event on " + view);
-            }
-
-            //continue process events only if not already consumed
-            if (!handleDragEvents(view, eventType, x, y, absx, absy, button, modifiers)) {
-                postMouseEvent(view, eventType, x, y, absx, absy,
-                               button, modifiers,
-                               isPopupTrigger, isSynthesized);
-            }
-        } catch (Exception e) {
-            reportException(e);
-        }
-    }
-
-    ////// Drag And Drop Support
-
-    //used to mark the button which triggered the drag - when its release
-    //the drag ends
-    private int cachedButtonPressed = MouseEvent.BUTTON_NONE;
-    //The View that the drag is currently hoover above
-    private LensView dragView = null;
-    //mask of operations done on current drag event
-    //mask values are ORed from DragActions enum
-    private int dragActionsPreformed =  DragActions.NONE.getValue();
-
-    //Mark if drag processing have started by upper levels,
-    //value changes when notifyDragStart is called
-    private boolean dragStarted = false;
-
-
-    //Possible actioins for drag events
-    private enum DragActions {
-        NONE(0,     "NONE"),
-        ENTER(1 << 1, "ENTER"),
-        LEAVE(1 << 2, "LEAVE"),
-        OVER(1 << 3, "OVER"),
-        DROP(1 << 4, "DROP");
-        public int value;
-        private String name;
-        DragActions(int value, String name) {
-            this.value = value;
-            this.name = name;
-        }
-
-        public int getValue() {
-            return value;
-        }
-
-        @Override
-        public String toString() {
-            return name;
-        }
-
-    };
-
-    private native void _notfyPlatformDnDStarted();
-    private native void _notfyPlatformDnDEnded();
-    /**
-     * This function should be only called from LensDnDClipboard after it has
-     * been initialized.
-     * After this method have called it meand that we are inside nested event
-     * loop, which is responsible to handle all drag events, all other mouse
-     * events are discarded until Drag Drop is detected.
-     */
-    void notifyDragStart() {
-        _notfyPlatformDnDStarted();
-        dragStarted = true;
-    }
-    /**
-     * Transforms mouse events into drag events when drag detected. When this
-     * functions returns true, it means that the event is been consumed by this
-     * method and no further processing is required
-     *
-     * @param view the view which owns the event
-     * @param eventType type of event, one of MouseEvent constants
-     * @param x location of event inside the view
-     * @param y location of event inside the view
-     * @param absx location of event on the screen
-     * @param absy location of event on the screen
-     * @param button currently pressed button, required only in applicable
-     *               events such as MouseEvent.DOWN
-     * @param modifiers mask of currently pressed special keys and mouse
-     *                  buttons. always required
-     * @return boolean true if event has been consumed and no further processing
-     *         required
-     */
-    private boolean handleDragEvents(LensView view, int eventType,
-                                     int x, int y, int absx, int absy,
-                                     int button, int modifiers) {
-        boolean eventConsumed = false;
-
-        if (eventType == MouseEvent.DOWN && cachedButtonPressed == MouseEvent.BUTTON_NONE) {
-            //save the button that might have started the drag event
-            cachedButtonPressed = button;
-            if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                LensLogger.getLogger().finest("Caching mouse button - " + button);
-            }
-        } else if (eventType == MouseEvent.UP && button == cachedButtonPressed) {
-            //reset cached button on mouse up
-            cachedButtonPressed = MouseEvent.BUTTON_NONE;
-
-            if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                LensLogger.getLogger().finest("reset mouse button cache " + button);
-            }
-            if (dragStarted) {
-                //drag button has been released while drag is active = drop
-                if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                    LensLogger.getLogger().finest("notifying drag DROP");
-                }
-                postEvent(new LensDragEvent(view, x, y, absx, absy, DragActions.DROP));
-
-                //notify platform DnD ended
-                _notfyPlatformDnDEnded();
-
-                //reset internal state machine
-                dragActionsPreformed = DragActions.NONE.getValue();
-                dragView = null;
-                dragStarted = false;
-            }
-        } else if (eventType == MouseEvent.MOVE &&
-                   cachedButtonPressed != MouseEvent.BUTTON_NONE &&
-                   ((modifiers & KeyEvent.MODIFIER_BUTTON_PRIMARY) == KeyEvent.MODIFIER_BUTTON_PRIMARY ||
-                    (modifiers & KeyEvent.MODIFIER_BUTTON_MIDDLE) == KeyEvent.MODIFIER_BUTTON_MIDDLE ||
-                    (modifiers & KeyEvent.MODIFIER_BUTTON_SECONDARY) == KeyEvent.MODIFIER_BUTTON_SECONDARY)) {
-            //move + mouse button pressed = drag
-
-            if (dragStarted) {
-                //consume all event after drag have started
-                eventConsumed = true;
-
-                //drag has been initiated - handle drag drop/over/enter/leave events
-                if (dragView == view &&
-                        dragActionsPreformed == DragActions.NONE.getValue()) {
-                    //first notification
-                    postEvent(new LensDragEvent(view, x, y, absx, absy, DragActions.ENTER));
-                    dragActionsPreformed |= DragActions.ENTER.getValue();
-                    if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                        LensLogger.getLogger().finest("Notifying DragEnter");
-                    }
-                } else if (dragView == view &&
-                           (dragActionsPreformed & DragActions.ENTER.getValue()) == DragActions.ENTER.getValue()) {
-                    //view was notified that drag has entered to it
-                    //now we need to send DragOver notification
-                    postEvent(new LensDragEvent(view, x, y, absx, absy, DragActions.OVER));
-                    dragActionsPreformed |= DragActions.OVER.getValue();
-                    if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                        LensLogger.getLogger().finest("Notifying DragOver");
-                    }
-                } else if (dragView != view) {
-                    //drag was moved to another view, leave the old one and
-                    //reset the actions flags and dragView,
-                    //also notify the new view for dragEnter
-
-                    if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                        LensLogger.getLogger().finest("Notifying DragLeave old view");
-                    }
-                    postEvent(new LensDragEvent(dragView, x, y, absx, absy, DragActions.LEAVE));
-
-                    if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                        LensLogger.getLogger().finest("Notifying DragEnter new view");
-                    }
-                    postEvent(new LensDragEvent(view, x, y, absx, absy, DragActions.ENTER));
-
-                    dragActionsPreformed = DragActions.ENTER.getValue();
-                    dragView = view;
-                }
-
-            } else {
-                eventType = MouseEvent.DRAG;
-                if (dragView == null) {
-                    //cache the view that the drag started on
-                    dragView = view;
-                }
-                if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-                    LensLogger.getLogger().finest("Drag detected - sending DRAG event");
-                }
-                postMouseEvent(view, eventType, x, y, absx, absy,
-                               button, modifiers,
-                               false /*isPopupTrigger*/,
-                               false /*isSynthesized*/);
-                eventConsumed = true;
-
-            }
-        }
-
-        return eventConsumed;
-    }
-
-
-    /**
-     * Notify scroll event from native layer
-     *
-     * @param view the window which the view is related to
-     * @param x
-     * @param y
-     * @param absx
-     * @param absy
-     * @param deltaX
-     * @param deltaY
-     * @param modifiers
-     * @param lines
-     * @param chars
-     * @param defaultLines
-     * @param defaultChars
-     * @param xMultiplier
-     * @param yMultiplier
-     * @param modifiers
-     */
-    private void notifyScrollEvent(LensView view,
-                                   int x, int y, int absx, int absy,
-                                   double deltaX, double deltaY, int modifiers,
-                                   int lines, int chars, int defaultLines,
-                                   int defaultChars, double xMultiplier,
-                                   double yMultiplier) {
-
-        try {
-            if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-                LensLogger.getLogger().fine("Scroll event on " + view);
-            }
-
-            postEvent(new LensScrollEvent(view, x, y, absx, absy,
-                                          deltaX, deltaY, modifiers,
-                                          lines, chars, defaultLines,
-                                          defaultChars, xMultiplier,
-                                          yMultiplier));
-        } catch (Exception e) {
-            reportException(e);
-        }
-    }
-
-    /**
-     * Posts the touch move event. This method will inspect to see if the previous event on the queue is another
-     * TouchMoveEvent with the same view and id. If so, it will update that event with the new x, y, absX and absY
-     * so as to reduce the number of events on the queue.
-     *
-     * @param view the view which owns the event
-     * @param id the id of the finger slot (usually 1)
-     * @param x the x coordinate of the event
-     * @param y the y coordinate of the event
-     * @param absX not sure
-     * @param absY not sure
-     */
-    private void postTouchMoveEvent(LensView view, long id, int x, int y, int absX, int absY) {
-        synchronized (eventList) {
-            boolean isEventCompacted = false;
-            if (!eventList.isEmpty()) {
-                Iterator <Event>events = eventList.descendingIterator();
-                while (events.hasNext()) {
-                    Event lastEvent = events.next();
-                    if (lastEvent instanceof LensTouchEvent) {
-                        LensTouchEvent e = (LensTouchEvent) lastEvent;
-                        if (e.view == view &&
-                            e.id == id &&
-                            (e.state == TouchEvent.TOUCH_MOVED || e.state == TouchEvent.TOUCH_STILL)) {
-                            // Rewrite the coordinates of the scheduled event
-                            // with the coordinates of this event.
-                            e.x = x;
-                            e.y = y;
-                            e.absX = absX;
-                            e.absY = absY;
-                            isEventCompacted = true;
-                        }
-                        //we have found the last touch event on the queue, break
-                        break;
-                    } else if (lastEvent instanceof LensMultiTouchEvent) {
-                        //another touch event type was posted, can't update event
-                        break;
-                    }
-                }
-            }
-
-            if (!isEventCompacted) {
-                postEvent(new LensTouchEvent(view, TouchEvent.TOUCH_MOVED, id, x, y, absX, absY));
-            }
-
-        }
-    }
-
-    /**
-     * Notify touch event from native layer
-     *
-     * @param view the window which the view is related to
-     * @param state the finger state (e.g. TouchEvent.TOUCH_PRESSED)
-     * @param id the id of the finger slot
-     * @param x the x coordinate relative to the view origin
-     * @param y the y coordinate relative to the view origin
-     * @param absX the x coordinate relative to the screen origin
-     * @param absY the y coordinate relative to the screen origin
-     */
-    private void notifyTouchEvent(LensView view, int state, long id,
-                                  int x, int y, int absX, int absY) {
-        try {
-            final boolean hadPreviousTouchMove = previousTouchMoveScreenX >= 0;
-            if (state == TouchEvent.TOUCH_MOVED) {
-                postTouchMoveEvent(view, id, x, y, absX, absY);
-            } else {
-                 postEvent(new LensTouchEvent(view, state, id, x, y, absX, absY));
-            }
-
-            if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-                LensLogger.getLogger().fine("Touch event "
-                                            + state + " at "
-                                            + x + "," + y
-                                            + " on " + view);
-            }
-        } catch (Exception e) {
-            reportException(e);
-        }
-    }
-
-    /**
-    * Notify multitouch event from native layer
-    *
-    * @param view the window which the view is related to
-    * @param states list of the finger states of each touch point
-    * @param ids list of the IDs of each touch point
-    * @param xs list of of the absolute X coordinates of each touch point
-    * @param ys list of of the absolute Y coordinates of each touch point
-    * @param dx value to be added to X coordinates to convert them to relative
-    * @param dy value to be added to Y coordinates to convert them to relative
-    */
-    private void notifyMultiTouchEvent(LensView view, int[] states, long[] ids,
-                                       int[] xs, int[] ys, int dx, int dy) {
-        try {
-
-            if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-                LensLogger.getLogger().fine("MultiTouch event with "
-                                            + states.length + " points "
-                                            + " on " + view);
-            }
-            synchronized (eventList) {
-                // Try to match this multitouch event against a the last multi touch
-                // pending event on the queue, if they match and event type is move,
-                // update the existing event with the new values instead of posting a new event
-                // This code assume that the order of touch points doesn't
-                //change between events
-                boolean match = false;
-                if (!eventList.isEmpty()) {
-                    Iterator <Event>events = eventList.descendingIterator();
-                    while (events.hasNext()) {
-                        Event lastEvent = events.next();
-                        if (lastEvent instanceof LensMultiTouchEvent) {
-                            LensMultiTouchEvent e = (LensMultiTouchEvent) lastEvent;
-                            if (e.view == view
-                                    && e.states.length == states.length) {
-                                assert(states.length == ids.length);
-                                assert(e.states.length == e.ids.length);
-                                match = true;
-                                for (int i = 0; i < states.length && match; i++) {
-                                    //check if event is motion related
-                                    if ((e.states[i] != TouchEvent.TOUCH_MOVED &&
-                                         e.states[i] != TouchEvent.TOUCH_STILL) ||
-                                        (states[i] != TouchEvent.TOUCH_MOVED &&
-                                         states[i] != TouchEvent.TOUCH_STILL)) {
-                                        match = false;
-                                    }
-                                    if (e.ids[i] != ids[i]) {
-                                        match = false;
-                                    }
-                                }
-                                if (match) {
-                                    // rewrite the coordinates of the scheduled event
-                                    // with the coordinates of this event.
-                                    e.xs = xs;
-                                    e.ys = ys;
-                                    e.states = states;
-                                    e.dx = dx;
-                                    e.dy = dy;
-                                }
-                            }
-                            //we have found the last touch event on the queue, break
-                            break;
-                        } else if (lastEvent instanceof LensTouchEvent) {
-                            //another touch event type was posted, can't update event
-                            break;
-                        }
-                    }
-                }
-                if (!match) {
-                    postEvent(new LensMultiTouchEvent(view, states, ids,
-                                                      xs, ys, dx, dy));
-                }
-            }
-
-        } catch (Exception e) {
-            reportException(e);
-        }
-    }
-
-
-
-    /**
-     * Notify view event from native
-     * View events are one of the events listed in ViewEvent.java
-     *
-     * @param view the event occurred in
-     * @param viewEventType the type of event as listed in
-     *                      ViewEvent.java
-     */
-    private void notifyViewEvent(LensView view, int viewEventType,
-                                 int x, int y, int width, int height) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine(
-                "Notify event type "
-                + ViewEvent.getTypeString(viewEventType)
-                + " on " + view);
-        }
-
-        postEvent(new LensViewEvent(view, viewEventType,
-                                    x, y, width, height));
-    }
-
-    private void notifyMenuEvent(LensView view, int x, int y, int xAbs,
-                                 int yAbs, boolean isKeyboardTrigger) {
-        if (LensLogger.getLogger().isLoggable(Level.FINER)) {
-            LensLogger.getLogger().finer(
-                "Notify menu event " +
-                "x=" + x + ", y=" + y + ", xAbs=" + xAbs + ", yAbs=" + yAbs +
-                ", isKeyboardTrigger " + isKeyboardTrigger +
-                ", on " + view);
-        }
-        if (view != null) {
-            postEvent(new LensMenuEvent(view, x, y, xAbs, yAbs, isKeyboardTrigger));
-        } else {
-            if (LensLogger.getLogger().isLoggable(Level.FINER)) {
-                LensLogger.getLogger().finer("view is null, skipping event");
-            }
-        }
-    }
-
-    /**
-     * Notify device event from native
-     * A device event is sent when an input device is attached or detached.
-     *
-     * @param flags the device type flags (a bitmask containing values up to 2^DEVICE_MAX)
-     * @param attach true is the device was attached, false if it was detached.
-     */
-    private void notifyDeviceEvent(int flags, boolean attach) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine(
-                "Notify device event attach=" + attach
-                + ", flags=0x" + Integer.toHexString(flags));
-        }
-
-        postEvent(new LensDeviceEvent(flags, attach));
-    }
-
-    /**
-     * Notify changes in screen settings from native layer
-     * This method is triggered when native code detects a change in e.g. screen orientation
-     */
-    private void notifyScreenSettingsChanged() {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("Notify screen settings changed");
-        }
-        postEvent(new LensScreenEvent());
-    }
-
-    //*******************************************************************
-
-    public void installWindowMenu(MenuBar menubar) {
-        // not sure what menubars look like on an embedded device yet.
-        this.windowMenu = createMenu("Window");
-    }
-
-    public Menu getWindowMenu() {
-        return this.windowMenu;
-    }
-
-    @Override
-    public void installDefaultMenus(MenuBar menubar) {
-    }
-
-    // FACTORY METHODS
-    @Override
-    public Window createWindow(Window owner, Screen screen, int styleMask) {
-        return new LensWindow(owner, screen, styleMask);
-    }
-
-    @Override
-    public Window createWindow(long parent) {
-        return new LensWindow(parent);
-    }
-
-    @Override
-    public View createView() {
-        return new LensView();
-    }
-
-    @Override
-    public Cursor createCursor(int type) {
-        return new LensCursor(type);
-    }
-
-    @Override
-    public Cursor createCursor(int x, int y, Pixels pixels) {
-        return new LensCursor(x, y, pixels);
-    }
-
-    @Override
-    protected void staticCursor_setVisible(boolean visible) {
-        cursorVisible = visible;
-        if (deviceFlags[DEVICE_POINTER] >= 1) {
-            LensCursor.setVisible_impl(visible);
-        }
-    }
-
-    @Override
-    protected Size staticCursor_getBestSize(int width, int height) {
-        return LensCursor.getBestSize_impl(width, height);
-    }
-
-    @Override
-    public Pixels createPixels(int width, int height, ByteBuffer data) {
-        return new LensPixels(width, height, data);
-    }
-
-    @Override
-    public Pixels createPixels(int width, int height, IntBuffer data) {
-        return new LensPixels(width, height, data);
-    }
-
-    @Override
-    public Pixels createPixels(int width, int height, IntBuffer data, float scalex, float scaley) {
-        return new LensPixels(width, height, data, scalex, scaley);
-    }
-
-    @Override
-    protected int staticPixels_getNativeFormat() {
-        return LensPixels.getNativeFormat_impl();
-    }
-
-    @Override
-    public Robot createRobot() {
-        return new LensRobot();
-    }
-
-    @Override protected double staticScreen_getVideoRefreshPeriod() {
-        return 0.0;     // indicate millisecond resolution
-    }
-
-    @Override native protected Screen[] staticScreen_getScreens();
-
-    @Override
-    public Timer createTimer(Runnable runnable) {
-        return new LensTimer(runnable);
-    }
-
-    @Override
-    protected int staticTimer_getMinPeriod() {
-        return LensTimer.getMinPeriod_impl();
-    }
-
-    @Override
-    protected int staticTimer_getMaxPeriod() {
-        return LensTimer.getMaxPeriod_impl();
-    }
-
-    @Override protected FileChooserResult
-    staticCommonDialogs_showFileChooser(Window owner, String folder,
-                                        String filename,
-                                        String title, int type,
-                                        boolean multipleMode,
-                                        ExtensionFilter[] extensionFilters, int defaultFilterIndex) {
-        // FileChooser APIs should return null when they cannot show a dialog
-        return null;
-    }
-
-    @Override
-    protected File staticCommonDialogs_showFolderChooser(Window owner,
-            String folder,
-            String title) {
-        // FileChooser APIs should return null when they cannot show a dialog
-        return null;
-    }
-
-    @Override protected long staticView_getMultiClickTime() {
-        return LensView._getMultiClickTime();
-    }
-
-    @Override protected int staticView_getMultiClickMaxX() {
-        return LensView._getMultiClickMaxX();
-    }
-
-    @Override protected int staticView_getMultiClickMaxY() {
-        return LensView._getMultiClickMaxY();
-    }
-
-    @Override
-    protected void _invokeAndWait(Runnable runnable) {
-        if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-            LensLogger.getLogger().fine("invokeAndWait " + runnable);
-        }
-        synchronized (invokeAndWaitLock) {
-            waitingFor = runnable;
-        }
-        synchronized (eventList) {
-            eventList.addLast(new RunnableEvent(true, runnable));
-            eventList.notify();
-        }
-        synchronized (invokeAndWaitLock) {
-            while (waitingFor == runnable) {
-                try {
-                    invokeAndWaitLock.wait();
-                } catch (InterruptedException ex) {
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void _invokeLater(Runnable runnable) {
-        if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-            LensLogger.getLogger().fine("invokeLater " + runnable);
-        }
-        synchronized (eventList) {
-            eventList.addLast(new RunnableEvent(false, runnable));
-            eventList.notify();
-        }
-    }
-
-    public boolean hasTwoLevelFocus() {
-        return deviceFlags[DEVICE_PC_KEYBOARD] == 0 && deviceFlags[DEVICE_5WAY] > 0;
-    }
-
-    public boolean hasVirtualKeyboard() {
-        return deviceFlags[DEVICE_PC_KEYBOARD] == 0 && deviceFlags[DEVICE_TOUCH] > 0;
-    }
-
-    public boolean hasTouch() {
-        return deviceFlags[DEVICE_TOUCH] > 0;
-    }
-
-    public boolean hasMultiTouch() {
-        return deviceFlags[DEVICE_MULTITOUCH] > 0;
-    }
-
-    public boolean hasPointer() {
-        return deviceFlags[DEVICE_POINTER] > 0;
-    }
-
-    @Override
-    protected native int _getKeyCodeForChar(char c);
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensClipboardDelegate.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.Clipboard;
-import com.sun.glass.ui.delegate.ClipboardDelegate;
-
-import sun.util.logging.PlatformLogger.Level;
-
-final class LensClipboardDelegate implements ClipboardDelegate {
-
-    @Override
-    public Clipboard createClipboard(String clipboardName) {
-        // Currently only DnD clipboards are supported.
-        //System clipboards will probably will not be supported as embedded
-        //platforms do not support this functionality
-        //We may support Selection clipboard in the future, but others systems
-        //are not seem to use it at this point
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("LensClipboardDelegate::createClipboard("+clipboardName+")");
-        }
-        if (Clipboard.DND.equals(clipboardName)) {
-            return new LensDnDClipboard();
-        } else if (Clipboard.SYSTEM.equals(clipboardName)) {
-            return new LensSystemClipboard();
-        } else {
-            LensLogger.getLogger().warning("LensClipboardDelegate doesn't support " +
-                                           clipboardName + " clipboard");
-            return null;
-        }
-    }
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensCursor.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.glass.ui.lens;
-
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import com.sun.glass.ui.Cursor;
-import com.sun.glass.ui.Pixels;
-import com.sun.glass.ui.Size;
-import com.sun.glass.ui.Application;
-
-final class LensCursor extends Cursor {
-
-    // LensCursor doesn't use ptr from superclass
-    private long ptr = 0;
-
-    protected LensCursor(int type) {
-        super(type);
-
-        if (type != CURSOR_NONE) {
-            ptr = _createNativeCursorByType(type);
-        }
-    }
-
-    protected LensCursor(int x, int y, Pixels pixels) {
-        super(x, y, pixels);
-        ptr = getNativeCursor();
-    }
-
-
-    protected void finalize() throws Throwable {
-        try {
-            if (ptr != 0) {
-                _releaseNativeCursor(ptr);
-            }
-        } finally {
-            super.finalize();
-        }
-    }
-
-    @Override
-    protected long _createCursor(int x, int y, Pixels pixels) {
-
-        long res = 0;
-        Buffer data = pixels.getPixels();
-        int width = pixels.getWidth();
-        int height = pixels.getHeight();
-
-        if (data != null) {
-            if (!data.isDirect()) {
-                if (pixels.getBytesPerComponent() == 4) {
-                    IntBuffer ints = (IntBuffer)(data.rewind());
-                    int[] intArray = ints.array();
-                    res =  _createNativeCursorInts(x, y, intArray, width, height);
-                } else if (pixels.getBytesPerComponent() == 1) {
-                    ByteBuffer bytes = (ByteBuffer)(data.rewind());
-                    byte[] byteArray = bytes.array();
-                    res =  _createNativeCursorBytes(x, y, byteArray, width, height);
-                }
-            } else {
-                data.rewind();
-                res =  _createNativeCursorDirect(x, y, data, data.capacity(), width , height);
-
-            }
-        }
-        return res;
-    }
-
-    void set() {
-        if (ptr != 0) {
-            _setNativeCursor(ptr);
-        }
-
-        int type = getType();
-        if (type == CURSOR_NONE) {
-            // CURSOR_NONE is mapped to setVisible(false) and will be registered
-            // in LensApplication as a user preference to not show the cursor.
-            ((LensApplication)Application.GetApplication()).staticCursor_setVisible(false);
-        } else {
-            ((LensApplication)Application.GetApplication()).staticCursor_setVisible(true);
-        }
-    }
-
-
-
-    static  void setVisible_impl(boolean visible) {
-        _setVisible(visible);
-    }
-
-    static Size getBestSize_impl(int width, int height) {
-        return new Size(16, 16);
-    }
-
-
-    native private void _setNativeCursor(long ptr);
-    native private void _releaseNativeCursor(long ptr);
-
-    native private long _createNativeCursorByType(int type);
-
-    native private long _createNativeCursorInts(int x, int y, int[] array, int width, int height);
-    native private long _createNativeCursorBytes(int x, int y, byte[] array, int width, int height);
-    native private long _createNativeCursorDirect(int x, int y, Buffer array, int capacity, int width, int height);
-
-    native static private void _setVisible(boolean isVisible);
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensDnDClipboard.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import java.util.HashMap;
-
-import com.sun.glass.ui.Clipboard;
-import com.sun.glass.ui.SystemClipboard;
-import com.sun.glass.ui.Application;
-
-import sun.util.logging.PlatformLogger.Level;
-
-final class LensDnDClipboard extends SystemClipboard {
-
-    public LensDnDClipboard() {
-        super(Clipboard.DND);
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("constructor called");
-        }
-    }
-
-    /**
-     * Should be called when drag operation completed by the 'system'
-     *
-     * @param action mask of actions from Clipboard
-     */
-    public void actionPerformed(int action) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("action =  ["+
-                                         Integer.toHexString(action)+"]");
-        }
-        super.actionPerformed(action);
-    }
-
-    protected  boolean isOwner() {
-        //called many time while the hovering over target node
-        //So reduced log level to finest in order to reduce log clutter
-        if (LensLogger.getLogger().isLoggable(Level.FINEST)) {
-            LensLogger.getLogger().finest("returns true");
-        }
-        return true;//For DnD its always true
-    }
-    /**
-     * Here the magic happens.
-     * When this method is called all input events should be grabbed and
-     * appropriate drag notifications should be sent instead of regular input
-     * events
-     */
-    protected  void pushToSystem(HashMap<String, Object> cacheData, int supportedActions) {
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("handling drag");
-        }
-
-        if (LensLogger.getLogger().isLoggable(Level.FINER)) {
-            LensLogger.getLogger().finer("data =[cachedData = "+ cacheData+
-                " supportedActions= "+Integer.toHexString(supportedActions));
-        }
-
-        LensApplication lensApp = (LensApplication)Application.GetApplication();
-        lensApp.notifyDragStart();
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("starting nested event loop");
-        }
-
-        lensApp.enterDnDEventLoop();
-        // The loop is exited in LensApplication.LensDragEvent.dispatch()
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("nested event loop finished");
-            LensLogger.getLogger().fine("Drag done - notifying actionPreformed");
-        }
-
-        actionPerformed(Clipboard.ACTION_COPY_OR_MOVE);
-    }
-
-
-
-
-    //rest of the functionis should not be called. Only applicable for
-    //SystemClipboards
-    //Must be overrided thue as they are abstract functions
-
-    protected  void pushTargetActionToSystem(int actionDone) {
-        LensLogger.getLogger().warning("Not supported");
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("actionDone = "+
-                                         Integer.toHexString(actionDone));
-        }
-
-    }
-
-    protected  Object popFromSystem(String mimeType) {
-        LensLogger.getLogger().warning("Not supported");
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("mimeType="+mimeType);
-        }
-        return null;
-    }
-    protected  int supportedSourceActionsFromSystem() {
-        LensLogger.getLogger().warning("Not supported");
-
-        return Clipboard.ACTION_COPY_OR_MOVE;
-    }
-
-    protected  String[] mimesFromSystem() {
-        LensLogger.getLogger().warning("Not supported");
-
-        return null;
-    }
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensLogger.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Locale;
-import sun.util.logging.PlatformLogger;
-import sun.util.logging.PlatformLogger.Level;
-
-final class LensLogger {
-
-    private static final PlatformLogger logger = initLogger();
-
-    private static PlatformLogger initLogger() {
-        PlatformLogger logger = PlatformLogger.getLogger("javafx.lens");
-        String levelString = AccessController.doPrivileged(
-                (PrivilegedAction<String>) () -> System.getProperty("log.lens", "SEVERE").toUpperCase(Locale.ROOT));
-        try {
-            logger.setLevel(Level.valueOf(levelString));
-        } catch (Exception e) {
-            logger.setLevel(Level.SEVERE);
-        }
-        return logger;
-    }
-
-    public static PlatformLogger getLogger() {
-        return logger;
-    }
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensMenuBarDelegate.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.delegate.MenuBarDelegate;
-import com.sun.glass.ui.delegate.MenuDelegate;
-
-final class LensMenuBarDelegate implements MenuBarDelegate {
-
-    public boolean createMenuBar() {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean insert(MenuDelegate menu, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean remove(MenuDelegate menu, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public long getNativeMenu() {
-        LensLogger.getLogger().severe("Not implemented");
-        return 0;
-    }
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensMenuDelegate.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.MenuItem.Callback;
-import com.sun.glass.ui.Pixels;
-import com.sun.glass.ui.delegate.MenuDelegate;
-import com.sun.glass.ui.delegate.MenuItemDelegate;
-
-final class LensMenuDelegate implements MenuDelegate, MenuItemDelegate {
-
-    public boolean createMenu(String title, boolean enabled) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setTitle(String title) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setEnabled(boolean enabled) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean insert(MenuDelegate menu, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean insert(MenuItemDelegate item, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean remove(MenuDelegate menu, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean remove(MenuItemDelegate item, int pos) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean createMenuItem(String title, Callback callback, int shortcutKey, int shortcutModifiers, Pixels pixels, boolean enabled, boolean checked) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setCallback(Callback callback) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setShortcut(int shortcutKey, int shortcutModifiers) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setPixels(Pixels pixels) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-    public boolean setChecked(boolean checked) {
-        LensLogger.getLogger().severe("Not implemented");
-        return true;
-    }
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensPixels.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.Pixels;
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-
-final class LensPixels extends Pixels {
-
-    protected LensPixels(int width, int height, ByteBuffer data) {
-        super(width, height, data);
-    }
-
-    protected LensPixels(int width, int height, IntBuffer data) {
-        super(width, height, data);
-    }
-
-    protected LensPixels(int width, int height, IntBuffer data, float scalex, float scaley) {
-        super(width, height, data, scalex, scaley);
-    }
-
-    static int getNativeFormat_impl() {
-        LensLogger.getLogger().config("Querying native format");
-        // All our implementations use ARGB_PRE and convert to the native pixel
-        // format when we push pixels to the screen.
-        return Pixels.Format.BYTE_BGRA_PRE;
-    }
-
-    private native void _copyPixels(Buffer dst, Buffer src, int size);
-
-    @Override protected void _fillDirectByteBuffer(ByteBuffer bb) {
-        if (this.bytes != null) {
-            this.bytes.rewind();
-            if (this.bytes.isDirect()) {
-                _copyPixels(bb, this.bytes, getWidth() * getHeight());
-            } else {
-                bb.put(this.bytes);
-            }
-            this.bytes.rewind();
-        } else {
-            this.ints.rewind();
-            if (this.ints.isDirect()) {
-                _copyPixels(bb, this.ints, getWidth() * getHeight());
-            } else {
-                for (int i = 0; i < this.ints.capacity(); i++) {
-                    int data = this.ints.get();
-                    bb.put((byte)((data) & 0xff));
-                    bb.put((byte)((data >> 8) & 0xff));
-                    bb.put((byte)((data >> 16) & 0xff));
-                    bb.put((byte)((data >> 24) & 0xff));
-                }
-            }
-            this.ints.rewind();
-        }
-        bb.rewind();
-    }
-
-    @Override protected void _attachInt(long nativeWindowPointer, int w, int h,
-                                        IntBuffer ints, int[] array, int offset) {
-        LensLogger.getLogger().severe("Not implemented");
-        throw new UnsupportedOperationException("not implmented");
-    }
-
-    @Override protected void _attachByte(long ptr, int w, int h, ByteBuffer bytes,
-                                         byte[] array, int offset) {
-        LensLogger.getLogger().severe("Not implemented");
-        throw new UnsupportedOperationException("not implmented");
-    }
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensPlatformFactory.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.Application;
-import com.sun.glass.ui.Menu;
-import com.sun.glass.ui.MenuBar;
-import com.sun.glass.ui.MenuItem;
-import com.sun.glass.ui.PlatformFactory;
-import com.sun.glass.ui.Window;
-import com.sun.glass.ui.delegate.ClipboardDelegate;
-import com.sun.glass.ui.delegate.MenuBarDelegate;
-import com.sun.glass.ui.delegate.MenuDelegate;
-import com.sun.glass.ui.delegate.MenuItemDelegate;
-
-public final class LensPlatformFactory extends PlatformFactory {
-
-    @Override public Application createApplication() {
-        return new LensApplication();
-    }
-
-    @Override public MenuBarDelegate createMenuBarDelegate(MenuBar menubar) {
-        return new LensMenuBarDelegate();
-    }
-
-    @Override public MenuDelegate createMenuDelegate(Menu menu) {
-        return new LensMenuDelegate();
-    }
-
-    @Override public MenuItemDelegate createMenuItemDelegate(MenuItem item) {
-        return new LensMenuDelegate();
-    }
-
-    public ClipboardDelegate createClipboardDelegate() {
-        return new LensClipboardDelegate();
-    }
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensRobot.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.*;
-import com.sun.glass.events.KeyEvent;
-import com.sun.glass.events.MouseEvent;
-import java.nio.IntBuffer;
-
-final class LensRobot extends Robot {
-
-    //used for debuging only
-    static private int numOfInstances = 0;
-
-    private static final int GET_X = 1;
-    private static final int GET_Y = 2;
-
-    protected LensRobot() {
-        super();
-    }
-
-    @Override protected void _create() {
-        // no-op
-
-    }
-    @Override protected void _destroy() {
-        // no-op
-    }
-
-    //Key events
-
-    @Override
-    protected void _keyPress(int code) {
-        postKeyEvent(KeyEvent.PRESS, code);
-    }
-    @Override
-    protected void _keyRelease(int code) {
-        postKeyEvent(KeyEvent.RELEASE, code);
-    }
-
-
-    //Mouse events
-
-    @Override
-    protected void _mouseMove(int x, int y) {
-        postMouseEvent(MouseEvent.MOVE, x, y, 0);
-    }
-
-    @Override
-    protected void _mousePress(int buttons) {
-        postMouseEvent(MouseEvent.DOWN, 0, 0, buttons);
-
-    }
-
-    @Override
-    protected void _mouseRelease(int buttons) {
-        postMouseEvent(MouseEvent.UP, 0, 0, buttons);
-    }
-
-    @Override
-    protected void _mouseWheel(int wheelAmt) {
-        postScrollEvent(wheelAmt);
-    }
-
-    @Override
-    protected int _getMouseX() {
-        return getMouseLocation(GET_X);
-    }
-    @Override
-    protected int _getMouseY() {
-        return getMouseLocation(GET_Y);
-    }
-
-    private native void postScrollEvent(int wheelAmt);
-
-    private native void postKeyEvent(int keyEventType, int keyCode);
-
-    private native void postMouseEvent(int mouseEventType, int x, int y,
-                                       int buttons);
-
-    private native int getMouseLocation(int axsis);
-
-    @Override native protected int _getPixelColor(int x, int y);
-
-    @Override native protected void _getScreenCapture(int x, int y, int width, int height, int[] data);
-    @Override protected Pixels _getScreenCapture(int x, int y, int width, int height, boolean isHiDPI) {
-        int data[] = new int[width * height];
-        _getScreenCapture(x, y, width, height, data);
-        return Application.GetApplication().createPixels(width, height, IntBuffer.wrap(data));
-    }
-}
-
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensSystemClipboard.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import java.util.HashMap;
-
-import com.sun.glass.ui.Clipboard;
-import com.sun.glass.ui.SystemClipboard;
-
-import sun.util.logging.PlatformLogger.Level;
-
-/**
- * Current supported embedded system doesn't have native clipboard, therefore
- * this class is a stub implementation of SystemClipboard that will provide
- * Clipboard functionality for a single FX application.
- */
-
-final class LensSystemClipboard extends SystemClipboard {
-
-    public LensSystemClipboard() {
-        super(Clipboard.SYSTEM);
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("LensSystemClipboard created");
-        }
-    }
-
-    protected boolean isOwner() {
-        //LensSystemClipboard doesn't integrate with platform clipboard as
-        //it not available, so we always return true
-
-        return true;
-    }
-
-    protected void pushToSystem(HashMap<String, Object> cacheData,
-                                int supportedActions) {
-        //no-op as there is no system clipboard
-
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("LensSystemClipboard::pushToSystem " +
-                                        "cacheData = " + cacheData +
-                                        "supportedActions: " +
-                                        getActionString(supportedActions));
-        }
-
-    }
-
-    protected void pushTargetActionToSystem(int actionDone) {
-        //no-op as there is no system clipboard
-        if (LensLogger.getLogger().isLoggable(Level.FINE)) {
-            LensLogger.getLogger().fine("LensSystemClipboard::pushTargetActionToSystem "
-                                        + "actionDone: " +
-                                        getActionString(actionDone));
-        }
-
-    }
-    protected Object popFromSystem(String mimeType) {
-        //this method should not be called as we are the owner of the data
-        //see SystemClipboard::getData(String mimeType) for more information
-        LensLogger.getLogger().warning("LensSystemClipboard::popFromSystem was called "
-                                       + "mimType = " + mimeType);
-        return null;
-    }
-
-    protected int supportedSourceActionsFromSystem() {
-        //this method should not be called as we are the owner of the data
-        //see SystemClipboard::getSupportedSourceActions() for more information
-        LensLogger.getLogger().warning("LensSystemClipboard::supportedSourceActionsFromSystem "
-                                       + "was called ");
-        return Clipboard.ACTION_NONE;
-    }
-
-    protected String[] mimesFromSystem() {
-        //this method should not be called as we are the owner of the data
-        //see SystemClipboard::getMimeTypes() for more information
-        LensLogger.getLogger().warning("LensSystemClipboard::mimesFromSystem "
-                                       + "was called ");
-
-        return new String[0];
-    }
-
-}
\ No newline at end of file
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensTimer.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.ui.Timer;
-
-/**
- * Lens implementation class for Timer.
- */
-final class LensTimer extends Timer {
-    static java.util.Timer timer;
-    private java.util.TimerTask task;
-
-    protected LensTimer(final Runnable runnable) {
-        super(runnable);
-    }
-
-    static int getMinPeriod_impl() {
-        return 0;
-    }
-
-    static int getMaxPeriod_impl() {
-        return 1000000;
-    }
-
-    @Override protected long _start(final Runnable runnable, int period) {
-        if (timer == null) {
-            timer = new java.util.Timer(true);
-        }
-
-        task = new java.util.TimerTask() {
-
-            @Override
-            public void run() {
-                runnable.run();
-            }
-        };
-
-        timer.schedule(task, 0, (long)period);
-        return 1; // need something non-zero to denote success.
-    }
-
-    @Override protected long _start(Runnable runnable) {
-        throw new RuntimeException("vsync timer not supported");
-    }
-
-    @Override protected void _stop(long timer) {
-        if (task != null) {
-            task.cancel();
-            task = null;
-        }
-    }
-}
-
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensTouchInputSupport.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.events.TouchEvent;
-import com.sun.glass.events.MouseEvent;
-import com.sun.glass.events.KeyEvent;
-import com.sun.glass.ui.TouchInputSupport;
-import com.sun.glass.ui.GestureSupport;
-import com.sun.glass.ui.Application;
-import com.sun.glass.ui.View;
-
-import java.lang.Integer;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-
-final class LensTouchInputSupport {
-
-    /**
-     * This property define the size of the tap radius which can be seen as the
-     * 'finger size'. After the first tap, a touch point will be considered
-     * STILL as long as the point coordinates are within the tap radius. When the
-     * point coordinates move outside the tap radius the point will be considered
-     * as 'dragging' and all move events will be reported as long as they are
-     * greater then the touchMoveSensitivity property
-     * Property is used by Lens native input driver
-     *
-     */
-    static final int touchTapRadius;
-    /**
-     * This property determine the sensitivity of move events from touch. The
-     * bigger the value the less sensitive is the touch screen. In practice move
-     * events with a delta smaller then the value of this property will be
-     * filtered out.The value of the property is in pixels.
-     * Property is used by Lens native input driver
-     */
-    private static final int touchMoveSensitivity;
-
-    /**
-     * This property enables or disables input device pruning. When input
-     * device pruning is enabled, only the first device input node of a
-     * device is captured. So if an input device driver registers nodes
-     * /dev/input/event2 and /dev/input/event3 for the same devices, only
-     * the first node reported by udev is used.
-     * Input device pruning is off by default.
-     */
-    private static final boolean pruneInputDevices;
-
-    /**
-     * This property enable/disable multi touch support by the input driver.
-     * When the property is disabled and a multitouch screen is connected, the
-     * input driver will 'downgrade' the screen events to a single touch
-     * point, as if a single touch screen was connected
-     *
-     */
-    private static final boolean useMultiTouch;
-
-    /**
-     * This property is used for printing raw events, device properties, device
-     * attach / detach, low level Lens input driver decisions etc. Useful for
-     * debugging a new input device that is not recognized or behave wrongly by
-     * the Lens input driver. Property is disabled by default
-                                        */
-    private static final boolean enableDeviceTrace;
-
-    static {
-        touchTapRadius = AccessController.doPrivileged(
-                (PrivilegedAction<Integer>) () -> Integer.getInteger("lens.input.touch.TapRadius", 20));
-
-        touchMoveSensitivity = AccessController.doPrivileged(
-                (PrivilegedAction<Integer>) () -> Integer.getInteger("lens.input.touch.MoveSensitivity", 20));
-
-        pruneInputDevices = AccessController.doPrivileged(
-                (PrivilegedAction<Boolean>) () -> Boolean.getBoolean("lens.input.pruneDevices"));
-
-        useMultiTouch = AccessController.doPrivileged(
-                (PrivilegedAction<Boolean>) () -> !(Boolean.getBoolean("lens.input.forceSingleTouch")));
-
-        enableDeviceTrace = AccessController.doPrivileged(
-                (PrivilegedAction<Boolean>) () -> Boolean.getBoolean("lens.input.trace"));
-
-    }
-
-
-    private final static GestureSupport gestures = new GestureSupport(false);
-    private final static TouchInputSupport touches =
-        new TouchInputSupport(gestures.createTouchCountListener(), false);
-
-    static void postTouchEvent(LensView view, int state, long id,
-                               int x, int y, int absX, int absY) {
-        touches.notifyBeginTouchEvent(view, 0, true, 1);
-        touches.notifyNextTouchEvent(view, state, id, x, y, absX, absY);
-        touches.notifyEndTouchEvent(view);
-    }
-
-    static void postMultiTouchEvent(LensView view, int[] states, long[] ids,
-                                    int[] xs, int[] ys, int dx, int dy) {
-        touches.notifyBeginTouchEvent(view, 0, true, states.length);
-        for (int i = 0; i < states.length; i++) {
-            touches.notifyNextTouchEvent(view, states[i], ids[i],
-                                         xs[i] + dx, ys[i] + dy,
-                                         xs[i], ys[i]);
-        }
-        touches.notifyEndTouchEvent(view);
-    }
-}
-
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensView.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import java.util.Map;
-
-import com.sun.glass.ui.Pixels;
-import com.sun.glass.ui.View;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.nio.Buffer;
-
-import com.sun.glass.events.ViewEvent;
-
-final class LensView extends View {
-
-    protected LensView() {
-        super();
-    }
-
-    // Constants
-    private static long multiClickTime =  300;
-    private static int multiClickMaxX = LensTouchInputSupport.touchTapRadius;
-    private static int multiClickMaxY = LensTouchInputSupport.touchTapRadius;
-
-    // view variables
-    private int x;
-    private int y;
-    private long nativePtr;
-
-    protected static long _getMultiClickTime() {
-        if (multiClickTime == -1) {
-            //multiClickTime = _getMultiClickTime_impl();
-            //currently calling a native function is meaningless
-            multiClickTime = 300;
-        }
-        return multiClickTime;
-    }
-
-    protected static int _getMultiClickMaxX() {
-        if (multiClickMaxX == -1) {
-            //multiClickMaxX = _getMultiClickMaxX_impl();
-            //currently calling a native function is meaningless
-            multiClickMaxX = 2;
-        }
-        return multiClickMaxX;
-    }
-
-    protected static int _getMultiClickMaxY() {
-        if (multiClickMaxY == -1) {
-            //multiClickMaxY = _getMultiClickMaxY_impl();
-            //currently calling a native function is meaningless
-            multiClickMaxY = 2;
-        }
-        return multiClickMaxY;
-    }
-
-    native private void _paintInt(long ptr, int w, int h, IntBuffer ints,
-                                  int[] array, int offset);
-    native private void _paintByte(long ptr, int w, int h, ByteBuffer bytes,
-                                   byte[] array, int offset);
-    native private void _paintIntDirect(long ptr, int w, int h, Buffer buffer);
-
-    @Override
-    protected void _enableInputMethodEvents(long ptr, boolean enable) {
-    }
-
-
-
-    @Override
-    protected long _getNativeView(long ptr) {
-        //this method is a Windows hack, see View.java for more details
-        // we just ignore it
-        return ptr;
-    }
-
-    @Override
-    protected int _getX(long ptr) {
-        return x;
-    }
-
-    @Override
-    protected int _getY(long ptr) {
-        return y;
-    }
-
-
-
-    @Override
-    protected void _scheduleRepaint(long ptr) {
-        // native code is there but does nothing yet
-        //throw new UnsupportedOperationException("Not supported yet.");
-        LensLogger.getLogger().info("Ignoring repaint");
-    }
-
-
-
-    @Override protected void _uploadPixels(long nativeViewPtr, Pixels pixels) {
-        if (getWindow() != null) {
-            Buffer data = pixels.getPixels();
-            int width = pixels.getWidth();
-            int height = pixels.getHeight();
-
-            if (data.isDirect() == true) {
-                _paintIntDirect(nativeViewPtr, width, height, data);
-            } else if (data.hasArray() == true) {
-                if (pixels.getBytesPerComponent() == 1) {
-                    ByteBuffer bytes = (ByteBuffer)data;
-                    _paintByte(nativeViewPtr, width, height, bytes,
-                               bytes.array(), bytes.arrayOffset());
-                } else {
-                    IntBuffer ints = (IntBuffer)data;
-                    int[] intArray = ints.array();
-
-                    _paintInt(nativeViewPtr, width, height, ints,
-                              intArray, ints.arrayOffset());
-                }
-            }
-        }
-    }
-
-    /**
-     * Events
-     */
-
-    protected void _notifyMove(int x, int y) {
-        // used to update x,y for _getX(), _getY()
-        this.x = x;
-        this.y = y;
-        notifyView(ViewEvent.MOVE);
-    }
-
-    protected void _notifyKey(int type, int keyCode, char[] keyChars,
-                              int modifiers) {
-        notifyKey(type, keyCode, keyChars, modifiers);
-    }
-
-    protected void _notifyMouse(int type, int button,
-                                int x, int y, int xAbs, int yAbs, int modifiers,
-                                boolean isPopupTrigger, boolean isSynthesized) {
-        notifyMouse(type, button, x, y, xAbs, yAbs, modifiers, isPopupTrigger,
-                    isSynthesized);
-    }
-
-    protected void _notifyScroll(int x, int y, int xAbs, int yAbs,
-                                 double deltaX, double deltaY, int modifiers,
-                                 int lines, int chars,
-                                 int defaultLines, int defaultChars,
-                                 double xMultiplier, double yMultiplier) {
-        notifyScroll(x, y, xAbs, yAbs, deltaX, deltaY,
-                     modifiers, lines, chars,
-                     defaultLines, defaultChars, xMultiplier, yMultiplier);
-    }
-
-    protected void _notifyRepaint(int x, int y, int width, int height) {
-        notifyRepaint(x, y, width, height);
-    }
-
-    protected void _notifyResize(int width, int height) {
-        notifyResize(width, height);
-    }
-
-    protected void _notifyViewEvent(int viewEvent) {
-        notifyView(viewEvent);
-    }
-
-    //DnD
-    protected void _notifyDragEnter(int x, int y, int absx, int absy, int recommendedDropAction) {
-        notifyDragEnter(x, y, absx, absy, recommendedDropAction);
-    }
-    protected void _notifyDragLeave() {
-        notifyDragLeave();
-    }
-    protected void _notifyDragDrop(int x, int y, int absx, int absy, int recommendedDropAction) {
-        notifyDragDrop(x, y, absx, absy, recommendedDropAction);
-    }
-    protected void _notifyDragOver(int x, int y, int absx, int absy, int recommendedDropAction) {
-        notifyDragOver(x, y, absx, absy, recommendedDropAction);
-    }
-
-    //Menu event - i.e context menu hint (usually mouse right click)
-    protected void _notifyMenu(int x, int y, int xAbs, int yAbs, boolean isKeyboardTrigger) {
-        notifyMenu(x, y, xAbs, yAbs, isKeyboardTrigger);
-    }
-
-    @Override
-    protected int _getNativeFrameBuffer(long ptr) {
-        return 0;
-    }
-
-    /**
-     * Native methods
-     */
-
-    @Override
-    protected long _create(Map caps) {
-        this.nativePtr = _createNativeView(caps);
-        return this.nativePtr;
-    }
-
-    private native long _createNativeView(Map caps);
-
-    /**
-    * Assuming this is used to lock the surface for painting
-    */
-    @Override
-    native protected void _begin(long ptr);
-
-    /**
-     * Assuming this is used to unlock the surface after painting is
-     * done
-     */
-    @Override
-    native protected  void _end(long ptr);
-
-
-    @Override
-    native protected void _setParent(long ptr, long parentPtr);
-
-    @Override
-    native protected boolean _close(long ptr);
-
-    @Override
-    native protected boolean _enterFullscreen(long ptr, boolean animate,
-                                              boolean keepRatio,
-                                              boolean hideCursor);
-
-    @Override
-    native protected void _exitFullscreen(long ptr, boolean animate);
-
-    @Override
-    public String toString() {
-        return "LensView[nativePtr=0x" + Long.toHexString(nativePtr) + "]";
-    }
-
-}
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/lens/LensWindow.java	Thu Jun 15 10:32:49 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,436 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui.lens;
-
-import com.sun.glass.events.WindowEvent;
-import com.sun.glass.ui.Application;
-import com.sun.glass.ui.Cursor;
-import com.sun.glass.ui.Pixels;
-import com.sun.glass.ui.Screen;
-import com.sun.glass.ui.View;
-import com.sun.glass.ui.Window;
-import java.util.List;
-
-final class LensWindow extends Window {
-
-    protected LensWindow(Window owner, Screen screen, int styleMask) {
-        super(owner, screen, styleMask);
-    }
-
-    protected LensWindow(long parent) {
-        super(parent);
-
-    }
-
-    @Override
-    protected void _toFront(long ptr) {
-        List<Window> list = getWindowsClone();
-        raiseOwnedWindows(list);
-    }
-
-    @Override
-    protected void _toBack(long ptr) {
-        // for z-order stacking, pop the window
-        // and push it on the head (farthest Z)
-        remove(this);
-        addFirst(this);
-        _toBackImpl(ptr);
-    }
-
-    private void raiseOwnedWindows(List<Window> list) {
-        // raise ourselves to the top of Z-order
-        // by popping the window and push it on the end (closest Z)
-        remove(this);
-        add(this);
-        _toFrontImpl(getRawHandle());
-        // owned windows should be maintained in front of the owner.
-        for (Window w : list) {
-            if (this.equals(w.getOwner())) {
-                ((LensWindow)w).raiseOwnedWindows(list);
-            }
-        }
-    }
-
-    /**
-     *
-     * w/h is the total window width/height including all its
-     * decorations (e.g. title bar). cw/ch is the "client", or
-     * interior width/height. Negative values for w/h/cw/ch are
-     * treated as "not set". For example: setBounds(x, y, xSet,
-     * ySet, 800, 600, -1, -1) will make the window 800x600 pixels.
-     * The client area available for drawing will be smaller, e.g.
-     * 792x580 - it depends on the window decorations on different
-     * platforms. setBounds(x, y, xSet, ySet, -1, -1, 800, 600) will
-     * make the window client size to be 800x600 pixels. The area
-     * for drawing (FX scene size) will be exactly 800x600, but the
-     * total window size including decorations will be slightly
-     * bigger. For undecorated windows w/h and cw/ch are obviously
-     * the same.
-     *
-     * As this is a void function the native code should trigger an
-     * event to notify the system on actual change
-     *
-     */
-    @Override
-    protected void _setBounds(long nativeWindowPointer,
-                              int x, int y, boolean xSet, boolean ySet,
-                              int w, int h, int cw, int ch,
-                              float xGravity, float yGravity) {
-
-        //calculated window dimensions
-        int width;
-        int height;
-
-        //is new window size is the content size or the window size
-        //this required for platforms that support decorations.
-        //if isContentSize == true - width & height are
-        //the window size w/o decorations
-        boolean isContentSize = false;
-
-        //if true window position is also need to be update, else x&y are
-        //to be ignored
-        boolean  needToUpdatePosition = xSet || ySet;
-
-        //if false, only move window
-        boolean needResize = false;
-
-        if (!xSet && !ySet && w < 0 && h < 0 && cw < 0 && ch < 0) {
-            //nothing to do, return
-            return;
-        }
-
-        LensLogger.getLogger().fine("_setBounds x=" + x + " y=" + y + " xSet=" +
-                                    xSet + " ySet=" + ySet + " w=" + w + " h=" +
-                                    h + " cw=" + cw + " ch=" + ch +" xGravity=" +
-                                    xGravity + " yGravity=" + yGravity);
-
-        if (needToUpdatePosition) {
-            if (!xSet) {
-                //no explicit request to change x, get default
-                x = getX();
-            }
-
-            if (!ySet) {
-                //no explicit request to change y, get default
-                y = getY();
-            }
-        }
-
-        if (w > 0) {
-            //window width surpass window content width (cw)
-            width = w;
-            needResize = true;
-        } else if (cw > 0) {
-            //content width changed
-            width = cw;
-            isContentSize = true;
-            needResize = true;
-        } else {
-            //no explicit request to change width, get default
-            width = getWidth();
-        }
-
-        if (h > 0) {
-            //window height surpass window content height(ch)
-            height = h;
-            needResize = true;
-        } else if (cw > 0) {
-            //content height changed
-            height = ch;
-            isContentSize = true;
-            needResize = true;
-        } else {
-            //no explicit request to change height, get default
-            height = getHeight();
-        }
-
-        setBoundsImpl(nativeWindowPointer, x, y, width, height,
-                      needToUpdatePosition, needResize, isContentSize);
-
-
-    }
-
-    @Override
-    native protected long _createWindow(long NativeWindow, long NativeScreen,
-                                        int mask);
-
-    @Override
-    native protected long _createChildWindow(long parent);
-
-    @Override
-    native protected boolean _close(long nativeWindowPointer);
-
-    native private boolean attachViewToWindow(long nativeWindowPointer,
-                                              long nativeViewPointer);
-
-
-    @Override
-    protected boolean _setView(long nativeWindowPointer, View view) {
-        boolean result = false;
-        LensLogger.getLogger().info(
-            "set view " + view + ", visible=" + isVisible());
-        long nativeViewPtr = (view == null) ? 0L : view.getNativeView();
-        result = attachViewToWindow(nativeWindowPointer, nativeViewPtr);
-        if (view != null && result) {
-            // the system assumes a resize notification to set the View
-            // sizes and to get the Scene to layout correctly.
-            ((LensView)view)._notifyResize(getWidth(), getHeight());
-        }
-        return result;
-    }
-
-    /**
-     * Returns the handle used to create a rendering context in Prism
-     */
-    @Override
-    public long getNativeWindow() {
-        return _getNativeWindowImpl(super.getNativeWindow());
-    }
-
-    native private long _getNativeWindowImpl(long ptr);
-
-    @Override
-    //native protected boolean _setMenubar(long ptr, long menubarPtr);
-    protected boolean _setMenubar(long ptr, long menubarPtr) {
-        return true;
-    }
-
-    @Override
-    native protected boolean _minimize(long nativeWindowPointer, boolean minimize);
-
-    @Override
-    native protected boolean _maximize(long nativeWindowPointer, boolean maximize,
-                                       boolean wasMaximized);
-
-    /**
-     * Change the window size and/or position
-     * Change in size may be the window content size w/o decorations
-     * or the total window size
-     *
-     * @param nativeWindowPointer as was created by createWindow()
-     * @param x the position of the window X
-     * @param y the position of the window Y
-     * @param width of window/content
-     * @param height of window/content
-     * @param needToUpdatePostion is x&y are valid, if not resize only
-     * @param needToUpdateSize is width&height are valid, if not only
-     *                     move
-     * @param isContentSize does width&height refer to the content
-     *                      size or the whole window
-     */
-    native private void setBoundsImpl(long nativeWindowPointer,
-                                      int x, int y, int width, int height,
-                                      boolean needToUpdatePostion,
-                                      boolean needToUpdateSize,
-                                      boolean isContentSize);
-
-    @Override
-    native protected boolean _setVisible(long ptr, boolean visible);
-
-    @Override
-    native protected boolean _setResizable(long ptr, boolean resizable);
-
-    @Override
-    native protected boolean _requestFocus(long ptr, int event);
-
-    @Override
-    native protected void _setFocusable(long ptr, boolean isFocusable);
-
-    @Override
-    native protected boolean _setTitle(long ptr, String title);
-
-    @Override
-    native protected void _setLevel(long ptr, int level);
-
-    @Override
-    native protected void _setAlpha(long ptr, float alpha);
-
-    @Override
-    native protected boolean _setBackground(long ptr, float r, float g, float b);
-
-    @Override
-    native protected void _setEnabled(long ptr, boolean enabled);
-
-    @Override
-    native protected boolean _setMinimumSize(long ptr, int width, int height);
-
-    @Override
-    native protected boolean _setMaximumSize(long ptr, int width, int height);
-
-    @Override
-    native protected void _setIcon(long ptr, Pixels pixels);
-
-    native private void _toFrontImpl(long ptr);
-
-    native private void _toBackImpl(long ptr);
-
-    @Override
-    native protected boolean _grabFocus(long ptr);
-
-    @Override
-    native protected void _ungrabFocus(long ptr);
-
-    /**
-     * The functions below are used when the platform support modality natively.
-     * Currently only GTK is using it. This functionality is disabled by
-     * default. In order to enable it this class need to override Window::
<