io.qt.gui.rhi.QRhiRenderBuffer Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui.rhi;
import io.qt.*;
/**
* Renderbuffer resource
* Java wrapper for Qt class QRhiRenderBuffer
* This class was introduced in Qt 6.6.
*/
public abstract class QRhiRenderBuffer extends io.qt.gui.rhi.QRhiResource
{
@NativeAccess
private static final class ConcreteWrapper extends QRhiRenderBuffer {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
public io.qt.gui.rhi.QRhiTexture.@NonNull Format backingFormat(){
return io.qt.gui.rhi.QRhiTexture.Format.resolve(backingFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int backingFormat_native_constfct(long __this__nativeId);
@Override
@QtUninvokable
public boolean create(){
return create_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean create_native(long __this__nativeId);
@Override
@QtUninvokable
public void destroy(){
destroy_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void destroy_native(long __this__nativeId);
}
/**
* Java wrapper for Qt enum QRhiRenderBuffer::Flag
*
* @see Flags
*/
public enum Flag implements QtFlagEnumerator {
/**
* Representing QRhiRenderBuffer:: UsedWithSwapChainOnly
*/
UsedWithSwapChainOnly(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 UsedWithSwapChainOnly;
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());
}
}
/**
* Java wrapper for Qt enum QRhiRenderBuffer::Type
*/
public enum Type implements QtEnumerator {
/**
* Representing QRhiRenderBuffer:: DepthStencil
*/
DepthStencil(0),
/**
* Representing QRhiRenderBuffer:: Color
*/
Color(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private Type(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Type resolve(int value) {
switch (value) {
case 0: return DepthStencil;
case 1: return Color;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Wraps a native renderbuffer object
* Java wrapper for Qt class QRhiRenderBuffer::NativeRenderBuffer
*/
public static class NativeRenderBuffer extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QRhiRenderBuffer::NativeRenderBuffer:: NativeRenderBuffer()
*/
public NativeRenderBuffer(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(NativeRenderBuffer instance);
/**
* See QRhiRenderBuffer::NativeRenderBuffer:: NativeRenderBuffer(QRhiRenderBuffer::NativeRenderBuffer)
*/
public NativeRenderBuffer(io.qt.gui.rhi.QRhiRenderBuffer.@StrictNonNull NativeRenderBuffer other){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
initialize_native(this, other);
}
private native static void initialize_native(NativeRenderBuffer instance, io.qt.gui.rhi.QRhiRenderBuffer.NativeRenderBuffer other);
/**
* See QRhiRenderBuffer::NativeRenderBuffer:: NativeRenderBuffer{quint64}
*/
public NativeRenderBuffer(long object){
super((QPrivateConstructor)null);
initialize_native(this, object);
}
private native static void initialize_native(NativeRenderBuffer instance, long object);
/**
* 64-bit integer containing the native object handle
* See QRhiRenderBuffer::NativeRenderBuffer:: object
*/
@QtUninvokable
public final void setObject(long object){
setObject_native_quint64(QtJambi_LibraryUtilities.internal.nativeId(this), object);
}
@QtUninvokable
private native void setObject_native_quint64(long __this__nativeId, long object);
/**
* 64-bit integer containing the native object handle
* See QRhiRenderBuffer::NativeRenderBuffer:: object
*/
@QtUninvokable
public final long object(){
return object_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long object_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected NativeRenderBuffer(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QRhiRenderBuffer::NativeRenderBuffer:: NativeRenderBuffer(QRhiRenderBuffer::NativeRenderBuffer)
*/
@QtUninvokable
@Override
public NativeRenderBuffer clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native NativeRenderBuffer clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #object()} instead.
*/
@QtUninvokable
public final long getObject() {
return object();
}
}
/**
* See QRhiRenderBuffer:: flags()const
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiRenderBuffer.@NonNull Flags flags(){
return new io.qt.gui.rhi.QRhiRenderBuffer.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QRhiRenderBuffer:: pixelSize()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QSize pixelSize(){
return pixelSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize pixelSize_native_constfct(long __this__nativeId);
/**
* See QRhiRenderBuffer:: sampleCount()const
*/
@QtUninvokable
public final int sampleCount(){
return sampleCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int sampleCount_native_constfct(long __this__nativeId);
/**
* See QRhiRenderBuffer:: setFlags(QRhiRenderBuffer::Flags)
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiRenderBuffer.@NonNull Flags f){
setFlags_native_QRhiRenderBuffer_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), f.value());
}
@QtUninvokable
private native void setFlags_native_QRhiRenderBuffer_Flags(long __this__nativeId, int f);
/**
* See QRhiRenderBuffer:: setPixelSize(QSize)
*/
@QtUninvokable
public final void setPixelSize(io.qt.core.@NonNull QSize sz){
setPixelSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sz));
}
@QtUninvokable
private native void setPixelSize_native_cref_QSize(long __this__nativeId, long sz);
/**
* See QRhiRenderBuffer:: setSampleCount(int)
*/
@QtUninvokable
public final void setSampleCount(int s){
setSampleCount_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), s);
}
@QtUninvokable
private native void setSampleCount_native_int(long __this__nativeId, int s);
/**
* See QRhiRenderBuffer:: setType(QRhiRenderBuffer::Type)
*/
@QtUninvokable
public final void setType(io.qt.gui.rhi.QRhiRenderBuffer.@NonNull Type t){
setType_native_QRhiRenderBuffer_Type(QtJambi_LibraryUtilities.internal.nativeId(this), t.value());
}
@QtUninvokable
private native void setType_native_QRhiRenderBuffer_Type(long __this__nativeId, int t);
/**
* See QRhiRenderBuffer:: type()const
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiRenderBuffer.@NonNull Type type(){
return io.qt.gui.rhi.QRhiRenderBuffer.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int type_native_constfct(long __this__nativeId);
/**
* See QRhiRenderBuffer:: backingFormat()const
*/
@QtUninvokable
public abstract io.qt.gui.rhi.QRhiTexture.@NonNull Format backingFormat();
@QtUninvokable
private native int backingFormat_native_constfct(long __this__nativeId);
/**
* See QRhiRenderBuffer:: create()
*/
@QtUninvokable
public abstract boolean create();
@QtUninvokable
private native boolean create_native(long __this__nativeId);
/**
* See QRhiRenderBuffer:: createFrom(QRhiRenderBuffer::NativeRenderBuffer)
*/
@QtUninvokable
public boolean createFrom(io.qt.gui.rhi.QRhiRenderBuffer.@NonNull NativeRenderBuffer src){
return createFrom_native_QRhiRenderBuffer_NativeRenderBuffer(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(src));
}
@QtUninvokable
private native boolean createFrom_native_QRhiRenderBuffer_NativeRenderBuffer(long __this__nativeId, long src);
/**
* See QRhiResource:: resourceType()const
*/
@QtUninvokable
@Override
public io.qt.gui.rhi.QRhiResource.@NonNull Type resourceType(){
return io.qt.gui.rhi.QRhiResource.Type.resolve(resourceType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int resourceType_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QRhiRenderBuffer(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #setFlags(io.qt.gui.rhi.QRhiRenderBuffer.Flags)}.
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiRenderBuffer.@NonNull Flag @NonNull... f) {
setFlags(new io.qt.gui.rhi.QRhiRenderBuffer.Flags(f));
}
/**
* Overloaded function for {@link #createFrom(io.qt.gui.rhi.QRhiRenderBuffer.NativeRenderBuffer)}.
*/
@QtUninvokable
public final boolean createFrom(long src) {
return createFrom(new io.qt.gui.rhi.QRhiRenderBuffer.NativeRenderBuffer(src));
}
}