jdk/src/solaris/classes/sun/awt/X11/XUtilConstants.java
author yan
Mon, 06 Oct 2008 16:45:00 +0400
changeset 1966 12a51fb0db0d
parent 439 3488710b02f8
child 5506 202f599c92aa
permissions -rw-r--r--
5100701: Toolkit.getLockingKeyState() does not work on XToolkit, but works on Motif Summary: Does not work on Motif but works on XToolkit now; implemented using XQueryPointer. Reviewed-by: anthony
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
439
3488710b02f8 6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents: 2
diff changeset
     2
 * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.awt.X11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
439
3488710b02f8 6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents: 2
diff changeset
    28
final public class XUtilConstants {
3488710b02f8 6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents: 2
diff changeset
    29
3488710b02f8 6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents: 2
diff changeset
    30
    private XUtilConstants(){}
3488710b02f8 6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents: 2
diff changeset
    31
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
     * Bitmask returned by XParseGeometry().  Each bit tells if the corresponding
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
     * value (x, y, width, height) was found in the parsed string.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    public static final int NoValue = 0x0000 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    public static final int XValue = 0x0001 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    public static final int YValue = 0x0002 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    public static final int WidthValue = 0x0004 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    public static final int HeightValue = 0x0008 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    public static final int AllValues = 0x000F ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    public static final int XNegative = 0x0010 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    public static final int YNegative = 0x0020 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
     * The next block of definitions are for window manager properties that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     * clients and applications use for communication.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    /* flags argument in size hints */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    public static final long USPosition = 1L << 0; /* user specified x, y */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    public static final long USSize = 1L << 1; /* user specified width, height */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    public static final long PPosition = 1L << 2; /* program specified position */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    public static final long PSize = 1L << 3; /* program specified size */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    public static final long PMinSize = 1L << 4; /* program specified minimum size */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    public static final long PMaxSize = 1L << 5; /* program specified maximum size */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    public static final long PResizeInc = 1L << 6; /* program specified resize increments */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    public static final long PAspect = 1L << 7; /* program specified min and max aspect ratios */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    public static final long PBaseSize = 1L << 8; /* program specified base for incrementing */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    public static final long PWinGravity = 1L << 9; /* program specified window gravity */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    /* obsolete */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    public static final long PAllHints = (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    /* definition for flags of XWMHints */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public static final long InputHint = 1L << 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    public static final long StateHint = 1L << 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public static final long IconPixmapHint = 1L << 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    public static final long IconWindowHint = 1L << 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    public static final long IconPositionHint = 1L << 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    public static final long IconMaskHint = 1L << 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    public static final long WindowGroupHint = 1L << 6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    public static final long AllHints = (InputHint|StateHint|IconPixmapHint|IconWindowHint|
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        IconPositionHint|IconMaskHint|WindowGroupHint);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    public static final long XUrgencyHint = 1L << 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    /* definitions for initial window state */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    public static final int WithdrawnState = 0 ; /* for windows that are not mapped */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    public static final int NormalState = 1 ; /* most applications want to start this way */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    public static final int IconicState = 3 ; /* application wants to start as an icon */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * Obsolete states no longer defined by ICCCM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    public static final int DontCareState = 0 ; /* don't know or care */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    public static final int ZoomState = 2 ; /* application wants to start zoomed */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    /* application believes it is seldom used; some wm's may put it on inactive menu */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public static final int InactiveState = 4 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    public static final int XNoMemory = -1 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    public static final int XLocaleNotSupported = -2 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    public static final int XConverterNotFound = -3 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    /* Return values from XRectInRegion() */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    public static final int RectangleOut = 0 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    public static final int RectangleIn = 1 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    public static final int RectanglePart = 2 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * Information used by the visual utility routines to find desired visual
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * type from the many visuals a display may support.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    public static final int VisualNoMask = 0x0 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    public static final int VisualIDMask = 0x1 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    public static final int VisualScreenMask = 0x2 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    public static final int VisualDepthMask = 0x4 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    public static final int VisualClassMask = 0x8 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    public static final int VisualRedMaskMask = 0x10 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    public static final int VisualGreenMaskMask = 0x20 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    public static final int VisualBlueMaskMask = 0x40 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    public static final int VisualColormapSizeMask = 0x80 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    public static final int VisualBitsPerRGBMask = 0x100 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    public static final int VisualAllMask = 0x1FF ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * return codes for XReadBitmapFile and XWriteBitmapFile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    public static final int BitmapSuccess = 0 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    public static final int BitmapOpenFailed = 1 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    public static final int BitmapFileInvalid = 2 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    public static final int BitmapNoMemory = 3 ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    /****************************************************************
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * Context Management
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     ****************************************************************
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    /* Associative lookup table return codes */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    public static final int XCSUCCESS = 0 ; /* No error. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    public static final int XCNOMEM = 1 ; /* Out of memory */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    public static final int XCNOENT = 2 ; /* No entry in table */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    // typedef int XContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
}