/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.gdk;
import org.gnu.glib.Flags;
public class GrabStatus extends Flags 
{
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    static final private int _SUCCESS = 1 << 0;
    static final public org.gnu.gdk.GrabStatus SUCCESS = new org.gnu.gdk.GrabStatus (_SUCCESS);
    static final private int _ALREADY_GRABBED = 1 << 1;
    static final public org.gnu.gdk.GrabStatus ALREADY_GRABBED = new org.gnu.gdk.GrabStatus (
        _ALREADY_GRABBED);
    static final private int _INVALID_TIME = 1 << 2;
    static final public org.gnu.gdk.GrabStatus INVALID_TIME = new org.gnu.gdk.GrabStatus (
        _INVALID_TIME);
    static final private int _NOT_VIEWABLE = 1 << 3;
    static final public org.gnu.gdk.GrabStatus NOT_VIEWABLE = new org.gnu.gdk.GrabStatus (
        _NOT_VIEWABLE);
    static final private int _FROZEN = 1 << 4;
    static final public org.gnu.gdk.GrabStatus FROZEN = new org.gnu.gdk.GrabStatus (_FROZEN);
    static final private org.gnu.gdk.GrabStatus[] theInterned = new org.gnu.gdk.GrabStatus[] 
    {
        new org.gnu.gdk.GrabStatus (0), SUCCESS, ALREADY_GRABBED, new org.gnu.gdk.GrabStatus (3), 
        INVALID_TIME, new org.gnu.gdk.GrabStatus (5), new org.gnu.gdk.GrabStatus (6), new 
        org.gnu.gdk.GrabStatus (7), NOT_VIEWABLE, new org.gnu.gdk.GrabStatus (9), new 
        org.gnu.gdk.GrabStatus (10), new org.gnu.gdk.GrabStatus (11), new org.gnu.gdk.GrabStatus (
            12), new org.gnu.gdk.GrabStatus (13), new org.gnu.gdk.GrabStatus (14), new 
        org.gnu.gdk.GrabStatus (15), FROZEN 
    }

;
    static private java.util.Hashtable theInternedExtras;
    static final private org.gnu.gdk.GrabStatus theSacrificialOne = new org.gnu.gdk.GrabStatus (0);
    static public org.gnu.gdk.GrabStatus intern (int value) 
    {
        if (value < theInterned.length) 
        {
            return theInterned[value];
        }
        theSacrificialOne.value_ = value;
        if (theInternedExtras == null) 
        {
            theInternedExtras = new java.util.Hashtable();
        }
        org.gnu.gdk.GrabStatus already = (org.gnu.gdk.GrabStatus) theInternedExtras.get (
            theSacrificialOne);
        if (already == null) 
        {
            already = new org.gnu.gdk.GrabStatus(value);
            theInternedExtras.put(already, already);
        }
        return already;
    }

    private GrabStatus (int value) 
    {
        value_ = value;
    }

    public org.gnu.gdk.GrabStatus or (org.gnu.gdk.GrabStatus other) 
    {
        return intern(value_ | other.value_);
    }

    public org.gnu.gdk.GrabStatus and (org.gnu.gdk.GrabStatus other) 
    {
        return intern(value_ & other.value_);
    }

    public org.gnu.gdk.GrabStatus xor (org.gnu.gdk.GrabStatus other) 
    {
        return intern(value_ ^ other.value_);
    }

    public boolean test (org.gnu.gdk.GrabStatus other) 
    {
        return (value_ & other.value_) == other.value_;
    }

    /****************************************
     * END OF GENERATED CODE
     ****************************************/
}

