org.lwjgl.util.yoga.YGMeasureFuncI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-yoga Show documentation
Show all versions of lwjgl-yoga Show documentation
An open-source, cross-platform layout library that implements Flexbox.
The newest version!
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.util.yoga;
import org.lwjgl.system.*;
import org.lwjgl.system.libffi.*;
import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.libffi.LibFFI.*;
/**
* Type
*
*
* YGSize (*{@link #invoke}) (
* YGNodeConstRef node,
* float width,
* YGMeasureMode widthMode,
* float height,
* YGMeasureMode heightMode
* )
*/
@FunctionalInterface
@NativeType("YGMeasureFunc")
public interface YGMeasureFuncI extends CallbackI {
FFICIF CIF = apiCreateCIF(
FFI_DEFAULT_ABI,
apiCreateStruct(ffi_type_float, ffi_type_float),
ffi_type_pointer, ffi_type_float, ffi_type_uint32, ffi_type_float, ffi_type_uint32
);
@Override
default FFICIF getCallInterface() { return CIF; }
@Override
default void callback(long ret, long args) {
invoke(
memGetAddress(memGetAddress(args)),
memGetFloat(memGetAddress(args + POINTER_SIZE)),
memGetInt(memGetAddress(args + 2 * POINTER_SIZE)),
memGetFloat(memGetAddress(args + 3 * POINTER_SIZE)),
memGetInt(memGetAddress(args + 4 * POINTER_SIZE)),
YGSize.create(ret)
);
}
/**
* Returns the computed dimensions of the node, following the constraints of {@code widthMode} and {@code heightMode}:
*
* {@link Yoga#YGMeasureModeUndefined MeasureModeUndefined}: The parent has not imposed any constraint on the child. It can be whatever size it wants.
*
* {@link Yoga#YGMeasureModeAtMost MeasureModeAtMost}: The child can be as large as it wants up to the specified size.
*
* {@link Yoga#YGMeasureModeExactly MeasureModeExactly}: The parent has determined an exact size for the child. The child is going to be given those bounds regardless of how big it wants
* to be.
*/
void invoke(@NativeType("YGNodeConstRef") long node, float width, @NativeType("YGMeasureMode") int widthMode, float height, @NativeType("YGMeasureMode") int heightMode, YGSize __result);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy