All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.gui.rhi.QShaderVersion Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.gui.rhi;

import io.qt.*;


/**
 * 

Specifies the shading language version

*

Java wrapper for Qt class QShaderVersion

*

This class was introduced in Qt 6.6.

*/ public class QShaderVersion extends QtObject implements java.lang.Comparable, java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QShaderVersion::Flag

* * @see Flags */ public enum Flag implements QtFlagEnumerator { /** *

Representing QShaderVersion::GlslEs

*/ GlslEs(1); static { QtJambi_LibraryUtilities.initialize(); } private Flag(int value) { this.value = value; } /** * {@inheritDoc} */ @Override public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ @Override public @NonNull Flags asFlags() { return new Flags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull Flags combined(@NonNull Flag e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull Flags cleared(@NonNull Flag e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link Flags} from the entries. * @param values entries * @return new flag */ public static @NonNull Flags flags(@Nullable Flag @NonNull... values) { return new Flags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Flag resolve(int value) { switch (value) { case 1: return GlslEs; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link Flag} */ public static final class Flags extends QFlags implements Comparable { private static final long serialVersionUID = 0x92d9bce6c929c1c6L; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new Flags where the flags in args are set. * @param args enum entries */ public Flags(@Nullable Flag @NonNull... args){ super(args); } /** * Creates a new Flags with given value. * @param value */ public Flags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new Flags */ @Override public final @NonNull Flags combined(@StrictNonNull Flag e){ return new Flags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ @Override public final @NonNull Flags setFlag(@Nullable Flag e){ return setFlag(e, true); } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ @Override public final @NonNull Flags setFlag(@Nullable Flag e, boolean on){ if (on) { setValue(value() | e.value()); }else { setValue(value() & ~e.value()); } return this; } /** * Returns an array of flag objects represented by this Flags. * @return array of enum entries */ @Override public final @NonNull Flag @NonNull[] flags(){ return super.flags(Flag.values()); } /** * {@inheritDoc} */ @Override public final @NonNull Flags clone(){ return new Flags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull Flags other){ return Integer.compare(value(), other.value()); } } /** *

See QShaderVersion::QShaderVersion()

*/ public QShaderVersion(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QShaderVersion instance); /** *

See QShaderVersion::QShaderVersion(QShaderVersion)

*/ public QShaderVersion(io.qt.gui.rhi.@StrictNonNull QShaderVersion other){ super((QPrivateConstructor)null); java.util.Objects.requireNonNull(other, "Argument 'other': null not expected."); initialize_native(this, other); } private native static void initialize_native(QShaderVersion instance, io.qt.gui.rhi.QShaderVersion other); /** *

See QShaderVersion::QShaderVersion(int,QShaderVersion::Flags)

*/ public QShaderVersion(int v, io.qt.gui.rhi.QShaderVersion.@NonNull Flags f){ super((QPrivateConstructor)null); initialize_native(this, v, f); } private native static void initialize_native(QShaderVersion instance, int v, io.qt.gui.rhi.QShaderVersion.Flags f); /** *

See QShaderVersion::flags()const

*/ @QtUninvokable public final io.qt.gui.rhi.QShaderVersion.@NonNull Flags flags(){ return new io.qt.gui.rhi.QShaderVersion.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int flags_native_constfct(long __this__nativeId); /** *

See operator<(QShaderVersion,QShaderVersion)

*/ @QtUninvokable private final boolean operator_less(io.qt.gui.rhi.@StrictNonNull QShaderVersion rhs){ java.util.Objects.requireNonNull(rhs, "Argument 'rhs': null not expected."); return operator_less_native_cref_QShaderVersion(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean operator_less_native_cref_QShaderVersion(long __this__nativeId, long rhs); /** *

See operator==(QShaderVersion,QShaderVersion)

*/ @QtUninvokable public final boolean equals(io.qt.gui.rhi.@StrictNonNull QShaderVersion rhs){ java.util.Objects.requireNonNull(rhs, "Argument 'rhs': null not expected."); return equals_native_cref_QShaderVersion(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean equals_native_cref_QShaderVersion(long __this__nativeId, long rhs); /** *

See QShaderVersion::setFlags(QShaderVersion::Flags)

*/ @QtUninvokable public final void setFlags(io.qt.gui.rhi.QShaderVersion.@NonNull Flags f){ setFlags_native_QShaderVersion_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), f.value()); } @QtUninvokable private native void setFlags_native_QShaderVersion_Flags(long __this__nativeId, int f); /** *

See QShaderVersion::setVersion(int)

*/ @QtUninvokable public final void setVersion(int v){ setVersion_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), v); } @QtUninvokable private native void setVersion_native_int(long __this__nativeId, int v); /** *

See QShaderVersion::version()const

*/ @QtUninvokable public final int version(){ return version_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int version_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QShaderVersion(QPrivateConstructor p) { super(p); } /** *

See operator==(QShaderVersion,QShaderVersion)

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other==null || other instanceof io.qt.gui.rhi.QShaderVersion) { return equals((io.qt.gui.rhi.QShaderVersion) other); } return false; } /** *

See operator<(QShaderVersion,QShaderVersion)

*/ @QtUninvokable public int compareTo(io.qt.gui.rhi.@StrictNonNull QShaderVersion other) { if (equals(other)) return 0; else if (operator_less(other)) return -1; else return 1; } /** * Returns the objects's hash code computed by qHash(QShaderVersion). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** *

See operator<<(QDebug,QShaderVersion)

*/ @QtUninvokable @Override public @NonNull String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private static native String toString_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QShaderVersion::QShaderVersion(QShaderVersion)

*/ @QtUninvokable @Override public QShaderVersion clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QShaderVersion clone_native(long __this_nativeId); /** *

Overloaded constructor for {@link #QShaderVersion(int, io.qt.gui.rhi.QShaderVersion.Flags)} * with f = new io.qt.gui.rhi.QShaderVersion.Flags(0).

*/ public QShaderVersion(int v) { this(v, new io.qt.gui.rhi.QShaderVersion.Flags(0)); } /** *

Overloaded constructor for {@link #QShaderVersion(int, io.qt.gui.rhi.QShaderVersion.Flags)}.

*/ public QShaderVersion(int v, io.qt.gui.rhi.QShaderVersion.@NonNull Flag @NonNull... f) { this(v, new io.qt.gui.rhi.QShaderVersion.Flags(f)); } /** *

Overloaded function for {@link #operator_less(io.qt.gui.rhi.QShaderVersion)}.

*/ @QtUninvokable private final boolean operator_less(int rhs) { return operator_less(new io.qt.gui.rhi.QShaderVersion(rhs)); } /** *

Overloaded function for {@link #equals(io.qt.gui.rhi.QShaderVersion)}.

*/ @QtUninvokable public final boolean equals(int rhs) { return equals(new io.qt.gui.rhi.QShaderVersion(rhs)); } /** *

Overloaded function for {@link #setFlags(io.qt.gui.rhi.QShaderVersion.Flags)}.

*/ @QtUninvokable public final void setFlags(io.qt.gui.rhi.QShaderVersion.@NonNull Flag @NonNull... f) { setFlags(new io.qt.gui.rhi.QShaderVersion.Flags(f)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy