8213213: Remove src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h
Reviewed-by: serb
This commit is contained in:
parent
6168452b9f
commit
5fa252a52c
@ -1,5 +1,3 @@
|
|||||||
// This is a generated file: do not edit! Edit keysym2ucs.h if necessary.
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
@ -25,6 +23,19 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file was originally generated by a tool that embedded much of
|
||||||
|
* an X11 keysym header file, keysym2ucs.h, turned into a Java program,
|
||||||
|
* and which also consumed an UnicodeData.txt database file.
|
||||||
|
* keysym2ucs.h and a genhash.awk script were checked in alongside this
|
||||||
|
* source file. Maintaining the Java program to match updated versions
|
||||||
|
* of keysym2ucs.h is too burdensome, since it is rarely, needed and any
|
||||||
|
* updates will be minimal, so they have been removed and
|
||||||
|
* this file can now be hand maintained. If it ever becomes necessary
|
||||||
|
* to re-generate it, then the deleted files can be recovered from
|
||||||
|
* the history.
|
||||||
|
*/
|
||||||
|
|
||||||
package sun.awt.X11;
|
package sun.awt.X11;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import jdk.internal.misc.Unsafe;
|
import jdk.internal.misc.Unsafe;
|
||||||
@ -33,15 +44,6 @@ import sun.util.logging.PlatformLogger;
|
|||||||
|
|
||||||
public class XKeysym {
|
public class XKeysym {
|
||||||
|
|
||||||
public static void main( String[] args ) {
|
|
||||||
System.out.println( "Cyrillc zhe:"+convertKeysym(0x06d6, 0));
|
|
||||||
System.out.println( "Arabic sheen:"+convertKeysym(0x05d4, 0));
|
|
||||||
System.out.println( "Latin a breve:"+convertKeysym(0x01e3, 0));
|
|
||||||
System.out.println( "Latin f:"+convertKeysym(0x066, 0));
|
|
||||||
System.out.println( "Backspace:"+Integer.toHexString(convertKeysym(0xff08, 0)));
|
|
||||||
System.out.println( "Ctrl+f:"+Integer.toHexString(convertKeysym(0x066, XConstants.ControlMask)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private XKeysym() {}
|
private XKeysym() {}
|
||||||
|
|
||||||
static class Keysym2JavaKeycode {
|
static class Keysym2JavaKeycode {
|
||||||
@ -71,7 +73,7 @@ public class XKeysym {
|
|||||||
static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
|
static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
|
||||||
static Keysym2JavaKeycode kanaLock = new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_KANA_LOCK,
|
static Keysym2JavaKeycode kanaLock = new Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_KANA_LOCK,
|
||||||
java.awt.event.KeyEvent.KEY_LOCATION_STANDARD);
|
java.awt.event.KeyEvent.KEY_LOCATION_STANDARD);
|
||||||
private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
|
private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.key.XKeysym");
|
||||||
public static char convertKeysym( long ks, int state ) {
|
public static char convertKeysym( long ks, int state ) {
|
||||||
|
|
||||||
/* First check for Latin-1 characters (1:1 mapping) */
|
/* First check for Latin-1 characters (1:1 mapping) */
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
# Copyright (c) 2008, 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.
|
|
||||||
#
|
|
||||||
# With this script one can generate a new version XKeysym.java file out
|
|
||||||
# of keysym2ucs.h prototype and UnicodeData.txt database.
|
|
||||||
# Latter file should be fetched from a unicode.org site, most
|
|
||||||
# probably http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
|
|
||||||
#
|
|
||||||
BEGIN { FS=";";
|
|
||||||
while((getline < "UnicodeData.txt")){
|
|
||||||
unic[$1]=$2;
|
|
||||||
}
|
|
||||||
FS=" ";
|
|
||||||
print("// This is a generated file: do not edit! Edit keysym2ucs.h if necessary.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/^0x/{
|
|
||||||
if( $1 != "0x0000" ) {
|
|
||||||
ndx = toupper($1);
|
|
||||||
sub(/0X/, "", ndx);
|
|
||||||
printf(" keysym2UCSHash.put( (long)%s, (char)%s); // %s -->%s\n",
|
|
||||||
$4, $1, $3, (unic[ndx]=="" ? "" : " " unic[ndx]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/tojava/ { sub(/tojava /, ""); sub(/tojava$/, ""); print}
|
|
File diff suppressed because it is too large
Load Diff
@ -33,55 +33,4 @@ not be used in advertising or otherwise to promote the sale, use or
|
|||||||
other dealings in this Software without prior written authorization
|
other dealings in this Software without prior written authorization
|
||||||
from the X Consortium.
|
from the X Consortium.
|
||||||
|
|
||||||
_____________________________
|
|
||||||
|
|
||||||
Copyright notice in keysym2ucs.h:
|
|
||||||
|
|
||||||
Copyright 1987, 1994, 1998 The Open Group
|
|
||||||
|
|
||||||
Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
the above copyright notice appear in all copies and that both that
|
|
||||||
copyright notice and this permission notice appear in supporting
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of The Open Group shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from The Open Group.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
|
|
||||||
|
|
||||||
All Rights Reserved
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software and its
|
|
||||||
documentation for any purpose and without fee is hereby granted,
|
|
||||||
provided that the above copyright notice appear in all copies and that
|
|
||||||
both that copyright notice and this permission notice appear in
|
|
||||||
supporting documentation, and that the name of Digital not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the
|
|
||||||
software without specific, written prior permission.
|
|
||||||
|
|
||||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
||||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
||||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user