8167213: Re-examine the alternative to deliver include/bridge/AccessBridgeCalls.c
Remove AccessBridgeCalls.c from the include directory Reviewed-by: prr, erikj, mchung, alexsch
This commit is contained in:
parent
b86962aeb8
commit
b968404588
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2104, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2104, 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
|
||||
@ -30,8 +30,7 @@ include CopyCommon.gmk
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.c
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h
|
||||
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/%: \
|
||||
$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/%
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 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
|
||||
@ -71,7 +71,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
$$(eval $$(call SetupNativeCompilation, BUILD_JACCESSINSPECTOR$1, \
|
||||
SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \
|
||||
$(TOPDIR)/toolscommon $(TOPDIR)/include/bridge, \
|
||||
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
|
||||
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
|
||||
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
|
||||
LIBS := advapi32.lib user32.lib, \
|
||||
@ -98,7 +98,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
$$(eval $$(call SetupNativeCompilation,BUILD_JACCESSWALKER$1, \
|
||||
SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \
|
||||
$(TOPDIR)/toolscommon $(TOPDIR)/include/bridge, \
|
||||
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
|
||||
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
|
||||
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
|
||||
LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 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
|
||||
@ -48,7 +48,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
|
||||
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
|
||||
-I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
|
||||
-I$(ROOT_SRCDIR)/include/bridge \
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows, \
|
||||
LIBS := kernel32.lib user32.lib gdi32.lib \
|
||||
@ -78,7 +78,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
|
||||
$(addprefix -I,$(WIN_AB_SRCDIR)) \
|
||||
-I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
|
||||
-I$(ROOT_SRCDIR)/include/bridge \
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows \
|
||||
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
|
||||
|
@ -1,30 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 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.
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* 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).
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 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.
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)AccessBridgeCalls.c 1.25 05/08/22
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* - Neither the name of Oracle nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -40,7 +43,6 @@
|
||||
//#define ACCESSBRIDGE_64
|
||||
|
||||
#include "AccessBridgeCalls.h"
|
||||
#include "AccessBridgeDebug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -52,21 +54,19 @@ extern "C" {
|
||||
BOOL theAccessBridgeInitializedFlag = FALSE;
|
||||
|
||||
#define LOAD_FP(result, type, name) \
|
||||
PrintDebugString("LOAD_FP loading: %s ...", name); \
|
||||
if ((theAccessBridge.result = \
|
||||
(type) GetProcAddress(theAccessBridgeInstance, name)) == (type) 0) { \
|
||||
PrintDebugString("LOAD_FP failed: %s", name); \
|
||||
return FALSE; \
|
||||
}
|
||||
|
||||
BOOL initializeAccessBridge() {
|
||||
|
||||
#ifdef ACCESSBRIDGE_ARCH_32 // For 32bit AT new bridge
|
||||
#ifdef ACCESSBRIDGE_ARCH_32 // For 32 bit AT interfacing with Java on 64 bit OS
|
||||
theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE-32");
|
||||
#else
|
||||
#ifdef ACCESSBRIDGE_ARCH_64 // For 64bit AT new bridge
|
||||
#ifdef ACCESSBRIDGE_ARCH_64 // For 64 bit AT interfacing with Java on 64 bit OS
|
||||
theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE-64");
|
||||
#else // legacy
|
||||
#else // For 32 bit AT interfacing with Java on 32 bit OS
|
||||
theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE");
|
||||
#endif
|
||||
#endif
|
||||
@ -212,7 +212,6 @@ extern "C" {
|
||||
theAccessBridge.Windows_run();
|
||||
|
||||
theAccessBridgeInitializedFlag = TRUE;
|
||||
PrintDebugString("theAccessBridgeInitializedFlag = TRUE");
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -23,10 +23,6 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* AccessBridgeCallbacks.h 1.17 05/03/21
|
||||
*/
|
||||
|
||||
/*
|
||||
* Header file defining callback typedefs for Windows routines
|
||||
* which are called from Java (responding to events, etc.).
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -23,6 +23,25 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* Note: In addition to this header file AccessBridgeCalls.c must be compiled and
|
||||
* linked to your application. AccessBridgeCalls.c implements the Java Access
|
||||
* Bridge API and also hides the complexities associated with interfacing to the
|
||||
* associated Java Access Bridge DLL which is installed when Java is installed.
|
||||
*
|
||||
* AccessBridgeCalls.c is available for download from the OpenJDK repository using
|
||||
* the following link:
|
||||
*
|
||||
* http://hg.openjdk.java.net/jdk9/jdk9/jdk/raw-file/tip/src/jdk.accessibility/windows/native/bridge/AccessBridgeCalls.c
|
||||
*
|
||||
* Also note that the API is used in the jaccessinspector and jaccesswalker tools.
|
||||
* The source for those tools is available in the OpenJDK repository at these links:
|
||||
*
|
||||
* http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp
|
||||
* http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Wrapper functions around calls to the AccessBridge DLL
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user