org.gnome.gtk.BuilderClosureFlags Maven / Gradle / Ivy
// This file was automatically generated by Java-GI. Do not edit this file
// directly! Visit for more information.
//
// The API documentation in this file was derived from GObject-Introspection
// metadata and may include text or comments from the original C sources.
//
// Copyright (c), upstream authors as identified in the GObject-Introspection
// metadata.
//
// This generated file is distributed under the same license as the original
// GObject-Introspection data, unless otherwise specified. Users of this file
// are responsible for complying with any licenses or terms required by the
// original authors.
//
// THIS FILE 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.
//
package org.gnome.gtk;
import io.github.jwharm.javagi.base.Enumeration;
import io.github.jwharm.javagi.interop.Interop;
import java.lang.IllegalStateException;
import java.lang.Override;
import javax.annotation.processing.Generated;
import org.gnome.glib.Type;
/**
* The list of flags that can be passed to gtk_builder_create_closure().
*
* New values may be added in the future for new features, so external
* implementations of {@link BuilderScope} should test the flags
* for unknown values and raise a {@link org.gnome.gtk.BuilderError#INVALID_ATTRIBUTE} error
* when they encounter one.
*/
@Generated("io.github.jwharm.JavaGI")
public enum BuilderClosureFlags implements Enumeration {
/**
* The closure should be created swapped. See
* g_cclosure_new_swap() for details.
*/
SWAPPED(1);
static {
Gtk.javagi$ensureInitialized();
}
private final int value;
/**
* Create a new BuilderClosureFlags for the provided value
*
* @param value the bitfield value
*/
private BuilderClosureFlags(int value) {
this.value = value;
}
/**
* Create a new BuilderClosureFlags for the provided value
*
* @param value the bitfield value
* @return the bitfield for the provided value
*/
public static BuilderClosureFlags of(int value) {
return switch(value) {
case 1 -> SWAPPED;
default -> throw new IllegalStateException("Unexpected value: " + value);
} ;
}
/**
* Get the numeric value of this enum
*
* @return the enum value
*/
@Override
public int getValue() {
return value;
}
/**
* Get the GType of the BuilderClosureFlags class
*
* @return the GType
*/
public static Type getType() {
return Interop.getType("gtk_builder_closure_flags_get_type");
}
}