
org.lwjgl.nuklear.NkCommandCustomCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-nuklear Show documentation
Show all versions of lwjgl-nuklear Show documentation
A minimal state immediate mode graphical user interface toolkit.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.nuklear;
import org.lwjgl.system.*;
import static org.lwjgl.system.MemoryUtil.*;
public abstract class NkCommandCustomCallback extends Callback implements NkCommandCustomCallbackI {
/** Creates a {@code NkCommandCustomCallback} instance from the specified function pointer. */
public static NkCommandCustomCallback create(long functionPointer) {
if (functionPointer == NULL) {
return null;
}
NkCommandCustomCallbackI instance = Callback.get(functionPointer);
return instance instanceof NkCommandCustomCallback
? (NkCommandCustomCallback)instance
: new Container(functionPointer, instance);
}
/** Creates a {@code NkCommandCustomCallback} instance that delegates to the specified {@code NkCommandCustomCallbackI} instance. */
public static NkCommandCustomCallback create(NkCommandCustomCallbackI instance) {
return instance instanceof NkCommandCustomCallback
? (NkCommandCustomCallback)instance
: new Container(instance.address(), instance);
}
protected NkCommandCustomCallback() {
super(SIGNATURE);
}
private NkCommandCustomCallback(long functionPointer) {
super(functionPointer);
}
private static final class Container extends NkCommandCustomCallback {
private final NkCommandCustomCallbackI delegate;
Container(long functionPointer, NkCommandCustomCallbackI delegate) {
super(functionPointer);
this.delegate = delegate;
}
@Override
public long invoke(long canvas, short x, short y, short w, short h, long callback_data) {
return delegate.invoke(canvas, x, y, w, h, callback_data);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy