[java-atk-wrapper] Make J-A-W implement the javax.accessibility.AccessibilityProvider and declare itself as provider of



commit 4c4f59f500e2ddb6287e5c857854c80c53b62be1
Author: Fridrich Štrba <fridrich strba bluewin ch>
Date:   Fri Oct 27 18:16:01 2017 +0200

    Make J-A-W implement the javax.accessibility.AccessibilityProvider and declare itself as provider of this 
service

 configure.ac                                       |  4 ++-
 wrapper/META-INF/Makefile.am                       |  1 +
 wrapper/META-INF/services/Makefile.am              |  1 +
 .../javax.accessibility.AccessibilityProvider      |  1 +
 wrapper/Makefile.am                                |  4 +--
 wrapper/org/GNOME/Accessibility/AtkProvider.java   | 38 ++++++++++++++++++++++
 6 files changed, 46 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index eee4403..31067ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ AC_SUBST(LIB_ATK_WRAPPER_LD_FLAGS)
 # java wrapper
 
 AM_CONDITIONAL(USER, test `whoami` = "root")
-JAVA_REQUIRED=1.7.0
+JAVA_REQUIRED=9.0.0
 JAVA_ERROR_MESSAGE="Java $JAVA_REQUIRED or later is required to build java-access-bridge"
 
 AC_ARG_VAR([JAVA_HOME],[Java Runtime Environment location])
@@ -196,6 +196,8 @@ AC_CONFIG_FILES([
     wrapper/org/GNOME/Makefile
     wrapper/org/GNOME/Accessibility/AtkWrapper.java
     wrapper/org/GNOME/Accessibility/Makefile
+    wrapper/META-INF/Makefile
+    wrapper/META-INF/services/Makefile
 ])
 AC_OUTPUT
 
diff --git a/wrapper/META-INF/Makefile.am b/wrapper/META-INF/Makefile.am
new file mode 100644
index 0000000..8b71ba3
--- /dev/null
+++ b/wrapper/META-INF/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS=services
diff --git a/wrapper/META-INF/services/Makefile.am b/wrapper/META-INF/services/Makefile.am
new file mode 100644
index 0000000..7737a0c
--- /dev/null
+++ b/wrapper/META-INF/services/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = javax.accessibility.AccessibilityProvider
diff --git a/wrapper/META-INF/services/javax.accessibility.AccessibilityProvider 
b/wrapper/META-INF/services/javax.accessibility.AccessibilityProvider
new file mode 100644
index 0000000..c736fbf
--- /dev/null
+++ b/wrapper/META-INF/services/javax.accessibility.AccessibilityProvider
@@ -0,0 +1 @@
+org.GNOME.Accessibility.AtkProvider
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index f328e95..182af4a 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=org
+SUBDIRS=org META-INF
 JARFILES=@JAW_JAR_NAME@
 ALL_CLASSES=org/GNOME/Accessibility/*.class
 DEP_CLASSES=$(wildcard $(ALL_CLASSES))
@@ -12,7 +12,7 @@ EXTRA_DIST = $(properties_DATA) \
             manifest.txt
 
 $(JARFILES) : $(DEP_CLASSES)
-       $(JAR) cfm $(JARFILES) $(srcdir)/manifest.txt org/GNOME/Accessibility/*.class
+       $(JAR) cfm $(JARFILES) $(srcdir)/manifest.txt org/GNOME/Accessibility/*.class -C $(srcdir) 
META-INF/services/javax.accessibility.AccessibilityProvider
 
 install-data-local : all-local
        $(mkinstalldirs) $(DESTDIR)$(propertiesdir) $(DESTDIR)$(java_atk_wrapperdir)
diff --git a/wrapper/org/GNOME/Accessibility/AtkProvider.java 
b/wrapper/org/GNOME/Accessibility/AtkProvider.java
new file mode 100644
index 0000000..5e884f9
--- /dev/null
+++ b/wrapper/org/GNOME/Accessibility/AtkProvider.java
@@ -0,0 +1,38 @@
+/*
+ * Java ATK Wrapper for GNOME
+ * Copyright (C) 2017 Oracle and/or its affiliates.
+ * Copyright (C) 2017 Fridrich Strba <fridrich strba bluewin ch>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+package org.GNOME.Accessibility;
+
+import javax.accessibility.AccessibilityProvider;
+
+public final class AtkProvider extends AccessibilityProvider {
+    private final String name = "org.GNOME.Accessibility.AtkWrapper";
+
+    public AtkProvider() {}
+
+    public String getName() {
+        return name;
+    }
+
+    public void activate() {
+        new AtkWrapper();
+    }
+
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]