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