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

org.lwjgl.system.macosx.EnumerationMutationHandler Maven / Gradle / Ivy

The newest version!
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.system.macosx;

import javax.annotation.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;

/**
 * A mutation handler.
 * 
 * 

Type

* *

 * void (*{@link #invoke}) (
 *     id id
 * )
*/ public abstract class EnumerationMutationHandler extends Callback implements EnumerationMutationHandlerI { /** * Creates a {@code EnumerationMutationHandler} instance from the specified function pointer. * * @return the new {@code EnumerationMutationHandler} */ public static EnumerationMutationHandler create(long functionPointer) { EnumerationMutationHandlerI instance = Callback.get(functionPointer); return instance instanceof EnumerationMutationHandler ? (EnumerationMutationHandler)instance : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @Nullable public static EnumerationMutationHandler createSafe(long functionPointer) { return functionPointer == NULL ? null : create(functionPointer); } /** Creates a {@code EnumerationMutationHandler} instance that delegates to the specified {@code EnumerationMutationHandlerI} instance. */ public static EnumerationMutationHandler create(EnumerationMutationHandlerI instance) { return instance instanceof EnumerationMutationHandler ? (EnumerationMutationHandler)instance : new Container(instance.address(), instance); } protected EnumerationMutationHandler() { super(CIF); } EnumerationMutationHandler(long functionPointer) { super(functionPointer); } private static final class Container extends EnumerationMutationHandler { private final EnumerationMutationHandlerI delegate; Container(long functionPointer, EnumerationMutationHandlerI delegate) { super(functionPointer); this.delegate = delegate; } @Override public void invoke(long id) { delegate.invoke(id); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy