/*
 * 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.Enum;
public class CrossingMode extends Enum 
{
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    static final private int _NORMAL = 0;
    static final public org.gnu.gdk.CrossingMode NORMAL = new org.gnu.gdk.CrossingMode (_NORMAL);
    static final private int _GRAB = 1;
    static final public org.gnu.gdk.CrossingMode GRAB = new org.gnu.gdk.CrossingMode (_GRAB);
    static final private int _UNGRAB = 2;
    static final public org.gnu.gdk.CrossingMode UNGRAB = new org.gnu.gdk.CrossingMode (_UNGRAB);
    static final private org.gnu.gdk.CrossingMode[] theInterned = new org.gnu.gdk.CrossingMode[] 
    {
        NORMAL, GRAB, UNGRAB 
    }

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

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

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

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

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

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

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

