diff --git a/README.md b/README.md index 4ffef95..809517d 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This lets you add the dependencies in your project whatever the JDK used, and st | Plugin | Format | Read | Write | Metadata | TwelveMonkeys Tests | Notes | |----------------------|----------------------------------------------------------------------------------------------------------------------|------|-------|----------|---------------------|------------------------------------| | [jxl](imageio-jxl) | [Jpeg XL](https://jpeg.org/jpegxl/) | ✔ | - | - | ✔ | See limitations in the plugin page | -| [webp](imageio-webp) | [WebP](https://developers.google.com/speed/webp) | ✔ | - | - | ✔ | See limitations in the plugin page | +| [webp](imageio-webp) | [WebP](https://developers.google.com/speed/webp) | ✔ | ✔ | - | ✔ | See limitations in the plugin page | | [heif](imageio-heif) | [HEIF](https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format) & [AVIF](https://en.wikipedia.org/wiki/AVIF) | ✔ | - | - | ✔ | See limitations in the plugin page | When possible, the plugins will use the extensive test suite diff --git a/gradle.properties b/gradle.properties index aef125e..de652db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=1.0.0 +version=1.1.0 diff --git a/imageio-common/src/testFixtures/java/com/github/gotson/nightmonkeys/common/imageio/NoOpImageWriterAbstractTest.java b/imageio-common/src/testFixtures/java/com/github/gotson/nightmonkeys/common/imageio/NoOpImageWriterAbstractTest.java new file mode 100644 index 0000000..6d6a889 --- /dev/null +++ b/imageio-common/src/testFixtures/java/com/github/gotson/nightmonkeys/common/imageio/NoOpImageWriterAbstractTest.java @@ -0,0 +1,61 @@ +package com.github.gotson.nightmonkeys.common.imageio; + +import org.apache.commons.collections4.IteratorUtils; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import java.io.IOException; +import java.net.URL; +import java.util.*; +import java.util.stream.StreamSupport; + +import static org.assertj.core.api.Assertions.assertThat; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +public abstract class NoOpImageWriterAbstractTest { + protected abstract List getFormatNames(); + + protected abstract List getSuffixes(); + + protected abstract List getMIMETypes(); + + @BeforeAll + public void printInformation() throws IOException { + System.out.println("java.version: " + System.getProperty("java.version")); + System.out.println("java.library.path: " + System.getProperty("java.library.path")); + Enumeration spiFiles = ClassLoader.getSystemResources("META-INF/services/javax.imageio.spi.ImageWriterSpi"); + Spliterator spliterator = Spliterators.spliteratorUnknownSize(IteratorUtils.asIterator(spiFiles), Spliterator.ORDERED); + StreamSupport.stream(spliterator, false).forEachOrdered(x -> System.out.println("SPI File: " + x)); + } + + @ParameterizedTest + @MethodSource("getFormatNames") + public void testWriterIsNotRegisteredByFormatName(String formatName) { + ArrayList writers = new ArrayList<>(); + ImageIO.getImageWritersByFormatName(formatName).forEachRemaining(writers::add); + + assertThat(writers).isEmpty(); + } + + @ParameterizedTest + @MethodSource("getSuffixes") + public void testWriterIsNotRegisteredBySuffix(String suffix) { + ArrayList writers = new ArrayList<>(); + ImageIO.getImageWritersBySuffix(suffix).forEachRemaining(writers::add); + + assertThat(writers).isEmpty(); + } + + @ParameterizedTest + @MethodSource("getMIMETypes") + public void testWriterIsNotRegisteredByMIMEType(String mimeType) { + ArrayList writers = new ArrayList<>(); + ImageIO.getImageWritersByMIMEType(mimeType).forEachRemaining(writers::add); + + assertThat(writers).isEmpty(); + } +} diff --git a/imageio-common/src/testFixtures/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java b/imageio-common/src/testFixtures/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java new file mode 100644 index 0000000..16e4e5e --- /dev/null +++ b/imageio-common/src/testFixtures/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java @@ -0,0 +1,372 @@ +/* + * Copyright (c) 2008, Harald Kuhr + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.twelvemonkeys.imageio.util; + +import com.twelvemonkeys.imageio.stream.URLImageInputStreamSpi; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.mockito.InOrder; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.event.IIOWriteProgressListener; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageWriterSpi; +import javax.imageio.stream.ImageOutputStream; +import java.awt.*; +import java.awt.image.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.lang.reflect.ParameterizedType; +import java.net.URL; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS; +import static org.mockito.Mockito.*; + +/** + * ImageReaderAbstractTestCase class description. + * + * @author Harald Kuhr + * @author last modified by $Author: haku $ + * @version $Id: ImageReaderAbstractTestCase.java,v 1.0 18.nov.2004 17:38:33 haku Exp $ + */ +@TestInstance(PER_CLASS) +public abstract class ImageWriterAbstractTest { + + // TODO: Move static block + getClassLoaderResource to common superclass for reader/writer test cases or delegate. + + static { + IIORegistry.getDefaultInstance().registerServiceProvider(new URLImageInputStreamSpi()); + ImageIO.setUseCache(false); + } + + @SuppressWarnings("unchecked") + private final Class writerClass = (Class) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]; + + protected final ImageWriterSpi provider = createProvider(); + + protected abstract ImageWriterSpi createProvider(); + + protected final T createWriter() throws IOException { + return writerClass.cast(provider.createWriterInstance()); + } + + protected abstract List getTestData(); + + protected static BufferedImage drawSomething(final BufferedImage image) { + Graphics2D g = image.createGraphics(); + try { + int width = image.getWidth(); + int height = image.getHeight(); + + g.clearRect(0, 0, width, height); + g.setPaint(new LinearGradientPaint(0, 0, width, 0, new float[] {0.2f, 1}, new Color[] {new Color(0x0, true), Color.BLUE})); + g.fillRect(0, 0, width, height); + g.setPaint(new LinearGradientPaint(0, 0, 0, height, new float[] {0.2f, 1}, new Color[] {new Color(0x0, true), Color.RED})); + g.fillRect(0, 0, width, height); + g.setPaint(new LinearGradientPaint(0, 0, 0, height, new float[] {0, 1}, new Color[] {new Color(0x00ffffff, true), Color.WHITE})); + g.fill(new Polygon(new int[] {0, width, width}, new int[] {0, height, 0}, 3)); + } + finally { + g.dispose(); + } + + return image; + } + + protected final RenderedImage getTestData(final int index) { + return getTestData().get(index); + } + + protected URL getClassLoaderResource(final String name) { + return getClass().getResource(name); + } + + @Test + void testSetOutput() throws IOException { + // Should just pass with no exceptions + ImageWriter writer = createWriter(); + assertNotNull(writer); + writer.setOutput(ImageIO.createImageOutputStream(new ByteArrayOutputStream())); + } + + @Test + void testSetOutputNull() throws IOException { + // Should just pass with no exceptions + ImageWriter writer = createWriter(); + assertNotNull(writer); + writer.setOutput(null); + } + + @Test + void testWrite() throws IOException { + ImageWriter writer = createWriter(); + + for (RenderedImage testData : getTestData()) { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + + try (ImageOutputStream stream = ImageIO.createImageOutputStream(buffer)) { + writer.setOutput(stream); + writer.write(drawSomething((BufferedImage) testData)); + } + catch (IOException e) { + throw new AssertionError(e.getMessage(), e); + } + + assertTrue(buffer.size() > 0, "No image data written"); + } + } + + @Test + void testWriteNull() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + try { + writer.write((RenderedImage) null); + } + catch(IllegalArgumentException ignore) { + } + catch (IOException e) { + throw new AssertionError(e.getMessage(), e); + } + + assertEquals(0, buffer.size(), "Image data written"); + } + + @Test() + void testWriteNoOutput() throws IOException { + ImageWriter writer = createWriter(); + assertThrows(IllegalStateException.class, () -> writer.write(getTestData(0))); + } + + @Test + void testGetDefaultWriteParam() throws IOException { + ImageWriter writer = createWriter(); + ImageWriteParam param = writer.getDefaultWriteParam(); + assertNotNull(param, "Default ImageWriteParam is null"); + } + + // TODO: Test writing with params + // TODO: Source region and subsampling at least + + @Test + void testAddIIOWriteProgressListener() throws IOException { + ImageWriter writer = createWriter(); + writer.addIIOWriteProgressListener(mock(IIOWriteProgressListener.class)); + } + + @Test + void testAddIIOWriteProgressListenerNull() throws IOException { + ImageWriter writer = createWriter(); + writer.addIIOWriteProgressListener(null); + } + + @Test + void testAddIIOWriteProgressListenerCallbacks() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listener); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // At least imageStarted and imageComplete, plus any number of imageProgress + InOrder ordered = inOrder(listener); + ordered.verify(listener).imageStarted(writer, 0); + ordered.verify(listener, atLeastOnce()).imageProgress(eq(writer), anyFloat()); + ordered.verify(listener).imageComplete(writer); + } + + @Test + void testMultipleAddIIOWriteProgressListenerCallbacks() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + IIOWriteProgressListener listenerToo = mock(IIOWriteProgressListener.class); + IIOWriteProgressListener listenerThree = mock(IIOWriteProgressListener.class); + + writer.addIIOWriteProgressListener(listener); + writer.addIIOWriteProgressListener(listenerToo); + writer.addIIOWriteProgressListener(listenerThree); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // At least imageStarted and imageComplete, plus any number of imageProgress + InOrder ordered = inOrder(listener, listenerToo, listenerThree); + + ordered.verify(listener).imageStarted(writer, 0); + ordered.verify(listenerToo).imageStarted(writer, 0); + ordered.verify(listenerThree).imageStarted(writer, 0); + + ordered.verify(listener, atLeastOnce()).imageProgress(eq(writer), anyFloat()); + ordered.verify(listenerToo, atLeastOnce()).imageProgress(eq(writer), anyFloat()); + ordered.verify(listenerThree, atLeastOnce()).imageProgress(eq(writer), anyFloat()); + + ordered.verify(listener).imageComplete(writer); + ordered.verify(listenerToo).imageComplete(writer); + ordered.verify(listenerThree).imageComplete(writer); + } + + @Test + void testRemoveIIOWriteProgressListenerNull() throws IOException { + ImageWriter writer = createWriter(); + writer.removeIIOWriteProgressListener(null); + } + + @Test + void testRemoveIIOWriteProgressListenerNone() throws IOException { + ImageWriter writer = createWriter(); + writer.removeIIOWriteProgressListener(mock(IIOWriteProgressListener.class)); + } + + @Test + void testRemoveIIOWriteProgressListener() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listener); + writer.removeIIOWriteProgressListener(listener); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // Should not have called any methods... + verifyNoInteractions(listener); + } + + @Test + void testRemoveIIOWriteProgressListenerMultiple() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listener); + + IIOWriteProgressListener listenerToo = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listenerToo); + + writer.removeIIOWriteProgressListener(listener); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // Should not have called any methods... + verifyNoInteractions(listener); + + // At least imageStarted and imageComplete, plus any number of imageProgress + InOrder ordered = inOrder(listenerToo); + ordered.verify(listenerToo).imageStarted(writer, 0); + ordered.verify(listenerToo, atLeastOnce()).imageProgress(eq(writer), anyFloat()); + ordered.verify(listenerToo).imageComplete(writer); + + } + + @Test + void testRemoveAllIIOWriteProgressListeners() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listener); + + writer.removeAllIIOWriteProgressListeners(); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // Should not have called any methods... + verifyNoInteractions(listener); + } + + @Test + void testRemoveAllIIOWriteProgressListenersMultiple() throws IOException { + ImageWriter writer = createWriter(); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(buffer)); + + + IIOWriteProgressListener listener = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listener); + + IIOWriteProgressListener listenerToo = mock(IIOWriteProgressListener.class); + writer.addIIOWriteProgressListener(listenerToo); + + writer.removeAllIIOWriteProgressListeners(); + + try { + writer.write(getTestData(0)); + } + catch (IOException e) { + fail("Could not write image"); + } + + // Should not have called any methods... + verifyNoInteractions(listener); + verifyNoInteractions(listenerToo); + } +} \ No newline at end of file diff --git a/imageio-webp/README.md b/imageio-webp/README.md index cb8a114..2abdd69 100644 --- a/imageio-webp/README.md +++ b/imageio-webp/README.md @@ -2,7 +2,7 @@ ## Requirements -`libwebp` and `libwebpdemux` version 1.2.4+ must be installed on the target system. +`libwebp` and `libwebpdemux` version 1.4.0+ must be installed on the target system. ## Known installations methods @@ -14,6 +14,8 @@ - Decode WebP images (lossless, lossy, and alpha) - Decode WebP animations. The reader returns the number of images in the animation, and can read individual frames. - For WebP Containers containing ICC Profile, that profile will be applied on the decoded image. +- Encode WebP images (lossless, lossy, and alpha) +- Encode WebP animations. ## Limitations @@ -40,8 +42,7 @@ ImageReadParam param=reader.getDefaultReadParam(); ## Implementation notes The `panama` package bindings were generated using: + - jextract 22 -- from the https://github.com/webmproject/libwebp repository, version 1.2.4 -- based on: - - the `decode.h` header file for `panama.webp` - - the `demux.h` header file for `panama.webpdemux` \ No newline at end of file +- from the [libwebp repository](https://github.com/webmproject/libwebp), version 1.4.0 +- based on the `decode.h`, `encode.h`, `demux.h` and `mux.h` header file for `panama` diff --git a/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java index 8f87825..bdf0b96 100644 --- a/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java +++ b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java @@ -1,48 +1,22 @@ package com.github.gotson.nightmonkeys.webp.imageio.plugins; +import com.twelvemonkeys.imageio.spi.ImageReaderSpiBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.imageio.ImageReader; -import javax.imageio.spi.ImageReaderSpi; import javax.imageio.spi.ServiceRegistry; -import javax.imageio.stream.ImageInputStream; import java.util.Locale; -public class WebpImageReaderSpi extends ImageReaderSpi { +public class WebpImageReaderSpi extends ImageReaderSpiBase { private static final Logger LOGGER = LoggerFactory.getLogger(WebpImageReaderSpi.class); - private static final String vendorName = "NightMonkeys"; - private static final String version = "0.1.0"; - private static final String readerClassName = "com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageReader"; - private static final String[] names = {"WebP", "webp"}; - private static final String[] suffixes = {"webp"}; - private static final String[] MIMETypes = {"image/webp"}; - private static final String[] writerSpiNames = null; /** * Construct the SPI. Boilerplate. */ public WebpImageReaderSpi() { - super( - vendorName, - version, - names, - suffixes, - MIMETypes, - readerClassName, - new Class[] {ImageInputStream.class}, - writerSpiNames, - false, - null, - null, - null, - null, - false, - null, - null, - null, - null); + super(new WebpProviderInfo()); } @Override diff --git a/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java new file mode 100644 index 0000000..3657efe --- /dev/null +++ b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java @@ -0,0 +1,32 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.ImageWriterBase; + +import javax.imageio.IIOImage; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.ImageWriterSpi; +import java.io.IOException; + +public class WebpImageWriter extends ImageWriterBase { + + WebpImageWriter(ImageWriterSpi provider) { + super(provider); + } + + @Override + public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { + return null; + } + + @Override + public IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param) { + return null; + } + + @Override + public void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException { + throw new IOException(); + } +} diff --git a/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java new file mode 100644 index 0000000..529aa9f --- /dev/null +++ b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java @@ -0,0 +1,43 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.spi.ImageWriterSpiBase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; +import javax.imageio.spi.ServiceRegistry; +import java.util.Locale; + +public class WebpImageWriterSpi extends ImageWriterSpiBase { + + private static final Logger LOGGER = LoggerFactory.getLogger(WebpImageWriterSpi.class); + + private boolean libLoaded = false; + + public WebpImageWriterSpi() { + super(new WebpProviderInfo()); + } + + @Override + public void onRegistration(ServiceRegistry registry, Class category) { + LOGGER.info("This plugin only supports Java 22, plugin will be disabled"); + registry.deregisterServiceProvider(this); + super.onRegistration(registry, category); + } + + @Override + public boolean canEncodeImage(ImageTypeSpecifier type) { + return false; + } + + @Override + public ImageWriter createWriterInstance(Object extension) { + return new WebpImageWriter(this); + } + + @Override + public String getDescription(Locale locale) { + return "WebP writer plugin based on libwebp."; + } +} diff --git a/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java new file mode 100644 index 0000000..f09150c --- /dev/null +++ b/imageio-webp/src/main/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java @@ -0,0 +1,23 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo; + +final class WebpProviderInfo extends ReaderWriterProviderInfo { + + WebpProviderInfo() { + super( + WebpProviderInfo.class, + new String[] {"webp", "WEBP"}, + new String[] {"webp"}, + new String[] {"image/webp"}, + "com.github.gotson.nightmonkeys.webp.imageio.WebPImageReader", + new String[] {"com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageReaderSpi"}, + "com.github.gotson.nightmonkeys.webp.imageio.WebPImageWriter", + new String[] {"com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageWriterSpi"}, + false, + null, null, null, null, + false, + null, null, null, null + ); + } +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/ProgressCallback.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/ProgressCallback.java new file mode 100644 index 0000000..58f9e43 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/ProgressCallback.java @@ -0,0 +1,13 @@ +package com.github.gotson.nightmonkeys.webp; + +@FunctionalInterface +public interface ProgressCallback { + + /** + * Called when progress is made. + * + * @param progress the progress value between 0 and 1. + * @return true to continue encoding, false to abort. + */ + boolean onProgress(float progress); +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/WebP.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/WebP.java index 098a28a..3d366ac 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/WebP.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/WebP.java @@ -3,18 +3,7 @@ import com.github.gotson.nightmonkeys.webp.lib.enums.VP8StatusCode; import com.github.gotson.nightmonkeys.webp.lib.enums.WebPFeatureFlags; import com.github.gotson.nightmonkeys.webp.lib.enums.WebPFormatFeature; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.WebPAnimDecoderOptions; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.WebPAnimInfo; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.WebPChunkIterator; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.WebPData; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.WebPDecBuffer; -import com.github.gotson.nightmonkeys.webp.lib.panama.webp.WebPDecoderConfig; -import com.github.gotson.nightmonkeys.webp.lib.panama.webp.WebPDecoderOptions; -import com.github.gotson.nightmonkeys.webp.lib.panama.webp.WebPRGBABuffer; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h; -import com.github.gotson.nightmonkeys.webp.lib.panama.webp.decode_h; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import com.github.gotson.nightmonkeys.webp.lib.panama.*; import javax.imageio.ImageReadParam; import javax.imageio.stream.ImageInputStream; @@ -25,17 +14,18 @@ import java.lang.foreign.MemorySegment; import static com.github.gotson.nightmonkeys.common.imageio.IIOUtil.byteArrayFromStream; -import static com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h.C_INT; -import static com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h.C_POINTER; /** * Java bindings for libwebp via Foreign Linker API * */ -public class WebP { +public final class WebP { + private static final int minDecoderAbi = Integer.parseInt("0200", 16); private static final int minDemuxAbi = Integer.parseInt("0100", 16); - private static final Logger LOGGER = LoggerFactory.getLogger(WebP.class); + private WebP() { + // Static helper class + } public static boolean canDecode(final ImageInputStream stream) throws WebpException { try (var arena = Arena.ofConfined()) { @@ -57,6 +47,10 @@ public static String getDecoderVersion() { return parseVersionInt(decode_h.WebPGetDecoderVersion()); } + public static String getEncoderVersion() { + return parseVersionInt(encode_h.WebPGetEncoderVersion()); + } + public static String getDemuxVersion() { return parseVersionInt(demux_h.WebPGetDemuxVersion()); } @@ -213,11 +207,11 @@ public static void decodeAnim(final ImageInputStream stream, BasicInfo info, fin int i = 0; var pixelsArray = new int[info.width() * info.height()]; do { - var buf = arena.allocate(C_POINTER); - var timestamp = arena.allocate(C_INT); + var buf = arena.allocate(demux_h.C_POINTER); + var timestamp = arena.allocate(demux_h.C_INT); demux_h.WebPAnimDecoderGetNext(dec, buf, timestamp); if (i == imageIndex) { - buf.get(C_POINTER, 0).asSlice(0, (long) info.width() * info.height() * 4).asByteBuffer().asIntBuffer().get(pixelsArray); + buf.get(demux_h.C_POINTER, 0).asSlice(0, (long) info.width() * info.height() * 4).asByteBuffer().asIntBuffer().get(pixelsArray); break; } i++; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java index d73d920..394e5c9 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageReaderSpi.java @@ -2,6 +2,7 @@ import com.github.gotson.nightmonkeys.webp.WebP; import com.github.gotson.nightmonkeys.webp.WebpException; +import com.twelvemonkeys.imageio.spi.ImageReaderSpiBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -13,42 +14,16 @@ import java.io.IOException; import java.util.Locale; -public class WebpImageReaderSpi extends ImageReaderSpi { +public class WebpImageReaderSpi extends ImageReaderSpiBase { private static final Logger LOGGER = LoggerFactory.getLogger(WebpImageReaderSpi.class); - private static final String vendorName = "NightMonkeys"; - private static final String version = "0.1.0"; - private static final String readerClassName = "com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageReader"; - private static final String[] names = {"WebP", "webp"}; - private static final String[] suffixes = {"webp"}; - private static final String[] MIMETypes = {"image/webp"}; - private static final String[] writerSpiNames = null; - private boolean libLoaded = false; /** * Construct the SPI. Boilerplate. */ public WebpImageReaderSpi() { - super( - vendorName, - version, - names, - suffixes, - MIMETypes, - readerClassName, - new Class[] {ImageInputStream.class}, - writerSpiNames, - false, - null, - null, - null, - null, - false, - null, - null, - null, - null); + super(new WebpProviderInfo()); } private boolean loadLibrary() { @@ -70,7 +45,7 @@ private boolean loadLibrary() { @Override public void onRegistration(ServiceRegistry registry, Class category) { if (!loadLibrary()) { - LOGGER.info("Deregistering service provider"); + LOGGER.info("Unregistering service provider"); registry.deregisterServiceProvider(this); } super.onRegistration(registry, category); diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriteParam.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriteParam.java new file mode 100644 index 0000000..bc0f7db --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriteParam.java @@ -0,0 +1,122 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.github.gotson.nightmonkeys.webp.lib.enums.WebpLosslessPresets; +import com.github.gotson.nightmonkeys.webp.lib.enums.WebpPresets; + +import javax.imageio.ImageWriteParam; + +/** + * Specialized {@link ImageWriteParam} for WebP encoding. + */ +public class WebpImageWriteParam extends ImageWriteParam { + + public static final String COMPRESSION_TYPE_LOSSY = "LOSSY"; + public static final String COMPRESSION_TYPE_LOSSLESS = "LOSSLESS"; + + protected static final String[] COMPRESSION_TYPES = {COMPRESSION_TYPE_LOSSY, COMPRESSION_TYPE_LOSSLESS}; + + private int method; + private WebpPresets preset; + private int timestamp; + + /** + * Constructs a {@code WebpImageWriteParam} with default values. + */ + public WebpImageWriteParam() { + canWriteCompressed = true; + compressionTypes = COMPRESSION_TYPES; + setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + unsetCompression(); + } + + /** + * Unsets the compression settings and resets to default lossy compression. + */ + @Override + public void unsetCompression() { + super.unsetCompression(); + setCompressionType(COMPRESSION_TYPE_LOSSY); + setCompressionQuality(0.75F); + setMethod(4); + setPreset(WebpPresets.DEFAULT); + } + + /** + * Checks if the current compression type is lossless. + * + * @return true if the compression type is lossless, otherwise false. + */ + @Override + public boolean isCompressionLossless() { + return super.isCompressionLossless() && COMPRESSION_TYPE_LOSSLESS.equals(getCompressionType()); + } + + /** + * Sets the lossless preset configuration. + * + * @param presets the {@link WebpLosslessPresets} to be used. + */ + public void setLosslessPreset(WebpLosslessPresets presets) { + setCompressionType(COMPRESSION_TYPE_LOSSLESS); + setMethod(presets.getMethod()); + setCompressionQuality(presets.getQuality()); + } + + /** + * Gets the current method for quality/speed trade-off. + * + * @return the method value (0=fast, 6=slower-better). + */ + public int getMethod() { + return method; + } + + /** + * Sets the method for quality/speed trade-off. + * + * @param method the method value (0=fast, 6=slower-better). + */ + public void setMethod(int method) { + if(method < 0 || method > 6) { + throw new IllegalArgumentException("Method must be between 0 and 6"); + } + this.method = method; + } + + /** + * Gets the current preset for WebP encoding. + * + * @return the current {@link WebpPresets}. + */ + public WebpPresets getPreset() { + return preset; + } + + /** + * Sets the preset for WebP encoding. + * + * @param preset the {@link WebpPresets} to be used. + */ + public void setPreset(WebpPresets preset) { + this.preset = preset; + } + + /** + * Gets the timestamp (in ms) for the image. + * + * @return the timestamp value. + */ + public int getTimestamp() { + return timestamp; + } + + /** + * Sets the absolute timestamp (in ms) for when to display the image in. + * Only used for animated WebP images. + * + * @param timestamp the timestamp value. + */ + public void setTimestamp(int timestamp) { + this.timestamp = timestamp; + } +} \ No newline at end of file diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java new file mode 100644 index 0000000..336baab --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriter.java @@ -0,0 +1,291 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.github.gotson.nightmonkeys.webp.ProgressCallback; +import com.github.gotson.nightmonkeys.webp.WebpException; +import com.github.gotson.nightmonkeys.webp.lib.enums.VP8StatusCode; +import com.github.gotson.nightmonkeys.webp.lib.panama.*; +import com.twelvemonkeys.imageio.ImageWriterBase; + +import javax.imageio.IIOImage; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.ImageWriterSpi; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.awt.image.RenderedImage; +import java.io.IOException; +import java.lang.foreign.Arena; +import java.lang.foreign.MemorySegment; + +/** + * ImageWriter for WebP format. + */ +public class WebpImageWriter extends ImageWriterBase { + + private Arena arena; + private MemorySegment encoder; + private int imageIndex; + private WebpStreamMetadata webpStreamMetadata; + + WebpImageWriter(ImageWriterSpi provider) { + super(provider); + } + + @Override + public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { + return null; + } + + @Override + public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param) { + return new WebpStreamMetadata(); + } + + @Override + public IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param) { + return null; + } + + @Override + public void prepareWriteSequence(IIOMetadata streamMetadata) throws IOException { + assertOutput(); + + webpStreamMetadata = (WebpStreamMetadata) (streamMetadata != null ? streamMetadata : getDefaultStreamMetadata(null)); + + arena = Arena.ofConfined(); + + MemorySegment params = WebPMuxAnimParams.allocate(arena); + WebPMuxAnimParams.bgcolor(params, webpStreamMetadata.getCanvasBackgroundColor()); + WebPMuxAnimParams.loop_count(params, webpStreamMetadata.getLoopCount()); + + MemorySegment options = WebPAnimEncoderOptions.allocate(arena); + if (mux_h.WebPAnimEncoderOptionsInitInternal(options, mux_h.WEBP_MUX_ABI_VERSION()) == 0) { + throwException("Could not init encoder options"); + } + WebPAnimEncoderOptions.anim_params(options, params); + + encoder = mux_h.WebPAnimEncoderNewInternal(webpStreamMetadata.getCanvasWidth(), webpStreamMetadata.getCanvasHeight(), options, mux_h.WEBP_MUX_ABI_VERSION()); + } + + @Override + public void writeToSequence(IIOImage image, ImageWriteParam param) throws IOException { + assertOutput(); + if (image == null) { + throw new IllegalArgumentException("Image may not be null"); + } + if (encoder == null) { + throw new IllegalStateException("prepareWriteSequence() was not invoked!"); + } + + WebpImageWriteParam webpParam = (WebpImageWriteParam) (param != null ? param : getDefaultWriteParam()); + RenderedImage renderedImage = image.getRenderedImage(); + Raster raster = getRaster(renderedImage); + + clearAbortRequest(); + processImageStarted(imageIndex); + if (abortRequested()) { + processWriteAborted(); + return; + } + + MemorySegment config = createWebpConfig(arena, webpParam); + MemorySegment picture = createWebpPicture(raster, webpParam, arena, progress -> { + processImageProgress(progress); + return !abortRequested(); + }); + + if (mux_h.WebPAnimEncoderAdd(encoder, picture, webpParam.getTimestamp(), config) == 0) { + throwException("Could not add picture to animation"); + } + + if (abortRequested()) { + processWriteAborted(); + return; + } + + processImageComplete(); + imageIndex++; + } + + @Override + public void endWriteSequence() throws IOException { + assertOutput(); + if (encoder == null) { + throw new IllegalStateException("prepareWriteSequence() was not invoked!"); + } + + try (Arena localArena = arena) { + if (mux_h.WebPAnimEncoderAdd(encoder, MemorySegment.NULL, webpStreamMetadata.getTotalDuration(), MemorySegment.NULL) == 0) { + throwException("Could not finalize animation"); + } + MemorySegment webpData = WebPData.allocate(localArena); + if (mux_h.WebPAnimEncoderAssemble(encoder, webpData) == 0) { + throwException("Could not assemble animation"); + } + mux_h.WebPAnimEncoderDelete(encoder); + + byte[] bytes = new byte[(int) WebPData.size(webpData)]; + WebPData.bytes(webpData).asSlice(0, bytes.length).asByteBuffer().get(bytes); + imageOutput.write(bytes); + } finally { + encoder = null; + arena = null; + webpStreamMetadata = null; + } + } + + @Override + public void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException { + assertOutput(); + + if (image == null) { + throw new IllegalArgumentException("image may not be null"); + } + + WebpImageWriteParam webpParam = (WebpImageWriteParam) (param != null ? param : getDefaultWriteParam()); + + RenderedImage renderedImage = image.getRenderedImage(); + Raster raster = getRaster(renderedImage); + + processImageStarted(0); + processImageProgress(0F); + if (abortRequested()) { + processWriteAborted(); + return; + } + + try (Arena localArena = Arena.ofConfined()) { + MemorySegment config = createWebpConfig(localArena, webpParam); + + MemorySegment picture = createWebpPicture(raster, webpParam, localArena, progress -> { + processImageProgress(progress); + return !abortRequested(); + }); + + MemorySegment writer = WebPMemoryWriter.allocate(localArena); + encode_h.WebPMemoryWriterInit(writer); + WebPPicture.writer(picture, WebPWriterFunction.allocate(encode_h::WebPMemoryWrite, localArena)); + WebPPicture.custom_ptr(picture, writer); + + if (encode_h.WebPEncode(config, picture) == 0) { + throwException("Couldn't encode: " + VP8StatusCode.fromId(WebPPicture.error_code(picture))); + } + + byte[] bytes = new byte[(int) WebPMemoryWriter.size(writer)]; + WebPMemoryWriter.mem(writer).asSlice(0, bytes.length).asByteBuffer().get(bytes); + imageOutput.write(bytes); + + encode_h.WebPPictureFree(picture); + } + if (abortRequested()) { + processWriteAborted(); + } else { + processImageComplete(); + } + } + + @Override + public WebpImageWriteParam getDefaultWriteParam() { + return new WebpImageWriteParam(); + } + + /** + * Creates and initializes a WebP configuration segment. + * + * @param arena The memory arena to allocate the configuration segment. + * @param webpParam The parameters for WebP image writing. + * @return The initialized WebP configuration segment. + * @throws IOException If the configuration initialization fails. + */ + private static MemorySegment createWebpConfig(Arena arena, WebpImageWriteParam webpParam) throws IOException { + MemorySegment config = WebPConfig.allocate(arena); + if (encode_h.WebPConfigInitInternal(config, webpParam.getPreset().ordinal(), webpParam.getCompressionQuality() * 100F, encode_h.WEBP_ENCODER_ABI_VERSION()) == 0) { + throwException("Could not init encoder config"); + } + WebPConfig.method(config, webpParam.getMethod()); + WebPConfig.lossless(config, webpParam.isCompressionLossless() ? 1 : 0); + return config; + } + + /** + * Creates and initializes a WebP picture segment. + * + * @param raster The raster containing the image data. + * @param param The parameters for WebP image writing. + * @param arena The memory arena to allocate the picture segment. + * @param progressCallback The callback to report progress. + * @return The initialized WebP picture segment. + * @throws IOException If the picture initialization fails. + */ + private static MemorySegment createWebpPicture(Raster raster, ImageWriteParam param, Arena arena, ProgressCallback progressCallback) throws IOException { + int xOffset = raster.getMinX(); + int yOffset = raster.getMinY(); + int width = raster.getWidth(); + int height = raster.getHeight(); + int numBands = raster.getNumBands(); + if (param != null) { + Rectangle sourceRegion = param.getSourceRegion(); + if (sourceRegion != null) { + Rectangle imageBounds = new Rectangle(raster.getMinX(), + raster.getMinY(), + raster.getWidth(), + raster.getHeight()); + sourceRegion = sourceRegion.intersection(imageBounds); + xOffset = sourceRegion.x; + yOffset = sourceRegion.y; + width = sourceRegion.width; + height = sourceRegion.height; + } + + int gridX = param.getSubsamplingXOffset(); + int gridY = param.getSubsamplingYOffset(); + xOffset += gridX; + yOffset += gridY; + width -= gridX; + height -= gridY; + } + + MemorySegment picture = WebPPicture.allocate(arena); + WebPPicture.width(picture, width); + WebPPicture.height(picture, height); + WebPPicture.use_argb(picture, 1); + + int[] intPixelArray = raster.getPixels(xOffset, yOffset, width, height, (int[]) null); + byte[] pixelArray = new byte[intPixelArray.length]; + for (int i = 0; i < intPixelArray.length; i++) { + pixelArray[i] = (byte) intPixelArray[i]; + } + MemorySegment data = arena.allocateFrom(encode_h.C_CHAR, pixelArray); + + if ((numBands > 3 ? encode_h.WebPPictureImportRGBA(picture, data, width * numBands) : encode_h.WebPPictureImportRGB(picture, data, width * numBands)) == 0) { + throwException("Could not import picture"); + } + + MemorySegment progressHook = WebPProgressHook.allocate((percent, _) -> progressCallback.onProgress(percent / 100F) ? 1 : 0, arena); + WebPPicture.progress_hook(picture, progressHook); + + return picture; + } + + private static void throwException(String message) throws IOException { + throw new IOException(new WebpException(message)); + } + + /** + * Retrieves the raster data from a RenderedImage. + * + * @param image The rendered image. + * @return The raster data of the image. + */ + private static Raster getRaster(final RenderedImage image) { + if (image instanceof BufferedImage bi) { + return bi.getRaster(); + } + if (image.getNumXTiles() == 1 && image.getNumYTiles() == 1) { + return image.getTile(0, 0); + } + return image.getData(); + } +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java new file mode 100644 index 0000000..b15e119 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterSpi.java @@ -0,0 +1,64 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.github.gotson.nightmonkeys.webp.WebP; +import com.twelvemonkeys.imageio.spi.ImageWriterSpiBase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; +import javax.imageio.spi.ServiceRegistry; +import java.awt.image.BufferedImage; +import java.util.Locale; + +public class WebpImageWriterSpi extends ImageWriterSpiBase { + + private static final Logger LOGGER = LoggerFactory.getLogger(WebpImageWriterSpi.class); + + private boolean libLoaded = false; + + public WebpImageWriterSpi() { + super(new WebpProviderInfo()); + } + + private boolean loadLibrary() { + if (!libLoaded) { + try { + LOGGER.info("Loaded libwebp: encoder v{}", WebP.getEncoderVersion()); + libLoaded = true; + } catch (UnsatisfiedLinkError e) { + LOGGER.warn("Could not load libwebp, plugin will be disabled. {}", e.getMessage()); + } catch (ExceptionInInitializerError e) { + LOGGER.warn("Native access is disabled, plugin will be disabled. Try adding JVM arguments: --enable-native-access=ALL-UNNAMED"); + } catch (Exception e) { + LOGGER.warn("Unknown error", e); + } + } + return libLoaded; + } + + @Override + public void onRegistration(ServiceRegistry registry, Class category) { + if (!loadLibrary()) { + LOGGER.info("Unregistering service provider"); + registry.deregisterServiceProvider(this); + } + super.onRegistration(registry, category); + } + + @Override + public boolean canEncodeImage(ImageTypeSpecifier type) { + int bufferedImageType = type.getBufferedImageType(); + return bufferedImageType == BufferedImage.TYPE_INT_RGB || bufferedImageType == BufferedImage.TYPE_INT_ARGB; + } + + @Override + public ImageWriter createWriterInstance(Object extension) { + return new WebpImageWriter(this); + } + + @Override + public String getDescription(Locale locale) { + return "WebP writer plugin based on libwebp."; + } +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java new file mode 100644 index 0000000..432416d --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpProviderInfo.java @@ -0,0 +1,23 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo; + +final class WebpProviderInfo extends ReaderWriterProviderInfo { + + WebpProviderInfo() { + super( + WebpProviderInfo.class, + new String[] {"webp", "WEBP"}, + new String[] {"webp"}, + new String[] {"image/webp"}, + "com.github.gotson.nightmonkeys.webp.imageio.WebPImageReader", + new String[] {"com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageReaderSpi"}, + "com.github.gotson.nightmonkeys.webp.imageio.WebPImageWriter", + new String[] {"com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageWriterSpi"}, + false, + null, null, null, null, + false, + null, null, null, null + ); + } +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpStreamMetadata.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpStreamMetadata.java new file mode 100644 index 0000000..a850380 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpStreamMetadata.java @@ -0,0 +1,108 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.AbstractMetadata; + +/** + * This class represents the metadata for a WebP stream. + * Meaning the metadata that is associated with the whole container. + */ +public class WebpStreamMetadata extends AbstractMetadata { + + private int canvasWidth; + private int canvasHeight; + private int canvasBackgroundColor; + private int loopCount; + private int totalDuration; + + /** + * Returns the width of the canvas. + * + * @return the width of the canvas + */ + public int getCanvasWidth() { + return canvasWidth; + } + + /** + * Sets the width of the canvas. + * + * @param canvasWidth the new width of the canvas + */ + public void setCanvasWidth(int canvasWidth) { + this.canvasWidth = canvasWidth; + } + + /** + * Returns the height of the canvas. + * + * @return the height of the canvas + */ + public int getCanvasHeight() { + return canvasHeight; + } + + /** + * Sets the height of the canvas. + * + * @param canvasHeight the new height of the canvas + */ + public void setCanvasHeight(int canvasHeight) { + this.canvasHeight = canvasHeight; + } + + /** + * Returns the loop count. + * + * @return the loop count + */ + public int getLoopCount() { + return loopCount; + } + + /** + * Sets the loop count. + * 0 means infinite loop. + * + * @param loopCount the new loop count + */ + public void setLoopCount(int loopCount) { + this.loopCount = loopCount; + } + + /** + * Returns the background color of the canvas as an argb integer. + * + * @return the background color of the canvas + */ + public int getCanvasBackgroundColor() { + return canvasBackgroundColor; + } + + /** + * Sets the background color of the canvas. + * The color is represented as argb. + * + * @param canvasBackgroundColor the new background color of the canvas + */ + public void setCanvasBackgroundColor(int canvasBackgroundColor) { + this.canvasBackgroundColor = canvasBackgroundColor; + } + + /** + * Returns the total duration (in ms) of the animation. + * + * @return the total duration of the animation + */ + public int getTotalDuration() { + return totalDuration; + } + + /** + * Sets the total duration (in ms) of the animation. + * + * @param totalDuration the new total duration of the animation + */ + public void setTotalDuration(int totalDuration) { + this.totalDuration = totalDuration; + } +} \ No newline at end of file diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/VP8StatusCode.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/VP8StatusCode.java index 71dca97..0e99105 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/VP8StatusCode.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/VP8StatusCode.java @@ -1,7 +1,7 @@ package com.github.gotson.nightmonkeys.webp.lib.enums; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h; +import com.github.gotson.nightmonkeys.webp.lib.panama.demux_h; public enum VP8StatusCode { VP8_STATUS_OK(demux_h.VP8_STATUS_OK()), diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPDemuxState.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPDemuxState.java index f7ddbd3..e20ec4f 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPDemuxState.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPDemuxState.java @@ -1,7 +1,7 @@ package com.github.gotson.nightmonkeys.webp.lib.enums; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h; +import com.github.gotson.nightmonkeys.webp.lib.panama.demux_h; public enum WebPDemuxState { WEBP_DEMUX_PARSE_ERROR(demux_h.WEBP_DEMUX_PARSE_ERROR()), diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFeatureFlags.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFeatureFlags.java index 4bd6e56..d3e3522 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFeatureFlags.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFeatureFlags.java @@ -1,7 +1,7 @@ package com.github.gotson.nightmonkeys.webp.lib.enums; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h; +import com.github.gotson.nightmonkeys.webp.lib.panama.demux_h; import java.util.Arrays; import java.util.EnumSet; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFormatFeature.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFormatFeature.java index a18e7c5..1dc7df8 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFormatFeature.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebPFormatFeature.java @@ -1,7 +1,7 @@ package com.github.gotson.nightmonkeys.webp.lib.enums; -import com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux.demux_h; +import com.github.gotson.nightmonkeys.webp.lib.panama.demux_h; public enum WebPFormatFeature { /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpLosslessPresets.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpLosslessPresets.java new file mode 100644 index 0000000..0b5528e --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpLosslessPresets.java @@ -0,0 +1,34 @@ +package com.github.gotson.nightmonkeys.webp.lib.enums; + +/** + * Enum representing different WebP lossless presets. + * @see lossless presets + */ +public enum WebpLosslessPresets { + LEVEL_0(0, 0.0F), + LEVEL_1(1, 0.2F), + LEVEL_2(3, 0.25F), + LEVEL_3(3, 0.3F), + LEVEL_4(3, 0.5F), + LEVEL_5(4, 0.5F), + LEVEL_6(4, 0.75F), + LEVEL_7(4, 0.9F), + LEVEL_8(5, 0.9F), + LEVEL_9(6, 1.0F); + + private final int method; + private final float quality; + + WebpLosslessPresets(int method, float quality) { + this.method = method; + this.quality = quality; + } + + public int getMethod() { + return method; + } + + public float getQuality() { + return quality; + } +} diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpPresets.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpPresets.java new file mode 100644 index 0000000..fbf6bde --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/enums/WebpPresets.java @@ -0,0 +1,36 @@ +package com.github.gotson.nightmonkeys.webp.lib.enums; + +/** + * Enum representing different WebP presets. + */ +public enum WebpPresets { + /** + * Default preset. + */ + DEFAULT, + + /** + * Preset optimized for digital pictures, like portraits, inner shots. + */ + PICTURE, + + /** + * Preset optimized for outdoor photographs, with natural lighting. + */ + PHOTO, + + /** + * Preset optimized for hand or line drawings, with high-contrast details. + */ + DRAWING, + + /** + * Preset optimized for small-sized colorful images. + */ + ICON, + + /** + * Preset optimized for text-likes. + */ + TEXT; +} \ No newline at end of file diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimDecoderOptions.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimDecoderOptions.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimDecoderOptions.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimDecoderOptions.java index ef01874..5e1c2e8 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimDecoderOptions.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimDecoderOptions.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimEncoderOptions.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimEncoderOptions.java new file mode 100644 index 0000000..f1b2d8c --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimEncoderOptions.java @@ -0,0 +1,436 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * struct WebPAnimEncoderOptions { + * WebPMuxAnimParams anim_params; + * int minimize_size; + * int kmin; + * int kmax; + * int allow_mixed; + * int verbose; + * uint32_t padding[4]; + * } + * } + */ +public class WebPAnimEncoderOptions { + + WebPAnimEncoderOptions() { + // Should not be called directly + } + + private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( + WebPMuxAnimParams.layout().withName("anim_params"), + mux_h.C_INT.withName("minimize_size"), + mux_h.C_INT.withName("kmin"), + mux_h.C_INT.withName("kmax"), + mux_h.C_INT.withName("allow_mixed"), + mux_h.C_INT.withName("verbose"), + MemoryLayout.sequenceLayout(4, mux_h.C_INT).withName("padding") + ).withName("WebPAnimEncoderOptions"); + + /** + * The layout of this struct + */ + public static final GroupLayout layout() { + return $LAYOUT; + } + + private static final GroupLayout anim_params$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("anim_params")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPMuxAnimParams anim_params + * } + */ + public static final GroupLayout anim_params$layout() { + return anim_params$LAYOUT; + } + + private static final long anim_params$OFFSET = 0; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPMuxAnimParams anim_params + * } + */ + public static final long anim_params$offset() { + return anim_params$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPMuxAnimParams anim_params + * } + */ + public static MemorySegment anim_params(MemorySegment struct) { + return struct.asSlice(anim_params$OFFSET, anim_params$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPMuxAnimParams anim_params + * } + */ + public static void anim_params(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, anim_params$OFFSET, anim_params$LAYOUT.byteSize()); + } + + private static final OfInt minimize_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("minimize_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int minimize_size + * } + */ + public static final OfInt minimize_size$layout() { + return minimize_size$LAYOUT; + } + + private static final long minimize_size$OFFSET = 8; + + /** + * Offset for field: + * {@snippet lang=c : + * int minimize_size + * } + */ + public static final long minimize_size$offset() { + return minimize_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int minimize_size + * } + */ + public static int minimize_size(MemorySegment struct) { + return struct.get(minimize_size$LAYOUT, minimize_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int minimize_size + * } + */ + public static void minimize_size(MemorySegment struct, int fieldValue) { + struct.set(minimize_size$LAYOUT, minimize_size$OFFSET, fieldValue); + } + + private static final OfInt kmin$LAYOUT = (OfInt)$LAYOUT.select(groupElement("kmin")); + + /** + * Layout for field: + * {@snippet lang=c : + * int kmin + * } + */ + public static final OfInt kmin$layout() { + return kmin$LAYOUT; + } + + private static final long kmin$OFFSET = 12; + + /** + * Offset for field: + * {@snippet lang=c : + * int kmin + * } + */ + public static final long kmin$offset() { + return kmin$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int kmin + * } + */ + public static int kmin(MemorySegment struct) { + return struct.get(kmin$LAYOUT, kmin$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int kmin + * } + */ + public static void kmin(MemorySegment struct, int fieldValue) { + struct.set(kmin$LAYOUT, kmin$OFFSET, fieldValue); + } + + private static final OfInt kmax$LAYOUT = (OfInt)$LAYOUT.select(groupElement("kmax")); + + /** + * Layout for field: + * {@snippet lang=c : + * int kmax + * } + */ + public static final OfInt kmax$layout() { + return kmax$LAYOUT; + } + + private static final long kmax$OFFSET = 16; + + /** + * Offset for field: + * {@snippet lang=c : + * int kmax + * } + */ + public static final long kmax$offset() { + return kmax$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int kmax + * } + */ + public static int kmax(MemorySegment struct) { + return struct.get(kmax$LAYOUT, kmax$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int kmax + * } + */ + public static void kmax(MemorySegment struct, int fieldValue) { + struct.set(kmax$LAYOUT, kmax$OFFSET, fieldValue); + } + + private static final OfInt allow_mixed$LAYOUT = (OfInt)$LAYOUT.select(groupElement("allow_mixed")); + + /** + * Layout for field: + * {@snippet lang=c : + * int allow_mixed + * } + */ + public static final OfInt allow_mixed$layout() { + return allow_mixed$LAYOUT; + } + + private static final long allow_mixed$OFFSET = 20; + + /** + * Offset for field: + * {@snippet lang=c : + * int allow_mixed + * } + */ + public static final long allow_mixed$offset() { + return allow_mixed$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int allow_mixed + * } + */ + public static int allow_mixed(MemorySegment struct) { + return struct.get(allow_mixed$LAYOUT, allow_mixed$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int allow_mixed + * } + */ + public static void allow_mixed(MemorySegment struct, int fieldValue) { + struct.set(allow_mixed$LAYOUT, allow_mixed$OFFSET, fieldValue); + } + + private static final OfInt verbose$LAYOUT = (OfInt)$LAYOUT.select(groupElement("verbose")); + + /** + * Layout for field: + * {@snippet lang=c : + * int verbose + * } + */ + public static final OfInt verbose$layout() { + return verbose$LAYOUT; + } + + private static final long verbose$OFFSET = 24; + + /** + * Offset for field: + * {@snippet lang=c : + * int verbose + * } + */ + public static final long verbose$offset() { + return verbose$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int verbose + * } + */ + public static int verbose(MemorySegment struct) { + return struct.get(verbose$LAYOUT, verbose$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int verbose + * } + */ + public static void verbose(MemorySegment struct, int fieldValue) { + struct.set(verbose$LAYOUT, verbose$OFFSET, fieldValue); + } + + private static final SequenceLayout padding$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("padding")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static final SequenceLayout padding$layout() { + return padding$LAYOUT; + } + + private static final long padding$OFFSET = 28; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static final long padding$offset() { + return padding$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static MemorySegment padding(MemorySegment struct) { + return struct.asSlice(padding$OFFSET, padding$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static void padding(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, padding$OFFSET, padding$LAYOUT.byteSize()); + } + + private static long[] padding$DIMS = { 4 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static long[] padding$dimensions() { + return padding$DIMS; + } + private static final VarHandle padding$ELEM_HANDLE = padding$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static int padding(MemorySegment struct, long index0) { + return (int)padding$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t padding[4] + * } + */ + public static void padding(MemorySegment struct, long index0, int fieldValue) { + padding$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + /** + * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. + * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} + */ + public static MemorySegment asSlice(MemorySegment array, long index) { + return array.asSlice(layout().byteSize() * index); + } + + /** + * The size (in bytes) of this struct + */ + public static long sizeof() { return layout().byteSize(); } + + /** + * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} + */ + public static MemorySegment allocate(SegmentAllocator allocator) { + return allocator.allocate(layout()); + } + + /** + * Allocate an array of size {@code elementCount} using {@code allocator}. + * The returned segment has size {@code elementCount * layout().byteSize()}. + */ + public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { + return reinterpret(addr, 1, arena, cleanup); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code elementCount * layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { + return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimInfo.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimInfo.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimInfo.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimInfo.java index a81419a..2830548 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPAnimInfo.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAnimInfo.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAuxStats.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAuxStats.java new file mode 100644 index 0000000..ac5dcee --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPAuxStats.java @@ -0,0 +1,1219 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * struct WebPAuxStats { + * int coded_size; + * float PSNR[5]; + * int block_count[3]; + * int header_bytes[2]; + * int residual_bytes[3][4]; + * int segment_size[4]; + * int segment_quant[4]; + * int segment_level[4]; + * int alpha_data_size; + * int layer_data_size; + * uint32_t lossless_features; + * int histogram_bits; + * int transform_bits; + * int cache_bits; + * int palette_size; + * int lossless_size; + * int lossless_hdr_size; + * int lossless_data_size; + * uint32_t pad[2]; + * } + * } + */ +public class WebPAuxStats { + + WebPAuxStats() { + // Should not be called directly + } + + private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( + encode_h.C_INT.withName("coded_size"), + MemoryLayout.sequenceLayout(5, encode_h.C_FLOAT).withName("PSNR"), + MemoryLayout.sequenceLayout(3, encode_h.C_INT).withName("block_count"), + MemoryLayout.sequenceLayout(2, encode_h.C_INT).withName("header_bytes"), + MemoryLayout.sequenceLayout(3, MemoryLayout.sequenceLayout(4, encode_h.C_INT)).withName("residual_bytes"), + MemoryLayout.sequenceLayout(4, encode_h.C_INT).withName("segment_size"), + MemoryLayout.sequenceLayout(4, encode_h.C_INT).withName("segment_quant"), + MemoryLayout.sequenceLayout(4, encode_h.C_INT).withName("segment_level"), + encode_h.C_INT.withName("alpha_data_size"), + encode_h.C_INT.withName("layer_data_size"), + encode_h.C_INT.withName("lossless_features"), + encode_h.C_INT.withName("histogram_bits"), + encode_h.C_INT.withName("transform_bits"), + encode_h.C_INT.withName("cache_bits"), + encode_h.C_INT.withName("palette_size"), + encode_h.C_INT.withName("lossless_size"), + encode_h.C_INT.withName("lossless_hdr_size"), + encode_h.C_INT.withName("lossless_data_size"), + MemoryLayout.sequenceLayout(2, encode_h.C_INT).withName("pad") + ).withName("WebPAuxStats"); + + /** + * The layout of this struct + */ + public static final GroupLayout layout() { + return $LAYOUT; + } + + private static final OfInt coded_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("coded_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int coded_size + * } + */ + public static final OfInt coded_size$layout() { + return coded_size$LAYOUT; + } + + private static final long coded_size$OFFSET = 0; + + /** + * Offset for field: + * {@snippet lang=c : + * int coded_size + * } + */ + public static final long coded_size$offset() { + return coded_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int coded_size + * } + */ + public static int coded_size(MemorySegment struct) { + return struct.get(coded_size$LAYOUT, coded_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int coded_size + * } + */ + public static void coded_size(MemorySegment struct, int fieldValue) { + struct.set(coded_size$LAYOUT, coded_size$OFFSET, fieldValue); + } + + private static final SequenceLayout PSNR$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("PSNR")); + + /** + * Layout for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static final SequenceLayout PSNR$layout() { + return PSNR$LAYOUT; + } + + private static final long PSNR$OFFSET = 4; + + /** + * Offset for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static final long PSNR$offset() { + return PSNR$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static MemorySegment PSNR(MemorySegment struct) { + return struct.asSlice(PSNR$OFFSET, PSNR$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static void PSNR(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, PSNR$OFFSET, PSNR$LAYOUT.byteSize()); + } + + private static long[] PSNR$DIMS = { 5 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static long[] PSNR$dimensions() { + return PSNR$DIMS; + } + private static final VarHandle PSNR$ELEM_HANDLE = PSNR$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static float PSNR(MemorySegment struct, long index0) { + return (float)PSNR$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * float PSNR[5] + * } + */ + public static void PSNR(MemorySegment struct, long index0, float fieldValue) { + PSNR$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final SequenceLayout block_count$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("block_count")); + + /** + * Layout for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static final SequenceLayout block_count$layout() { + return block_count$LAYOUT; + } + + private static final long block_count$OFFSET = 24; + + /** + * Offset for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static final long block_count$offset() { + return block_count$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static MemorySegment block_count(MemorySegment struct) { + return struct.asSlice(block_count$OFFSET, block_count$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static void block_count(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, block_count$OFFSET, block_count$LAYOUT.byteSize()); + } + + private static long[] block_count$DIMS = { 3 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static long[] block_count$dimensions() { + return block_count$DIMS; + } + private static final VarHandle block_count$ELEM_HANDLE = block_count$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static int block_count(MemorySegment struct, long index0) { + return (int)block_count$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int block_count[3] + * } + */ + public static void block_count(MemorySegment struct, long index0, int fieldValue) { + block_count$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final SequenceLayout header_bytes$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("header_bytes")); + + /** + * Layout for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static final SequenceLayout header_bytes$layout() { + return header_bytes$LAYOUT; + } + + private static final long header_bytes$OFFSET = 36; + + /** + * Offset for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static final long header_bytes$offset() { + return header_bytes$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static MemorySegment header_bytes(MemorySegment struct) { + return struct.asSlice(header_bytes$OFFSET, header_bytes$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static void header_bytes(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, header_bytes$OFFSET, header_bytes$LAYOUT.byteSize()); + } + + private static long[] header_bytes$DIMS = { 2 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static long[] header_bytes$dimensions() { + return header_bytes$DIMS; + } + private static final VarHandle header_bytes$ELEM_HANDLE = header_bytes$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static int header_bytes(MemorySegment struct, long index0) { + return (int)header_bytes$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int header_bytes[2] + * } + */ + public static void header_bytes(MemorySegment struct, long index0, int fieldValue) { + header_bytes$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final SequenceLayout residual_bytes$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("residual_bytes")); + + /** + * Layout for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static final SequenceLayout residual_bytes$layout() { + return residual_bytes$LAYOUT; + } + + private static final long residual_bytes$OFFSET = 44; + + /** + * Offset for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static final long residual_bytes$offset() { + return residual_bytes$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static MemorySegment residual_bytes(MemorySegment struct) { + return struct.asSlice(residual_bytes$OFFSET, residual_bytes$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static void residual_bytes(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, residual_bytes$OFFSET, residual_bytes$LAYOUT.byteSize()); + } + + private static long[] residual_bytes$DIMS = { 3, 4 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static long[] residual_bytes$dimensions() { + return residual_bytes$DIMS; + } + private static final VarHandle residual_bytes$ELEM_HANDLE = residual_bytes$LAYOUT.varHandle(sequenceElement(), sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static int residual_bytes(MemorySegment struct, long index0, long index1) { + return (int)residual_bytes$ELEM_HANDLE.get(struct, 0L, index0, index1); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int residual_bytes[3][4] + * } + */ + public static void residual_bytes(MemorySegment struct, long index0, long index1, int fieldValue) { + residual_bytes$ELEM_HANDLE.set(struct, 0L, index0, index1, fieldValue); + } + + private static final SequenceLayout segment_size$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("segment_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static final SequenceLayout segment_size$layout() { + return segment_size$LAYOUT; + } + + private static final long segment_size$OFFSET = 92; + + /** + * Offset for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static final long segment_size$offset() { + return segment_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static MemorySegment segment_size(MemorySegment struct) { + return struct.asSlice(segment_size$OFFSET, segment_size$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static void segment_size(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, segment_size$OFFSET, segment_size$LAYOUT.byteSize()); + } + + private static long[] segment_size$DIMS = { 4 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static long[] segment_size$dimensions() { + return segment_size$DIMS; + } + private static final VarHandle segment_size$ELEM_HANDLE = segment_size$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static int segment_size(MemorySegment struct, long index0) { + return (int)segment_size$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int segment_size[4] + * } + */ + public static void segment_size(MemorySegment struct, long index0, int fieldValue) { + segment_size$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final SequenceLayout segment_quant$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("segment_quant")); + + /** + * Layout for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static final SequenceLayout segment_quant$layout() { + return segment_quant$LAYOUT; + } + + private static final long segment_quant$OFFSET = 108; + + /** + * Offset for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static final long segment_quant$offset() { + return segment_quant$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static MemorySegment segment_quant(MemorySegment struct) { + return struct.asSlice(segment_quant$OFFSET, segment_quant$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static void segment_quant(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, segment_quant$OFFSET, segment_quant$LAYOUT.byteSize()); + } + + private static long[] segment_quant$DIMS = { 4 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static long[] segment_quant$dimensions() { + return segment_quant$DIMS; + } + private static final VarHandle segment_quant$ELEM_HANDLE = segment_quant$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static int segment_quant(MemorySegment struct, long index0) { + return (int)segment_quant$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int segment_quant[4] + * } + */ + public static void segment_quant(MemorySegment struct, long index0, int fieldValue) { + segment_quant$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final SequenceLayout segment_level$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("segment_level")); + + /** + * Layout for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static final SequenceLayout segment_level$layout() { + return segment_level$LAYOUT; + } + + private static final long segment_level$OFFSET = 124; + + /** + * Offset for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static final long segment_level$offset() { + return segment_level$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static MemorySegment segment_level(MemorySegment struct) { + return struct.asSlice(segment_level$OFFSET, segment_level$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static void segment_level(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, segment_level$OFFSET, segment_level$LAYOUT.byteSize()); + } + + private static long[] segment_level$DIMS = { 4 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static long[] segment_level$dimensions() { + return segment_level$DIMS; + } + private static final VarHandle segment_level$ELEM_HANDLE = segment_level$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static int segment_level(MemorySegment struct, long index0) { + return (int)segment_level$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * int segment_level[4] + * } + */ + public static void segment_level(MemorySegment struct, long index0, int fieldValue) { + segment_level$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final OfInt alpha_data_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("alpha_data_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int alpha_data_size + * } + */ + public static final OfInt alpha_data_size$layout() { + return alpha_data_size$LAYOUT; + } + + private static final long alpha_data_size$OFFSET = 140; + + /** + * Offset for field: + * {@snippet lang=c : + * int alpha_data_size + * } + */ + public static final long alpha_data_size$offset() { + return alpha_data_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int alpha_data_size + * } + */ + public static int alpha_data_size(MemorySegment struct) { + return struct.get(alpha_data_size$LAYOUT, alpha_data_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int alpha_data_size + * } + */ + public static void alpha_data_size(MemorySegment struct, int fieldValue) { + struct.set(alpha_data_size$LAYOUT, alpha_data_size$OFFSET, fieldValue); + } + + private static final OfInt layer_data_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("layer_data_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int layer_data_size + * } + */ + public static final OfInt layer_data_size$layout() { + return layer_data_size$LAYOUT; + } + + private static final long layer_data_size$OFFSET = 144; + + /** + * Offset for field: + * {@snippet lang=c : + * int layer_data_size + * } + */ + public static final long layer_data_size$offset() { + return layer_data_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int layer_data_size + * } + */ + public static int layer_data_size(MemorySegment struct) { + return struct.get(layer_data_size$LAYOUT, layer_data_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int layer_data_size + * } + */ + public static void layer_data_size(MemorySegment struct, int fieldValue) { + struct.set(layer_data_size$LAYOUT, layer_data_size$OFFSET, fieldValue); + } + + private static final OfInt lossless_features$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lossless_features")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t lossless_features + * } + */ + public static final OfInt lossless_features$layout() { + return lossless_features$LAYOUT; + } + + private static final long lossless_features$OFFSET = 148; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t lossless_features + * } + */ + public static final long lossless_features$offset() { + return lossless_features$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t lossless_features + * } + */ + public static int lossless_features(MemorySegment struct) { + return struct.get(lossless_features$LAYOUT, lossless_features$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t lossless_features + * } + */ + public static void lossless_features(MemorySegment struct, int fieldValue) { + struct.set(lossless_features$LAYOUT, lossless_features$OFFSET, fieldValue); + } + + private static final OfInt histogram_bits$LAYOUT = (OfInt)$LAYOUT.select(groupElement("histogram_bits")); + + /** + * Layout for field: + * {@snippet lang=c : + * int histogram_bits + * } + */ + public static final OfInt histogram_bits$layout() { + return histogram_bits$LAYOUT; + } + + private static final long histogram_bits$OFFSET = 152; + + /** + * Offset for field: + * {@snippet lang=c : + * int histogram_bits + * } + */ + public static final long histogram_bits$offset() { + return histogram_bits$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int histogram_bits + * } + */ + public static int histogram_bits(MemorySegment struct) { + return struct.get(histogram_bits$LAYOUT, histogram_bits$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int histogram_bits + * } + */ + public static void histogram_bits(MemorySegment struct, int fieldValue) { + struct.set(histogram_bits$LAYOUT, histogram_bits$OFFSET, fieldValue); + } + + private static final OfInt transform_bits$LAYOUT = (OfInt)$LAYOUT.select(groupElement("transform_bits")); + + /** + * Layout for field: + * {@snippet lang=c : + * int transform_bits + * } + */ + public static final OfInt transform_bits$layout() { + return transform_bits$LAYOUT; + } + + private static final long transform_bits$OFFSET = 156; + + /** + * Offset for field: + * {@snippet lang=c : + * int transform_bits + * } + */ + public static final long transform_bits$offset() { + return transform_bits$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int transform_bits + * } + */ + public static int transform_bits(MemorySegment struct) { + return struct.get(transform_bits$LAYOUT, transform_bits$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int transform_bits + * } + */ + public static void transform_bits(MemorySegment struct, int fieldValue) { + struct.set(transform_bits$LAYOUT, transform_bits$OFFSET, fieldValue); + } + + private static final OfInt cache_bits$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cache_bits")); + + /** + * Layout for field: + * {@snippet lang=c : + * int cache_bits + * } + */ + public static final OfInt cache_bits$layout() { + return cache_bits$LAYOUT; + } + + private static final long cache_bits$OFFSET = 160; + + /** + * Offset for field: + * {@snippet lang=c : + * int cache_bits + * } + */ + public static final long cache_bits$offset() { + return cache_bits$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int cache_bits + * } + */ + public static int cache_bits(MemorySegment struct) { + return struct.get(cache_bits$LAYOUT, cache_bits$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int cache_bits + * } + */ + public static void cache_bits(MemorySegment struct, int fieldValue) { + struct.set(cache_bits$LAYOUT, cache_bits$OFFSET, fieldValue); + } + + private static final OfInt palette_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("palette_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int palette_size + * } + */ + public static final OfInt palette_size$layout() { + return palette_size$LAYOUT; + } + + private static final long palette_size$OFFSET = 164; + + /** + * Offset for field: + * {@snippet lang=c : + * int palette_size + * } + */ + public static final long palette_size$offset() { + return palette_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int palette_size + * } + */ + public static int palette_size(MemorySegment struct) { + return struct.get(palette_size$LAYOUT, palette_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int palette_size + * } + */ + public static void palette_size(MemorySegment struct, int fieldValue) { + struct.set(palette_size$LAYOUT, palette_size$OFFSET, fieldValue); + } + + private static final OfInt lossless_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lossless_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int lossless_size + * } + */ + public static final OfInt lossless_size$layout() { + return lossless_size$LAYOUT; + } + + private static final long lossless_size$OFFSET = 168; + + /** + * Offset for field: + * {@snippet lang=c : + * int lossless_size + * } + */ + public static final long lossless_size$offset() { + return lossless_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int lossless_size + * } + */ + public static int lossless_size(MemorySegment struct) { + return struct.get(lossless_size$LAYOUT, lossless_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int lossless_size + * } + */ + public static void lossless_size(MemorySegment struct, int fieldValue) { + struct.set(lossless_size$LAYOUT, lossless_size$OFFSET, fieldValue); + } + + private static final OfInt lossless_hdr_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lossless_hdr_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int lossless_hdr_size + * } + */ + public static final OfInt lossless_hdr_size$layout() { + return lossless_hdr_size$LAYOUT; + } + + private static final long lossless_hdr_size$OFFSET = 172; + + /** + * Offset for field: + * {@snippet lang=c : + * int lossless_hdr_size + * } + */ + public static final long lossless_hdr_size$offset() { + return lossless_hdr_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int lossless_hdr_size + * } + */ + public static int lossless_hdr_size(MemorySegment struct) { + return struct.get(lossless_hdr_size$LAYOUT, lossless_hdr_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int lossless_hdr_size + * } + */ + public static void lossless_hdr_size(MemorySegment struct, int fieldValue) { + struct.set(lossless_hdr_size$LAYOUT, lossless_hdr_size$OFFSET, fieldValue); + } + + private static final OfInt lossless_data_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lossless_data_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int lossless_data_size + * } + */ + public static final OfInt lossless_data_size$layout() { + return lossless_data_size$LAYOUT; + } + + private static final long lossless_data_size$OFFSET = 176; + + /** + * Offset for field: + * {@snippet lang=c : + * int lossless_data_size + * } + */ + public static final long lossless_data_size$offset() { + return lossless_data_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int lossless_data_size + * } + */ + public static int lossless_data_size(MemorySegment struct) { + return struct.get(lossless_data_size$LAYOUT, lossless_data_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int lossless_data_size + * } + */ + public static void lossless_data_size(MemorySegment struct, int fieldValue) { + struct.set(lossless_data_size$LAYOUT, lossless_data_size$OFFSET, fieldValue); + } + + private static final SequenceLayout pad$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static final SequenceLayout pad$layout() { + return pad$LAYOUT; + } + + private static final long pad$OFFSET = 180; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static final long pad$offset() { + return pad$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static MemorySegment pad(MemorySegment struct) { + return struct.asSlice(pad$OFFSET, pad$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static void pad(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad$OFFSET, pad$LAYOUT.byteSize()); + } + + private static long[] pad$DIMS = { 2 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static long[] pad$dimensions() { + return pad$DIMS; + } + private static final VarHandle pad$ELEM_HANDLE = pad$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static int pad(MemorySegment struct, long index0) { + return (int)pad$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad[2] + * } + */ + public static void pad(MemorySegment struct, long index0, int fieldValue) { + pad$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + /** + * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. + * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} + */ + public static MemorySegment asSlice(MemorySegment array, long index) { + return array.asSlice(layout().byteSize() * index); + } + + /** + * The size (in bytes) of this struct + */ + public static long sizeof() { return layout().byteSize(); } + + /** + * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} + */ + public static MemorySegment allocate(SegmentAllocator allocator) { + return allocator.allocate(layout()); + } + + /** + * Allocate an array of size {@code elementCount} using {@code allocator}. + * The returned segment has size {@code elementCount * layout().byteSize()}. + */ + public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { + return reinterpret(addr, 1, arena, cleanup); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code elementCount * layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { + return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPBitstreamFeatures.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPBitstreamFeatures.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPBitstreamFeatures.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPBitstreamFeatures.java index 9bfd46f..5125840 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPBitstreamFeatures.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPBitstreamFeatures.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPChunkIterator.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPChunkIterator.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPChunkIterator.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPChunkIterator.java index 7b946bb..6dc7e9d 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPChunkIterator.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPChunkIterator.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPConfig.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPConfig.java new file mode 100644 index 0000000..41ef63b --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPConfig.java @@ -0,0 +1,1415 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * struct WebPConfig { + * int lossless; + * float quality; + * int method; + * WebPImageHint image_hint; + * int target_size; + * float target_PSNR; + * int segments; + * int sns_strength; + * int filter_strength; + * int filter_sharpness; + * int filter_type; + * int autofilter; + * int alpha_compression; + * int alpha_filtering; + * int alpha_quality; + * int pass; + * int show_compressed; + * int preprocessing; + * int partitions; + * int partition_limit; + * int emulate_jpeg_size; + * int thread_level; + * int low_memory; + * int near_lossless; + * int exact; + * int use_delta_palette; + * int use_sharp_yuv; + * int qmin; + * int qmax; + * } + * } + */ +public class WebPConfig { + + WebPConfig() { + // Should not be called directly + } + + private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( + encode_h.C_INT.withName("lossless"), + encode_h.C_FLOAT.withName("quality"), + encode_h.C_INT.withName("method"), + encode_h.C_INT.withName("image_hint"), + encode_h.C_INT.withName("target_size"), + encode_h.C_FLOAT.withName("target_PSNR"), + encode_h.C_INT.withName("segments"), + encode_h.C_INT.withName("sns_strength"), + encode_h.C_INT.withName("filter_strength"), + encode_h.C_INT.withName("filter_sharpness"), + encode_h.C_INT.withName("filter_type"), + encode_h.C_INT.withName("autofilter"), + encode_h.C_INT.withName("alpha_compression"), + encode_h.C_INT.withName("alpha_filtering"), + encode_h.C_INT.withName("alpha_quality"), + encode_h.C_INT.withName("pass"), + encode_h.C_INT.withName("show_compressed"), + encode_h.C_INT.withName("preprocessing"), + encode_h.C_INT.withName("partitions"), + encode_h.C_INT.withName("partition_limit"), + encode_h.C_INT.withName("emulate_jpeg_size"), + encode_h.C_INT.withName("thread_level"), + encode_h.C_INT.withName("low_memory"), + encode_h.C_INT.withName("near_lossless"), + encode_h.C_INT.withName("exact"), + encode_h.C_INT.withName("use_delta_palette"), + encode_h.C_INT.withName("use_sharp_yuv"), + encode_h.C_INT.withName("qmin"), + encode_h.C_INT.withName("qmax") + ).withName("WebPConfig"); + + /** + * The layout of this struct + */ + public static final GroupLayout layout() { + return $LAYOUT; + } + + private static final OfInt lossless$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lossless")); + + /** + * Layout for field: + * {@snippet lang=c : + * int lossless + * } + */ + public static final OfInt lossless$layout() { + return lossless$LAYOUT; + } + + private static final long lossless$OFFSET = 0; + + /** + * Offset for field: + * {@snippet lang=c : + * int lossless + * } + */ + public static final long lossless$offset() { + return lossless$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int lossless + * } + */ + public static int lossless(MemorySegment struct) { + return struct.get(lossless$LAYOUT, lossless$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int lossless + * } + */ + public static void lossless(MemorySegment struct, int fieldValue) { + struct.set(lossless$LAYOUT, lossless$OFFSET, fieldValue); + } + + private static final OfFloat quality$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("quality")); + + /** + * Layout for field: + * {@snippet lang=c : + * float quality + * } + */ + public static final OfFloat quality$layout() { + return quality$LAYOUT; + } + + private static final long quality$OFFSET = 4; + + /** + * Offset for field: + * {@snippet lang=c : + * float quality + * } + */ + public static final long quality$offset() { + return quality$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * float quality + * } + */ + public static float quality(MemorySegment struct) { + return struct.get(quality$LAYOUT, quality$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * float quality + * } + */ + public static void quality(MemorySegment struct, float fieldValue) { + struct.set(quality$LAYOUT, quality$OFFSET, fieldValue); + } + + private static final OfInt method$LAYOUT = (OfInt)$LAYOUT.select(groupElement("method")); + + /** + * Layout for field: + * {@snippet lang=c : + * int method + * } + */ + public static final OfInt method$layout() { + return method$LAYOUT; + } + + private static final long method$OFFSET = 8; + + /** + * Offset for field: + * {@snippet lang=c : + * int method + * } + */ + public static final long method$offset() { + return method$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int method + * } + */ + public static int method(MemorySegment struct) { + return struct.get(method$LAYOUT, method$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int method + * } + */ + public static void method(MemorySegment struct, int fieldValue) { + struct.set(method$LAYOUT, method$OFFSET, fieldValue); + } + + private static final OfInt image_hint$LAYOUT = (OfInt)$LAYOUT.select(groupElement("image_hint")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPImageHint image_hint + * } + */ + public static final OfInt image_hint$layout() { + return image_hint$LAYOUT; + } + + private static final long image_hint$OFFSET = 12; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPImageHint image_hint + * } + */ + public static final long image_hint$offset() { + return image_hint$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPImageHint image_hint + * } + */ + public static int image_hint(MemorySegment struct) { + return struct.get(image_hint$LAYOUT, image_hint$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPImageHint image_hint + * } + */ + public static void image_hint(MemorySegment struct, int fieldValue) { + struct.set(image_hint$LAYOUT, image_hint$OFFSET, fieldValue); + } + + private static final OfInt target_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("target_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int target_size + * } + */ + public static final OfInt target_size$layout() { + return target_size$LAYOUT; + } + + private static final long target_size$OFFSET = 16; + + /** + * Offset for field: + * {@snippet lang=c : + * int target_size + * } + */ + public static final long target_size$offset() { + return target_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int target_size + * } + */ + public static int target_size(MemorySegment struct) { + return struct.get(target_size$LAYOUT, target_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int target_size + * } + */ + public static void target_size(MemorySegment struct, int fieldValue) { + struct.set(target_size$LAYOUT, target_size$OFFSET, fieldValue); + } + + private static final OfFloat target_PSNR$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("target_PSNR")); + + /** + * Layout for field: + * {@snippet lang=c : + * float target_PSNR + * } + */ + public static final OfFloat target_PSNR$layout() { + return target_PSNR$LAYOUT; + } + + private static final long target_PSNR$OFFSET = 20; + + /** + * Offset for field: + * {@snippet lang=c : + * float target_PSNR + * } + */ + public static final long target_PSNR$offset() { + return target_PSNR$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * float target_PSNR + * } + */ + public static float target_PSNR(MemorySegment struct) { + return struct.get(target_PSNR$LAYOUT, target_PSNR$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * float target_PSNR + * } + */ + public static void target_PSNR(MemorySegment struct, float fieldValue) { + struct.set(target_PSNR$LAYOUT, target_PSNR$OFFSET, fieldValue); + } + + private static final OfInt segments$LAYOUT = (OfInt)$LAYOUT.select(groupElement("segments")); + + /** + * Layout for field: + * {@snippet lang=c : + * int segments + * } + */ + public static final OfInt segments$layout() { + return segments$LAYOUT; + } + + private static final long segments$OFFSET = 24; + + /** + * Offset for field: + * {@snippet lang=c : + * int segments + * } + */ + public static final long segments$offset() { + return segments$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int segments + * } + */ + public static int segments(MemorySegment struct) { + return struct.get(segments$LAYOUT, segments$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int segments + * } + */ + public static void segments(MemorySegment struct, int fieldValue) { + struct.set(segments$LAYOUT, segments$OFFSET, fieldValue); + } + + private static final OfInt sns_strength$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sns_strength")); + + /** + * Layout for field: + * {@snippet lang=c : + * int sns_strength + * } + */ + public static final OfInt sns_strength$layout() { + return sns_strength$LAYOUT; + } + + private static final long sns_strength$OFFSET = 28; + + /** + * Offset for field: + * {@snippet lang=c : + * int sns_strength + * } + */ + public static final long sns_strength$offset() { + return sns_strength$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int sns_strength + * } + */ + public static int sns_strength(MemorySegment struct) { + return struct.get(sns_strength$LAYOUT, sns_strength$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int sns_strength + * } + */ + public static void sns_strength(MemorySegment struct, int fieldValue) { + struct.set(sns_strength$LAYOUT, sns_strength$OFFSET, fieldValue); + } + + private static final OfInt filter_strength$LAYOUT = (OfInt)$LAYOUT.select(groupElement("filter_strength")); + + /** + * Layout for field: + * {@snippet lang=c : + * int filter_strength + * } + */ + public static final OfInt filter_strength$layout() { + return filter_strength$LAYOUT; + } + + private static final long filter_strength$OFFSET = 32; + + /** + * Offset for field: + * {@snippet lang=c : + * int filter_strength + * } + */ + public static final long filter_strength$offset() { + return filter_strength$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int filter_strength + * } + */ + public static int filter_strength(MemorySegment struct) { + return struct.get(filter_strength$LAYOUT, filter_strength$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int filter_strength + * } + */ + public static void filter_strength(MemorySegment struct, int fieldValue) { + struct.set(filter_strength$LAYOUT, filter_strength$OFFSET, fieldValue); + } + + private static final OfInt filter_sharpness$LAYOUT = (OfInt)$LAYOUT.select(groupElement("filter_sharpness")); + + /** + * Layout for field: + * {@snippet lang=c : + * int filter_sharpness + * } + */ + public static final OfInt filter_sharpness$layout() { + return filter_sharpness$LAYOUT; + } + + private static final long filter_sharpness$OFFSET = 36; + + /** + * Offset for field: + * {@snippet lang=c : + * int filter_sharpness + * } + */ + public static final long filter_sharpness$offset() { + return filter_sharpness$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int filter_sharpness + * } + */ + public static int filter_sharpness(MemorySegment struct) { + return struct.get(filter_sharpness$LAYOUT, filter_sharpness$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int filter_sharpness + * } + */ + public static void filter_sharpness(MemorySegment struct, int fieldValue) { + struct.set(filter_sharpness$LAYOUT, filter_sharpness$OFFSET, fieldValue); + } + + private static final OfInt filter_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("filter_type")); + + /** + * Layout for field: + * {@snippet lang=c : + * int filter_type + * } + */ + public static final OfInt filter_type$layout() { + return filter_type$LAYOUT; + } + + private static final long filter_type$OFFSET = 40; + + /** + * Offset for field: + * {@snippet lang=c : + * int filter_type + * } + */ + public static final long filter_type$offset() { + return filter_type$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int filter_type + * } + */ + public static int filter_type(MemorySegment struct) { + return struct.get(filter_type$LAYOUT, filter_type$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int filter_type + * } + */ + public static void filter_type(MemorySegment struct, int fieldValue) { + struct.set(filter_type$LAYOUT, filter_type$OFFSET, fieldValue); + } + + private static final OfInt autofilter$LAYOUT = (OfInt)$LAYOUT.select(groupElement("autofilter")); + + /** + * Layout for field: + * {@snippet lang=c : + * int autofilter + * } + */ + public static final OfInt autofilter$layout() { + return autofilter$LAYOUT; + } + + private static final long autofilter$OFFSET = 44; + + /** + * Offset for field: + * {@snippet lang=c : + * int autofilter + * } + */ + public static final long autofilter$offset() { + return autofilter$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int autofilter + * } + */ + public static int autofilter(MemorySegment struct) { + return struct.get(autofilter$LAYOUT, autofilter$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int autofilter + * } + */ + public static void autofilter(MemorySegment struct, int fieldValue) { + struct.set(autofilter$LAYOUT, autofilter$OFFSET, fieldValue); + } + + private static final OfInt alpha_compression$LAYOUT = (OfInt)$LAYOUT.select(groupElement("alpha_compression")); + + /** + * Layout for field: + * {@snippet lang=c : + * int alpha_compression + * } + */ + public static final OfInt alpha_compression$layout() { + return alpha_compression$LAYOUT; + } + + private static final long alpha_compression$OFFSET = 48; + + /** + * Offset for field: + * {@snippet lang=c : + * int alpha_compression + * } + */ + public static final long alpha_compression$offset() { + return alpha_compression$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int alpha_compression + * } + */ + public static int alpha_compression(MemorySegment struct) { + return struct.get(alpha_compression$LAYOUT, alpha_compression$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int alpha_compression + * } + */ + public static void alpha_compression(MemorySegment struct, int fieldValue) { + struct.set(alpha_compression$LAYOUT, alpha_compression$OFFSET, fieldValue); + } + + private static final OfInt alpha_filtering$LAYOUT = (OfInt)$LAYOUT.select(groupElement("alpha_filtering")); + + /** + * Layout for field: + * {@snippet lang=c : + * int alpha_filtering + * } + */ + public static final OfInt alpha_filtering$layout() { + return alpha_filtering$LAYOUT; + } + + private static final long alpha_filtering$OFFSET = 52; + + /** + * Offset for field: + * {@snippet lang=c : + * int alpha_filtering + * } + */ + public static final long alpha_filtering$offset() { + return alpha_filtering$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int alpha_filtering + * } + */ + public static int alpha_filtering(MemorySegment struct) { + return struct.get(alpha_filtering$LAYOUT, alpha_filtering$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int alpha_filtering + * } + */ + public static void alpha_filtering(MemorySegment struct, int fieldValue) { + struct.set(alpha_filtering$LAYOUT, alpha_filtering$OFFSET, fieldValue); + } + + private static final OfInt alpha_quality$LAYOUT = (OfInt)$LAYOUT.select(groupElement("alpha_quality")); + + /** + * Layout for field: + * {@snippet lang=c : + * int alpha_quality + * } + */ + public static final OfInt alpha_quality$layout() { + return alpha_quality$LAYOUT; + } + + private static final long alpha_quality$OFFSET = 56; + + /** + * Offset for field: + * {@snippet lang=c : + * int alpha_quality + * } + */ + public static final long alpha_quality$offset() { + return alpha_quality$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int alpha_quality + * } + */ + public static int alpha_quality(MemorySegment struct) { + return struct.get(alpha_quality$LAYOUT, alpha_quality$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int alpha_quality + * } + */ + public static void alpha_quality(MemorySegment struct, int fieldValue) { + struct.set(alpha_quality$LAYOUT, alpha_quality$OFFSET, fieldValue); + } + + private static final OfInt pass$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pass")); + + /** + * Layout for field: + * {@snippet lang=c : + * int pass + * } + */ + public static final OfInt pass$layout() { + return pass$LAYOUT; + } + + private static final long pass$OFFSET = 60; + + /** + * Offset for field: + * {@snippet lang=c : + * int pass + * } + */ + public static final long pass$offset() { + return pass$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int pass + * } + */ + public static int pass(MemorySegment struct) { + return struct.get(pass$LAYOUT, pass$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int pass + * } + */ + public static void pass(MemorySegment struct, int fieldValue) { + struct.set(pass$LAYOUT, pass$OFFSET, fieldValue); + } + + private static final OfInt show_compressed$LAYOUT = (OfInt)$LAYOUT.select(groupElement("show_compressed")); + + /** + * Layout for field: + * {@snippet lang=c : + * int show_compressed + * } + */ + public static final OfInt show_compressed$layout() { + return show_compressed$LAYOUT; + } + + private static final long show_compressed$OFFSET = 64; + + /** + * Offset for field: + * {@snippet lang=c : + * int show_compressed + * } + */ + public static final long show_compressed$offset() { + return show_compressed$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int show_compressed + * } + */ + public static int show_compressed(MemorySegment struct) { + return struct.get(show_compressed$LAYOUT, show_compressed$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int show_compressed + * } + */ + public static void show_compressed(MemorySegment struct, int fieldValue) { + struct.set(show_compressed$LAYOUT, show_compressed$OFFSET, fieldValue); + } + + private static final OfInt preprocessing$LAYOUT = (OfInt)$LAYOUT.select(groupElement("preprocessing")); + + /** + * Layout for field: + * {@snippet lang=c : + * int preprocessing + * } + */ + public static final OfInt preprocessing$layout() { + return preprocessing$LAYOUT; + } + + private static final long preprocessing$OFFSET = 68; + + /** + * Offset for field: + * {@snippet lang=c : + * int preprocessing + * } + */ + public static final long preprocessing$offset() { + return preprocessing$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int preprocessing + * } + */ + public static int preprocessing(MemorySegment struct) { + return struct.get(preprocessing$LAYOUT, preprocessing$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int preprocessing + * } + */ + public static void preprocessing(MemorySegment struct, int fieldValue) { + struct.set(preprocessing$LAYOUT, preprocessing$OFFSET, fieldValue); + } + + private static final OfInt partitions$LAYOUT = (OfInt)$LAYOUT.select(groupElement("partitions")); + + /** + * Layout for field: + * {@snippet lang=c : + * int partitions + * } + */ + public static final OfInt partitions$layout() { + return partitions$LAYOUT; + } + + private static final long partitions$OFFSET = 72; + + /** + * Offset for field: + * {@snippet lang=c : + * int partitions + * } + */ + public static final long partitions$offset() { + return partitions$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int partitions + * } + */ + public static int partitions(MemorySegment struct) { + return struct.get(partitions$LAYOUT, partitions$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int partitions + * } + */ + public static void partitions(MemorySegment struct, int fieldValue) { + struct.set(partitions$LAYOUT, partitions$OFFSET, fieldValue); + } + + private static final OfInt partition_limit$LAYOUT = (OfInt)$LAYOUT.select(groupElement("partition_limit")); + + /** + * Layout for field: + * {@snippet lang=c : + * int partition_limit + * } + */ + public static final OfInt partition_limit$layout() { + return partition_limit$LAYOUT; + } + + private static final long partition_limit$OFFSET = 76; + + /** + * Offset for field: + * {@snippet lang=c : + * int partition_limit + * } + */ + public static final long partition_limit$offset() { + return partition_limit$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int partition_limit + * } + */ + public static int partition_limit(MemorySegment struct) { + return struct.get(partition_limit$LAYOUT, partition_limit$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int partition_limit + * } + */ + public static void partition_limit(MemorySegment struct, int fieldValue) { + struct.set(partition_limit$LAYOUT, partition_limit$OFFSET, fieldValue); + } + + private static final OfInt emulate_jpeg_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("emulate_jpeg_size")); + + /** + * Layout for field: + * {@snippet lang=c : + * int emulate_jpeg_size + * } + */ + public static final OfInt emulate_jpeg_size$layout() { + return emulate_jpeg_size$LAYOUT; + } + + private static final long emulate_jpeg_size$OFFSET = 80; + + /** + * Offset for field: + * {@snippet lang=c : + * int emulate_jpeg_size + * } + */ + public static final long emulate_jpeg_size$offset() { + return emulate_jpeg_size$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int emulate_jpeg_size + * } + */ + public static int emulate_jpeg_size(MemorySegment struct) { + return struct.get(emulate_jpeg_size$LAYOUT, emulate_jpeg_size$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int emulate_jpeg_size + * } + */ + public static void emulate_jpeg_size(MemorySegment struct, int fieldValue) { + struct.set(emulate_jpeg_size$LAYOUT, emulate_jpeg_size$OFFSET, fieldValue); + } + + private static final OfInt thread_level$LAYOUT = (OfInt)$LAYOUT.select(groupElement("thread_level")); + + /** + * Layout for field: + * {@snippet lang=c : + * int thread_level + * } + */ + public static final OfInt thread_level$layout() { + return thread_level$LAYOUT; + } + + private static final long thread_level$OFFSET = 84; + + /** + * Offset for field: + * {@snippet lang=c : + * int thread_level + * } + */ + public static final long thread_level$offset() { + return thread_level$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int thread_level + * } + */ + public static int thread_level(MemorySegment struct) { + return struct.get(thread_level$LAYOUT, thread_level$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int thread_level + * } + */ + public static void thread_level(MemorySegment struct, int fieldValue) { + struct.set(thread_level$LAYOUT, thread_level$OFFSET, fieldValue); + } + + private static final OfInt low_memory$LAYOUT = (OfInt)$LAYOUT.select(groupElement("low_memory")); + + /** + * Layout for field: + * {@snippet lang=c : + * int low_memory + * } + */ + public static final OfInt low_memory$layout() { + return low_memory$LAYOUT; + } + + private static final long low_memory$OFFSET = 88; + + /** + * Offset for field: + * {@snippet lang=c : + * int low_memory + * } + */ + public static final long low_memory$offset() { + return low_memory$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int low_memory + * } + */ + public static int low_memory(MemorySegment struct) { + return struct.get(low_memory$LAYOUT, low_memory$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int low_memory + * } + */ + public static void low_memory(MemorySegment struct, int fieldValue) { + struct.set(low_memory$LAYOUT, low_memory$OFFSET, fieldValue); + } + + private static final OfInt near_lossless$LAYOUT = (OfInt)$LAYOUT.select(groupElement("near_lossless")); + + /** + * Layout for field: + * {@snippet lang=c : + * int near_lossless + * } + */ + public static final OfInt near_lossless$layout() { + return near_lossless$LAYOUT; + } + + private static final long near_lossless$OFFSET = 92; + + /** + * Offset for field: + * {@snippet lang=c : + * int near_lossless + * } + */ + public static final long near_lossless$offset() { + return near_lossless$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int near_lossless + * } + */ + public static int near_lossless(MemorySegment struct) { + return struct.get(near_lossless$LAYOUT, near_lossless$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int near_lossless + * } + */ + public static void near_lossless(MemorySegment struct, int fieldValue) { + struct.set(near_lossless$LAYOUT, near_lossless$OFFSET, fieldValue); + } + + private static final OfInt exact$LAYOUT = (OfInt)$LAYOUT.select(groupElement("exact")); + + /** + * Layout for field: + * {@snippet lang=c : + * int exact + * } + */ + public static final OfInt exact$layout() { + return exact$LAYOUT; + } + + private static final long exact$OFFSET = 96; + + /** + * Offset for field: + * {@snippet lang=c : + * int exact + * } + */ + public static final long exact$offset() { + return exact$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int exact + * } + */ + public static int exact(MemorySegment struct) { + return struct.get(exact$LAYOUT, exact$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int exact + * } + */ + public static void exact(MemorySegment struct, int fieldValue) { + struct.set(exact$LAYOUT, exact$OFFSET, fieldValue); + } + + private static final OfInt use_delta_palette$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_delta_palette")); + + /** + * Layout for field: + * {@snippet lang=c : + * int use_delta_palette + * } + */ + public static final OfInt use_delta_palette$layout() { + return use_delta_palette$LAYOUT; + } + + private static final long use_delta_palette$OFFSET = 100; + + /** + * Offset for field: + * {@snippet lang=c : + * int use_delta_palette + * } + */ + public static final long use_delta_palette$offset() { + return use_delta_palette$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int use_delta_palette + * } + */ + public static int use_delta_palette(MemorySegment struct) { + return struct.get(use_delta_palette$LAYOUT, use_delta_palette$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int use_delta_palette + * } + */ + public static void use_delta_palette(MemorySegment struct, int fieldValue) { + struct.set(use_delta_palette$LAYOUT, use_delta_palette$OFFSET, fieldValue); + } + + private static final OfInt use_sharp_yuv$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_sharp_yuv")); + + /** + * Layout for field: + * {@snippet lang=c : + * int use_sharp_yuv + * } + */ + public static final OfInt use_sharp_yuv$layout() { + return use_sharp_yuv$LAYOUT; + } + + private static final long use_sharp_yuv$OFFSET = 104; + + /** + * Offset for field: + * {@snippet lang=c : + * int use_sharp_yuv + * } + */ + public static final long use_sharp_yuv$offset() { + return use_sharp_yuv$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int use_sharp_yuv + * } + */ + public static int use_sharp_yuv(MemorySegment struct) { + return struct.get(use_sharp_yuv$LAYOUT, use_sharp_yuv$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int use_sharp_yuv + * } + */ + public static void use_sharp_yuv(MemorySegment struct, int fieldValue) { + struct.set(use_sharp_yuv$LAYOUT, use_sharp_yuv$OFFSET, fieldValue); + } + + private static final OfInt qmin$LAYOUT = (OfInt)$LAYOUT.select(groupElement("qmin")); + + /** + * Layout for field: + * {@snippet lang=c : + * int qmin + * } + */ + public static final OfInt qmin$layout() { + return qmin$LAYOUT; + } + + private static final long qmin$OFFSET = 108; + + /** + * Offset for field: + * {@snippet lang=c : + * int qmin + * } + */ + public static final long qmin$offset() { + return qmin$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int qmin + * } + */ + public static int qmin(MemorySegment struct) { + return struct.get(qmin$LAYOUT, qmin$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int qmin + * } + */ + public static void qmin(MemorySegment struct, int fieldValue) { + struct.set(qmin$LAYOUT, qmin$OFFSET, fieldValue); + } + + private static final OfInt qmax$LAYOUT = (OfInt)$LAYOUT.select(groupElement("qmax")); + + /** + * Layout for field: + * {@snippet lang=c : + * int qmax + * } + */ + public static final OfInt qmax$layout() { + return qmax$LAYOUT; + } + + private static final long qmax$OFFSET = 112; + + /** + * Offset for field: + * {@snippet lang=c : + * int qmax + * } + */ + public static final long qmax$offset() { + return qmax$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int qmax + * } + */ + public static int qmax(MemorySegment struct) { + return struct.get(qmax$LAYOUT, qmax$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int qmax + * } + */ + public static void qmax(MemorySegment struct, int fieldValue) { + struct.set(qmax$LAYOUT, qmax$OFFSET, fieldValue); + } + + /** + * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. + * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} + */ + public static MemorySegment asSlice(MemorySegment array, long index) { + return array.asSlice(layout().byteSize() * index); + } + + /** + * The size (in bytes) of this struct + */ + public static long sizeof() { return layout().byteSize(); } + + /** + * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} + */ + public static MemorySegment allocate(SegmentAllocator allocator) { + return allocator.allocate(layout()); + } + + /** + * Allocate an array of size {@code elementCount} using {@code allocator}. + * The returned segment has size {@code elementCount * layout().byteSize()}. + */ + public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { + return reinterpret(addr, 1, arena, cleanup); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code elementCount * layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { + return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPData.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPData.java similarity index 97% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPData.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPData.java index 78ff9e9..f39b6d5 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPData.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPData.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -28,7 +28,7 @@ public class WebPData { private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( demux_h.C_POINTER.withName("bytes"), - demux_h.C_LONG.withName("size") + demux_h.C_LONG_LONG.withName("size") ).withName("WebPData"); /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecBuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecBuffer.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecBuffer.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecBuffer.java index 7f9a5bf..97f721a 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecBuffer.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecBuffer.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -244,7 +244,7 @@ public static class u { private static final GroupLayout $LAYOUT = MemoryLayout.unionLayout( WebPRGBABuffer.layout().withName("RGBA"), WebPYUVABuffer.layout().withName("YUVA") - ).withName("$anon$207:3"); + ).withName("$anon$206:3"); /** * The layout of this union diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderConfig.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderConfig.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderConfig.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderConfig.java index 94fcde4..0606af6 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderConfig.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderConfig.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderOptions.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderOptions.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderOptions.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderOptions.java index 6bc638c..8a88095 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPDecoderOptions.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPDecoderOptions.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPIterator.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPIterator.java similarity index 99% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPIterator.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPIterator.java index 7029019..cbd7ac9 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPIterator.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPIterator.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPBitstreamFeatures.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMemoryWriter.java similarity index 51% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPBitstreamFeatures.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMemoryWriter.java index c8e16ac..860165f 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPBitstreamFeatures.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMemoryWriter.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,30 +14,27 @@ /** * {@snippet lang=c : - * struct WebPBitstreamFeatures { - * int width; - * int height; - * int has_alpha; - * int has_animation; - * int format; - * uint32_t pad[5]; + * struct WebPMemoryWriter { + * uint8_t *mem; + * size_t size; + * size_t max_size; + * uint32_t pad[1]; * } * } */ -public class WebPBitstreamFeatures { +public class WebPMemoryWriter { - WebPBitstreamFeatures() { + WebPMemoryWriter() { // Should not be called directly } private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_INT.withName("width"), - demux_h.C_INT.withName("height"), - demux_h.C_INT.withName("has_alpha"), - demux_h.C_INT.withName("has_animation"), - demux_h.C_INT.withName("format"), - MemoryLayout.sequenceLayout(5, demux_h.C_INT).withName("pad") - ).withName("WebPBitstreamFeatures"); + encode_h.C_POINTER.withName("mem"), + encode_h.C_LONG_LONG.withName("size"), + encode_h.C_LONG_LONG.withName("max_size"), + MemoryLayout.sequenceLayout(1, encode_h.C_INT).withName("pad"), + MemoryLayout.paddingLayout(4) + ).withName("WebPMemoryWriter"); /** * The layout of this struct @@ -46,224 +43,136 @@ public static final GroupLayout layout() { return $LAYOUT; } - private static final OfInt width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("width")); + private static final AddressLayout mem$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("mem")); /** * Layout for field: * {@snippet lang=c : - * int width + * uint8_t *mem * } */ - public static final OfInt width$layout() { - return width$LAYOUT; + public static final AddressLayout mem$layout() { + return mem$LAYOUT; } - private static final long width$OFFSET = 0; + private static final long mem$OFFSET = 0; /** * Offset for field: * {@snippet lang=c : - * int width + * uint8_t *mem * } */ - public static final long width$offset() { - return width$OFFSET; + public static final long mem$offset() { + return mem$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * int width + * uint8_t *mem * } */ - public static int width(MemorySegment struct) { - return struct.get(width$LAYOUT, width$OFFSET); + public static MemorySegment mem(MemorySegment struct) { + return struct.get(mem$LAYOUT, mem$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * int width + * uint8_t *mem * } */ - public static void width(MemorySegment struct, int fieldValue) { - struct.set(width$LAYOUT, width$OFFSET, fieldValue); + public static void mem(MemorySegment struct, MemorySegment fieldValue) { + struct.set(mem$LAYOUT, mem$OFFSET, fieldValue); } - private static final OfInt height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("height")); + private static final OfLong size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("size")); /** * Layout for field: * {@snippet lang=c : - * int height + * size_t size * } */ - public static final OfInt height$layout() { - return height$LAYOUT; + public static final OfLong size$layout() { + return size$LAYOUT; } - private static final long height$OFFSET = 4; + private static final long size$OFFSET = 8; /** * Offset for field: * {@snippet lang=c : - * int height + * size_t size * } */ - public static final long height$offset() { - return height$OFFSET; + public static final long size$offset() { + return size$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * int height + * size_t size * } */ - public static int height(MemorySegment struct) { - return struct.get(height$LAYOUT, height$OFFSET); + public static long size(MemorySegment struct) { + return struct.get(size$LAYOUT, size$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * int height + * size_t size * } */ - public static void height(MemorySegment struct, int fieldValue) { - struct.set(height$LAYOUT, height$OFFSET, fieldValue); + public static void size(MemorySegment struct, long fieldValue) { + struct.set(size$LAYOUT, size$OFFSET, fieldValue); } - private static final OfInt has_alpha$LAYOUT = (OfInt)$LAYOUT.select(groupElement("has_alpha")); + private static final OfLong max_size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("max_size")); /** * Layout for field: * {@snippet lang=c : - * int has_alpha + * size_t max_size * } */ - public static final OfInt has_alpha$layout() { - return has_alpha$LAYOUT; + public static final OfLong max_size$layout() { + return max_size$LAYOUT; } - private static final long has_alpha$OFFSET = 8; + private static final long max_size$OFFSET = 16; /** * Offset for field: * {@snippet lang=c : - * int has_alpha + * size_t max_size * } */ - public static final long has_alpha$offset() { - return has_alpha$OFFSET; + public static final long max_size$offset() { + return max_size$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * int has_alpha + * size_t max_size * } */ - public static int has_alpha(MemorySegment struct) { - return struct.get(has_alpha$LAYOUT, has_alpha$OFFSET); + public static long max_size(MemorySegment struct) { + return struct.get(max_size$LAYOUT, max_size$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * int has_alpha + * size_t max_size * } */ - public static void has_alpha(MemorySegment struct, int fieldValue) { - struct.set(has_alpha$LAYOUT, has_alpha$OFFSET, fieldValue); - } - - private static final OfInt has_animation$LAYOUT = (OfInt)$LAYOUT.select(groupElement("has_animation")); - - /** - * Layout for field: - * {@snippet lang=c : - * int has_animation - * } - */ - public static final OfInt has_animation$layout() { - return has_animation$LAYOUT; - } - - private static final long has_animation$OFFSET = 12; - - /** - * Offset for field: - * {@snippet lang=c : - * int has_animation - * } - */ - public static final long has_animation$offset() { - return has_animation$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int has_animation - * } - */ - public static int has_animation(MemorySegment struct) { - return struct.get(has_animation$LAYOUT, has_animation$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int has_animation - * } - */ - public static void has_animation(MemorySegment struct, int fieldValue) { - struct.set(has_animation$LAYOUT, has_animation$OFFSET, fieldValue); - } - - private static final OfInt format$LAYOUT = (OfInt)$LAYOUT.select(groupElement("format")); - - /** - * Layout for field: - * {@snippet lang=c : - * int format - * } - */ - public static final OfInt format$layout() { - return format$LAYOUT; - } - - private static final long format$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * int format - * } - */ - public static final long format$offset() { - return format$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int format - * } - */ - public static int format(MemorySegment struct) { - return struct.get(format$LAYOUT, format$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int format - * } - */ - public static void format(MemorySegment struct, int fieldValue) { - struct.set(format$LAYOUT, format$OFFSET, fieldValue); + public static void max_size(MemorySegment struct, long fieldValue) { + struct.set(max_size$LAYOUT, max_size$OFFSET, fieldValue); } private static final SequenceLayout pad$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad")); @@ -271,19 +180,19 @@ public static void format(MemorySegment struct, int fieldValue) { /** * Layout for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static final SequenceLayout pad$layout() { return pad$LAYOUT; } - private static final long pad$OFFSET = 20; + private static final long pad$OFFSET = 24; /** * Offset for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static final long pad$offset() { @@ -293,7 +202,7 @@ public static void format(MemorySegment struct, int fieldValue) { /** * Getter for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static MemorySegment pad(MemorySegment struct) { @@ -303,19 +212,19 @@ public static MemorySegment pad(MemorySegment struct) { /** * Setter for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static void pad(MemorySegment struct, MemorySegment fieldValue) { MemorySegment.copy(fieldValue, 0L, struct, pad$OFFSET, pad$LAYOUT.byteSize()); } - private static long[] pad$DIMS = { 5 }; + private static long[] pad$DIMS = { 1 }; /** * Dimensions for array field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static long[] pad$dimensions() { @@ -326,7 +235,7 @@ public static void pad(MemorySegment struct, MemorySegment fieldValue) { /** * Indexed getter for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static int pad(MemorySegment struct, long index0) { @@ -336,7 +245,7 @@ public static int pad(MemorySegment struct, long index0) { /** * Indexed setter for field: * {@snippet lang=c : - * uint32_t pad[5] + * uint32_t pad[1] * } */ public static void pad(MemorySegment struct, long index0, int fieldValue) { diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/imaxdiv_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxAnimParams.java similarity index 65% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/imaxdiv_t.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxAnimParams.java index 8da5e19..8c61040 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/imaxdiv_t.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxAnimParams.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,22 +14,22 @@ /** * {@snippet lang=c : - * struct { - * intmax_t quot; - * intmax_t rem; + * struct WebPMuxAnimParams { + * uint32_t bgcolor; + * int loop_count; * } * } */ -public class imaxdiv_t { +public class WebPMuxAnimParams { - imaxdiv_t() { + WebPMuxAnimParams() { // Should not be called directly } private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("quot"), - decode_h.C_LONG.withName("rem") - ).withName("$anon$239:9"); + mux_h.C_INT.withName("bgcolor"), + mux_h.C_INT.withName("loop_count") + ).withName("WebPMuxAnimParams"); /** * The layout of this struct @@ -38,92 +38,92 @@ public static final GroupLayout layout() { return $LAYOUT; } - private static final OfLong quot$LAYOUT = (OfLong)$LAYOUT.select(groupElement("quot")); + private static final OfInt bgcolor$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bgcolor")); /** * Layout for field: * {@snippet lang=c : - * intmax_t quot + * uint32_t bgcolor * } */ - public static final OfLong quot$layout() { - return quot$LAYOUT; + public static final OfInt bgcolor$layout() { + return bgcolor$LAYOUT; } - private static final long quot$OFFSET = 0; + private static final long bgcolor$OFFSET = 0; /** * Offset for field: * {@snippet lang=c : - * intmax_t quot + * uint32_t bgcolor * } */ - public static final long quot$offset() { - return quot$OFFSET; + public static final long bgcolor$offset() { + return bgcolor$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * intmax_t quot + * uint32_t bgcolor * } */ - public static long quot(MemorySegment struct) { - return struct.get(quot$LAYOUT, quot$OFFSET); + public static int bgcolor(MemorySegment struct) { + return struct.get(bgcolor$LAYOUT, bgcolor$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * intmax_t quot + * uint32_t bgcolor * } */ - public static void quot(MemorySegment struct, long fieldValue) { - struct.set(quot$LAYOUT, quot$OFFSET, fieldValue); + public static void bgcolor(MemorySegment struct, int fieldValue) { + struct.set(bgcolor$LAYOUT, bgcolor$OFFSET, fieldValue); } - private static final OfLong rem$LAYOUT = (OfLong)$LAYOUT.select(groupElement("rem")); + private static final OfInt loop_count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("loop_count")); /** * Layout for field: * {@snippet lang=c : - * intmax_t rem + * int loop_count * } */ - public static final OfLong rem$layout() { - return rem$LAYOUT; + public static final OfInt loop_count$layout() { + return loop_count$LAYOUT; } - private static final long rem$OFFSET = 8; + private static final long loop_count$OFFSET = 4; /** * Offset for field: * {@snippet lang=c : - * intmax_t rem + * int loop_count * } */ - public static final long rem$offset() { - return rem$OFFSET; + public static final long loop_count$offset() { + return loop_count$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * intmax_t rem + * int loop_count * } */ - public static long rem(MemorySegment struct) { - return struct.get(rem$LAYOUT, rem$OFFSET); + public static int loop_count(MemorySegment struct) { + return struct.get(loop_count$LAYOUT, loop_count$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * intmax_t rem + * int loop_count * } */ - public static void rem(MemorySegment struct, long fieldValue) { - struct.set(rem$LAYOUT, rem$OFFSET, fieldValue); + public static void loop_count(MemorySegment struct, int fieldValue) { + struct.set(loop_count$LAYOUT, loop_count$OFFSET, fieldValue); } /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxFrameInfo.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxFrameInfo.java new file mode 100644 index 0000000..5cdd437 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPMuxFrameInfo.java @@ -0,0 +1,483 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * struct WebPMuxFrameInfo { + * WebPData bitstream; + * int x_offset; + * int y_offset; + * int duration; + * WebPChunkId id; + * WebPMuxAnimDispose dispose_method; + * WebPMuxAnimBlend blend_method; + * uint32_t pad[1]; + * } + * } + */ +public class WebPMuxFrameInfo { + + WebPMuxFrameInfo() { + // Should not be called directly + } + + private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( + WebPData.layout().withName("bitstream"), + mux_h.C_INT.withName("x_offset"), + mux_h.C_INT.withName("y_offset"), + mux_h.C_INT.withName("duration"), + mux_h.C_INT.withName("id"), + mux_h.C_INT.withName("dispose_method"), + mux_h.C_INT.withName("blend_method"), + MemoryLayout.sequenceLayout(1, mux_h.C_INT).withName("pad"), + MemoryLayout.paddingLayout(4) + ).withName("WebPMuxFrameInfo"); + + /** + * The layout of this struct + */ + public static final GroupLayout layout() { + return $LAYOUT; + } + + private static final GroupLayout bitstream$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("bitstream")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPData bitstream + * } + */ + public static final GroupLayout bitstream$layout() { + return bitstream$LAYOUT; + } + + private static final long bitstream$OFFSET = 0; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPData bitstream + * } + */ + public static final long bitstream$offset() { + return bitstream$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPData bitstream + * } + */ + public static MemorySegment bitstream(MemorySegment struct) { + return struct.asSlice(bitstream$OFFSET, bitstream$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPData bitstream + * } + */ + public static void bitstream(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, bitstream$OFFSET, bitstream$LAYOUT.byteSize()); + } + + private static final OfInt x_offset$LAYOUT = (OfInt)$LAYOUT.select(groupElement("x_offset")); + + /** + * Layout for field: + * {@snippet lang=c : + * int x_offset + * } + */ + public static final OfInt x_offset$layout() { + return x_offset$LAYOUT; + } + + private static final long x_offset$OFFSET = 16; + + /** + * Offset for field: + * {@snippet lang=c : + * int x_offset + * } + */ + public static final long x_offset$offset() { + return x_offset$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int x_offset + * } + */ + public static int x_offset(MemorySegment struct) { + return struct.get(x_offset$LAYOUT, x_offset$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int x_offset + * } + */ + public static void x_offset(MemorySegment struct, int fieldValue) { + struct.set(x_offset$LAYOUT, x_offset$OFFSET, fieldValue); + } + + private static final OfInt y_offset$LAYOUT = (OfInt)$LAYOUT.select(groupElement("y_offset")); + + /** + * Layout for field: + * {@snippet lang=c : + * int y_offset + * } + */ + public static final OfInt y_offset$layout() { + return y_offset$LAYOUT; + } + + private static final long y_offset$OFFSET = 20; + + /** + * Offset for field: + * {@snippet lang=c : + * int y_offset + * } + */ + public static final long y_offset$offset() { + return y_offset$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int y_offset + * } + */ + public static int y_offset(MemorySegment struct) { + return struct.get(y_offset$LAYOUT, y_offset$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int y_offset + * } + */ + public static void y_offset(MemorySegment struct, int fieldValue) { + struct.set(y_offset$LAYOUT, y_offset$OFFSET, fieldValue); + } + + private static final OfInt duration$LAYOUT = (OfInt)$LAYOUT.select(groupElement("duration")); + + /** + * Layout for field: + * {@snippet lang=c : + * int duration + * } + */ + public static final OfInt duration$layout() { + return duration$LAYOUT; + } + + private static final long duration$OFFSET = 24; + + /** + * Offset for field: + * {@snippet lang=c : + * int duration + * } + */ + public static final long duration$offset() { + return duration$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int duration + * } + */ + public static int duration(MemorySegment struct) { + return struct.get(duration$LAYOUT, duration$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int duration + * } + */ + public static void duration(MemorySegment struct, int fieldValue) { + struct.set(duration$LAYOUT, duration$OFFSET, fieldValue); + } + + private static final OfInt id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("id")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPChunkId id + * } + */ + public static final OfInt id$layout() { + return id$LAYOUT; + } + + private static final long id$OFFSET = 28; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPChunkId id + * } + */ + public static final long id$offset() { + return id$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPChunkId id + * } + */ + public static int id(MemorySegment struct) { + return struct.get(id$LAYOUT, id$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPChunkId id + * } + */ + public static void id(MemorySegment struct, int fieldValue) { + struct.set(id$LAYOUT, id$OFFSET, fieldValue); + } + + private static final OfInt dispose_method$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dispose_method")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPMuxAnimDispose dispose_method + * } + */ + public static final OfInt dispose_method$layout() { + return dispose_method$LAYOUT; + } + + private static final long dispose_method$OFFSET = 32; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPMuxAnimDispose dispose_method + * } + */ + public static final long dispose_method$offset() { + return dispose_method$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPMuxAnimDispose dispose_method + * } + */ + public static int dispose_method(MemorySegment struct) { + return struct.get(dispose_method$LAYOUT, dispose_method$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPMuxAnimDispose dispose_method + * } + */ + public static void dispose_method(MemorySegment struct, int fieldValue) { + struct.set(dispose_method$LAYOUT, dispose_method$OFFSET, fieldValue); + } + + private static final OfInt blend_method$LAYOUT = (OfInt)$LAYOUT.select(groupElement("blend_method")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPMuxAnimBlend blend_method + * } + */ + public static final OfInt blend_method$layout() { + return blend_method$LAYOUT; + } + + private static final long blend_method$OFFSET = 36; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPMuxAnimBlend blend_method + * } + */ + public static final long blend_method$offset() { + return blend_method$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPMuxAnimBlend blend_method + * } + */ + public static int blend_method(MemorySegment struct) { + return struct.get(blend_method$LAYOUT, blend_method$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPMuxAnimBlend blend_method + * } + */ + public static void blend_method(MemorySegment struct, int fieldValue) { + struct.set(blend_method$LAYOUT, blend_method$OFFSET, fieldValue); + } + + private static final SequenceLayout pad$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static final SequenceLayout pad$layout() { + return pad$LAYOUT; + } + + private static final long pad$OFFSET = 40; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static final long pad$offset() { + return pad$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static MemorySegment pad(MemorySegment struct) { + return struct.asSlice(pad$OFFSET, pad$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static void pad(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad$OFFSET, pad$LAYOUT.byteSize()); + } + + private static long[] pad$DIMS = { 1 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static long[] pad$dimensions() { + return pad$DIMS; + } + private static final VarHandle pad$ELEM_HANDLE = pad$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static int pad(MemorySegment struct, long index0) { + return (int)pad$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad[1] + * } + */ + public static void pad(MemorySegment struct, long index0, int fieldValue) { + pad$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + /** + * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. + * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} + */ + public static MemorySegment asSlice(MemorySegment array, long index) { + return array.asSlice(layout().byteSize() * index); + } + + /** + * The size (in bytes) of this struct + */ + public static long sizeof() { return layout().byteSize(); } + + /** + * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} + */ + public static MemorySegment allocate(SegmentAllocator allocator) { + return allocator.allocate(layout()); + } + + /** + * Allocate an array of size {@code elementCount} using {@code allocator}. + * The returned segment has size {@code elementCount * layout().byteSize()}. + */ + public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { + return reinterpret(addr, 1, arena, cleanup); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code elementCount * layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { + return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPPicture.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPPicture.java new file mode 100644 index 0000000..7586c43 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPPicture.java @@ -0,0 +1,1630 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * struct WebPPicture { + * int use_argb; + * WebPEncCSP colorspace; + * int width; + * int height; + * uint8_t *y; + * uint8_t *u; + * uint8_t *v; + * int y_stride; + * int uv_stride; + * uint8_t *a; + * int a_stride; + * uint32_t pad1[2]; + * uint32_t *argb; + * int argb_stride; + * uint32_t pad2[3]; + * WebPWriterFunction writer; + * void *custom_ptr; + * int extra_info_type; + * uint8_t *extra_info; + * WebPAuxStats *stats; + * WebPEncodingError error_code; + * WebPProgressHook progress_hook; + * void *user_data; + * uint32_t pad3[3]; + * uint8_t *pad4; + * uint8_t *pad5; + * uint32_t pad6[8]; + * void *memory_; + * void *memory_argb_; + * void *pad7[2]; + * } + * } + */ +public class WebPPicture { + + WebPPicture() { + // Should not be called directly + } + + private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( + encode_h.C_INT.withName("use_argb"), + encode_h.C_INT.withName("colorspace"), + encode_h.C_INT.withName("width"), + encode_h.C_INT.withName("height"), + encode_h.C_POINTER.withName("y"), + encode_h.C_POINTER.withName("u"), + encode_h.C_POINTER.withName("v"), + encode_h.C_INT.withName("y_stride"), + encode_h.C_INT.withName("uv_stride"), + encode_h.C_POINTER.withName("a"), + encode_h.C_INT.withName("a_stride"), + MemoryLayout.sequenceLayout(2, encode_h.C_INT).withName("pad1"), + MemoryLayout.paddingLayout(4), + encode_h.C_POINTER.withName("argb"), + encode_h.C_INT.withName("argb_stride"), + MemoryLayout.sequenceLayout(3, encode_h.C_INT).withName("pad2"), + encode_h.C_POINTER.withName("writer"), + encode_h.C_POINTER.withName("custom_ptr"), + encode_h.C_INT.withName("extra_info_type"), + MemoryLayout.paddingLayout(4), + encode_h.C_POINTER.withName("extra_info"), + encode_h.C_POINTER.withName("stats"), + encode_h.C_INT.withName("error_code"), + MemoryLayout.paddingLayout(4), + encode_h.C_POINTER.withName("progress_hook"), + encode_h.C_POINTER.withName("user_data"), + MemoryLayout.sequenceLayout(3, encode_h.C_INT).withName("pad3"), + MemoryLayout.paddingLayout(4), + encode_h.C_POINTER.withName("pad4"), + encode_h.C_POINTER.withName("pad5"), + MemoryLayout.sequenceLayout(8, encode_h.C_INT).withName("pad6"), + encode_h.C_POINTER.withName("memory_"), + encode_h.C_POINTER.withName("memory_argb_"), + MemoryLayout.sequenceLayout(2, encode_h.C_POINTER).withName("pad7") + ).withName("WebPPicture"); + + /** + * The layout of this struct + */ + public static final GroupLayout layout() { + return $LAYOUT; + } + + private static final OfInt use_argb$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_argb")); + + /** + * Layout for field: + * {@snippet lang=c : + * int use_argb + * } + */ + public static final OfInt use_argb$layout() { + return use_argb$LAYOUT; + } + + private static final long use_argb$OFFSET = 0; + + /** + * Offset for field: + * {@snippet lang=c : + * int use_argb + * } + */ + public static final long use_argb$offset() { + return use_argb$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int use_argb + * } + */ + public static int use_argb(MemorySegment struct) { + return struct.get(use_argb$LAYOUT, use_argb$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int use_argb + * } + */ + public static void use_argb(MemorySegment struct, int fieldValue) { + struct.set(use_argb$LAYOUT, use_argb$OFFSET, fieldValue); + } + + private static final OfInt colorspace$LAYOUT = (OfInt)$LAYOUT.select(groupElement("colorspace")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPEncCSP colorspace + * } + */ + public static final OfInt colorspace$layout() { + return colorspace$LAYOUT; + } + + private static final long colorspace$OFFSET = 4; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPEncCSP colorspace + * } + */ + public static final long colorspace$offset() { + return colorspace$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPEncCSP colorspace + * } + */ + public static int colorspace(MemorySegment struct) { + return struct.get(colorspace$LAYOUT, colorspace$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPEncCSP colorspace + * } + */ + public static void colorspace(MemorySegment struct, int fieldValue) { + struct.set(colorspace$LAYOUT, colorspace$OFFSET, fieldValue); + } + + private static final OfInt width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("width")); + + /** + * Layout for field: + * {@snippet lang=c : + * int width + * } + */ + public static final OfInt width$layout() { + return width$LAYOUT; + } + + private static final long width$OFFSET = 8; + + /** + * Offset for field: + * {@snippet lang=c : + * int width + * } + */ + public static final long width$offset() { + return width$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int width + * } + */ + public static int width(MemorySegment struct) { + return struct.get(width$LAYOUT, width$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int width + * } + */ + public static void width(MemorySegment struct, int fieldValue) { + struct.set(width$LAYOUT, width$OFFSET, fieldValue); + } + + private static final OfInt height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("height")); + + /** + * Layout for field: + * {@snippet lang=c : + * int height + * } + */ + public static final OfInt height$layout() { + return height$LAYOUT; + } + + private static final long height$OFFSET = 12; + + /** + * Offset for field: + * {@snippet lang=c : + * int height + * } + */ + public static final long height$offset() { + return height$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int height + * } + */ + public static int height(MemorySegment struct) { + return struct.get(height$LAYOUT, height$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int height + * } + */ + public static void height(MemorySegment struct, int fieldValue) { + struct.set(height$LAYOUT, height$OFFSET, fieldValue); + } + + private static final AddressLayout y$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("y")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *y + * } + */ + public static final AddressLayout y$layout() { + return y$LAYOUT; + } + + private static final long y$OFFSET = 16; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *y + * } + */ + public static final long y$offset() { + return y$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *y + * } + */ + public static MemorySegment y(MemorySegment struct) { + return struct.get(y$LAYOUT, y$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *y + * } + */ + public static void y(MemorySegment struct, MemorySegment fieldValue) { + struct.set(y$LAYOUT, y$OFFSET, fieldValue); + } + + private static final AddressLayout u$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("u")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *u + * } + */ + public static final AddressLayout u$layout() { + return u$LAYOUT; + } + + private static final long u$OFFSET = 24; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *u + * } + */ + public static final long u$offset() { + return u$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *u + * } + */ + public static MemorySegment u(MemorySegment struct) { + return struct.get(u$LAYOUT, u$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *u + * } + */ + public static void u(MemorySegment struct, MemorySegment fieldValue) { + struct.set(u$LAYOUT, u$OFFSET, fieldValue); + } + + private static final AddressLayout v$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("v")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *v + * } + */ + public static final AddressLayout v$layout() { + return v$LAYOUT; + } + + private static final long v$OFFSET = 32; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *v + * } + */ + public static final long v$offset() { + return v$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *v + * } + */ + public static MemorySegment v(MemorySegment struct) { + return struct.get(v$LAYOUT, v$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *v + * } + */ + public static void v(MemorySegment struct, MemorySegment fieldValue) { + struct.set(v$LAYOUT, v$OFFSET, fieldValue); + } + + private static final OfInt y_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("y_stride")); + + /** + * Layout for field: + * {@snippet lang=c : + * int y_stride + * } + */ + public static final OfInt y_stride$layout() { + return y_stride$LAYOUT; + } + + private static final long y_stride$OFFSET = 40; + + /** + * Offset for field: + * {@snippet lang=c : + * int y_stride + * } + */ + public static final long y_stride$offset() { + return y_stride$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int y_stride + * } + */ + public static int y_stride(MemorySegment struct) { + return struct.get(y_stride$LAYOUT, y_stride$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int y_stride + * } + */ + public static void y_stride(MemorySegment struct, int fieldValue) { + struct.set(y_stride$LAYOUT, y_stride$OFFSET, fieldValue); + } + + private static final OfInt uv_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("uv_stride")); + + /** + * Layout for field: + * {@snippet lang=c : + * int uv_stride + * } + */ + public static final OfInt uv_stride$layout() { + return uv_stride$LAYOUT; + } + + private static final long uv_stride$OFFSET = 44; + + /** + * Offset for field: + * {@snippet lang=c : + * int uv_stride + * } + */ + public static final long uv_stride$offset() { + return uv_stride$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int uv_stride + * } + */ + public static int uv_stride(MemorySegment struct) { + return struct.get(uv_stride$LAYOUT, uv_stride$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int uv_stride + * } + */ + public static void uv_stride(MemorySegment struct, int fieldValue) { + struct.set(uv_stride$LAYOUT, uv_stride$OFFSET, fieldValue); + } + + private static final AddressLayout a$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("a")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *a + * } + */ + public static final AddressLayout a$layout() { + return a$LAYOUT; + } + + private static final long a$OFFSET = 48; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *a + * } + */ + public static final long a$offset() { + return a$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *a + * } + */ + public static MemorySegment a(MemorySegment struct) { + return struct.get(a$LAYOUT, a$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *a + * } + */ + public static void a(MemorySegment struct, MemorySegment fieldValue) { + struct.set(a$LAYOUT, a$OFFSET, fieldValue); + } + + private static final OfInt a_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("a_stride")); + + /** + * Layout for field: + * {@snippet lang=c : + * int a_stride + * } + */ + public static final OfInt a_stride$layout() { + return a_stride$LAYOUT; + } + + private static final long a_stride$OFFSET = 56; + + /** + * Offset for field: + * {@snippet lang=c : + * int a_stride + * } + */ + public static final long a_stride$offset() { + return a_stride$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int a_stride + * } + */ + public static int a_stride(MemorySegment struct) { + return struct.get(a_stride$LAYOUT, a_stride$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int a_stride + * } + */ + public static void a_stride(MemorySegment struct, int fieldValue) { + struct.set(a_stride$LAYOUT, a_stride$OFFSET, fieldValue); + } + + private static final SequenceLayout pad1$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad1")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static final SequenceLayout pad1$layout() { + return pad1$LAYOUT; + } + + private static final long pad1$OFFSET = 60; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static final long pad1$offset() { + return pad1$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static MemorySegment pad1(MemorySegment struct) { + return struct.asSlice(pad1$OFFSET, pad1$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static void pad1(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad1$OFFSET, pad1$LAYOUT.byteSize()); + } + + private static long[] pad1$DIMS = { 2 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static long[] pad1$dimensions() { + return pad1$DIMS; + } + private static final VarHandle pad1$ELEM_HANDLE = pad1$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static int pad1(MemorySegment struct, long index0) { + return (int)pad1$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad1[2] + * } + */ + public static void pad1(MemorySegment struct, long index0, int fieldValue) { + pad1$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final AddressLayout argb$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("argb")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t *argb + * } + */ + public static final AddressLayout argb$layout() { + return argb$LAYOUT; + } + + private static final long argb$OFFSET = 72; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t *argb + * } + */ + public static final long argb$offset() { + return argb$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t *argb + * } + */ + public static MemorySegment argb(MemorySegment struct) { + return struct.get(argb$LAYOUT, argb$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t *argb + * } + */ + public static void argb(MemorySegment struct, MemorySegment fieldValue) { + struct.set(argb$LAYOUT, argb$OFFSET, fieldValue); + } + + private static final OfInt argb_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("argb_stride")); + + /** + * Layout for field: + * {@snippet lang=c : + * int argb_stride + * } + */ + public static final OfInt argb_stride$layout() { + return argb_stride$LAYOUT; + } + + private static final long argb_stride$OFFSET = 80; + + /** + * Offset for field: + * {@snippet lang=c : + * int argb_stride + * } + */ + public static final long argb_stride$offset() { + return argb_stride$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int argb_stride + * } + */ + public static int argb_stride(MemorySegment struct) { + return struct.get(argb_stride$LAYOUT, argb_stride$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int argb_stride + * } + */ + public static void argb_stride(MemorySegment struct, int fieldValue) { + struct.set(argb_stride$LAYOUT, argb_stride$OFFSET, fieldValue); + } + + private static final SequenceLayout pad2$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad2")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static final SequenceLayout pad2$layout() { + return pad2$LAYOUT; + } + + private static final long pad2$OFFSET = 84; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static final long pad2$offset() { + return pad2$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static MemorySegment pad2(MemorySegment struct) { + return struct.asSlice(pad2$OFFSET, pad2$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static void pad2(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad2$OFFSET, pad2$LAYOUT.byteSize()); + } + + private static long[] pad2$DIMS = { 3 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static long[] pad2$dimensions() { + return pad2$DIMS; + } + private static final VarHandle pad2$ELEM_HANDLE = pad2$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static int pad2(MemorySegment struct, long index0) { + return (int)pad2$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad2[3] + * } + */ + public static void pad2(MemorySegment struct, long index0, int fieldValue) { + pad2$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final AddressLayout writer$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("writer")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPWriterFunction writer + * } + */ + public static final AddressLayout writer$layout() { + return writer$LAYOUT; + } + + private static final long writer$OFFSET = 96; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPWriterFunction writer + * } + */ + public static final long writer$offset() { + return writer$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPWriterFunction writer + * } + */ + public static MemorySegment writer(MemorySegment struct) { + return struct.get(writer$LAYOUT, writer$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPWriterFunction writer + * } + */ + public static void writer(MemorySegment struct, MemorySegment fieldValue) { + struct.set(writer$LAYOUT, writer$OFFSET, fieldValue); + } + + private static final AddressLayout custom_ptr$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("custom_ptr")); + + /** + * Layout for field: + * {@snippet lang=c : + * void *custom_ptr + * } + */ + public static final AddressLayout custom_ptr$layout() { + return custom_ptr$LAYOUT; + } + + private static final long custom_ptr$OFFSET = 104; + + /** + * Offset for field: + * {@snippet lang=c : + * void *custom_ptr + * } + */ + public static final long custom_ptr$offset() { + return custom_ptr$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * void *custom_ptr + * } + */ + public static MemorySegment custom_ptr(MemorySegment struct) { + return struct.get(custom_ptr$LAYOUT, custom_ptr$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * void *custom_ptr + * } + */ + public static void custom_ptr(MemorySegment struct, MemorySegment fieldValue) { + struct.set(custom_ptr$LAYOUT, custom_ptr$OFFSET, fieldValue); + } + + private static final OfInt extra_info_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("extra_info_type")); + + /** + * Layout for field: + * {@snippet lang=c : + * int extra_info_type + * } + */ + public static final OfInt extra_info_type$layout() { + return extra_info_type$LAYOUT; + } + + private static final long extra_info_type$OFFSET = 112; + + /** + * Offset for field: + * {@snippet lang=c : + * int extra_info_type + * } + */ + public static final long extra_info_type$offset() { + return extra_info_type$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * int extra_info_type + * } + */ + public static int extra_info_type(MemorySegment struct) { + return struct.get(extra_info_type$LAYOUT, extra_info_type$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * int extra_info_type + * } + */ + public static void extra_info_type(MemorySegment struct, int fieldValue) { + struct.set(extra_info_type$LAYOUT, extra_info_type$OFFSET, fieldValue); + } + + private static final AddressLayout extra_info$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("extra_info")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *extra_info + * } + */ + public static final AddressLayout extra_info$layout() { + return extra_info$LAYOUT; + } + + private static final long extra_info$OFFSET = 120; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *extra_info + * } + */ + public static final long extra_info$offset() { + return extra_info$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *extra_info + * } + */ + public static MemorySegment extra_info(MemorySegment struct) { + return struct.get(extra_info$LAYOUT, extra_info$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *extra_info + * } + */ + public static void extra_info(MemorySegment struct, MemorySegment fieldValue) { + struct.set(extra_info$LAYOUT, extra_info$OFFSET, fieldValue); + } + + private static final AddressLayout stats$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stats")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPAuxStats *stats + * } + */ + public static final AddressLayout stats$layout() { + return stats$LAYOUT; + } + + private static final long stats$OFFSET = 128; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPAuxStats *stats + * } + */ + public static final long stats$offset() { + return stats$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPAuxStats *stats + * } + */ + public static MemorySegment stats(MemorySegment struct) { + return struct.get(stats$LAYOUT, stats$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPAuxStats *stats + * } + */ + public static void stats(MemorySegment struct, MemorySegment fieldValue) { + struct.set(stats$LAYOUT, stats$OFFSET, fieldValue); + } + + private static final OfInt error_code$LAYOUT = (OfInt)$LAYOUT.select(groupElement("error_code")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPEncodingError error_code + * } + */ + public static final OfInt error_code$layout() { + return error_code$LAYOUT; + } + + private static final long error_code$OFFSET = 136; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPEncodingError error_code + * } + */ + public static final long error_code$offset() { + return error_code$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPEncodingError error_code + * } + */ + public static int error_code(MemorySegment struct) { + return struct.get(error_code$LAYOUT, error_code$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPEncodingError error_code + * } + */ + public static void error_code(MemorySegment struct, int fieldValue) { + struct.set(error_code$LAYOUT, error_code$OFFSET, fieldValue); + } + + private static final AddressLayout progress_hook$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("progress_hook")); + + /** + * Layout for field: + * {@snippet lang=c : + * WebPProgressHook progress_hook + * } + */ + public static final AddressLayout progress_hook$layout() { + return progress_hook$LAYOUT; + } + + private static final long progress_hook$OFFSET = 144; + + /** + * Offset for field: + * {@snippet lang=c : + * WebPProgressHook progress_hook + * } + */ + public static final long progress_hook$offset() { + return progress_hook$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * WebPProgressHook progress_hook + * } + */ + public static MemorySegment progress_hook(MemorySegment struct) { + return struct.get(progress_hook$LAYOUT, progress_hook$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * WebPProgressHook progress_hook + * } + */ + public static void progress_hook(MemorySegment struct, MemorySegment fieldValue) { + struct.set(progress_hook$LAYOUT, progress_hook$OFFSET, fieldValue); + } + + private static final AddressLayout user_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("user_data")); + + /** + * Layout for field: + * {@snippet lang=c : + * void *user_data + * } + */ + public static final AddressLayout user_data$layout() { + return user_data$LAYOUT; + } + + private static final long user_data$OFFSET = 152; + + /** + * Offset for field: + * {@snippet lang=c : + * void *user_data + * } + */ + public static final long user_data$offset() { + return user_data$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * void *user_data + * } + */ + public static MemorySegment user_data(MemorySegment struct) { + return struct.get(user_data$LAYOUT, user_data$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * void *user_data + * } + */ + public static void user_data(MemorySegment struct, MemorySegment fieldValue) { + struct.set(user_data$LAYOUT, user_data$OFFSET, fieldValue); + } + + private static final SequenceLayout pad3$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad3")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static final SequenceLayout pad3$layout() { + return pad3$LAYOUT; + } + + private static final long pad3$OFFSET = 160; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static final long pad3$offset() { + return pad3$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static MemorySegment pad3(MemorySegment struct) { + return struct.asSlice(pad3$OFFSET, pad3$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static void pad3(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad3$OFFSET, pad3$LAYOUT.byteSize()); + } + + private static long[] pad3$DIMS = { 3 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static long[] pad3$dimensions() { + return pad3$DIMS; + } + private static final VarHandle pad3$ELEM_HANDLE = pad3$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static int pad3(MemorySegment struct, long index0) { + return (int)pad3$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad3[3] + * } + */ + public static void pad3(MemorySegment struct, long index0, int fieldValue) { + pad3$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final AddressLayout pad4$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pad4")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *pad4 + * } + */ + public static final AddressLayout pad4$layout() { + return pad4$LAYOUT; + } + + private static final long pad4$OFFSET = 176; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *pad4 + * } + */ + public static final long pad4$offset() { + return pad4$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *pad4 + * } + */ + public static MemorySegment pad4(MemorySegment struct) { + return struct.get(pad4$LAYOUT, pad4$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *pad4 + * } + */ + public static void pad4(MemorySegment struct, MemorySegment fieldValue) { + struct.set(pad4$LAYOUT, pad4$OFFSET, fieldValue); + } + + private static final AddressLayout pad5$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pad5")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint8_t *pad5 + * } + */ + public static final AddressLayout pad5$layout() { + return pad5$LAYOUT; + } + + private static final long pad5$OFFSET = 184; + + /** + * Offset for field: + * {@snippet lang=c : + * uint8_t *pad5 + * } + */ + public static final long pad5$offset() { + return pad5$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint8_t *pad5 + * } + */ + public static MemorySegment pad5(MemorySegment struct) { + return struct.get(pad5$LAYOUT, pad5$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint8_t *pad5 + * } + */ + public static void pad5(MemorySegment struct, MemorySegment fieldValue) { + struct.set(pad5$LAYOUT, pad5$OFFSET, fieldValue); + } + + private static final SequenceLayout pad6$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad6")); + + /** + * Layout for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static final SequenceLayout pad6$layout() { + return pad6$LAYOUT; + } + + private static final long pad6$OFFSET = 192; + + /** + * Offset for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static final long pad6$offset() { + return pad6$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static MemorySegment pad6(MemorySegment struct) { + return struct.asSlice(pad6$OFFSET, pad6$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static void pad6(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad6$OFFSET, pad6$LAYOUT.byteSize()); + } + + private static long[] pad6$DIMS = { 8 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static long[] pad6$dimensions() { + return pad6$DIMS; + } + private static final VarHandle pad6$ELEM_HANDLE = pad6$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static int pad6(MemorySegment struct, long index0) { + return (int)pad6$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * uint32_t pad6[8] + * } + */ + public static void pad6(MemorySegment struct, long index0, int fieldValue) { + pad6$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + private static final AddressLayout memory_$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("memory_")); + + /** + * Layout for field: + * {@snippet lang=c : + * void *memory_ + * } + */ + public static final AddressLayout memory_$layout() { + return memory_$LAYOUT; + } + + private static final long memory_$OFFSET = 224; + + /** + * Offset for field: + * {@snippet lang=c : + * void *memory_ + * } + */ + public static final long memory_$offset() { + return memory_$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * void *memory_ + * } + */ + public static MemorySegment memory_(MemorySegment struct) { + return struct.get(memory_$LAYOUT, memory_$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * void *memory_ + * } + */ + public static void memory_(MemorySegment struct, MemorySegment fieldValue) { + struct.set(memory_$LAYOUT, memory_$OFFSET, fieldValue); + } + + private static final AddressLayout memory_argb_$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("memory_argb_")); + + /** + * Layout for field: + * {@snippet lang=c : + * void *memory_argb_ + * } + */ + public static final AddressLayout memory_argb_$layout() { + return memory_argb_$LAYOUT; + } + + private static final long memory_argb_$OFFSET = 232; + + /** + * Offset for field: + * {@snippet lang=c : + * void *memory_argb_ + * } + */ + public static final long memory_argb_$offset() { + return memory_argb_$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * void *memory_argb_ + * } + */ + public static MemorySegment memory_argb_(MemorySegment struct) { + return struct.get(memory_argb_$LAYOUT, memory_argb_$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * void *memory_argb_ + * } + */ + public static void memory_argb_(MemorySegment struct, MemorySegment fieldValue) { + struct.set(memory_argb_$LAYOUT, memory_argb_$OFFSET, fieldValue); + } + + private static final SequenceLayout pad7$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad7")); + + /** + * Layout for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static final SequenceLayout pad7$layout() { + return pad7$LAYOUT; + } + + private static final long pad7$OFFSET = 240; + + /** + * Offset for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static final long pad7$offset() { + return pad7$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static MemorySegment pad7(MemorySegment struct) { + return struct.asSlice(pad7$OFFSET, pad7$LAYOUT.byteSize()); + } + + /** + * Setter for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static void pad7(MemorySegment struct, MemorySegment fieldValue) { + MemorySegment.copy(fieldValue, 0L, struct, pad7$OFFSET, pad7$LAYOUT.byteSize()); + } + + private static long[] pad7$DIMS = { 2 }; + + /** + * Dimensions for array field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static long[] pad7$dimensions() { + return pad7$DIMS; + } + private static final VarHandle pad7$ELEM_HANDLE = pad7$LAYOUT.varHandle(sequenceElement()); + + /** + * Indexed getter for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static MemorySegment pad7(MemorySegment struct, long index0) { + return (MemorySegment)pad7$ELEM_HANDLE.get(struct, 0L, index0); + } + + /** + * Indexed setter for field: + * {@snippet lang=c : + * void *pad7[2] + * } + */ + public static void pad7(MemorySegment struct, long index0, MemorySegment fieldValue) { + pad7$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); + } + + /** + * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. + * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} + */ + public static MemorySegment asSlice(MemorySegment array, long index) { + return array.asSlice(layout().byteSize() * index); + } + + /** + * The size (in bytes) of this struct + */ + public static long sizeof() { return layout().byteSize(); } + + /** + * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} + */ + public static MemorySegment allocate(SegmentAllocator allocator) { + return allocator.allocate(layout()); + } + + /** + * Allocate an array of size {@code elementCount} using {@code allocator}. + * The returned segment has size {@code elementCount * layout().byteSize()}. + */ + public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { + return reinterpret(addr, 1, arena, cleanup); + } + + /** + * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). + * The returned segment has size {@code elementCount * layout().byteSize()} + */ + public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { + return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPProgressHook.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPProgressHook.java new file mode 100644 index 0000000..14bdc2e --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPProgressHook.java @@ -0,0 +1,69 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * typedef int (*WebPProgressHook)(int, const WebPPicture *) + * } + */ +public class WebPProgressHook { + + WebPProgressHook() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + int apply(int percent, MemorySegment picture); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = encode_h.upcallHandle(WebPProgressHook.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(WebPProgressHook.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static int invoke(MemorySegment funcPtr,int percent, MemorySegment picture) { + try { + return (int) DOWN$MH.invokeExact(funcPtr, percent, picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPRGBABuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPRGBABuffer.java similarity index 98% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPRGBABuffer.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPRGBABuffer.java index 9cf4919..e9e6dbd 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPRGBABuffer.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPRGBABuffer.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -31,7 +31,7 @@ public class WebPRGBABuffer { decode_h.C_POINTER.withName("rgba"), decode_h.C_INT.withName("stride"), MemoryLayout.paddingLayout(4), - decode_h.C_LONG.withName("size") + decode_h.C_LONG_LONG.withName("size") ).withName("WebPRGBABuffer"); /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPWriterFunction.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPWriterFunction.java new file mode 100644 index 0000000..3732806 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPWriterFunction.java @@ -0,0 +1,70 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +/** + * {@snippet lang=c : + * typedef int (*WebPWriterFunction)(const uint8_t *, size_t, const WebPPicture *) + * } + */ +public class WebPWriterFunction { + + WebPWriterFunction() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + int apply(MemorySegment data, long data_size, MemorySegment picture); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_LONG_LONG, + encode_h.C_POINTER + ); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = encode_h.upcallHandle(WebPWriterFunction.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(WebPWriterFunction.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static int invoke(MemorySegment funcPtr,MemorySegment data, long data_size, MemorySegment picture) { + try { + return (int) DOWN$MH.invokeExact(funcPtr, data, data_size, picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPYUVABuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPYUVABuffer.java similarity index 98% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPYUVABuffer.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPYUVABuffer.java index ae13849..c7b26ee 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/WebPYUVABuffer.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/WebPYUVABuffer.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -45,10 +45,10 @@ public class WebPYUVABuffer { decode_h.C_INT.withName("u_stride"), decode_h.C_INT.withName("v_stride"), decode_h.C_INT.withName("a_stride"), - decode_h.C_LONG.withName("y_size"), - decode_h.C_LONG.withName("u_size"), - decode_h.C_LONG.withName("v_size"), - decode_h.C_LONG.withName("a_size") + decode_h.C_LONG_LONG.withName("y_size"), + decode_h.C_LONG_LONG.withName("u_size"), + decode_h.C_LONG_LONG.withName("v_size"), + decode_h.C_LONG_LONG.withName("a_size") ).withName("WebPYUVABuffer"); /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPRGBABuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/_Mbstatet.java similarity index 59% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPRGBABuffer.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/_Mbstatet.java index bf1ebc8..ee8efd7 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPRGBABuffer.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/_Mbstatet.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,25 +14,24 @@ /** * {@snippet lang=c : - * struct WebPRGBABuffer { - * uint8_t *rgba; - * int stride; - * size_t size; + * struct _Mbstatet { + * unsigned long _Wchar; + * unsigned short _Byte; + * unsigned short _State; * } * } */ -public class WebPRGBABuffer { +public class _Mbstatet { - WebPRGBABuffer() { + _Mbstatet() { // Should not be called directly } private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_POINTER.withName("rgba"), - demux_h.C_INT.withName("stride"), - MemoryLayout.paddingLayout(4), - demux_h.C_LONG.withName("size") - ).withName("WebPRGBABuffer"); + demux_h.C_LONG.withName("_Wchar"), + demux_h.C_SHORT.withName("_Byte"), + demux_h.C_SHORT.withName("_State") + ).withName("_Mbstatet"); /** * The layout of this struct @@ -41,136 +40,136 @@ public static final GroupLayout layout() { return $LAYOUT; } - private static final AddressLayout rgba$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("rgba")); + private static final OfInt _Wchar$LAYOUT = (OfInt)$LAYOUT.select(groupElement("_Wchar")); /** * Layout for field: * {@snippet lang=c : - * uint8_t *rgba + * unsigned long _Wchar * } */ - public static final AddressLayout rgba$layout() { - return rgba$LAYOUT; + public static final OfInt _Wchar$layout() { + return _Wchar$LAYOUT; } - private static final long rgba$OFFSET = 0; + private static final long _Wchar$OFFSET = 0; /** * Offset for field: * {@snippet lang=c : - * uint8_t *rgba + * unsigned long _Wchar * } */ - public static final long rgba$offset() { - return rgba$OFFSET; + public static final long _Wchar$offset() { + return _Wchar$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * uint8_t *rgba + * unsigned long _Wchar * } */ - public static MemorySegment rgba(MemorySegment struct) { - return struct.get(rgba$LAYOUT, rgba$OFFSET); + public static int _Wchar(MemorySegment struct) { + return struct.get(_Wchar$LAYOUT, _Wchar$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * uint8_t *rgba + * unsigned long _Wchar * } */ - public static void rgba(MemorySegment struct, MemorySegment fieldValue) { - struct.set(rgba$LAYOUT, rgba$OFFSET, fieldValue); + public static void _Wchar(MemorySegment struct, int fieldValue) { + struct.set(_Wchar$LAYOUT, _Wchar$OFFSET, fieldValue); } - private static final OfInt stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("stride")); + private static final OfShort _Byte$LAYOUT = (OfShort)$LAYOUT.select(groupElement("_Byte")); /** * Layout for field: * {@snippet lang=c : - * int stride + * unsigned short _Byte * } */ - public static final OfInt stride$layout() { - return stride$LAYOUT; + public static final OfShort _Byte$layout() { + return _Byte$LAYOUT; } - private static final long stride$OFFSET = 8; + private static final long _Byte$OFFSET = 4; /** * Offset for field: * {@snippet lang=c : - * int stride + * unsigned short _Byte * } */ - public static final long stride$offset() { - return stride$OFFSET; + public static final long _Byte$offset() { + return _Byte$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * int stride + * unsigned short _Byte * } */ - public static int stride(MemorySegment struct) { - return struct.get(stride$LAYOUT, stride$OFFSET); + public static short _Byte(MemorySegment struct) { + return struct.get(_Byte$LAYOUT, _Byte$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * int stride + * unsigned short _Byte * } */ - public static void stride(MemorySegment struct, int fieldValue) { - struct.set(stride$LAYOUT, stride$OFFSET, fieldValue); + public static void _Byte(MemorySegment struct, short fieldValue) { + struct.set(_Byte$LAYOUT, _Byte$OFFSET, fieldValue); } - private static final OfLong size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("size")); + private static final OfShort _State$LAYOUT = (OfShort)$LAYOUT.select(groupElement("_State")); /** * Layout for field: * {@snippet lang=c : - * size_t size + * unsigned short _State * } */ - public static final OfLong size$layout() { - return size$LAYOUT; + public static final OfShort _State$layout() { + return _State$LAYOUT; } - private static final long size$OFFSET = 16; + private static final long _State$OFFSET = 6; /** * Offset for field: * {@snippet lang=c : - * size_t size + * unsigned short _State * } */ - public static final long size$offset() { - return size$OFFSET; + public static final long _State$offset() { + return _State$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * size_t size + * unsigned short _State * } */ - public static long size(MemorySegment struct) { - return struct.get(size$LAYOUT, size$OFFSET); + public static short _State(MemorySegment struct) { + return struct.get(_State$LAYOUT, _State$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * size_t size + * unsigned short _State * } */ - public static void size(MemorySegment struct, long fieldValue) { - struct.set(size$LAYOUT, size$OFFSET, fieldValue); + public static void _State(MemorySegment struct, short fieldValue) { + struct.set(_State$LAYOUT, _State$OFFSET, fieldValue); } /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderConfig.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_data_public.java similarity index 52% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderConfig.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_data_public.java index 2aace90..0d9adfa 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderConfig.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_data_public.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,25 +14,24 @@ /** * {@snippet lang=c : - * struct WebPDecoderConfig { - * WebPBitstreamFeatures input; - * WebPDecBuffer output; - * WebPDecoderOptions options; + * struct __crt_locale_data_public { + * const unsigned short *_locale_pctype; + * int _locale_mb_cur_max; + * unsigned int _locale_lc_codepage; * } * } */ -public class WebPDecoderConfig { +public class __crt_locale_data_public { - WebPDecoderConfig() { + __crt_locale_data_public() { // Should not be called directly } private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - WebPBitstreamFeatures.layout().withName("input"), - WebPDecBuffer.layout().withName("output"), - WebPDecoderOptions.layout().withName("options"), - MemoryLayout.paddingLayout(4) - ).withName("WebPDecoderConfig"); + demux_h.C_POINTER.withName("_locale_pctype"), + demux_h.C_INT.withName("_locale_mb_cur_max"), + demux_h.C_INT.withName("_locale_lc_codepage") + ).withName("__crt_locale_data_public"); /** * The layout of this struct @@ -41,136 +40,136 @@ public static final GroupLayout layout() { return $LAYOUT; } - private static final GroupLayout input$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("input")); + private static final AddressLayout _locale_pctype$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_locale_pctype")); /** * Layout for field: * {@snippet lang=c : - * WebPBitstreamFeatures input + * const unsigned short *_locale_pctype * } */ - public static final GroupLayout input$layout() { - return input$LAYOUT; + public static final AddressLayout _locale_pctype$layout() { + return _locale_pctype$LAYOUT; } - private static final long input$OFFSET = 0; + private static final long _locale_pctype$OFFSET = 0; /** * Offset for field: * {@snippet lang=c : - * WebPBitstreamFeatures input + * const unsigned short *_locale_pctype * } */ - public static final long input$offset() { - return input$OFFSET; + public static final long _locale_pctype$offset() { + return _locale_pctype$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * WebPBitstreamFeatures input + * const unsigned short *_locale_pctype * } */ - public static MemorySegment input(MemorySegment struct) { - return struct.asSlice(input$OFFSET, input$LAYOUT.byteSize()); + public static MemorySegment _locale_pctype(MemorySegment struct) { + return struct.get(_locale_pctype$LAYOUT, _locale_pctype$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * WebPBitstreamFeatures input + * const unsigned short *_locale_pctype * } */ - public static void input(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, input$OFFSET, input$LAYOUT.byteSize()); + public static void _locale_pctype(MemorySegment struct, MemorySegment fieldValue) { + struct.set(_locale_pctype$LAYOUT, _locale_pctype$OFFSET, fieldValue); } - private static final GroupLayout output$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("output")); + private static final OfInt _locale_mb_cur_max$LAYOUT = (OfInt)$LAYOUT.select(groupElement("_locale_mb_cur_max")); /** * Layout for field: * {@snippet lang=c : - * WebPDecBuffer output + * int _locale_mb_cur_max * } */ - public static final GroupLayout output$layout() { - return output$LAYOUT; + public static final OfInt _locale_mb_cur_max$layout() { + return _locale_mb_cur_max$LAYOUT; } - private static final long output$OFFSET = 40; + private static final long _locale_mb_cur_max$OFFSET = 8; /** * Offset for field: * {@snippet lang=c : - * WebPDecBuffer output + * int _locale_mb_cur_max * } */ - public static final long output$offset() { - return output$OFFSET; + public static final long _locale_mb_cur_max$offset() { + return _locale_mb_cur_max$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * WebPDecBuffer output + * int _locale_mb_cur_max * } */ - public static MemorySegment output(MemorySegment struct) { - return struct.asSlice(output$OFFSET, output$LAYOUT.byteSize()); + public static int _locale_mb_cur_max(MemorySegment struct) { + return struct.get(_locale_mb_cur_max$LAYOUT, _locale_mb_cur_max$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * WebPDecBuffer output + * int _locale_mb_cur_max * } */ - public static void output(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, output$OFFSET, output$LAYOUT.byteSize()); + public static void _locale_mb_cur_max(MemorySegment struct, int fieldValue) { + struct.set(_locale_mb_cur_max$LAYOUT, _locale_mb_cur_max$OFFSET, fieldValue); } - private static final GroupLayout options$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("options")); + private static final OfInt _locale_lc_codepage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("_locale_lc_codepage")); /** * Layout for field: * {@snippet lang=c : - * WebPDecoderOptions options + * unsigned int _locale_lc_codepage * } */ - public static final GroupLayout options$layout() { - return options$LAYOUT; + public static final OfInt _locale_lc_codepage$layout() { + return _locale_lc_codepage$LAYOUT; } - private static final long options$OFFSET = 160; + private static final long _locale_lc_codepage$OFFSET = 12; /** * Offset for field: * {@snippet lang=c : - * WebPDecoderOptions options + * unsigned int _locale_lc_codepage * } */ - public static final long options$offset() { - return options$OFFSET; + public static final long _locale_lc_codepage$offset() { + return _locale_lc_codepage$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * WebPDecoderOptions options + * unsigned int _locale_lc_codepage * } */ - public static MemorySegment options(MemorySegment struct) { - return struct.asSlice(options$OFFSET, options$LAYOUT.byteSize()); + public static int _locale_lc_codepage(MemorySegment struct) { + return struct.get(_locale_lc_codepage$LAYOUT, _locale_lc_codepage$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * WebPDecoderOptions options + * unsigned int _locale_lc_codepage * } */ - public static void options(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, options$OFFSET, options$LAYOUT.byteSize()); + public static void _locale_lc_codepage(MemorySegment struct, int fieldValue) { + struct.set(_locale_lc_codepage$LAYOUT, _locale_lc_codepage$OFFSET, fieldValue); } /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/imaxdiv_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_pointers.java similarity index 61% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/imaxdiv_t.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_pointers.java index d585819..8f735fa 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/imaxdiv_t.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/__crt_locale_pointers.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,22 +14,22 @@ /** * {@snippet lang=c : - * struct { - * intmax_t quot; - * intmax_t rem; + * struct __crt_locale_pointers { + * struct __crt_locale_data *locinfo; + * struct __crt_multibyte_data *mbcinfo; * } * } */ -public class imaxdiv_t { +public class __crt_locale_pointers { - imaxdiv_t() { + __crt_locale_pointers() { // Should not be called directly } private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("quot"), - demux_h.C_LONG.withName("rem") - ).withName("$anon$239:9"); + demux_h.C_POINTER.withName("locinfo"), + demux_h.C_POINTER.withName("mbcinfo") + ).withName("__crt_locale_pointers"); /** * The layout of this struct @@ -38,92 +38,92 @@ public static final GroupLayout layout() { return $LAYOUT; } - private static final OfLong quot$LAYOUT = (OfLong)$LAYOUT.select(groupElement("quot")); + private static final AddressLayout locinfo$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("locinfo")); /** * Layout for field: * {@snippet lang=c : - * intmax_t quot + * struct __crt_locale_data *locinfo * } */ - public static final OfLong quot$layout() { - return quot$LAYOUT; + public static final AddressLayout locinfo$layout() { + return locinfo$LAYOUT; } - private static final long quot$OFFSET = 0; + private static final long locinfo$OFFSET = 0; /** * Offset for field: * {@snippet lang=c : - * intmax_t quot + * struct __crt_locale_data *locinfo * } */ - public static final long quot$offset() { - return quot$OFFSET; + public static final long locinfo$offset() { + return locinfo$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * intmax_t quot + * struct __crt_locale_data *locinfo * } */ - public static long quot(MemorySegment struct) { - return struct.get(quot$LAYOUT, quot$OFFSET); + public static MemorySegment locinfo(MemorySegment struct) { + return struct.get(locinfo$LAYOUT, locinfo$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * intmax_t quot + * struct __crt_locale_data *locinfo * } */ - public static void quot(MemorySegment struct, long fieldValue) { - struct.set(quot$LAYOUT, quot$OFFSET, fieldValue); + public static void locinfo(MemorySegment struct, MemorySegment fieldValue) { + struct.set(locinfo$LAYOUT, locinfo$OFFSET, fieldValue); } - private static final OfLong rem$LAYOUT = (OfLong)$LAYOUT.select(groupElement("rem")); + private static final AddressLayout mbcinfo$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("mbcinfo")); /** * Layout for field: * {@snippet lang=c : - * intmax_t rem + * struct __crt_multibyte_data *mbcinfo * } */ - public static final OfLong rem$layout() { - return rem$LAYOUT; + public static final AddressLayout mbcinfo$layout() { + return mbcinfo$LAYOUT; } - private static final long rem$OFFSET = 8; + private static final long mbcinfo$OFFSET = 8; /** * Offset for field: * {@snippet lang=c : - * intmax_t rem + * struct __crt_multibyte_data *mbcinfo * } */ - public static final long rem$offset() { - return rem$OFFSET; + public static final long mbcinfo$offset() { + return mbcinfo$OFFSET; } /** * Getter for field: * {@snippet lang=c : - * intmax_t rem + * struct __crt_multibyte_data *mbcinfo * } */ - public static long rem(MemorySegment struct) { - return struct.get(rem$LAYOUT, rem$OFFSET); + public static MemorySegment mbcinfo(MemorySegment struct) { + return struct.get(mbcinfo$LAYOUT, mbcinfo$OFFSET); } /** * Setter for field: * {@snippet lang=c : - * intmax_t rem + * struct __crt_multibyte_data *mbcinfo * } */ - public static void rem(MemorySegment struct, long fieldValue) { - struct.set(rem$LAYOUT, rem$OFFSET, fieldValue); + public static void mbcinfo(MemorySegment struct, MemorySegment fieldValue) { + struct.set(mbcinfo$LAYOUT, mbcinfo$OFFSET, fieldValue); } /** diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/decode_h.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/decode_h.java new file mode 100644 index 0000000..96df6b9 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/decode_h.java @@ -0,0 +1,2320 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +public class decode_h { + + decode_h() { + // Should not be called directly + } + + static final Arena LIBRARY_ARENA = Arena.ofAuto(); + static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls"); + + static void traceDowncall(String name, Object... args) { + String traceArgs = Arrays.stream(args) + .map(Object::toString) + .collect(Collectors.joining(", ")); + System.out.printf("%s(%s)\n", name, traceArgs); + } + + static MemorySegment findOrThrow(String symbol) { + return SYMBOL_LOOKUP.find(symbol) + .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol)); + } + + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType()); + } catch (ReflectiveOperationException ex) { + throw new AssertionError(ex); + } + } + + static MemoryLayout align(MemoryLayout layout, long align) { + return switch (layout) { + case PaddingLayout p -> p; + case ValueLayout v -> v.withByteAlignment(align); + case GroupLayout g -> { + MemoryLayout[] alignedMembers = g.memberLayouts().stream() + .map(m -> align(m, align)).toArray(MemoryLayout[]::new); + yield g instanceof StructLayout ? + MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers); + } + case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align)); + }; + } + + static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("webp"), LIBRARY_ARENA) + .or(SymbolLookup.loaderLookup()) + .or(Linker.nativeLinker().defaultLookup()); + + public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; + public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE; + public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT; + public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT; + public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG; + public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT; + public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; + public static final AddressLayout C_POINTER = ValueLayout.ADDRESS + .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); + public static final ValueLayout.OfInt C_LONG = ValueLayout.JAVA_INT; + public static final ValueLayout.OfDouble C_LONG_DOUBLE = ValueLayout.JAVA_DOUBLE; + private static final int WEBP_DECODER_ABI_VERSION = (int)521L; + /** + * {@snippet lang=c : + * #define WEBP_DECODER_ABI_VERSION 521 + * } + */ + public static int WEBP_DECODER_ABI_VERSION() { + return WEBP_DECODER_ABI_VERSION; + } + /** + * {@snippet lang=c : + * typedef long long ptrdiff_t + * } + */ + public static final OfLong ptrdiff_t = decode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef unsigned long long size_t + * } + */ + public static final OfLong size_t = decode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef unsigned short wchar_t + * } + */ + public static final OfShort wchar_t = decode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef double max_align_t + * } + */ + public static final OfDouble max_align_t = decode_h.C_DOUBLE; + /** + * {@snippet lang=c : + * typedef signed char int8_t + * } + */ + public static final OfByte int8_t = decode_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef unsigned char uint8_t + * } + */ + public static final OfByte uint8_t = decode_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef short int16_t + * } + */ + public static final OfShort int16_t = decode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef unsigned short uint16_t + * } + */ + public static final OfShort uint16_t = decode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef int int32_t + * } + */ + public static final OfInt int32_t = decode_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned int uint32_t + * } + */ + public static final OfInt uint32_t = decode_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned long long uint64_t + * } + */ + public static final OfLong uint64_t = decode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef long long int64_t + * } + */ + public static final OfLong int64_t = decode_h.C_LONG_LONG; + + private static class WebPMalloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPMalloc"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static FunctionDescriptor WebPMalloc$descriptor() { + return WebPMalloc.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MethodHandle WebPMalloc$handle() { + return WebPMalloc.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc$address() { + return WebPMalloc.ADDR; + } + + /** + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc(long size) { + var mh$ = WebPMalloc.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMalloc", size); + } + return (MemorySegment)mh$.invokeExact(size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFree { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPFree"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static FunctionDescriptor WebPFree$descriptor() { + return WebPFree.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MethodHandle WebPFree$handle() { + return WebPFree.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MemorySegment WebPFree$address() { + return WebPFree.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static void WebPFree(MemorySegment ptr) { + var mh$ = WebPFree.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFree", ptr); + } + mh$.invokeExact(ptr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPGetDecoderVersion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetDecoderVersion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPGetDecoderVersion() + * } + */ + public static FunctionDescriptor WebPGetDecoderVersion$descriptor() { + return WebPGetDecoderVersion.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPGetDecoderVersion() + * } + */ + public static MethodHandle WebPGetDecoderVersion$handle() { + return WebPGetDecoderVersion.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPGetDecoderVersion() + * } + */ + public static MemorySegment WebPGetDecoderVersion$address() { + return WebPGetDecoderVersion.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPGetDecoderVersion() + * } + */ + public static int WebPGetDecoderVersion() { + var mh$ = WebPGetDecoderVersion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetDecoderVersion"); + } + return (int)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPGetInfo { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetInfo"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPGetInfo$descriptor() { + return WebPGetInfo.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPGetInfo$handle() { + return WebPGetInfo.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPGetInfo$address() { + return WebPGetInfo.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static int WebPGetInfo(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPGetInfo.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetInfo", data, data_size, width, height); + } + return (int)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGBA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPDecodeRGBA$descriptor() { + return WebPDecodeRGBA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPDecodeRGBA$handle() { + return WebPDecodeRGBA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeRGBA$address() { + return WebPDecodeRGBA.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeRGBA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeRGBA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBA", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeARGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeARGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPDecodeARGB$descriptor() { + return WebPDecodeARGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPDecodeARGB$handle() { + return WebPDecodeARGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeARGB$address() { + return WebPDecodeARGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeARGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeARGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeARGB", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeBGRA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPDecodeBGRA$descriptor() { + return WebPDecodeBGRA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPDecodeBGRA$handle() { + return WebPDecodeBGRA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeBGRA$address() { + return WebPDecodeBGRA.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeBGRA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeBGRA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRA", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPDecodeRGB$descriptor() { + return WebPDecodeRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPDecodeRGB$handle() { + return WebPDecodeRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeRGB$address() { + return WebPDecodeRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeRGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGB", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeBGR { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGR"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPDecodeBGR$descriptor() { + return WebPDecodeBGR.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MethodHandle WebPDecodeBGR$handle() { + return WebPDecodeBGR.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeBGR$address() { + return WebPDecodeBGR.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * } + */ + public static MemorySegment WebPDecodeBGR(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeBGR.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGR", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeYUV { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeYUV"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * } + */ + public static FunctionDescriptor WebPDecodeYUV$descriptor() { + return WebPDecodeYUV.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * } + */ + public static MethodHandle WebPDecodeYUV$handle() { + return WebPDecodeYUV.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * } + */ + public static MemorySegment WebPDecodeYUV$address() { + return WebPDecodeYUV.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * } + */ + public static MemorySegment WebPDecodeYUV(MemorySegment data, long data_size, MemorySegment width, MemorySegment height, MemorySegment u, MemorySegment v, MemorySegment stride, MemorySegment uv_stride) { + var mh$ = WebPDecodeYUV.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeYUV", data, data_size, width, height, u, v, stride, uv_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height, u, v, stride, uv_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGBAInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBAInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPDecodeRGBAInto$descriptor() { + return WebPDecodeRGBAInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPDecodeRGBAInto$handle() { + return WebPDecodeRGBAInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeRGBAInto$address() { + return WebPDecodeRGBAInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeRGBAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeRGBAInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBAInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeARGBInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeARGBInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPDecodeARGBInto$descriptor() { + return WebPDecodeARGBInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPDecodeARGBInto$handle() { + return WebPDecodeARGBInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeARGBInto$address() { + return WebPDecodeARGBInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeARGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeARGBInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeARGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeBGRAInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRAInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPDecodeBGRAInto$descriptor() { + return WebPDecodeBGRAInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPDecodeBGRAInto$handle() { + return WebPDecodeBGRAInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeBGRAInto$address() { + return WebPDecodeBGRAInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeBGRAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeBGRAInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRAInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGBInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPDecodeRGBInto$descriptor() { + return WebPDecodeRGBInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPDecodeRGBInto$handle() { + return WebPDecodeRGBInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeRGBInto$address() { + return WebPDecodeRGBInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeRGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeRGBInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeBGRInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPDecodeBGRInto$descriptor() { + return WebPDecodeBGRInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPDecodeBGRInto$handle() { + return WebPDecodeBGRInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeBGRInto$address() { + return WebPDecodeBGRInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPDecodeBGRInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeBGRInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeYUVInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeYUVInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static FunctionDescriptor WebPDecodeYUVInto$descriptor() { + return WebPDecodeYUVInto.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MethodHandle WebPDecodeYUVInto$handle() { + return WebPDecodeYUVInto.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MemorySegment WebPDecodeYUVInto$address() { + return WebPDecodeYUVInto.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MemorySegment WebPDecodeYUVInto(MemorySegment data, long data_size, MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { + var mh$ = WebPDecodeYUVInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeYUVInto", data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int MODE_RGB = (int)0L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_RGB = 0 + * } + */ + public static int MODE_RGB() { + return MODE_RGB; + } + private static final int MODE_RGBA = (int)1L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_RGBA = 1 + * } + */ + public static int MODE_RGBA() { + return MODE_RGBA; + } + private static final int MODE_BGR = (int)2L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_BGR = 2 + * } + */ + public static int MODE_BGR() { + return MODE_BGR; + } + private static final int MODE_BGRA = (int)3L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_BGRA = 3 + * } + */ + public static int MODE_BGRA() { + return MODE_BGRA; + } + private static final int MODE_ARGB = (int)4L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_ARGB = 4 + * } + */ + public static int MODE_ARGB() { + return MODE_ARGB; + } + private static final int MODE_RGBA_4444 = (int)5L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_RGBA_4444 = 5 + * } + */ + public static int MODE_RGBA_4444() { + return MODE_RGBA_4444; + } + private static final int MODE_RGB_565 = (int)6L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_RGB_565 = 6 + * } + */ + public static int MODE_RGB_565() { + return MODE_RGB_565; + } + private static final int MODE_rgbA = (int)7L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_rgbA = 7 + * } + */ + public static int MODE_rgbA() { + return MODE_rgbA; + } + private static final int MODE_bgrA = (int)8L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_bgrA = 8 + * } + */ + public static int MODE_bgrA() { + return MODE_bgrA; + } + private static final int MODE_Argb = (int)9L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_Argb = 9 + * } + */ + public static int MODE_Argb() { + return MODE_Argb; + } + private static final int MODE_rgbA_4444 = (int)10L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_rgbA_4444 = 10 + * } + */ + public static int MODE_rgbA_4444() { + return MODE_rgbA_4444; + } + private static final int MODE_YUV = (int)11L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_YUV = 11 + * } + */ + public static int MODE_YUV() { + return MODE_YUV; + } + private static final int MODE_YUVA = (int)12L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_YUVA = 12 + * } + */ + public static int MODE_YUVA() { + return MODE_YUVA; + } + private static final int MODE_LAST = (int)13L; + /** + * {@snippet lang=c : + * enum WEBP_CSP_MODE.MODE_LAST = 13 + * } + */ + public static int MODE_LAST() { + return MODE_LAST; + } + + private static class WebPInitDecBufferInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPInitDecBufferInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * } + */ + public static FunctionDescriptor WebPInitDecBufferInternal$descriptor() { + return WebPInitDecBufferInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * } + */ + public static MethodHandle WebPInitDecBufferInternal$handle() { + return WebPInitDecBufferInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * } + */ + public static MemorySegment WebPInitDecBufferInternal$address() { + return WebPInitDecBufferInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * } + */ + public static int WebPInitDecBufferInternal(MemorySegment x0, int x1) { + var mh$ = WebPInitDecBufferInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPInitDecBufferInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFreeDecBuffer { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPFreeDecBuffer"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * } + */ + public static FunctionDescriptor WebPFreeDecBuffer$descriptor() { + return WebPFreeDecBuffer.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * } + */ + public static MethodHandle WebPFreeDecBuffer$handle() { + return WebPFreeDecBuffer.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * } + */ + public static MemorySegment WebPFreeDecBuffer$address() { + return WebPFreeDecBuffer.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * } + */ + public static void WebPFreeDecBuffer(MemorySegment buffer) { + var mh$ = WebPFreeDecBuffer.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFreeDecBuffer", buffer); + } + mh$.invokeExact(buffer); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int VP8_STATUS_OK = (int)0L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_OK = 0 + * } + */ + public static int VP8_STATUS_OK() { + return VP8_STATUS_OK; + } + private static final int VP8_STATUS_OUT_OF_MEMORY = (int)1L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_OUT_OF_MEMORY = 1 + * } + */ + public static int VP8_STATUS_OUT_OF_MEMORY() { + return VP8_STATUS_OUT_OF_MEMORY; + } + private static final int VP8_STATUS_INVALID_PARAM = (int)2L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_INVALID_PARAM = 2 + * } + */ + public static int VP8_STATUS_INVALID_PARAM() { + return VP8_STATUS_INVALID_PARAM; + } + private static final int VP8_STATUS_BITSTREAM_ERROR = (int)3L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_BITSTREAM_ERROR = 3 + * } + */ + public static int VP8_STATUS_BITSTREAM_ERROR() { + return VP8_STATUS_BITSTREAM_ERROR; + } + private static final int VP8_STATUS_UNSUPPORTED_FEATURE = (int)4L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_UNSUPPORTED_FEATURE = 4 + * } + */ + public static int VP8_STATUS_UNSUPPORTED_FEATURE() { + return VP8_STATUS_UNSUPPORTED_FEATURE; + } + private static final int VP8_STATUS_SUSPENDED = (int)5L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_SUSPENDED = 5 + * } + */ + public static int VP8_STATUS_SUSPENDED() { + return VP8_STATUS_SUSPENDED; + } + private static final int VP8_STATUS_USER_ABORT = (int)6L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_USER_ABORT = 6 + * } + */ + public static int VP8_STATUS_USER_ABORT() { + return VP8_STATUS_USER_ABORT; + } + private static final int VP8_STATUS_NOT_ENOUGH_DATA = (int)7L; + /** + * {@snippet lang=c : + * enum VP8StatusCode.VP8_STATUS_NOT_ENOUGH_DATA = 7 + * } + */ + public static int VP8_STATUS_NOT_ENOUGH_DATA() { + return VP8_STATUS_NOT_ENOUGH_DATA; + } + + private static class WebPINewDecoder { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewDecoder"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * } + */ + public static FunctionDescriptor WebPINewDecoder$descriptor() { + return WebPINewDecoder.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * } + */ + public static MethodHandle WebPINewDecoder$handle() { + return WebPINewDecoder.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * } + */ + public static MemorySegment WebPINewDecoder$address() { + return WebPINewDecoder.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * } + */ + public static MemorySegment WebPINewDecoder(MemorySegment output_buffer) { + var mh$ = WebPINewDecoder.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPINewDecoder", output_buffer); + } + return (MemorySegment)mh$.invokeExact(output_buffer); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPINewRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static FunctionDescriptor WebPINewRGB$descriptor() { + return WebPINewRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MethodHandle WebPINewRGB$handle() { + return WebPINewRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPINewRGB$address() { + return WebPINewRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * } + */ + public static MemorySegment WebPINewRGB(int csp, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPINewRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPINewRGB", csp, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(csp, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPINewYUVA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewYUVA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * } + */ + public static FunctionDescriptor WebPINewYUVA$descriptor() { + return WebPINewYUVA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * } + */ + public static MethodHandle WebPINewYUVA$handle() { + return WebPINewYUVA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * } + */ + public static MemorySegment WebPINewYUVA$address() { + return WebPINewYUVA.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * } + */ + public static MemorySegment WebPINewYUVA(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride, MemorySegment a, long a_size, int a_stride) { + var mh$ = WebPINewYUVA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPINewYUVA", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); + } + return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPINewYUV { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewYUV"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static FunctionDescriptor WebPINewYUV$descriptor() { + return WebPINewYUV.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MethodHandle WebPINewYUV$handle() { + return WebPINewYUV.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MemorySegment WebPINewYUV$address() { + return WebPINewYUV.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * } + */ + public static MemorySegment WebPINewYUV(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { + var mh$ = WebPINewYUV.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPINewYUV", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } + return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDelete"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPIDelete(WebPIDecoder *idec) + * } + */ + public static FunctionDescriptor WebPIDelete$descriptor() { + return WebPIDelete.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPIDelete(WebPIDecoder *idec) + * } + */ + public static MethodHandle WebPIDelete$handle() { + return WebPIDelete.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPIDelete(WebPIDecoder *idec) + * } + */ + public static MemorySegment WebPIDelete$address() { + return WebPIDelete.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPIDelete(WebPIDecoder *idec) + * } + */ + public static void WebPIDelete(MemorySegment idec) { + var mh$ = WebPIDelete.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIDelete", idec); + } + mh$.invokeExact(idec); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIAppend { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIAppend"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static FunctionDescriptor WebPIAppend$descriptor() { + return WebPIAppend.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static MethodHandle WebPIAppend$handle() { + return WebPIAppend.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static MemorySegment WebPIAppend$address() { + return WebPIAppend.ADDR; + } + + /** + * {@snippet lang=c : + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static int WebPIAppend(MemorySegment idec, MemorySegment data, long data_size) { + var mh$ = WebPIAppend.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIAppend", idec, data, data_size); + } + return (int)mh$.invokeExact(idec, data, data_size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIUpdate { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIUpdate"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static FunctionDescriptor WebPIUpdate$descriptor() { + return WebPIUpdate.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static MethodHandle WebPIUpdate$handle() { + return WebPIUpdate.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static MemorySegment WebPIUpdate$address() { + return WebPIUpdate.ADDR; + } + + /** + * {@snippet lang=c : + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * } + */ + public static int WebPIUpdate(MemorySegment idec, MemorySegment data, long data_size) { + var mh$ = WebPIUpdate.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIUpdate", idec, data, data_size); + } + return (int)mh$.invokeExact(idec, data, data_size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIDecGetRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecGetRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * } + */ + public static FunctionDescriptor WebPIDecGetRGB$descriptor() { + return WebPIDecGetRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * } + */ + public static MethodHandle WebPIDecGetRGB$handle() { + return WebPIDecGetRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * } + */ + public static MemorySegment WebPIDecGetRGB$address() { + return WebPIDecGetRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * } + */ + public static MemorySegment WebPIDecGetRGB(MemorySegment idec, MemorySegment last_y, MemorySegment width, MemorySegment height, MemorySegment stride) { + var mh$ = WebPIDecGetRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIDecGetRGB", idec, last_y, width, height, stride); + } + return (MemorySegment)mh$.invokeExact(idec, last_y, width, height, stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIDecGetYUVA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecGetYUVA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * } + */ + public static FunctionDescriptor WebPIDecGetYUVA$descriptor() { + return WebPIDecGetYUVA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * } + */ + public static MethodHandle WebPIDecGetYUVA$handle() { + return WebPIDecGetYUVA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * } + */ + public static MemorySegment WebPIDecGetYUVA$address() { + return WebPIDecGetYUVA.ADDR; + } + + /** + * {@snippet lang=c : + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * } + */ + public static MemorySegment WebPIDecGetYUVA(MemorySegment idec, MemorySegment last_y, MemorySegment u, MemorySegment v, MemorySegment a, MemorySegment width, MemorySegment height, MemorySegment stride, MemorySegment uv_stride, MemorySegment a_stride) { + var mh$ = WebPIDecGetYUVA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIDecGetYUVA", idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); + } + return (MemorySegment)mh$.invokeExact(idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIDecodedArea { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecodedArea"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPIDecodedArea$descriptor() { + return WebPIDecodedArea.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * } + */ + public static MethodHandle WebPIDecodedArea$handle() { + return WebPIDecodedArea.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * } + */ + public static MemorySegment WebPIDecodedArea$address() { + return WebPIDecodedArea.ADDR; + } + + /** + * {@snippet lang=c : + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * } + */ + public static MemorySegment WebPIDecodedArea(MemorySegment idec, MemorySegment left, MemorySegment top, MemorySegment width, MemorySegment height) { + var mh$ = WebPIDecodedArea.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIDecodedArea", idec, left, top, width, height); + } + return (MemorySegment)mh$.invokeExact(idec, left, top, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPGetFeaturesInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetFeaturesInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * } + */ + public static FunctionDescriptor WebPGetFeaturesInternal$descriptor() { + return WebPGetFeaturesInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * } + */ + public static MethodHandle WebPGetFeaturesInternal$handle() { + return WebPGetFeaturesInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * } + */ + public static MemorySegment WebPGetFeaturesInternal$address() { + return WebPGetFeaturesInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * } + */ + public static int WebPGetFeaturesInternal(MemorySegment x0, long x1, MemorySegment x2, int x3) { + var mh$ = WebPGetFeaturesInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetFeaturesInternal", x0, x1, x2, x3); + } + return (int)mh$.invokeExact(x0, x1, x2, x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPInitDecoderConfigInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_INT + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPInitDecoderConfigInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * } + */ + public static FunctionDescriptor WebPInitDecoderConfigInternal$descriptor() { + return WebPInitDecoderConfigInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * } + */ + public static MethodHandle WebPInitDecoderConfigInternal$handle() { + return WebPInitDecoderConfigInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * } + */ + public static MemorySegment WebPInitDecoderConfigInternal$address() { + return WebPInitDecoderConfigInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * } + */ + public static int WebPInitDecoderConfigInternal(MemorySegment x0, int x1) { + var mh$ = WebPInitDecoderConfigInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPInitDecoderConfigInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPIDecode { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_POINTER, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecode"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static FunctionDescriptor WebPIDecode$descriptor() { + return WebPIDecode.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static MethodHandle WebPIDecode$handle() { + return WebPIDecode.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static MemorySegment WebPIDecode$address() { + return WebPIDecode.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static MemorySegment WebPIDecode(MemorySegment data, long data_size, MemorySegment config) { + var mh$ = WebPIDecode.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPIDecode", data, data_size, config); + } + return (MemorySegment)mh$.invokeExact(data, data_size, config); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecode { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + decode_h.C_INT, + decode_h.C_POINTER, + decode_h.C_LONG_LONG, + decode_h.C_POINTER + ); + + public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecode"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static FunctionDescriptor WebPDecode$descriptor() { + return WebPDecode.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static MethodHandle WebPDecode$handle() { + return WebPDecode.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static MemorySegment WebPDecode$address() { + return WebPDecode.ADDR; + } + + /** + * {@snippet lang=c : + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * } + */ + public static int WebPDecode(MemorySegment data, long data_size, MemorySegment config) { + var mh$ = WebPDecode.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecode", data, data_size, config); + } + return (int)mh$.invokeExact(data, data_size, config); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final MemorySegment NULL = MemorySegment.ofAddress(0L); + /** + * {@snippet lang=c : + * #define NULL (void*) 0 + * } + */ + public static MemorySegment NULL() { + return NULL; + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/demux_h.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/demux_h.java similarity index 52% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/demux_h.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/demux_h.java index 83b0c5a..8e0b46e 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/demux_h.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/demux_h.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -55,12 +55,8 @@ static MemoryLayout align(MemoryLayout layout, long align) { }; } - - static { - System.loadLibrary("webpdemux"); - } - - static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup() + static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("webpdemux"), LIBRARY_ARENA) + .or(SymbolLookup.loaderLookup()) .or(Linker.nativeLinker().defaultLookup()); public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; @@ -72,3441 +68,2354 @@ static MemoryLayout align(MemoryLayout layout, long align) { public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; public static final AddressLayout C_POINTER = ValueLayout.ADDRESS .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); - public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG; - private static final int __has_safe_buffers = (int)0L; + public static final ValueLayout.OfInt C_LONG = ValueLayout.JAVA_INT; + public static final ValueLayout.OfDouble C_LONG_DOUBLE = ValueLayout.JAVA_DOUBLE; + private static final int WEBP_DECODER_ABI_VERSION = (int)521L; /** * {@snippet lang=c : - * #define __has_safe_buffers 0 + * #define WEBP_DECODER_ABI_VERSION 521 * } */ - public static int __has_safe_buffers() { - return __has_safe_buffers; + public static int WEBP_DECODER_ABI_VERSION() { + return WEBP_DECODER_ABI_VERSION; } - private static final int __DARWIN_ONLY_64_BIT_INO_T = (int)1L; + private static final int _VCRT_COMPILER_PREPROCESSOR = (int)1L; /** * {@snippet lang=c : - * #define __DARWIN_ONLY_64_BIT_INO_T 1 + * #define _VCRT_COMPILER_PREPROCESSOR 1 * } */ - public static int __DARWIN_ONLY_64_BIT_INO_T() { - return __DARWIN_ONLY_64_BIT_INO_T; + public static int _VCRT_COMPILER_PREPROCESSOR() { + return _VCRT_COMPILER_PREPROCESSOR; } - private static final int __DARWIN_ONLY_UNIX_CONFORMANCE = (int)1L; + private static final int _SAL_VERSION = (int)20L; /** * {@snippet lang=c : - * #define __DARWIN_ONLY_UNIX_CONFORMANCE 1 + * #define _SAL_VERSION 20 * } */ - public static int __DARWIN_ONLY_UNIX_CONFORMANCE() { - return __DARWIN_ONLY_UNIX_CONFORMANCE; + public static int _SAL_VERSION() { + return _SAL_VERSION; } - private static final int __DARWIN_ONLY_VERS_1050 = (int)1L; + private static final int __SAL_H_VERSION = (int)180000000L; /** * {@snippet lang=c : - * #define __DARWIN_ONLY_VERS_1050 1 + * #define __SAL_H_VERSION 180000000 * } */ - public static int __DARWIN_ONLY_VERS_1050() { - return __DARWIN_ONLY_VERS_1050; + public static int __SAL_H_VERSION() { + return __SAL_H_VERSION; } - private static final int __DARWIN_UNIX03 = (int)1L; + private static final int _USE_DECLSPECS_FOR_SAL = (int)0L; /** * {@snippet lang=c : - * #define __DARWIN_UNIX03 1 + * #define _USE_DECLSPECS_FOR_SAL 0 * } */ - public static int __DARWIN_UNIX03() { - return __DARWIN_UNIX03; + public static int _USE_DECLSPECS_FOR_SAL() { + return _USE_DECLSPECS_FOR_SAL; } - private static final int __DARWIN_64_BIT_INO_T = (int)1L; + private static final int _USE_ATTRIBUTES_FOR_SAL = (int)0L; /** * {@snippet lang=c : - * #define __DARWIN_64_BIT_INO_T 1 + * #define _USE_ATTRIBUTES_FOR_SAL 0 * } */ - public static int __DARWIN_64_BIT_INO_T() { - return __DARWIN_64_BIT_INO_T; + public static int _USE_ATTRIBUTES_FOR_SAL() { + return _USE_ATTRIBUTES_FOR_SAL; } - private static final int __DARWIN_VERS_1050 = (int)1L; + private static final int _CRT_PACKING = (int)8L; /** * {@snippet lang=c : - * #define __DARWIN_VERS_1050 1 + * #define _CRT_PACKING 8 * } */ - public static int __DARWIN_VERS_1050() { - return __DARWIN_VERS_1050; + public static int _CRT_PACKING() { + return _CRT_PACKING; } - private static final int __DARWIN_NON_CANCELABLE = (int)0L; + private static final int _HAS_EXCEPTIONS = (int)1L; /** * {@snippet lang=c : - * #define __DARWIN_NON_CANCELABLE 0 + * #define _HAS_EXCEPTIONS 1 * } */ - public static int __DARWIN_NON_CANCELABLE() { - return __DARWIN_NON_CANCELABLE; + public static int _HAS_EXCEPTIONS() { + return _HAS_EXCEPTIONS; } - private static final int __STDC_WANT_LIB_EXT1__ = (int)1L; + private static final int _HAS_CXX17 = (int)0L; /** * {@snippet lang=c : - * #define __STDC_WANT_LIB_EXT1__ 1 + * #define _HAS_CXX17 0 * } */ - public static int __STDC_WANT_LIB_EXT1__() { - return __STDC_WANT_LIB_EXT1__; + public static int _HAS_CXX17() { + return _HAS_CXX17; } - private static final int __DARWIN_NO_LONG_LONG = (int)0L; + private static final int _HAS_CXX20 = (int)0L; /** * {@snippet lang=c : - * #define __DARWIN_NO_LONG_LONG 0 + * #define _HAS_CXX20 0 * } */ - public static int __DARWIN_NO_LONG_LONG() { - return __DARWIN_NO_LONG_LONG; + public static int _HAS_CXX20() { + return _HAS_CXX20; } - private static final int _DARWIN_FEATURE_64_BIT_INODE = (int)1L; + private static final int _HAS_CXX23 = (int)0L; /** * {@snippet lang=c : - * #define _DARWIN_FEATURE_64_BIT_INODE 1 + * #define _HAS_CXX23 0 * } */ - public static int _DARWIN_FEATURE_64_BIT_INODE() { - return _DARWIN_FEATURE_64_BIT_INODE; + public static int _HAS_CXX23() { + return _HAS_CXX23; } - private static final int _DARWIN_FEATURE_ONLY_64_BIT_INODE = (int)1L; + private static final int _HAS_NODISCARD = (int)0L; /** * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_64_BIT_INODE 1 + * #define _HAS_NODISCARD 0 * } */ - public static int _DARWIN_FEATURE_ONLY_64_BIT_INODE() { - return _DARWIN_FEATURE_ONLY_64_BIT_INODE; + public static int _HAS_NODISCARD() { + return _HAS_NODISCARD; } - private static final int _DARWIN_FEATURE_ONLY_VERS_1050 = (int)1L; + private static final int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE = (int)1L; /** * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_VERS_1050 1 + * #define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 * } */ - public static int _DARWIN_FEATURE_ONLY_VERS_1050() { - return _DARWIN_FEATURE_ONLY_VERS_1050; + public static int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE() { + return _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE; } - private static final int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = (int)1L; + private static final int _CRT_BUILD_DESKTOP_APP = (int)1L; /** * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE 1 + * #define _CRT_BUILD_DESKTOP_APP 1 * } */ - public static int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE() { - return _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE; + public static int _CRT_BUILD_DESKTOP_APP() { + return _CRT_BUILD_DESKTOP_APP; } - private static final int _DARWIN_FEATURE_UNIX_CONFORMANCE = (int)3L; + private static final int _ARGMAX = (int)100L; /** * {@snippet lang=c : - * #define _DARWIN_FEATURE_UNIX_CONFORMANCE 3 + * #define _ARGMAX 100 * } */ - public static int _DARWIN_FEATURE_UNIX_CONFORMANCE() { - return _DARWIN_FEATURE_UNIX_CONFORMANCE; + public static int _ARGMAX() { + return _ARGMAX; } - private static final int __has_ptrcheck = (int)0L; + private static final int _CRT_INT_MAX = (int)2147483647L; /** * {@snippet lang=c : - * #define __has_ptrcheck 0 + * #define _CRT_INT_MAX 2147483647 * } */ - public static int __has_ptrcheck() { - return __has_ptrcheck; + public static int _CRT_INT_MAX() { + return _CRT_INT_MAX; } - private static final int __API_TO_BE_DEPRECATED = (int)100000L; + private static final int _CRT_FUNCTIONS_REQUIRED = (int)1L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED 100000 + * #define _CRT_FUNCTIONS_REQUIRED 1 * } */ - public static int __API_TO_BE_DEPRECATED() { - return __API_TO_BE_DEPRECATED; + public static int _CRT_FUNCTIONS_REQUIRED() { + return _CRT_FUNCTIONS_REQUIRED; } - private static final int __API_TO_BE_DEPRECATED_MACOS = (int)100000L; + private static final int _CRT_HAS_CXX17 = (int)0L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_MACOS 100000 + * #define _CRT_HAS_CXX17 0 * } */ - public static int __API_TO_BE_DEPRECATED_MACOS() { - return __API_TO_BE_DEPRECATED_MACOS; + public static int _CRT_HAS_CXX17() { + return _CRT_HAS_CXX17; } - private static final int __API_TO_BE_DEPRECATED_IOS = (int)100000L; + private static final int _CRT_HAS_C11 = (int)1L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_IOS 100000 + * #define _CRT_HAS_C11 1 * } */ - public static int __API_TO_BE_DEPRECATED_IOS() { - return __API_TO_BE_DEPRECATED_IOS; + public static int _CRT_HAS_C11() { + return _CRT_HAS_C11; } - private static final int __API_TO_BE_DEPRECATED_MACCATALYST = (int)100000L; + private static final int _CRT_INTERNAL_NONSTDC_NAMES = (int)1L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_MACCATALYST 100000 + * #define _CRT_INTERNAL_NONSTDC_NAMES 1 * } */ - public static int __API_TO_BE_DEPRECATED_MACCATALYST() { - return __API_TO_BE_DEPRECATED_MACCATALYST; + public static int _CRT_INTERNAL_NONSTDC_NAMES() { + return _CRT_INTERNAL_NONSTDC_NAMES; } - private static final int __API_TO_BE_DEPRECATED_WATCHOS = (int)100000L; + private static final int __STDC_WANT_SECURE_LIB__ = (int)1L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_WATCHOS 100000 + * #define __STDC_WANT_SECURE_LIB__ 1 * } */ - public static int __API_TO_BE_DEPRECATED_WATCHOS() { - return __API_TO_BE_DEPRECATED_WATCHOS; + public static int __STDC_WANT_SECURE_LIB__() { + return __STDC_WANT_SECURE_LIB__; } - private static final int __API_TO_BE_DEPRECATED_TVOS = (int)100000L; + private static final int _SECURECRT_FILL_BUFFER_PATTERN = (int)254L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_TVOS 100000 + * #define _SECURECRT_FILL_BUFFER_PATTERN 254 * } */ - public static int __API_TO_BE_DEPRECATED_TVOS() { - return __API_TO_BE_DEPRECATED_TVOS; + public static int _SECURECRT_FILL_BUFFER_PATTERN() { + return _SECURECRT_FILL_BUFFER_PATTERN; } - private static final int __API_TO_BE_DEPRECATED_DRIVERKIT = (int)100000L; + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = (int)0L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_DRIVERKIT 100000 + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0 * } */ - public static int __API_TO_BE_DEPRECATED_DRIVERKIT() { - return __API_TO_BE_DEPRECATED_DRIVERKIT; + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES; } - private static final int __API_TO_BE_DEPRECATED_VISIONOS = (int)100000L; + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = (int)0L; /** * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_VISIONOS 100000 + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 0 * } */ - public static int __API_TO_BE_DEPRECATED_VISIONOS() { - return __API_TO_BE_DEPRECATED_VISIONOS; + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT; } - private static final int __MAC_10_0 = (int)1000L; + private static final int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = (int)1L; /** * {@snippet lang=c : - * #define __MAC_10_0 1000 + * #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1 * } */ - public static int __MAC_10_0() { - return __MAC_10_0; + public static int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES() { + return _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES; } - private static final int __MAC_10_1 = (int)1010L; + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = (int)0L; /** * {@snippet lang=c : - * #define __MAC_10_1 1010 + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY 0 * } */ - public static int __MAC_10_1() { - return __MAC_10_1; + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY; } - private static final int __MAC_10_2 = (int)1020L; + private static final int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = (int)0L; /** * {@snippet lang=c : - * #define __MAC_10_2 1020 + * #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY 0 * } */ - public static int __MAC_10_2() { - return __MAC_10_2; + public static int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY() { + return _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY; } - private static final int __MAC_10_3 = (int)1030L; + private static final int EPERM = (int)1L; /** * {@snippet lang=c : - * #define __MAC_10_3 1030 + * #define EPERM 1 * } */ - public static int __MAC_10_3() { - return __MAC_10_3; + public static int EPERM() { + return EPERM; } - private static final int __MAC_10_4 = (int)1040L; + private static final int ENOENT = (int)2L; /** * {@snippet lang=c : - * #define __MAC_10_4 1040 + * #define ENOENT 2 * } */ - public static int __MAC_10_4() { - return __MAC_10_4; + public static int ENOENT() { + return ENOENT; } - private static final int __MAC_10_5 = (int)1050L; + private static final int ESRCH = (int)3L; /** * {@snippet lang=c : - * #define __MAC_10_5 1050 + * #define ESRCH 3 * } */ - public static int __MAC_10_5() { - return __MAC_10_5; + public static int ESRCH() { + return ESRCH; } - private static final int __MAC_10_6 = (int)1060L; + private static final int EINTR = (int)4L; /** * {@snippet lang=c : - * #define __MAC_10_6 1060 + * #define EINTR 4 * } */ - public static int __MAC_10_6() { - return __MAC_10_6; + public static int EINTR() { + return EINTR; } - private static final int __MAC_10_7 = (int)1070L; + private static final int EIO = (int)5L; /** * {@snippet lang=c : - * #define __MAC_10_7 1070 + * #define EIO 5 * } */ - public static int __MAC_10_7() { - return __MAC_10_7; + public static int EIO() { + return EIO; } - private static final int __MAC_10_8 = (int)1080L; + private static final int ENXIO = (int)6L; /** * {@snippet lang=c : - * #define __MAC_10_8 1080 + * #define ENXIO 6 * } */ - public static int __MAC_10_8() { - return __MAC_10_8; + public static int ENXIO() { + return ENXIO; } - private static final int __MAC_10_9 = (int)1090L; + private static final int E2BIG = (int)7L; /** * {@snippet lang=c : - * #define __MAC_10_9 1090 + * #define E2BIG 7 * } */ - public static int __MAC_10_9() { - return __MAC_10_9; + public static int E2BIG() { + return E2BIG; } - private static final int __MAC_10_10 = (int)101000L; + private static final int ENOEXEC = (int)8L; /** * {@snippet lang=c : - * #define __MAC_10_10 101000 + * #define ENOEXEC 8 * } */ - public static int __MAC_10_10() { - return __MAC_10_10; + public static int ENOEXEC() { + return ENOEXEC; } - private static final int __MAC_10_10_2 = (int)101002L; + private static final int EBADF = (int)9L; /** * {@snippet lang=c : - * #define __MAC_10_10_2 101002 + * #define EBADF 9 * } */ - public static int __MAC_10_10_2() { - return __MAC_10_10_2; + public static int EBADF() { + return EBADF; } - private static final int __MAC_10_10_3 = (int)101003L; + private static final int ECHILD = (int)10L; /** * {@snippet lang=c : - * #define __MAC_10_10_3 101003 + * #define ECHILD 10 * } */ - public static int __MAC_10_10_3() { - return __MAC_10_10_3; + public static int ECHILD() { + return ECHILD; } - private static final int __MAC_10_11 = (int)101100L; + private static final int EAGAIN = (int)11L; /** * {@snippet lang=c : - * #define __MAC_10_11 101100 + * #define EAGAIN 11 * } */ - public static int __MAC_10_11() { - return __MAC_10_11; + public static int EAGAIN() { + return EAGAIN; } - private static final int __MAC_10_11_2 = (int)101102L; + private static final int ENOMEM = (int)12L; /** * {@snippet lang=c : - * #define __MAC_10_11_2 101102 + * #define ENOMEM 12 * } */ - public static int __MAC_10_11_2() { - return __MAC_10_11_2; + public static int ENOMEM() { + return ENOMEM; } - private static final int __MAC_10_11_3 = (int)101103L; + private static final int EACCES = (int)13L; /** * {@snippet lang=c : - * #define __MAC_10_11_3 101103 + * #define EACCES 13 * } */ - public static int __MAC_10_11_3() { - return __MAC_10_11_3; + public static int EACCES() { + return EACCES; } - private static final int __MAC_10_11_4 = (int)101104L; + private static final int EFAULT = (int)14L; /** * {@snippet lang=c : - * #define __MAC_10_11_4 101104 + * #define EFAULT 14 * } */ - public static int __MAC_10_11_4() { - return __MAC_10_11_4; + public static int EFAULT() { + return EFAULT; } - private static final int __MAC_10_12 = (int)101200L; + private static final int EBUSY = (int)16L; /** * {@snippet lang=c : - * #define __MAC_10_12 101200 + * #define EBUSY 16 * } */ - public static int __MAC_10_12() { - return __MAC_10_12; + public static int EBUSY() { + return EBUSY; } - private static final int __MAC_10_12_1 = (int)101201L; + private static final int EEXIST = (int)17L; /** * {@snippet lang=c : - * #define __MAC_10_12_1 101201 + * #define EEXIST 17 * } */ - public static int __MAC_10_12_1() { - return __MAC_10_12_1; + public static int EEXIST() { + return EEXIST; } - private static final int __MAC_10_12_2 = (int)101202L; + private static final int EXDEV = (int)18L; /** * {@snippet lang=c : - * #define __MAC_10_12_2 101202 + * #define EXDEV 18 * } */ - public static int __MAC_10_12_2() { - return __MAC_10_12_2; + public static int EXDEV() { + return EXDEV; } - private static final int __MAC_10_12_4 = (int)101204L; + private static final int ENODEV = (int)19L; /** * {@snippet lang=c : - * #define __MAC_10_12_4 101204 + * #define ENODEV 19 * } */ - public static int __MAC_10_12_4() { - return __MAC_10_12_4; + public static int ENODEV() { + return ENODEV; } - private static final int __MAC_10_13 = (int)101300L; + private static final int ENOTDIR = (int)20L; /** * {@snippet lang=c : - * #define __MAC_10_13 101300 + * #define ENOTDIR 20 * } */ - public static int __MAC_10_13() { - return __MAC_10_13; + public static int ENOTDIR() { + return ENOTDIR; } - private static final int __MAC_10_13_1 = (int)101301L; + private static final int EISDIR = (int)21L; /** * {@snippet lang=c : - * #define __MAC_10_13_1 101301 + * #define EISDIR 21 * } */ - public static int __MAC_10_13_1() { - return __MAC_10_13_1; + public static int EISDIR() { + return EISDIR; } - private static final int __MAC_10_13_2 = (int)101302L; + private static final int ENFILE = (int)23L; /** * {@snippet lang=c : - * #define __MAC_10_13_2 101302 + * #define ENFILE 23 * } */ - public static int __MAC_10_13_2() { - return __MAC_10_13_2; + public static int ENFILE() { + return ENFILE; } - private static final int __MAC_10_13_4 = (int)101304L; + private static final int EMFILE = (int)24L; /** * {@snippet lang=c : - * #define __MAC_10_13_4 101304 + * #define EMFILE 24 * } */ - public static int __MAC_10_13_4() { - return __MAC_10_13_4; + public static int EMFILE() { + return EMFILE; } - private static final int __MAC_10_14 = (int)101400L; + private static final int ENOTTY = (int)25L; /** * {@snippet lang=c : - * #define __MAC_10_14 101400 + * #define ENOTTY 25 * } */ - public static int __MAC_10_14() { - return __MAC_10_14; + public static int ENOTTY() { + return ENOTTY; } - private static final int __MAC_10_14_1 = (int)101401L; + private static final int EFBIG = (int)27L; /** * {@snippet lang=c : - * #define __MAC_10_14_1 101401 + * #define EFBIG 27 * } */ - public static int __MAC_10_14_1() { - return __MAC_10_14_1; + public static int EFBIG() { + return EFBIG; } - private static final int __MAC_10_14_4 = (int)101404L; + private static final int ENOSPC = (int)28L; /** * {@snippet lang=c : - * #define __MAC_10_14_4 101404 + * #define ENOSPC 28 * } */ - public static int __MAC_10_14_4() { - return __MAC_10_14_4; + public static int ENOSPC() { + return ENOSPC; } - private static final int __MAC_10_14_5 = (int)101405L; + private static final int ESPIPE = (int)29L; /** * {@snippet lang=c : - * #define __MAC_10_14_5 101405 + * #define ESPIPE 29 * } */ - public static int __MAC_10_14_5() { - return __MAC_10_14_5; + public static int ESPIPE() { + return ESPIPE; } - private static final int __MAC_10_14_6 = (int)101406L; + private static final int EROFS = (int)30L; /** * {@snippet lang=c : - * #define __MAC_10_14_6 101406 + * #define EROFS 30 * } */ - public static int __MAC_10_14_6() { - return __MAC_10_14_6; + public static int EROFS() { + return EROFS; } - private static final int __MAC_10_15 = (int)101500L; + private static final int EMLINK = (int)31L; /** * {@snippet lang=c : - * #define __MAC_10_15 101500 + * #define EMLINK 31 * } */ - public static int __MAC_10_15() { - return __MAC_10_15; + public static int EMLINK() { + return EMLINK; } - private static final int __MAC_10_15_1 = (int)101501L; + private static final int EPIPE = (int)32L; /** * {@snippet lang=c : - * #define __MAC_10_15_1 101501 + * #define EPIPE 32 * } */ - public static int __MAC_10_15_1() { - return __MAC_10_15_1; + public static int EPIPE() { + return EPIPE; } - private static final int __MAC_10_15_4 = (int)101504L; + private static final int EDOM = (int)33L; /** * {@snippet lang=c : - * #define __MAC_10_15_4 101504 + * #define EDOM 33 * } */ - public static int __MAC_10_15_4() { - return __MAC_10_15_4; + public static int EDOM() { + return EDOM; } - private static final int __MAC_10_16 = (int)101600L; + private static final int EDEADLK = (int)36L; /** * {@snippet lang=c : - * #define __MAC_10_16 101600 + * #define EDEADLK 36 * } */ - public static int __MAC_10_16() { - return __MAC_10_16; + public static int EDEADLK() { + return EDEADLK; } - private static final int __MAC_11_0 = (int)110000L; + private static final int ENAMETOOLONG = (int)38L; /** * {@snippet lang=c : - * #define __MAC_11_0 110000 + * #define ENAMETOOLONG 38 * } */ - public static int __MAC_11_0() { - return __MAC_11_0; + public static int ENAMETOOLONG() { + return ENAMETOOLONG; } - private static final int __MAC_11_1 = (int)110100L; + private static final int ENOLCK = (int)39L; /** * {@snippet lang=c : - * #define __MAC_11_1 110100 + * #define ENOLCK 39 * } */ - public static int __MAC_11_1() { - return __MAC_11_1; + public static int ENOLCK() { + return ENOLCK; } - private static final int __MAC_11_3 = (int)110300L; + private static final int ENOSYS = (int)40L; /** * {@snippet lang=c : - * #define __MAC_11_3 110300 + * #define ENOSYS 40 * } */ - public static int __MAC_11_3() { - return __MAC_11_3; + public static int ENOSYS() { + return ENOSYS; } - private static final int __MAC_11_4 = (int)110400L; + private static final int ENOTEMPTY = (int)41L; /** * {@snippet lang=c : - * #define __MAC_11_4 110400 + * #define ENOTEMPTY 41 * } */ - public static int __MAC_11_4() { - return __MAC_11_4; + public static int ENOTEMPTY() { + return ENOTEMPTY; } - private static final int __MAC_11_5 = (int)110500L; + private static final int EINVAL = (int)22L; /** * {@snippet lang=c : - * #define __MAC_11_5 110500 + * #define EINVAL 22 * } */ - public static int __MAC_11_5() { - return __MAC_11_5; + public static int EINVAL() { + return EINVAL; } - private static final int __MAC_11_6 = (int)110600L; + private static final int ERANGE = (int)34L; /** * {@snippet lang=c : - * #define __MAC_11_6 110600 + * #define ERANGE 34 * } */ - public static int __MAC_11_6() { - return __MAC_11_6; + public static int ERANGE() { + return ERANGE; } - private static final int __MAC_12_0 = (int)120000L; + private static final int EILSEQ = (int)42L; /** * {@snippet lang=c : - * #define __MAC_12_0 120000 + * #define EILSEQ 42 * } */ - public static int __MAC_12_0() { - return __MAC_12_0; + public static int EILSEQ() { + return EILSEQ; } - private static final int __MAC_12_1 = (int)120100L; + private static final int STRUNCATE = (int)80L; /** * {@snippet lang=c : - * #define __MAC_12_1 120100 + * #define STRUNCATE 80 * } */ - public static int __MAC_12_1() { - return __MAC_12_1; + public static int STRUNCATE() { + return STRUNCATE; } - private static final int __MAC_12_2 = (int)120200L; + private static final int EADDRINUSE = (int)100L; /** * {@snippet lang=c : - * #define __MAC_12_2 120200 + * #define EADDRINUSE 100 * } */ - public static int __MAC_12_2() { - return __MAC_12_2; + public static int EADDRINUSE() { + return EADDRINUSE; } - private static final int __MAC_12_3 = (int)120300L; + private static final int EADDRNOTAVAIL = (int)101L; /** * {@snippet lang=c : - * #define __MAC_12_3 120300 + * #define EADDRNOTAVAIL 101 * } */ - public static int __MAC_12_3() { - return __MAC_12_3; + public static int EADDRNOTAVAIL() { + return EADDRNOTAVAIL; } - private static final int __MAC_12_4 = (int)120400L; + private static final int EAFNOSUPPORT = (int)102L; /** * {@snippet lang=c : - * #define __MAC_12_4 120400 + * #define EAFNOSUPPORT 102 * } */ - public static int __MAC_12_4() { - return __MAC_12_4; + public static int EAFNOSUPPORT() { + return EAFNOSUPPORT; } - private static final int __MAC_12_5 = (int)120500L; + private static final int EALREADY = (int)103L; /** * {@snippet lang=c : - * #define __MAC_12_5 120500 + * #define EALREADY 103 * } */ - public static int __MAC_12_5() { - return __MAC_12_5; + public static int EALREADY() { + return EALREADY; } - private static final int __MAC_12_6 = (int)120600L; + private static final int EBADMSG = (int)104L; /** * {@snippet lang=c : - * #define __MAC_12_6 120600 + * #define EBADMSG 104 * } */ - public static int __MAC_12_6() { - return __MAC_12_6; + public static int EBADMSG() { + return EBADMSG; } - private static final int __MAC_12_7 = (int)120700L; + private static final int ECANCELED = (int)105L; /** * {@snippet lang=c : - * #define __MAC_12_7 120700 + * #define ECANCELED 105 * } */ - public static int __MAC_12_7() { - return __MAC_12_7; + public static int ECANCELED() { + return ECANCELED; } - private static final int __MAC_13_0 = (int)130000L; + private static final int ECONNABORTED = (int)106L; /** * {@snippet lang=c : - * #define __MAC_13_0 130000 + * #define ECONNABORTED 106 * } */ - public static int __MAC_13_0() { - return __MAC_13_0; + public static int ECONNABORTED() { + return ECONNABORTED; } - private static final int __MAC_13_1 = (int)130100L; + private static final int ECONNREFUSED = (int)107L; /** * {@snippet lang=c : - * #define __MAC_13_1 130100 + * #define ECONNREFUSED 107 * } */ - public static int __MAC_13_1() { - return __MAC_13_1; + public static int ECONNREFUSED() { + return ECONNREFUSED; } - private static final int __MAC_13_2 = (int)130200L; + private static final int ECONNRESET = (int)108L; /** * {@snippet lang=c : - * #define __MAC_13_2 130200 + * #define ECONNRESET 108 * } */ - public static int __MAC_13_2() { - return __MAC_13_2; + public static int ECONNRESET() { + return ECONNRESET; } - private static final int __MAC_13_3 = (int)130300L; + private static final int EDESTADDRREQ = (int)109L; /** * {@snippet lang=c : - * #define __MAC_13_3 130300 + * #define EDESTADDRREQ 109 * } */ - public static int __MAC_13_3() { - return __MAC_13_3; + public static int EDESTADDRREQ() { + return EDESTADDRREQ; } - private static final int __MAC_13_4 = (int)130400L; + private static final int EHOSTUNREACH = (int)110L; /** * {@snippet lang=c : - * #define __MAC_13_4 130400 + * #define EHOSTUNREACH 110 * } */ - public static int __MAC_13_4() { - return __MAC_13_4; + public static int EHOSTUNREACH() { + return EHOSTUNREACH; } - private static final int __MAC_13_5 = (int)130500L; + private static final int EIDRM = (int)111L; /** * {@snippet lang=c : - * #define __MAC_13_5 130500 + * #define EIDRM 111 * } */ - public static int __MAC_13_5() { - return __MAC_13_5; + public static int EIDRM() { + return EIDRM; } - private static final int __MAC_13_6 = (int)130600L; + private static final int EINPROGRESS = (int)112L; /** * {@snippet lang=c : - * #define __MAC_13_6 130600 + * #define EINPROGRESS 112 * } */ - public static int __MAC_13_6() { - return __MAC_13_6; + public static int EINPROGRESS() { + return EINPROGRESS; } - private static final int __MAC_14_0 = (int)140000L; + private static final int EISCONN = (int)113L; /** * {@snippet lang=c : - * #define __MAC_14_0 140000 + * #define EISCONN 113 * } */ - public static int __MAC_14_0() { - return __MAC_14_0; + public static int EISCONN() { + return EISCONN; } - private static final int __MAC_14_1 = (int)140100L; + private static final int ELOOP = (int)114L; /** * {@snippet lang=c : - * #define __MAC_14_1 140100 + * #define ELOOP 114 * } */ - public static int __MAC_14_1() { - return __MAC_14_1; + public static int ELOOP() { + return ELOOP; } - private static final int __MAC_14_2 = (int)140200L; + private static final int EMSGSIZE = (int)115L; /** * {@snippet lang=c : - * #define __MAC_14_2 140200 + * #define EMSGSIZE 115 * } */ - public static int __MAC_14_2() { - return __MAC_14_2; + public static int EMSGSIZE() { + return EMSGSIZE; } - private static final int __MAC_14_3 = (int)140300L; + private static final int ENETDOWN = (int)116L; /** * {@snippet lang=c : - * #define __MAC_14_3 140300 + * #define ENETDOWN 116 * } */ - public static int __MAC_14_3() { - return __MAC_14_3; + public static int ENETDOWN() { + return ENETDOWN; } - private static final int __MAC_14_4 = (int)140400L; + private static final int ENETRESET = (int)117L; /** * {@snippet lang=c : - * #define __MAC_14_4 140400 + * #define ENETRESET 117 * } */ - public static int __MAC_14_4() { - return __MAC_14_4; + public static int ENETRESET() { + return ENETRESET; } - private static final int __IPHONE_2_0 = (int)20000L; + private static final int ENETUNREACH = (int)118L; /** * {@snippet lang=c : - * #define __IPHONE_2_0 20000 + * #define ENETUNREACH 118 * } */ - public static int __IPHONE_2_0() { - return __IPHONE_2_0; + public static int ENETUNREACH() { + return ENETUNREACH; } - private static final int __IPHONE_2_1 = (int)20100L; + private static final int ENOBUFS = (int)119L; /** * {@snippet lang=c : - * #define __IPHONE_2_1 20100 + * #define ENOBUFS 119 * } */ - public static int __IPHONE_2_1() { - return __IPHONE_2_1; + public static int ENOBUFS() { + return ENOBUFS; } - private static final int __IPHONE_2_2 = (int)20200L; + private static final int ENODATA = (int)120L; /** * {@snippet lang=c : - * #define __IPHONE_2_2 20200 + * #define ENODATA 120 * } */ - public static int __IPHONE_2_2() { - return __IPHONE_2_2; + public static int ENODATA() { + return ENODATA; } - private static final int __IPHONE_3_0 = (int)30000L; + private static final int ENOLINK = (int)121L; /** * {@snippet lang=c : - * #define __IPHONE_3_0 30000 + * #define ENOLINK 121 * } */ - public static int __IPHONE_3_0() { - return __IPHONE_3_0; + public static int ENOLINK() { + return ENOLINK; } - private static final int __IPHONE_3_1 = (int)30100L; + private static final int ENOMSG = (int)122L; /** * {@snippet lang=c : - * #define __IPHONE_3_1 30100 + * #define ENOMSG 122 * } */ - public static int __IPHONE_3_1() { - return __IPHONE_3_1; + public static int ENOMSG() { + return ENOMSG; } - private static final int __IPHONE_3_2 = (int)30200L; + private static final int ENOPROTOOPT = (int)123L; /** * {@snippet lang=c : - * #define __IPHONE_3_2 30200 + * #define ENOPROTOOPT 123 * } */ - public static int __IPHONE_3_2() { - return __IPHONE_3_2; + public static int ENOPROTOOPT() { + return ENOPROTOOPT; } - private static final int __IPHONE_4_0 = (int)40000L; + private static final int ENOSR = (int)124L; /** * {@snippet lang=c : - * #define __IPHONE_4_0 40000 + * #define ENOSR 124 * } */ - public static int __IPHONE_4_0() { - return __IPHONE_4_0; + public static int ENOSR() { + return ENOSR; } - private static final int __IPHONE_4_1 = (int)40100L; + private static final int ENOSTR = (int)125L; /** * {@snippet lang=c : - * #define __IPHONE_4_1 40100 + * #define ENOSTR 125 * } */ - public static int __IPHONE_4_1() { - return __IPHONE_4_1; + public static int ENOSTR() { + return ENOSTR; } - private static final int __IPHONE_4_2 = (int)40200L; + private static final int ENOTCONN = (int)126L; /** * {@snippet lang=c : - * #define __IPHONE_4_2 40200 + * #define ENOTCONN 126 * } */ - public static int __IPHONE_4_2() { - return __IPHONE_4_2; + public static int ENOTCONN() { + return ENOTCONN; } - private static final int __IPHONE_4_3 = (int)40300L; + private static final int ENOTRECOVERABLE = (int)127L; /** * {@snippet lang=c : - * #define __IPHONE_4_3 40300 + * #define ENOTRECOVERABLE 127 * } */ - public static int __IPHONE_4_3() { - return __IPHONE_4_3; + public static int ENOTRECOVERABLE() { + return ENOTRECOVERABLE; } - private static final int __IPHONE_5_0 = (int)50000L; + private static final int ENOTSOCK = (int)128L; /** * {@snippet lang=c : - * #define __IPHONE_5_0 50000 + * #define ENOTSOCK 128 * } */ - public static int __IPHONE_5_0() { - return __IPHONE_5_0; + public static int ENOTSOCK() { + return ENOTSOCK; } - private static final int __IPHONE_5_1 = (int)50100L; + private static final int ENOTSUP = (int)129L; /** * {@snippet lang=c : - * #define __IPHONE_5_1 50100 + * #define ENOTSUP 129 * } */ - public static int __IPHONE_5_1() { - return __IPHONE_5_1; + public static int ENOTSUP() { + return ENOTSUP; } - private static final int __IPHONE_6_0 = (int)60000L; + private static final int EOPNOTSUPP = (int)130L; /** * {@snippet lang=c : - * #define __IPHONE_6_0 60000 + * #define EOPNOTSUPP 130 * } */ - public static int __IPHONE_6_0() { - return __IPHONE_6_0; + public static int EOPNOTSUPP() { + return EOPNOTSUPP; } - private static final int __IPHONE_6_1 = (int)60100L; + private static final int EOTHER = (int)131L; /** * {@snippet lang=c : - * #define __IPHONE_6_1 60100 + * #define EOTHER 131 * } */ - public static int __IPHONE_6_1() { - return __IPHONE_6_1; + public static int EOTHER() { + return EOTHER; } - private static final int __IPHONE_7_0 = (int)70000L; + private static final int EOVERFLOW = (int)132L; /** * {@snippet lang=c : - * #define __IPHONE_7_0 70000 + * #define EOVERFLOW 132 * } */ - public static int __IPHONE_7_0() { - return __IPHONE_7_0; + public static int EOVERFLOW() { + return EOVERFLOW; } - private static final int __IPHONE_7_1 = (int)70100L; + private static final int EOWNERDEAD = (int)133L; /** * {@snippet lang=c : - * #define __IPHONE_7_1 70100 + * #define EOWNERDEAD 133 * } */ - public static int __IPHONE_7_1() { - return __IPHONE_7_1; + public static int EOWNERDEAD() { + return EOWNERDEAD; } - private static final int __IPHONE_8_0 = (int)80000L; + private static final int EPROTO = (int)134L; /** * {@snippet lang=c : - * #define __IPHONE_8_0 80000 + * #define EPROTO 134 * } */ - public static int __IPHONE_8_0() { - return __IPHONE_8_0; + public static int EPROTO() { + return EPROTO; } - private static final int __IPHONE_8_1 = (int)80100L; + private static final int EPROTONOSUPPORT = (int)135L; /** * {@snippet lang=c : - * #define __IPHONE_8_1 80100 + * #define EPROTONOSUPPORT 135 * } */ - public static int __IPHONE_8_1() { - return __IPHONE_8_1; + public static int EPROTONOSUPPORT() { + return EPROTONOSUPPORT; } - private static final int __IPHONE_8_2 = (int)80200L; + private static final int EPROTOTYPE = (int)136L; /** * {@snippet lang=c : - * #define __IPHONE_8_2 80200 + * #define EPROTOTYPE 136 * } */ - public static int __IPHONE_8_2() { - return __IPHONE_8_2; + public static int EPROTOTYPE() { + return EPROTOTYPE; } - private static final int __IPHONE_8_3 = (int)80300L; + private static final int ETIME = (int)137L; /** * {@snippet lang=c : - * #define __IPHONE_8_3 80300 + * #define ETIME 137 * } */ - public static int __IPHONE_8_3() { - return __IPHONE_8_3; + public static int ETIME() { + return ETIME; } - private static final int __IPHONE_8_4 = (int)80400L; + private static final int ETIMEDOUT = (int)138L; /** * {@snippet lang=c : - * #define __IPHONE_8_4 80400 + * #define ETIMEDOUT 138 * } */ - public static int __IPHONE_8_4() { - return __IPHONE_8_4; + public static int ETIMEDOUT() { + return ETIMEDOUT; } - private static final int __IPHONE_9_0 = (int)90000L; + private static final int ETXTBSY = (int)139L; /** * {@snippet lang=c : - * #define __IPHONE_9_0 90000 + * #define ETXTBSY 139 * } */ - public static int __IPHONE_9_0() { - return __IPHONE_9_0; + public static int ETXTBSY() { + return ETXTBSY; } - private static final int __IPHONE_9_1 = (int)90100L; + private static final int EWOULDBLOCK = (int)140L; /** * {@snippet lang=c : - * #define __IPHONE_9_1 90100 + * #define EWOULDBLOCK 140 * } */ - public static int __IPHONE_9_1() { - return __IPHONE_9_1; + public static int EWOULDBLOCK() { + return EWOULDBLOCK; } - private static final int __IPHONE_9_2 = (int)90200L; + private static final int WEBP_DEMUX_ABI_VERSION = (int)263L; /** * {@snippet lang=c : - * #define __IPHONE_9_2 90200 + * #define WEBP_DEMUX_ABI_VERSION 263 * } */ - public static int __IPHONE_9_2() { - return __IPHONE_9_2; + public static int WEBP_DEMUX_ABI_VERSION() { + return WEBP_DEMUX_ABI_VERSION; } - private static final int __IPHONE_9_3 = (int)90300L; /** * {@snippet lang=c : - * #define __IPHONE_9_3 90300 + * typedef long long ptrdiff_t * } */ - public static int __IPHONE_9_3() { - return __IPHONE_9_3; - } - private static final int __IPHONE_10_0 = (int)100000L; + public static final OfLong ptrdiff_t = demux_h.C_LONG_LONG; /** * {@snippet lang=c : - * #define __IPHONE_10_0 100000 + * typedef unsigned long long size_t * } */ - public static int __IPHONE_10_0() { - return __IPHONE_10_0; - } - private static final int __IPHONE_10_1 = (int)100100L; + public static final OfLong size_t = demux_h.C_LONG_LONG; /** * {@snippet lang=c : - * #define __IPHONE_10_1 100100 + * typedef unsigned short wchar_t * } */ - public static int __IPHONE_10_1() { - return __IPHONE_10_1; - } - private static final int __IPHONE_10_2 = (int)100200L; + public static final OfShort wchar_t = demux_h.C_SHORT; /** * {@snippet lang=c : - * #define __IPHONE_10_2 100200 + * typedef double max_align_t * } */ - public static int __IPHONE_10_2() { - return __IPHONE_10_2; - } - private static final int __IPHONE_10_3 = (int)100300L; + public static final OfDouble max_align_t = demux_h.C_DOUBLE; /** * {@snippet lang=c : - * #define __IPHONE_10_3 100300 + * typedef signed char int8_t * } */ - public static int __IPHONE_10_3() { - return __IPHONE_10_3; - } - private static final int __IPHONE_11_0 = (int)110000L; + public static final OfByte int8_t = demux_h.C_CHAR; /** * {@snippet lang=c : - * #define __IPHONE_11_0 110000 + * typedef unsigned char uint8_t * } */ - public static int __IPHONE_11_0() { - return __IPHONE_11_0; - } - private static final int __IPHONE_11_1 = (int)110100L; + public static final OfByte uint8_t = demux_h.C_CHAR; /** * {@snippet lang=c : - * #define __IPHONE_11_1 110100 + * typedef short int16_t * } */ - public static int __IPHONE_11_1() { - return __IPHONE_11_1; - } - private static final int __IPHONE_11_2 = (int)110200L; + public static final OfShort int16_t = demux_h.C_SHORT; /** * {@snippet lang=c : - * #define __IPHONE_11_2 110200 + * typedef unsigned short uint16_t * } */ - public static int __IPHONE_11_2() { - return __IPHONE_11_2; - } - private static final int __IPHONE_11_3 = (int)110300L; + public static final OfShort uint16_t = demux_h.C_SHORT; /** * {@snippet lang=c : - * #define __IPHONE_11_3 110300 + * typedef int int32_t * } */ - public static int __IPHONE_11_3() { - return __IPHONE_11_3; - } - private static final int __IPHONE_11_4 = (int)110400L; + public static final OfInt int32_t = demux_h.C_INT; /** * {@snippet lang=c : - * #define __IPHONE_11_4 110400 + * typedef unsigned int uint32_t * } */ - public static int __IPHONE_11_4() { - return __IPHONE_11_4; - } - private static final int __IPHONE_12_0 = (int)120000L; + public static final OfInt uint32_t = demux_h.C_INT; /** * {@snippet lang=c : - * #define __IPHONE_12_0 120000 + * typedef unsigned long long uint64_t * } */ - public static int __IPHONE_12_0() { - return __IPHONE_12_0; - } - private static final int __IPHONE_12_1 = (int)120100L; + public static final OfLong uint64_t = demux_h.C_LONG_LONG; /** * {@snippet lang=c : - * #define __IPHONE_12_1 120100 + * typedef long long int64_t * } */ - public static int __IPHONE_12_1() { - return __IPHONE_12_1; + public static final OfLong int64_t = demux_h.C_LONG_LONG; + + private static class WebPMalloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPMalloc"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_12_2 = (int)120200L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_12_2 120200 + * extern void *WebPMalloc(size_t size) * } */ - public static int __IPHONE_12_2() { - return __IPHONE_12_2; + public static FunctionDescriptor WebPMalloc$descriptor() { + return WebPMalloc.DESC; } - private static final int __IPHONE_12_3 = (int)120300L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_12_3 120300 + * extern void *WebPMalloc(size_t size) * } */ - public static int __IPHONE_12_3() { - return __IPHONE_12_3; + public static MethodHandle WebPMalloc$handle() { + return WebPMalloc.HANDLE; } - private static final int __IPHONE_12_4 = (int)120400L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_12_4 120400 + * extern void *WebPMalloc(size_t size) * } */ - public static int __IPHONE_12_4() { - return __IPHONE_12_4; + public static MemorySegment WebPMalloc$address() { + return WebPMalloc.ADDR; } - private static final int __IPHONE_13_0 = (int)130000L; + /** * {@snippet lang=c : - * #define __IPHONE_13_0 130000 + * extern void *WebPMalloc(size_t size) * } */ - public static int __IPHONE_13_0() { - return __IPHONE_13_0; + public static MemorySegment WebPMalloc(long size) { + var mh$ = WebPMalloc.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMalloc", size); + } + return (MemorySegment)mh$.invokeExact(size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFree { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPFree"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_13_1 = (int)130100L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_13_1 130100 + * extern void WebPFree(void *ptr) * } */ - public static int __IPHONE_13_1() { - return __IPHONE_13_1; + public static FunctionDescriptor WebPFree$descriptor() { + return WebPFree.DESC; } - private static final int __IPHONE_13_2 = (int)130200L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_13_2 130200 + * extern void WebPFree(void *ptr) * } */ - public static int __IPHONE_13_2() { - return __IPHONE_13_2; + public static MethodHandle WebPFree$handle() { + return WebPFree.HANDLE; } - private static final int __IPHONE_13_3 = (int)130300L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_13_3 130300 + * extern void WebPFree(void *ptr) * } */ - public static int __IPHONE_13_3() { - return __IPHONE_13_3; + public static MemorySegment WebPFree$address() { + return WebPFree.ADDR; } - private static final int __IPHONE_13_4 = (int)130400L; + /** * {@snippet lang=c : - * #define __IPHONE_13_4 130400 + * extern void WebPFree(void *ptr) * } */ - public static int __IPHONE_13_4() { - return __IPHONE_13_4; + public static void WebPFree(MemorySegment ptr) { + var mh$ = WebPFree.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFree", ptr); + } + mh$.invokeExact(ptr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __IPHONE_13_5 = (int)130500L; + + private static class WebPGetDecoderVersion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetDecoderVersion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_13_5 130500 + * extern int WebPGetDecoderVersion() * } */ - public static int __IPHONE_13_5() { - return __IPHONE_13_5; + public static FunctionDescriptor WebPGetDecoderVersion$descriptor() { + return WebPGetDecoderVersion.DESC; } - private static final int __IPHONE_13_6 = (int)130600L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_13_6 130600 + * extern int WebPGetDecoderVersion() * } */ - public static int __IPHONE_13_6() { - return __IPHONE_13_6; + public static MethodHandle WebPGetDecoderVersion$handle() { + return WebPGetDecoderVersion.HANDLE; } - private static final int __IPHONE_13_7 = (int)130700L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_13_7 130700 + * extern int WebPGetDecoderVersion() * } */ - public static int __IPHONE_13_7() { - return __IPHONE_13_7; + public static MemorySegment WebPGetDecoderVersion$address() { + return WebPGetDecoderVersion.ADDR; } - private static final int __IPHONE_14_0 = (int)140000L; + /** * {@snippet lang=c : - * #define __IPHONE_14_0 140000 + * extern int WebPGetDecoderVersion() * } */ - public static int __IPHONE_14_0() { - return __IPHONE_14_0; + public static int WebPGetDecoderVersion() { + var mh$ = WebPGetDecoderVersion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetDecoderVersion"); + } + return (int)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPGetInfo { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetInfo"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_14_1 = (int)140100L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_14_1 140100 + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_1() { - return __IPHONE_14_1; + public static FunctionDescriptor WebPGetInfo$descriptor() { + return WebPGetInfo.DESC; } - private static final int __IPHONE_14_2 = (int)140200L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_14_2 140200 + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_2() { - return __IPHONE_14_2; + public static MethodHandle WebPGetInfo$handle() { + return WebPGetInfo.HANDLE; } - private static final int __IPHONE_14_3 = (int)140300L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_14_3 140300 + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_3() { - return __IPHONE_14_3; + public static MemorySegment WebPGetInfo$address() { + return WebPGetInfo.ADDR; } - private static final int __IPHONE_14_5 = (int)140500L; + /** * {@snippet lang=c : - * #define __IPHONE_14_5 140500 + * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_5() { - return __IPHONE_14_5; + public static int WebPGetInfo(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPGetInfo.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetInfo", data, data_size, width, height); + } + return (int)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGBA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_14_4 = (int)140400L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_14_4 140400 + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_4() { - return __IPHONE_14_4; + public static FunctionDescriptor WebPDecodeRGBA$descriptor() { + return WebPDecodeRGBA.DESC; } - private static final int __IPHONE_14_6 = (int)140600L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_14_6 140600 + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_6() { - return __IPHONE_14_6; + public static MethodHandle WebPDecodeRGBA$handle() { + return WebPDecodeRGBA.HANDLE; } - private static final int __IPHONE_14_7 = (int)140700L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_14_7 140700 + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_7() { - return __IPHONE_14_7; + public static MemorySegment WebPDecodeRGBA$address() { + return WebPDecodeRGBA.ADDR; } - private static final int __IPHONE_14_8 = (int)140800L; + /** * {@snippet lang=c : - * #define __IPHONE_14_8 140800 + * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_14_8() { - return __IPHONE_14_8; + public static MemorySegment WebPDecodeRGBA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeRGBA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBA", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeARGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeARGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_15_0 = (int)150000L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_15_0 150000 + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_0() { - return __IPHONE_15_0; + public static FunctionDescriptor WebPDecodeARGB$descriptor() { + return WebPDecodeARGB.DESC; } - private static final int __IPHONE_15_1 = (int)150100L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_15_1 150100 + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_1() { - return __IPHONE_15_1; + public static MethodHandle WebPDecodeARGB$handle() { + return WebPDecodeARGB.HANDLE; } - private static final int __IPHONE_15_2 = (int)150200L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_15_2 150200 + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_2() { - return __IPHONE_15_2; + public static MemorySegment WebPDecodeARGB$address() { + return WebPDecodeARGB.ADDR; } - private static final int __IPHONE_15_3 = (int)150300L; + /** * {@snippet lang=c : - * #define __IPHONE_15_3 150300 + * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_3() { - return __IPHONE_15_3; + public static MemorySegment WebPDecodeARGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeARGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeARGB", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __IPHONE_15_4 = (int)150400L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_4 150400 - * } - */ - public static int __IPHONE_15_4() { - return __IPHONE_15_4; + + private static class WebPDecodeBGRA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_15_5 = (int)150500L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_15_5 150500 + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_5() { - return __IPHONE_15_5; + public static FunctionDescriptor WebPDecodeBGRA$descriptor() { + return WebPDecodeBGRA.DESC; } - private static final int __IPHONE_15_6 = (int)150600L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_15_6 150600 + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_6() { - return __IPHONE_15_6; + public static MethodHandle WebPDecodeBGRA$handle() { + return WebPDecodeBGRA.HANDLE; } - private static final int __IPHONE_15_7 = (int)150700L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_15_7 150700 + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_7() { - return __IPHONE_15_7; + public static MemorySegment WebPDecodeBGRA$address() { + return WebPDecodeBGRA.ADDR; } - private static final int __IPHONE_15_8 = (int)150800L; + /** * {@snippet lang=c : - * #define __IPHONE_15_8 150800 + * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_15_8() { - return __IPHONE_15_8; + public static MemorySegment WebPDecodeBGRA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeBGRA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRA", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __IPHONE_16_0 = (int)160000L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_0 160000 - * } - */ - public static int __IPHONE_16_0() { - return __IPHONE_16_0; + + private static class WebPDecodeRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_16_1 = (int)160100L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_16_1 160100 + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_1() { - return __IPHONE_16_1; + public static FunctionDescriptor WebPDecodeRGB$descriptor() { + return WebPDecodeRGB.DESC; } - private static final int __IPHONE_16_2 = (int)160200L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_16_2 160200 + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_2() { - return __IPHONE_16_2; + public static MethodHandle WebPDecodeRGB$handle() { + return WebPDecodeRGB.HANDLE; } - private static final int __IPHONE_16_3 = (int)160300L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_16_3 160300 + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_3() { - return __IPHONE_16_3; + public static MemorySegment WebPDecodeRGB$address() { + return WebPDecodeRGB.ADDR; } - private static final int __IPHONE_16_4 = (int)160400L; + /** * {@snippet lang=c : - * #define __IPHONE_16_4 160400 + * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_4() { - return __IPHONE_16_4; + public static MemorySegment WebPDecodeRGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGB", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __IPHONE_16_5 = (int)160500L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_5 160500 - * } - */ - public static int __IPHONE_16_5() { - return __IPHONE_16_5; + + private static class WebPDecodeBGR { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGR"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_16_6 = (int)160600L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_16_6 160600 + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_6() { - return __IPHONE_16_6; + public static FunctionDescriptor WebPDecodeBGR$descriptor() { + return WebPDecodeBGR.DESC; } - private static final int __IPHONE_16_7 = (int)160700L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_16_7 160700 + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_16_7() { - return __IPHONE_16_7; + public static MethodHandle WebPDecodeBGR$handle() { + return WebPDecodeBGR.HANDLE; } - private static final int __IPHONE_17_0 = (int)170000L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_17_0 170000 + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_17_0() { - return __IPHONE_17_0; + public static MemorySegment WebPDecodeBGR$address() { + return WebPDecodeBGR.ADDR; } - private static final int __IPHONE_17_1 = (int)170100L; + /** * {@snippet lang=c : - * #define __IPHONE_17_1 170100 + * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) * } */ - public static int __IPHONE_17_1() { - return __IPHONE_17_1; + public static MemorySegment WebPDecodeBGR(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { + var mh$ = WebPDecodeBGR.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGR", data, data_size, width, height); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeYUV { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeYUV"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __IPHONE_17_2 = (int)170200L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __IPHONE_17_2 170200 + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) * } */ - public static int __IPHONE_17_2() { - return __IPHONE_17_2; + public static FunctionDescriptor WebPDecodeYUV$descriptor() { + return WebPDecodeYUV.DESC; } - private static final int __IPHONE_17_3 = (int)170300L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __IPHONE_17_3 170300 + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) * } */ - public static int __IPHONE_17_3() { - return __IPHONE_17_3; + public static MethodHandle WebPDecodeYUV$handle() { + return WebPDecodeYUV.HANDLE; } - private static final int __IPHONE_17_4 = (int)170400L; + /** + * Address for: * {@snippet lang=c : - * #define __IPHONE_17_4 170400 + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) * } */ - public static int __IPHONE_17_4() { - return __IPHONE_17_4; + public static MemorySegment WebPDecodeYUV$address() { + return WebPDecodeYUV.ADDR; } - private static final int __WATCHOS_1_0 = (int)10000L; + /** * {@snippet lang=c : - * #define __WATCHOS_1_0 10000 + * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) * } */ - public static int __WATCHOS_1_0() { - return __WATCHOS_1_0; + public static MemorySegment WebPDecodeYUV(MemorySegment data, long data_size, MemorySegment width, MemorySegment height, MemorySegment u, MemorySegment v, MemorySegment stride, MemorySegment uv_stride) { + var mh$ = WebPDecodeYUV.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeYUV", data, data_size, width, height, u, v, stride, uv_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, width, height, u, v, stride, uv_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeRGBAInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBAInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_2_0 = (int)20000L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_2_0 20000 + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_2_0() { - return __WATCHOS_2_0; + public static FunctionDescriptor WebPDecodeRGBAInto$descriptor() { + return WebPDecodeRGBAInto.DESC; } - private static final int __WATCHOS_2_1 = (int)20100L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_2_1 20100 + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_2_1() { - return __WATCHOS_2_1; + public static MethodHandle WebPDecodeRGBAInto$handle() { + return WebPDecodeRGBAInto.HANDLE; } - private static final int __WATCHOS_2_2 = (int)20200L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_2_2 20200 + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_2_2() { - return __WATCHOS_2_2; + public static MemorySegment WebPDecodeRGBAInto$address() { + return WebPDecodeRGBAInto.ADDR; } - private static final int __WATCHOS_3_0 = (int)30000L; + /** * {@snippet lang=c : - * #define __WATCHOS_3_0 30000 + * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_3_0() { - return __WATCHOS_3_0; + public static MemorySegment WebPDecodeRGBAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeRGBAInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBAInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDecodeARGBInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeARGBInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_3_1 = (int)30100L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_3_1 30100 + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_3_1() { - return __WATCHOS_3_1; + public static FunctionDescriptor WebPDecodeARGBInto$descriptor() { + return WebPDecodeARGBInto.DESC; } - private static final int __WATCHOS_3_1_1 = (int)30101L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_3_1_1 30101 + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_3_1_1() { - return __WATCHOS_3_1_1; + public static MethodHandle WebPDecodeARGBInto$handle() { + return WebPDecodeARGBInto.HANDLE; } - private static final int __WATCHOS_3_2 = (int)30200L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_3_2 30200 + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_3_2() { - return __WATCHOS_3_2; + public static MemorySegment WebPDecodeARGBInto$address() { + return WebPDecodeARGBInto.ADDR; } - private static final int __WATCHOS_4_0 = (int)40000L; + /** * {@snippet lang=c : - * #define __WATCHOS_4_0 40000 + * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_4_0() { - return __WATCHOS_4_0; - } - private static final int __WATCHOS_4_1 = (int)40100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_1 40100 - * } - */ - public static int __WATCHOS_4_1() { - return __WATCHOS_4_1; - } - private static final int __WATCHOS_4_2 = (int)40200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_2 40200 - * } - */ - public static int __WATCHOS_4_2() { - return __WATCHOS_4_2; - } - private static final int __WATCHOS_4_3 = (int)40300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_3 40300 - * } - */ - public static int __WATCHOS_4_3() { - return __WATCHOS_4_3; - } - private static final int __WATCHOS_5_0 = (int)50000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_0 50000 - * } - */ - public static int __WATCHOS_5_0() { - return __WATCHOS_5_0; - } - private static final int __WATCHOS_5_1 = (int)50100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_1 50100 - * } - */ - public static int __WATCHOS_5_1() { - return __WATCHOS_5_1; - } - private static final int __WATCHOS_5_2 = (int)50200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_2 50200 - * } - */ - public static int __WATCHOS_5_2() { - return __WATCHOS_5_2; - } - private static final int __WATCHOS_5_3 = (int)50300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_3 50300 - * } - */ - public static int __WATCHOS_5_3() { - return __WATCHOS_5_3; - } - private static final int __WATCHOS_6_0 = (int)60000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_0 60000 - * } - */ - public static int __WATCHOS_6_0() { - return __WATCHOS_6_0; - } - private static final int __WATCHOS_6_1 = (int)60100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_1 60100 - * } - */ - public static int __WATCHOS_6_1() { - return __WATCHOS_6_1; + public static MemorySegment WebPDecodeARGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeARGBInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeARGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __WATCHOS_6_2 = (int)60200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_2 60200 - * } - */ - public static int __WATCHOS_6_2() { - return __WATCHOS_6_2; + + private static class WebPDecodeBGRAInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRAInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_7_0 = (int)70000L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_7_0 70000 + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_0() { - return __WATCHOS_7_0; + public static FunctionDescriptor WebPDecodeBGRAInto$descriptor() { + return WebPDecodeBGRAInto.DESC; } - private static final int __WATCHOS_7_1 = (int)70100L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_7_1 70100 + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_1() { - return __WATCHOS_7_1; + public static MethodHandle WebPDecodeBGRAInto$handle() { + return WebPDecodeBGRAInto.HANDLE; } - private static final int __WATCHOS_7_2 = (int)70200L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_7_2 70200 + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_2() { - return __WATCHOS_7_2; + public static MemorySegment WebPDecodeBGRAInto$address() { + return WebPDecodeBGRAInto.ADDR; } - private static final int __WATCHOS_7_3 = (int)70300L; + /** * {@snippet lang=c : - * #define __WATCHOS_7_3 70300 + * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_3() { - return __WATCHOS_7_3; + public static MemorySegment WebPDecodeBGRAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeBGRAInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRAInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __WATCHOS_7_4 = (int)70400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_4 70400 - * } - */ - public static int __WATCHOS_7_4() { - return __WATCHOS_7_4; + + private static class WebPDecodeRGBInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_7_5 = (int)70500L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_7_5 70500 + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_5() { - return __WATCHOS_7_5; + public static FunctionDescriptor WebPDecodeRGBInto$descriptor() { + return WebPDecodeRGBInto.DESC; } - private static final int __WATCHOS_7_6 = (int)70600L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_7_6 70600 + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_7_6() { - return __WATCHOS_7_6; + public static MethodHandle WebPDecodeRGBInto$handle() { + return WebPDecodeRGBInto.HANDLE; } - private static final int __WATCHOS_8_0 = (int)80000L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_8_0 80000 + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_0() { - return __WATCHOS_8_0; + public static MemorySegment WebPDecodeRGBInto$address() { + return WebPDecodeRGBInto.ADDR; } - private static final int __WATCHOS_8_1 = (int)80100L; + /** * {@snippet lang=c : - * #define __WATCHOS_8_1 80100 + * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_1() { - return __WATCHOS_8_1; + public static MemorySegment WebPDecodeRGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeRGBInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeRGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __WATCHOS_8_3 = (int)80300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_3 80300 - * } - */ - public static int __WATCHOS_8_3() { - return __WATCHOS_8_3; + + private static class WebPDecodeBGRInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_8_4 = (int)80400L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_8_4 80400 + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_4() { - return __WATCHOS_8_4; + public static FunctionDescriptor WebPDecodeBGRInto$descriptor() { + return WebPDecodeBGRInto.DESC; } - private static final int __WATCHOS_8_5 = (int)80500L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_8_5 80500 + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_5() { - return __WATCHOS_8_5; + public static MethodHandle WebPDecodeBGRInto$handle() { + return WebPDecodeBGRInto.HANDLE; } - private static final int __WATCHOS_8_6 = (int)80600L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_8_6 80600 + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_6() { - return __WATCHOS_8_6; + public static MemorySegment WebPDecodeBGRInto$address() { + return WebPDecodeBGRInto.ADDR; } - private static final int __WATCHOS_8_7 = (int)80700L; + /** * {@snippet lang=c : - * #define __WATCHOS_8_7 80700 + * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static int __WATCHOS_8_7() { - return __WATCHOS_8_7; + public static MemorySegment WebPDecodeBGRInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPDecodeBGRInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeBGRInto", data, data_size, output_buffer, output_buffer_size, output_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __WATCHOS_8_8 = (int)80800L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_8 80800 - * } - */ - public static int __WATCHOS_8_8() { - return __WATCHOS_8_8; + + private static class WebPDecodeYUVInto { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeYUVInto"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int __WATCHOS_9_0 = (int)90000L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define __WATCHOS_9_0 90000 + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static int __WATCHOS_9_0() { - return __WATCHOS_9_0; + public static FunctionDescriptor WebPDecodeYUVInto$descriptor() { + return WebPDecodeYUVInto.DESC; } - private static final int __WATCHOS_9_1 = (int)90100L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __WATCHOS_9_1 90100 + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static int __WATCHOS_9_1() { - return __WATCHOS_9_1; + public static MethodHandle WebPDecodeYUVInto$handle() { + return WebPDecodeYUVInto.HANDLE; } - private static final int __WATCHOS_9_2 = (int)90200L; + /** + * Address for: * {@snippet lang=c : - * #define __WATCHOS_9_2 90200 + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static int __WATCHOS_9_2() { - return __WATCHOS_9_2; + public static MemorySegment WebPDecodeYUVInto$address() { + return WebPDecodeYUVInto.ADDR; } - private static final int __WATCHOS_9_3 = (int)90300L; + /** * {@snippet lang=c : - * #define __WATCHOS_9_3 90300 + * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static int __WATCHOS_9_3() { - return __WATCHOS_9_3; + public static MemorySegment WebPDecodeYUVInto(MemorySegment data, long data_size, MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { + var mh$ = WebPDecodeYUVInto.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDecodeYUVInto", data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } + return (MemorySegment)mh$.invokeExact(data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __WATCHOS_9_4 = (int)90400L; + private static final int MODE_RGB = (int)0L; /** * {@snippet lang=c : - * #define __WATCHOS_9_4 90400 + * enum WEBP_CSP_MODE.MODE_RGB = 0 * } */ - public static int __WATCHOS_9_4() { - return __WATCHOS_9_4; + public static int MODE_RGB() { + return MODE_RGB; } - private static final int __WATCHOS_9_5 = (int)90500L; + private static final int MODE_RGBA = (int)1L; /** * {@snippet lang=c : - * #define __WATCHOS_9_5 90500 + * enum WEBP_CSP_MODE.MODE_RGBA = 1 * } */ - public static int __WATCHOS_9_5() { - return __WATCHOS_9_5; + public static int MODE_RGBA() { + return MODE_RGBA; } - private static final int __WATCHOS_9_6 = (int)90600L; + private static final int MODE_BGR = (int)2L; /** * {@snippet lang=c : - * #define __WATCHOS_9_6 90600 + * enum WEBP_CSP_MODE.MODE_BGR = 2 * } */ - public static int __WATCHOS_9_6() { - return __WATCHOS_9_6; + public static int MODE_BGR() { + return MODE_BGR; } - private static final int __WATCHOS_10_0 = (int)100000L; + private static final int MODE_BGRA = (int)3L; /** * {@snippet lang=c : - * #define __WATCHOS_10_0 100000 + * enum WEBP_CSP_MODE.MODE_BGRA = 3 * } */ - public static int __WATCHOS_10_0() { - return __WATCHOS_10_0; + public static int MODE_BGRA() { + return MODE_BGRA; } - private static final int __WATCHOS_10_1 = (int)100100L; + private static final int MODE_ARGB = (int)4L; /** * {@snippet lang=c : - * #define __WATCHOS_10_1 100100 + * enum WEBP_CSP_MODE.MODE_ARGB = 4 * } */ - public static int __WATCHOS_10_1() { - return __WATCHOS_10_1; + public static int MODE_ARGB() { + return MODE_ARGB; } - private static final int __WATCHOS_10_2 = (int)100200L; + private static final int MODE_RGBA_4444 = (int)5L; /** * {@snippet lang=c : - * #define __WATCHOS_10_2 100200 + * enum WEBP_CSP_MODE.MODE_RGBA_4444 = 5 * } */ - public static int __WATCHOS_10_2() { - return __WATCHOS_10_2; + public static int MODE_RGBA_4444() { + return MODE_RGBA_4444; } - private static final int __WATCHOS_10_3 = (int)100300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_3 100300 - * } - */ - public static int __WATCHOS_10_3() { - return __WATCHOS_10_3; - } - private static final int __WATCHOS_10_4 = (int)100400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_4 100400 - * } - */ - public static int __WATCHOS_10_4() { - return __WATCHOS_10_4; - } - private static final int __TVOS_9_0 = (int)90000L; - /** - * {@snippet lang=c : - * #define __TVOS_9_0 90000 - * } - */ - public static int __TVOS_9_0() { - return __TVOS_9_0; - } - private static final int __TVOS_9_1 = (int)90100L; - /** - * {@snippet lang=c : - * #define __TVOS_9_1 90100 - * } - */ - public static int __TVOS_9_1() { - return __TVOS_9_1; - } - private static final int __TVOS_9_2 = (int)90200L; - /** - * {@snippet lang=c : - * #define __TVOS_9_2 90200 - * } - */ - public static int __TVOS_9_2() { - return __TVOS_9_2; - } - private static final int __TVOS_10_0 = (int)100000L; - /** - * {@snippet lang=c : - * #define __TVOS_10_0 100000 - * } - */ - public static int __TVOS_10_0() { - return __TVOS_10_0; - } - private static final int __TVOS_10_0_1 = (int)100001L; - /** - * {@snippet lang=c : - * #define __TVOS_10_0_1 100001 - * } - */ - public static int __TVOS_10_0_1() { - return __TVOS_10_0_1; - } - private static final int __TVOS_10_1 = (int)100100L; - /** - * {@snippet lang=c : - * #define __TVOS_10_1 100100 - * } - */ - public static int __TVOS_10_1() { - return __TVOS_10_1; - } - private static final int __TVOS_10_2 = (int)100200L; - /** - * {@snippet lang=c : - * #define __TVOS_10_2 100200 - * } - */ - public static int __TVOS_10_2() { - return __TVOS_10_2; - } - private static final int __TVOS_11_0 = (int)110000L; - /** - * {@snippet lang=c : - * #define __TVOS_11_0 110000 - * } - */ - public static int __TVOS_11_0() { - return __TVOS_11_0; - } - private static final int __TVOS_11_1 = (int)110100L; - /** - * {@snippet lang=c : - * #define __TVOS_11_1 110100 - * } - */ - public static int __TVOS_11_1() { - return __TVOS_11_1; - } - private static final int __TVOS_11_2 = (int)110200L; - /** - * {@snippet lang=c : - * #define __TVOS_11_2 110200 - * } - */ - public static int __TVOS_11_2() { - return __TVOS_11_2; - } - private static final int __TVOS_11_3 = (int)110300L; - /** - * {@snippet lang=c : - * #define __TVOS_11_3 110300 - * } - */ - public static int __TVOS_11_3() { - return __TVOS_11_3; - } - private static final int __TVOS_11_4 = (int)110400L; - /** - * {@snippet lang=c : - * #define __TVOS_11_4 110400 - * } - */ - public static int __TVOS_11_4() { - return __TVOS_11_4; - } - private static final int __TVOS_12_0 = (int)120000L; - /** - * {@snippet lang=c : - * #define __TVOS_12_0 120000 - * } - */ - public static int __TVOS_12_0() { - return __TVOS_12_0; - } - private static final int __TVOS_12_1 = (int)120100L; - /** - * {@snippet lang=c : - * #define __TVOS_12_1 120100 - * } - */ - public static int __TVOS_12_1() { - return __TVOS_12_1; - } - private static final int __TVOS_12_2 = (int)120200L; - /** - * {@snippet lang=c : - * #define __TVOS_12_2 120200 - * } - */ - public static int __TVOS_12_2() { - return __TVOS_12_2; - } - private static final int __TVOS_12_3 = (int)120300L; - /** - * {@snippet lang=c : - * #define __TVOS_12_3 120300 - * } - */ - public static int __TVOS_12_3() { - return __TVOS_12_3; - } - private static final int __TVOS_12_4 = (int)120400L; - /** - * {@snippet lang=c : - * #define __TVOS_12_4 120400 - * } - */ - public static int __TVOS_12_4() { - return __TVOS_12_4; - } - private static final int __TVOS_13_0 = (int)130000L; - /** - * {@snippet lang=c : - * #define __TVOS_13_0 130000 - * } - */ - public static int __TVOS_13_0() { - return __TVOS_13_0; - } - private static final int __TVOS_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define __TVOS_13_2 130200 - * } - */ - public static int __TVOS_13_2() { - return __TVOS_13_2; - } - private static final int __TVOS_13_3 = (int)130300L; - /** - * {@snippet lang=c : - * #define __TVOS_13_3 130300 - * } - */ - public static int __TVOS_13_3() { - return __TVOS_13_3; - } - private static final int __TVOS_13_4 = (int)130400L; - /** - * {@snippet lang=c : - * #define __TVOS_13_4 130400 - * } - */ - public static int __TVOS_13_4() { - return __TVOS_13_4; - } - private static final int __TVOS_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define __TVOS_14_0 140000 - * } - */ - public static int __TVOS_14_0() { - return __TVOS_14_0; - } - private static final int __TVOS_14_1 = (int)140100L; - /** - * {@snippet lang=c : - * #define __TVOS_14_1 140100 - * } - */ - public static int __TVOS_14_1() { - return __TVOS_14_1; - } - private static final int __TVOS_14_2 = (int)140200L; - /** - * {@snippet lang=c : - * #define __TVOS_14_2 140200 - * } - */ - public static int __TVOS_14_2() { - return __TVOS_14_2; - } - private static final int __TVOS_14_3 = (int)140300L; - /** - * {@snippet lang=c : - * #define __TVOS_14_3 140300 - * } - */ - public static int __TVOS_14_3() { - return __TVOS_14_3; - } - private static final int __TVOS_14_5 = (int)140500L; - /** - * {@snippet lang=c : - * #define __TVOS_14_5 140500 - * } - */ - public static int __TVOS_14_5() { - return __TVOS_14_5; - } - private static final int __TVOS_14_6 = (int)140600L; - /** - * {@snippet lang=c : - * #define __TVOS_14_6 140600 - * } - */ - public static int __TVOS_14_6() { - return __TVOS_14_6; - } - private static final int __TVOS_14_7 = (int)140700L; - /** - * {@snippet lang=c : - * #define __TVOS_14_7 140700 - * } - */ - public static int __TVOS_14_7() { - return __TVOS_14_7; - } - private static final int __TVOS_15_0 = (int)150000L; - /** - * {@snippet lang=c : - * #define __TVOS_15_0 150000 - * } - */ - public static int __TVOS_15_0() { - return __TVOS_15_0; - } - private static final int __TVOS_15_1 = (int)150100L; - /** - * {@snippet lang=c : - * #define __TVOS_15_1 150100 - * } - */ - public static int __TVOS_15_1() { - return __TVOS_15_1; - } - private static final int __TVOS_15_2 = (int)150200L; - /** - * {@snippet lang=c : - * #define __TVOS_15_2 150200 - * } - */ - public static int __TVOS_15_2() { - return __TVOS_15_2; - } - private static final int __TVOS_15_3 = (int)150300L; - /** - * {@snippet lang=c : - * #define __TVOS_15_3 150300 - * } - */ - public static int __TVOS_15_3() { - return __TVOS_15_3; - } - private static final int __TVOS_15_4 = (int)150400L; - /** - * {@snippet lang=c : - * #define __TVOS_15_4 150400 - * } - */ - public static int __TVOS_15_4() { - return __TVOS_15_4; - } - private static final int __TVOS_15_5 = (int)150500L; - /** - * {@snippet lang=c : - * #define __TVOS_15_5 150500 - * } - */ - public static int __TVOS_15_5() { - return __TVOS_15_5; - } - private static final int __TVOS_15_6 = (int)150600L; - /** - * {@snippet lang=c : - * #define __TVOS_15_6 150600 - * } - */ - public static int __TVOS_15_6() { - return __TVOS_15_6; - } - private static final int __TVOS_16_0 = (int)160000L; - /** - * {@snippet lang=c : - * #define __TVOS_16_0 160000 - * } - */ - public static int __TVOS_16_0() { - return __TVOS_16_0; - } - private static final int __TVOS_16_1 = (int)160100L; - /** - * {@snippet lang=c : - * #define __TVOS_16_1 160100 - * } - */ - public static int __TVOS_16_1() { - return __TVOS_16_1; - } - private static final int __TVOS_16_2 = (int)160200L; - /** - * {@snippet lang=c : - * #define __TVOS_16_2 160200 - * } - */ - public static int __TVOS_16_2() { - return __TVOS_16_2; - } - private static final int __TVOS_16_3 = (int)160300L; - /** - * {@snippet lang=c : - * #define __TVOS_16_3 160300 - * } - */ - public static int __TVOS_16_3() { - return __TVOS_16_3; - } - private static final int __TVOS_16_4 = (int)160400L; - /** - * {@snippet lang=c : - * #define __TVOS_16_4 160400 - * } - */ - public static int __TVOS_16_4() { - return __TVOS_16_4; - } - private static final int __TVOS_16_5 = (int)160500L; - /** - * {@snippet lang=c : - * #define __TVOS_16_5 160500 - * } - */ - public static int __TVOS_16_5() { - return __TVOS_16_5; - } - private static final int __TVOS_16_6 = (int)160600L; - /** - * {@snippet lang=c : - * #define __TVOS_16_6 160600 - * } - */ - public static int __TVOS_16_6() { - return __TVOS_16_6; - } - private static final int __TVOS_17_0 = (int)170000L; - /** - * {@snippet lang=c : - * #define __TVOS_17_0 170000 - * } - */ - public static int __TVOS_17_0() { - return __TVOS_17_0; - } - private static final int __TVOS_17_1 = (int)170100L; - /** - * {@snippet lang=c : - * #define __TVOS_17_1 170100 - * } - */ - public static int __TVOS_17_1() { - return __TVOS_17_1; - } - private static final int __TVOS_17_2 = (int)170200L; - /** - * {@snippet lang=c : - * #define __TVOS_17_2 170200 - * } - */ - public static int __TVOS_17_2() { - return __TVOS_17_2; - } - private static final int __TVOS_17_3 = (int)170300L; - /** - * {@snippet lang=c : - * #define __TVOS_17_3 170300 - * } - */ - public static int __TVOS_17_3() { - return __TVOS_17_3; - } - private static final int __TVOS_17_4 = (int)170400L; - /** - * {@snippet lang=c : - * #define __TVOS_17_4 170400 - * } - */ - public static int __TVOS_17_4() { - return __TVOS_17_4; - } - private static final int __BRIDGEOS_2_0 = (int)20000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_2_0 20000 - * } - */ - public static int __BRIDGEOS_2_0() { - return __BRIDGEOS_2_0; - } - private static final int __BRIDGEOS_3_0 = (int)30000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_0 30000 - * } - */ - public static int __BRIDGEOS_3_0() { - return __BRIDGEOS_3_0; - } - private static final int __BRIDGEOS_3_1 = (int)30100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_1 30100 - * } - */ - public static int __BRIDGEOS_3_1() { - return __BRIDGEOS_3_1; - } - private static final int __BRIDGEOS_3_4 = (int)30400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_4 30400 - * } - */ - public static int __BRIDGEOS_3_4() { - return __BRIDGEOS_3_4; - } - private static final int __BRIDGEOS_4_0 = (int)40000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_4_0 40000 - * } - */ - public static int __BRIDGEOS_4_0() { - return __BRIDGEOS_4_0; - } - private static final int __BRIDGEOS_4_1 = (int)40100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_4_1 40100 - * } - */ - public static int __BRIDGEOS_4_1() { - return __BRIDGEOS_4_1; - } - private static final int __BRIDGEOS_5_0 = (int)50000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_0 50000 - * } - */ - public static int __BRIDGEOS_5_0() { - return __BRIDGEOS_5_0; - } - private static final int __BRIDGEOS_5_1 = (int)50100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_1 50100 - * } - */ - public static int __BRIDGEOS_5_1() { - return __BRIDGEOS_5_1; - } - private static final int __BRIDGEOS_5_3 = (int)50300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_3 50300 - * } - */ - public static int __BRIDGEOS_5_3() { - return __BRIDGEOS_5_3; - } - private static final int __BRIDGEOS_6_0 = (int)60000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_0 60000 - * } - */ - public static int __BRIDGEOS_6_0() { - return __BRIDGEOS_6_0; - } - private static final int __BRIDGEOS_6_2 = (int)60200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_2 60200 - * } - */ - public static int __BRIDGEOS_6_2() { - return __BRIDGEOS_6_2; - } - private static final int __BRIDGEOS_6_4 = (int)60400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_4 60400 - * } - */ - public static int __BRIDGEOS_6_4() { - return __BRIDGEOS_6_4; - } - private static final int __BRIDGEOS_6_5 = (int)60500L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_5 60500 - * } - */ - public static int __BRIDGEOS_6_5() { - return __BRIDGEOS_6_5; - } - private static final int __BRIDGEOS_6_6 = (int)60600L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_6 60600 - * } - */ - public static int __BRIDGEOS_6_6() { - return __BRIDGEOS_6_6; - } - private static final int __BRIDGEOS_7_0 = (int)70000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_0 70000 - * } - */ - public static int __BRIDGEOS_7_0() { - return __BRIDGEOS_7_0; - } - private static final int __BRIDGEOS_7_1 = (int)70100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_1 70100 - * } - */ - public static int __BRIDGEOS_7_1() { - return __BRIDGEOS_7_1; - } - private static final int __BRIDGEOS_7_2 = (int)70200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_2 70200 - * } - */ - public static int __BRIDGEOS_7_2() { - return __BRIDGEOS_7_2; - } - private static final int __BRIDGEOS_7_3 = (int)70300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_3 70300 - * } - */ - public static int __BRIDGEOS_7_3() { - return __BRIDGEOS_7_3; - } - private static final int __BRIDGEOS_7_4 = (int)70400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_4 70400 - * } - */ - public static int __BRIDGEOS_7_4() { - return __BRIDGEOS_7_4; - } - private static final int __BRIDGEOS_7_6 = (int)70600L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_6 70600 - * } - */ - public static int __BRIDGEOS_7_6() { - return __BRIDGEOS_7_6; - } - private static final int __BRIDGEOS_8_0 = (int)80000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_0 80000 - * } - */ - public static int __BRIDGEOS_8_0() { - return __BRIDGEOS_8_0; - } - private static final int __BRIDGEOS_8_1 = (int)80100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_1 80100 - * } - */ - public static int __BRIDGEOS_8_1() { - return __BRIDGEOS_8_1; - } - private static final int __BRIDGEOS_8_2 = (int)80200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_2 80200 - * } - */ - public static int __BRIDGEOS_8_2() { - return __BRIDGEOS_8_2; - } - private static final int __BRIDGEOS_8_3 = (int)80300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_3 80300 - * } - */ - public static int __BRIDGEOS_8_3() { - return __BRIDGEOS_8_3; - } - private static final int __BRIDGEOS_8_4 = (int)80400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_4 80400 - * } - */ - public static int __BRIDGEOS_8_4() { - return __BRIDGEOS_8_4; - } - private static final int __DRIVERKIT_19_0 = (int)190000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_19_0 190000 - * } - */ - public static int __DRIVERKIT_19_0() { - return __DRIVERKIT_19_0; - } - private static final int __DRIVERKIT_20_0 = (int)200000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_20_0 200000 - * } - */ - public static int __DRIVERKIT_20_0() { - return __DRIVERKIT_20_0; - } - private static final int __DRIVERKIT_21_0 = (int)210000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_21_0 210000 - * } - */ - public static int __DRIVERKIT_21_0() { - return __DRIVERKIT_21_0; - } - private static final int __DRIVERKIT_22_0 = (int)220000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_0 220000 - * } - */ - public static int __DRIVERKIT_22_0() { - return __DRIVERKIT_22_0; - } - private static final int __DRIVERKIT_22_4 = (int)220400L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_4 220400 - * } - */ - public static int __DRIVERKIT_22_4() { - return __DRIVERKIT_22_4; - } - private static final int __DRIVERKIT_22_5 = (int)220500L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_5 220500 - * } - */ - public static int __DRIVERKIT_22_5() { - return __DRIVERKIT_22_5; - } - private static final int __DRIVERKIT_22_6 = (int)220600L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_6 220600 - * } - */ - public static int __DRIVERKIT_22_6() { - return __DRIVERKIT_22_6; - } - private static final int __DRIVERKIT_23_0 = (int)230000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_0 230000 - * } - */ - public static int __DRIVERKIT_23_0() { - return __DRIVERKIT_23_0; - } - private static final int __DRIVERKIT_23_1 = (int)230100L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_1 230100 - * } - */ - public static int __DRIVERKIT_23_1() { - return __DRIVERKIT_23_1; - } - private static final int __DRIVERKIT_23_2 = (int)230200L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_2 230200 - * } - */ - public static int __DRIVERKIT_23_2() { - return __DRIVERKIT_23_2; - } - private static final int __DRIVERKIT_23_3 = (int)230300L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_3 230300 - * } - */ - public static int __DRIVERKIT_23_3() { - return __DRIVERKIT_23_3; - } - private static final int __DRIVERKIT_23_4 = (int)230400L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_4 230400 - * } - */ - public static int __DRIVERKIT_23_4() { - return __DRIVERKIT_23_4; - } - private static final int __VISIONOS_1_0 = (int)10000L; - /** - * {@snippet lang=c : - * #define __VISIONOS_1_0 10000 - * } - */ - public static int __VISIONOS_1_0() { - return __VISIONOS_1_0; - } - private static final int __VISIONOS_1_1 = (int)10100L; - /** - * {@snippet lang=c : - * #define __VISIONOS_1_1 10100 - * } - */ - public static int __VISIONOS_1_1() { - return __VISIONOS_1_1; - } - private static final int __ENABLE_LEGACY_MAC_AVAILABILITY = (int)1L; - /** - * {@snippet lang=c : - * #define __ENABLE_LEGACY_MAC_AVAILABILITY 1 - * } - */ - public static int __ENABLE_LEGACY_MAC_AVAILABILITY() { - return __ENABLE_LEGACY_MAC_AVAILABILITY; - } - private static final int __PTHREAD_SIZE__ = (int)8176L; - /** - * {@snippet lang=c : - * #define __PTHREAD_SIZE__ 8176 - * } - */ - public static int __PTHREAD_SIZE__() { - return __PTHREAD_SIZE__; - } - private static final int __PTHREAD_ATTR_SIZE__ = (int)56L; - /** - * {@snippet lang=c : - * #define __PTHREAD_ATTR_SIZE__ 56 - * } - */ - public static int __PTHREAD_ATTR_SIZE__() { - return __PTHREAD_ATTR_SIZE__; - } - private static final int __PTHREAD_MUTEXATTR_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_MUTEXATTR_SIZE__ 8 - * } - */ - public static int __PTHREAD_MUTEXATTR_SIZE__() { - return __PTHREAD_MUTEXATTR_SIZE__; - } - private static final int __PTHREAD_MUTEX_SIZE__ = (int)56L; - /** - * {@snippet lang=c : - * #define __PTHREAD_MUTEX_SIZE__ 56 - * } - */ - public static int __PTHREAD_MUTEX_SIZE__() { - return __PTHREAD_MUTEX_SIZE__; - } - private static final int __PTHREAD_CONDATTR_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_CONDATTR_SIZE__ 8 - * } - */ - public static int __PTHREAD_CONDATTR_SIZE__() { - return __PTHREAD_CONDATTR_SIZE__; - } - private static final int __PTHREAD_COND_SIZE__ = (int)40L; - /** - * {@snippet lang=c : - * #define __PTHREAD_COND_SIZE__ 40 - * } - */ - public static int __PTHREAD_COND_SIZE__() { - return __PTHREAD_COND_SIZE__; - } - private static final int __PTHREAD_ONCE_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_ONCE_SIZE__ 8 - * } - */ - public static int __PTHREAD_ONCE_SIZE__() { - return __PTHREAD_ONCE_SIZE__; - } - private static final int __PTHREAD_RWLOCK_SIZE__ = (int)192L; - /** - * {@snippet lang=c : - * #define __PTHREAD_RWLOCK_SIZE__ 192 - * } - */ - public static int __PTHREAD_RWLOCK_SIZE__() { - return __PTHREAD_RWLOCK_SIZE__; - } - private static final int __PTHREAD_RWLOCKATTR_SIZE__ = (int)16L; - /** - * {@snippet lang=c : - * #define __PTHREAD_RWLOCKATTR_SIZE__ 16 - * } - */ - public static int __PTHREAD_RWLOCKATTR_SIZE__() { - return __PTHREAD_RWLOCKATTR_SIZE__; - } - private static final int _FORTIFY_SOURCE = (int)2L; - /** - * {@snippet lang=c : - * #define _FORTIFY_SOURCE 2 - * } - */ - public static int _FORTIFY_SOURCE() { - return _FORTIFY_SOURCE; - } - private static final int __WORDSIZE = (int)64L; - /** - * {@snippet lang=c : - * #define __WORDSIZE 64 - * } - */ - public static int __WORDSIZE() { - return __WORDSIZE; - } - private static final int INT8_MAX = (int)127L; - /** - * {@snippet lang=c : - * #define INT8_MAX 127 - * } - */ - public static int INT8_MAX() { - return INT8_MAX; - } - private static final int INT16_MAX = (int)32767L; - /** - * {@snippet lang=c : - * #define INT16_MAX 32767 - * } - */ - public static int INT16_MAX() { - return INT16_MAX; - } - private static final int INT32_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define INT32_MAX 2147483647 - * } - */ - public static int INT32_MAX() { - return INT32_MAX; - } - private static final int UINT8_MAX = (int)255L; - /** - * {@snippet lang=c : - * #define UINT8_MAX 255 - * } - */ - public static int UINT8_MAX() { - return UINT8_MAX; - } - private static final int UINT16_MAX = (int)65535L; - /** - * {@snippet lang=c : - * #define UINT16_MAX 65535 - * } - */ - public static int UINT16_MAX() { - return UINT16_MAX; - } - private static final int WEBP_DECODER_ABI_VERSION = (int)521L; - /** - * {@snippet lang=c : - * #define WEBP_DECODER_ABI_VERSION 521 - * } - */ - public static int WEBP_DECODER_ABI_VERSION() { - return WEBP_DECODER_ABI_VERSION; - } - private static final int _USE_FORTIFY_LEVEL = (int)2L; - /** - * {@snippet lang=c : - * #define _USE_FORTIFY_LEVEL 2 - * } - */ - public static int _USE_FORTIFY_LEVEL() { - return _USE_FORTIFY_LEVEL; - } - private static final int __HAS_FIXED_CHK_PROTOTYPES = (int)1L; - /** - * {@snippet lang=c : - * #define __HAS_FIXED_CHK_PROTOTYPES 1 - * } - */ - public static int __HAS_FIXED_CHK_PROTOTYPES() { - return __HAS_FIXED_CHK_PROTOTYPES; - } - private static final int WEBP_DEMUX_ABI_VERSION = (int)263L; - /** - * {@snippet lang=c : - * #define WEBP_DEMUX_ABI_VERSION 263 - * } - */ - public static int WEBP_DEMUX_ABI_VERSION() { - return WEBP_DEMUX_ABI_VERSION; - } - /** - * {@snippet lang=c : - * typedef long ptrdiff_t - * } - */ - public static final OfLong ptrdiff_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long size_t - * } - */ - public static final OfLong size_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef int wchar_t - * } - */ - public static final OfInt wchar_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef signed char __int8_t - * } - */ - public static final OfByte __int8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef unsigned char __uint8_t - * } - */ - public static final OfByte __uint8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef short __int16_t - * } - */ - public static final OfShort __int16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef unsigned short __uint16_t - * } - */ - public static final OfShort __uint16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int __int32_t - * } - */ - public static final OfInt __int32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __uint32_t - * } - */ - public static final OfInt __uint32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef long long __int64_t - * } - */ - public static final OfLong __int64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long long __uint64_t - * } - */ - public static final OfLong __uint64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef long __darwin_intptr_t - * } - */ - public static final OfLong __darwin_intptr_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_natural_t - * } - */ - public static final OfInt __darwin_natural_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_ct_rune_t - * } - */ - public static final OfInt __darwin_ct_rune_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef long __darwin_ptrdiff_t - * } - */ - public static final OfLong __darwin_ptrdiff_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_size_t - * } - */ - public static final OfLong __darwin_size_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __builtin_va_list __darwin_va_list - * } - */ - public static final AddressLayout __darwin_va_list = demux_h.C_POINTER; - /** - * {@snippet lang=c : - * typedef int __darwin_wchar_t - * } - */ - public static final OfInt __darwin_wchar_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __darwin_wchar_t __darwin_rune_t - * } - */ - public static final OfInt __darwin_rune_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_wint_t - * } - */ - public static final OfInt __darwin_wint_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_clock_t - * } - */ - public static final OfLong __darwin_clock_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_socklen_t - * } - */ - public static final OfInt __darwin_socklen_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef long __darwin_ssize_t - * } - */ - public static final OfLong __darwin_ssize_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef long __darwin_time_t - * } - */ - public static final OfLong __darwin_time_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __int64_t __darwin_blkcnt_t - * } - */ - public static final OfLong __darwin_blkcnt_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_blksize_t - * } - */ - public static final OfInt __darwin_blksize_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_dev_t - * } - */ - public static final OfInt __darwin_dev_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_fsblkcnt_t - * } - */ - public static final OfInt __darwin_fsblkcnt_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_fsfilcnt_t - * } - */ - public static final OfInt __darwin_fsfilcnt_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_gid_t - * } - */ - public static final OfInt __darwin_gid_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_id_t - * } - */ - public static final OfInt __darwin_id_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint64_t __darwin_ino64_t - * } - */ - public static final OfLong __darwin_ino64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __darwin_ino64_t __darwin_ino_t - * } - */ - public static final OfLong __darwin_ino_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __darwin_natural_t __darwin_mach_port_name_t - * } - */ - public static final OfInt __darwin_mach_port_name_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __darwin_mach_port_name_t __darwin_mach_port_t - * } - */ - public static final OfInt __darwin_mach_port_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint16_t __darwin_mode_t - * } - */ - public static final OfShort __darwin_mode_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef __int64_t __darwin_off_t - * } - */ - public static final OfLong __darwin_off_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_pid_t - * } - */ - public static final OfInt __darwin_pid_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_sigset_t - * } - */ - public static final OfInt __darwin_sigset_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_suseconds_t - * } - */ - public static final OfInt __darwin_suseconds_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_uid_t - * } - */ - public static final OfInt __darwin_uid_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_useconds_t - * } - */ - public static final OfInt __darwin_useconds_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_pthread_key_t - * } - */ - public static final OfLong __darwin_pthread_key_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef struct _opaque_pthread_t { - * long __sig; - * struct __darwin_pthread_handler_rec *__cleanup_stack; - * char __opaque[8176]; - * } *__darwin_pthread_t - * } - */ - public static final AddressLayout __darwin_pthread_t = demux_h.C_POINTER; - /** - * {@snippet lang=c : - * typedef int __darwin_nl_item - * } - */ - public static final OfInt __darwin_nl_item = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_wctrans_t - * } - */ - public static final OfInt __darwin_wctrans_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_wctype_t - * } - */ - public static final OfInt __darwin_wctype_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef signed char int8_t - * } - */ - public static final OfByte int8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef short int16_t - * } - */ - public static final OfShort int16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int int32_t - * } - */ - public static final OfInt int32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef long long int64_t - * } - */ - public static final OfLong int64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned char uint8_t - * } - */ - public static final OfByte uint8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef unsigned short uint16_t - * } - */ - public static final OfShort uint16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef unsigned int uint32_t - * } - */ - public static final OfInt uint32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long long uint64_t - * } - */ - public static final OfLong uint64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int8_t int_least8_t - * } - */ - public static final OfByte int_least8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef int16_t int_least16_t - * } - */ - public static final OfShort int_least16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int32_t int_least32_t - * } - */ - public static final OfInt int_least32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef int64_t int_least64_t - * } - */ - public static final OfLong int_least64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef uint8_t uint_least8_t - * } - */ - public static final OfByte uint_least8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef uint16_t uint_least16_t - * } - */ - public static final OfShort uint_least16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef uint32_t uint_least32_t - * } - */ - public static final OfInt uint_least32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef uint64_t uint_least64_t - * } - */ - public static final OfLong uint_least64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int8_t int_fast8_t - * } - */ - public static final OfByte int_fast8_t = demux_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef int16_t int_fast16_t - * } - */ - public static final OfShort int_fast16_t = demux_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int32_t int_fast32_t - * } - */ - public static final OfInt int_fast32_t = demux_h.C_INT; - /** - * {@snippet lang=c : - * typedef int64_t int_fast64_t - * } - */ - public static final OfLong int_fast64_t = demux_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef uint8_t uint_fast8_t - * } - */ - public static final OfByte uint_fast8_t = demux_h.C_CHAR; + private static final int MODE_RGB_565 = (int)6L; /** * {@snippet lang=c : - * typedef uint16_t uint_fast16_t + * enum WEBP_CSP_MODE.MODE_RGB_565 = 6 * } */ - public static final OfShort uint_fast16_t = demux_h.C_SHORT; + public static int MODE_RGB_565() { + return MODE_RGB_565; + } + private static final int MODE_rgbA = (int)7L; /** * {@snippet lang=c : - * typedef uint32_t uint_fast32_t + * enum WEBP_CSP_MODE.MODE_rgbA = 7 * } */ - public static final OfInt uint_fast32_t = demux_h.C_INT; + public static int MODE_rgbA() { + return MODE_rgbA; + } + private static final int MODE_bgrA = (int)8L; /** * {@snippet lang=c : - * typedef uint64_t uint_fast64_t + * enum WEBP_CSP_MODE.MODE_bgrA = 8 * } */ - public static final OfLong uint_fast64_t = demux_h.C_LONG_LONG; + public static int MODE_bgrA() { + return MODE_bgrA; + } + private static final int MODE_Argb = (int)9L; /** * {@snippet lang=c : - * typedef unsigned char u_int8_t + * enum WEBP_CSP_MODE.MODE_Argb = 9 * } */ - public static final OfByte u_int8_t = demux_h.C_CHAR; + public static int MODE_Argb() { + return MODE_Argb; + } + private static final int MODE_rgbA_4444 = (int)10L; /** * {@snippet lang=c : - * typedef unsigned short u_int16_t + * enum WEBP_CSP_MODE.MODE_rgbA_4444 = 10 * } */ - public static final OfShort u_int16_t = demux_h.C_SHORT; + public static int MODE_rgbA_4444() { + return MODE_rgbA_4444; + } + private static final int MODE_YUV = (int)11L; /** * {@snippet lang=c : - * typedef unsigned int u_int32_t + * enum WEBP_CSP_MODE.MODE_YUV = 11 * } */ - public static final OfInt u_int32_t = demux_h.C_INT; + public static int MODE_YUV() { + return MODE_YUV; + } + private static final int MODE_YUVA = (int)12L; /** * {@snippet lang=c : - * typedef unsigned long long u_int64_t + * enum WEBP_CSP_MODE.MODE_YUVA = 12 * } */ - public static final OfLong u_int64_t = demux_h.C_LONG_LONG; + public static int MODE_YUVA() { + return MODE_YUVA; + } + private static final int MODE_LAST = (int)13L; /** * {@snippet lang=c : - * typedef int64_t register_t + * enum WEBP_CSP_MODE.MODE_LAST = 13 * } */ - public static final OfLong register_t = demux_h.C_LONG_LONG; + public static int MODE_LAST() { + return MODE_LAST; + } + + private static class WebPInitDecBufferInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPInitDecBufferInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * typedef unsigned long uintptr_t + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) * } */ - public static final OfLong uintptr_t = demux_h.C_LONG; + public static FunctionDescriptor WebPInitDecBufferInternal$descriptor() { + return WebPInitDecBufferInternal.DESC; + } + /** + * Downcall method handle for: * {@snippet lang=c : - * typedef u_int64_t user_addr_t + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) * } */ - public static final OfLong user_addr_t = demux_h.C_LONG_LONG; + public static MethodHandle WebPInitDecBufferInternal$handle() { + return WebPInitDecBufferInternal.HANDLE; + } + /** + * Address for: * {@snippet lang=c : - * typedef u_int64_t user_size_t + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) * } */ - public static final OfLong user_size_t = demux_h.C_LONG_LONG; + public static MemorySegment WebPInitDecBufferInternal$address() { + return WebPInitDecBufferInternal.ADDR; + } + /** * {@snippet lang=c : - * typedef int64_t user_ssize_t + * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) * } */ - public static final OfLong user_ssize_t = demux_h.C_LONG_LONG; + public static int WebPInitDecBufferInternal(MemorySegment x0, int x1) { + var mh$ = WebPInitDecBufferInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPInitDecBufferInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFreeDecBuffer { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPFreeDecBuffer"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * typedef int64_t user_long_t + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) * } */ - public static final OfLong user_long_t = demux_h.C_LONG_LONG; + public static FunctionDescriptor WebPFreeDecBuffer$descriptor() { + return WebPFreeDecBuffer.DESC; + } + /** + * Downcall method handle for: * {@snippet lang=c : - * typedef u_int64_t user_ulong_t + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) * } */ - public static final OfLong user_ulong_t = demux_h.C_LONG_LONG; + public static MethodHandle WebPFreeDecBuffer$handle() { + return WebPFreeDecBuffer.HANDLE; + } + /** + * Address for: * {@snippet lang=c : - * typedef int64_t user_time_t + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) * } */ - public static final OfLong user_time_t = demux_h.C_LONG_LONG; + public static MemorySegment WebPFreeDecBuffer$address() { + return WebPFreeDecBuffer.ADDR; + } + /** * {@snippet lang=c : - * typedef int64_t user_off_t + * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) * } */ - public static final OfLong user_off_t = demux_h.C_LONG_LONG; + public static void WebPFreeDecBuffer(MemorySegment buffer) { + var mh$ = WebPFreeDecBuffer.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFreeDecBuffer", buffer); + } + mh$.invokeExact(buffer); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int VP8_STATUS_OK = (int)0L; /** * {@snippet lang=c : - * typedef u_int64_t syscall_arg_t + * enum VP8StatusCode.VP8_STATUS_OK = 0 * } */ - public static final OfLong syscall_arg_t = demux_h.C_LONG_LONG; + public static int VP8_STATUS_OK() { + return VP8_STATUS_OK; + } + private static final int VP8_STATUS_OUT_OF_MEMORY = (int)1L; /** * {@snippet lang=c : - * typedef __darwin_intptr_t intptr_t + * enum VP8StatusCode.VP8_STATUS_OUT_OF_MEMORY = 1 * } */ - public static final OfLong intptr_t = demux_h.C_LONG; + public static int VP8_STATUS_OUT_OF_MEMORY() { + return VP8_STATUS_OUT_OF_MEMORY; + } + private static final int VP8_STATUS_INVALID_PARAM = (int)2L; /** * {@snippet lang=c : - * typedef long intmax_t + * enum VP8StatusCode.VP8_STATUS_INVALID_PARAM = 2 * } */ - public static final OfLong intmax_t = demux_h.C_LONG; + public static int VP8_STATUS_INVALID_PARAM() { + return VP8_STATUS_INVALID_PARAM; + } + private static final int VP8_STATUS_BITSTREAM_ERROR = (int)3L; /** * {@snippet lang=c : - * typedef unsigned long uintmax_t + * enum VP8StatusCode.VP8_STATUS_BITSTREAM_ERROR = 3 * } */ - public static final OfLong uintmax_t = demux_h.C_LONG; - - private static class imaxabs { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, - demux_h.C_LONG - ); - - public static final MemorySegment ADDR = demux_h.findOrThrow("imaxabs"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + public static int VP8_STATUS_BITSTREAM_ERROR() { + return VP8_STATUS_BITSTREAM_ERROR; } - + private static final int VP8_STATUS_UNSUPPORTED_FEATURE = (int)4L; /** - * Function descriptor for: * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) + * enum VP8StatusCode.VP8_STATUS_UNSUPPORTED_FEATURE = 4 * } */ - public static FunctionDescriptor imaxabs$descriptor() { - return imaxabs.DESC; + public static int VP8_STATUS_UNSUPPORTED_FEATURE() { + return VP8_STATUS_UNSUPPORTED_FEATURE; } - + private static final int VP8_STATUS_SUSPENDED = (int)5L; /** - * Downcall method handle for: * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) + * enum VP8StatusCode.VP8_STATUS_SUSPENDED = 5 * } */ - public static MethodHandle imaxabs$handle() { - return imaxabs.HANDLE; + public static int VP8_STATUS_SUSPENDED() { + return VP8_STATUS_SUSPENDED; } - + private static final int VP8_STATUS_USER_ABORT = (int)6L; /** - * Address for: * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) + * enum VP8StatusCode.VP8_STATUS_USER_ABORT = 6 * } */ - public static MemorySegment imaxabs$address() { - return imaxabs.ADDR; + public static int VP8_STATUS_USER_ABORT() { + return VP8_STATUS_USER_ABORT; } - + private static final int VP8_STATUS_NOT_ENOUGH_DATA = (int)7L; /** * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) + * enum VP8StatusCode.VP8_STATUS_NOT_ENOUGH_DATA = 7 * } */ - public static long imaxabs(long j) { - var mh$ = imaxabs.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("imaxabs", j); - } - return (long)mh$.invokeExact(j); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } + public static int VP8_STATUS_NOT_ENOUGH_DATA() { + return VP8_STATUS_NOT_ENOUGH_DATA; } - private static class imaxdiv { + private static class WebPINewDecoder { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - imaxdiv_t.layout(), - demux_h.C_LONG, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("imaxdiv"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewDecoder"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3514,59 +2423,60 @@ private static class imaxdiv { /** * Function descriptor for: * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) * } */ - public static FunctionDescriptor imaxdiv$descriptor() { - return imaxdiv.DESC; + public static FunctionDescriptor WebPINewDecoder$descriptor() { + return WebPINewDecoder.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) * } */ - public static MethodHandle imaxdiv$handle() { - return imaxdiv.HANDLE; + public static MethodHandle WebPINewDecoder$handle() { + return WebPINewDecoder.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) * } */ - public static MemorySegment imaxdiv$address() { - return imaxdiv.ADDR; + public static MemorySegment WebPINewDecoder$address() { + return WebPINewDecoder.ADDR; } /** * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) + * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) * } */ - public static MemorySegment imaxdiv(SegmentAllocator allocator, long __numer, long __denom) { - var mh$ = imaxdiv.HANDLE; + public static MemorySegment WebPINewDecoder(MemorySegment output_buffer) { + var mh$ = WebPINewDecoder.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("imaxdiv", allocator, __numer, __denom); + traceDowncall("WebPINewDecoder", output_buffer); } - return (MemorySegment)mh$.invokeExact(allocator, __numer, __denom); + return (MemorySegment)mh$.invokeExact(output_buffer); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strtoimax { + private static class WebPINewRGB { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, + demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strtoimax"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewRGB"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3574,59 +2484,68 @@ private static class strtoimax { /** * Function descriptor for: * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static FunctionDescriptor strtoimax$descriptor() { - return strtoimax.DESC; + public static FunctionDescriptor WebPINewRGB$descriptor() { + return WebPINewRGB.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static MethodHandle strtoimax$handle() { - return strtoimax.HANDLE; + public static MethodHandle WebPINewRGB$handle() { + return WebPINewRGB.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static MemorySegment strtoimax$address() { - return strtoimax.ADDR; + public static MemorySegment WebPINewRGB$address() { + return WebPINewRGB.ADDR; } /** * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) * } */ - public static long strtoimax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = strtoimax.HANDLE; + public static MemorySegment WebPINewRGB(int csp, MemorySegment output_buffer, long output_buffer_size, int output_stride) { + var mh$ = WebPINewRGB.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strtoimax", __nptr, __endptr, __base); + traceDowncall("WebPINewRGB", csp, output_buffer, output_buffer_size, output_stride); } - return (long)mh$.invokeExact(__nptr, __endptr, __base); + return (MemorySegment)mh$.invokeExact(csp, output_buffer, output_buffer_size, output_stride); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strtoumax { + private static class WebPINewYUVA { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strtoumax"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewYUVA"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3634,59 +2553,65 @@ private static class strtoumax { /** * Function descriptor for: * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) * } */ - public static FunctionDescriptor strtoumax$descriptor() { - return strtoumax.DESC; + public static FunctionDescriptor WebPINewYUVA$descriptor() { + return WebPINewYUVA.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) * } */ - public static MethodHandle strtoumax$handle() { - return strtoumax.HANDLE; + public static MethodHandle WebPINewYUVA$handle() { + return WebPINewYUVA.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) * } */ - public static MemorySegment strtoumax$address() { - return strtoumax.ADDR; + public static MemorySegment WebPINewYUVA$address() { + return WebPINewYUVA.ADDR; } /** * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) * } */ - public static long strtoumax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = strtoumax.HANDLE; + public static MemorySegment WebPINewYUVA(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride, MemorySegment a, long a_size, int a_stride) { + var mh$ = WebPINewYUVA.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strtoumax", __nptr, __endptr, __base); + traceDowncall("WebPINewYUVA", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); } - return (long)mh$.invokeExact(__nptr, __endptr, __base); + return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class wcstoimax { + private static class WebPINewYUV { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("wcstoimax"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewYUV"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3694,59 +2619,56 @@ private static class wcstoimax { /** * Function descriptor for: * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static FunctionDescriptor wcstoimax$descriptor() { - return wcstoimax.DESC; + public static FunctionDescriptor WebPINewYUV$descriptor() { + return WebPINewYUV.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static MethodHandle wcstoimax$handle() { - return wcstoimax.HANDLE; + public static MethodHandle WebPINewYUV$handle() { + return WebPINewYUV.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static MemorySegment wcstoimax$address() { - return wcstoimax.ADDR; + public static MemorySegment WebPINewYUV$address() { + return WebPINewYUV.ADDR; } /** * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) * } */ - public static long wcstoimax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = wcstoimax.HANDLE; + public static MemorySegment WebPINewYUV(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { + var mh$ = WebPINewYUV.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("wcstoimax", __nptr, __endptr, __base); + traceDowncall("WebPINewYUV", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); } - return (long)mh$.invokeExact(__nptr, __endptr, __base); + return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class wcstoumax { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT + private static class WebPIDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("wcstoumax"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDelete"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3754,57 +2676,59 @@ private static class wcstoumax { /** * Function descriptor for: * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern void WebPIDelete(WebPIDecoder *idec) * } */ - public static FunctionDescriptor wcstoumax$descriptor() { - return wcstoumax.DESC; + public static FunctionDescriptor WebPIDelete$descriptor() { + return WebPIDelete.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern void WebPIDelete(WebPIDecoder *idec) * } */ - public static MethodHandle wcstoumax$handle() { - return wcstoumax.HANDLE; + public static MethodHandle WebPIDelete$handle() { + return WebPIDelete.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern void WebPIDelete(WebPIDecoder *idec) * } */ - public static MemorySegment wcstoumax$address() { - return wcstoumax.ADDR; + public static MemorySegment WebPIDelete$address() { + return WebPIDelete.ADDR; } /** * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) + * extern void WebPIDelete(WebPIDecoder *idec) * } */ - public static long wcstoumax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = wcstoumax.HANDLE; + public static void WebPIDelete(MemorySegment idec) { + var mh$ = WebPIDelete.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("wcstoumax", __nptr, __endptr, __base); + traceDowncall("WebPIDelete", idec); } - return (long)mh$.invokeExact(__nptr, __endptr, __base); + mh$.invokeExact(idec); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPMalloc { + private static class WebPIAppend { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPMalloc"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIAppend"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3812,56 +2736,59 @@ private static class WebPMalloc { /** * Function descriptor for: * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static FunctionDescriptor WebPMalloc$descriptor() { - return WebPMalloc.DESC; + public static FunctionDescriptor WebPIAppend$descriptor() { + return WebPIAppend.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static MethodHandle WebPMalloc$handle() { - return WebPMalloc.HANDLE; + public static MethodHandle WebPIAppend$handle() { + return WebPIAppend.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static MemorySegment WebPMalloc$address() { - return WebPMalloc.ADDR; + public static MemorySegment WebPIAppend$address() { + return WebPIAppend.ADDR; } /** * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) + * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static MemorySegment WebPMalloc(long size) { - var mh$ = WebPMalloc.HANDLE; + public static int WebPIAppend(MemorySegment idec, MemorySegment data, long data_size) { + var mh$ = WebPIAppend.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPMalloc", size); + traceDowncall("WebPIAppend", idec, data, data_size); } - return (MemorySegment)mh$.invokeExact(size); + return (int)mh$.invokeExact(idec, data, data_size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPFree { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER + private static class WebPIUpdate { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPFree"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIUpdate"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3869,55 +2796,61 @@ private static class WebPFree { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPFree(void *ptr) + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static FunctionDescriptor WebPFree$descriptor() { - return WebPFree.DESC; + public static FunctionDescriptor WebPIUpdate$descriptor() { + return WebPIUpdate.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPFree(void *ptr) + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static MethodHandle WebPFree$handle() { - return WebPFree.HANDLE; + public static MethodHandle WebPIUpdate$handle() { + return WebPIUpdate.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPFree(void *ptr) + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static MemorySegment WebPFree$address() { - return WebPFree.ADDR; + public static MemorySegment WebPIUpdate$address() { + return WebPIUpdate.ADDR; } /** * {@snippet lang=c : - * extern void WebPFree(void *ptr) + * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) * } */ - public static void WebPFree(MemorySegment ptr) { - var mh$ = WebPFree.HANDLE; + public static int WebPIUpdate(MemorySegment idec, MemorySegment data, long data_size) { + var mh$ = WebPIUpdate.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPFree", ptr); + traceDowncall("WebPIUpdate", idec, data, data_size); } - mh$.invokeExact(ptr); + return (int)mh$.invokeExact(idec, data, data_size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPGetDecoderVersion { + private static class WebPIDecGetRGB { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT ); + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetDecoderVersion"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecGetRGB"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3925,60 +2858,66 @@ private static class WebPGetDecoderVersion { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPGetDecoderVersion() + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) * } */ - public static FunctionDescriptor WebPGetDecoderVersion$descriptor() { - return WebPGetDecoderVersion.DESC; + public static FunctionDescriptor WebPIDecGetRGB$descriptor() { + return WebPIDecGetRGB.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPGetDecoderVersion() + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) * } */ - public static MethodHandle WebPGetDecoderVersion$handle() { - return WebPGetDecoderVersion.HANDLE; + public static MethodHandle WebPIDecGetRGB$handle() { + return WebPIDecGetRGB.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPGetDecoderVersion() + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) * } */ - public static MemorySegment WebPGetDecoderVersion$address() { - return WebPGetDecoderVersion.ADDR; + public static MemorySegment WebPIDecGetRGB$address() { + return WebPIDecGetRGB.ADDR; } /** * {@snippet lang=c : - * extern int WebPGetDecoderVersion() + * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) * } */ - public static int WebPGetDecoderVersion() { - var mh$ = WebPGetDecoderVersion.HANDLE; + public static MemorySegment WebPIDecGetRGB(MemorySegment idec, MemorySegment last_y, MemorySegment width, MemorySegment height, MemorySegment stride) { + var mh$ = WebPIDecGetRGB.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetDecoderVersion"); + traceDowncall("WebPIDecGetRGB", idec, last_y, width, height, stride); } - return (int)mh$.invokeExact(); + return (MemorySegment)mh$.invokeExact(idec, last_y, width, height, stride); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPGetInfo { + private static class WebPIDecGetYUVA { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetInfo"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecGetYUVA"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -3986,60 +2925,61 @@ private static class WebPGetInfo { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) * } */ - public static FunctionDescriptor WebPGetInfo$descriptor() { - return WebPGetInfo.DESC; + public static FunctionDescriptor WebPIDecGetYUVA$descriptor() { + return WebPIDecGetYUVA.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) * } */ - public static MethodHandle WebPGetInfo$handle() { - return WebPGetInfo.HANDLE; + public static MethodHandle WebPIDecGetYUVA$handle() { + return WebPIDecGetYUVA.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) * } */ - public static MemorySegment WebPGetInfo$address() { - return WebPGetInfo.ADDR; + public static MemorySegment WebPIDecGetYUVA$address() { + return WebPIDecGetYUVA.ADDR; } /** * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) + * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) * } */ - public static int WebPGetInfo(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPGetInfo.HANDLE; + public static MemorySegment WebPIDecGetYUVA(MemorySegment idec, MemorySegment last_y, MemorySegment u, MemorySegment v, MemorySegment a, MemorySegment width, MemorySegment height, MemorySegment stride, MemorySegment uv_stride, MemorySegment a_stride) { + var mh$ = WebPIDecGetYUVA.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetInfo", data, data_size, width, height); + traceDowncall("WebPIDecGetYUVA", idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); } - return (int)mh$.invokeExact(data, data_size, width, height); + return (MemorySegment)mh$.invokeExact(idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeRGBA { + private static class WebPIDecodedArea { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBA"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecodedArea"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4047,60 +2987,60 @@ private static class WebPDecodeRGBA { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) * } */ - public static FunctionDescriptor WebPDecodeRGBA$descriptor() { - return WebPDecodeRGBA.DESC; + public static FunctionDescriptor WebPIDecodedArea$descriptor() { + return WebPIDecodedArea.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) * } */ - public static MethodHandle WebPDecodeRGBA$handle() { - return WebPDecodeRGBA.HANDLE; + public static MethodHandle WebPIDecodedArea$handle() { + return WebPIDecodedArea.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) * } */ - public static MemorySegment WebPDecodeRGBA$address() { - return WebPDecodeRGBA.ADDR; + public static MemorySegment WebPIDecodedArea$address() { + return WebPIDecodedArea.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) * } */ - public static MemorySegment WebPDecodeRGBA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeRGBA.HANDLE; + public static MemorySegment WebPIDecodedArea(MemorySegment idec, MemorySegment left, MemorySegment top, MemorySegment width, MemorySegment height) { + var mh$ = WebPIDecodedArea.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBA", data, data_size, width, height); + traceDowncall("WebPIDecodedArea", idec, left, top, width, height); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + return (MemorySegment)mh$.invokeExact(idec, left, top, width, height); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeARGB { + private static class WebPGetFeaturesInternal { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeARGB"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetFeaturesInternal"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4108,60 +3048,58 @@ private static class WebPDecodeARGB { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) * } */ - public static FunctionDescriptor WebPDecodeARGB$descriptor() { - return WebPDecodeARGB.DESC; + public static FunctionDescriptor WebPGetFeaturesInternal$descriptor() { + return WebPGetFeaturesInternal.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) * } */ - public static MethodHandle WebPDecodeARGB$handle() { - return WebPDecodeARGB.HANDLE; + public static MethodHandle WebPGetFeaturesInternal$handle() { + return WebPGetFeaturesInternal.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) * } */ - public static MemorySegment WebPDecodeARGB$address() { - return WebPDecodeARGB.ADDR; + public static MemorySegment WebPGetFeaturesInternal$address() { + return WebPGetFeaturesInternal.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) * } */ - public static MemorySegment WebPDecodeARGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeARGB.HANDLE; + public static int WebPGetFeaturesInternal(MemorySegment x0, long x1, MemorySegment x2, int x3) { + var mh$ = WebPGetFeaturesInternal.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeARGB", data, data_size, width, height); + traceDowncall("WebPGetFeaturesInternal", x0, x1, x2, x3); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + return (int)mh$.invokeExact(x0, x1, x2, x3); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeBGRA { + private static class WebPInitDecoderConfigInternal { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRA"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPInitDecoderConfigInternal"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4169,60 +3107,59 @@ private static class WebPDecodeBGRA { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) * } */ - public static FunctionDescriptor WebPDecodeBGRA$descriptor() { - return WebPDecodeBGRA.DESC; + public static FunctionDescriptor WebPInitDecoderConfigInternal$descriptor() { + return WebPInitDecoderConfigInternal.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) * } */ - public static MethodHandle WebPDecodeBGRA$handle() { - return WebPDecodeBGRA.HANDLE; + public static MethodHandle WebPInitDecoderConfigInternal$handle() { + return WebPInitDecoderConfigInternal.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) * } */ - public static MemorySegment WebPDecodeBGRA$address() { - return WebPDecodeBGRA.ADDR; + public static MemorySegment WebPInitDecoderConfigInternal$address() { + return WebPInitDecoderConfigInternal.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) + * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) * } */ - public static MemorySegment WebPDecodeBGRA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeBGRA.HANDLE; + public static int WebPInitDecoderConfigInternal(MemorySegment x0, int x1) { + var mh$ = WebPInitDecoderConfigInternal.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRA", data, data_size, width, height); + traceDowncall("WebPInitDecoderConfigInternal", x0, x1); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + return (int)mh$.invokeExact(x0, x1); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeRGB { + private static class WebPIDecode { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGB"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecode"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4230,60 +3167,59 @@ private static class WebPDecodeRGB { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static FunctionDescriptor WebPDecodeRGB$descriptor() { - return WebPDecodeRGB.DESC; + public static FunctionDescriptor WebPIDecode$descriptor() { + return WebPIDecode.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MethodHandle WebPDecodeRGB$handle() { - return WebPDecodeRGB.HANDLE; + public static MethodHandle WebPIDecode$handle() { + return WebPIDecode.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MemorySegment WebPDecodeRGB$address() { - return WebPDecodeRGB.ADDR; + public static MemorySegment WebPIDecode$address() { + return WebPIDecode.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) + * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MemorySegment WebPDecodeRGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeRGB.HANDLE; + public static MemorySegment WebPIDecode(MemorySegment data, long data_size, MemorySegment config) { + var mh$ = WebPIDecode.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGB", data, data_size, width, height); + traceDowncall("WebPIDecode", data, data_size, config); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + return (MemorySegment)mh$.invokeExact(data, data_size, config); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeBGR { + private static class WebPDecode { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGR"); + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecode"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4291,64 +3227,149 @@ private static class WebPDecodeBGR { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static FunctionDescriptor WebPDecodeBGR$descriptor() { - return WebPDecodeBGR.DESC; + public static FunctionDescriptor WebPDecode$descriptor() { + return WebPDecode.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MethodHandle WebPDecodeBGR$handle() { - return WebPDecodeBGR.HANDLE; + public static MethodHandle WebPDecode$handle() { + return WebPDecode.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MemorySegment WebPDecodeBGR$address() { - return WebPDecodeBGR.ADDR; + public static MemorySegment WebPDecode$address() { + return WebPDecode.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) + * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) * } */ - public static MemorySegment WebPDecodeBGR(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeBGR.HANDLE; + public static int WebPDecode(MemorySegment data, long data_size, MemorySegment config) { + var mh$ = WebPDecode.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGR", data, data_size, width, height); + traceDowncall("WebPDecode", data, data_size, config); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); + return (int)mh$.invokeExact(data, data_size, config); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } + /** + * {@snippet lang=c : + * typedef unsigned long long uintptr_t + * } + */ + public static final OfLong uintptr_t = demux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef char *va_list + * } + */ + public static final AddressLayout va_list = demux_h.C_POINTER; - private static class WebPDecodeYUV { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER - ); + /** + * Variadic invoker class for: + * {@snippet lang=c : + * void __va_start(va_list *, ...) + * } + */ + public static class __va_start { + private static final FunctionDescriptor BASE_DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + private static final MemorySegment ADDR = demux_h.findOrThrow("__va_start"); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeYUV"); + private final MethodHandle handle; + private final FunctionDescriptor descriptor; + private final MethodHandle spreader; + + private __va_start(MethodHandle handle, FunctionDescriptor descriptor, MethodHandle spreader) { + this.handle = handle; + this.descriptor = descriptor; + this.spreader = spreader; + } + + /** + * Variadic invoker factory for: + * {@snippet lang=c : + * void __va_start(va_list *, ...) + * } + */ + public static __va_start makeInvoker(MemoryLayout... layouts) { + FunctionDescriptor desc$ = BASE_DESC.appendArgumentLayouts(layouts); + Linker.Option fva$ = Linker.Option.firstVariadicArg(BASE_DESC.argumentLayouts().size()); + var mh$ = Linker.nativeLinker().downcallHandle(ADDR, desc$, fva$); + var spreader$ = mh$.asSpreader(Object[].class, layouts.length); + return new __va_start(mh$, desc$, spreader$); + } + + /** + * {@return the address} + */ + public static MemorySegment address() { + return ADDR; + } + + /** + * {@return the specialized method handle} + */ + public MethodHandle handle() { + return handle; + } + + /** + * {@return the specialized descriptor} + */ + public FunctionDescriptor descriptor() { + return descriptor; + } + + public void apply(MemorySegment x0, Object... x1) { + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__va_start", x0, x1); + } + spreader.invokeExact(x0, x1); + } catch(IllegalArgumentException | ClassCastException ex$) { + throw ex$; // rethrow IAE from passing wrong number/type of args + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + /** + * {@snippet lang=c : + * typedef long long intptr_t + * } + */ + public static final OfLong intptr_t = demux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef _Bool __vcrt_bool + * } + */ + public static final OfBoolean __vcrt_bool = demux_h.C_BOOL; + + private static class __security_init_cookie { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("__security_init_cookie"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4356,61 +3377,56 @@ private static class WebPDecodeYUV { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * void __security_init_cookie() * } */ - public static FunctionDescriptor WebPDecodeYUV$descriptor() { - return WebPDecodeYUV.DESC; + public static FunctionDescriptor __security_init_cookie$descriptor() { + return __security_init_cookie.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * void __security_init_cookie() * } */ - public static MethodHandle WebPDecodeYUV$handle() { - return WebPDecodeYUV.HANDLE; + public static MethodHandle __security_init_cookie$handle() { + return __security_init_cookie.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * void __security_init_cookie() * } */ - public static MemorySegment WebPDecodeYUV$address() { - return WebPDecodeYUV.ADDR; + public static MemorySegment __security_init_cookie$address() { + return __security_init_cookie.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) + * void __security_init_cookie() * } */ - public static MemorySegment WebPDecodeYUV(MemorySegment data, long data_size, MemorySegment width, MemorySegment height, MemorySegment u, MemorySegment v, MemorySegment stride, MemorySegment uv_stride) { - var mh$ = WebPDecodeYUV.HANDLE; + public static void __security_init_cookie() { + var mh$ = __security_init_cookie.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeYUV", data, data_size, width, height, u, v, stride, uv_stride); + traceDowncall("__security_init_cookie"); } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height, u, v, stride, uv_stride); + mh$.invokeExact(); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeRGBAInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + private static class __security_check_cookie { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBAInto"); + public static final MemorySegment ADDR = demux_h.findOrThrow("__security_check_cookie"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4418,61 +3434,56 @@ private static class WebPDecodeRGBAInto { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __security_check_cookie(uintptr_t _StackCookie) * } */ - public static FunctionDescriptor WebPDecodeRGBAInto$descriptor() { - return WebPDecodeRGBAInto.DESC; + public static FunctionDescriptor __security_check_cookie$descriptor() { + return __security_check_cookie.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __security_check_cookie(uintptr_t _StackCookie) * } */ - public static MethodHandle WebPDecodeRGBAInto$handle() { - return WebPDecodeRGBAInto.HANDLE; + public static MethodHandle __security_check_cookie$handle() { + return __security_check_cookie.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __security_check_cookie(uintptr_t _StackCookie) * } */ - public static MemorySegment WebPDecodeRGBAInto$address() { - return WebPDecodeRGBAInto.ADDR; + public static MemorySegment __security_check_cookie$address() { + return __security_check_cookie.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __security_check_cookie(uintptr_t _StackCookie) * } */ - public static MemorySegment WebPDecodeRGBAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeRGBAInto.HANDLE; + public static void __security_check_cookie(long _StackCookie) { + var mh$ = __security_check_cookie.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBAInto", data, data_size, output_buffer, output_buffer_size, output_stride); + traceDowncall("__security_check_cookie", _StackCookie); } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + mh$.invokeExact(_StackCookie); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeARGBInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + private static class __report_gsfailure { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeARGBInto"); + public static final MemorySegment ADDR = demux_h.findOrThrow("__report_gsfailure"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4480,123 +3491,105 @@ private static class WebPDecodeARGBInto { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __report_gsfailure(uintptr_t _StackCookie) * } */ - public static FunctionDescriptor WebPDecodeARGBInto$descriptor() { - return WebPDecodeARGBInto.DESC; + public static FunctionDescriptor __report_gsfailure$descriptor() { + return __report_gsfailure.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __report_gsfailure(uintptr_t _StackCookie) * } */ - public static MethodHandle WebPDecodeARGBInto$handle() { - return WebPDecodeARGBInto.HANDLE; + public static MethodHandle __report_gsfailure$handle() { + return __report_gsfailure.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __report_gsfailure(uintptr_t _StackCookie) * } */ - public static MemorySegment WebPDecodeARGBInto$address() { - return WebPDecodeARGBInto.ADDR; + public static MemorySegment __report_gsfailure$address() { + return __report_gsfailure.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void __report_gsfailure(uintptr_t _StackCookie) * } */ - public static MemorySegment WebPDecodeARGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeARGBInto.HANDLE; + public static void __report_gsfailure(long _StackCookie) { + var mh$ = __report_gsfailure.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeARGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + traceDowncall("__report_gsfailure", _StackCookie); } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + mh$.invokeExact(_StackCookie); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeBGRAInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT - ); - - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRAInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + private static class __security_cookie$constants { + public static final OfLong LAYOUT = demux_h.C_LONG_LONG; + public static final MemorySegment SEGMENT = demux_h.findOrThrow("__security_cookie").reinterpret(LAYOUT.byteSize()); } /** - * Function descriptor for: + * Layout for variable: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * extern uintptr_t __security_cookie * } */ - public static FunctionDescriptor WebPDecodeBGRAInto$descriptor() { - return WebPDecodeBGRAInto.DESC; + public static OfLong __security_cookie$layout() { + return __security_cookie$constants.LAYOUT; } /** - * Downcall method handle for: + * Segment for variable: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * extern uintptr_t __security_cookie * } */ - public static MethodHandle WebPDecodeBGRAInto$handle() { - return WebPDecodeBGRAInto.HANDLE; + public static MemorySegment __security_cookie$segment() { + return __security_cookie$constants.SEGMENT; } /** - * Address for: + * Getter for variable: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * extern uintptr_t __security_cookie * } */ - public static MemorySegment WebPDecodeBGRAInto$address() { - return WebPDecodeBGRAInto.ADDR; + public static long __security_cookie() { + return __security_cookie$constants.SEGMENT.get(__security_cookie$constants.LAYOUT, 0L); } /** + * Setter for variable: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * extern uintptr_t __security_cookie * } */ - public static MemorySegment WebPDecodeBGRAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeBGRAInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRAInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } + public static void __security_cookie(long varValue) { + __security_cookie$constants.SEGMENT.set(__security_cookie$constants.LAYOUT, 0L, varValue); } + /** + * {@snippet lang=c : + * typedef _Bool __crt_bool + * } + */ + public static final OfBoolean __crt_bool = demux_h.C_BOOL; - private static class WebPDecodeRGBInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT - ); + private static class _invalid_parameter_noinfo { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeRGBInto"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_invalid_parameter_noinfo"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4604,61 +3597,54 @@ private static class WebPDecodeRGBInto { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo() * } - */ - public static FunctionDescriptor WebPDecodeRGBInto$descriptor() { - return WebPDecodeRGBInto.DESC; + */ + public static FunctionDescriptor _invalid_parameter_noinfo$descriptor() { + return _invalid_parameter_noinfo.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo() * } */ - public static MethodHandle WebPDecodeRGBInto$handle() { - return WebPDecodeRGBInto.HANDLE; + public static MethodHandle _invalid_parameter_noinfo$handle() { + return _invalid_parameter_noinfo.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo() * } */ - public static MemorySegment WebPDecodeRGBInto$address() { - return WebPDecodeRGBInto.ADDR; + public static MemorySegment _invalid_parameter_noinfo$address() { + return _invalid_parameter_noinfo.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo() * } */ - public static MemorySegment WebPDecodeRGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeRGBInto.HANDLE; + public static void _invalid_parameter_noinfo() { + var mh$ = _invalid_parameter_noinfo.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); + traceDowncall("_invalid_parameter_noinfo"); } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + mh$.invokeExact(); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeBGRInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT - ); + private static class _invalid_parameter_noinfo_noreturn { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeBGRInto"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_invalid_parameter_noinfo_noreturn"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4666,67 +3652,60 @@ private static class WebPDecodeBGRInto { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo_noreturn() * } */ - public static FunctionDescriptor WebPDecodeBGRInto$descriptor() { - return WebPDecodeBGRInto.DESC; + public static FunctionDescriptor _invalid_parameter_noinfo_noreturn$descriptor() { + return _invalid_parameter_noinfo_noreturn.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo_noreturn() * } */ - public static MethodHandle WebPDecodeBGRInto$handle() { - return WebPDecodeBGRInto.HANDLE; + public static MethodHandle _invalid_parameter_noinfo_noreturn$handle() { + return _invalid_parameter_noinfo_noreturn.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo_noreturn() * } */ - public static MemorySegment WebPDecodeBGRInto$address() { - return WebPDecodeBGRInto.ADDR; + public static MemorySegment _invalid_parameter_noinfo_noreturn$address() { + return _invalid_parameter_noinfo_noreturn.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * void _invalid_parameter_noinfo_noreturn() * } */ - public static MemorySegment WebPDecodeBGRInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeBGRInto.HANDLE; + public static void _invalid_parameter_noinfo_noreturn() { + var mh$ = _invalid_parameter_noinfo_noreturn.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRInto", data, data_size, output_buffer, output_buffer_size, output_stride); + traceDowncall("_invalid_parameter_noinfo_noreturn"); } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); + mh$.invokeExact(); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecodeYUVInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, + private static class _invoke_watson { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( demux_h.C_POINTER, - demux_h.C_LONG, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, demux_h.C_INT, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecodeYUVInto"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_invoke_watson"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4734,184 +3713,219 @@ private static class WebPDecodeYUVInto { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) * } */ - public static FunctionDescriptor WebPDecodeYUVInto$descriptor() { - return WebPDecodeYUVInto.DESC; + public static FunctionDescriptor _invoke_watson$descriptor() { + return _invoke_watson.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) * } */ - public static MethodHandle WebPDecodeYUVInto$handle() { - return WebPDecodeYUVInto.HANDLE; + public static MethodHandle _invoke_watson$handle() { + return _invoke_watson.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) * } */ - public static MemorySegment WebPDecodeYUVInto$address() { - return WebPDecodeYUVInto.ADDR; + public static MemorySegment _invoke_watson$address() { + return _invoke_watson.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) * } */ - public static MemorySegment WebPDecodeYUVInto(MemorySegment data, long data_size, MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { - var mh$ = WebPDecodeYUVInto.HANDLE; + public static void _invoke_watson(MemorySegment _Expression, MemorySegment _FunctionName, MemorySegment _FileName, int _LineNo, long _Reserved) { + var mh$ = _invoke_watson.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeYUVInto", data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + traceDowncall("_invoke_watson", _Expression, _FunctionName, _FileName, _LineNo, _Reserved); } - return (MemorySegment)mh$.invokeExact(data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + mh$.invokeExact(_Expression, _FunctionName, _FileName, _LineNo, _Reserved); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static final int MODE_RGB = (int)0L; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGB = 0 + * typedef int errno_t * } */ - public static int MODE_RGB() { - return MODE_RGB; - } - private static final int MODE_RGBA = (int)1L; + public static final OfInt errno_t = demux_h.C_INT; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGBA = 1 + * typedef unsigned short wint_t * } */ - public static int MODE_RGBA() { - return MODE_RGBA; - } - private static final int MODE_BGR = (int)2L; + public static final OfShort wint_t = demux_h.C_SHORT; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_BGR = 2 + * typedef unsigned short wctype_t * } */ - public static int MODE_BGR() { - return MODE_BGR; - } - private static final int MODE_BGRA = (int)3L; + public static final OfShort wctype_t = demux_h.C_SHORT; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_BGRA = 3 + * typedef long __time32_t * } */ - public static int MODE_BGRA() { - return MODE_BGRA; - } - private static final int MODE_ARGB = (int)4L; + public static final OfInt __time32_t = demux_h.C_LONG; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_ARGB = 4 + * typedef long long __time64_t * } */ - public static int MODE_ARGB() { - return MODE_ARGB; - } - private static final int MODE_RGBA_4444 = (int)5L; + public static final OfLong __time64_t = demux_h.C_LONG_LONG; /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGBA_4444 = 5 + * typedef __crt_locale_pointers *_locale_t * } */ - public static int MODE_RGBA_4444() { - return MODE_RGBA_4444; + public static final AddressLayout _locale_t = demux_h.C_POINTER; + /** + * {@snippet lang=c : + * typedef __time64_t time_t + * } + */ + public static final OfLong time_t = demux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef size_t rsize_t + * } + */ + public static final OfLong rsize_t = demux_h.C_LONG_LONG; + + private static class _errno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_errno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MODE_RGB_565 = (int)6L; + /** + * Function descriptor for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGB_565 = 6 + * int *_errno() * } */ - public static int MODE_RGB_565() { - return MODE_RGB_565; + public static FunctionDescriptor _errno$descriptor() { + return _errno.DESC; } - private static final int MODE_rgbA = (int)7L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_rgbA = 7 + * int *_errno() * } */ - public static int MODE_rgbA() { - return MODE_rgbA; + public static MethodHandle _errno$handle() { + return _errno.HANDLE; } - private static final int MODE_bgrA = (int)8L; + /** + * Address for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_bgrA = 8 + * int *_errno() * } */ - public static int MODE_bgrA() { - return MODE_bgrA; + public static MemorySegment _errno$address() { + return _errno.ADDR; } - private static final int MODE_Argb = (int)9L; + /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_Argb = 9 + * int *_errno() * } */ - public static int MODE_Argb() { - return MODE_Argb; + public static MemorySegment _errno() { + var mh$ = _errno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_errno"); + } + return (MemorySegment)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MODE_rgbA_4444 = (int)10L; + + private static class _set_errno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_set_errno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_rgbA_4444 = 10 + * errno_t _set_errno(int _Value) * } */ - public static int MODE_rgbA_4444() { - return MODE_rgbA_4444; + public static FunctionDescriptor _set_errno$descriptor() { + return _set_errno.DESC; } - private static final int MODE_YUV = (int)11L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_YUV = 11 + * errno_t _set_errno(int _Value) * } */ - public static int MODE_YUV() { - return MODE_YUV; + public static MethodHandle _set_errno$handle() { + return _set_errno.HANDLE; } - private static final int MODE_YUVA = (int)12L; + /** + * Address for: * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_YUVA = 12 + * errno_t _set_errno(int _Value) * } */ - public static int MODE_YUVA() { - return MODE_YUVA; + public static MemorySegment _set_errno$address() { + return _set_errno.ADDR; } - private static final int MODE_LAST = (int)13L; + /** * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_LAST = 13 + * errno_t _set_errno(int _Value) * } */ - public static int MODE_LAST() { - return MODE_LAST; + public static int _set_errno(int _Value) { + var mh$ = _set_errno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_set_errno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static class WebPInitDecBufferInternal { + private static class _get_errno { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, - demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPInitDecBufferInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_get_errno"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4919,56 +3933,55 @@ private static class WebPInitDecBufferInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * errno_t _get_errno(int *_Value) * } */ - public static FunctionDescriptor WebPInitDecBufferInternal$descriptor() { - return WebPInitDecBufferInternal.DESC; + public static FunctionDescriptor _get_errno$descriptor() { + return _get_errno.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * errno_t _get_errno(int *_Value) * } */ - public static MethodHandle WebPInitDecBufferInternal$handle() { - return WebPInitDecBufferInternal.HANDLE; + public static MethodHandle _get_errno$handle() { + return _get_errno.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * errno_t _get_errno(int *_Value) * } */ - public static MemorySegment WebPInitDecBufferInternal$address() { - return WebPInitDecBufferInternal.ADDR; + public static MemorySegment _get_errno$address() { + return _get_errno.ADDR; } /** * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) + * errno_t _get_errno(int *_Value) * } */ - public static int WebPInitDecBufferInternal(MemorySegment x0, int x1) { - var mh$ = WebPInitDecBufferInternal.HANDLE; + public static int _get_errno(MemorySegment _Value) { + var mh$ = _get_errno.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPInitDecBufferInternal", x0, x1); + traceDowncall("_get_errno", _Value); } - return (int)mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_Value); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPFreeDecBuffer { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER - ); + private static class __doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPFreeDecBuffer"); + public static final MemorySegment ADDR = demux_h.findOrThrow("__doserrno"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -4976,129 +3989,175 @@ private static class WebPFreeDecBuffer { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * unsigned long *__doserrno() * } */ - public static FunctionDescriptor WebPFreeDecBuffer$descriptor() { - return WebPFreeDecBuffer.DESC; + public static FunctionDescriptor __doserrno$descriptor() { + return __doserrno.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * unsigned long *__doserrno() * } */ - public static MethodHandle WebPFreeDecBuffer$handle() { - return WebPFreeDecBuffer.HANDLE; + public static MethodHandle __doserrno$handle() { + return __doserrno.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * unsigned long *__doserrno() * } */ - public static MemorySegment WebPFreeDecBuffer$address() { - return WebPFreeDecBuffer.ADDR; + public static MemorySegment __doserrno$address() { + return __doserrno.ADDR; } /** * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) + * unsigned long *__doserrno() * } */ - public static void WebPFreeDecBuffer(MemorySegment buffer) { - var mh$ = WebPFreeDecBuffer.HANDLE; + public static MemorySegment __doserrno() { + var mh$ = __doserrno.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPFreeDecBuffer", buffer); + traceDowncall("__doserrno"); } - mh$.invokeExact(buffer); + return (MemorySegment)mh$.invokeExact(); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static final int VP8_STATUS_OK = (int)0L; + + private static class _set_doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_set_doserrno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_OK = 0 + * errno_t _set_doserrno(unsigned long _Value) * } */ - public static int VP8_STATUS_OK() { - return VP8_STATUS_OK; + public static FunctionDescriptor _set_doserrno$descriptor() { + return _set_doserrno.DESC; } - private static final int VP8_STATUS_OUT_OF_MEMORY = (int)1L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_OUT_OF_MEMORY = 1 + * errno_t _set_doserrno(unsigned long _Value) * } */ - public static int VP8_STATUS_OUT_OF_MEMORY() { - return VP8_STATUS_OUT_OF_MEMORY; + public static MethodHandle _set_doserrno$handle() { + return _set_doserrno.HANDLE; } - private static final int VP8_STATUS_INVALID_PARAM = (int)2L; + /** + * Address for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_INVALID_PARAM = 2 + * errno_t _set_doserrno(unsigned long _Value) * } */ - public static int VP8_STATUS_INVALID_PARAM() { - return VP8_STATUS_INVALID_PARAM; + public static MemorySegment _set_doserrno$address() { + return _set_doserrno.ADDR; } - private static final int VP8_STATUS_BITSTREAM_ERROR = (int)3L; + /** * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_BITSTREAM_ERROR = 3 + * errno_t _set_doserrno(unsigned long _Value) * } */ - public static int VP8_STATUS_BITSTREAM_ERROR() { - return VP8_STATUS_BITSTREAM_ERROR; + public static int _set_doserrno(int _Value) { + var mh$ = _set_doserrno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_set_doserrno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int VP8_STATUS_UNSUPPORTED_FEATURE = (int)4L; + + private static class _get_doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_get_doserrno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_UNSUPPORTED_FEATURE = 4 + * errno_t _get_doserrno(unsigned long *_Value) * } */ - public static int VP8_STATUS_UNSUPPORTED_FEATURE() { - return VP8_STATUS_UNSUPPORTED_FEATURE; + public static FunctionDescriptor _get_doserrno$descriptor() { + return _get_doserrno.DESC; } - private static final int VP8_STATUS_SUSPENDED = (int)5L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_SUSPENDED = 5 + * errno_t _get_doserrno(unsigned long *_Value) * } */ - public static int VP8_STATUS_SUSPENDED() { - return VP8_STATUS_SUSPENDED; + public static MethodHandle _get_doserrno$handle() { + return _get_doserrno.HANDLE; } - private static final int VP8_STATUS_USER_ABORT = (int)6L; + /** + * Address for: * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_USER_ABORT = 6 + * errno_t _get_doserrno(unsigned long *_Value) * } */ - public static int VP8_STATUS_USER_ABORT() { - return VP8_STATUS_USER_ABORT; + public static MemorySegment _get_doserrno$address() { + return _get_doserrno.ADDR; } - private static final int VP8_STATUS_NOT_ENOUGH_DATA = (int)7L; + /** * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_NOT_ENOUGH_DATA = 7 + * errno_t _get_doserrno(unsigned long *_Value) * } */ - public static int VP8_STATUS_NOT_ENOUGH_DATA() { - return VP8_STATUS_NOT_ENOUGH_DATA; + public static int _get_doserrno(MemorySegment _Value) { + var mh$ = _get_doserrno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_get_doserrno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static class WebPINewDecoder { + private static class memchr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewDecoder"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memchr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5106,60 +4165,59 @@ private static class WebPINewDecoder { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) * } */ - public static FunctionDescriptor WebPINewDecoder$descriptor() { - return WebPINewDecoder.DESC; + public static FunctionDescriptor memchr$descriptor() { + return memchr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) * } */ - public static MethodHandle WebPINewDecoder$handle() { - return WebPINewDecoder.HANDLE; + public static MethodHandle memchr$handle() { + return memchr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) * } */ - public static MemorySegment WebPINewDecoder$address() { - return WebPINewDecoder.ADDR; + public static MemorySegment memchr$address() { + return memchr.ADDR; } /** * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) * } */ - public static MemorySegment WebPINewDecoder(MemorySegment output_buffer) { - var mh$ = WebPINewDecoder.HANDLE; + public static MemorySegment memchr(MemorySegment _Buf, int _Val, long _MaxCount) { + var mh$ = memchr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewDecoder", output_buffer); + traceDowncall("memchr", _Buf, _Val, _MaxCount); } - return (MemorySegment)mh$.invokeExact(output_buffer); + return (MemorySegment)mh$.invokeExact(_Buf, _Val, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPINewRGB { + private static class memcmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewRGB"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memcmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5167,68 +4225,59 @@ private static class WebPINewRGB { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static FunctionDescriptor WebPINewRGB$descriptor() { - return WebPINewRGB.DESC; + public static FunctionDescriptor memcmp$descriptor() { + return memcmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MethodHandle WebPINewRGB$handle() { - return WebPINewRGB.HANDLE; + public static MethodHandle memcmp$handle() { + return memcmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MemorySegment WebPINewRGB$address() { - return WebPINewRGB.ADDR; + public static MemorySegment memcmp$address() { + return memcmp.ADDR; } /** * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MemorySegment WebPINewRGB(int csp, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPINewRGB.HANDLE; + public static int memcmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = memcmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewRGB", csp, output_buffer, output_buffer_size, output_stride); + traceDowncall("memcmp", _Buf1, _Buf2, _Size); } - return (MemorySegment)mh$.invokeExact(csp, output_buffer, output_buffer_size, output_stride); + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPINewYUVA { + private static class memcpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewYUVA"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memcpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5236,65 +4285,59 @@ private static class WebPINewYUVA { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) * } */ - public static FunctionDescriptor WebPINewYUVA$descriptor() { - return WebPINewYUVA.DESC; + public static FunctionDescriptor memcpy$descriptor() { + return memcpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MethodHandle WebPINewYUVA$handle() { - return WebPINewYUVA.HANDLE; + public static MethodHandle memcpy$handle() { + return memcpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MemorySegment WebPINewYUVA$address() { - return WebPINewYUVA.ADDR; + public static MemorySegment memcpy$address() { + return memcpy.ADDR; } /** * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MemorySegment WebPINewYUVA(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride, MemorySegment a, long a_size, int a_stride) { - var mh$ = WebPINewYUVA.HANDLE; + public static MemorySegment memcpy(MemorySegment _Dst, MemorySegment _Src, long _Size) { + var mh$ = memcpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewYUVA", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); + traceDowncall("memcpy", _Dst, _Src, _Size); } - return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPINewYUV { + private static class memmove { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPINewYUV"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memmove"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5302,56 +4345,59 @@ private static class WebPINewYUV { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void *memmove(void *_Dst, const void *_Src, size_t _Size) * } */ - public static FunctionDescriptor WebPINewYUV$descriptor() { - return WebPINewYUV.DESC; + public static FunctionDescriptor memmove$descriptor() { + return memmove.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void *memmove(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MethodHandle WebPINewYUV$handle() { - return WebPINewYUV.HANDLE; + public static MethodHandle memmove$handle() { + return memmove.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void *memmove(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MemorySegment WebPINewYUV$address() { - return WebPINewYUV.ADDR; + public static MemorySegment memmove$address() { + return memmove.ADDR; } /** * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) + * void *memmove(void *_Dst, const void *_Src, size_t _Size) * } */ - public static MemorySegment WebPINewYUV(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { - var mh$ = WebPINewYUV.HANDLE; + public static MemorySegment memmove(MemorySegment _Dst, MemorySegment _Src, long _Size) { + var mh$ = memmove.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewYUV", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + traceDowncall("memmove", _Dst, _Src, _Size); } - return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIDelete { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER + private static class memset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDelete"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5359,59 +4405,58 @@ private static class WebPIDelete { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) + * void *memset(void *_Dst, int _Val, size_t _Size) * } */ - public static FunctionDescriptor WebPIDelete$descriptor() { - return WebPIDelete.DESC; + public static FunctionDescriptor memset$descriptor() { + return memset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) + * void *memset(void *_Dst, int _Val, size_t _Size) * } */ - public static MethodHandle WebPIDelete$handle() { - return WebPIDelete.HANDLE; + public static MethodHandle memset$handle() { + return memset.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) + * void *memset(void *_Dst, int _Val, size_t _Size) * } */ - public static MemorySegment WebPIDelete$address() { - return WebPIDelete.ADDR; + public static MemorySegment memset$address() { + return memset.ADDR; } /** * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) + * void *memset(void *_Dst, int _Val, size_t _Size) * } */ - public static void WebPIDelete(MemorySegment idec) { - var mh$ = WebPIDelete.HANDLE; + public static MemorySegment memset(MemorySegment _Dst, int _Val, long _Size) { + var mh$ = memset.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDelete", idec); + traceDowncall("memset", _Dst, _Val, _Size); } - mh$.invokeExact(idec); + return (MemorySegment)mh$.invokeExact(_Dst, _Val, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIAppend { + private static class strchr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIAppend"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strchr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5419,59 +4464,58 @@ private static class WebPIAppend { /** * Function descriptor for: * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strchr(const char *_Str, int _Val) * } */ - public static FunctionDescriptor WebPIAppend$descriptor() { - return WebPIAppend.DESC; + public static FunctionDescriptor strchr$descriptor() { + return strchr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strchr(const char *_Str, int _Val) * } */ - public static MethodHandle WebPIAppend$handle() { - return WebPIAppend.HANDLE; + public static MethodHandle strchr$handle() { + return strchr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strchr(const char *_Str, int _Val) * } */ - public static MemorySegment WebPIAppend$address() { - return WebPIAppend.ADDR; + public static MemorySegment strchr$address() { + return strchr.ADDR; } /** * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strchr(const char *_Str, int _Val) * } */ - public static int WebPIAppend(MemorySegment idec, MemorySegment data, long data_size) { - var mh$ = WebPIAppend.HANDLE; + public static MemorySegment strchr(MemorySegment _Str, int _Val) { + var mh$ = strchr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIAppend", idec, data, data_size); + traceDowncall("strchr", _Str, _Val); } - return (int)mh$.invokeExact(idec, data, data_size); + return (MemorySegment)mh$.invokeExact(_Str, _Val); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIUpdate { + private static class strrchr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIUpdate"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strrchr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5479,61 +4523,58 @@ private static class WebPIUpdate { /** * Function descriptor for: * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strrchr(const char *_Str, int _Ch) * } */ - public static FunctionDescriptor WebPIUpdate$descriptor() { - return WebPIUpdate.DESC; + public static FunctionDescriptor strrchr$descriptor() { + return strrchr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strrchr(const char *_Str, int _Ch) * } */ - public static MethodHandle WebPIUpdate$handle() { - return WebPIUpdate.HANDLE; + public static MethodHandle strrchr$handle() { + return strrchr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strrchr(const char *_Str, int _Ch) * } */ - public static MemorySegment WebPIUpdate$address() { - return WebPIUpdate.ADDR; + public static MemorySegment strrchr$address() { + return strrchr.ADDR; } /** * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) + * char *strrchr(const char *_Str, int _Ch) * } */ - public static int WebPIUpdate(MemorySegment idec, MemorySegment data, long data_size) { - var mh$ = WebPIUpdate.HANDLE; + public static MemorySegment strrchr(MemorySegment _Str, int _Ch) { + var mh$ = strrchr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIUpdate", idec, data, data_size); + traceDowncall("strrchr", _Str, _Ch); } - return (int)mh$.invokeExact(idec, data, data_size); + return (MemorySegment)mh$.invokeExact(_Str, _Ch); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIDecGetRGB { + private static class strstr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecGetRGB"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strstr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5541,66 +4582,58 @@ private static class WebPIDecGetRGB { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * char *strstr(const char *_Str, const char *_SubStr) * } */ - public static FunctionDescriptor WebPIDecGetRGB$descriptor() { - return WebPIDecGetRGB.DESC; + public static FunctionDescriptor strstr$descriptor() { + return strstr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * char *strstr(const char *_Str, const char *_SubStr) * } */ - public static MethodHandle WebPIDecGetRGB$handle() { - return WebPIDecGetRGB.HANDLE; + public static MethodHandle strstr$handle() { + return strstr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * char *strstr(const char *_Str, const char *_SubStr) * } */ - public static MemorySegment WebPIDecGetRGB$address() { - return WebPIDecGetRGB.ADDR; + public static MemorySegment strstr$address() { + return strstr.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) + * char *strstr(const char *_Str, const char *_SubStr) * } */ - public static MemorySegment WebPIDecGetRGB(MemorySegment idec, MemorySegment last_y, MemorySegment width, MemorySegment height, MemorySegment stride) { - var mh$ = WebPIDecGetRGB.HANDLE; + public static MemorySegment strstr(MemorySegment _Str, MemorySegment _SubStr) { + var mh$ = strstr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecGetRGB", idec, last_y, width, height, stride); + traceDowncall("strstr", _Str, _SubStr); } - return (MemorySegment)mh$.invokeExact(idec, last_y, width, height, stride); + return (MemorySegment)mh$.invokeExact(_Str, _SubStr); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIDecGetYUVA { + private static class wcschr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_SHORT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecGetYUVA"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcschr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5608,61 +4641,58 @@ private static class WebPIDecGetYUVA { /** * Function descriptor for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static FunctionDescriptor WebPIDecGetYUVA$descriptor() { - return WebPIDecGetYUVA.DESC; + public static FunctionDescriptor wcschr$descriptor() { + return wcschr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MethodHandle WebPIDecGetYUVA$handle() { - return WebPIDecGetYUVA.HANDLE; + public static MethodHandle wcschr$handle() { + return wcschr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MemorySegment WebPIDecGetYUVA$address() { - return WebPIDecGetYUVA.ADDR; + public static MemorySegment wcschr$address() { + return wcschr.ADDR; } /** * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MemorySegment WebPIDecGetYUVA(MemorySegment idec, MemorySegment last_y, MemorySegment u, MemorySegment v, MemorySegment a, MemorySegment width, MemorySegment height, MemorySegment stride, MemorySegment uv_stride, MemorySegment a_stride) { - var mh$ = WebPIDecGetYUVA.HANDLE; + public static MemorySegment wcschr(MemorySegment _Str, short _Ch) { + var mh$ = wcschr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecGetYUVA", idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); + traceDowncall("wcschr", _Str, _Ch); } - return (MemorySegment)mh$.invokeExact(idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); + return (MemorySegment)mh$.invokeExact(_Str, _Ch); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIDecodedArea { + private static class wcsrchr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_SHORT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecodedArea"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsrchr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5670,60 +4700,58 @@ private static class WebPIDecodedArea { /** * Function descriptor for: * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static FunctionDescriptor WebPIDecodedArea$descriptor() { - return WebPIDecodedArea.DESC; + public static FunctionDescriptor wcsrchr$descriptor() { + return wcsrchr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MethodHandle WebPIDecodedArea$handle() { - return WebPIDecodedArea.HANDLE; + public static MethodHandle wcsrchr$handle() { + return wcsrchr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MemorySegment WebPIDecodedArea$address() { - return WebPIDecodedArea.ADDR; + public static MemorySegment wcsrchr$address() { + return wcsrchr.ADDR; } /** * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) * } */ - public static MemorySegment WebPIDecodedArea(MemorySegment idec, MemorySegment left, MemorySegment top, MemorySegment width, MemorySegment height) { - var mh$ = WebPIDecodedArea.HANDLE; + public static MemorySegment wcsrchr(MemorySegment _Str, short _Ch) { + var mh$ = wcsrchr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecodedArea", idec, left, top, width, height); + traceDowncall("wcsrchr", _Str, _Ch); } - return (MemorySegment)mh$.invokeExact(idec, left, top, width, height); + return (MemorySegment)mh$.invokeExact(_Str, _Ch); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPGetFeaturesInternal { + private static class wcsstr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetFeaturesInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsstr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5731,58 +4759,59 @@ private static class WebPGetFeaturesInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) * } */ - public static FunctionDescriptor WebPGetFeaturesInternal$descriptor() { - return WebPGetFeaturesInternal.DESC; + public static FunctionDescriptor wcsstr$descriptor() { + return wcsstr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) * } */ - public static MethodHandle WebPGetFeaturesInternal$handle() { - return WebPGetFeaturesInternal.HANDLE; + public static MethodHandle wcsstr$handle() { + return wcsstr.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) * } */ - public static MemorySegment WebPGetFeaturesInternal$address() { - return WebPGetFeaturesInternal.ADDR; + public static MemorySegment wcsstr$address() { + return wcsstr.ADDR; } /** * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) * } */ - public static int WebPGetFeaturesInternal(MemorySegment x0, long x1, MemorySegment x2, int x3) { - var mh$ = WebPGetFeaturesInternal.HANDLE; + public static MemorySegment wcsstr(MemorySegment _Str, MemorySegment _SubStr) { + var mh$ = wcsstr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetFeaturesInternal", x0, x1, x2, x3); + traceDowncall("wcsstr", _Str, _SubStr); } - return (int)mh$.invokeExact(x0, x1, x2, x3); + return (MemorySegment)mh$.invokeExact(_Str, _SubStr); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPInitDecoderConfigInternal { + private static class _memicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPInitDecoderConfigInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_memicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5790,59 +4819,60 @@ private static class WebPInitDecoderConfigInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static FunctionDescriptor WebPInitDecoderConfigInternal$descriptor() { - return WebPInitDecoderConfigInternal.DESC; + public static FunctionDescriptor _memicmp$descriptor() { + return _memicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MethodHandle WebPInitDecoderConfigInternal$handle() { - return WebPInitDecoderConfigInternal.HANDLE; + public static MethodHandle _memicmp$handle() { + return _memicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MemorySegment WebPInitDecoderConfigInternal$address() { - return WebPInitDecoderConfigInternal.ADDR; + public static MemorySegment _memicmp$address() { + return _memicmp.ADDR; } /** * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static int WebPInitDecoderConfigInternal(MemorySegment x0, int x1) { - var mh$ = WebPInitDecoderConfigInternal.HANDLE; + public static int _memicmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = _memicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPInitDecoderConfigInternal", x0, x1); + traceDowncall("_memicmp", _Buf1, _Buf2, _Size); } - return (int)mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPIDecode { + private static class _memicmp_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPIDecode"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_memicmp_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5850,59 +4880,60 @@ private static class WebPIDecode { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) * } */ - public static FunctionDescriptor WebPIDecode$descriptor() { - return WebPIDecode.DESC; + public static FunctionDescriptor _memicmp_l$descriptor() { + return _memicmp_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) * } */ - public static MethodHandle WebPIDecode$handle() { - return WebPIDecode.HANDLE; + public static MethodHandle _memicmp_l$handle() { + return _memicmp_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment WebPIDecode$address() { - return WebPIDecode.ADDR; + public static MemorySegment _memicmp_l$address() { + return _memicmp_l.ADDR; } /** * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment WebPIDecode(MemorySegment data, long data_size, MemorySegment config) { - var mh$ = WebPIDecode.HANDLE; + public static int _memicmp_l(MemorySegment _Buf1, MemorySegment _Buf2, long _Size, MemorySegment _Locale) { + var mh$ = _memicmp_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecode", data, data_size, config); + traceDowncall("_memicmp_l", _Buf1, _Buf2, _Size, _Locale); } - return (MemorySegment)mh$.invokeExact(data, data_size, config); + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDecode { + private static class memccpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDecode"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memccpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5910,59 +4941,59 @@ private static class WebPDecode { /** * Function descriptor for: * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) * } */ - public static FunctionDescriptor WebPDecode$descriptor() { - return WebPDecode.DESC; + public static FunctionDescriptor memccpy$descriptor() { + return memccpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) * } */ - public static MethodHandle WebPDecode$handle() { - return WebPDecode.HANDLE; + public static MethodHandle memccpy$handle() { + return memccpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) * } */ - public static MemorySegment WebPDecode$address() { - return WebPDecode.ADDR; + public static MemorySegment memccpy$address() { + return memccpy.ADDR; } /** * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) * } */ - public static int WebPDecode(MemorySegment data, long data_size, MemorySegment config) { - var mh$ = WebPDecode.HANDLE; + public static MemorySegment memccpy(MemorySegment _Dst, MemorySegment _Src, int _Val, long _Size) { + var mh$ = memccpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecode", data, data_size, config); + traceDowncall("memccpy", _Dst, _Src, _Val, _Size); } - return (int)mh$.invokeExact(data, data_size, config); + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Val, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memchr { + private static class memicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memchr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("memicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -5970,59 +5001,59 @@ private static class memchr { /** * Function descriptor for: * {@snippet lang=c : - * void *memchr(const void *__s, int __c, size_t __n) + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static FunctionDescriptor memchr$descriptor() { - return memchr.DESC; + public static FunctionDescriptor memicmp$descriptor() { + return memicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memchr(const void *__s, int __c, size_t __n) + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MethodHandle memchr$handle() { - return memchr.HANDLE; + public static MethodHandle memicmp$handle() { + return memicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memchr(const void *__s, int __c, size_t __n) + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MemorySegment memchr$address() { - return memchr.ADDR; + public static MemorySegment memicmp$address() { + return memicmp.ADDR; } /** * {@snippet lang=c : - * void *memchr(const void *__s, int __c, size_t __n) + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) * } */ - public static MemorySegment memchr(MemorySegment __s, int __c, long __n) { - var mh$ = memchr.HANDLE; + public static int memicmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = memicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memchr", __s, __c, __n); + traceDowncall("memicmp", _Buf1, _Buf2, _Size); } - return (MemorySegment)mh$.invokeExact(__s, __c, __n); + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memcmp { + private static class wcscat_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memcmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscat_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6030,59 +5061,59 @@ private static class memcmp { /** * Function descriptor for: * {@snippet lang=c : - * int memcmp(const void *__s1, const void *__s2, size_t __n) + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static FunctionDescriptor memcmp$descriptor() { - return memcmp.DESC; + public static FunctionDescriptor wcscat_s$descriptor() { + return wcscat_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int memcmp(const void *__s1, const void *__s2, size_t __n) + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static MethodHandle memcmp$handle() { - return memcmp.HANDLE; + public static MethodHandle wcscat_s$handle() { + return wcscat_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * int memcmp(const void *__s1, const void *__s2, size_t __n) + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static MemorySegment memcmp$address() { - return memcmp.ADDR; + public static MemorySegment wcscat_s$address() { + return wcscat_s.ADDR; } /** * {@snippet lang=c : - * int memcmp(const void *__s1, const void *__s2, size_t __n) + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static int memcmp(MemorySegment __s1, MemorySegment __s2, long __n) { - var mh$ = memcmp.HANDLE; + public static int wcscat_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source) { + var mh$ = wcscat_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memcmp", __s1, __s2, __n); + traceDowncall("wcscat_s", _Destination, _SizeInWords, _Source); } - return (int)mh$.invokeExact(__s1, __s2, __n); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memcpy { + private static class wcscpy_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memcpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscpy_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6090,59 +5121,60 @@ private static class memcpy { /** * Function descriptor for: * {@snippet lang=c : - * void *memcpy(void *__dst, const void *__src, size_t __n) + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static FunctionDescriptor memcpy$descriptor() { - return memcpy.DESC; + public static FunctionDescriptor wcscpy_s$descriptor() { + return wcscpy_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memcpy(void *__dst, const void *__src, size_t __n) + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static MethodHandle memcpy$handle() { - return memcpy.HANDLE; + public static MethodHandle wcscpy_s$handle() { + return wcscpy_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memcpy(void *__dst, const void *__src, size_t __n) + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static MemorySegment memcpy$address() { - return memcpy.ADDR; + public static MemorySegment wcscpy_s$address() { + return wcscpy_s.ADDR; } /** * {@snippet lang=c : - * void *memcpy(void *__dst, const void *__src, size_t __n) + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) * } */ - public static MemorySegment memcpy(MemorySegment __dst, MemorySegment __src, long __n) { - var mh$ = memcpy.HANDLE; + public static int wcscpy_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source) { + var mh$ = wcscpy_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memcpy", __dst, __src, __n); + traceDowncall("wcscpy_s", _Destination, _SizeInWords, _Source); } - return (MemorySegment)mh$.invokeExact(__dst, __src, __n); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memmove { + private static class wcsncat_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memmove"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsncat_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6150,59 +5182,60 @@ private static class memmove { /** * Function descriptor for: * {@snippet lang=c : - * void *memmove(void *__dst, const void *__src, size_t __len) + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static FunctionDescriptor memmove$descriptor() { - return memmove.DESC; + public static FunctionDescriptor wcsncat_s$descriptor() { + return wcsncat_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memmove(void *__dst, const void *__src, size_t __len) + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MethodHandle memmove$handle() { - return memmove.HANDLE; + public static MethodHandle wcsncat_s$handle() { + return wcsncat_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memmove(void *__dst, const void *__src, size_t __len) + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MemorySegment memmove$address() { - return memmove.ADDR; + public static MemorySegment wcsncat_s$address() { + return wcsncat_s.ADDR; } /** * {@snippet lang=c : - * void *memmove(void *__dst, const void *__src, size_t __len) + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MemorySegment memmove(MemorySegment __dst, MemorySegment __src, long __len) { - var mh$ = memmove.HANDLE; + public static int wcsncat_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsncat_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memmove", __dst, __src, __len); + traceDowncall("wcsncat_s", _Destination, _SizeInWords, _Source, _MaxCount); } - return (MemorySegment)mh$.invokeExact(__dst, __src, __len); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memset { + private static class wcsncpy_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER, - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memset"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsncpy_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6210,58 +5243,59 @@ private static class memset { /** * Function descriptor for: * {@snippet lang=c : - * void *memset(void *__b, int __c, size_t __len) + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static FunctionDescriptor memset$descriptor() { - return memset.DESC; + public static FunctionDescriptor wcsncpy_s$descriptor() { + return wcsncpy_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memset(void *__b, int __c, size_t __len) + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MethodHandle memset$handle() { - return memset.HANDLE; + public static MethodHandle wcsncpy_s$handle() { + return wcsncpy_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memset(void *__b, int __c, size_t __len) + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MemorySegment memset$address() { - return memset.ADDR; + public static MemorySegment wcsncpy_s$address() { + return wcsncpy_s.ADDR; } /** * {@snippet lang=c : - * void *memset(void *__b, int __c, size_t __len) + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) * } */ - public static MemorySegment memset(MemorySegment __b, int __c, long __len) { - var mh$ = memset.HANDLE; + public static int wcsncpy_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsncpy_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memset", __b, __c, __len); + traceDowncall("wcsncpy_s", _Destination, _SizeInWords, _Source, _MaxCount); } - return (MemorySegment)mh$.invokeExact(__b, __c, __len); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcat { + private static class wcstok_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcat"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcstok_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6269,58 +5303,57 @@ private static class strcat { /** * Function descriptor for: * {@snippet lang=c : - * char *strcat(char *__s1, const char *__s2) + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static FunctionDescriptor strcat$descriptor() { - return strcat.DESC; + public static FunctionDescriptor wcstok_s$descriptor() { + return wcstok_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strcat(char *__s1, const char *__s2) + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static MethodHandle strcat$handle() { - return strcat.HANDLE; + public static MethodHandle wcstok_s$handle() { + return wcstok_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strcat(char *__s1, const char *__s2) + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static MemorySegment strcat$address() { - return strcat.ADDR; + public static MemorySegment wcstok_s$address() { + return wcstok_s.ADDR; } /** * {@snippet lang=c : - * char *strcat(char *__s1, const char *__s2) + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static MemorySegment strcat(MemorySegment __s1, MemorySegment __s2) { - var mh$ = strcat.HANDLE; + public static MemorySegment wcstok_s(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = wcstok_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcat", __s1, __s2); + traceDowncall("wcstok_s", _String, _Delimiter, _Context); } - return (MemorySegment)mh$.invokeExact(__s1, __s2); + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strchr { + private static class _wcsdup { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strchr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsdup"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6328,58 +5361,58 @@ private static class strchr { /** * Function descriptor for: * {@snippet lang=c : - * char *strchr(const char *__s, int __c) + * wchar_t *_wcsdup(const wchar_t *_String) * } */ - public static FunctionDescriptor strchr$descriptor() { - return strchr.DESC; + public static FunctionDescriptor _wcsdup$descriptor() { + return _wcsdup.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strchr(const char *__s, int __c) + * wchar_t *_wcsdup(const wchar_t *_String) * } */ - public static MethodHandle strchr$handle() { - return strchr.HANDLE; + public static MethodHandle _wcsdup$handle() { + return _wcsdup.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strchr(const char *__s, int __c) + * wchar_t *_wcsdup(const wchar_t *_String) * } */ - public static MemorySegment strchr$address() { - return strchr.ADDR; + public static MemorySegment _wcsdup$address() { + return _wcsdup.ADDR; } /** * {@snippet lang=c : - * char *strchr(const char *__s, int __c) + * wchar_t *_wcsdup(const wchar_t *_String) * } */ - public static MemorySegment strchr(MemorySegment __s, int __c) { - var mh$ = strchr.HANDLE; + public static MemorySegment _wcsdup(MemorySegment _String) { + var mh$ = _wcsdup.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strchr", __s, __c); + traceDowncall("_wcsdup", _String); } - return (MemorySegment)mh$.invokeExact(__s, __c); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcmp { + private static class wcscat { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscat"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6387,58 +5420,58 @@ private static class strcmp { /** * Function descriptor for: * {@snippet lang=c : - * int strcmp(const char *__s1, const char *__s2) + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static FunctionDescriptor strcmp$descriptor() { - return strcmp.DESC; + public static FunctionDescriptor wcscat$descriptor() { + return wcscat.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strcmp(const char *__s1, const char *__s2) + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static MethodHandle strcmp$handle() { - return strcmp.HANDLE; + public static MethodHandle wcscat$handle() { + return wcscat.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strcmp(const char *__s1, const char *__s2) + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static MemorySegment strcmp$address() { - return strcmp.ADDR; + public static MemorySegment wcscat$address() { + return wcscat.ADDR; } /** * {@snippet lang=c : - * int strcmp(const char *__s1, const char *__s2) + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static int strcmp(MemorySegment __s1, MemorySegment __s2) { - var mh$ = strcmp.HANDLE; + public static MemorySegment wcscat(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = wcscat.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcmp", __s1, __s2); + traceDowncall("wcscat", _Destination, _Source); } - return (int)mh$.invokeExact(__s1, __s2); + return (MemorySegment)mh$.invokeExact(_Destination, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcoll { + private static class wcscmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcoll"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6446,58 +5479,58 @@ private static class strcoll { /** * Function descriptor for: * {@snippet lang=c : - * int strcoll(const char *__s1, const char *__s2) + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static FunctionDescriptor strcoll$descriptor() { - return strcoll.DESC; + public static FunctionDescriptor wcscmp$descriptor() { + return wcscmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strcoll(const char *__s1, const char *__s2) + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MethodHandle strcoll$handle() { - return strcoll.HANDLE; + public static MethodHandle wcscmp$handle() { + return wcscmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strcoll(const char *__s1, const char *__s2) + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MemorySegment strcoll$address() { - return strcoll.ADDR; + public static MemorySegment wcscmp$address() { + return wcscmp.ADDR; } /** * {@snippet lang=c : - * int strcoll(const char *__s1, const char *__s2) + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int strcoll(MemorySegment __s1, MemorySegment __s2) { - var mh$ = strcoll.HANDLE; + public static int wcscmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcscmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcoll", __s1, __s2); + traceDowncall("wcscmp", _String1, _String2); } - return (int)mh$.invokeExact(__s1, __s2); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcpy { + private static class wcscpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6505,58 +5538,58 @@ private static class strcpy { /** * Function descriptor for: * {@snippet lang=c : - * char *strcpy(char *__dst, const char *__src) + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static FunctionDescriptor strcpy$descriptor() { - return strcpy.DESC; + public static FunctionDescriptor wcscpy$descriptor() { + return wcscpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strcpy(char *__dst, const char *__src) + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static MethodHandle strcpy$handle() { - return strcpy.HANDLE; + public static MethodHandle wcscpy$handle() { + return wcscpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strcpy(char *__dst, const char *__src) + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static MemorySegment strcpy$address() { - return strcpy.ADDR; + public static MemorySegment wcscpy$address() { + return wcscpy.ADDR; } /** * {@snippet lang=c : - * char *strcpy(char *__dst, const char *__src) + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) * } */ - public static MemorySegment strcpy(MemorySegment __dst, MemorySegment __src) { - var mh$ = strcpy.HANDLE; + public static MemorySegment wcscpy(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = wcscpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcpy", __dst, __src); + traceDowncall("wcscpy", _Destination, _Source); } - return (MemorySegment)mh$.invokeExact(__dst, __src); + return (MemorySegment)mh$.invokeExact(_Destination, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcspn { + private static class wcscspn { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, + demux_h.C_LONG_LONG, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcspn"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscspn"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6564,57 +5597,57 @@ private static class strcspn { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strcspn(const char *__s, const char *__charset) + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static FunctionDescriptor strcspn$descriptor() { - return strcspn.DESC; + public static FunctionDescriptor wcscspn$descriptor() { + return wcscspn.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strcspn(const char *__s, const char *__charset) + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MethodHandle strcspn$handle() { - return strcspn.HANDLE; + public static MethodHandle wcscspn$handle() { + return wcscspn.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strcspn(const char *__s, const char *__charset) + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MemorySegment strcspn$address() { - return strcspn.ADDR; + public static MemorySegment wcscspn$address() { + return wcscspn.ADDR; } /** * {@snippet lang=c : - * unsigned long strcspn(const char *__s, const char *__charset) + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static long strcspn(MemorySegment __s, MemorySegment __charset) { - var mh$ = strcspn.HANDLE; + public static long wcscspn(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcscspn.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcspn", __s, __charset); + traceDowncall("wcscspn", _String, _Control); } - return (long)mh$.invokeExact(__s, __charset); + return (long)mh$.invokeExact(_String, _Control); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strerror { + private static class wcslen { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strerror"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcslen"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6622,57 +5655,58 @@ private static class strerror { /** * Function descriptor for: * {@snippet lang=c : - * char *strerror(int __errnum) + * unsigned long long wcslen(const wchar_t *_String) * } */ - public static FunctionDescriptor strerror$descriptor() { - return strerror.DESC; + public static FunctionDescriptor wcslen$descriptor() { + return wcslen.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strerror(int __errnum) + * unsigned long long wcslen(const wchar_t *_String) * } */ - public static MethodHandle strerror$handle() { - return strerror.HANDLE; + public static MethodHandle wcslen$handle() { + return wcslen.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strerror(int __errnum) + * unsigned long long wcslen(const wchar_t *_String) * } */ - public static MemorySegment strerror$address() { - return strerror.ADDR; + public static MemorySegment wcslen$address() { + return wcslen.ADDR; } /** * {@snippet lang=c : - * char *strerror(int __errnum) + * unsigned long long wcslen(const wchar_t *_String) * } */ - public static MemorySegment strerror(int __errnum) { - var mh$ = strerror.HANDLE; + public static long wcslen(MemorySegment _String) { + var mh$ = wcslen.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strerror", __errnum); + traceDowncall("wcslen", _String); } - return (MemorySegment)mh$.invokeExact(__errnum); + return (long)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strlen { + private static class wcsnlen { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, - demux_h.C_POINTER + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strlen"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsnlen"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6680,59 +5714,59 @@ private static class strlen { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strlen(const char *__s) + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) * } */ - public static FunctionDescriptor strlen$descriptor() { - return strlen.DESC; + public static FunctionDescriptor wcsnlen$descriptor() { + return wcsnlen.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strlen(const char *__s) + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) * } */ - public static MethodHandle strlen$handle() { - return strlen.HANDLE; + public static MethodHandle wcsnlen$handle() { + return wcsnlen.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strlen(const char *__s) + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) * } */ - public static MemorySegment strlen$address() { - return strlen.ADDR; + public static MemorySegment wcsnlen$address() { + return wcsnlen.ADDR; } /** * {@snippet lang=c : - * unsigned long strlen(const char *__s) + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) * } */ - public static long strlen(MemorySegment __s) { - var mh$ = strlen.HANDLE; + public static long wcsnlen(MemorySegment _Source, long _MaxCount) { + var mh$ = wcsnlen.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strlen", __s); + traceDowncall("wcsnlen", _Source, _MaxCount); } - return (long)mh$.invokeExact(__s); + return (long)mh$.invokeExact(_Source, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strncat { + private static class wcsncat { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strncat"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsncat"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6740,59 +5774,59 @@ private static class strncat { /** * Function descriptor for: * {@snippet lang=c : - * char *strncat(char *__s1, const char *__s2, size_t __n) + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static FunctionDescriptor strncat$descriptor() { - return strncat.DESC; + public static FunctionDescriptor wcsncat$descriptor() { + return wcsncat.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strncat(char *__s1, const char *__s2, size_t __n) + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MethodHandle strncat$handle() { - return strncat.HANDLE; + public static MethodHandle wcsncat$handle() { + return wcsncat.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strncat(char *__s1, const char *__s2, size_t __n) + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MemorySegment strncat$address() { - return strncat.ADDR; + public static MemorySegment wcsncat$address() { + return wcsncat.ADDR; } /** * {@snippet lang=c : - * char *strncat(char *__s1, const char *__s2, size_t __n) + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MemorySegment strncat(MemorySegment __s1, MemorySegment __s2, long __n) { - var mh$ = strncat.HANDLE; + public static MemorySegment wcsncat(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = wcsncat.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strncat", __s1, __s2, __n); + traceDowncall("wcsncat", _Destination, _Source, _Count); } - return (MemorySegment)mh$.invokeExact(__s1, __s2, __n); + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strncmp { + private static class wcsncmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strncmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsncmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6800,59 +5834,59 @@ private static class strncmp { /** * Function descriptor for: * {@snippet lang=c : - * int strncmp(const char *__s1, const char *__s2, size_t __n) + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static FunctionDescriptor strncmp$descriptor() { - return strncmp.DESC; + public static FunctionDescriptor wcsncmp$descriptor() { + return wcsncmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strncmp(const char *__s1, const char *__s2, size_t __n) + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MethodHandle strncmp$handle() { - return strncmp.HANDLE; + public static MethodHandle wcsncmp$handle() { + return wcsncmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strncmp(const char *__s1, const char *__s2, size_t __n) + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment strncmp$address() { - return strncmp.ADDR; + public static MemorySegment wcsncmp$address() { + return wcsncmp.ADDR; } /** * {@snippet lang=c : - * int strncmp(const char *__s1, const char *__s2, size_t __n) + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static int strncmp(MemorySegment __s1, MemorySegment __s2, long __n) { - var mh$ = strncmp.HANDLE; + public static int wcsncmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = wcsncmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strncmp", __s1, __s2, __n); + traceDowncall("wcsncmp", _String1, _String2, _MaxCount); } - return (int)mh$.invokeExact(__s1, __s2, __n); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strncpy { + private static class wcsncpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strncpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsncpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6860,58 +5894,58 @@ private static class strncpy { /** * Function descriptor for: * {@snippet lang=c : - * char *strncpy(char *__dst, const char *__src, size_t __n) + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static FunctionDescriptor strncpy$descriptor() { - return strncpy.DESC; + public static FunctionDescriptor wcsncpy$descriptor() { + return wcsncpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strncpy(char *__dst, const char *__src, size_t __n) + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MethodHandle strncpy$handle() { - return strncpy.HANDLE; + public static MethodHandle wcsncpy$handle() { + return wcsncpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strncpy(char *__dst, const char *__src, size_t __n) + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MemorySegment strncpy$address() { - return strncpy.ADDR; + public static MemorySegment wcsncpy$address() { + return wcsncpy.ADDR; } /** * {@snippet lang=c : - * char *strncpy(char *__dst, const char *__src, size_t __n) + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) * } */ - public static MemorySegment strncpy(MemorySegment __dst, MemorySegment __src, long __n) { - var mh$ = strncpy.HANDLE; + public static MemorySegment wcsncpy(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = wcsncpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strncpy", __dst, __src, __n); + traceDowncall("wcsncpy", _Destination, _Source, _Count); } - return (MemorySegment)mh$.invokeExact(__dst, __src, __n); + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strpbrk { + private static class wcspbrk { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strpbrk"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcspbrk"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6919,58 +5953,58 @@ private static class strpbrk { /** * Function descriptor for: * {@snippet lang=c : - * char *strpbrk(const char *__s, const char *__charset) + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) * } */ - public static FunctionDescriptor strpbrk$descriptor() { - return strpbrk.DESC; + public static FunctionDescriptor wcspbrk$descriptor() { + return wcspbrk.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strpbrk(const char *__s, const char *__charset) + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MethodHandle strpbrk$handle() { - return strpbrk.HANDLE; + public static MethodHandle wcspbrk$handle() { + return wcspbrk.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strpbrk(const char *__s, const char *__charset) + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MemorySegment strpbrk$address() { - return strpbrk.ADDR; + public static MemorySegment wcspbrk$address() { + return wcspbrk.ADDR; } /** * {@snippet lang=c : - * char *strpbrk(const char *__s, const char *__charset) + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MemorySegment strpbrk(MemorySegment __s, MemorySegment __charset) { - var mh$ = strpbrk.HANDLE; + public static MemorySegment wcspbrk(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcspbrk.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strpbrk", __s, __charset); + traceDowncall("wcspbrk", _String, _Control); } - return (MemorySegment)mh$.invokeExact(__s, __charset); + return (MemorySegment)mh$.invokeExact(_String, _Control); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strrchr { + private static class wcsspn { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strrchr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsspn"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -6978,58 +6012,59 @@ private static class strrchr { /** * Function descriptor for: * {@snippet lang=c : - * char *strrchr(const char *__s, int __c) + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static FunctionDescriptor strrchr$descriptor() { - return strrchr.DESC; + public static FunctionDescriptor wcsspn$descriptor() { + return wcsspn.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strrchr(const char *__s, int __c) + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MethodHandle strrchr$handle() { - return strrchr.HANDLE; + public static MethodHandle wcsspn$handle() { + return wcsspn.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strrchr(const char *__s, int __c) + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MemorySegment strrchr$address() { - return strrchr.ADDR; + public static MemorySegment wcsspn$address() { + return wcsspn.ADDR; } /** * {@snippet lang=c : - * char *strrchr(const char *__s, int __c) + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) * } */ - public static MemorySegment strrchr(MemorySegment __s, int __c) { - var mh$ = strrchr.HANDLE; + public static long wcsspn(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcsspn.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strrchr", __s, __c); + traceDowncall("wcsspn", _String, _Control); } - return (MemorySegment)mh$.invokeExact(__s, __c); + return (long)mh$.invokeExact(_String, _Control); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strspn { + private static class wcstok { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strspn"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcstok"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7037,58 +6072,57 @@ private static class strspn { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strspn(const char *__s, const char *__charset) + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static FunctionDescriptor strspn$descriptor() { - return strspn.DESC; + public static FunctionDescriptor wcstok$descriptor() { + return wcstok.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strspn(const char *__s, const char *__charset) + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static MethodHandle strspn$handle() { - return strspn.HANDLE; + public static MethodHandle wcstok$handle() { + return wcstok.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strspn(const char *__s, const char *__charset) + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static MemorySegment strspn$address() { - return strspn.ADDR; + public static MemorySegment wcstok$address() { + return wcstok.ADDR; } /** * {@snippet lang=c : - * unsigned long strspn(const char *__s, const char *__charset) + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) * } */ - public static long strspn(MemorySegment __s, MemorySegment __charset) { - var mh$ = strspn.HANDLE; + public static MemorySegment wcstok(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = wcstok.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strspn", __s, __charset); + traceDowncall("wcstok", _String, _Delimiter, _Context); } - return (long)mh$.invokeExact(__s, __charset); + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strstr { + private static class _wcserror { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strstr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcserror"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7096,58 +6130,59 @@ private static class strstr { /** * Function descriptor for: * {@snippet lang=c : - * char *strstr(const char *__big, const char *__little) + * wchar_t *_wcserror(int _ErrorNumber) * } */ - public static FunctionDescriptor strstr$descriptor() { - return strstr.DESC; + public static FunctionDescriptor _wcserror$descriptor() { + return _wcserror.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strstr(const char *__big, const char *__little) + * wchar_t *_wcserror(int _ErrorNumber) * } */ - public static MethodHandle strstr$handle() { - return strstr.HANDLE; + public static MethodHandle _wcserror$handle() { + return _wcserror.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strstr(const char *__big, const char *__little) + * wchar_t *_wcserror(int _ErrorNumber) * } */ - public static MemorySegment strstr$address() { - return strstr.ADDR; + public static MemorySegment _wcserror$address() { + return _wcserror.ADDR; } /** * {@snippet lang=c : - * char *strstr(const char *__big, const char *__little) + * wchar_t *_wcserror(int _ErrorNumber) * } */ - public static MemorySegment strstr(MemorySegment __big, MemorySegment __little) { - var mh$ = strstr.HANDLE; + public static MemorySegment _wcserror(int _ErrorNumber) { + var mh$ = _wcserror.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strstr", __big, __little); + traceDowncall("_wcserror", _ErrorNumber); } - return (MemorySegment)mh$.invokeExact(__big, __little); + return (MemorySegment)mh$.invokeExact(_ErrorNumber); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strtok { + private static class _wcserror_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_LONG_LONG, + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strtok"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcserror_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7155,59 +6190,57 @@ private static class strtok { /** * Function descriptor for: * {@snippet lang=c : - * char *strtok(char *__str, const char *__sep) + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) * } */ - public static FunctionDescriptor strtok$descriptor() { - return strtok.DESC; + public static FunctionDescriptor _wcserror_s$descriptor() { + return _wcserror_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strtok(char *__str, const char *__sep) + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) * } */ - public static MethodHandle strtok$handle() { - return strtok.HANDLE; + public static MethodHandle _wcserror_s$handle() { + return _wcserror_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strtok(char *__str, const char *__sep) + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) * } */ - public static MemorySegment strtok$address() { - return strtok.ADDR; + public static MemorySegment _wcserror_s$address() { + return _wcserror_s.ADDR; } /** * {@snippet lang=c : - * char *strtok(char *__str, const char *__sep) + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) * } */ - public static MemorySegment strtok(MemorySegment __str, MemorySegment __sep) { - var mh$ = strtok.HANDLE; + public static int _wcserror_s(MemorySegment _Buffer, long _SizeInWords, int _ErrorNumber) { + var mh$ = _wcserror_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strtok", __str, __sep); + traceDowncall("_wcserror_s", _Buffer, _SizeInWords, _ErrorNumber); } - return (MemorySegment)mh$.invokeExact(__str, __sep); + return (int)mh$.invokeExact(_Buffer, _SizeInWords, _ErrorNumber); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strxfrm { + private static class __wcserror { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strxfrm"); + public static final MemorySegment ADDR = demux_h.findOrThrow("__wcserror"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7215,59 +6248,59 @@ private static class strxfrm { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strxfrm(char *__s1, const char *__s2, size_t __n) + * wchar_t *__wcserror(const wchar_t *_String) * } */ - public static FunctionDescriptor strxfrm$descriptor() { - return strxfrm.DESC; + public static FunctionDescriptor __wcserror$descriptor() { + return __wcserror.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strxfrm(char *__s1, const char *__s2, size_t __n) + * wchar_t *__wcserror(const wchar_t *_String) * } */ - public static MethodHandle strxfrm$handle() { - return strxfrm.HANDLE; + public static MethodHandle __wcserror$handle() { + return __wcserror.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strxfrm(char *__s1, const char *__s2, size_t __n) + * wchar_t *__wcserror(const wchar_t *_String) * } */ - public static MemorySegment strxfrm$address() { - return strxfrm.ADDR; + public static MemorySegment __wcserror$address() { + return __wcserror.ADDR; } /** * {@snippet lang=c : - * unsigned long strxfrm(char *__s1, const char *__s2, size_t __n) + * wchar_t *__wcserror(const wchar_t *_String) * } */ - public static long strxfrm(MemorySegment __s1, MemorySegment __s2, long __n) { - var mh$ = strxfrm.HANDLE; + public static MemorySegment __wcserror(MemorySegment _String) { + var mh$ = __wcserror.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strxfrm", __s1, __s2, __n); + traceDowncall("__wcserror", _String); } - return (long)mh$.invokeExact(__s1, __s2, __n); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strtok_r { + private static class __wcserror_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strtok_r"); + public static final MemorySegment ADDR = demux_h.findOrThrow("__wcserror_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7275,59 +6308,58 @@ private static class strtok_r { /** * Function descriptor for: * {@snippet lang=c : - * char *strtok_r(char *__str, const char *__sep, char **__lasts) + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) * } */ - public static FunctionDescriptor strtok_r$descriptor() { - return strtok_r.DESC; + public static FunctionDescriptor __wcserror_s$descriptor() { + return __wcserror_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strtok_r(char *__str, const char *__sep, char **__lasts) + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) * } */ - public static MethodHandle strtok_r$handle() { - return strtok_r.HANDLE; + public static MethodHandle __wcserror_s$handle() { + return __wcserror_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strtok_r(char *__str, const char *__sep, char **__lasts) + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) * } */ - public static MemorySegment strtok_r$address() { - return strtok_r.ADDR; + public static MemorySegment __wcserror_s$address() { + return __wcserror_s.ADDR; } /** * {@snippet lang=c : - * char *strtok_r(char *__str, const char *__sep, char **__lasts) + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) * } */ - public static MemorySegment strtok_r(MemorySegment __str, MemorySegment __sep, MemorySegment __lasts) { - var mh$ = strtok_r.HANDLE; + public static int __wcserror_s(MemorySegment _Buffer, long _SizeInWords, MemorySegment _ErrorMessage) { + var mh$ = __wcserror_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strtok_r", __str, __sep, __lasts); + traceDowncall("__wcserror_s", _Buffer, _SizeInWords, _ErrorMessage); } - return (MemorySegment)mh$.invokeExact(__str, __sep, __lasts); + return (int)mh$.invokeExact(_Buffer, _SizeInWords, _ErrorMessage); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strerror_r { + private static class _wcsicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strerror_r"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7335,57 +6367,59 @@ private static class strerror_r { /** * Function descriptor for: * {@snippet lang=c : - * int strerror_r(int __errnum, char *__strerrbuf, size_t __buflen) + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static FunctionDescriptor strerror_r$descriptor() { - return strerror_r.DESC; + public static FunctionDescriptor _wcsicmp$descriptor() { + return _wcsicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strerror_r(int __errnum, char *__strerrbuf, size_t __buflen) + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MethodHandle strerror_r$handle() { - return strerror_r.HANDLE; + public static MethodHandle _wcsicmp$handle() { + return _wcsicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strerror_r(int __errnum, char *__strerrbuf, size_t __buflen) + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MemorySegment strerror_r$address() { - return strerror_r.ADDR; + public static MemorySegment _wcsicmp$address() { + return _wcsicmp.ADDR; } /** * {@snippet lang=c : - * int strerror_r(int __errnum, char *__strerrbuf, size_t __buflen) + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int strerror_r(int __errnum, MemorySegment __strerrbuf, long __buflen) { - var mh$ = strerror_r.HANDLE; + public static int _wcsicmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _wcsicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strerror_r", __errnum, __strerrbuf, __buflen); + traceDowncall("_wcsicmp", _String1, _String2); } - return (int)mh$.invokeExact(__errnum, __strerrbuf, __buflen); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strdup { + private static class _wcsicmp_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strdup"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsicmp_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7393,60 +6427,59 @@ private static class strdup { /** * Function descriptor for: * {@snippet lang=c : - * char *strdup(const char *__s1) + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor strdup$descriptor() { - return strdup.DESC; + public static FunctionDescriptor _wcsicmp_l$descriptor() { + return _wcsicmp_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strdup(const char *__s1) + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MethodHandle strdup$handle() { - return strdup.HANDLE; + public static MethodHandle _wcsicmp_l$handle() { + return _wcsicmp_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strdup(const char *__s1) + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MemorySegment strdup$address() { - return strdup.ADDR; + public static MemorySegment _wcsicmp_l$address() { + return _wcsicmp_l.ADDR; } /** * {@snippet lang=c : - * char *strdup(const char *__s1) + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MemorySegment strdup(MemorySegment __s1) { - var mh$ = strdup.HANDLE; + public static int _wcsicmp_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcsicmp_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strdup", __s1); + traceDowncall("_wcsicmp_l", _String1, _String2, _Locale); } - return (MemorySegment)mh$.invokeExact(__s1); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memccpy { + private static class _wcsnicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memccpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7454,58 +6487,60 @@ private static class memccpy { /** * Function descriptor for: * {@snippet lang=c : - * void *memccpy(void *__dst, const void *__src, int __c, size_t __n) + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static FunctionDescriptor memccpy$descriptor() { - return memccpy.DESC; + public static FunctionDescriptor _wcsnicmp$descriptor() { + return _wcsnicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memccpy(void *__dst, const void *__src, int __c, size_t __n) + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MethodHandle memccpy$handle() { - return memccpy.HANDLE; + public static MethodHandle _wcsnicmp$handle() { + return _wcsnicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memccpy(void *__dst, const void *__src, int __c, size_t __n) + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment memccpy$address() { - return memccpy.ADDR; + public static MemorySegment _wcsnicmp$address() { + return _wcsnicmp.ADDR; } /** * {@snippet lang=c : - * void *memccpy(void *__dst, const void *__src, int __c, size_t __n) + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment memccpy(MemorySegment __dst, MemorySegment __src, int __c, long __n) { - var mh$ = memccpy.HANDLE; + public static int _wcsnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsnicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memccpy", __dst, __src, __c, __n); + traceDowncall("_wcsnicmp", _String1, _String2, _MaxCount); } - return (MemorySegment)mh$.invokeExact(__dst, __src, __c, __n); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class stpcpy { + private static class _wcsnicmp_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("stpcpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnicmp_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7513,59 +6548,60 @@ private static class stpcpy { /** * Function descriptor for: * {@snippet lang=c : - * char *stpcpy(char *__dst, const char *__src) + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static FunctionDescriptor stpcpy$descriptor() { - return stpcpy.DESC; + public static FunctionDescriptor _wcsnicmp_l$descriptor() { + return _wcsnicmp_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *stpcpy(char *__dst, const char *__src) + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MethodHandle stpcpy$handle() { - return stpcpy.HANDLE; + public static MethodHandle _wcsnicmp_l$handle() { + return _wcsnicmp_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *stpcpy(char *__dst, const char *__src) + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment stpcpy$address() { - return stpcpy.ADDR; + public static MemorySegment _wcsnicmp_l$address() { + return _wcsnicmp_l.ADDR; } /** * {@snippet lang=c : - * char *stpcpy(char *__dst, const char *__src) + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment stpcpy(MemorySegment __dst, MemorySegment __src) { - var mh$ = stpcpy.HANDLE; + public static int _wcsnicmp_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsnicmp_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("stpcpy", __dst, __src); + traceDowncall("_wcsnicmp_l", _String1, _String2, _MaxCount, _Locale); } - return (MemorySegment)mh$.invokeExact(__dst, __src); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class stpncpy { + private static class _wcsnset_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG, + demux_h.C_SHORT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("stpncpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnset_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7573,58 +6609,59 @@ private static class stpncpy { /** * Function descriptor for: * {@snippet lang=c : - * char *stpncpy(char *__dst, const char *__src, size_t __n) + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) * } */ - public static FunctionDescriptor stpncpy$descriptor() { - return stpncpy.DESC; + public static FunctionDescriptor _wcsnset_s$descriptor() { + return _wcsnset_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *stpncpy(char *__dst, const char *__src, size_t __n) + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) * } */ - public static MethodHandle stpncpy$handle() { - return stpncpy.HANDLE; + public static MethodHandle _wcsnset_s$handle() { + return _wcsnset_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *stpncpy(char *__dst, const char *__src, size_t __n) + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) * } */ - public static MemorySegment stpncpy$address() { - return stpncpy.ADDR; + public static MemorySegment _wcsnset_s$address() { + return _wcsnset_s.ADDR; } /** * {@snippet lang=c : - * char *stpncpy(char *__dst, const char *__src, size_t __n) + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) * } */ - public static MemorySegment stpncpy(MemorySegment __dst, MemorySegment __src, long __n) { - var mh$ = stpncpy.HANDLE; + public static int _wcsnset_s(MemorySegment _Destination, long _SizeInWords, short _Value, long _MaxCount) { + var mh$ = _wcsnset_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("stpncpy", __dst, __src, __n); + traceDowncall("_wcsnset_s", _Destination, _SizeInWords, _Value, _MaxCount); } - return (MemorySegment)mh$.invokeExact(__dst, __src, __n); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Value, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strndup { + private static class _wcsnset { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_SHORT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strndup"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7632,58 +6669,57 @@ private static class strndup { /** * Function descriptor for: * {@snippet lang=c : - * char *strndup(const char *__s1, size_t __n) + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static FunctionDescriptor strndup$descriptor() { - return strndup.DESC; + public static FunctionDescriptor _wcsnset$descriptor() { + return _wcsnset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strndup(const char *__s1, size_t __n) + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static MethodHandle strndup$handle() { - return strndup.HANDLE; + public static MethodHandle _wcsnset$handle() { + return _wcsnset.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strndup(const char *__s1, size_t __n) + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static MemorySegment strndup$address() { - return strndup.ADDR; + public static MemorySegment _wcsnset$address() { + return _wcsnset.ADDR; } /** * {@snippet lang=c : - * char *strndup(const char *__s1, size_t __n) + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static MemorySegment strndup(MemorySegment __s1, long __n) { - var mh$ = strndup.HANDLE; + public static MemorySegment _wcsnset(MemorySegment _String, short _Value, long _MaxCount) { + var mh$ = _wcsnset.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strndup", __s1, __n); + traceDowncall("_wcsnset", _String, _Value, _MaxCount); } - return (MemorySegment)mh$.invokeExact(__s1, __n); + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strnlen { + private static class _wcsrev { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strnlen"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsrev"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7691,57 +6727,59 @@ private static class strnlen { /** * Function descriptor for: * {@snippet lang=c : - * size_t strnlen(const char *__s1, size_t __n) + * wchar_t *_wcsrev(wchar_t *_String) * } */ - public static FunctionDescriptor strnlen$descriptor() { - return strnlen.DESC; + public static FunctionDescriptor _wcsrev$descriptor() { + return _wcsrev.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * size_t strnlen(const char *__s1, size_t __n) + * wchar_t *_wcsrev(wchar_t *_String) * } */ - public static MethodHandle strnlen$handle() { - return strnlen.HANDLE; + public static MethodHandle _wcsrev$handle() { + return _wcsrev.HANDLE; } /** * Address for: * {@snippet lang=c : - * size_t strnlen(const char *__s1, size_t __n) + * wchar_t *_wcsrev(wchar_t *_String) * } */ - public static MemorySegment strnlen$address() { - return strnlen.ADDR; + public static MemorySegment _wcsrev$address() { + return _wcsrev.ADDR; } /** * {@snippet lang=c : - * size_t strnlen(const char *__s1, size_t __n) + * wchar_t *_wcsrev(wchar_t *_String) * } */ - public static long strnlen(MemorySegment __s1, long __n) { - var mh$ = strnlen.HANDLE; + public static MemorySegment _wcsrev(MemorySegment _String) { + var mh$ = _wcsrev.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strnlen", __s1, __n); + traceDowncall("_wcsrev", _String); } - return (long)mh$.invokeExact(__s1, __n); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strsignal { + private static class _wcsset_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_LONG_LONG, + demux_h.C_SHORT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strsignal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsset_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7749,72 +6787,58 @@ private static class strsignal { /** * Function descriptor for: * {@snippet lang=c : - * char *strsignal(int __sig) + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) * } */ - public static FunctionDescriptor strsignal$descriptor() { - return strsignal.DESC; + public static FunctionDescriptor _wcsset_s$descriptor() { + return _wcsset_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strsignal(int __sig) + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) * } */ - public static MethodHandle strsignal$handle() { - return strsignal.HANDLE; + public static MethodHandle _wcsset_s$handle() { + return _wcsset_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strsignal(int __sig) + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) * } */ - public static MemorySegment strsignal$address() { - return strsignal.ADDR; + public static MemorySegment _wcsset_s$address() { + return _wcsset_s.ADDR; } /** * {@snippet lang=c : - * char *strsignal(int __sig) + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) * } */ - public static MemorySegment strsignal(int __sig) { - var mh$ = strsignal.HANDLE; + public static int _wcsset_s(MemorySegment _Destination, long _SizeInWords, short _Value) { + var mh$ = _wcsset_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strsignal", __sig); + traceDowncall("_wcsset_s", _Destination, _SizeInWords, _Value); } - return (MemorySegment)mh$.invokeExact(__sig); + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Value); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - /** - * {@snippet lang=c : - * typedef __darwin_size_t rsize_t - * } - */ - public static final OfLong rsize_t = demux_h.C_LONG; - /** - * {@snippet lang=c : - * typedef int errno_t - * } - */ - public static final OfInt errno_t = demux_h.C_INT; - private static class memset_s { + private static class _wcsset { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_SHORT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memset_s"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7822,66 +6846,58 @@ private static class memset_s { /** * Function descriptor for: * {@snippet lang=c : - * errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static FunctionDescriptor memset_s$descriptor() { - return memset_s.DESC; + public static FunctionDescriptor _wcsset$descriptor() { + return _wcsset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static MethodHandle memset_s$handle() { - return memset_s.HANDLE; + public static MethodHandle _wcsset$handle() { + return _wcsset.HANDLE; } /** * Address for: * {@snippet lang=c : - * errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static MemorySegment memset_s$address() { - return memset_s.ADDR; + public static MemorySegment _wcsset$address() { + return _wcsset.ADDR; } /** * {@snippet lang=c : - * errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static int memset_s(MemorySegment __s, long __smax, int __c, long __n) { - var mh$ = memset_s.HANDLE; + public static MemorySegment _wcsset(MemorySegment _String, short _Value) { + var mh$ = _wcsset.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memset_s", __s, __smax, __c, __n); + traceDowncall("_wcsset", _String, _Value); } - return (int)mh$.invokeExact(__s, __smax, __c, __n); + return (MemorySegment)mh$.invokeExact(_String, _Value); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - /** - * {@snippet lang=c : - * typedef __darwin_ssize_t ssize_t - * } - */ - public static final OfLong ssize_t = demux_h.C_LONG; - private static class memmem { + private static class _wcslwr_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memmem"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcslwr_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7889,58 +6905,57 @@ private static class memmem { /** * Function descriptor for: * {@snippet lang=c : - * void *memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) * } */ - public static FunctionDescriptor memmem$descriptor() { - return memmem.DESC; + public static FunctionDescriptor _wcslwr_s$descriptor() { + return _wcslwr_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void *memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) * } */ - public static MethodHandle memmem$handle() { - return memmem.HANDLE; + public static MethodHandle _wcslwr_s$handle() { + return _wcslwr_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * void *memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) * } */ - public static MemorySegment memmem$address() { - return memmem.ADDR; + public static MemorySegment _wcslwr_s$address() { + return _wcslwr_s.ADDR; } /** * {@snippet lang=c : - * void *memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) * } */ - public static MemorySegment memmem(MemorySegment __big, long __big_len, MemorySegment __little, long __little_len) { - var mh$ = memmem.HANDLE; + public static int _wcslwr_s(MemorySegment _String, long _SizeInWords) { + var mh$ = _wcslwr_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memmem", __big, __big_len, __little, __little_len); + traceDowncall("_wcslwr_s", _String, _SizeInWords); } - return (MemorySegment)mh$.invokeExact(__big, __big_len, __little, __little_len); + return (int)mh$.invokeExact(_String, _SizeInWords); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memset_pattern4 { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER, + private static class _wcslwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memset_pattern4"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcslwr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -7948,58 +6963,59 @@ private static class memset_pattern4 { /** * Function descriptor for: * {@snippet lang=c : - * void memset_pattern4(void *__b, const void *__pattern4, size_t __len) + * wchar_t *_wcslwr(wchar_t *_String) * } */ - public static FunctionDescriptor memset_pattern4$descriptor() { - return memset_pattern4.DESC; + public static FunctionDescriptor _wcslwr$descriptor() { + return _wcslwr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void memset_pattern4(void *__b, const void *__pattern4, size_t __len) + * wchar_t *_wcslwr(wchar_t *_String) * } */ - public static MethodHandle memset_pattern4$handle() { - return memset_pattern4.HANDLE; + public static MethodHandle _wcslwr$handle() { + return _wcslwr.HANDLE; } /** * Address for: * {@snippet lang=c : - * void memset_pattern4(void *__b, const void *__pattern4, size_t __len) + * wchar_t *_wcslwr(wchar_t *_String) * } */ - public static MemorySegment memset_pattern4$address() { - return memset_pattern4.ADDR; + public static MemorySegment _wcslwr$address() { + return _wcslwr.ADDR; } /** * {@snippet lang=c : - * void memset_pattern4(void *__b, const void *__pattern4, size_t __len) + * wchar_t *_wcslwr(wchar_t *_String) * } */ - public static void memset_pattern4(MemorySegment __b, MemorySegment __pattern4, long __len) { - var mh$ = memset_pattern4.HANDLE; + public static MemorySegment _wcslwr(MemorySegment _String) { + var mh$ = _wcslwr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memset_pattern4", __b, __pattern4, __len); + traceDowncall("_wcslwr", _String); } - mh$.invokeExact(__b, __pattern4, __len); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memset_pattern8 { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER, + private static class _wcslwr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memset_pattern8"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcslwr_s_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8007,58 +7023,58 @@ private static class memset_pattern8 { /** * Function descriptor for: * {@snippet lang=c : - * void memset_pattern8(void *__b, const void *__pattern8, size_t __len) + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) * } */ - public static FunctionDescriptor memset_pattern8$descriptor() { - return memset_pattern8.DESC; + public static FunctionDescriptor _wcslwr_s_l$descriptor() { + return _wcslwr_s_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void memset_pattern8(void *__b, const void *__pattern8, size_t __len) + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) * } */ - public static MethodHandle memset_pattern8$handle() { - return memset_pattern8.HANDLE; + public static MethodHandle _wcslwr_s_l$handle() { + return _wcslwr_s_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * void memset_pattern8(void *__b, const void *__pattern8, size_t __len) + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) * } */ - public static MemorySegment memset_pattern8$address() { - return memset_pattern8.ADDR; + public static MemorySegment _wcslwr_s_l$address() { + return _wcslwr_s_l.ADDR; } /** * {@snippet lang=c : - * void memset_pattern8(void *__b, const void *__pattern8, size_t __len) + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) * } */ - public static void memset_pattern8(MemorySegment __b, MemorySegment __pattern8, long __len) { - var mh$ = memset_pattern8.HANDLE; + public static int _wcslwr_s_l(MemorySegment _String, long _SizeInWords, MemorySegment _Locale) { + var mh$ = _wcslwr_s_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memset_pattern8", __b, __pattern8, __len); + traceDowncall("_wcslwr_s_l", _String, _SizeInWords, _Locale); } - mh$.invokeExact(__b, __pattern8, __len); + return (int)mh$.invokeExact(_String, _SizeInWords, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class memset_pattern16 { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _wcslwr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("memset_pattern16"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcslwr_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8066,58 +7082,58 @@ private static class memset_pattern16 { /** * Function descriptor for: * {@snippet lang=c : - * void memset_pattern16(void *__b, const void *__pattern16, size_t __len) + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static FunctionDescriptor memset_pattern16$descriptor() { - return memset_pattern16.DESC; + public static FunctionDescriptor _wcslwr_l$descriptor() { + return _wcslwr_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void memset_pattern16(void *__b, const void *__pattern16, size_t __len) + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static MethodHandle memset_pattern16$handle() { - return memset_pattern16.HANDLE; + public static MethodHandle _wcslwr_l$handle() { + return _wcslwr_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * void memset_pattern16(void *__b, const void *__pattern16, size_t __len) + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static MemorySegment memset_pattern16$address() { - return memset_pattern16.ADDR; + public static MemorySegment _wcslwr_l$address() { + return _wcslwr_l.ADDR; } /** * {@snippet lang=c : - * void memset_pattern16(void *__b, const void *__pattern16, size_t __len) + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static void memset_pattern16(MemorySegment __b, MemorySegment __pattern16, long __len) { - var mh$ = memset_pattern16.HANDLE; + public static MemorySegment _wcslwr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _wcslwr_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("memset_pattern16", __b, __pattern16, __len); + traceDowncall("_wcslwr_l", _String, _Locale); } - mh$.invokeExact(__b, __pattern16, __len); + return (MemorySegment)mh$.invokeExact(_String, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcasestr { + private static class _wcsupr_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcasestr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsupr_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8125,59 +7141,57 @@ private static class strcasestr { /** * Function descriptor for: * {@snippet lang=c : - * char *strcasestr(const char *__big, const char *__little) + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) * } */ - public static FunctionDescriptor strcasestr$descriptor() { - return strcasestr.DESC; + public static FunctionDescriptor _wcsupr_s$descriptor() { + return _wcsupr_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strcasestr(const char *__big, const char *__little) + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) * } */ - public static MethodHandle strcasestr$handle() { - return strcasestr.HANDLE; + public static MethodHandle _wcsupr_s$handle() { + return _wcsupr_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strcasestr(const char *__big, const char *__little) + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) * } */ - public static MemorySegment strcasestr$address() { - return strcasestr.ADDR; + public static MemorySegment _wcsupr_s$address() { + return _wcsupr_s.ADDR; } /** * {@snippet lang=c : - * char *strcasestr(const char *__big, const char *__little) + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) * } */ - public static MemorySegment strcasestr(MemorySegment __big, MemorySegment __little) { - var mh$ = strcasestr.HANDLE; + public static int _wcsupr_s(MemorySegment _String, long _Size) { + var mh$ = _wcsupr_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcasestr", __big, __little); + traceDowncall("_wcsupr_s", _String, _Size); } - return (MemorySegment)mh$.invokeExact(__big, __little); + return (int)mh$.invokeExact(_String, _Size); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strnstr { + private static class _wcsupr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strnstr"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsupr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8185,59 +7199,59 @@ private static class strnstr { /** * Function descriptor for: * {@snippet lang=c : - * char *strnstr(const char *__big, const char *__little, size_t __len) + * wchar_t *_wcsupr(wchar_t *_String) * } */ - public static FunctionDescriptor strnstr$descriptor() { - return strnstr.DESC; + public static FunctionDescriptor _wcsupr$descriptor() { + return _wcsupr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strnstr(const char *__big, const char *__little, size_t __len) + * wchar_t *_wcsupr(wchar_t *_String) * } */ - public static MethodHandle strnstr$handle() { - return strnstr.HANDLE; + public static MethodHandle _wcsupr$handle() { + return _wcsupr.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strnstr(const char *__big, const char *__little, size_t __len) + * wchar_t *_wcsupr(wchar_t *_String) * } */ - public static MemorySegment strnstr$address() { - return strnstr.ADDR; + public static MemorySegment _wcsupr$address() { + return _wcsupr.ADDR; } /** * {@snippet lang=c : - * char *strnstr(const char *__big, const char *__little, size_t __len) + * wchar_t *_wcsupr(wchar_t *_String) * } */ - public static MemorySegment strnstr(MemorySegment __big, MemorySegment __little, long __len) { - var mh$ = strnstr.HANDLE; + public static MemorySegment _wcsupr(MemorySegment _String) { + var mh$ = _wcsupr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strnstr", __big, __little, __len); + traceDowncall("_wcsupr", _String); } - return (MemorySegment)mh$.invokeExact(__big, __little, __len); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strlcat { + private static class _wcsupr_s_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, - demux_h.C_POINTER, + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strlcat"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsupr_s_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8245,59 +7259,58 @@ private static class strlcat { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strlcat(char *__dst, const char *__source, size_t __size) + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) * } */ - public static FunctionDescriptor strlcat$descriptor() { - return strlcat.DESC; + public static FunctionDescriptor _wcsupr_s_l$descriptor() { + return _wcsupr_s_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strlcat(char *__dst, const char *__source, size_t __size) + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) * } */ - public static MethodHandle strlcat$handle() { - return strlcat.HANDLE; + public static MethodHandle _wcsupr_s_l$handle() { + return _wcsupr_s_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strlcat(char *__dst, const char *__source, size_t __size) + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment strlcat$address() { - return strlcat.ADDR; + public static MemorySegment _wcsupr_s_l$address() { + return _wcsupr_s_l.ADDR; } /** * {@snippet lang=c : - * unsigned long strlcat(char *__dst, const char *__source, size_t __size) + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) * } */ - public static long strlcat(MemorySegment __dst, MemorySegment __source, long __size) { - var mh$ = strlcat.HANDLE; + public static int _wcsupr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _wcsupr_s_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strlcat", __dst, __source, __size); + traceDowncall("_wcsupr_s_l", _String, _Size, _Locale); } - return (long)mh$.invokeExact(__dst, __source, __size); + return (int)mh$.invokeExact(_String, _Size, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strlcpy { + private static class _wcsupr_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_LONG, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strlcpy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsupr_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8305,57 +7318,59 @@ private static class strlcpy { /** * Function descriptor for: * {@snippet lang=c : - * unsigned long strlcpy(char *__dst, const char *__source, size_t __size) + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static FunctionDescriptor strlcpy$descriptor() { - return strlcpy.DESC; + public static FunctionDescriptor _wcsupr_l$descriptor() { + return _wcsupr_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * unsigned long strlcpy(char *__dst, const char *__source, size_t __size) + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static MethodHandle strlcpy$handle() { - return strlcpy.HANDLE; + public static MethodHandle _wcsupr_l$handle() { + return _wcsupr_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * unsigned long strlcpy(char *__dst, const char *__source, size_t __size) + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static MemorySegment strlcpy$address() { - return strlcpy.ADDR; + public static MemorySegment _wcsupr_l$address() { + return _wcsupr_l.ADDR; } /** * {@snippet lang=c : - * unsigned long strlcpy(char *__dst, const char *__source, size_t __size) + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) * } */ - public static long strlcpy(MemorySegment __dst, MemorySegment __source, long __size) { - var mh$ = strlcpy.HANDLE; + public static MemorySegment _wcsupr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _wcsupr_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strlcpy", __dst, __source, __size); + traceDowncall("_wcsupr_l", _String, _Locale); } - return (long)mh$.invokeExact(__dst, __source, __size); + return (MemorySegment)mh$.invokeExact(_String, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strmode { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_INT, - demux_h.C_POINTER + private static class wcsxfrm { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strmode"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsxfrm"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8363,58 +7378,60 @@ private static class strmode { /** * Function descriptor for: * {@snippet lang=c : - * void strmode(int __mode, char *__bp) + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) * } */ - public static FunctionDescriptor strmode$descriptor() { - return strmode.DESC; + public static FunctionDescriptor wcsxfrm$descriptor() { + return wcsxfrm.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void strmode(int __mode, char *__bp) + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) * } */ - public static MethodHandle strmode$handle() { - return strmode.HANDLE; + public static MethodHandle wcsxfrm$handle() { + return wcsxfrm.HANDLE; } /** * Address for: * {@snippet lang=c : - * void strmode(int __mode, char *__bp) + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) * } */ - public static MemorySegment strmode$address() { - return strmode.ADDR; + public static MemorySegment wcsxfrm$address() { + return wcsxfrm.ADDR; } /** * {@snippet lang=c : - * void strmode(int __mode, char *__bp) + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) * } */ - public static void strmode(int __mode, MemorySegment __bp) { - var mh$ = strmode.HANDLE; + public static long wcsxfrm(MemorySegment _Destination, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsxfrm.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strmode", __mode, __bp); + traceDowncall("wcsxfrm", _Destination, _Source, _MaxCount); } - mh$.invokeExact(__mode, __bp); + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strsep { + private static class _wcsxfrm_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, demux_h.C_POINTER, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strsep"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsxfrm_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8422,58 +7439,58 @@ private static class strsep { /** * Function descriptor for: * {@snippet lang=c : - * char *strsep(char **__stringp, const char *__delim) + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static FunctionDescriptor strsep$descriptor() { - return strsep.DESC; + public static FunctionDescriptor _wcsxfrm_l$descriptor() { + return _wcsxfrm_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *strsep(char **__stringp, const char *__delim) + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MethodHandle strsep$handle() { - return strsep.HANDLE; + public static MethodHandle _wcsxfrm_l$handle() { + return _wcsxfrm_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *strsep(char **__stringp, const char *__delim) + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment strsep$address() { - return strsep.ADDR; + public static MemorySegment _wcsxfrm_l$address() { + return _wcsxfrm_l.ADDR; } /** * {@snippet lang=c : - * char *strsep(char **__stringp, const char *__delim) + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment strsep(MemorySegment __stringp, MemorySegment __delim) { - var mh$ = strsep.HANDLE; + public static long _wcsxfrm_l(MemorySegment _Destination, MemorySegment _Source, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsxfrm_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strsep", __stringp, __delim); + traceDowncall("_wcsxfrm_l", _Destination, _Source, _MaxCount, _Locale); } - return (MemorySegment)mh$.invokeExact(__stringp, __delim); + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class swab { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER, + private static class wcscoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("swab"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcscoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8481,59 +7498,59 @@ private static class swab { /** * Function descriptor for: * {@snippet lang=c : - * void swab(const void *restrict, void *restrict, ssize_t) + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static FunctionDescriptor swab$descriptor() { - return swab.DESC; + public static FunctionDescriptor wcscoll$descriptor() { + return wcscoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void swab(const void *restrict, void *restrict, ssize_t) + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MethodHandle swab$handle() { - return swab.HANDLE; + public static MethodHandle wcscoll$handle() { + return wcscoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * void swab(const void *restrict, void *restrict, ssize_t) + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MemorySegment swab$address() { - return swab.ADDR; + public static MemorySegment wcscoll$address() { + return wcscoll.ADDR; } /** * {@snippet lang=c : - * void swab(const void *restrict, void *restrict, ssize_t) + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static void swab(MemorySegment x0, MemorySegment x1, long x2) { - var mh$ = swab.HANDLE; + public static int wcscoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcscoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("swab", x0, x1, x2); + traceDowncall("wcscoll", _String1, _String2); } - mh$.invokeExact(x0, x1, x2); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class timingsafe_bcmp { + private static class _wcscoll_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("timingsafe_bcmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcscoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8541,59 +7558,58 @@ private static class timingsafe_bcmp { /** * Function descriptor for: * {@snippet lang=c : - * int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len) + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor timingsafe_bcmp$descriptor() { - return timingsafe_bcmp.DESC; + public static FunctionDescriptor _wcscoll_l$descriptor() { + return _wcscoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len) + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MethodHandle timingsafe_bcmp$handle() { - return timingsafe_bcmp.HANDLE; + public static MethodHandle _wcscoll_l$handle() { + return _wcscoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len) + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MemorySegment timingsafe_bcmp$address() { - return timingsafe_bcmp.ADDR; + public static MemorySegment _wcscoll_l$address() { + return _wcscoll_l.ADDR; } /** * {@snippet lang=c : - * int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len) + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static int timingsafe_bcmp(MemorySegment __b1, MemorySegment __b2, long __len) { - var mh$ = timingsafe_bcmp.HANDLE; + public static int _wcscoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcscoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("timingsafe_bcmp", __b1, __b2, __len); + traceDowncall("_wcscoll_l", _String1, _String2, _Locale); } - return (int)mh$.invokeExact(__b1, __b2, __len); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strsignal_r { + private static class _wcsicoll { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strsignal_r"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsicoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8601,59 +7617,59 @@ private static class strsignal_r { /** * Function descriptor for: * {@snippet lang=c : - * int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen) + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static FunctionDescriptor strsignal_r$descriptor() { - return strsignal_r.DESC; + public static FunctionDescriptor _wcsicoll$descriptor() { + return _wcsicoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen) + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MethodHandle strsignal_r$handle() { - return strsignal_r.HANDLE; + public static MethodHandle _wcsicoll$handle() { + return _wcsicoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen) + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MemorySegment strsignal_r$address() { - return strsignal_r.ADDR; + public static MemorySegment _wcsicoll$address() { + return _wcsicoll.ADDR; } /** * {@snippet lang=c : - * int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen) + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int strsignal_r(int __sig, MemorySegment __strsignalbuf, long __buflen) { - var mh$ = strsignal_r.HANDLE; + public static int _wcsicoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _wcsicoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strsignal_r", __sig, __strsignalbuf, __buflen); + traceDowncall("_wcsicoll", _String1, _String2); } - return (int)mh$.invokeExact(__sig, __strsignalbuf, __buflen); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class bcmp { + private static class _wcsicoll_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("bcmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsicoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8661,58 +7677,59 @@ private static class bcmp { /** * Function descriptor for: * {@snippet lang=c : - * int bcmp(const void *, const void *, size_t) + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor bcmp$descriptor() { - return bcmp.DESC; + public static FunctionDescriptor _wcsicoll_l$descriptor() { + return _wcsicoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int bcmp(const void *, const void *, size_t) + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MethodHandle bcmp$handle() { - return bcmp.HANDLE; + public static MethodHandle _wcsicoll_l$handle() { + return _wcsicoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * int bcmp(const void *, const void *, size_t) + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static MemorySegment bcmp$address() { - return bcmp.ADDR; + public static MemorySegment _wcsicoll_l$address() { + return _wcsicoll_l.ADDR; } /** * {@snippet lang=c : - * int bcmp(const void *, const void *, size_t) + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) * } */ - public static int bcmp(MemorySegment x0, MemorySegment x1, long x2) { - var mh$ = bcmp.HANDLE; + public static int _wcsicoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcsicoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("bcmp", x0, x1, x2); + traceDowncall("_wcsicoll_l", _String1, _String2, _Locale); } - return (int)mh$.invokeExact(x0, x1, x2); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class bcopy { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _wcsncoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("bcopy"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsncoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8720,57 +7737,60 @@ private static class bcopy { /** * Function descriptor for: * {@snippet lang=c : - * void bcopy(const void *, void *, size_t) + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static FunctionDescriptor bcopy$descriptor() { - return bcopy.DESC; + public static FunctionDescriptor _wcsncoll$descriptor() { + return _wcsncoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void bcopy(const void *, void *, size_t) + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MethodHandle bcopy$handle() { - return bcopy.HANDLE; + public static MethodHandle _wcsncoll$handle() { + return _wcsncoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * void bcopy(const void *, void *, size_t) + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment bcopy$address() { - return bcopy.ADDR; + public static MemorySegment _wcsncoll$address() { + return _wcsncoll.ADDR; } /** * {@snippet lang=c : - * void bcopy(const void *, void *, size_t) + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static void bcopy(MemorySegment x0, MemorySegment x1, long x2) { - var mh$ = bcopy.HANDLE; + public static int _wcsncoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsncoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("bcopy", x0, x1, x2); + traceDowncall("_wcsncoll", _String1, _String2, _MaxCount); } - mh$.invokeExact(x0, x1, x2); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class bzero { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _wcsncoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("bzero"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsncoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8778,58 +7798,59 @@ private static class bzero { /** * Function descriptor for: * {@snippet lang=c : - * void bzero(void *, size_t) + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static FunctionDescriptor bzero$descriptor() { - return bzero.DESC; + public static FunctionDescriptor _wcsncoll_l$descriptor() { + return _wcsncoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * void bzero(void *, size_t) + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MethodHandle bzero$handle() { - return bzero.HANDLE; + public static MethodHandle _wcsncoll_l$handle() { + return _wcsncoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * void bzero(void *, size_t) + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment bzero$address() { - return bzero.ADDR; + public static MemorySegment _wcsncoll_l$address() { + return _wcsncoll_l.ADDR; } /** * {@snippet lang=c : - * void bzero(void *, size_t) + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static void bzero(MemorySegment x0, long x1) { - var mh$ = bzero.HANDLE; + public static int _wcsncoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsncoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("bzero", x0, x1); + traceDowncall("_wcsncoll_l", _String1, _String2, _MaxCount, _Locale); } - mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class index { + private static class _wcsnicoll { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("index"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnicoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8837,58 +7858,60 @@ private static class index { /** * Function descriptor for: * {@snippet lang=c : - * char *index(const char *, int) + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static FunctionDescriptor index$descriptor() { - return index.DESC; + public static FunctionDescriptor _wcsnicoll$descriptor() { + return _wcsnicoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *index(const char *, int) + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MethodHandle index$handle() { - return index.HANDLE; + public static MethodHandle _wcsnicoll$handle() { + return _wcsnicoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *index(const char *, int) + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment index$address() { - return index.ADDR; + public static MemorySegment _wcsnicoll$address() { + return _wcsnicoll.ADDR; } /** * {@snippet lang=c : - * char *index(const char *, int) + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment index(MemorySegment x0, int x1) { - var mh$ = index.HANDLE; + public static int _wcsnicoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsnicoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("index", x0, x1); + traceDowncall("_wcsnicoll", _String1, _String2, _MaxCount); } - return (MemorySegment)mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class rindex { + private static class _wcsnicoll_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_LONG_LONG, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("rindex"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_wcsnicoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8896,57 +7919,57 @@ private static class rindex { /** * Function descriptor for: * {@snippet lang=c : - * char *rindex(const char *, int) + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static FunctionDescriptor rindex$descriptor() { - return rindex.DESC; + public static FunctionDescriptor _wcsnicoll_l$descriptor() { + return _wcsnicoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * char *rindex(const char *, int) + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MethodHandle rindex$handle() { - return rindex.HANDLE; + public static MethodHandle _wcsnicoll_l$handle() { + return _wcsnicoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * char *rindex(const char *, int) + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment rindex$address() { - return rindex.ADDR; + public static MemorySegment _wcsnicoll_l$address() { + return _wcsnicoll_l.ADDR; } /** * {@snippet lang=c : - * char *rindex(const char *, int) + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment rindex(MemorySegment x0, int x1) { - var mh$ = rindex.HANDLE; + public static int _wcsnicoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsnicoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("rindex", x0, x1); + traceDowncall("_wcsnicoll_l", _String1, _String2, _MaxCount, _Locale); } - return (MemorySegment)mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class ffs { + private static class wcsdup { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_INT + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("ffs"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsdup"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -8954,58 +7977,58 @@ private static class ffs { /** * Function descriptor for: * {@snippet lang=c : - * int ffs(int) + * wchar_t *wcsdup(const wchar_t *_String) * } */ - public static FunctionDescriptor ffs$descriptor() { - return ffs.DESC; + public static FunctionDescriptor wcsdup$descriptor() { + return wcsdup.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int ffs(int) + * wchar_t *wcsdup(const wchar_t *_String) * } */ - public static MethodHandle ffs$handle() { - return ffs.HANDLE; + public static MethodHandle wcsdup$handle() { + return wcsdup.HANDLE; } /** * Address for: * {@snippet lang=c : - * int ffs(int) + * wchar_t *wcsdup(const wchar_t *_String) * } */ - public static MemorySegment ffs$address() { - return ffs.ADDR; + public static MemorySegment wcsdup$address() { + return wcsdup.ADDR; } /** * {@snippet lang=c : - * int ffs(int) + * wchar_t *wcsdup(const wchar_t *_String) * } */ - public static int ffs(int x0) { - var mh$ = ffs.HANDLE; + public static MemorySegment wcsdup(MemorySegment _String) { + var mh$ = wcsdup.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("ffs", x0); + traceDowncall("wcsdup", _String); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strcasecmp { + private static class wcsicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strcasecmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9013,59 +8036,59 @@ private static class strcasecmp { /** * Function descriptor for: * {@snippet lang=c : - * int strcasecmp(const char *, const char *) + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static FunctionDescriptor strcasecmp$descriptor() { - return strcasecmp.DESC; + public static FunctionDescriptor wcsicmp$descriptor() { + return wcsicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strcasecmp(const char *, const char *) + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MethodHandle strcasecmp$handle() { - return strcasecmp.HANDLE; + public static MethodHandle wcsicmp$handle() { + return wcsicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strcasecmp(const char *, const char *) + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static MemorySegment strcasecmp$address() { - return strcasecmp.ADDR; + public static MemorySegment wcsicmp$address() { + return wcsicmp.ADDR; } /** * {@snippet lang=c : - * int strcasecmp(const char *, const char *) + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int strcasecmp(MemorySegment x0, MemorySegment x1) { - var mh$ = strcasecmp.HANDLE; + public static int wcsicmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcsicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strcasecmp", x0, x1); + traceDowncall("wcsicmp", _String1, _String2); } - return (int)mh$.invokeExact(x0, x1); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class strncasecmp { + private static class wcsnicmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_LONG + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("strncasecmp"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsnicmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9073,57 +8096,59 @@ private static class strncasecmp { /** * Function descriptor for: * {@snippet lang=c : - * int strncasecmp(const char *, const char *, size_t) + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static FunctionDescriptor strncasecmp$descriptor() { - return strncasecmp.DESC; + public static FunctionDescriptor wcsnicmp$descriptor() { + return wcsnicmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int strncasecmp(const char *, const char *, size_t) + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MethodHandle strncasecmp$handle() { - return strncasecmp.HANDLE; + public static MethodHandle wcsnicmp$handle() { + return wcsnicmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * int strncasecmp(const char *, const char *, size_t) + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static MemorySegment strncasecmp$address() { - return strncasecmp.ADDR; + public static MemorySegment wcsnicmp$address() { + return wcsnicmp.ADDR; } /** * {@snippet lang=c : - * int strncasecmp(const char *, const char *, size_t) + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) * } */ - public static int strncasecmp(MemorySegment x0, MemorySegment x1, long x2) { - var mh$ = strncasecmp.HANDLE; + public static int wcsnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = wcsnicmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("strncasecmp", x0, x1, x2); + traceDowncall("wcsnicmp", _String1, _String2, _MaxCount); } - return (int)mh$.invokeExact(x0, x1, x2); + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class ffsl { + private static class wcsnset { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_SHORT, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("ffsl"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsnset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9131,57 +8156,57 @@ private static class ffsl { /** * Function descriptor for: * {@snippet lang=c : - * int ffsl(long) + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static FunctionDescriptor ffsl$descriptor() { - return ffsl.DESC; + public static FunctionDescriptor wcsnset$descriptor() { + return wcsnset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int ffsl(long) + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static MethodHandle ffsl$handle() { - return ffsl.HANDLE; + public static MethodHandle wcsnset$handle() { + return wcsnset.HANDLE; } /** * Address for: * {@snippet lang=c : - * int ffsl(long) + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static MemorySegment ffsl$address() { - return ffsl.ADDR; + public static MemorySegment wcsnset$address() { + return wcsnset.ADDR; } /** * {@snippet lang=c : - * int ffsl(long) + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) * } */ - public static int ffsl(long x0) { - var mh$ = ffsl.HANDLE; + public static MemorySegment wcsnset(MemorySegment _String, short _Value, long _MaxCount) { + var mh$ = wcsnset.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("ffsl", x0); + traceDowncall("wcsnset", _String, _Value, _MaxCount); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class ffsll { + private static class wcsrev { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_LONG_LONG + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("ffsll"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsrev"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9189,57 +8214,58 @@ private static class ffsll { /** * Function descriptor for: * {@snippet lang=c : - * int ffsll(long long) + * wchar_t *wcsrev(wchar_t *_String) * } */ - public static FunctionDescriptor ffsll$descriptor() { - return ffsll.DESC; + public static FunctionDescriptor wcsrev$descriptor() { + return wcsrev.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int ffsll(long long) + * wchar_t *wcsrev(wchar_t *_String) * } */ - public static MethodHandle ffsll$handle() { - return ffsll.HANDLE; + public static MethodHandle wcsrev$handle() { + return wcsrev.HANDLE; } /** * Address for: * {@snippet lang=c : - * int ffsll(long long) + * wchar_t *wcsrev(wchar_t *_String) * } */ - public static MemorySegment ffsll$address() { - return ffsll.ADDR; + public static MemorySegment wcsrev$address() { + return wcsrev.ADDR; } /** * {@snippet lang=c : - * int ffsll(long long) + * wchar_t *wcsrev(wchar_t *_String) * } */ - public static int ffsll(long x0) { - var mh$ = ffsll.HANDLE; + public static MemorySegment wcsrev(MemorySegment _String) { + var mh$ = wcsrev.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("ffsll", x0); + traceDowncall("wcsrev", _String); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class fls { + private static class wcsset { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_INT + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_SHORT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("fls"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsset"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9247,57 +8273,57 @@ private static class fls { /** * Function descriptor for: * {@snippet lang=c : - * int fls(int) + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static FunctionDescriptor fls$descriptor() { - return fls.DESC; + public static FunctionDescriptor wcsset$descriptor() { + return wcsset.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int fls(int) + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static MethodHandle fls$handle() { - return fls.HANDLE; + public static MethodHandle wcsset$handle() { + return wcsset.HANDLE; } /** * Address for: * {@snippet lang=c : - * int fls(int) + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static MemorySegment fls$address() { - return fls.ADDR; + public static MemorySegment wcsset$address() { + return wcsset.ADDR; } /** * {@snippet lang=c : - * int fls(int) + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) * } */ - public static int fls(int x0) { - var mh$ = fls.HANDLE; + public static MemorySegment wcsset(MemorySegment _String, short _Value) { + var mh$ = wcsset.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("fls", x0); + traceDowncall("wcsset", _String, _Value); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String, _Value); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class flsl { + private static class wcslwr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_LONG + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("flsl"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcslwr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9305,57 +8331,57 @@ private static class flsl { /** * Function descriptor for: * {@snippet lang=c : - * int flsl(long) + * wchar_t *wcslwr(wchar_t *_String) * } */ - public static FunctionDescriptor flsl$descriptor() { - return flsl.DESC; + public static FunctionDescriptor wcslwr$descriptor() { + return wcslwr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int flsl(long) + * wchar_t *wcslwr(wchar_t *_String) * } */ - public static MethodHandle flsl$handle() { - return flsl.HANDLE; + public static MethodHandle wcslwr$handle() { + return wcslwr.HANDLE; } /** * Address for: * {@snippet lang=c : - * int flsl(long) + * wchar_t *wcslwr(wchar_t *_String) * } */ - public static MemorySegment flsl$address() { - return flsl.ADDR; + public static MemorySegment wcslwr$address() { + return wcslwr.ADDR; } /** * {@snippet lang=c : - * int flsl(long) + * wchar_t *wcslwr(wchar_t *_String) * } */ - public static int flsl(long x0) { - var mh$ = flsl.HANDLE; + public static MemorySegment wcslwr(MemorySegment _String) { + var mh$ = wcslwr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("flsl", x0); + traceDowncall("wcslwr", _String); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class flsll { + private static class wcsupr { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_LONG_LONG + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("flsll"); + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsupr"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9363,145 +8389,178 @@ private static class flsll { /** * Function descriptor for: * {@snippet lang=c : - * int flsll(long long) + * wchar_t *wcsupr(wchar_t *_String) * } */ - public static FunctionDescriptor flsll$descriptor() { - return flsll.DESC; + public static FunctionDescriptor wcsupr$descriptor() { + return wcsupr.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * int flsll(long long) + * wchar_t *wcsupr(wchar_t *_String) * } */ - public static MethodHandle flsll$handle() { - return flsll.HANDLE; + public static MethodHandle wcsupr$handle() { + return wcsupr.HANDLE; } /** * Address for: * {@snippet lang=c : - * int flsll(long long) + * wchar_t *wcsupr(wchar_t *_String) * } */ - public static MemorySegment flsll$address() { - return flsll.ADDR; + public static MemorySegment wcsupr$address() { + return wcsupr.ADDR; } /** * {@snippet lang=c : - * int flsll(long long) + * wchar_t *wcsupr(wchar_t *_String) * } */ - public static int flsll(long x0) { - var mh$ = flsll.HANDLE; + public static MemorySegment wcsupr(MemorySegment _String) { + var mh$ = wcsupr.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("flsll", x0); + traceDowncall("wcsupr", _String); } - return (int)mh$.invokeExact(x0); + return (MemorySegment)mh$.invokeExact(_String); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static final int ANIMATION_FLAG = (int)2L; - /** - * {@snippet lang=c : - * enum WebPFeatureFlags.ANIMATION_FLAG = 2 - * } - */ - public static int ANIMATION_FLAG() { - return ANIMATION_FLAG; + + private static class wcsicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("wcsicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int XMP_FLAG = (int)4L; + /** + * Function descriptor for: * {@snippet lang=c : - * enum WebPFeatureFlags.XMP_FLAG = 4 + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int XMP_FLAG() { - return XMP_FLAG; + public static FunctionDescriptor wcsicoll$descriptor() { + return wcsicoll.DESC; } - private static final int EXIF_FLAG = (int)8L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum WebPFeatureFlags.EXIF_FLAG = 8 + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int EXIF_FLAG() { - return EXIF_FLAG; + public static MethodHandle wcsicoll$handle() { + return wcsicoll.HANDLE; } - private static final int ALPHA_FLAG = (int)16L; + /** + * Address for: * {@snippet lang=c : - * enum WebPFeatureFlags.ALPHA_FLAG = 16 + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int ALPHA_FLAG() { - return ALPHA_FLAG; + public static MemorySegment wcsicoll$address() { + return wcsicoll.ADDR; } - private static final int ICCP_FLAG = (int)32L; + /** * {@snippet lang=c : - * enum WebPFeatureFlags.ICCP_FLAG = 32 + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) * } */ - public static int ICCP_FLAG() { - return ICCP_FLAG; + public static int wcsicoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcsicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsicoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int ALL_VALID_FLAGS = (int)62L; - /** - * {@snippet lang=c : - * enum WebPFeatureFlags.ALL_VALID_FLAGS = 62 - * } - */ - public static int ALL_VALID_FLAGS() { - return ALL_VALID_FLAGS; + + private static class strcpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strcpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int WEBP_MUX_DISPOSE_NONE = (int)0L; + /** + * Function descriptor for: * {@snippet lang=c : - * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_NONE = 0 + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static int WEBP_MUX_DISPOSE_NONE() { - return WEBP_MUX_DISPOSE_NONE; + public static FunctionDescriptor strcpy_s$descriptor() { + return strcpy_s.DESC; } - private static final int WEBP_MUX_DISPOSE_BACKGROUND = (int)1L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_BACKGROUND = 1 + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static int WEBP_MUX_DISPOSE_BACKGROUND() { - return WEBP_MUX_DISPOSE_BACKGROUND; + public static MethodHandle strcpy_s$handle() { + return strcpy_s.HANDLE; } - private static final int WEBP_MUX_BLEND = (int)0L; + /** + * Address for: * {@snippet lang=c : - * enum WebPMuxAnimBlend.WEBP_MUX_BLEND = 0 + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static int WEBP_MUX_BLEND() { - return WEBP_MUX_BLEND; + public static MemorySegment strcpy_s$address() { + return strcpy_s.ADDR; } - private static final int WEBP_MUX_NO_BLEND = (int)1L; + /** * {@snippet lang=c : - * enum WebPMuxAnimBlend.WEBP_MUX_NO_BLEND = 1 + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static int WEBP_MUX_NO_BLEND() { - return WEBP_MUX_NO_BLEND; + public static int strcpy_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source) { + var mh$ = strcpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcpy_s", _Destination, _SizeInBytes, _Source); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static class WebPGetDemuxVersion { + private static class strcat_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT ); + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetDemuxVersion"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcat_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9509,96 +8568,59 @@ private static class WebPGetDemuxVersion { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPGetDemuxVersion() + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static FunctionDescriptor WebPGetDemuxVersion$descriptor() { - return WebPGetDemuxVersion.DESC; + public static FunctionDescriptor strcat_s$descriptor() { + return strcat_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPGetDemuxVersion() + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static MethodHandle WebPGetDemuxVersion$handle() { - return WebPGetDemuxVersion.HANDLE; + public static MethodHandle strcat_s$handle() { + return strcat_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPGetDemuxVersion() + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static MemorySegment WebPGetDemuxVersion$address() { - return WebPGetDemuxVersion.ADDR; + public static MemorySegment strcat_s$address() { + return strcat_s.ADDR; } /** * {@snippet lang=c : - * extern int WebPGetDemuxVersion() + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) * } */ - public static int WebPGetDemuxVersion() { - var mh$ = WebPGetDemuxVersion.HANDLE; + public static int strcat_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source) { + var mh$ = strcat_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetDemuxVersion"); + traceDowncall("strcat_s", _Destination, _SizeInBytes, _Source); } - return (int)mh$.invokeExact(); + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static final int WEBP_DEMUX_PARSE_ERROR = (int)-1L; - /** - * {@snippet lang=c : - * enum WebPDemuxState.WEBP_DEMUX_PARSE_ERROR = -1 - * } - */ - public static int WEBP_DEMUX_PARSE_ERROR() { - return WEBP_DEMUX_PARSE_ERROR; - } - private static final int WEBP_DEMUX_PARSING_HEADER = (int)0L; - /** - * {@snippet lang=c : - * enum WebPDemuxState.WEBP_DEMUX_PARSING_HEADER = 0 - * } - */ - public static int WEBP_DEMUX_PARSING_HEADER() { - return WEBP_DEMUX_PARSING_HEADER; - } - private static final int WEBP_DEMUX_PARSED_HEADER = (int)1L; - /** - * {@snippet lang=c : - * enum WebPDemuxState.WEBP_DEMUX_PARSED_HEADER = 1 - * } - */ - public static int WEBP_DEMUX_PARSED_HEADER() { - return WEBP_DEMUX_PARSED_HEADER; - } - private static final int WEBP_DEMUX_DONE = (int)2L; - /** - * {@snippet lang=c : - * enum WebPDemuxState.WEBP_DEMUX_DONE = 2 - * } - */ - public static int WEBP_DEMUX_DONE() { - return WEBP_DEMUX_DONE; - } - private static class WebPDemuxInternal { + private static class strerror_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_POINTER, - demux_h.C_POINTER, demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strerror_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9606,56 +8628,60 @@ private static class WebPDemuxInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) * } */ - public static FunctionDescriptor WebPDemuxInternal$descriptor() { - return WebPDemuxInternal.DESC; + public static FunctionDescriptor strerror_s$descriptor() { + return strerror_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) * } */ - public static MethodHandle WebPDemuxInternal$handle() { - return WebPDemuxInternal.HANDLE; + public static MethodHandle strerror_s$handle() { + return strerror_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) * } */ - public static MemorySegment WebPDemuxInternal$address() { - return WebPDemuxInternal.ADDR; + public static MemorySegment strerror_s$address() { + return strerror_s.ADDR; } /** * {@snippet lang=c : - * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) * } */ - public static MemorySegment WebPDemuxInternal(MemorySegment x0, int x1, MemorySegment x2, int x3) { - var mh$ = WebPDemuxInternal.HANDLE; + public static int strerror_s(MemorySegment _Buffer, long _SizeInBytes, int _ErrorNumber) { + var mh$ = strerror_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxInternal", x0, x1, x2, x3); + traceDowncall("strerror_s", _Buffer, _SizeInBytes, _ErrorNumber); } - return (MemorySegment)mh$.invokeExact(x0, x1, x2, x3); + return (int)mh$.invokeExact(_Buffer, _SizeInBytes, _ErrorNumber); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxDelete { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER + private static class strncat_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxDelete"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strncat_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9663,112 +8689,120 @@ private static class WebPDemuxDelete { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPDemuxDelete(WebPDemuxer *dmux) + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static FunctionDescriptor WebPDemuxDelete$descriptor() { - return WebPDemuxDelete.DESC; + public static FunctionDescriptor strncat_s$descriptor() { + return strncat_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPDemuxDelete(WebPDemuxer *dmux) - * } - */ - public static MethodHandle WebPDemuxDelete$handle() { - return WebPDemuxDelete.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern void WebPDemuxDelete(WebPDemuxer *dmux) - * } - */ - public static MemorySegment WebPDemuxDelete$address() { - return WebPDemuxDelete.ADDR; - } - - /** - * {@snippet lang=c : - * extern void WebPDemuxDelete(WebPDemuxer *dmux) + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static void WebPDemuxDelete(MemorySegment dmux) { - var mh$ = WebPDemuxDelete.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxDelete", dmux); - } - mh$.invokeExact(dmux); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } + public static MethodHandle strncat_s$handle() { + return strncat_s.HANDLE; } - private static final int WEBP_FF_FORMAT_FLAGS = (int)0L; + /** + * Address for: * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_FORMAT_FLAGS = 0 + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_FORMAT_FLAGS() { - return WEBP_FF_FORMAT_FLAGS; + public static MemorySegment strncat_s$address() { + return strncat_s.ADDR; } - private static final int WEBP_FF_CANVAS_WIDTH = (int)1L; + /** * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_CANVAS_WIDTH = 1 + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_CANVAS_WIDTH() { - return WEBP_FF_CANVAS_WIDTH; + public static int strncat_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source, long _MaxCount) { + var mh$ = strncat_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncat_s", _Destination, _SizeInBytes, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int WEBP_FF_CANVAS_HEIGHT = (int)2L; + + private static class strncpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strncpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_CANVAS_HEIGHT = 2 + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_CANVAS_HEIGHT() { - return WEBP_FF_CANVAS_HEIGHT; + public static FunctionDescriptor strncpy_s$descriptor() { + return strncpy_s.DESC; } - private static final int WEBP_FF_LOOP_COUNT = (int)3L; + /** + * Downcall method handle for: * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_LOOP_COUNT = 3 + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_LOOP_COUNT() { - return WEBP_FF_LOOP_COUNT; + public static MethodHandle strncpy_s$handle() { + return strncpy_s.HANDLE; } - private static final int WEBP_FF_BACKGROUND_COLOR = (int)4L; + /** + * Address for: * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_BACKGROUND_COLOR = 4 + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_BACKGROUND_COLOR() { - return WEBP_FF_BACKGROUND_COLOR; + public static MemorySegment strncpy_s$address() { + return strncpy_s.ADDR; } - private static final int WEBP_FF_FRAME_COUNT = (int)5L; + /** * {@snippet lang=c : - * enum WebPFormatFeature.WEBP_FF_FRAME_COUNT = 5 + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) * } */ - public static int WEBP_FF_FRAME_COUNT() { - return WEBP_FF_FRAME_COUNT; + public static int strncpy_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source, long _MaxCount) { + var mh$ = strncpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncpy_s", _Destination, _SizeInBytes, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static class WebPDemuxGetI { + private static class strtok_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetI"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strtok_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9776,59 +8810,60 @@ private static class WebPDemuxGetI { /** * Function descriptor for: * {@snippet lang=c : - * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) * } */ - public static FunctionDescriptor WebPDemuxGetI$descriptor() { - return WebPDemuxGetI.DESC; + public static FunctionDescriptor strtok_s$descriptor() { + return strtok_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) * } */ - public static MethodHandle WebPDemuxGetI$handle() { - return WebPDemuxGetI.HANDLE; + public static MethodHandle strtok_s$handle() { + return strtok_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) * } */ - public static MemorySegment WebPDemuxGetI$address() { - return WebPDemuxGetI.ADDR; + public static MemorySegment strtok_s$address() { + return strtok_s.ADDR; } /** * {@snippet lang=c : - * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) * } */ - public static int WebPDemuxGetI(MemorySegment dmux, int feature) { - var mh$ = WebPDemuxGetI.HANDLE; + public static MemorySegment strtok_s(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = strtok_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxGetI", dmux, feature); + traceDowncall("strtok_s", _String, _Delimiter, _Context); } - return (int)mh$.invokeExact(dmux, feature); + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxGetFrame { + private static class _memccpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_INT, - demux_h.C_POINTER + demux_h.C_LONG_LONG ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetFrame"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_memccpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9836,57 +8871,58 @@ private static class WebPDemuxGetFrame { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) * } */ - public static FunctionDescriptor WebPDemuxGetFrame$descriptor() { - return WebPDemuxGetFrame.DESC; + public static FunctionDescriptor _memccpy$descriptor() { + return _memccpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) * } */ - public static MethodHandle WebPDemuxGetFrame$handle() { - return WebPDemuxGetFrame.HANDLE; + public static MethodHandle _memccpy$handle() { + return _memccpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) * } */ - public static MemorySegment WebPDemuxGetFrame$address() { - return WebPDemuxGetFrame.ADDR; + public static MemorySegment _memccpy$address() { + return _memccpy.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) * } */ - public static int WebPDemuxGetFrame(MemorySegment dmux, int frame_number, MemorySegment iter) { - var mh$ = WebPDemuxGetFrame.HANDLE; + public static MemorySegment _memccpy(MemorySegment _Dst, MemorySegment _Src, int _Val, long _MaxCount) { + var mh$ = _memccpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxGetFrame", dmux, frame_number, iter); + traceDowncall("_memccpy", _Dst, _Src, _Val, _MaxCount); } - return (int)mh$.invokeExact(dmux, frame_number, iter); + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Val, _MaxCount); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxNextFrame { + private static class strcat { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxNextFrame"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcat"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9894,57 +8930,58 @@ private static class WebPDemuxNextFrame { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxNextFrame(WebPIterator *iter) + * char *strcat(char *_Destination, const char *_Source) * } */ - public static FunctionDescriptor WebPDemuxNextFrame$descriptor() { - return WebPDemuxNextFrame.DESC; + public static FunctionDescriptor strcat$descriptor() { + return strcat.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxNextFrame(WebPIterator *iter) + * char *strcat(char *_Destination, const char *_Source) * } */ - public static MethodHandle WebPDemuxNextFrame$handle() { - return WebPDemuxNextFrame.HANDLE; + public static MethodHandle strcat$handle() { + return strcat.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxNextFrame(WebPIterator *iter) + * char *strcat(char *_Destination, const char *_Source) * } */ - public static MemorySegment WebPDemuxNextFrame$address() { - return WebPDemuxNextFrame.ADDR; + public static MemorySegment strcat$address() { + return strcat.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxNextFrame(WebPIterator *iter) + * char *strcat(char *_Destination, const char *_Source) * } */ - public static int WebPDemuxNextFrame(MemorySegment iter) { - var mh$ = WebPDemuxNextFrame.HANDLE; + public static MemorySegment strcat(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = strcat.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxNextFrame", iter); + traceDowncall("strcat", _Destination, _Source); } - return (int)mh$.invokeExact(iter); + return (MemorySegment)mh$.invokeExact(_Destination, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxPrevFrame { + private static class strcmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxPrevFrame"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -9952,56 +8989,58 @@ private static class WebPDemuxPrevFrame { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxPrevFrame(WebPIterator *iter) + * int strcmp(const char *_Str1, const char *_Str2) * } */ - public static FunctionDescriptor WebPDemuxPrevFrame$descriptor() { - return WebPDemuxPrevFrame.DESC; + public static FunctionDescriptor strcmp$descriptor() { + return strcmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxPrevFrame(WebPIterator *iter) + * int strcmp(const char *_Str1, const char *_Str2) * } */ - public static MethodHandle WebPDemuxPrevFrame$handle() { - return WebPDemuxPrevFrame.HANDLE; + public static MethodHandle strcmp$handle() { + return strcmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxPrevFrame(WebPIterator *iter) + * int strcmp(const char *_Str1, const char *_Str2) * } */ - public static MemorySegment WebPDemuxPrevFrame$address() { - return WebPDemuxPrevFrame.ADDR; + public static MemorySegment strcmp$address() { + return strcmp.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxPrevFrame(WebPIterator *iter) + * int strcmp(const char *_Str1, const char *_Str2) * } */ - public static int WebPDemuxPrevFrame(MemorySegment iter) { - var mh$ = WebPDemuxPrevFrame.HANDLE; + public static int strcmp(MemorySegment _Str1, MemorySegment _Str2) { + var mh$ = strcmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxPrevFrame", iter); + traceDowncall("strcmp", _Str1, _Str2); } - return (int)mh$.invokeExact(iter); + return (int)mh$.invokeExact(_Str1, _Str2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxReleaseIterator { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _strcmpi { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxReleaseIterator"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_strcmpi"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10009,60 +9048,58 @@ private static class WebPDemuxReleaseIterator { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPDemuxReleaseIterator(WebPIterator *iter) + * int _strcmpi(const char *_String1, const char *_String2) * } */ - public static FunctionDescriptor WebPDemuxReleaseIterator$descriptor() { - return WebPDemuxReleaseIterator.DESC; + public static FunctionDescriptor _strcmpi$descriptor() { + return _strcmpi.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPDemuxReleaseIterator(WebPIterator *iter) + * int _strcmpi(const char *_String1, const char *_String2) * } */ - public static MethodHandle WebPDemuxReleaseIterator$handle() { - return WebPDemuxReleaseIterator.HANDLE; + public static MethodHandle _strcmpi$handle() { + return _strcmpi.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPDemuxReleaseIterator(WebPIterator *iter) + * int _strcmpi(const char *_String1, const char *_String2) * } */ - public static MemorySegment WebPDemuxReleaseIterator$address() { - return WebPDemuxReleaseIterator.ADDR; + public static MemorySegment _strcmpi$address() { + return _strcmpi.ADDR; } /** * {@snippet lang=c : - * extern void WebPDemuxReleaseIterator(WebPIterator *iter) + * int _strcmpi(const char *_String1, const char *_String2) * } */ - public static void WebPDemuxReleaseIterator(MemorySegment iter) { - var mh$ = WebPDemuxReleaseIterator.HANDLE; + public static int _strcmpi(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _strcmpi.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxReleaseIterator", iter); + traceDowncall("_strcmpi", _String1, _String2); } - mh$.invokeExact(iter); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxGetChunk { + private static class strcoll { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetChunk"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10070,57 +9107,59 @@ private static class WebPDemuxGetChunk { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) + * int strcoll(const char *_String1, const char *_String2) * } */ - public static FunctionDescriptor WebPDemuxGetChunk$descriptor() { - return WebPDemuxGetChunk.DESC; + public static FunctionDescriptor strcoll$descriptor() { + return strcoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) + * int strcoll(const char *_String1, const char *_String2) * } */ - public static MethodHandle WebPDemuxGetChunk$handle() { - return WebPDemuxGetChunk.HANDLE; + public static MethodHandle strcoll$handle() { + return strcoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) + * int strcoll(const char *_String1, const char *_String2) * } */ - public static MemorySegment WebPDemuxGetChunk$address() { - return WebPDemuxGetChunk.ADDR; + public static MemorySegment strcoll$address() { + return strcoll.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) + * int strcoll(const char *_String1, const char *_String2) * } */ - public static int WebPDemuxGetChunk(MemorySegment dmux, MemorySegment fourcc, int chunk_number, MemorySegment iter) { - var mh$ = WebPDemuxGetChunk.HANDLE; + public static int strcoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = strcoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxGetChunk", dmux, fourcc, chunk_number, iter); + traceDowncall("strcoll", _String1, _String2); } - return (int)mh$.invokeExact(dmux, fourcc, chunk_number, iter); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxNextChunk { + private static class _strcoll_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxNextChunk"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_strcoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10128,57 +9167,58 @@ private static class WebPDemuxNextChunk { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor WebPDemuxNextChunk$descriptor() { - return WebPDemuxNextChunk.DESC; + public static FunctionDescriptor _strcoll_l$descriptor() { + return _strcoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MethodHandle WebPDemuxNextChunk$handle() { - return WebPDemuxNextChunk.HANDLE; + public static MethodHandle _strcoll_l$handle() { + return _strcoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MemorySegment WebPDemuxNextChunk$address() { - return WebPDemuxNextChunk.ADDR; + public static MemorySegment _strcoll_l$address() { + return _strcoll_l.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static int WebPDemuxNextChunk(MemorySegment iter) { - var mh$ = WebPDemuxNextChunk.HANDLE; + public static int _strcoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _strcoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxNextChunk", iter); + traceDowncall("_strcoll_l", _String1, _String2, _Locale); } - return (int)mh$.invokeExact(iter); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxPrevChunk { + private static class strcpy { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxPrevChunk"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcpy"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10186,56 +9226,58 @@ private static class WebPDemuxPrevChunk { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) + * char *strcpy(char *_Destination, const char *_Source) * } */ - public static FunctionDescriptor WebPDemuxPrevChunk$descriptor() { - return WebPDemuxPrevChunk.DESC; + public static FunctionDescriptor strcpy$descriptor() { + return strcpy.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) + * char *strcpy(char *_Destination, const char *_Source) * } */ - public static MethodHandle WebPDemuxPrevChunk$handle() { - return WebPDemuxPrevChunk.HANDLE; + public static MethodHandle strcpy$handle() { + return strcpy.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) + * char *strcpy(char *_Destination, const char *_Source) * } */ - public static MemorySegment WebPDemuxPrevChunk$address() { - return WebPDemuxPrevChunk.ADDR; + public static MemorySegment strcpy$address() { + return strcpy.ADDR; } /** * {@snippet lang=c : - * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) + * char *strcpy(char *_Destination, const char *_Source) * } */ - public static int WebPDemuxPrevChunk(MemorySegment iter) { - var mh$ = WebPDemuxPrevChunk.HANDLE; + public static MemorySegment strcpy(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = strcpy.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxPrevChunk", iter); + traceDowncall("strcpy", _Destination, _Source); } - return (int)mh$.invokeExact(iter); + return (MemorySegment)mh$.invokeExact(_Destination, _Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPDemuxReleaseChunkIterator { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class strcspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxReleaseChunkIterator"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strcspn"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10243,58 +9285,57 @@ private static class WebPDemuxReleaseChunkIterator { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) + * unsigned long long strcspn(const char *_Str, const char *_Control) * } */ - public static FunctionDescriptor WebPDemuxReleaseChunkIterator$descriptor() { - return WebPDemuxReleaseChunkIterator.DESC; + public static FunctionDescriptor strcspn$descriptor() { + return strcspn.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) + * unsigned long long strcspn(const char *_Str, const char *_Control) * } */ - public static MethodHandle WebPDemuxReleaseChunkIterator$handle() { - return WebPDemuxReleaseChunkIterator.HANDLE; + public static MethodHandle strcspn$handle() { + return strcspn.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) + * unsigned long long strcspn(const char *_Str, const char *_Control) * } */ - public static MemorySegment WebPDemuxReleaseChunkIterator$address() { - return WebPDemuxReleaseChunkIterator.ADDR; + public static MemorySegment strcspn$address() { + return strcspn.ADDR; } /** * {@snippet lang=c : - * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) + * unsigned long long strcspn(const char *_Str, const char *_Control) * } */ - public static void WebPDemuxReleaseChunkIterator(MemorySegment iter) { - var mh$ = WebPDemuxReleaseChunkIterator.HANDLE; + public static long strcspn(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strcspn.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPDemuxReleaseChunkIterator", iter); + traceDowncall("strcspn", _Str, _Control); } - mh$.invokeExact(iter); + return (long)mh$.invokeExact(_Str, _Control); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderOptionsInitInternal { + private static class _strdup { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderOptionsInitInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_strdup"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10302,59 +9343,57 @@ private static class WebPAnimDecoderOptionsInitInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) + * char *_strdup(const char *_Source) * } */ - public static FunctionDescriptor WebPAnimDecoderOptionsInitInternal$descriptor() { - return WebPAnimDecoderOptionsInitInternal.DESC; + public static FunctionDescriptor _strdup$descriptor() { + return _strdup.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) + * char *_strdup(const char *_Source) * } */ - public static MethodHandle WebPAnimDecoderOptionsInitInternal$handle() { - return WebPAnimDecoderOptionsInitInternal.HANDLE; + public static MethodHandle _strdup$handle() { + return _strdup.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) + * char *_strdup(const char *_Source) * } */ - public static MemorySegment WebPAnimDecoderOptionsInitInternal$address() { - return WebPAnimDecoderOptionsInitInternal.ADDR; + public static MemorySegment _strdup$address() { + return _strdup.ADDR; } /** * {@snippet lang=c : - * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) + * char *_strdup(const char *_Source) * } */ - public static int WebPAnimDecoderOptionsInitInternal(MemorySegment x0, int x1) { - var mh$ = WebPAnimDecoderOptionsInitInternal.HANDLE; + public static MemorySegment _strdup(MemorySegment _Source) { + var mh$ = _strdup.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderOptionsInitInternal", x0, x1); + traceDowncall("_strdup", _Source); } - return (int)mh$.invokeExact(x0, x1); + return (MemorySegment)mh$.invokeExact(_Source); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderNewInternal { + private static class _strerror { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_POINTER, - demux_h.C_INT + demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderNewInternal"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_strerror"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10362,58 +9401,59 @@ private static class WebPAnimDecoderNewInternal { /** * Function descriptor for: * {@snippet lang=c : - * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) + * char *_strerror(const char *_ErrorMessage) * } */ - public static FunctionDescriptor WebPAnimDecoderNewInternal$descriptor() { - return WebPAnimDecoderNewInternal.DESC; + public static FunctionDescriptor _strerror$descriptor() { + return _strerror.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) + * char *_strerror(const char *_ErrorMessage) * } */ - public static MethodHandle WebPAnimDecoderNewInternal$handle() { - return WebPAnimDecoderNewInternal.HANDLE; + public static MethodHandle _strerror$handle() { + return _strerror.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) + * char *_strerror(const char *_ErrorMessage) * } */ - public static MemorySegment WebPAnimDecoderNewInternal$address() { - return WebPAnimDecoderNewInternal.ADDR; + public static MemorySegment _strerror$address() { + return _strerror.ADDR; } /** * {@snippet lang=c : - * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) + * char *_strerror(const char *_ErrorMessage) * } */ - public static MemorySegment WebPAnimDecoderNewInternal(MemorySegment x0, MemorySegment x1, int x2) { - var mh$ = WebPAnimDecoderNewInternal.HANDLE; + public static MemorySegment _strerror(MemorySegment _ErrorMessage) { + var mh$ = _strerror.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderNewInternal", x0, x1, x2); + traceDowncall("_strerror", _ErrorMessage); } - return (MemorySegment)mh$.invokeExact(x0, x1, x2); + return (MemorySegment)mh$.invokeExact(_ErrorMessage); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderGetInfo { + private static class _strerror_s { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, demux_h.C_POINTER, + demux_h.C_LONG_LONG, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetInfo"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_strerror_s"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10421,59 +9461,57 @@ private static class WebPAnimDecoderGetInfo { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) * } */ - public static FunctionDescriptor WebPAnimDecoderGetInfo$descriptor() { - return WebPAnimDecoderGetInfo.DESC; + public static FunctionDescriptor _strerror_s$descriptor() { + return _strerror_s.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) * } */ - public static MethodHandle WebPAnimDecoderGetInfo$handle() { - return WebPAnimDecoderGetInfo.HANDLE; + public static MethodHandle _strerror_s$handle() { + return _strerror_s.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) * } */ - public static MemorySegment WebPAnimDecoderGetInfo$address() { - return WebPAnimDecoderGetInfo.ADDR; + public static MemorySegment _strerror_s$address() { + return _strerror_s.ADDR; } /** * {@snippet lang=c : - * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) * } */ - public static int WebPAnimDecoderGetInfo(MemorySegment dec, MemorySegment info) { - var mh$ = WebPAnimDecoderGetInfo.HANDLE; + public static int _strerror_s(MemorySegment _Buffer, long _SizeInBytes, MemorySegment _ErrorMessage) { + var mh$ = _strerror_s.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderGetInfo", dec, info); + traceDowncall("_strerror_s", _Buffer, _SizeInBytes, _ErrorMessage); } - return (int)mh$.invokeExact(dec, info); + return (int)mh$.invokeExact(_Buffer, _SizeInBytes, _ErrorMessage); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderGetNext { + private static class strerror { public static final FunctionDescriptor DESC = FunctionDescriptor.of( - demux_h.C_INT, - demux_h.C_POINTER, demux_h.C_POINTER, - demux_h.C_POINTER + demux_h.C_INT ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetNext"); + public static final MemorySegment ADDR = demux_h.findOrThrow("strerror"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10481,57 +9519,58 @@ private static class WebPAnimDecoderGetNext { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) + * char *strerror(int _ErrorMessage) * } */ - public static FunctionDescriptor WebPAnimDecoderGetNext$descriptor() { - return WebPAnimDecoderGetNext.DESC; + public static FunctionDescriptor strerror$descriptor() { + return strerror.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) + * char *strerror(int _ErrorMessage) * } */ - public static MethodHandle WebPAnimDecoderGetNext$handle() { - return WebPAnimDecoderGetNext.HANDLE; + public static MethodHandle strerror$handle() { + return strerror.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) + * char *strerror(int _ErrorMessage) * } */ - public static MemorySegment WebPAnimDecoderGetNext$address() { - return WebPAnimDecoderGetNext.ADDR; + public static MemorySegment strerror$address() { + return strerror.ADDR; } /** * {@snippet lang=c : - * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) + * char *strerror(int _ErrorMessage) * } */ - public static int WebPAnimDecoderGetNext(MemorySegment dec, MemorySegment buf, MemorySegment timestamp) { - var mh$ = WebPAnimDecoderGetNext.HANDLE; + public static MemorySegment strerror(int _ErrorMessage) { + var mh$ = strerror.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderGetNext", dec, buf, timestamp); + traceDowncall("strerror", _ErrorMessage); } - return (int)mh$.invokeExact(dec, buf, timestamp); + return (MemorySegment)mh$.invokeExact(_ErrorMessage); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderHasMoreFrames { + private static class _stricmp { public static final FunctionDescriptor DESC = FunctionDescriptor.of( demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderHasMoreFrames"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_stricmp"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10539,56 +9578,58 @@ private static class WebPAnimDecoderHasMoreFrames { /** * Function descriptor for: * {@snippet lang=c : - * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) + * int _stricmp(const char *_String1, const char *_String2) * } */ - public static FunctionDescriptor WebPAnimDecoderHasMoreFrames$descriptor() { - return WebPAnimDecoderHasMoreFrames.DESC; + public static FunctionDescriptor _stricmp$descriptor() { + return _stricmp.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) + * int _stricmp(const char *_String1, const char *_String2) * } */ - public static MethodHandle WebPAnimDecoderHasMoreFrames$handle() { - return WebPAnimDecoderHasMoreFrames.HANDLE; + public static MethodHandle _stricmp$handle() { + return _stricmp.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) + * int _stricmp(const char *_String1, const char *_String2) * } */ - public static MemorySegment WebPAnimDecoderHasMoreFrames$address() { - return WebPAnimDecoderHasMoreFrames.ADDR; + public static MemorySegment _stricmp$address() { + return _stricmp.ADDR; } /** * {@snippet lang=c : - * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) + * int _stricmp(const char *_String1, const char *_String2) * } */ - public static int WebPAnimDecoderHasMoreFrames(MemorySegment dec) { - var mh$ = WebPAnimDecoderHasMoreFrames.HANDLE; + public static int _stricmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _stricmp.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderHasMoreFrames", dec); + traceDowncall("_stricmp", _String1, _String2); } - return (int)mh$.invokeExact(dec); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderReset { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _stricoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderReset"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_stricoll"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10596,57 +9637,59 @@ private static class WebPAnimDecoderReset { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) + * int _stricoll(const char *_String1, const char *_String2) * } */ - public static FunctionDescriptor WebPAnimDecoderReset$descriptor() { - return WebPAnimDecoderReset.DESC; + public static FunctionDescriptor _stricoll$descriptor() { + return _stricoll.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) + * int _stricoll(const char *_String1, const char *_String2) * } */ - public static MethodHandle WebPAnimDecoderReset$handle() { - return WebPAnimDecoderReset.HANDLE; + public static MethodHandle _stricoll$handle() { + return _stricoll.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) + * int _stricoll(const char *_String1, const char *_String2) * } */ - public static MemorySegment WebPAnimDecoderReset$address() { - return WebPAnimDecoderReset.ADDR; + public static MemorySegment _stricoll$address() { + return _stricoll.ADDR; } /** * {@snippet lang=c : - * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) + * int _stricoll(const char *_String1, const char *_String2) * } */ - public static void WebPAnimDecoderReset(MemorySegment dec) { - var mh$ = WebPAnimDecoderReset.HANDLE; + public static int _stricoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _stricoll.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderReset", dec); + traceDowncall("_stricoll", _String1, _String2); } - mh$.invokeExact(dec); + return (int)mh$.invokeExact(_String1, _String2); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderGetDemuxer { + private static class _stricoll_l { public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetDemuxer"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_stricoll_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10654,56 +9697,59 @@ private static class WebPAnimDecoderGetDemuxer { /** * Function descriptor for: * {@snippet lang=c : - * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor WebPAnimDecoderGetDemuxer$descriptor() { - return WebPAnimDecoderGetDemuxer.DESC; + public static FunctionDescriptor _stricoll_l$descriptor() { + return _stricoll_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MethodHandle WebPAnimDecoderGetDemuxer$handle() { - return WebPAnimDecoderGetDemuxer.HANDLE; + public static MethodHandle _stricoll_l$handle() { + return _stricoll_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MemorySegment WebPAnimDecoderGetDemuxer$address() { - return WebPAnimDecoderGetDemuxer.ADDR; + public static MemorySegment _stricoll_l$address() { + return _stricoll_l.ADDR; } /** * {@snippet lang=c : - * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MemorySegment WebPAnimDecoderGetDemuxer(MemorySegment dec) { - var mh$ = WebPAnimDecoderGetDemuxer.HANDLE; + public static int _stricoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _stricoll_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderGetDemuxer", dec); + traceDowncall("_stricoll_l", _String1, _String2, _Locale); } - return (MemorySegment)mh$.invokeExact(dec); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static class WebPAnimDecoderDelete { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + private static class _stricmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, demux_h.C_POINTER ); - public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderDelete"); + public static final MemorySegment ADDR = demux_h.findOrThrow("_stricmp_l"); public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } @@ -10711,3021 +9757,3805 @@ private static class WebPAnimDecoderDelete { /** * Function descriptor for: * {@snippet lang=c : - * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static FunctionDescriptor WebPAnimDecoderDelete$descriptor() { - return WebPAnimDecoderDelete.DESC; + public static FunctionDescriptor _stricmp_l$descriptor() { + return _stricmp_l.DESC; } /** * Downcall method handle for: * {@snippet lang=c : - * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MethodHandle WebPAnimDecoderDelete$handle() { - return WebPAnimDecoderDelete.HANDLE; + public static MethodHandle _stricmp_l$handle() { + return _stricmp_l.HANDLE; } /** * Address for: * {@snippet lang=c : - * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static MemorySegment WebPAnimDecoderDelete$address() { - return WebPAnimDecoderDelete.ADDR; + public static MemorySegment _stricmp_l$address() { + return _stricmp_l.ADDR; } /** * {@snippet lang=c : - * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) * } */ - public static void WebPAnimDecoderDelete(MemorySegment dec) { - var mh$ = WebPAnimDecoderDelete.HANDLE; + public static int _stricmp_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _stricmp_l.HANDLE; try { if (TRACE_DOWNCALLS) { - traceDowncall("WebPAnimDecoderDelete", dec); + traceDowncall("_stricmp_l", _String1, _String2, _Locale); } - mh$.invokeExact(dec); + return (int)mh$.invokeExact(_String1, _String2, _Locale); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } } - private static final MemorySegment NULL = MemorySegment.ofAddress(0L); - /** - * {@snippet lang=c : - * #define NULL (void*) 0 - * } - */ - public static MemorySegment NULL() { - return NULL; - } - /** - * {@snippet lang=c : - * #define __PRI_8_LENGTH_MODIFIER__ "hh" - * } - */ - public static MemorySegment __PRI_8_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_8_LENGTH_MODIFIER__ - = demux_h.LIBRARY_ARENA.allocateFrom("hh"); - } - return Holder.__PRI_8_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __PRI_64_LENGTH_MODIFIER__ "ll" - * } - */ - public static MemorySegment __PRI_64_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_64_LENGTH_MODIFIER__ - = demux_h.LIBRARY_ARENA.allocateFrom("ll"); - } - return Holder.__PRI_64_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __SCN_64_LENGTH_MODIFIER__ "ll" - * } - */ - public static MemorySegment __SCN_64_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __SCN_64_LENGTH_MODIFIER__ - = demux_h.LIBRARY_ARENA.allocateFrom("ll"); - } - return Holder.__SCN_64_LENGTH_MODIFIER__; + + private static class strlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strlen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } + /** + * Function descriptor for: * {@snippet lang=c : - * #define __PRI_MAX_LENGTH_MODIFIER__ "j" + * unsigned long long strlen(const char *_Str) * } */ - public static MemorySegment __PRI_MAX_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_MAX_LENGTH_MODIFIER__ - = demux_h.LIBRARY_ARENA.allocateFrom("j"); - } - return Holder.__PRI_MAX_LENGTH_MODIFIER__; + public static FunctionDescriptor strlen$descriptor() { + return strlen.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __SCN_MAX_LENGTH_MODIFIER__ "j" + * unsigned long long strlen(const char *_Str) * } */ - public static MemorySegment __SCN_MAX_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __SCN_MAX_LENGTH_MODIFIER__ - = demux_h.LIBRARY_ARENA.allocateFrom("j"); - } - return Holder.__SCN_MAX_LENGTH_MODIFIER__; + public static MethodHandle strlen$handle() { + return strlen.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRId8 "hhd" + * unsigned long long strlen(const char *_Str) * } */ - public static MemorySegment PRId8() { - class Holder { - static final MemorySegment PRId8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRId8; + public static MemorySegment strlen$address() { + return strlen.ADDR; } + /** * {@snippet lang=c : - * #define PRIi8 "hhi" + * unsigned long long strlen(const char *_Str) * } */ - public static MemorySegment PRIi8() { - class Holder { - static final MemorySegment PRIi8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); + public static long strlen(MemorySegment _Str) { + var mh$ = strlen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strlen", _Str); + } + return (long)mh$.invokeExact(_Str); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIi8; } - /** - * {@snippet lang=c : - * #define PRIo8 "hho" - * } - */ - public static MemorySegment PRIo8() { - class Holder { - static final MemorySegment PRIo8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.PRIo8; + + private static class _strlwr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strlwr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIu8 "hhu" + * errno_t _strlwr_s(char *_String, size_t _Size) * } */ - public static MemorySegment PRIu8() { - class Holder { - static final MemorySegment PRIu8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIu8; + public static FunctionDescriptor _strlwr_s$descriptor() { + return _strlwr_s.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIx8 "hhx" + * errno_t _strlwr_s(char *_String, size_t _Size) * } */ - public static MemorySegment PRIx8() { - class Holder { - static final MemorySegment PRIx8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIx8; + public static MethodHandle _strlwr_s$handle() { + return _strlwr_s.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIX8 "hhX" + * errno_t _strlwr_s(char *_String, size_t _Size) * } */ - public static MemorySegment PRIX8() { - class Holder { - static final MemorySegment PRIX8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIX8; + public static MemorySegment _strlwr_s$address() { + return _strlwr_s.ADDR; } + /** * {@snippet lang=c : - * #define PRId16 "hd" + * errno_t _strlwr_s(char *_String, size_t _Size) * } */ - public static MemorySegment PRId16() { - class Holder { - static final MemorySegment PRId16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); + public static int _strlwr_s(MemorySegment _String, long _Size) { + var mh$ = _strlwr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_s", _String, _Size); + } + return (int)mh$.invokeExact(_String, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRId16; } + + private static class _strlwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strlwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIi16 "hi" + * char *_strlwr(char *_String) * } */ - public static MemorySegment PRIi16() { - class Holder { - static final MemorySegment PRIi16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIi16; + public static FunctionDescriptor _strlwr$descriptor() { + return _strlwr.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIo16 "ho" + * char *_strlwr(char *_String) * } */ - public static MemorySegment PRIo16() { - class Holder { - static final MemorySegment PRIo16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIo16; + public static MethodHandle _strlwr$handle() { + return _strlwr.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIu16 "hu" + * char *_strlwr(char *_String) * } */ - public static MemorySegment PRIu16() { - class Holder { - static final MemorySegment PRIu16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIu16; + public static MemorySegment _strlwr$address() { + return _strlwr.ADDR; } + /** * {@snippet lang=c : - * #define PRIx16 "hx" + * char *_strlwr(char *_String) * } */ - public static MemorySegment PRIx16() { - class Holder { - static final MemorySegment PRIx16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); + public static MemorySegment _strlwr(MemorySegment _String) { + var mh$ = _strlwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIx16; } + + private static class _strlwr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strlwr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIX16 "hX" + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment PRIX16() { - class Holder { - static final MemorySegment PRIX16 - = demux_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIX16; + public static FunctionDescriptor _strlwr_s_l$descriptor() { + return _strlwr_s_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRId32 "d" + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment PRId32() { - class Holder { - static final MemorySegment PRId32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRId32; + public static MethodHandle _strlwr_s_l$handle() { + return _strlwr_s_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIi32 "i" + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment PRIi32() { - class Holder { - static final MemorySegment PRIi32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIi32; + public static MemorySegment _strlwr_s_l$address() { + return _strlwr_s_l.ADDR; } + /** * {@snippet lang=c : - * #define PRIo32 "o" + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment PRIo32() { - class Holder { - static final MemorySegment PRIo32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); + public static int _strlwr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _strlwr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_s_l", _String, _Size, _Locale); + } + return (int)mh$.invokeExact(_String, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIo32; } + + private static class _strlwr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strlwr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIu32 "u" + * char *_strlwr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment PRIu32() { - class Holder { - static final MemorySegment PRIu32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIu32; + public static FunctionDescriptor _strlwr_l$descriptor() { + return _strlwr_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIx32 "x" + * char *_strlwr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment PRIx32() { - class Holder { - static final MemorySegment PRIx32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIx32; + public static MethodHandle _strlwr_l$handle() { + return _strlwr_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIX32 "X" + * char *_strlwr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment PRIX32() { - class Holder { - static final MemorySegment PRIX32 - = demux_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIX32; + public static MemorySegment _strlwr_l$address() { + return _strlwr_l.ADDR; } + /** * {@snippet lang=c : - * #define PRId64 "lld" + * char *_strlwr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment PRId64() { - class Holder { - static final MemorySegment PRId64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); + public static MemorySegment _strlwr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _strlwr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRId64; } + + private static class strncat { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strncat"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIi64 "lli" + * char *strncat(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIi64() { - class Holder { - static final MemorySegment PRIi64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIi64; + public static FunctionDescriptor strncat$descriptor() { + return strncat.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIo64 "llo" + * char *strncat(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIo64() { - class Holder { - static final MemorySegment PRIo64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIo64; + public static MethodHandle strncat$handle() { + return strncat.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIu64 "llu" + * char *strncat(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIu64() { - class Holder { - static final MemorySegment PRIu64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIu64; + public static MemorySegment strncat$address() { + return strncat.ADDR; } + /** * {@snippet lang=c : - * #define PRIx64 "llx" + * char *strncat(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIx64() { - class Holder { - static final MemorySegment PRIx64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); + public static MemorySegment strncat(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = strncat.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncat", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIx64; } + + private static class strncmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strncmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIX64 "llX" + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) * } */ - public static MemorySegment PRIX64() { - class Holder { - static final MemorySegment PRIX64 - = demux_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIX64; + public static FunctionDescriptor strncmp$descriptor() { + return strncmp.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIdLEAST8 "hhd" + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) * } */ - public static MemorySegment PRIdLEAST8() { - class Holder { - static final MemorySegment PRIdLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRIdLEAST8; + public static MethodHandle strncmp$handle() { + return strncmp.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIiLEAST8 "hhi" + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) * } */ - public static MemorySegment PRIiLEAST8() { - class Holder { - static final MemorySegment PRIiLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.PRIiLEAST8; + public static MemorySegment strncmp$address() { + return strncmp.ADDR; } + /** * {@snippet lang=c : - * #define PRIoLEAST8 "hho" + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) * } */ - public static MemorySegment PRIoLEAST8() { - class Holder { - static final MemorySegment PRIoLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); + public static int strncmp(MemorySegment _Str1, MemorySegment _Str2, long _MaxCount) { + var mh$ = strncmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncmp", _Str1, _Str2, _MaxCount); + } + return (int)mh$.invokeExact(_Str1, _Str2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIoLEAST8; } + + private static class _strnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIuLEAST8 "hhu" + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIuLEAST8() { - class Holder { - static final MemorySegment PRIuLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIuLEAST8; + public static FunctionDescriptor _strnicmp$descriptor() { + return _strnicmp.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIxLEAST8 "hhx" + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIxLEAST8() { - class Holder { - static final MemorySegment PRIxLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIxLEAST8; + public static MethodHandle _strnicmp$handle() { + return _strnicmp.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIXLEAST8 "hhX" + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIXLEAST8() { - class Holder { - static final MemorySegment PRIXLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIXLEAST8; + public static MemorySegment _strnicmp$address() { + return _strnicmp.ADDR; } + /** * {@snippet lang=c : - * #define PRIdLEAST16 "hd" + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIdLEAST16() { - class Holder { - static final MemorySegment PRIdLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); + public static int _strnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIdLEAST16; } + + private static class _strnicmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnicmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIiLEAST16 "hi" + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIiLEAST16() { - class Holder { - static final MemorySegment PRIiLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIiLEAST16; + public static FunctionDescriptor _strnicmp_l$descriptor() { + return _strnicmp_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIoLEAST16 "ho" + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIoLEAST16() { - class Holder { - static final MemorySegment PRIoLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIoLEAST16; + public static MethodHandle _strnicmp_l$handle() { + return _strnicmp_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIuLEAST16 "hu" + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIuLEAST16() { - class Holder { - static final MemorySegment PRIuLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIuLEAST16; + public static MemorySegment _strnicmp_l$address() { + return _strnicmp_l.ADDR; } + /** * {@snippet lang=c : - * #define PRIxLEAST16 "hx" + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIxLEAST16() { - class Holder { - static final MemorySegment PRIxLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); + public static int _strnicmp_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strnicmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicmp_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIxLEAST16; } + + private static class _strnicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIXLEAST16 "hX" + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIXLEAST16() { - class Holder { - static final MemorySegment PRIXLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIXLEAST16; + public static FunctionDescriptor _strnicoll$descriptor() { + return _strnicoll.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIdLEAST32 "d" + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIdLEAST32() { - class Holder { - static final MemorySegment PRIdLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRIdLEAST32; + public static MethodHandle _strnicoll$handle() { + return _strnicoll.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIiLEAST32 "i" + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIiLEAST32() { - class Holder { - static final MemorySegment PRIiLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIiLEAST32; + public static MemorySegment _strnicoll$address() { + return _strnicoll.ADDR; } + /** * {@snippet lang=c : - * #define PRIoLEAST32 "o" + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIoLEAST32() { - class Holder { - static final MemorySegment PRIoLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); + public static int _strnicoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strnicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIoLEAST32; } + + private static class _strnicoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnicoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIuLEAST32 "u" + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIuLEAST32() { - class Holder { - static final MemorySegment PRIuLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIuLEAST32; + public static FunctionDescriptor _strnicoll_l$descriptor() { + return _strnicoll_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIxLEAST32 "x" + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIxLEAST32() { - class Holder { - static final MemorySegment PRIxLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIxLEAST32; + public static MethodHandle _strnicoll_l$handle() { + return _strnicoll_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIXLEAST32 "X" + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIXLEAST32() { - class Holder { - static final MemorySegment PRIXLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIXLEAST32; + public static MemorySegment _strnicoll_l$address() { + return _strnicoll_l.ADDR; } + /** * {@snippet lang=c : - * #define PRIdLEAST64 "lld" + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIdLEAST64() { - class Holder { - static final MemorySegment PRIdLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); + public static int _strnicoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strnicoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIdLEAST64; } + + private static class _strncoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strncoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIiLEAST64 "lli" + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIiLEAST64() { - class Holder { - static final MemorySegment PRIiLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIiLEAST64; + public static FunctionDescriptor _strncoll$descriptor() { + return _strncoll.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIoLEAST64 "llo" + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIoLEAST64() { - class Holder { - static final MemorySegment PRIoLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIoLEAST64; + public static MethodHandle _strncoll$handle() { + return _strncoll.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIuLEAST64 "llu" + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIuLEAST64() { - class Holder { - static final MemorySegment PRIuLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIuLEAST64; + public static MemorySegment _strncoll$address() { + return _strncoll.ADDR; } + /** * {@snippet lang=c : - * #define PRIxLEAST64 "llx" + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment PRIxLEAST64() { - class Holder { - static final MemorySegment PRIxLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); + public static int _strncoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strncoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strncoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIxLEAST64; } + + private static class _strncoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strncoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIXLEAST64 "llX" + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIXLEAST64() { - class Holder { - static final MemorySegment PRIXLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIXLEAST64; + public static FunctionDescriptor _strncoll_l$descriptor() { + return _strncoll_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIdFAST8 "hhd" + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIdFAST8() { - class Holder { - static final MemorySegment PRIdFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRIdFAST8; + public static MethodHandle _strncoll_l$handle() { + return _strncoll_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIiFAST8 "hhi" + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIiFAST8() { - class Holder { - static final MemorySegment PRIiFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.PRIiFAST8; + public static MemorySegment _strncoll_l$address() { + return _strncoll_l.ADDR; } + /** * {@snippet lang=c : - * #define PRIoFAST8 "hho" + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment PRIoFAST8() { - class Holder { - static final MemorySegment PRIoFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); + public static int _strncoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strncoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strncoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIoFAST8; } + + private static class __strncnt { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("__strncnt"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIuFAST8 "hhu" + * size_t __strncnt(const char *_String, size_t _Count) * } */ - public static MemorySegment PRIuFAST8() { - class Holder { - static final MemorySegment PRIuFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIuFAST8; + public static FunctionDescriptor __strncnt$descriptor() { + return __strncnt.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIxFAST8 "hhx" + * size_t __strncnt(const char *_String, size_t _Count) * } */ - public static MemorySegment PRIxFAST8() { - class Holder { - static final MemorySegment PRIxFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIxFAST8; + public static MethodHandle __strncnt$handle() { + return __strncnt.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIXFAST8 "hhX" + * size_t __strncnt(const char *_String, size_t _Count) * } */ - public static MemorySegment PRIXFAST8() { - class Holder { - static final MemorySegment PRIXFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIXFAST8; + public static MemorySegment __strncnt$address() { + return __strncnt.ADDR; } + /** * {@snippet lang=c : - * #define PRIdFAST16 "hd" + * size_t __strncnt(const char *_String, size_t _Count) * } */ - public static MemorySegment PRIdFAST16() { - class Holder { - static final MemorySegment PRIdFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); + public static long __strncnt(MemorySegment _String, long _Count) { + var mh$ = __strncnt.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__strncnt", _String, _Count); + } + return (long)mh$.invokeExact(_String, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIdFAST16; } + + private static class strncpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strncpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIiFAST16 "hi" + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIiFAST16() { - class Holder { - static final MemorySegment PRIiFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIiFAST16; + public static FunctionDescriptor strncpy$descriptor() { + return strncpy.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIoFAST16 "ho" + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIoFAST16() { - class Holder { - static final MemorySegment PRIoFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIoFAST16; + public static MethodHandle strncpy$handle() { + return strncpy.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIuFAST16 "hu" + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIuFAST16() { - class Holder { - static final MemorySegment PRIuFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIuFAST16; + public static MemorySegment strncpy$address() { + return strncpy.ADDR; } + /** * {@snippet lang=c : - * #define PRIxFAST16 "hx" + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) * } */ - public static MemorySegment PRIxFAST16() { - class Holder { - static final MemorySegment PRIxFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); + public static MemorySegment strncpy(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = strncpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncpy", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIxFAST16; } + + private static class strnlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strnlen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIXFAST16 "hX" + * size_t strnlen(const char *_String, size_t _MaxCount) * } */ - public static MemorySegment PRIXFAST16() { - class Holder { - static final MemorySegment PRIXFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIXFAST16; + public static FunctionDescriptor strnlen$descriptor() { + return strnlen.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIdFAST32 "d" + * size_t strnlen(const char *_String, size_t _MaxCount) * } */ - public static MemorySegment PRIdFAST32() { - class Holder { - static final MemorySegment PRIdFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRIdFAST32; + public static MethodHandle strnlen$handle() { + return strnlen.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIiFAST32 "i" + * size_t strnlen(const char *_String, size_t _MaxCount) * } */ - public static MemorySegment PRIiFAST32() { - class Holder { - static final MemorySegment PRIiFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIiFAST32; + public static MemorySegment strnlen$address() { + return strnlen.ADDR; } + /** * {@snippet lang=c : - * #define PRIoFAST32 "o" + * size_t strnlen(const char *_String, size_t _MaxCount) * } */ - public static MemorySegment PRIoFAST32() { - class Holder { - static final MemorySegment PRIoFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); + public static long strnlen(MemorySegment _String, long _MaxCount) { + var mh$ = strnlen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnlen", _String, _MaxCount); + } + return (long)mh$.invokeExact(_String, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIoFAST32; } + + private static class _strnset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIuFAST32 "u" + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) * } */ - public static MemorySegment PRIuFAST32() { - class Holder { - static final MemorySegment PRIuFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIuFAST32; + public static FunctionDescriptor _strnset_s$descriptor() { + return _strnset_s.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIxFAST32 "x" + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) * } */ - public static MemorySegment PRIxFAST32() { - class Holder { - static final MemorySegment PRIxFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIxFAST32; + public static MethodHandle _strnset_s$handle() { + return _strnset_s.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIXFAST32 "X" + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) * } */ - public static MemorySegment PRIXFAST32() { - class Holder { - static final MemorySegment PRIXFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIXFAST32; + public static MemorySegment _strnset_s$address() { + return _strnset_s.ADDR; } + /** * {@snippet lang=c : - * #define PRIdFAST64 "lld" + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) * } */ - public static MemorySegment PRIdFAST64() { - class Holder { - static final MemorySegment PRIdFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); + public static int _strnset_s(MemorySegment _String, long _SizeInBytes, int _Value, long _MaxCount) { + var mh$ = _strnset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnset_s", _String, _SizeInBytes, _Value, _MaxCount); + } + return (int)mh$.invokeExact(_String, _SizeInBytes, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIdFAST64; } + + private static class _strnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIiFAST64 "lli" + * char *_strnset(char *_Destination, int _Value, size_t _Count) * } */ - public static MemorySegment PRIiFAST64() { - class Holder { - static final MemorySegment PRIiFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIiFAST64; + public static FunctionDescriptor _strnset$descriptor() { + return _strnset.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIoFAST64 "llo" + * char *_strnset(char *_Destination, int _Value, size_t _Count) * } */ - public static MemorySegment PRIoFAST64() { - class Holder { - static final MemorySegment PRIoFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIoFAST64; + public static MethodHandle _strnset$handle() { + return _strnset.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIuFAST64 "llu" + * char *_strnset(char *_Destination, int _Value, size_t _Count) * } */ - public static MemorySegment PRIuFAST64() { - class Holder { - static final MemorySegment PRIuFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIuFAST64; + public static MemorySegment _strnset$address() { + return _strnset.ADDR; } + /** * {@snippet lang=c : - * #define PRIxFAST64 "llx" + * char *_strnset(char *_Destination, int _Value, size_t _Count) * } */ - public static MemorySegment PRIxFAST64() { - class Holder { - static final MemorySegment PRIxFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); + public static MemorySegment _strnset(MemorySegment _Destination, int _Value, long _Count) { + var mh$ = _strnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnset", _Destination, _Value, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Value, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIxFAST64; } + + private static class strpbrk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strpbrk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIXFAST64 "llX" + * char *strpbrk(const char *_Str, const char *_Control) * } */ - public static MemorySegment PRIXFAST64() { - class Holder { - static final MemorySegment PRIXFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIXFAST64; + public static FunctionDescriptor strpbrk$descriptor() { + return strpbrk.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIdPTR "ld" + * char *strpbrk(const char *_Str, const char *_Control) * } */ - public static MemorySegment PRIdPTR() { - class Holder { - static final MemorySegment PRIdPTR - = demux_h.LIBRARY_ARENA.allocateFrom("ld"); - } - return Holder.PRIdPTR; + public static MethodHandle strpbrk$handle() { + return strpbrk.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIiPTR "li" + * char *strpbrk(const char *_Str, const char *_Control) * } */ - public static MemorySegment PRIiPTR() { - class Holder { - static final MemorySegment PRIiPTR - = demux_h.LIBRARY_ARENA.allocateFrom("li"); - } - return Holder.PRIiPTR; + public static MemorySegment strpbrk$address() { + return strpbrk.ADDR; } + /** * {@snippet lang=c : - * #define PRIoPTR "lo" + * char *strpbrk(const char *_Str, const char *_Control) * } */ - public static MemorySegment PRIoPTR() { - class Holder { - static final MemorySegment PRIoPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lo"); + public static MemorySegment strpbrk(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strpbrk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strpbrk", _Str, _Control); + } + return (MemorySegment)mh$.invokeExact(_Str, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIoPTR; } + + private static class _strrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIuPTR "lu" + * char *_strrev(char *_Str) * } */ - public static MemorySegment PRIuPTR() { - class Holder { - static final MemorySegment PRIuPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lu"); - } - return Holder.PRIuPTR; + public static FunctionDescriptor _strrev$descriptor() { + return _strrev.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIxPTR "lx" + * char *_strrev(char *_Str) * } */ - public static MemorySegment PRIxPTR() { - class Holder { - static final MemorySegment PRIxPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lx"); - } - return Holder.PRIxPTR; + public static MethodHandle _strrev$handle() { + return _strrev.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIXPTR "lX" + * char *_strrev(char *_Str) * } */ - public static MemorySegment PRIXPTR() { - class Holder { - static final MemorySegment PRIXPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lX"); - } - return Holder.PRIXPTR; + public static MemorySegment _strrev$address() { + return _strrev.ADDR; } + /** * {@snippet lang=c : - * #define PRIdMAX "jd" + * char *_strrev(char *_Str) * } */ - public static MemorySegment PRIdMAX() { - class Holder { - static final MemorySegment PRIdMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jd"); + public static MemorySegment _strrev(MemorySegment _Str) { + var mh$ = _strrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strrev", _Str); + } + return (MemorySegment)mh$.invokeExact(_Str); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIdMAX; } + + private static class _strset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIiMAX "ji" + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) * } */ - public static MemorySegment PRIiMAX() { - class Holder { - static final MemorySegment PRIiMAX - = demux_h.LIBRARY_ARENA.allocateFrom("ji"); - } - return Holder.PRIiMAX; + public static FunctionDescriptor _strset_s$descriptor() { + return _strset_s.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define PRIoMAX "jo" + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) * } */ - public static MemorySegment PRIoMAX() { - class Holder { - static final MemorySegment PRIoMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jo"); - } - return Holder.PRIoMAX; + public static MethodHandle _strset_s$handle() { + return _strset_s.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define PRIuMAX "ju" + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) * } */ - public static MemorySegment PRIuMAX() { - class Holder { - static final MemorySegment PRIuMAX - = demux_h.LIBRARY_ARENA.allocateFrom("ju"); - } - return Holder.PRIuMAX; + public static MemorySegment _strset_s$address() { + return _strset_s.ADDR; } + /** * {@snippet lang=c : - * #define PRIxMAX "jx" + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) * } */ - public static MemorySegment PRIxMAX() { - class Holder { - static final MemorySegment PRIxMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jx"); + public static int _strset_s(MemorySegment _Destination, long _DestinationSize, int _Value) { + var mh$ = _strset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strset_s", _Destination, _DestinationSize, _Value); + } + return (int)mh$.invokeExact(_Destination, _DestinationSize, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.PRIxMAX; } + + private static class _strset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define PRIXMAX "jX" + * char *_strset(char *_Destination, int _Value) * } */ - public static MemorySegment PRIXMAX() { - class Holder { - static final MemorySegment PRIXMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jX"); - } - return Holder.PRIXMAX; + public static FunctionDescriptor _strset$descriptor() { + return _strset.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNd8 "hhd" + * char *_strset(char *_Destination, int _Value) * } */ - public static MemorySegment SCNd8() { - class Holder { - static final MemorySegment SCNd8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNd8; + public static MethodHandle _strset$handle() { + return _strset.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNi8 "hhi" + * char *_strset(char *_Destination, int _Value) * } */ - public static MemorySegment SCNi8() { - class Holder { - static final MemorySegment SCNi8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNi8; + public static MemorySegment _strset$address() { + return _strset.ADDR; } + /** * {@snippet lang=c : - * #define SCNo8 "hho" + * char *_strset(char *_Destination, int _Value) * } */ - public static MemorySegment SCNo8() { - class Holder { - static final MemorySegment SCNo8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); + public static MemorySegment _strset(MemorySegment _Destination, int _Value) { + var mh$ = _strset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strset", _Destination, _Value); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNo8; } + + private static class strspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strspn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNu8 "hhu" + * unsigned long long strspn(const char *_Str, const char *_Control) * } */ - public static MemorySegment SCNu8() { - class Holder { - static final MemorySegment SCNu8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNu8; + public static FunctionDescriptor strspn$descriptor() { + return strspn.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNx8 "hhx" + * unsigned long long strspn(const char *_Str, const char *_Control) * } */ - public static MemorySegment SCNx8() { - class Holder { - static final MemorySegment SCNx8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNx8; + public static MethodHandle strspn$handle() { + return strspn.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNd16 "hd" + * unsigned long long strspn(const char *_Str, const char *_Control) * } */ - public static MemorySegment SCNd16() { - class Holder { - static final MemorySegment SCNd16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNd16; + public static MemorySegment strspn$address() { + return strspn.ADDR; } + /** * {@snippet lang=c : - * #define SCNi16 "hi" + * unsigned long long strspn(const char *_Str, const char *_Control) * } */ - public static MemorySegment SCNi16() { - class Holder { - static final MemorySegment SCNi16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); + public static long strspn(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strspn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strspn", _Str, _Control); + } + return (long)mh$.invokeExact(_Str, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNi16; } + + private static class strtok { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strtok"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNo16 "ho" + * char *strtok(char *_String, const char *_Delimiter) * } */ - public static MemorySegment SCNo16() { - class Holder { - static final MemorySegment SCNo16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNo16; + public static FunctionDescriptor strtok$descriptor() { + return strtok.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNu16 "hu" + * char *strtok(char *_String, const char *_Delimiter) * } */ - public static MemorySegment SCNu16() { - class Holder { - static final MemorySegment SCNu16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNu16; + public static MethodHandle strtok$handle() { + return strtok.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNx16 "hx" + * char *strtok(char *_String, const char *_Delimiter) * } */ - public static MemorySegment SCNx16() { - class Holder { - static final MemorySegment SCNx16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNx16; + public static MemorySegment strtok$address() { + return strtok.ADDR; } + /** * {@snippet lang=c : - * #define SCNd32 "d" + * char *strtok(char *_String, const char *_Delimiter) * } */ - public static MemorySegment SCNd32() { - class Holder { - static final MemorySegment SCNd32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); + public static MemorySegment strtok(MemorySegment _String, MemorySegment _Delimiter) { + var mh$ = strtok.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strtok", _String, _Delimiter); + } + return (MemorySegment)mh$.invokeExact(_String, _Delimiter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNd32; } + + private static class _strupr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strupr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNi32 "i" + * errno_t _strupr_s(char *_String, size_t _Size) * } */ - public static MemorySegment SCNi32() { - class Holder { - static final MemorySegment SCNi32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNi32; + public static FunctionDescriptor _strupr_s$descriptor() { + return _strupr_s.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNo32 "o" + * errno_t _strupr_s(char *_String, size_t _Size) * } */ - public static MemorySegment SCNo32() { - class Holder { - static final MemorySegment SCNo32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNo32; + public static MethodHandle _strupr_s$handle() { + return _strupr_s.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNu32 "u" + * errno_t _strupr_s(char *_String, size_t _Size) * } */ - public static MemorySegment SCNu32() { - class Holder { - static final MemorySegment SCNu32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNu32; + public static MemorySegment _strupr_s$address() { + return _strupr_s.ADDR; } + /** * {@snippet lang=c : - * #define SCNx32 "x" + * errno_t _strupr_s(char *_String, size_t _Size) * } */ - public static MemorySegment SCNx32() { - class Holder { - static final MemorySegment SCNx32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); + public static int _strupr_s(MemorySegment _String, long _Size) { + var mh$ = _strupr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_s", _String, _Size); + } + return (int)mh$.invokeExact(_String, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNx32; } + + private static class _strupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNd64 "lld" + * char *_strupr(char *_String) * } */ - public static MemorySegment SCNd64() { - class Holder { - static final MemorySegment SCNd64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNd64; + public static FunctionDescriptor _strupr$descriptor() { + return _strupr.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNi64 "lli" + * char *_strupr(char *_String) * } */ - public static MemorySegment SCNi64() { - class Holder { - static final MemorySegment SCNi64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNi64; + public static MethodHandle _strupr$handle() { + return _strupr.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNo64 "llo" + * char *_strupr(char *_String) * } */ - public static MemorySegment SCNo64() { - class Holder { - static final MemorySegment SCNo64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNo64; + public static MemorySegment _strupr$address() { + return _strupr.ADDR; } + /** * {@snippet lang=c : - * #define SCNu64 "llu" + * char *_strupr(char *_String) * } */ - public static MemorySegment SCNu64() { - class Holder { - static final MemorySegment SCNu64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); + public static MemorySegment _strupr(MemorySegment _String) { + var mh$ = _strupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNu64; } + + private static class _strupr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strupr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNx64 "llx" + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment SCNx64() { - class Holder { - static final MemorySegment SCNx64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNx64; + public static FunctionDescriptor _strupr_s_l$descriptor() { + return _strupr_s_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNdLEAST8 "hhd" + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment SCNdLEAST8() { - class Holder { - static final MemorySegment SCNdLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNdLEAST8; + public static MethodHandle _strupr_s_l$handle() { + return _strupr_s_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNiLEAST8 "hhi" + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment SCNiLEAST8() { - class Holder { - static final MemorySegment SCNiLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNiLEAST8; + public static MemorySegment _strupr_s_l$address() { + return _strupr_s_l.ADDR; } + /** * {@snippet lang=c : - * #define SCNoLEAST8 "hho" + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) * } */ - public static MemorySegment SCNoLEAST8() { - class Holder { - static final MemorySegment SCNoLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); + public static int _strupr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _strupr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_s_l", _String, _Size, _Locale); + } + return (int)mh$.invokeExact(_String, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNoLEAST8; } + + private static class _strupr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strupr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNuLEAST8 "hhu" + * char *_strupr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment SCNuLEAST8() { - class Holder { - static final MemorySegment SCNuLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNuLEAST8; + public static FunctionDescriptor _strupr_l$descriptor() { + return _strupr_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNxLEAST8 "hhx" + * char *_strupr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment SCNxLEAST8() { - class Holder { - static final MemorySegment SCNxLEAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNxLEAST8; + public static MethodHandle _strupr_l$handle() { + return _strupr_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNdLEAST16 "hd" + * char *_strupr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment SCNdLEAST16() { - class Holder { - static final MemorySegment SCNdLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNdLEAST16; + public static MemorySegment _strupr_l$address() { + return _strupr_l.ADDR; } + /** * {@snippet lang=c : - * #define SCNiLEAST16 "hi" + * char *_strupr_l(char *_String, _locale_t _Locale) * } */ - public static MemorySegment SCNiLEAST16() { - class Holder { - static final MemorySegment SCNiLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); + public static MemorySegment _strupr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _strupr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNiLEAST16; } + + private static class strxfrm { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strxfrm"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNoLEAST16 "ho" + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) * } */ - public static MemorySegment SCNoLEAST16() { - class Holder { - static final MemorySegment SCNoLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNoLEAST16; + public static FunctionDescriptor strxfrm$descriptor() { + return strxfrm.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNuLEAST16 "hu" + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) * } */ - public static MemorySegment SCNuLEAST16() { - class Holder { - static final MemorySegment SCNuLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNuLEAST16; + public static MethodHandle strxfrm$handle() { + return strxfrm.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNxLEAST16 "hx" + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) * } */ - public static MemorySegment SCNxLEAST16() { - class Holder { - static final MemorySegment SCNxLEAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNxLEAST16; + public static MemorySegment strxfrm$address() { + return strxfrm.ADDR; } + /** * {@snippet lang=c : - * #define SCNdLEAST32 "d" + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) * } */ - public static MemorySegment SCNdLEAST32() { - class Holder { - static final MemorySegment SCNdLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); + public static long strxfrm(MemorySegment _Destination, MemorySegment _Source, long _MaxCount) { + var mh$ = strxfrm.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strxfrm", _Destination, _Source, _MaxCount); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNdLEAST32; } + + private static class _strxfrm_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_LONG_LONG, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("_strxfrm_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNiLEAST32 "i" + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment SCNiLEAST32() { - class Holder { - static final MemorySegment SCNiLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNiLEAST32; + public static FunctionDescriptor _strxfrm_l$descriptor() { + return _strxfrm_l.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNoLEAST32 "o" + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment SCNoLEAST32() { - class Holder { - static final MemorySegment SCNoLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNoLEAST32; + public static MethodHandle _strxfrm_l$handle() { + return _strxfrm_l.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNuLEAST32 "u" + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment SCNuLEAST32() { - class Holder { - static final MemorySegment SCNuLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNuLEAST32; + public static MemorySegment _strxfrm_l$address() { + return _strxfrm_l.ADDR; } + /** * {@snippet lang=c : - * #define SCNxLEAST32 "x" + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) * } */ - public static MemorySegment SCNxLEAST32() { - class Holder { - static final MemorySegment SCNxLEAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); + public static long _strxfrm_l(MemorySegment _Destination, MemorySegment _Source, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strxfrm_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strxfrm_l", _Destination, _Source, _MaxCount, _Locale); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNxLEAST32; } + + private static class strdup { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strdup"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNdLEAST64 "lld" + * char *strdup(const char *_String) * } */ - public static MemorySegment SCNdLEAST64() { - class Holder { - static final MemorySegment SCNdLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNdLEAST64; + public static FunctionDescriptor strdup$descriptor() { + return strdup.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNiLEAST64 "lli" + * char *strdup(const char *_String) * } */ - public static MemorySegment SCNiLEAST64() { - class Holder { - static final MemorySegment SCNiLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNiLEAST64; + public static MethodHandle strdup$handle() { + return strdup.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNoLEAST64 "llo" + * char *strdup(const char *_String) * } */ - public static MemorySegment SCNoLEAST64() { - class Holder { - static final MemorySegment SCNoLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNoLEAST64; + public static MemorySegment strdup$address() { + return strdup.ADDR; } + /** * {@snippet lang=c : - * #define SCNuLEAST64 "llu" + * char *strdup(const char *_String) * } */ - public static MemorySegment SCNuLEAST64() { - class Holder { - static final MemorySegment SCNuLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); + public static MemorySegment strdup(MemorySegment _String) { + var mh$ = strdup.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strdup", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNuLEAST64; } + + private static class strcmpi { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strcmpi"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNxLEAST64 "llx" + * int strcmpi(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNxLEAST64() { - class Holder { - static final MemorySegment SCNxLEAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNxLEAST64; + public static FunctionDescriptor strcmpi$descriptor() { + return strcmpi.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNdFAST8 "hhd" + * int strcmpi(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNdFAST8() { - class Holder { - static final MemorySegment SCNdFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNdFAST8; + public static MethodHandle strcmpi$handle() { + return strcmpi.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNiFAST8 "hhi" + * int strcmpi(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNiFAST8() { - class Holder { - static final MemorySegment SCNiFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNiFAST8; + public static MemorySegment strcmpi$address() { + return strcmpi.ADDR; } + /** * {@snippet lang=c : - * #define SCNoFAST8 "hho" + * int strcmpi(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNoFAST8() { - class Holder { - static final MemorySegment SCNoFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hho"); + public static int strcmpi(MemorySegment _String1, MemorySegment _String2) { + var mh$ = strcmpi.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcmpi", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNoFAST8; } + + private static class stricmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("stricmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNuFAST8 "hhu" + * int stricmp(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNuFAST8() { - class Holder { - static final MemorySegment SCNuFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNuFAST8; + public static FunctionDescriptor stricmp$descriptor() { + return stricmp.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNxFAST8 "hhx" + * int stricmp(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNxFAST8() { - class Holder { - static final MemorySegment SCNxFAST8 - = demux_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNxFAST8; + public static MethodHandle stricmp$handle() { + return stricmp.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNdFAST16 "hd" + * int stricmp(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNdFAST16() { - class Holder { - static final MemorySegment SCNdFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNdFAST16; + public static MemorySegment stricmp$address() { + return stricmp.ADDR; } + /** * {@snippet lang=c : - * #define SCNiFAST16 "hi" + * int stricmp(const char *_String1, const char *_String2) * } */ - public static MemorySegment SCNiFAST16() { - class Holder { - static final MemorySegment SCNiFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hi"); + public static int stricmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = stricmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("stricmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNiFAST16; } + + private static class strlwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strlwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNoFAST16 "ho" + * char *strlwr(char *_String) * } */ - public static MemorySegment SCNoFAST16() { - class Holder { - static final MemorySegment SCNoFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNoFAST16; + public static FunctionDescriptor strlwr$descriptor() { + return strlwr.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNuFAST16 "hu" + * char *strlwr(char *_String) * } */ - public static MemorySegment SCNuFAST16() { - class Holder { - static final MemorySegment SCNuFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNuFAST16; + public static MethodHandle strlwr$handle() { + return strlwr.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNxFAST16 "hx" + * char *strlwr(char *_String) * } */ - public static MemorySegment SCNxFAST16() { - class Holder { - static final MemorySegment SCNxFAST16 - = demux_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNxFAST16; + public static MemorySegment strlwr$address() { + return strlwr.ADDR; } + /** * {@snippet lang=c : - * #define SCNdFAST32 "d" + * char *strlwr(char *_String) * } */ - public static MemorySegment SCNdFAST32() { - class Holder { - static final MemorySegment SCNdFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("d"); + public static MemorySegment strlwr(MemorySegment _String) { + var mh$ = strlwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strlwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNdFAST32; } + + private static class strnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNiFAST32 "i" + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment SCNiFAST32() { - class Holder { - static final MemorySegment SCNiFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNiFAST32; + public static FunctionDescriptor strnicmp$descriptor() { + return strnicmp.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNoFAST32 "o" + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment SCNoFAST32() { - class Holder { - static final MemorySegment SCNoFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNoFAST32; + public static MethodHandle strnicmp$handle() { + return strnicmp.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNuFAST32 "u" + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment SCNuFAST32() { - class Holder { - static final MemorySegment SCNuFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNuFAST32; + public static MemorySegment strnicmp$address() { + return strnicmp.ADDR; } + /** * {@snippet lang=c : - * #define SCNxFAST32 "x" + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) * } */ - public static MemorySegment SCNxFAST32() { - class Holder { - static final MemorySegment SCNxFAST32 - = demux_h.LIBRARY_ARENA.allocateFrom("x"); + public static int strnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = strnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNxFAST32; } + + private static class strnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNdFAST64 "lld" + * char *strnset(char *_String, int _Value, size_t _MaxCount) * } */ - public static MemorySegment SCNdFAST64() { - class Holder { - static final MemorySegment SCNdFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNdFAST64; + public static FunctionDescriptor strnset$descriptor() { + return strnset.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNiFAST64 "lli" + * char *strnset(char *_String, int _Value, size_t _MaxCount) * } */ - public static MemorySegment SCNiFAST64() { - class Holder { - static final MemorySegment SCNiFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNiFAST64; + public static MethodHandle strnset$handle() { + return strnset.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNoFAST64 "llo" + * char *strnset(char *_String, int _Value, size_t _MaxCount) * } */ - public static MemorySegment SCNoFAST64() { - class Holder { - static final MemorySegment SCNoFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNoFAST64; + public static MemorySegment strnset$address() { + return strnset.ADDR; } + /** * {@snippet lang=c : - * #define SCNuFAST64 "llu" + * char *strnset(char *_String, int _Value, size_t _MaxCount) * } */ - public static MemorySegment SCNuFAST64() { - class Holder { - static final MemorySegment SCNuFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llu"); + public static MemorySegment strnset(MemorySegment _String, int _Value, long _MaxCount) { + var mh$ = strnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnset", _String, _Value, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNuFAST64; } + + private static class strrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNxFAST64 "llx" + * char *strrev(char *_String) * } */ - public static MemorySegment SCNxFAST64() { - class Holder { - static final MemorySegment SCNxFAST64 - = demux_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNxFAST64; + public static FunctionDescriptor strrev$descriptor() { + return strrev.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNdPTR "ld" + * char *strrev(char *_String) * } */ - public static MemorySegment SCNdPTR() { - class Holder { - static final MemorySegment SCNdPTR - = demux_h.LIBRARY_ARENA.allocateFrom("ld"); - } - return Holder.SCNdPTR; + public static MethodHandle strrev$handle() { + return strrev.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNiPTR "li" + * char *strrev(char *_String) * } */ - public static MemorySegment SCNiPTR() { - class Holder { - static final MemorySegment SCNiPTR - = demux_h.LIBRARY_ARENA.allocateFrom("li"); - } - return Holder.SCNiPTR; + public static MemorySegment strrev$address() { + return strrev.ADDR; } + /** * {@snippet lang=c : - * #define SCNoPTR "lo" + * char *strrev(char *_String) * } */ - public static MemorySegment SCNoPTR() { - class Holder { - static final MemorySegment SCNoPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lo"); + public static MemorySegment strrev(MemorySegment _String) { + var mh$ = strrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strrev", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNoPTR; } + + private static class strset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNuPTR "lu" + * char *strset(char *_String, int _Value) * } */ - public static MemorySegment SCNuPTR() { - class Holder { - static final MemorySegment SCNuPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lu"); - } - return Holder.SCNuPTR; + public static FunctionDescriptor strset$descriptor() { + return strset.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNxPTR "lx" + * char *strset(char *_String, int _Value) * } */ - public static MemorySegment SCNxPTR() { - class Holder { - static final MemorySegment SCNxPTR - = demux_h.LIBRARY_ARENA.allocateFrom("lx"); - } - return Holder.SCNxPTR; + public static MethodHandle strset$handle() { + return strset.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNdMAX "jd" + * char *strset(char *_String, int _Value) * } */ - public static MemorySegment SCNdMAX() { - class Holder { - static final MemorySegment SCNdMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jd"); - } - return Holder.SCNdMAX; + public static MemorySegment strset$address() { + return strset.ADDR; } + /** * {@snippet lang=c : - * #define SCNiMAX "ji" + * char *strset(char *_String, int _Value) * } */ - public static MemorySegment SCNiMAX() { - class Holder { - static final MemorySegment SCNiMAX - = demux_h.LIBRARY_ARENA.allocateFrom("ji"); + public static MemorySegment strset(MemorySegment _String, int _Value) { + var mh$ = strset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strset", _String, _Value); + } + return (MemorySegment)mh$.invokeExact(_String, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.SCNiMAX; } + + private static class strupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("strupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define SCNoMAX "jo" + * char *strupr(char *_String) * } */ - public static MemorySegment SCNoMAX() { - class Holder { - static final MemorySegment SCNoMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jo"); - } - return Holder.SCNoMAX; + public static FunctionDescriptor strupr$descriptor() { + return strupr.DESC; } + /** + * Downcall method handle for: * {@snippet lang=c : - * #define SCNuMAX "ju" + * char *strupr(char *_String) * } */ - public static MemorySegment SCNuMAX() { - class Holder { - static final MemorySegment SCNuMAX - = demux_h.LIBRARY_ARENA.allocateFrom("ju"); - } - return Holder.SCNuMAX; + public static MethodHandle strupr$handle() { + return strupr.HANDLE; } + /** + * Address for: * {@snippet lang=c : - * #define SCNxMAX "jx" + * char *strupr(char *_String) * } */ - public static MemorySegment SCNxMAX() { - class Holder { - static final MemorySegment SCNxMAX - = demux_h.LIBRARY_ARENA.allocateFrom("jx"); - } - return Holder.SCNxMAX; + public static MemorySegment strupr$address() { + return strupr.ADDR; } + /** * {@snippet lang=c : - * #define __DARWIN_SUF_EXTSN "$DARWIN_EXTSN" + * char *strupr(char *_String) * } */ - public static MemorySegment __DARWIN_SUF_EXTSN() { - class Holder { - static final MemorySegment __DARWIN_SUF_EXTSN - = demux_h.LIBRARY_ARENA.allocateFrom("$DARWIN_EXTSN"); + public static MemorySegment strupr(MemorySegment _String) { + var mh$ = strupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); } - return Holder.__DARWIN_SUF_EXTSN; } - private static final long __DARWIN_C_ANSI = 4096L; + private static final int ANIMATION_FLAG = (int)2L; /** * {@snippet lang=c : - * #define __DARWIN_C_ANSI 4096 + * enum WebPFeatureFlags.ANIMATION_FLAG = 2 * } */ - public static long __DARWIN_C_ANSI() { - return __DARWIN_C_ANSI; + public static int ANIMATION_FLAG() { + return ANIMATION_FLAG; } - private static final long __DARWIN_C_FULL = 900000L; + private static final int XMP_FLAG = (int)4L; /** * {@snippet lang=c : - * #define __DARWIN_C_FULL 900000 + * enum WebPFeatureFlags.XMP_FLAG = 4 * } */ - public static long __DARWIN_C_FULL() { - return __DARWIN_C_FULL; + public static int XMP_FLAG() { + return XMP_FLAG; } - private static final long __DARWIN_C_LEVEL = 900000L; + private static final int EXIF_FLAG = (int)8L; /** * {@snippet lang=c : - * #define __DARWIN_C_LEVEL 900000 + * enum WebPFeatureFlags.EXIF_FLAG = 8 * } */ - public static long __DARWIN_C_LEVEL() { - return __DARWIN_C_LEVEL; + public static int EXIF_FLAG() { + return EXIF_FLAG; } - private static final int MAC_OS_X_VERSION_10_0 = (int)1000L; + private static final int ALPHA_FLAG = (int)16L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_0 1000 + * enum WebPFeatureFlags.ALPHA_FLAG = 16 * } */ - public static int MAC_OS_X_VERSION_10_0() { - return MAC_OS_X_VERSION_10_0; + public static int ALPHA_FLAG() { + return ALPHA_FLAG; } - private static final int MAC_OS_X_VERSION_10_1 = (int)1010L; + private static final int ICCP_FLAG = (int)32L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_1 1010 + * enum WebPFeatureFlags.ICCP_FLAG = 32 * } */ - public static int MAC_OS_X_VERSION_10_1() { - return MAC_OS_X_VERSION_10_1; + public static int ICCP_FLAG() { + return ICCP_FLAG; } - private static final int MAC_OS_X_VERSION_10_2 = (int)1020L; + private static final int ALL_VALID_FLAGS = (int)62L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_2 1020 + * enum WebPFeatureFlags.ALL_VALID_FLAGS = 62 * } */ - public static int MAC_OS_X_VERSION_10_2() { - return MAC_OS_X_VERSION_10_2; + public static int ALL_VALID_FLAGS() { + return ALL_VALID_FLAGS; } - private static final int MAC_OS_X_VERSION_10_3 = (int)1030L; + private static final int WEBP_MUX_DISPOSE_NONE = (int)0L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_3 1030 + * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_NONE = 0 * } */ - public static int MAC_OS_X_VERSION_10_3() { - return MAC_OS_X_VERSION_10_3; + public static int WEBP_MUX_DISPOSE_NONE() { + return WEBP_MUX_DISPOSE_NONE; } - private static final int MAC_OS_X_VERSION_10_4 = (int)1040L; + private static final int WEBP_MUX_DISPOSE_BACKGROUND = (int)1L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_4 1040 + * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_BACKGROUND = 1 * } */ - public static int MAC_OS_X_VERSION_10_4() { - return MAC_OS_X_VERSION_10_4; + public static int WEBP_MUX_DISPOSE_BACKGROUND() { + return WEBP_MUX_DISPOSE_BACKGROUND; } - private static final int MAC_OS_X_VERSION_10_5 = (int)1050L; + private static final int WEBP_MUX_BLEND = (int)0L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_5 1050 + * enum WebPMuxAnimBlend.WEBP_MUX_BLEND = 0 * } */ - public static int MAC_OS_X_VERSION_10_5() { - return MAC_OS_X_VERSION_10_5; + public static int WEBP_MUX_BLEND() { + return WEBP_MUX_BLEND; } - private static final int MAC_OS_X_VERSION_10_6 = (int)1060L; + private static final int WEBP_MUX_NO_BLEND = (int)1L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_6 1060 + * enum WebPMuxAnimBlend.WEBP_MUX_NO_BLEND = 1 * } */ - public static int MAC_OS_X_VERSION_10_6() { - return MAC_OS_X_VERSION_10_6; + public static int WEBP_MUX_NO_BLEND() { + return WEBP_MUX_NO_BLEND; } - private static final int MAC_OS_X_VERSION_10_7 = (int)1070L; + + private static class WebPGetDemuxVersion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPGetDemuxVersion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_7 1070 + * extern int WebPGetDemuxVersion() * } */ - public static int MAC_OS_X_VERSION_10_7() { - return MAC_OS_X_VERSION_10_7; + public static FunctionDescriptor WebPGetDemuxVersion$descriptor() { + return WebPGetDemuxVersion.DESC; } - private static final int MAC_OS_X_VERSION_10_8 = (int)1080L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_8 1080 + * extern int WebPGetDemuxVersion() * } */ - public static int MAC_OS_X_VERSION_10_8() { - return MAC_OS_X_VERSION_10_8; + public static MethodHandle WebPGetDemuxVersion$handle() { + return WebPGetDemuxVersion.HANDLE; } - private static final int MAC_OS_X_VERSION_10_9 = (int)1090L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_9 1090 + * extern int WebPGetDemuxVersion() * } */ - public static int MAC_OS_X_VERSION_10_9() { - return MAC_OS_X_VERSION_10_9; + public static MemorySegment WebPGetDemuxVersion$address() { + return WebPGetDemuxVersion.ADDR; } - private static final int MAC_OS_X_VERSION_10_10 = (int)101000L; + /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10 101000 + * extern int WebPGetDemuxVersion() * } */ - public static int MAC_OS_X_VERSION_10_10() { - return MAC_OS_X_VERSION_10_10; + public static int WebPGetDemuxVersion() { + var mh$ = WebPGetDemuxVersion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetDemuxVersion"); + } + return (int)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MAC_OS_X_VERSION_10_10_2 = (int)101002L; + private static final int WEBP_DEMUX_PARSE_ERROR = (int)-1L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10_2 101002 + * enum WebPDemuxState.WEBP_DEMUX_PARSE_ERROR = -1 * } */ - public static int MAC_OS_X_VERSION_10_10_2() { - return MAC_OS_X_VERSION_10_10_2; + public static int WEBP_DEMUX_PARSE_ERROR() { + return WEBP_DEMUX_PARSE_ERROR; } - private static final int MAC_OS_X_VERSION_10_10_3 = (int)101003L; + private static final int WEBP_DEMUX_PARSING_HEADER = (int)0L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10_3 101003 + * enum WebPDemuxState.WEBP_DEMUX_PARSING_HEADER = 0 * } */ - public static int MAC_OS_X_VERSION_10_10_3() { - return MAC_OS_X_VERSION_10_10_3; + public static int WEBP_DEMUX_PARSING_HEADER() { + return WEBP_DEMUX_PARSING_HEADER; } - private static final int MAC_OS_X_VERSION_10_11 = (int)101100L; + private static final int WEBP_DEMUX_PARSED_HEADER = (int)1L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11 101100 + * enum WebPDemuxState.WEBP_DEMUX_PARSED_HEADER = 1 * } */ - public static int MAC_OS_X_VERSION_10_11() { - return MAC_OS_X_VERSION_10_11; + public static int WEBP_DEMUX_PARSED_HEADER() { + return WEBP_DEMUX_PARSED_HEADER; } - private static final int MAC_OS_X_VERSION_10_11_2 = (int)101102L; + private static final int WEBP_DEMUX_DONE = (int)2L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_2 101102 + * enum WebPDemuxState.WEBP_DEMUX_DONE = 2 * } */ - public static int MAC_OS_X_VERSION_10_11_2() { - return MAC_OS_X_VERSION_10_11_2; + public static int WEBP_DEMUX_DONE() { + return WEBP_DEMUX_DONE; + } + + private static class WebPDemuxInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_X_VERSION_10_11_3 = (int)101103L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_3 101103 + * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) * } */ - public static int MAC_OS_X_VERSION_10_11_3() { - return MAC_OS_X_VERSION_10_11_3; + public static FunctionDescriptor WebPDemuxInternal$descriptor() { + return WebPDemuxInternal.DESC; } - private static final int MAC_OS_X_VERSION_10_11_4 = (int)101104L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_4 101104 + * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) * } */ - public static int MAC_OS_X_VERSION_10_11_4() { - return MAC_OS_X_VERSION_10_11_4; + public static MethodHandle WebPDemuxInternal$handle() { + return WebPDemuxInternal.HANDLE; } - private static final int MAC_OS_X_VERSION_10_12 = (int)101200L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12 101200 + * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) * } */ - public static int MAC_OS_X_VERSION_10_12() { - return MAC_OS_X_VERSION_10_12; + public static MemorySegment WebPDemuxInternal$address() { + return WebPDemuxInternal.ADDR; } - private static final int MAC_OS_X_VERSION_10_12_1 = (int)101201L; + /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_1 101201 + * extern WebPDemuxer *WebPDemuxInternal(const WebPData *, int, WebPDemuxState *, int) * } */ - public static int MAC_OS_X_VERSION_10_12_1() { - return MAC_OS_X_VERSION_10_12_1; + public static MemorySegment WebPDemuxInternal(MemorySegment x0, int x1, MemorySegment x2, int x3) { + var mh$ = WebPDemuxInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxInternal", x0, x1, x2, x3); + } + return (MemorySegment)mh$.invokeExact(x0, x1, x2, x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MAC_OS_X_VERSION_10_12_2 = (int)101202L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_2 101202 - * } - */ - public static int MAC_OS_X_VERSION_10_12_2() { - return MAC_OS_X_VERSION_10_12_2; + + private static class WebPDemuxDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxDelete"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_X_VERSION_10_12_4 = (int)101204L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_4 101204 + * extern void WebPDemuxDelete(WebPDemuxer *dmux) * } */ - public static int MAC_OS_X_VERSION_10_12_4() { - return MAC_OS_X_VERSION_10_12_4; + public static FunctionDescriptor WebPDemuxDelete$descriptor() { + return WebPDemuxDelete.DESC; } - private static final int MAC_OS_X_VERSION_10_13 = (int)101300L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13 101300 + * extern void WebPDemuxDelete(WebPDemuxer *dmux) * } */ - public static int MAC_OS_X_VERSION_10_13() { - return MAC_OS_X_VERSION_10_13; + public static MethodHandle WebPDemuxDelete$handle() { + return WebPDemuxDelete.HANDLE; } - private static final int MAC_OS_X_VERSION_10_13_1 = (int)101301L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_1 101301 + * extern void WebPDemuxDelete(WebPDemuxer *dmux) * } */ - public static int MAC_OS_X_VERSION_10_13_1() { - return MAC_OS_X_VERSION_10_13_1; + public static MemorySegment WebPDemuxDelete$address() { + return WebPDemuxDelete.ADDR; } - private static final int MAC_OS_X_VERSION_10_13_2 = (int)101302L; + /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_2 101302 + * extern void WebPDemuxDelete(WebPDemuxer *dmux) * } */ - public static int MAC_OS_X_VERSION_10_13_2() { - return MAC_OS_X_VERSION_10_13_2; + public static void WebPDemuxDelete(MemorySegment dmux) { + var mh$ = WebPDemuxDelete.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxDelete", dmux); + } + mh$.invokeExact(dmux); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MAC_OS_X_VERSION_10_13_4 = (int)101304L; + private static final int WEBP_FF_FORMAT_FLAGS = (int)0L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_4 101304 + * enum WebPFormatFeature.WEBP_FF_FORMAT_FLAGS = 0 * } */ - public static int MAC_OS_X_VERSION_10_13_4() { - return MAC_OS_X_VERSION_10_13_4; + public static int WEBP_FF_FORMAT_FLAGS() { + return WEBP_FF_FORMAT_FLAGS; } - private static final int MAC_OS_X_VERSION_10_14 = (int)101400L; + private static final int WEBP_FF_CANVAS_WIDTH = (int)1L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14 101400 + * enum WebPFormatFeature.WEBP_FF_CANVAS_WIDTH = 1 * } */ - public static int MAC_OS_X_VERSION_10_14() { - return MAC_OS_X_VERSION_10_14; + public static int WEBP_FF_CANVAS_WIDTH() { + return WEBP_FF_CANVAS_WIDTH; } - private static final int MAC_OS_X_VERSION_10_14_1 = (int)101401L; + private static final int WEBP_FF_CANVAS_HEIGHT = (int)2L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_1 101401 + * enum WebPFormatFeature.WEBP_FF_CANVAS_HEIGHT = 2 * } */ - public static int MAC_OS_X_VERSION_10_14_1() { - return MAC_OS_X_VERSION_10_14_1; + public static int WEBP_FF_CANVAS_HEIGHT() { + return WEBP_FF_CANVAS_HEIGHT; } - private static final int MAC_OS_X_VERSION_10_14_4 = (int)101404L; + private static final int WEBP_FF_LOOP_COUNT = (int)3L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_4 101404 + * enum WebPFormatFeature.WEBP_FF_LOOP_COUNT = 3 * } */ - public static int MAC_OS_X_VERSION_10_14_4() { - return MAC_OS_X_VERSION_10_14_4; + public static int WEBP_FF_LOOP_COUNT() { + return WEBP_FF_LOOP_COUNT; } - private static final int MAC_OS_X_VERSION_10_14_5 = (int)101405L; + private static final int WEBP_FF_BACKGROUND_COLOR = (int)4L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_5 101405 + * enum WebPFormatFeature.WEBP_FF_BACKGROUND_COLOR = 4 * } */ - public static int MAC_OS_X_VERSION_10_14_5() { - return MAC_OS_X_VERSION_10_14_5; + public static int WEBP_FF_BACKGROUND_COLOR() { + return WEBP_FF_BACKGROUND_COLOR; } - private static final int MAC_OS_X_VERSION_10_14_6 = (int)101406L; + private static final int WEBP_FF_FRAME_COUNT = (int)5L; /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_6 101406 + * enum WebPFormatFeature.WEBP_FF_FRAME_COUNT = 5 * } */ - public static int MAC_OS_X_VERSION_10_14_6() { - return MAC_OS_X_VERSION_10_14_6; + public static int WEBP_FF_FRAME_COUNT() { + return WEBP_FF_FRAME_COUNT; + } + + private static class WebPDemuxGetI { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetI"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_X_VERSION_10_15 = (int)101500L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15 101500 + * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) * } */ - public static int MAC_OS_X_VERSION_10_15() { - return MAC_OS_X_VERSION_10_15; + public static FunctionDescriptor WebPDemuxGetI$descriptor() { + return WebPDemuxGetI.DESC; } - private static final int MAC_OS_X_VERSION_10_15_1 = (int)101501L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15_1 101501 + * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) * } */ - public static int MAC_OS_X_VERSION_10_15_1() { - return MAC_OS_X_VERSION_10_15_1; + public static MethodHandle WebPDemuxGetI$handle() { + return WebPDemuxGetI.HANDLE; } - private static final int MAC_OS_X_VERSION_10_15_4 = (int)101504L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15_4 101504 + * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) * } */ - public static int MAC_OS_X_VERSION_10_15_4() { - return MAC_OS_X_VERSION_10_15_4; + public static MemorySegment WebPDemuxGetI$address() { + return WebPDemuxGetI.ADDR; } - private static final int MAC_OS_X_VERSION_10_16 = (int)101600L; + /** * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_16 101600 + * extern uint32_t WebPDemuxGetI(const WebPDemuxer *dmux, WebPFormatFeature feature) * } */ - public static int MAC_OS_X_VERSION_10_16() { - return MAC_OS_X_VERSION_10_16; + public static int WebPDemuxGetI(MemorySegment dmux, int feature) { + var mh$ = WebPDemuxGetI.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxGetI", dmux, feature); + } + return (int)mh$.invokeExact(dmux, feature); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDemuxGetFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_11_0 = (int)110000L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_11_0 110000 + * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_0() { - return MAC_OS_VERSION_11_0; + public static FunctionDescriptor WebPDemuxGetFrame$descriptor() { + return WebPDemuxGetFrame.DESC; } - private static final int MAC_OS_VERSION_11_1 = (int)110100L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_11_1 110100 + * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_1() { - return MAC_OS_VERSION_11_1; + public static MethodHandle WebPDemuxGetFrame$handle() { + return WebPDemuxGetFrame.HANDLE; } - private static final int MAC_OS_VERSION_11_3 = (int)110300L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_11_3 110300 + * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_3() { - return MAC_OS_VERSION_11_3; + public static MemorySegment WebPDemuxGetFrame$address() { + return WebPDemuxGetFrame.ADDR; } - private static final int MAC_OS_VERSION_11_4 = (int)110400L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_11_4 110400 + * extern int WebPDemuxGetFrame(const WebPDemuxer *dmux, int frame_number, WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_4() { - return MAC_OS_VERSION_11_4; + public static int WebPDemuxGetFrame(MemorySegment dmux, int frame_number, MemorySegment iter) { + var mh$ = WebPDemuxGetFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxGetFrame", dmux, frame_number, iter); + } + return (int)mh$.invokeExact(dmux, frame_number, iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDemuxNextFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxNextFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_11_5 = (int)110500L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_11_5 110500 + * extern int WebPDemuxNextFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_5() { - return MAC_OS_VERSION_11_5; + public static FunctionDescriptor WebPDemuxNextFrame$descriptor() { + return WebPDemuxNextFrame.DESC; } - private static final int MAC_OS_VERSION_11_6 = (int)110600L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_11_6 110600 + * extern int WebPDemuxNextFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_11_6() { - return MAC_OS_VERSION_11_6; + public static MethodHandle WebPDemuxNextFrame$handle() { + return WebPDemuxNextFrame.HANDLE; } - private static final int MAC_OS_VERSION_12_0 = (int)120000L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_0 120000 + * extern int WebPDemuxNextFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_0() { - return MAC_OS_VERSION_12_0; + public static MemorySegment WebPDemuxNextFrame$address() { + return WebPDemuxNextFrame.ADDR; } - private static final int MAC_OS_VERSION_12_1 = (int)120100L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_12_1 120100 + * extern int WebPDemuxNextFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_1() { - return MAC_OS_VERSION_12_1; + public static int WebPDemuxNextFrame(MemorySegment iter) { + var mh$ = WebPDemuxNextFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxNextFrame", iter); + } + return (int)mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDemuxPrevFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxPrevFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_12_2 = (int)120200L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_2 120200 + * extern int WebPDemuxPrevFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_2() { - return MAC_OS_VERSION_12_2; + public static FunctionDescriptor WebPDemuxPrevFrame$descriptor() { + return WebPDemuxPrevFrame.DESC; } - private static final int MAC_OS_VERSION_12_3 = (int)120300L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_3 120300 + * extern int WebPDemuxPrevFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_3() { - return MAC_OS_VERSION_12_3; + public static MethodHandle WebPDemuxPrevFrame$handle() { + return WebPDemuxPrevFrame.HANDLE; } - private static final int MAC_OS_VERSION_12_4 = (int)120400L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_4 120400 + * extern int WebPDemuxPrevFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_4() { - return MAC_OS_VERSION_12_4; + public static MemorySegment WebPDemuxPrevFrame$address() { + return WebPDemuxPrevFrame.ADDR; } - private static final int MAC_OS_VERSION_12_5 = (int)120500L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_12_5 120500 + * extern int WebPDemuxPrevFrame(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_5() { - return MAC_OS_VERSION_12_5; + public static int WebPDemuxPrevFrame(MemorySegment iter) { + var mh$ = WebPDemuxPrevFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxPrevFrame", iter); + } + return (int)mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPDemuxReleaseIterator { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxReleaseIterator"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_12_6 = (int)120600L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_6 120600 + * extern void WebPDemuxReleaseIterator(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_6() { - return MAC_OS_VERSION_12_6; + public static FunctionDescriptor WebPDemuxReleaseIterator$descriptor() { + return WebPDemuxReleaseIterator.DESC; } - private static final int MAC_OS_VERSION_12_7 = (int)120700L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_12_7 120700 + * extern void WebPDemuxReleaseIterator(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_12_7() { - return MAC_OS_VERSION_12_7; + public static MethodHandle WebPDemuxReleaseIterator$handle() { + return WebPDemuxReleaseIterator.HANDLE; } - private static final int MAC_OS_VERSION_13_0 = (int)130000L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_13_0 130000 + * extern void WebPDemuxReleaseIterator(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_13_0() { - return MAC_OS_VERSION_13_0; + public static MemorySegment WebPDemuxReleaseIterator$address() { + return WebPDemuxReleaseIterator.ADDR; } - private static final int MAC_OS_VERSION_13_1 = (int)130100L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_13_1 130100 + * extern void WebPDemuxReleaseIterator(WebPIterator *iter) * } */ - public static int MAC_OS_VERSION_13_1() { - return MAC_OS_VERSION_13_1; + public static void WebPDemuxReleaseIterator(MemorySegment iter) { + var mh$ = WebPDemuxReleaseIterator.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxReleaseIterator", iter); + } + mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MAC_OS_VERSION_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_2 130200 - * } - */ - public static int MAC_OS_VERSION_13_2() { - return MAC_OS_VERSION_13_2; + + private static class WebPDemuxGetChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxGetChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_13_3 = (int)130300L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_13_3 130300 + * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_13_3() { - return MAC_OS_VERSION_13_3; + public static FunctionDescriptor WebPDemuxGetChunk$descriptor() { + return WebPDemuxGetChunk.DESC; } - private static final int MAC_OS_VERSION_13_4 = (int)130400L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_13_4 130400 + * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_13_4() { - return MAC_OS_VERSION_13_4; + public static MethodHandle WebPDemuxGetChunk$handle() { + return WebPDemuxGetChunk.HANDLE; } - private static final int MAC_OS_VERSION_13_5 = (int)130500L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_13_5 130500 + * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_13_5() { - return MAC_OS_VERSION_13_5; + public static MemorySegment WebPDemuxGetChunk$address() { + return WebPDemuxGetChunk.ADDR; } - private static final int MAC_OS_VERSION_13_6 = (int)130600L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_13_6 130600 + * extern int WebPDemuxGetChunk(const WebPDemuxer *dmux, const char fourcc[4], int chunk_number, WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_13_6() { - return MAC_OS_VERSION_13_6; + public static int WebPDemuxGetChunk(MemorySegment dmux, MemorySegment fourcc, int chunk_number, MemorySegment iter) { + var mh$ = WebPDemuxGetChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxGetChunk", dmux, fourcc, chunk_number, iter); + } + return (int)mh$.invokeExact(dmux, fourcc, chunk_number, iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int MAC_OS_VERSION_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_0 140000 - * } - */ - public static int MAC_OS_VERSION_14_0() { - return MAC_OS_VERSION_14_0; + + private static class WebPDemuxNextChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxNextChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int MAC_OS_VERSION_14_1 = (int)140100L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define MAC_OS_VERSION_14_1 140100 + * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_14_1() { - return MAC_OS_VERSION_14_1; + public static FunctionDescriptor WebPDemuxNextChunk$descriptor() { + return WebPDemuxNextChunk.DESC; } - private static final int MAC_OS_VERSION_14_2 = (int)140200L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define MAC_OS_VERSION_14_2 140200 + * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_14_2() { - return MAC_OS_VERSION_14_2; + public static MethodHandle WebPDemuxNextChunk$handle() { + return WebPDemuxNextChunk.HANDLE; } - private static final int MAC_OS_VERSION_14_3 = (int)140300L; + /** + * Address for: * {@snippet lang=c : - * #define MAC_OS_VERSION_14_3 140300 + * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_14_3() { - return MAC_OS_VERSION_14_3; + public static MemorySegment WebPDemuxNextChunk$address() { + return WebPDemuxNextChunk.ADDR; } - private static final int MAC_OS_VERSION_14_4 = (int)140400L; + /** * {@snippet lang=c : - * #define MAC_OS_VERSION_14_4 140400 + * extern int WebPDemuxNextChunk(WebPChunkIterator *iter) * } */ - public static int MAC_OS_VERSION_14_4() { - return MAC_OS_VERSION_14_4; + public static int WebPDemuxNextChunk(MemorySegment iter) { + var mh$ = WebPDemuxNextChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxNextChunk", iter); + } + return (int)mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final int __MAC_OS_X_VERSION_MAX_ALLOWED = (int)140400L; - /** - * {@snippet lang=c : - * #define __MAC_OS_X_VERSION_MAX_ALLOWED 140400 - * } - */ - public static int __MAC_OS_X_VERSION_MAX_ALLOWED() { - return __MAC_OS_X_VERSION_MAX_ALLOWED; + + private static class WebPDemuxPrevChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxPrevChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final MemorySegment __DARWIN_NULL = MemorySegment.ofAddress(0L); + /** + * Function descriptor for: * {@snippet lang=c : - * #define __DARWIN_NULL (void*) 0 + * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) * } */ - public static MemorySegment __DARWIN_NULL() { - return __DARWIN_NULL; + public static FunctionDescriptor WebPDemuxPrevChunk$descriptor() { + return WebPDemuxPrevChunk.DESC; } - private static final int __DARWIN_WCHAR_MAX = (int)2147483647L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define __DARWIN_WCHAR_MAX 2147483647 + * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) * } */ - public static int __DARWIN_WCHAR_MAX() { - return __DARWIN_WCHAR_MAX; + public static MethodHandle WebPDemuxPrevChunk$handle() { + return WebPDemuxPrevChunk.HANDLE; } - private static final int __DARWIN_WCHAR_MIN = (int)-2147483648L; + /** + * Address for: * {@snippet lang=c : - * #define __DARWIN_WCHAR_MIN -2147483648 + * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) * } */ - public static int __DARWIN_WCHAR_MIN() { - return __DARWIN_WCHAR_MIN; + public static MemorySegment WebPDemuxPrevChunk$address() { + return WebPDemuxPrevChunk.ADDR; } - private static final int __DARWIN_WEOF = (int)-1L; + /** * {@snippet lang=c : - * #define __DARWIN_WEOF -1 + * extern int WebPDemuxPrevChunk(WebPChunkIterator *iter) * } */ - public static int __DARWIN_WEOF() { - return __DARWIN_WEOF; + public static int WebPDemuxPrevChunk(MemorySegment iter) { + var mh$ = WebPDemuxPrevChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxPrevChunk", iter); + } + return (int)mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final long USER_ADDR_NULL = 0L; - /** - * {@snippet lang=c : - * #define USER_ADDR_NULL 0 - * } - */ - public static long USER_ADDR_NULL() { - return USER_ADDR_NULL; + + private static class WebPDemuxReleaseChunkIterator { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPDemuxReleaseChunkIterator"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final long INT64_MAX = 9223372036854775807L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define INT64_MAX 9223372036854775807 + * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) * } */ - public static long INT64_MAX() { - return INT64_MAX; + public static FunctionDescriptor WebPDemuxReleaseChunkIterator$descriptor() { + return WebPDemuxReleaseChunkIterator.DESC; } - private static final int INT8_MIN = (int)-128L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INT8_MIN -128 + * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) * } */ - public static int INT8_MIN() { - return INT8_MIN; + public static MethodHandle WebPDemuxReleaseChunkIterator$handle() { + return WebPDemuxReleaseChunkIterator.HANDLE; } - private static final int INT16_MIN = (int)-32768L; + /** + * Address for: * {@snippet lang=c : - * #define INT16_MIN -32768 + * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) * } */ - public static int INT16_MIN() { - return INT16_MIN; + public static MemorySegment WebPDemuxReleaseChunkIterator$address() { + return WebPDemuxReleaseChunkIterator.ADDR; } - private static final int INT32_MIN = (int)-2147483648L; + /** * {@snippet lang=c : - * #define INT32_MIN -2147483648 + * extern void WebPDemuxReleaseChunkIterator(WebPChunkIterator *iter) * } */ - public static int INT32_MIN() { - return INT32_MIN; + public static void WebPDemuxReleaseChunkIterator(MemorySegment iter) { + var mh$ = WebPDemuxReleaseChunkIterator.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPDemuxReleaseChunkIterator", iter); + } + mh$.invokeExact(iter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final long INT64_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INT64_MIN -9223372036854775808 - * } - */ - public static long INT64_MIN() { - return INT64_MIN; + + private static class WebPAnimDecoderOptionsInitInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderOptionsInitInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int UINT32_MAX = (int)4294967295L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define UINT32_MAX 4294967295 + * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) * } */ - public static int UINT32_MAX() { - return UINT32_MAX; + public static FunctionDescriptor WebPAnimDecoderOptionsInitInternal$descriptor() { + return WebPAnimDecoderOptionsInitInternal.DESC; } - private static final long UINT64_MAX = -1L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define UINT64_MAX -1 + * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) * } */ - public static long UINT64_MAX() { - return UINT64_MAX; + public static MethodHandle WebPAnimDecoderOptionsInitInternal$handle() { + return WebPAnimDecoderOptionsInitInternal.HANDLE; } - private static final int INT_LEAST8_MIN = (int)-128L; + /** + * Address for: * {@snippet lang=c : - * #define INT_LEAST8_MIN -128 + * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) * } */ - public static int INT_LEAST8_MIN() { - return INT_LEAST8_MIN; + public static MemorySegment WebPAnimDecoderOptionsInitInternal$address() { + return WebPAnimDecoderOptionsInitInternal.ADDR; } - private static final int INT_LEAST16_MIN = (int)-32768L; + /** * {@snippet lang=c : - * #define INT_LEAST16_MIN -32768 + * extern int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions *, int) * } */ - public static int INT_LEAST16_MIN() { - return INT_LEAST16_MIN; + public static int WebPAnimDecoderOptionsInitInternal(MemorySegment x0, int x1) { + var mh$ = WebPAnimDecoderOptionsInitInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderOptionsInitInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderNewInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_INT + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderNewInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int INT_LEAST32_MIN = (int)-2147483648L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define INT_LEAST32_MIN -2147483648 + * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) * } */ - public static int INT_LEAST32_MIN() { - return INT_LEAST32_MIN; + public static FunctionDescriptor WebPAnimDecoderNewInternal$descriptor() { + return WebPAnimDecoderNewInternal.DESC; } - private static final long INT_LEAST64_MIN = -9223372036854775808L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INT_LEAST64_MIN -9223372036854775808 + * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) * } */ - public static long INT_LEAST64_MIN() { - return INT_LEAST64_MIN; + public static MethodHandle WebPAnimDecoderNewInternal$handle() { + return WebPAnimDecoderNewInternal.HANDLE; } - private static final int INT_LEAST8_MAX = (int)127L; + /** + * Address for: * {@snippet lang=c : - * #define INT_LEAST8_MAX 127 + * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) * } */ - public static int INT_LEAST8_MAX() { - return INT_LEAST8_MAX; + public static MemorySegment WebPAnimDecoderNewInternal$address() { + return WebPAnimDecoderNewInternal.ADDR; } - private static final int INT_LEAST16_MAX = (int)32767L; + /** * {@snippet lang=c : - * #define INT_LEAST16_MAX 32767 + * extern WebPAnimDecoder *WebPAnimDecoderNewInternal(const WebPData *, const WebPAnimDecoderOptions *, int) * } */ - public static int INT_LEAST16_MAX() { - return INT_LEAST16_MAX; + public static MemorySegment WebPAnimDecoderNewInternal(MemorySegment x0, MemorySegment x1, int x2) { + var mh$ = WebPAnimDecoderNewInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderNewInternal", x0, x1, x2); + } + return (MemorySegment)mh$.invokeExact(x0, x1, x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderGetInfo { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetInfo"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int INT_LEAST32_MAX = (int)2147483647L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define INT_LEAST32_MAX 2147483647 + * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) * } */ - public static int INT_LEAST32_MAX() { - return INT_LEAST32_MAX; + public static FunctionDescriptor WebPAnimDecoderGetInfo$descriptor() { + return WebPAnimDecoderGetInfo.DESC; } - private static final long INT_LEAST64_MAX = 9223372036854775807L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INT_LEAST64_MAX 9223372036854775807 + * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) * } */ - public static long INT_LEAST64_MAX() { - return INT_LEAST64_MAX; + public static MethodHandle WebPAnimDecoderGetInfo$handle() { + return WebPAnimDecoderGetInfo.HANDLE; } - private static final int UINT_LEAST8_MAX = (int)255L; + /** + * Address for: * {@snippet lang=c : - * #define UINT_LEAST8_MAX 255 + * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) * } */ - public static int UINT_LEAST8_MAX() { - return UINT_LEAST8_MAX; + public static MemorySegment WebPAnimDecoderGetInfo$address() { + return WebPAnimDecoderGetInfo.ADDR; } - private static final int UINT_LEAST16_MAX = (int)65535L; + /** * {@snippet lang=c : - * #define UINT_LEAST16_MAX 65535 + * extern int WebPAnimDecoderGetInfo(const WebPAnimDecoder *dec, WebPAnimInfo *info) * } */ - public static int UINT_LEAST16_MAX() { - return UINT_LEAST16_MAX; + public static int WebPAnimDecoderGetInfo(MemorySegment dec, MemorySegment info) { + var mh$ = WebPAnimDecoderGetInfo.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderGetInfo", dec, info); + } + return (int)mh$.invokeExact(dec, info); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderGetNext { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER, + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetNext"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int UINT_LEAST32_MAX = (int)4294967295L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define UINT_LEAST32_MAX 4294967295 + * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) * } */ - public static int UINT_LEAST32_MAX() { - return UINT_LEAST32_MAX; + public static FunctionDescriptor WebPAnimDecoderGetNext$descriptor() { + return WebPAnimDecoderGetNext.DESC; } - private static final long UINT_LEAST64_MAX = -1L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define UINT_LEAST64_MAX -1 + * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) * } */ - public static long UINT_LEAST64_MAX() { - return UINT_LEAST64_MAX; + public static MethodHandle WebPAnimDecoderGetNext$handle() { + return WebPAnimDecoderGetNext.HANDLE; } - private static final int INT_FAST8_MIN = (int)-128L; + /** + * Address for: * {@snippet lang=c : - * #define INT_FAST8_MIN -128 + * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) * } */ - public static int INT_FAST8_MIN() { - return INT_FAST8_MIN; + public static MemorySegment WebPAnimDecoderGetNext$address() { + return WebPAnimDecoderGetNext.ADDR; } - private static final int INT_FAST16_MIN = (int)-32768L; + /** * {@snippet lang=c : - * #define INT_FAST16_MIN -32768 + * extern int WebPAnimDecoderGetNext(WebPAnimDecoder *dec, uint8_t **buf, int *timestamp) * } */ - public static int INT_FAST16_MIN() { - return INT_FAST16_MIN; + public static int WebPAnimDecoderGetNext(MemorySegment dec, MemorySegment buf, MemorySegment timestamp) { + var mh$ = WebPAnimDecoderGetNext.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderGetNext", dec, buf, timestamp); + } + return (int)mh$.invokeExact(dec, buf, timestamp); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderHasMoreFrames { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_INT, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderHasMoreFrames"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int INT_FAST32_MIN = (int)-2147483648L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define INT_FAST32_MIN -2147483648 + * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) * } */ - public static int INT_FAST32_MIN() { - return INT_FAST32_MIN; + public static FunctionDescriptor WebPAnimDecoderHasMoreFrames$descriptor() { + return WebPAnimDecoderHasMoreFrames.DESC; } - private static final long INT_FAST64_MIN = -9223372036854775808L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INT_FAST64_MIN -9223372036854775808 + * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) * } */ - public static long INT_FAST64_MIN() { - return INT_FAST64_MIN; + public static MethodHandle WebPAnimDecoderHasMoreFrames$handle() { + return WebPAnimDecoderHasMoreFrames.HANDLE; } - private static final int INT_FAST8_MAX = (int)127L; + /** + * Address for: * {@snippet lang=c : - * #define INT_FAST8_MAX 127 + * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) * } */ - public static int INT_FAST8_MAX() { - return INT_FAST8_MAX; + public static MemorySegment WebPAnimDecoderHasMoreFrames$address() { + return WebPAnimDecoderHasMoreFrames.ADDR; } - private static final int INT_FAST16_MAX = (int)32767L; + /** * {@snippet lang=c : - * #define INT_FAST16_MAX 32767 + * extern int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder *dec) * } */ - public static int INT_FAST16_MAX() { - return INT_FAST16_MAX; + public static int WebPAnimDecoderHasMoreFrames(MemorySegment dec) { + var mh$ = WebPAnimDecoderHasMoreFrames.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderHasMoreFrames", dec); + } + return (int)mh$.invokeExact(dec); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderReset { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderReset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int INT_FAST32_MAX = (int)2147483647L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define INT_FAST32_MAX 2147483647 + * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) * } */ - public static int INT_FAST32_MAX() { - return INT_FAST32_MAX; + public static FunctionDescriptor WebPAnimDecoderReset$descriptor() { + return WebPAnimDecoderReset.DESC; } - private static final long INT_FAST64_MAX = 9223372036854775807L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INT_FAST64_MAX 9223372036854775807 + * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) * } */ - public static long INT_FAST64_MAX() { - return INT_FAST64_MAX; + public static MethodHandle WebPAnimDecoderReset$handle() { + return WebPAnimDecoderReset.HANDLE; } - private static final int UINT_FAST8_MAX = (int)255L; + /** + * Address for: * {@snippet lang=c : - * #define UINT_FAST8_MAX 255 + * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) * } */ - public static int UINT_FAST8_MAX() { - return UINT_FAST8_MAX; + public static MemorySegment WebPAnimDecoderReset$address() { + return WebPAnimDecoderReset.ADDR; } - private static final int UINT_FAST16_MAX = (int)65535L; + /** * {@snippet lang=c : - * #define UINT_FAST16_MAX 65535 + * extern void WebPAnimDecoderReset(WebPAnimDecoder *dec) * } */ - public static int UINT_FAST16_MAX() { - return UINT_FAST16_MAX; + public static void WebPAnimDecoderReset(MemorySegment dec) { + var mh$ = WebPAnimDecoderReset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderReset", dec); + } + mh$.invokeExact(dec); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderGetDemuxer { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + demux_h.C_POINTER, + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderGetDemuxer"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final int UINT_FAST32_MAX = (int)4294967295L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define UINT_FAST32_MAX 4294967295 + * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) * } */ - public static int UINT_FAST32_MAX() { - return UINT_FAST32_MAX; + public static FunctionDescriptor WebPAnimDecoderGetDemuxer$descriptor() { + return WebPAnimDecoderGetDemuxer.DESC; } - private static final long UINT_FAST64_MAX = -1L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define UINT_FAST64_MAX -1 + * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) * } */ - public static long UINT_FAST64_MAX() { - return UINT_FAST64_MAX; + public static MethodHandle WebPAnimDecoderGetDemuxer$handle() { + return WebPAnimDecoderGetDemuxer.HANDLE; } - private static final long INTPTR_MAX = 9223372036854775807L; + /** + * Address for: * {@snippet lang=c : - * #define INTPTR_MAX 9223372036854775807 + * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) * } */ - public static long INTPTR_MAX() { - return INTPTR_MAX; + public static MemorySegment WebPAnimDecoderGetDemuxer$address() { + return WebPAnimDecoderGetDemuxer.ADDR; } - private static final long INTPTR_MIN = -9223372036854775808L; + /** * {@snippet lang=c : - * #define INTPTR_MIN -9223372036854775808 + * extern const WebPDemuxer *WebPAnimDecoderGetDemuxer(const WebPAnimDecoder *dec) * } */ - public static long INTPTR_MIN() { - return INTPTR_MIN; + public static MemorySegment WebPAnimDecoderGetDemuxer(MemorySegment dec) { + var mh$ = WebPAnimDecoderGetDemuxer.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderGetDemuxer", dec); + } + return (MemorySegment)mh$.invokeExact(dec); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimDecoderDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + demux_h.C_POINTER + ); + + public static final MemorySegment ADDR = demux_h.findOrThrow("WebPAnimDecoderDelete"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); } - private static final long UINTPTR_MAX = -1L; + /** + * Function descriptor for: * {@snippet lang=c : - * #define UINTPTR_MAX -1 + * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) * } */ - public static long UINTPTR_MAX() { - return UINTPTR_MAX; + public static FunctionDescriptor WebPAnimDecoderDelete$descriptor() { + return WebPAnimDecoderDelete.DESC; } - private static final long INTMAX_MAX = 9223372036854775807L; + /** + * Downcall method handle for: * {@snippet lang=c : - * #define INTMAX_MAX 9223372036854775807 + * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) * } */ - public static long INTMAX_MAX() { - return INTMAX_MAX; + public static MethodHandle WebPAnimDecoderDelete$handle() { + return WebPAnimDecoderDelete.HANDLE; } - private static final long UINTMAX_MAX = -1L; + /** + * Address for: * {@snippet lang=c : - * #define UINTMAX_MAX -1 + * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) * } */ - public static long UINTMAX_MAX() { - return UINTMAX_MAX; + public static MemorySegment WebPAnimDecoderDelete$address() { + return WebPAnimDecoderDelete.ADDR; } - private static final long INTMAX_MIN = -9223372036854775808L; + /** * {@snippet lang=c : - * #define INTMAX_MIN -9223372036854775808 + * extern void WebPAnimDecoderDelete(WebPAnimDecoder *dec) * } */ - public static long INTMAX_MIN() { - return INTMAX_MIN; + public static void WebPAnimDecoderDelete(MemorySegment dec) { + var mh$ = WebPAnimDecoderDelete.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimDecoderDelete", dec); + } + mh$.invokeExact(dec); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } } - private static final long PTRDIFF_MIN = -9223372036854775808L; + private static final MemorySegment NULL = MemorySegment.ofAddress(0L); /** * {@snippet lang=c : - * #define PTRDIFF_MIN -9223372036854775808 + * #define NULL (void*) 0 * } */ - public static long PTRDIFF_MIN() { - return PTRDIFF_MIN; + public static MemorySegment NULL() { + return NULL; } - private static final long PTRDIFF_MAX = 9223372036854775807L; + private static final int _VCRUNTIME_DISABLED_WARNINGS = (int)4514L; /** * {@snippet lang=c : - * #define PTRDIFF_MAX 9223372036854775807 + * #define _VCRUNTIME_DISABLED_WARNINGS 4514 * } */ - public static long PTRDIFF_MAX() { - return PTRDIFF_MAX; + public static int _VCRUNTIME_DISABLED_WARNINGS() { + return _VCRUNTIME_DISABLED_WARNINGS; } - private static final long SIZE_MAX = -1L; + private static final int _UCRT_DISABLED_WARNINGS = (int)4324L; /** * {@snippet lang=c : - * #define SIZE_MAX -1 + * #define _UCRT_DISABLED_WARNINGS 4324 * } */ - public static long SIZE_MAX() { - return SIZE_MAX; + public static int _UCRT_DISABLED_WARNINGS() { + return _UCRT_DISABLED_WARNINGS; } - private static final long RSIZE_MAX = 9223372036854775807L; + private static final long _TRUNCATE = -1L; /** * {@snippet lang=c : - * #define RSIZE_MAX 9223372036854775807 + * #define _TRUNCATE -1 * } */ - public static long RSIZE_MAX() { - return RSIZE_MAX; + public static long _TRUNCATE() { + return _TRUNCATE; } - private static final int WCHAR_MAX = (int)2147483647L; + private static final long _CRT_SIZE_MAX = -1L; /** * {@snippet lang=c : - * #define WCHAR_MAX 2147483647 + * #define _CRT_SIZE_MAX -1 * } */ - public static int WCHAR_MAX() { - return WCHAR_MAX; + public static long _CRT_SIZE_MAX() { + return _CRT_SIZE_MAX; } - private static final int WCHAR_MIN = (int)-2147483648L; /** * {@snippet lang=c : - * #define WCHAR_MIN -2147483648 + * #define __FILEW__ "C" * } */ - public static int WCHAR_MIN() { - return WCHAR_MIN; + public static MemorySegment __FILEW__() { + class Holder { + static final MemorySegment __FILEW__ + = demux_h.LIBRARY_ARENA.allocateFrom("C"); + } + return Holder.__FILEW__; } - private static final int WINT_MIN = (int)-2147483648L; + private static final int __STDC_SECURE_LIB__ = (int)200411L; /** * {@snippet lang=c : - * #define WINT_MIN -2147483648 + * #define __STDC_SECURE_LIB__ 200411 * } */ - public static int WINT_MIN() { - return WINT_MIN; + public static int __STDC_SECURE_LIB__() { + return __STDC_SECURE_LIB__; } - private static final int WINT_MAX = (int)2147483647L; + private static final int __GOT_SECURE_LIB__ = (int)200411L; /** * {@snippet lang=c : - * #define WINT_MAX 2147483647 + * #define __GOT_SECURE_LIB__ 200411 * } */ - public static int WINT_MAX() { - return WINT_MAX; + public static int __GOT_SECURE_LIB__() { + return __GOT_SECURE_LIB__; } - private static final int SIG_ATOMIC_MIN = (int)-2147483648L; + private static final int EDEADLOCK = (int)36L; /** * {@snippet lang=c : - * #define SIG_ATOMIC_MIN -2147483648 + * #define EDEADLOCK 36 * } */ - public static int SIG_ATOMIC_MIN() { - return SIG_ATOMIC_MIN; + public static int EDEADLOCK() { + return EDEADLOCK; } - private static final int SIG_ATOMIC_MAX = (int)2147483647L; + private static final int _NLSCMPERROR = (int)2147483647L; /** * {@snippet lang=c : - * #define SIG_ATOMIC_MAX 2147483647 + * #define _NLSCMPERROR 2147483647 * } */ - public static int SIG_ATOMIC_MAX() { - return SIG_ATOMIC_MAX; + public static int _NLSCMPERROR() { + return _NLSCMPERROR; } } diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/encode_h.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/encode_h.java new file mode 100644 index 0000000..7311a4c --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/encode_h.java @@ -0,0 +1,2928 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +public class encode_h { + + encode_h() { + // Should not be called directly + } + + static final Arena LIBRARY_ARENA = Arena.ofAuto(); + static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls"); + + static void traceDowncall(String name, Object... args) { + String traceArgs = Arrays.stream(args) + .map(Object::toString) + .collect(Collectors.joining(", ")); + System.out.printf("%s(%s)\n", name, traceArgs); + } + + static MemorySegment findOrThrow(String symbol) { + return SYMBOL_LOOKUP.find(symbol) + .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol)); + } + + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType()); + } catch (ReflectiveOperationException ex) { + throw new AssertionError(ex); + } + } + + static MemoryLayout align(MemoryLayout layout, long align) { + return switch (layout) { + case PaddingLayout p -> p; + case ValueLayout v -> v.withByteAlignment(align); + case GroupLayout g -> { + MemoryLayout[] alignedMembers = g.memberLayouts().stream() + .map(m -> align(m, align)).toArray(MemoryLayout[]::new); + yield g instanceof StructLayout ? + MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers); + } + case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align)); + }; + } + + static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("webp"), LIBRARY_ARENA) + .or(SymbolLookup.loaderLookup()) + .or(Linker.nativeLinker().defaultLookup()); + + public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; + public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE; + public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT; + public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT; + public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG; + public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT; + public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; + public static final AddressLayout C_POINTER = ValueLayout.ADDRESS + .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); + public static final ValueLayout.OfInt C_LONG = ValueLayout.JAVA_INT; + public static final ValueLayout.OfDouble C_LONG_DOUBLE = ValueLayout.JAVA_DOUBLE; + private static final int WEBP_ENCODER_ABI_VERSION = (int)527L; + /** + * {@snippet lang=c : + * #define WEBP_ENCODER_ABI_VERSION 527 + * } + */ + public static int WEBP_ENCODER_ABI_VERSION() { + return WEBP_ENCODER_ABI_VERSION; + } + private static final int WEBP_MAX_DIMENSION = (int)16383L; + /** + * {@snippet lang=c : + * #define WEBP_MAX_DIMENSION 16383 + * } + */ + public static int WEBP_MAX_DIMENSION() { + return WEBP_MAX_DIMENSION; + } + /** + * {@snippet lang=c : + * typedef long long ptrdiff_t + * } + */ + public static final OfLong ptrdiff_t = encode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef unsigned long long size_t + * } + */ + public static final OfLong size_t = encode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef unsigned short wchar_t + * } + */ + public static final OfShort wchar_t = encode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef double max_align_t + * } + */ + public static final OfDouble max_align_t = encode_h.C_DOUBLE; + /** + * {@snippet lang=c : + * typedef signed char int8_t + * } + */ + public static final OfByte int8_t = encode_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef unsigned char uint8_t + * } + */ + public static final OfByte uint8_t = encode_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef short int16_t + * } + */ + public static final OfShort int16_t = encode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef unsigned short uint16_t + * } + */ + public static final OfShort uint16_t = encode_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef int int32_t + * } + */ + public static final OfInt int32_t = encode_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned int uint32_t + * } + */ + public static final OfInt uint32_t = encode_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned long long uint64_t + * } + */ + public static final OfLong uint64_t = encode_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef long long int64_t + * } + */ + public static final OfLong int64_t = encode_h.C_LONG_LONG; + + private static class WebPMalloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_POINTER, + encode_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPMalloc"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static FunctionDescriptor WebPMalloc$descriptor() { + return WebPMalloc.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MethodHandle WebPMalloc$handle() { + return WebPMalloc.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc$address() { + return WebPMalloc.ADDR; + } + + /** + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc(long size) { + var mh$ = WebPMalloc.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMalloc", size); + } + return (MemorySegment)mh$.invokeExact(size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFree { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPFree"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static FunctionDescriptor WebPFree$descriptor() { + return WebPFree.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MethodHandle WebPFree$handle() { + return WebPFree.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MemorySegment WebPFree$address() { + return WebPFree.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static void WebPFree(MemorySegment ptr) { + var mh$ = WebPFree.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFree", ptr); + } + mh$.invokeExact(ptr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPGetEncoderVersion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPGetEncoderVersion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPGetEncoderVersion() + * } + */ + public static FunctionDescriptor WebPGetEncoderVersion$descriptor() { + return WebPGetEncoderVersion.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPGetEncoderVersion() + * } + */ + public static MethodHandle WebPGetEncoderVersion$handle() { + return WebPGetEncoderVersion.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPGetEncoderVersion() + * } + */ + public static MemorySegment WebPGetEncoderVersion$address() { + return WebPGetEncoderVersion.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPGetEncoderVersion() + * } + */ + public static int WebPGetEncoderVersion() { + var mh$ = WebPGetEncoderVersion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetEncoderVersion"); + } + return (int)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_FLOAT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGB(const uint8_t *rgb, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeRGB$descriptor() { + return WebPEncodeRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGB(const uint8_t *rgb, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeRGB$handle() { + return WebPEncodeRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGB(const uint8_t *rgb, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeRGB$address() { + return WebPEncodeRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeRGB(const uint8_t *rgb, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static long WebPEncodeRGB(MemorySegment rgb, int width, int height, int stride, float quality_factor, MemorySegment output) { + var mh$ = WebPEncodeRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeRGB", rgb, width, height, stride, quality_factor, output); + } + return (long)mh$.invokeExact(rgb, width, height, stride, quality_factor, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeBGR { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_FLOAT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeBGR"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGR(const uint8_t *bgr, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeBGR$descriptor() { + return WebPEncodeBGR.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGR(const uint8_t *bgr, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeBGR$handle() { + return WebPEncodeBGR.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGR(const uint8_t *bgr, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeBGR$address() { + return WebPEncodeBGR.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeBGR(const uint8_t *bgr, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static long WebPEncodeBGR(MemorySegment bgr, int width, int height, int stride, float quality_factor, MemorySegment output) { + var mh$ = WebPEncodeBGR.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeBGR", bgr, width, height, stride, quality_factor, output); + } + return (long)mh$.invokeExact(bgr, width, height, stride, quality_factor, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeRGBA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_FLOAT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeRGBA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGBA(const uint8_t *rgba, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeRGBA$descriptor() { + return WebPEncodeRGBA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGBA(const uint8_t *rgba, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeRGBA$handle() { + return WebPEncodeRGBA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeRGBA(const uint8_t *rgba, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeRGBA$address() { + return WebPEncodeRGBA.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeRGBA(const uint8_t *rgba, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static long WebPEncodeRGBA(MemorySegment rgba, int width, int height, int stride, float quality_factor, MemorySegment output) { + var mh$ = WebPEncodeRGBA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeRGBA", rgba, width, height, stride, quality_factor, output); + } + return (long)mh$.invokeExact(rgba, width, height, stride, quality_factor, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeBGRA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_FLOAT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeBGRA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGRA(const uint8_t *bgra, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeBGRA$descriptor() { + return WebPEncodeBGRA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGRA(const uint8_t *bgra, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeBGRA$handle() { + return WebPEncodeBGRA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeBGRA(const uint8_t *bgra, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeBGRA$address() { + return WebPEncodeBGRA.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeBGRA(const uint8_t *bgra, int width, int height, int stride, float quality_factor, uint8_t **output) + * } + */ + public static long WebPEncodeBGRA(MemorySegment bgra, int width, int height, int stride, float quality_factor, MemorySegment output) { + var mh$ = WebPEncodeBGRA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeBGRA", bgra, width, height, stride, quality_factor, output); + } + return (long)mh$.invokeExact(bgra, width, height, stride, quality_factor, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeLosslessRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeLosslessRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGB(const uint8_t *rgb, int width, int height, int stride, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeLosslessRGB$descriptor() { + return WebPEncodeLosslessRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGB(const uint8_t *rgb, int width, int height, int stride, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeLosslessRGB$handle() { + return WebPEncodeLosslessRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGB(const uint8_t *rgb, int width, int height, int stride, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeLosslessRGB$address() { + return WebPEncodeLosslessRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGB(const uint8_t *rgb, int width, int height, int stride, uint8_t **output) + * } + */ + public static long WebPEncodeLosslessRGB(MemorySegment rgb, int width, int height, int stride, MemorySegment output) { + var mh$ = WebPEncodeLosslessRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeLosslessRGB", rgb, width, height, stride, output); + } + return (long)mh$.invokeExact(rgb, width, height, stride, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeLosslessBGR { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeLosslessBGR"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGR(const uint8_t *bgr, int width, int height, int stride, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeLosslessBGR$descriptor() { + return WebPEncodeLosslessBGR.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGR(const uint8_t *bgr, int width, int height, int stride, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeLosslessBGR$handle() { + return WebPEncodeLosslessBGR.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGR(const uint8_t *bgr, int width, int height, int stride, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeLosslessBGR$address() { + return WebPEncodeLosslessBGR.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGR(const uint8_t *bgr, int width, int height, int stride, uint8_t **output) + * } + */ + public static long WebPEncodeLosslessBGR(MemorySegment bgr, int width, int height, int stride, MemorySegment output) { + var mh$ = WebPEncodeLosslessBGR.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeLosslessBGR", bgr, width, height, stride, output); + } + return (long)mh$.invokeExact(bgr, width, height, stride, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeLosslessRGBA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeLosslessRGBA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGBA(const uint8_t *rgba, int width, int height, int stride, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeLosslessRGBA$descriptor() { + return WebPEncodeLosslessRGBA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGBA(const uint8_t *rgba, int width, int height, int stride, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeLosslessRGBA$handle() { + return WebPEncodeLosslessRGBA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGBA(const uint8_t *rgba, int width, int height, int stride, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeLosslessRGBA$address() { + return WebPEncodeLosslessRGBA.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessRGBA(const uint8_t *rgba, int width, int height, int stride, uint8_t **output) + * } + */ + public static long WebPEncodeLosslessRGBA(MemorySegment rgba, int width, int height, int stride, MemorySegment output) { + var mh$ = WebPEncodeLosslessRGBA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeLosslessRGBA", rgba, width, height, stride, output); + } + return (long)mh$.invokeExact(rgba, width, height, stride, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncodeLosslessBGRA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncodeLosslessBGRA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGRA(const uint8_t *bgra, int width, int height, int stride, uint8_t **output) + * } + */ + public static FunctionDescriptor WebPEncodeLosslessBGRA$descriptor() { + return WebPEncodeLosslessBGRA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGRA(const uint8_t *bgra, int width, int height, int stride, uint8_t **output) + * } + */ + public static MethodHandle WebPEncodeLosslessBGRA$handle() { + return WebPEncodeLosslessBGRA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGRA(const uint8_t *bgra, int width, int height, int stride, uint8_t **output) + * } + */ + public static MemorySegment WebPEncodeLosslessBGRA$address() { + return WebPEncodeLosslessBGRA.ADDR; + } + + /** + * {@snippet lang=c : + * extern size_t WebPEncodeLosslessBGRA(const uint8_t *bgra, int width, int height, int stride, uint8_t **output) + * } + */ + public static long WebPEncodeLosslessBGRA(MemorySegment bgra, int width, int height, int stride, MemorySegment output) { + var mh$ = WebPEncodeLosslessBGRA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncodeLosslessBGRA", bgra, width, height, stride, output); + } + return (long)mh$.invokeExact(bgra, width, height, stride, output); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int WEBP_HINT_DEFAULT = (int)0L; + /** + * {@snippet lang=c : + * enum WebPImageHint.WEBP_HINT_DEFAULT = 0 + * } + */ + public static int WEBP_HINT_DEFAULT() { + return WEBP_HINT_DEFAULT; + } + private static final int WEBP_HINT_PICTURE = (int)1L; + /** + * {@snippet lang=c : + * enum WebPImageHint.WEBP_HINT_PICTURE = 1 + * } + */ + public static int WEBP_HINT_PICTURE() { + return WEBP_HINT_PICTURE; + } + private static final int WEBP_HINT_PHOTO = (int)2L; + /** + * {@snippet lang=c : + * enum WebPImageHint.WEBP_HINT_PHOTO = 2 + * } + */ + public static int WEBP_HINT_PHOTO() { + return WEBP_HINT_PHOTO; + } + private static final int WEBP_HINT_GRAPH = (int)3L; + /** + * {@snippet lang=c : + * enum WebPImageHint.WEBP_HINT_GRAPH = 3 + * } + */ + public static int WEBP_HINT_GRAPH() { + return WEBP_HINT_GRAPH; + } + private static final int WEBP_HINT_LAST = (int)4L; + /** + * {@snippet lang=c : + * enum WebPImageHint.WEBP_HINT_LAST = 4 + * } + */ + public static int WEBP_HINT_LAST() { + return WEBP_HINT_LAST; + } + private static final int WEBP_PRESET_DEFAULT = (int)0L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_DEFAULT = 0 + * } + */ + public static int WEBP_PRESET_DEFAULT() { + return WEBP_PRESET_DEFAULT; + } + private static final int WEBP_PRESET_PICTURE = (int)1L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_PICTURE = 1 + * } + */ + public static int WEBP_PRESET_PICTURE() { + return WEBP_PRESET_PICTURE; + } + private static final int WEBP_PRESET_PHOTO = (int)2L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_PHOTO = 2 + * } + */ + public static int WEBP_PRESET_PHOTO() { + return WEBP_PRESET_PHOTO; + } + private static final int WEBP_PRESET_DRAWING = (int)3L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_DRAWING = 3 + * } + */ + public static int WEBP_PRESET_DRAWING() { + return WEBP_PRESET_DRAWING; + } + private static final int WEBP_PRESET_ICON = (int)4L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_ICON = 4 + * } + */ + public static int WEBP_PRESET_ICON() { + return WEBP_PRESET_ICON; + } + private static final int WEBP_PRESET_TEXT = (int)5L; + /** + * {@snippet lang=c : + * enum WebPPreset.WEBP_PRESET_TEXT = 5 + * } + */ + public static int WEBP_PRESET_TEXT() { + return WEBP_PRESET_TEXT; + } + + private static class WebPConfigInitInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_FLOAT, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPConfigInitInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPConfigInitInternal(WebPConfig *, WebPPreset, float, int) + * } + */ + public static FunctionDescriptor WebPConfigInitInternal$descriptor() { + return WebPConfigInitInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPConfigInitInternal(WebPConfig *, WebPPreset, float, int) + * } + */ + public static MethodHandle WebPConfigInitInternal$handle() { + return WebPConfigInitInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPConfigInitInternal(WebPConfig *, WebPPreset, float, int) + * } + */ + public static MemorySegment WebPConfigInitInternal$address() { + return WebPConfigInitInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPConfigInitInternal(WebPConfig *, WebPPreset, float, int) + * } + */ + public static int WebPConfigInitInternal(MemorySegment x0, int x1, float x2, int x3) { + var mh$ = WebPConfigInitInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPConfigInitInternal", x0, x1, x2, x3); + } + return (int)mh$.invokeExact(x0, x1, x2, x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPConfigLosslessPreset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPConfigLosslessPreset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPConfigLosslessPreset(WebPConfig *config, int level) + * } + */ + public static FunctionDescriptor WebPConfigLosslessPreset$descriptor() { + return WebPConfigLosslessPreset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPConfigLosslessPreset(WebPConfig *config, int level) + * } + */ + public static MethodHandle WebPConfigLosslessPreset$handle() { + return WebPConfigLosslessPreset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPConfigLosslessPreset(WebPConfig *config, int level) + * } + */ + public static MemorySegment WebPConfigLosslessPreset$address() { + return WebPConfigLosslessPreset.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPConfigLosslessPreset(WebPConfig *config, int level) + * } + */ + public static int WebPConfigLosslessPreset(MemorySegment config, int level) { + var mh$ = WebPConfigLosslessPreset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPConfigLosslessPreset", config, level); + } + return (int)mh$.invokeExact(config, level); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPValidateConfig { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPValidateConfig"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPValidateConfig(const WebPConfig *config) + * } + */ + public static FunctionDescriptor WebPValidateConfig$descriptor() { + return WebPValidateConfig.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPValidateConfig(const WebPConfig *config) + * } + */ + public static MethodHandle WebPValidateConfig$handle() { + return WebPValidateConfig.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPValidateConfig(const WebPConfig *config) + * } + */ + public static MemorySegment WebPValidateConfig$address() { + return WebPValidateConfig.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPValidateConfig(const WebPConfig *config) + * } + */ + public static int WebPValidateConfig(MemorySegment config) { + var mh$ = WebPValidateConfig.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPValidateConfig", config); + } + return (int)mh$.invokeExact(config); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMemoryWriterInit { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPMemoryWriterInit"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPMemoryWriterInit(WebPMemoryWriter *writer) + * } + */ + public static FunctionDescriptor WebPMemoryWriterInit$descriptor() { + return WebPMemoryWriterInit.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPMemoryWriterInit(WebPMemoryWriter *writer) + * } + */ + public static MethodHandle WebPMemoryWriterInit$handle() { + return WebPMemoryWriterInit.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPMemoryWriterInit(WebPMemoryWriter *writer) + * } + */ + public static MemorySegment WebPMemoryWriterInit$address() { + return WebPMemoryWriterInit.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPMemoryWriterInit(WebPMemoryWriter *writer) + * } + */ + public static void WebPMemoryWriterInit(MemorySegment writer) { + var mh$ = WebPMemoryWriterInit.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMemoryWriterInit", writer); + } + mh$.invokeExact(writer); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMemoryWriterClear { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPMemoryWriterClear"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPMemoryWriterClear(WebPMemoryWriter *writer) + * } + */ + public static FunctionDescriptor WebPMemoryWriterClear$descriptor() { + return WebPMemoryWriterClear.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPMemoryWriterClear(WebPMemoryWriter *writer) + * } + */ + public static MethodHandle WebPMemoryWriterClear$handle() { + return WebPMemoryWriterClear.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPMemoryWriterClear(WebPMemoryWriter *writer) + * } + */ + public static MemorySegment WebPMemoryWriterClear$address() { + return WebPMemoryWriterClear.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPMemoryWriterClear(WebPMemoryWriter *writer) + * } + */ + public static void WebPMemoryWriterClear(MemorySegment writer) { + var mh$ = WebPMemoryWriterClear.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMemoryWriterClear", writer); + } + mh$.invokeExact(writer); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMemoryWrite { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_LONG_LONG, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPMemoryWrite"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPMemoryWrite(const uint8_t *data, size_t data_size, const WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPMemoryWrite$descriptor() { + return WebPMemoryWrite.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPMemoryWrite(const uint8_t *data, size_t data_size, const WebPPicture *picture) + * } + */ + public static MethodHandle WebPMemoryWrite$handle() { + return WebPMemoryWrite.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPMemoryWrite(const uint8_t *data, size_t data_size, const WebPPicture *picture) + * } + */ + public static MemorySegment WebPMemoryWrite$address() { + return WebPMemoryWrite.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPMemoryWrite(const uint8_t *data, size_t data_size, const WebPPicture *picture) + * } + */ + public static int WebPMemoryWrite(MemorySegment data, long data_size, MemorySegment picture) { + var mh$ = WebPMemoryWrite.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMemoryWrite", data, data_size, picture); + } + return (int)mh$.invokeExact(data, data_size, picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int WEBP_YUV420 = (int)0L; + /** + * {@snippet lang=c : + * enum WebPEncCSP.WEBP_YUV420 = 0 + * } + */ + public static int WEBP_YUV420() { + return WEBP_YUV420; + } + private static final int WEBP_YUV420A = (int)4L; + /** + * {@snippet lang=c : + * enum WebPEncCSP.WEBP_YUV420A = 4 + * } + */ + public static int WEBP_YUV420A() { + return WEBP_YUV420A; + } + private static final int WEBP_CSP_UV_MASK = (int)3L; + /** + * {@snippet lang=c : + * enum WebPEncCSP.WEBP_CSP_UV_MASK = 3 + * } + */ + public static int WEBP_CSP_UV_MASK() { + return WEBP_CSP_UV_MASK; + } + private static final int WEBP_CSP_ALPHA_BIT = (int)4L; + /** + * {@snippet lang=c : + * enum WebPEncCSP.WEBP_CSP_ALPHA_BIT = 4 + * } + */ + public static int WEBP_CSP_ALPHA_BIT() { + return WEBP_CSP_ALPHA_BIT; + } + private static final int VP8_ENC_OK = (int)0L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_OK = 0 + * } + */ + public static int VP8_ENC_OK() { + return VP8_ENC_OK; + } + private static final int VP8_ENC_ERROR_OUT_OF_MEMORY = (int)1L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_OUT_OF_MEMORY = 1 + * } + */ + public static int VP8_ENC_ERROR_OUT_OF_MEMORY() { + return VP8_ENC_ERROR_OUT_OF_MEMORY; + } + private static final int VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY = (int)2L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY = 2 + * } + */ + public static int VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY() { + return VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY; + } + private static final int VP8_ENC_ERROR_NULL_PARAMETER = (int)3L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_NULL_PARAMETER = 3 + * } + */ + public static int VP8_ENC_ERROR_NULL_PARAMETER() { + return VP8_ENC_ERROR_NULL_PARAMETER; + } + private static final int VP8_ENC_ERROR_INVALID_CONFIGURATION = (int)4L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_INVALID_CONFIGURATION = 4 + * } + */ + public static int VP8_ENC_ERROR_INVALID_CONFIGURATION() { + return VP8_ENC_ERROR_INVALID_CONFIGURATION; + } + private static final int VP8_ENC_ERROR_BAD_DIMENSION = (int)5L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_BAD_DIMENSION = 5 + * } + */ + public static int VP8_ENC_ERROR_BAD_DIMENSION() { + return VP8_ENC_ERROR_BAD_DIMENSION; + } + private static final int VP8_ENC_ERROR_PARTITION0_OVERFLOW = (int)6L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_PARTITION0_OVERFLOW = 6 + * } + */ + public static int VP8_ENC_ERROR_PARTITION0_OVERFLOW() { + return VP8_ENC_ERROR_PARTITION0_OVERFLOW; + } + private static final int VP8_ENC_ERROR_PARTITION_OVERFLOW = (int)7L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_PARTITION_OVERFLOW = 7 + * } + */ + public static int VP8_ENC_ERROR_PARTITION_OVERFLOW() { + return VP8_ENC_ERROR_PARTITION_OVERFLOW; + } + private static final int VP8_ENC_ERROR_BAD_WRITE = (int)8L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_BAD_WRITE = 8 + * } + */ + public static int VP8_ENC_ERROR_BAD_WRITE() { + return VP8_ENC_ERROR_BAD_WRITE; + } + private static final int VP8_ENC_ERROR_FILE_TOO_BIG = (int)9L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_FILE_TOO_BIG = 9 + * } + */ + public static int VP8_ENC_ERROR_FILE_TOO_BIG() { + return VP8_ENC_ERROR_FILE_TOO_BIG; + } + private static final int VP8_ENC_ERROR_USER_ABORT = (int)10L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_USER_ABORT = 10 + * } + */ + public static int VP8_ENC_ERROR_USER_ABORT() { + return VP8_ENC_ERROR_USER_ABORT; + } + private static final int VP8_ENC_ERROR_LAST = (int)11L; + /** + * {@snippet lang=c : + * enum WebPEncodingError.VP8_ENC_ERROR_LAST = 11 + * } + */ + public static int VP8_ENC_ERROR_LAST() { + return VP8_ENC_ERROR_LAST; + } + + private static class WebPPictureInitInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureInitInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureInitInternal(WebPPicture *, int) + * } + */ + public static FunctionDescriptor WebPPictureInitInternal$descriptor() { + return WebPPictureInitInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureInitInternal(WebPPicture *, int) + * } + */ + public static MethodHandle WebPPictureInitInternal$handle() { + return WebPPictureInitInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureInitInternal(WebPPicture *, int) + * } + */ + public static MemorySegment WebPPictureInitInternal$address() { + return WebPPictureInitInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureInitInternal(WebPPicture *, int) + * } + */ + public static int WebPPictureInitInternal(MemorySegment x0, int x1) { + var mh$ = WebPPictureInitInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureInitInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureAlloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureAlloc"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureAlloc(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureAlloc$descriptor() { + return WebPPictureAlloc.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureAlloc(WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureAlloc$handle() { + return WebPPictureAlloc.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureAlloc(WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureAlloc$address() { + return WebPPictureAlloc.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureAlloc(WebPPicture *picture) + * } + */ + public static int WebPPictureAlloc(MemorySegment picture) { + var mh$ = WebPPictureAlloc.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureAlloc", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureFree { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureFree"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPPictureFree(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureFree$descriptor() { + return WebPPictureFree.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPPictureFree(WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureFree$handle() { + return WebPPictureFree.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPPictureFree(WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureFree$address() { + return WebPPictureFree.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPPictureFree(WebPPicture *picture) + * } + */ + public static void WebPPictureFree(MemorySegment picture) { + var mh$ = WebPPictureFree.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureFree", picture); + } + mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureCopy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureCopy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureCopy(const WebPPicture *src, WebPPicture *dst) + * } + */ + public static FunctionDescriptor WebPPictureCopy$descriptor() { + return WebPPictureCopy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureCopy(const WebPPicture *src, WebPPicture *dst) + * } + */ + public static MethodHandle WebPPictureCopy$handle() { + return WebPPictureCopy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureCopy(const WebPPicture *src, WebPPicture *dst) + * } + */ + public static MemorySegment WebPPictureCopy$address() { + return WebPPictureCopy.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureCopy(const WebPPicture *src, WebPPicture *dst) + * } + */ + public static int WebPPictureCopy(MemorySegment src, MemorySegment dst) { + var mh$ = WebPPictureCopy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureCopy", src, dst); + } + return (int)mh$.invokeExact(src, dst); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPlaneDistortion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_LONG_LONG, + encode_h.C_POINTER, + encode_h.C_LONG_LONG, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_LONG_LONG, + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPlaneDistortion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPlaneDistortion(const uint8_t *src, size_t src_stride, const uint8_t *ref, size_t ref_stride, int width, int height, size_t x_step, int type, float *distortion, float *result) + * } + */ + public static FunctionDescriptor WebPPlaneDistortion$descriptor() { + return WebPPlaneDistortion.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPlaneDistortion(const uint8_t *src, size_t src_stride, const uint8_t *ref, size_t ref_stride, int width, int height, size_t x_step, int type, float *distortion, float *result) + * } + */ + public static MethodHandle WebPPlaneDistortion$handle() { + return WebPPlaneDistortion.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPlaneDistortion(const uint8_t *src, size_t src_stride, const uint8_t *ref, size_t ref_stride, int width, int height, size_t x_step, int type, float *distortion, float *result) + * } + */ + public static MemorySegment WebPPlaneDistortion$address() { + return WebPPlaneDistortion.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPlaneDistortion(const uint8_t *src, size_t src_stride, const uint8_t *ref, size_t ref_stride, int width, int height, size_t x_step, int type, float *distortion, float *result) + * } + */ + public static int WebPPlaneDistortion(MemorySegment src, long src_stride, MemorySegment ref, long ref_stride, int width, int height, long x_step, int type, MemorySegment distortion, MemorySegment result) { + var mh$ = WebPPlaneDistortion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPlaneDistortion", src, src_stride, ref, ref_stride, width, height, x_step, type, distortion, result); + } + return (int)mh$.invokeExact(src, src_stride, ref, ref_stride, width, height, x_step, type, distortion, result); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureDistortion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureDistortion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureDistortion(const WebPPicture *src, const WebPPicture *ref, int metric_type, float result[5]) + * } + */ + public static FunctionDescriptor WebPPictureDistortion$descriptor() { + return WebPPictureDistortion.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureDistortion(const WebPPicture *src, const WebPPicture *ref, int metric_type, float result[5]) + * } + */ + public static MethodHandle WebPPictureDistortion$handle() { + return WebPPictureDistortion.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureDistortion(const WebPPicture *src, const WebPPicture *ref, int metric_type, float result[5]) + * } + */ + public static MemorySegment WebPPictureDistortion$address() { + return WebPPictureDistortion.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureDistortion(const WebPPicture *src, const WebPPicture *ref, int metric_type, float result[5]) + * } + */ + public static int WebPPictureDistortion(MemorySegment src, MemorySegment ref, int metric_type, MemorySegment result) { + var mh$ = WebPPictureDistortion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureDistortion", src, ref, metric_type, result); + } + return (int)mh$.invokeExact(src, ref, metric_type, result); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureCrop { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureCrop"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureCrop(WebPPicture *picture, int left, int top, int width, int height) + * } + */ + public static FunctionDescriptor WebPPictureCrop$descriptor() { + return WebPPictureCrop.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureCrop(WebPPicture *picture, int left, int top, int width, int height) + * } + */ + public static MethodHandle WebPPictureCrop$handle() { + return WebPPictureCrop.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureCrop(WebPPicture *picture, int left, int top, int width, int height) + * } + */ + public static MemorySegment WebPPictureCrop$address() { + return WebPPictureCrop.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureCrop(WebPPicture *picture, int left, int top, int width, int height) + * } + */ + public static int WebPPictureCrop(MemorySegment picture, int left, int top, int width, int height) { + var mh$ = WebPPictureCrop.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureCrop", picture, left, top, width, height); + } + return (int)mh$.invokeExact(picture, left, top, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureView { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureView"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureView(const WebPPicture *src, int left, int top, int width, int height, WebPPicture *dst) + * } + */ + public static FunctionDescriptor WebPPictureView$descriptor() { + return WebPPictureView.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureView(const WebPPicture *src, int left, int top, int width, int height, WebPPicture *dst) + * } + */ + public static MethodHandle WebPPictureView$handle() { + return WebPPictureView.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureView(const WebPPicture *src, int left, int top, int width, int height, WebPPicture *dst) + * } + */ + public static MemorySegment WebPPictureView$address() { + return WebPPictureView.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureView(const WebPPicture *src, int left, int top, int width, int height, WebPPicture *dst) + * } + */ + public static int WebPPictureView(MemorySegment src, int left, int top, int width, int height, MemorySegment dst) { + var mh$ = WebPPictureView.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureView", src, left, top, width, height, dst); + } + return (int)mh$.invokeExact(src, left, top, width, height, dst); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureIsView { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureIsView"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureIsView(const WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureIsView$descriptor() { + return WebPPictureIsView.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureIsView(const WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureIsView$handle() { + return WebPPictureIsView.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureIsView(const WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureIsView$address() { + return WebPPictureIsView.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureIsView(const WebPPicture *picture) + * } + */ + public static int WebPPictureIsView(MemorySegment picture) { + var mh$ = WebPPictureIsView.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureIsView", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureRescale { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureRescale"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureRescale(WebPPicture *picture, int width, int height) + * } + */ + public static FunctionDescriptor WebPPictureRescale$descriptor() { + return WebPPictureRescale.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureRescale(WebPPicture *picture, int width, int height) + * } + */ + public static MethodHandle WebPPictureRescale$handle() { + return WebPPictureRescale.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureRescale(WebPPicture *picture, int width, int height) + * } + */ + public static MemorySegment WebPPictureRescale$address() { + return WebPPictureRescale.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureRescale(WebPPicture *picture, int width, int height) + * } + */ + public static int WebPPictureRescale(MemorySegment picture, int width, int height) { + var mh$ = WebPPictureRescale.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureRescale", picture, width, height); + } + return (int)mh$.invokeExact(picture, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportRGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportRGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportRGB(WebPPicture *picture, const uint8_t *rgb, int rgb_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportRGB$descriptor() { + return WebPPictureImportRGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportRGB(WebPPicture *picture, const uint8_t *rgb, int rgb_stride) + * } + */ + public static MethodHandle WebPPictureImportRGB$handle() { + return WebPPictureImportRGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportRGB(WebPPicture *picture, const uint8_t *rgb, int rgb_stride) + * } + */ + public static MemorySegment WebPPictureImportRGB$address() { + return WebPPictureImportRGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportRGB(WebPPicture *picture, const uint8_t *rgb, int rgb_stride) + * } + */ + public static int WebPPictureImportRGB(MemorySegment picture, MemorySegment rgb, int rgb_stride) { + var mh$ = WebPPictureImportRGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportRGB", picture, rgb, rgb_stride); + } + return (int)mh$.invokeExact(picture, rgb, rgb_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportRGBA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportRGBA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBA(WebPPicture *picture, const uint8_t *rgba, int rgba_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportRGBA$descriptor() { + return WebPPictureImportRGBA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBA(WebPPicture *picture, const uint8_t *rgba, int rgba_stride) + * } + */ + public static MethodHandle WebPPictureImportRGBA$handle() { + return WebPPictureImportRGBA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBA(WebPPicture *picture, const uint8_t *rgba, int rgba_stride) + * } + */ + public static MemorySegment WebPPictureImportRGBA$address() { + return WebPPictureImportRGBA.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportRGBA(WebPPicture *picture, const uint8_t *rgba, int rgba_stride) + * } + */ + public static int WebPPictureImportRGBA(MemorySegment picture, MemorySegment rgba, int rgba_stride) { + var mh$ = WebPPictureImportRGBA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportRGBA", picture, rgba, rgba_stride); + } + return (int)mh$.invokeExact(picture, rgba, rgba_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportRGBX { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportRGBX"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBX(WebPPicture *picture, const uint8_t *rgbx, int rgbx_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportRGBX$descriptor() { + return WebPPictureImportRGBX.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBX(WebPPicture *picture, const uint8_t *rgbx, int rgbx_stride) + * } + */ + public static MethodHandle WebPPictureImportRGBX$handle() { + return WebPPictureImportRGBX.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportRGBX(WebPPicture *picture, const uint8_t *rgbx, int rgbx_stride) + * } + */ + public static MemorySegment WebPPictureImportRGBX$address() { + return WebPPictureImportRGBX.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportRGBX(WebPPicture *picture, const uint8_t *rgbx, int rgbx_stride) + * } + */ + public static int WebPPictureImportRGBX(MemorySegment picture, MemorySegment rgbx, int rgbx_stride) { + var mh$ = WebPPictureImportRGBX.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportRGBX", picture, rgbx, rgbx_stride); + } + return (int)mh$.invokeExact(picture, rgbx, rgbx_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportBGR { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportBGR"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportBGR(WebPPicture *picture, const uint8_t *bgr, int bgr_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportBGR$descriptor() { + return WebPPictureImportBGR.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportBGR(WebPPicture *picture, const uint8_t *bgr, int bgr_stride) + * } + */ + public static MethodHandle WebPPictureImportBGR$handle() { + return WebPPictureImportBGR.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportBGR(WebPPicture *picture, const uint8_t *bgr, int bgr_stride) + * } + */ + public static MemorySegment WebPPictureImportBGR$address() { + return WebPPictureImportBGR.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportBGR(WebPPicture *picture, const uint8_t *bgr, int bgr_stride) + * } + */ + public static int WebPPictureImportBGR(MemorySegment picture, MemorySegment bgr, int bgr_stride) { + var mh$ = WebPPictureImportBGR.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportBGR", picture, bgr, bgr_stride); + } + return (int)mh$.invokeExact(picture, bgr, bgr_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportBGRA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportBGRA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRA(WebPPicture *picture, const uint8_t *bgra, int bgra_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportBGRA$descriptor() { + return WebPPictureImportBGRA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRA(WebPPicture *picture, const uint8_t *bgra, int bgra_stride) + * } + */ + public static MethodHandle WebPPictureImportBGRA$handle() { + return WebPPictureImportBGRA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRA(WebPPicture *picture, const uint8_t *bgra, int bgra_stride) + * } + */ + public static MemorySegment WebPPictureImportBGRA$address() { + return WebPPictureImportBGRA.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportBGRA(WebPPicture *picture, const uint8_t *bgra, int bgra_stride) + * } + */ + public static int WebPPictureImportBGRA(MemorySegment picture, MemorySegment bgra, int bgra_stride) { + var mh$ = WebPPictureImportBGRA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportBGRA", picture, bgra, bgra_stride); + } + return (int)mh$.invokeExact(picture, bgra, bgra_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureImportBGRX { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureImportBGRX"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRX(WebPPicture *picture, const uint8_t *bgrx, int bgrx_stride) + * } + */ + public static FunctionDescriptor WebPPictureImportBGRX$descriptor() { + return WebPPictureImportBGRX.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRX(WebPPicture *picture, const uint8_t *bgrx, int bgrx_stride) + * } + */ + public static MethodHandle WebPPictureImportBGRX$handle() { + return WebPPictureImportBGRX.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureImportBGRX(WebPPicture *picture, const uint8_t *bgrx, int bgrx_stride) + * } + */ + public static MemorySegment WebPPictureImportBGRX$address() { + return WebPPictureImportBGRX.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureImportBGRX(WebPPicture *picture, const uint8_t *bgrx, int bgrx_stride) + * } + */ + public static int WebPPictureImportBGRX(MemorySegment picture, MemorySegment bgrx, int bgrx_stride) { + var mh$ = WebPPictureImportBGRX.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureImportBGRX", picture, bgrx, bgrx_stride); + } + return (int)mh$.invokeExact(picture, bgrx, bgrx_stride); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureARGBToYUVA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureARGBToYUVA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVA(WebPPicture *picture, WebPEncCSP) + * } + */ + public static FunctionDescriptor WebPPictureARGBToYUVA$descriptor() { + return WebPPictureARGBToYUVA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVA(WebPPicture *picture, WebPEncCSP) + * } + */ + public static MethodHandle WebPPictureARGBToYUVA$handle() { + return WebPPictureARGBToYUVA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVA(WebPPicture *picture, WebPEncCSP) + * } + */ + public static MemorySegment WebPPictureARGBToYUVA$address() { + return WebPPictureARGBToYUVA.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVA(WebPPicture *picture, WebPEncCSP) + * } + */ + public static int WebPPictureARGBToYUVA(MemorySegment picture, int x1) { + var mh$ = WebPPictureARGBToYUVA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureARGBToYUVA", picture, x1); + } + return (int)mh$.invokeExact(picture, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureARGBToYUVADithered { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_INT, + encode_h.C_FLOAT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureARGBToYUVADithered"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVADithered(WebPPicture *picture, WebPEncCSP colorspace, float dithering) + * } + */ + public static FunctionDescriptor WebPPictureARGBToYUVADithered$descriptor() { + return WebPPictureARGBToYUVADithered.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVADithered(WebPPicture *picture, WebPEncCSP colorspace, float dithering) + * } + */ + public static MethodHandle WebPPictureARGBToYUVADithered$handle() { + return WebPPictureARGBToYUVADithered.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVADithered(WebPPicture *picture, WebPEncCSP colorspace, float dithering) + * } + */ + public static MemorySegment WebPPictureARGBToYUVADithered$address() { + return WebPPictureARGBToYUVADithered.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureARGBToYUVADithered(WebPPicture *picture, WebPEncCSP colorspace, float dithering) + * } + */ + public static int WebPPictureARGBToYUVADithered(MemorySegment picture, int colorspace, float dithering) { + var mh$ = WebPPictureARGBToYUVADithered.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureARGBToYUVADithered", picture, colorspace, dithering); + } + return (int)mh$.invokeExact(picture, colorspace, dithering); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureSharpARGBToYUVA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureSharpARGBToYUVA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureSharpARGBToYUVA(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureSharpARGBToYUVA$descriptor() { + return WebPPictureSharpARGBToYUVA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureSharpARGBToYUVA(WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureSharpARGBToYUVA$handle() { + return WebPPictureSharpARGBToYUVA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureSharpARGBToYUVA(WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureSharpARGBToYUVA$address() { + return WebPPictureSharpARGBToYUVA.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureSharpARGBToYUVA(WebPPicture *picture) + * } + */ + public static int WebPPictureSharpARGBToYUVA(MemorySegment picture) { + var mh$ = WebPPictureSharpARGBToYUVA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureSharpARGBToYUVA", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureSmartARGBToYUVA { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureSmartARGBToYUVA"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureSmartARGBToYUVA(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureSmartARGBToYUVA$descriptor() { + return WebPPictureSmartARGBToYUVA.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureSmartARGBToYUVA(WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureSmartARGBToYUVA$handle() { + return WebPPictureSmartARGBToYUVA.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureSmartARGBToYUVA(WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureSmartARGBToYUVA$address() { + return WebPPictureSmartARGBToYUVA.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureSmartARGBToYUVA(WebPPicture *picture) + * } + */ + public static int WebPPictureSmartARGBToYUVA(MemorySegment picture) { + var mh$ = WebPPictureSmartARGBToYUVA.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureSmartARGBToYUVA", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureYUVAToARGB { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureYUVAToARGB"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureYUVAToARGB(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureYUVAToARGB$descriptor() { + return WebPPictureYUVAToARGB.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureYUVAToARGB(WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureYUVAToARGB$handle() { + return WebPPictureYUVAToARGB.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureYUVAToARGB(WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureYUVAToARGB$address() { + return WebPPictureYUVAToARGB.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureYUVAToARGB(WebPPicture *picture) + * } + */ + public static int WebPPictureYUVAToARGB(MemorySegment picture) { + var mh$ = WebPPictureYUVAToARGB.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureYUVAToARGB", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPCleanupTransparentArea { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPCleanupTransparentArea"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPCleanupTransparentArea(WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPCleanupTransparentArea$descriptor() { + return WebPCleanupTransparentArea.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPCleanupTransparentArea(WebPPicture *picture) + * } + */ + public static MethodHandle WebPCleanupTransparentArea$handle() { + return WebPCleanupTransparentArea.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPCleanupTransparentArea(WebPPicture *picture) + * } + */ + public static MemorySegment WebPCleanupTransparentArea$address() { + return WebPCleanupTransparentArea.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPCleanupTransparentArea(WebPPicture *picture) + * } + */ + public static void WebPCleanupTransparentArea(MemorySegment picture) { + var mh$ = WebPCleanupTransparentArea.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPCleanupTransparentArea", picture); + } + mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPPictureHasTransparency { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPPictureHasTransparency"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPPictureHasTransparency(const WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPPictureHasTransparency$descriptor() { + return WebPPictureHasTransparency.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPPictureHasTransparency(const WebPPicture *picture) + * } + */ + public static MethodHandle WebPPictureHasTransparency$handle() { + return WebPPictureHasTransparency.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPPictureHasTransparency(const WebPPicture *picture) + * } + */ + public static MemorySegment WebPPictureHasTransparency$address() { + return WebPPictureHasTransparency.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPPictureHasTransparency(const WebPPicture *picture) + * } + */ + public static int WebPPictureHasTransparency(MemorySegment picture) { + var mh$ = WebPPictureHasTransparency.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPPictureHasTransparency", picture); + } + return (int)mh$.invokeExact(picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPBlendAlpha { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + encode_h.C_POINTER, + encode_h.C_INT + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPBlendAlpha"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPBlendAlpha(WebPPicture *picture, uint32_t background_rgb) + * } + */ + public static FunctionDescriptor WebPBlendAlpha$descriptor() { + return WebPBlendAlpha.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPBlendAlpha(WebPPicture *picture, uint32_t background_rgb) + * } + */ + public static MethodHandle WebPBlendAlpha$handle() { + return WebPBlendAlpha.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPBlendAlpha(WebPPicture *picture, uint32_t background_rgb) + * } + */ + public static MemorySegment WebPBlendAlpha$address() { + return WebPBlendAlpha.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPBlendAlpha(WebPPicture *picture, uint32_t background_rgb) + * } + */ + public static void WebPBlendAlpha(MemorySegment picture, int background_rgb) { + var mh$ = WebPBlendAlpha.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPBlendAlpha", picture, background_rgb); + } + mh$.invokeExact(picture, background_rgb); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPEncode { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + encode_h.C_INT, + encode_h.C_POINTER, + encode_h.C_POINTER + ); + + public static final MemorySegment ADDR = encode_h.findOrThrow("WebPEncode"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPEncode(const WebPConfig *config, WebPPicture *picture) + * } + */ + public static FunctionDescriptor WebPEncode$descriptor() { + return WebPEncode.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPEncode(const WebPConfig *config, WebPPicture *picture) + * } + */ + public static MethodHandle WebPEncode$handle() { + return WebPEncode.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPEncode(const WebPConfig *config, WebPPicture *picture) + * } + */ + public static MemorySegment WebPEncode$address() { + return WebPEncode.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPEncode(const WebPConfig *config, WebPPicture *picture) + * } + */ + public static int WebPEncode(MemorySegment config, MemorySegment picture) { + var mh$ = WebPEncode.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPEncode", config, picture); + } + return (int)mh$.invokeExact(config, picture); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final MemorySegment NULL = MemorySegment.ofAddress(0L); + /** + * {@snippet lang=c : + * #define NULL (void*) 0 + * } + */ + public static MemorySegment NULL() { + return NULL; + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_mbstate_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mbstate_t.java similarity index 67% rename from imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_mbstate_t.java rename to imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mbstate_t.java index da35e2b..c0ebffe 100644 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_mbstate_t.java +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mbstate_t.java @@ -1,6 +1,6 @@ // Generated by jextract -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; +package com.github.gotson.nightmonkeys.webp.lib.panama; import java.lang.invoke.*; import java.lang.foreign.*; @@ -14,12 +14,12 @@ /** * {@snippet lang=c : - * typedef __mbstate_t __darwin_mbstate_t + * typedef _Mbstatet mbstate_t * } */ -public class __darwin_mbstate_t extends __mbstate_t { +public class mbstate_t extends _Mbstatet { - __darwin_mbstate_t() { + mbstate_t() { // Should not be called directly } } diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mux_h.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mux_h.java new file mode 100644 index 0000000..1936de0 --- /dev/null +++ b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/mux_h.java @@ -0,0 +1,12007 @@ +// Generated by jextract + +package com.github.gotson.nightmonkeys.webp.lib.panama; + +import java.lang.invoke.*; +import java.lang.foreign.*; +import java.nio.ByteOrder; +import java.util.*; +import java.util.function.*; +import java.util.stream.*; + +import static java.lang.foreign.ValueLayout.*; +import static java.lang.foreign.MemoryLayout.PathElement.*; + +public class mux_h { + + mux_h() { + // Should not be called directly + } + + static final Arena LIBRARY_ARENA = Arena.ofAuto(); + static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls"); + + static void traceDowncall(String name, Object... args) { + String traceArgs = Arrays.stream(args) + .map(Object::toString) + .collect(Collectors.joining(", ")); + System.out.printf("%s(%s)\n", name, traceArgs); + } + + static MemorySegment findOrThrow(String symbol) { + return SYMBOL_LOOKUP.find(symbol) + .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol)); + } + + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType()); + } catch (ReflectiveOperationException ex) { + throw new AssertionError(ex); + } + } + + static MemoryLayout align(MemoryLayout layout, long align) { + return switch (layout) { + case PaddingLayout p -> p; + case ValueLayout v -> v.withByteAlignment(align); + case GroupLayout g -> { + MemoryLayout[] alignedMembers = g.memberLayouts().stream() + .map(m -> align(m, align)).toArray(MemoryLayout[]::new); + yield g instanceof StructLayout ? + MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers); + } + case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align)); + }; + } + + static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("webp"), LIBRARY_ARENA) + .or(SymbolLookup.loaderLookup()) + .or(Linker.nativeLinker().defaultLookup()); + + public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; + public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE; + public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT; + public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT; + public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG; + public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT; + public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; + public static final AddressLayout C_POINTER = ValueLayout.ADDRESS + .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); + public static final ValueLayout.OfInt C_LONG = ValueLayout.JAVA_INT; + public static final ValueLayout.OfDouble C_LONG_DOUBLE = ValueLayout.JAVA_DOUBLE; + private static final int _VCRT_COMPILER_PREPROCESSOR = (int)1L; + /** + * {@snippet lang=c : + * #define _VCRT_COMPILER_PREPROCESSOR 1 + * } + */ + public static int _VCRT_COMPILER_PREPROCESSOR() { + return _VCRT_COMPILER_PREPROCESSOR; + } + private static final int _SAL_VERSION = (int)20L; + /** + * {@snippet lang=c : + * #define _SAL_VERSION 20 + * } + */ + public static int _SAL_VERSION() { + return _SAL_VERSION; + } + private static final int __SAL_H_VERSION = (int)180000000L; + /** + * {@snippet lang=c : + * #define __SAL_H_VERSION 180000000 + * } + */ + public static int __SAL_H_VERSION() { + return __SAL_H_VERSION; + } + private static final int _USE_DECLSPECS_FOR_SAL = (int)0L; + /** + * {@snippet lang=c : + * #define _USE_DECLSPECS_FOR_SAL 0 + * } + */ + public static int _USE_DECLSPECS_FOR_SAL() { + return _USE_DECLSPECS_FOR_SAL; + } + private static final int _USE_ATTRIBUTES_FOR_SAL = (int)0L; + /** + * {@snippet lang=c : + * #define _USE_ATTRIBUTES_FOR_SAL 0 + * } + */ + public static int _USE_ATTRIBUTES_FOR_SAL() { + return _USE_ATTRIBUTES_FOR_SAL; + } + private static final int _CRT_PACKING = (int)8L; + /** + * {@snippet lang=c : + * #define _CRT_PACKING 8 + * } + */ + public static int _CRT_PACKING() { + return _CRT_PACKING; + } + private static final int _HAS_EXCEPTIONS = (int)1L; + /** + * {@snippet lang=c : + * #define _HAS_EXCEPTIONS 1 + * } + */ + public static int _HAS_EXCEPTIONS() { + return _HAS_EXCEPTIONS; + } + private static final int _HAS_CXX17 = (int)0L; + /** + * {@snippet lang=c : + * #define _HAS_CXX17 0 + * } + */ + public static int _HAS_CXX17() { + return _HAS_CXX17; + } + private static final int _HAS_CXX20 = (int)0L; + /** + * {@snippet lang=c : + * #define _HAS_CXX20 0 + * } + */ + public static int _HAS_CXX20() { + return _HAS_CXX20; + } + private static final int _HAS_CXX23 = (int)0L; + /** + * {@snippet lang=c : + * #define _HAS_CXX23 0 + * } + */ + public static int _HAS_CXX23() { + return _HAS_CXX23; + } + private static final int _HAS_NODISCARD = (int)0L; + /** + * {@snippet lang=c : + * #define _HAS_NODISCARD 0 + * } + */ + public static int _HAS_NODISCARD() { + return _HAS_NODISCARD; + } + private static final int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE = (int)1L; + /** + * {@snippet lang=c : + * #define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 + * } + */ + public static int _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE() { + return _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE; + } + private static final int _CRT_BUILD_DESKTOP_APP = (int)1L; + /** + * {@snippet lang=c : + * #define _CRT_BUILD_DESKTOP_APP 1 + * } + */ + public static int _CRT_BUILD_DESKTOP_APP() { + return _CRT_BUILD_DESKTOP_APP; + } + private static final int _ARGMAX = (int)100L; + /** + * {@snippet lang=c : + * #define _ARGMAX 100 + * } + */ + public static int _ARGMAX() { + return _ARGMAX; + } + private static final int _CRT_INT_MAX = (int)2147483647L; + /** + * {@snippet lang=c : + * #define _CRT_INT_MAX 2147483647 + * } + */ + public static int _CRT_INT_MAX() { + return _CRT_INT_MAX; + } + private static final int _CRT_FUNCTIONS_REQUIRED = (int)1L; + /** + * {@snippet lang=c : + * #define _CRT_FUNCTIONS_REQUIRED 1 + * } + */ + public static int _CRT_FUNCTIONS_REQUIRED() { + return _CRT_FUNCTIONS_REQUIRED; + } + private static final int _CRT_HAS_CXX17 = (int)0L; + /** + * {@snippet lang=c : + * #define _CRT_HAS_CXX17 0 + * } + */ + public static int _CRT_HAS_CXX17() { + return _CRT_HAS_CXX17; + } + private static final int _CRT_HAS_C11 = (int)1L; + /** + * {@snippet lang=c : + * #define _CRT_HAS_C11 1 + * } + */ + public static int _CRT_HAS_C11() { + return _CRT_HAS_C11; + } + private static final int _CRT_INTERNAL_NONSTDC_NAMES = (int)1L; + /** + * {@snippet lang=c : + * #define _CRT_INTERNAL_NONSTDC_NAMES 1 + * } + */ + public static int _CRT_INTERNAL_NONSTDC_NAMES() { + return _CRT_INTERNAL_NONSTDC_NAMES; + } + private static final int __STDC_WANT_SECURE_LIB__ = (int)1L; + /** + * {@snippet lang=c : + * #define __STDC_WANT_SECURE_LIB__ 1 + * } + */ + public static int __STDC_WANT_SECURE_LIB__() { + return __STDC_WANT_SECURE_LIB__; + } + private static final int _SECURECRT_FILL_BUFFER_PATTERN = (int)254L; + /** + * {@snippet lang=c : + * #define _SECURECRT_FILL_BUFFER_PATTERN 254 + * } + */ + public static int _SECURECRT_FILL_BUFFER_PATTERN() { + return _SECURECRT_FILL_BUFFER_PATTERN; + } + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = (int)0L; + /** + * {@snippet lang=c : + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0 + * } + */ + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES; + } + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = (int)0L; + /** + * {@snippet lang=c : + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 0 + * } + */ + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT; + } + private static final int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = (int)1L; + /** + * {@snippet lang=c : + * #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1 + * } + */ + public static int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES() { + return _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES; + } + private static final int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = (int)0L; + /** + * {@snippet lang=c : + * #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY 0 + * } + */ + public static int _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY() { + return _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY; + } + private static final int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = (int)0L; + /** + * {@snippet lang=c : + * #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY 0 + * } + */ + public static int _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY() { + return _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY; + } + private static final int EPERM = (int)1L; + /** + * {@snippet lang=c : + * #define EPERM 1 + * } + */ + public static int EPERM() { + return EPERM; + } + private static final int ENOENT = (int)2L; + /** + * {@snippet lang=c : + * #define ENOENT 2 + * } + */ + public static int ENOENT() { + return ENOENT; + } + private static final int ESRCH = (int)3L; + /** + * {@snippet lang=c : + * #define ESRCH 3 + * } + */ + public static int ESRCH() { + return ESRCH; + } + private static final int EINTR = (int)4L; + /** + * {@snippet lang=c : + * #define EINTR 4 + * } + */ + public static int EINTR() { + return EINTR; + } + private static final int EIO = (int)5L; + /** + * {@snippet lang=c : + * #define EIO 5 + * } + */ + public static int EIO() { + return EIO; + } + private static final int ENXIO = (int)6L; + /** + * {@snippet lang=c : + * #define ENXIO 6 + * } + */ + public static int ENXIO() { + return ENXIO; + } + private static final int E2BIG = (int)7L; + /** + * {@snippet lang=c : + * #define E2BIG 7 + * } + */ + public static int E2BIG() { + return E2BIG; + } + private static final int ENOEXEC = (int)8L; + /** + * {@snippet lang=c : + * #define ENOEXEC 8 + * } + */ + public static int ENOEXEC() { + return ENOEXEC; + } + private static final int EBADF = (int)9L; + /** + * {@snippet lang=c : + * #define EBADF 9 + * } + */ + public static int EBADF() { + return EBADF; + } + private static final int ECHILD = (int)10L; + /** + * {@snippet lang=c : + * #define ECHILD 10 + * } + */ + public static int ECHILD() { + return ECHILD; + } + private static final int EAGAIN = (int)11L; + /** + * {@snippet lang=c : + * #define EAGAIN 11 + * } + */ + public static int EAGAIN() { + return EAGAIN; + } + private static final int ENOMEM = (int)12L; + /** + * {@snippet lang=c : + * #define ENOMEM 12 + * } + */ + public static int ENOMEM() { + return ENOMEM; + } + private static final int EACCES = (int)13L; + /** + * {@snippet lang=c : + * #define EACCES 13 + * } + */ + public static int EACCES() { + return EACCES; + } + private static final int EFAULT = (int)14L; + /** + * {@snippet lang=c : + * #define EFAULT 14 + * } + */ + public static int EFAULT() { + return EFAULT; + } + private static final int EBUSY = (int)16L; + /** + * {@snippet lang=c : + * #define EBUSY 16 + * } + */ + public static int EBUSY() { + return EBUSY; + } + private static final int EEXIST = (int)17L; + /** + * {@snippet lang=c : + * #define EEXIST 17 + * } + */ + public static int EEXIST() { + return EEXIST; + } + private static final int EXDEV = (int)18L; + /** + * {@snippet lang=c : + * #define EXDEV 18 + * } + */ + public static int EXDEV() { + return EXDEV; + } + private static final int ENODEV = (int)19L; + /** + * {@snippet lang=c : + * #define ENODEV 19 + * } + */ + public static int ENODEV() { + return ENODEV; + } + private static final int ENOTDIR = (int)20L; + /** + * {@snippet lang=c : + * #define ENOTDIR 20 + * } + */ + public static int ENOTDIR() { + return ENOTDIR; + } + private static final int EISDIR = (int)21L; + /** + * {@snippet lang=c : + * #define EISDIR 21 + * } + */ + public static int EISDIR() { + return EISDIR; + } + private static final int ENFILE = (int)23L; + /** + * {@snippet lang=c : + * #define ENFILE 23 + * } + */ + public static int ENFILE() { + return ENFILE; + } + private static final int EMFILE = (int)24L; + /** + * {@snippet lang=c : + * #define EMFILE 24 + * } + */ + public static int EMFILE() { + return EMFILE; + } + private static final int ENOTTY = (int)25L; + /** + * {@snippet lang=c : + * #define ENOTTY 25 + * } + */ + public static int ENOTTY() { + return ENOTTY; + } + private static final int EFBIG = (int)27L; + /** + * {@snippet lang=c : + * #define EFBIG 27 + * } + */ + public static int EFBIG() { + return EFBIG; + } + private static final int ENOSPC = (int)28L; + /** + * {@snippet lang=c : + * #define ENOSPC 28 + * } + */ + public static int ENOSPC() { + return ENOSPC; + } + private static final int ESPIPE = (int)29L; + /** + * {@snippet lang=c : + * #define ESPIPE 29 + * } + */ + public static int ESPIPE() { + return ESPIPE; + } + private static final int EROFS = (int)30L; + /** + * {@snippet lang=c : + * #define EROFS 30 + * } + */ + public static int EROFS() { + return EROFS; + } + private static final int EMLINK = (int)31L; + /** + * {@snippet lang=c : + * #define EMLINK 31 + * } + */ + public static int EMLINK() { + return EMLINK; + } + private static final int EPIPE = (int)32L; + /** + * {@snippet lang=c : + * #define EPIPE 32 + * } + */ + public static int EPIPE() { + return EPIPE; + } + private static final int EDOM = (int)33L; + /** + * {@snippet lang=c : + * #define EDOM 33 + * } + */ + public static int EDOM() { + return EDOM; + } + private static final int EDEADLK = (int)36L; + /** + * {@snippet lang=c : + * #define EDEADLK 36 + * } + */ + public static int EDEADLK() { + return EDEADLK; + } + private static final int ENAMETOOLONG = (int)38L; + /** + * {@snippet lang=c : + * #define ENAMETOOLONG 38 + * } + */ + public static int ENAMETOOLONG() { + return ENAMETOOLONG; + } + private static final int ENOLCK = (int)39L; + /** + * {@snippet lang=c : + * #define ENOLCK 39 + * } + */ + public static int ENOLCK() { + return ENOLCK; + } + private static final int ENOSYS = (int)40L; + /** + * {@snippet lang=c : + * #define ENOSYS 40 + * } + */ + public static int ENOSYS() { + return ENOSYS; + } + private static final int ENOTEMPTY = (int)41L; + /** + * {@snippet lang=c : + * #define ENOTEMPTY 41 + * } + */ + public static int ENOTEMPTY() { + return ENOTEMPTY; + } + private static final int EINVAL = (int)22L; + /** + * {@snippet lang=c : + * #define EINVAL 22 + * } + */ + public static int EINVAL() { + return EINVAL; + } + private static final int ERANGE = (int)34L; + /** + * {@snippet lang=c : + * #define ERANGE 34 + * } + */ + public static int ERANGE() { + return ERANGE; + } + private static final int EILSEQ = (int)42L; + /** + * {@snippet lang=c : + * #define EILSEQ 42 + * } + */ + public static int EILSEQ() { + return EILSEQ; + } + private static final int STRUNCATE = (int)80L; + /** + * {@snippet lang=c : + * #define STRUNCATE 80 + * } + */ + public static int STRUNCATE() { + return STRUNCATE; + } + private static final int EADDRINUSE = (int)100L; + /** + * {@snippet lang=c : + * #define EADDRINUSE 100 + * } + */ + public static int EADDRINUSE() { + return EADDRINUSE; + } + private static final int EADDRNOTAVAIL = (int)101L; + /** + * {@snippet lang=c : + * #define EADDRNOTAVAIL 101 + * } + */ + public static int EADDRNOTAVAIL() { + return EADDRNOTAVAIL; + } + private static final int EAFNOSUPPORT = (int)102L; + /** + * {@snippet lang=c : + * #define EAFNOSUPPORT 102 + * } + */ + public static int EAFNOSUPPORT() { + return EAFNOSUPPORT; + } + private static final int EALREADY = (int)103L; + /** + * {@snippet lang=c : + * #define EALREADY 103 + * } + */ + public static int EALREADY() { + return EALREADY; + } + private static final int EBADMSG = (int)104L; + /** + * {@snippet lang=c : + * #define EBADMSG 104 + * } + */ + public static int EBADMSG() { + return EBADMSG; + } + private static final int ECANCELED = (int)105L; + /** + * {@snippet lang=c : + * #define ECANCELED 105 + * } + */ + public static int ECANCELED() { + return ECANCELED; + } + private static final int ECONNABORTED = (int)106L; + /** + * {@snippet lang=c : + * #define ECONNABORTED 106 + * } + */ + public static int ECONNABORTED() { + return ECONNABORTED; + } + private static final int ECONNREFUSED = (int)107L; + /** + * {@snippet lang=c : + * #define ECONNREFUSED 107 + * } + */ + public static int ECONNREFUSED() { + return ECONNREFUSED; + } + private static final int ECONNRESET = (int)108L; + /** + * {@snippet lang=c : + * #define ECONNRESET 108 + * } + */ + public static int ECONNRESET() { + return ECONNRESET; + } + private static final int EDESTADDRREQ = (int)109L; + /** + * {@snippet lang=c : + * #define EDESTADDRREQ 109 + * } + */ + public static int EDESTADDRREQ() { + return EDESTADDRREQ; + } + private static final int EHOSTUNREACH = (int)110L; + /** + * {@snippet lang=c : + * #define EHOSTUNREACH 110 + * } + */ + public static int EHOSTUNREACH() { + return EHOSTUNREACH; + } + private static final int EIDRM = (int)111L; + /** + * {@snippet lang=c : + * #define EIDRM 111 + * } + */ + public static int EIDRM() { + return EIDRM; + } + private static final int EINPROGRESS = (int)112L; + /** + * {@snippet lang=c : + * #define EINPROGRESS 112 + * } + */ + public static int EINPROGRESS() { + return EINPROGRESS; + } + private static final int EISCONN = (int)113L; + /** + * {@snippet lang=c : + * #define EISCONN 113 + * } + */ + public static int EISCONN() { + return EISCONN; + } + private static final int ELOOP = (int)114L; + /** + * {@snippet lang=c : + * #define ELOOP 114 + * } + */ + public static int ELOOP() { + return ELOOP; + } + private static final int EMSGSIZE = (int)115L; + /** + * {@snippet lang=c : + * #define EMSGSIZE 115 + * } + */ + public static int EMSGSIZE() { + return EMSGSIZE; + } + private static final int ENETDOWN = (int)116L; + /** + * {@snippet lang=c : + * #define ENETDOWN 116 + * } + */ + public static int ENETDOWN() { + return ENETDOWN; + } + private static final int ENETRESET = (int)117L; + /** + * {@snippet lang=c : + * #define ENETRESET 117 + * } + */ + public static int ENETRESET() { + return ENETRESET; + } + private static final int ENETUNREACH = (int)118L; + /** + * {@snippet lang=c : + * #define ENETUNREACH 118 + * } + */ + public static int ENETUNREACH() { + return ENETUNREACH; + } + private static final int ENOBUFS = (int)119L; + /** + * {@snippet lang=c : + * #define ENOBUFS 119 + * } + */ + public static int ENOBUFS() { + return ENOBUFS; + } + private static final int ENODATA = (int)120L; + /** + * {@snippet lang=c : + * #define ENODATA 120 + * } + */ + public static int ENODATA() { + return ENODATA; + } + private static final int ENOLINK = (int)121L; + /** + * {@snippet lang=c : + * #define ENOLINK 121 + * } + */ + public static int ENOLINK() { + return ENOLINK; + } + private static final int ENOMSG = (int)122L; + /** + * {@snippet lang=c : + * #define ENOMSG 122 + * } + */ + public static int ENOMSG() { + return ENOMSG; + } + private static final int ENOPROTOOPT = (int)123L; + /** + * {@snippet lang=c : + * #define ENOPROTOOPT 123 + * } + */ + public static int ENOPROTOOPT() { + return ENOPROTOOPT; + } + private static final int ENOSR = (int)124L; + /** + * {@snippet lang=c : + * #define ENOSR 124 + * } + */ + public static int ENOSR() { + return ENOSR; + } + private static final int ENOSTR = (int)125L; + /** + * {@snippet lang=c : + * #define ENOSTR 125 + * } + */ + public static int ENOSTR() { + return ENOSTR; + } + private static final int ENOTCONN = (int)126L; + /** + * {@snippet lang=c : + * #define ENOTCONN 126 + * } + */ + public static int ENOTCONN() { + return ENOTCONN; + } + private static final int ENOTRECOVERABLE = (int)127L; + /** + * {@snippet lang=c : + * #define ENOTRECOVERABLE 127 + * } + */ + public static int ENOTRECOVERABLE() { + return ENOTRECOVERABLE; + } + private static final int ENOTSOCK = (int)128L; + /** + * {@snippet lang=c : + * #define ENOTSOCK 128 + * } + */ + public static int ENOTSOCK() { + return ENOTSOCK; + } + private static final int ENOTSUP = (int)129L; + /** + * {@snippet lang=c : + * #define ENOTSUP 129 + * } + */ + public static int ENOTSUP() { + return ENOTSUP; + } + private static final int EOPNOTSUPP = (int)130L; + /** + * {@snippet lang=c : + * #define EOPNOTSUPP 130 + * } + */ + public static int EOPNOTSUPP() { + return EOPNOTSUPP; + } + private static final int EOTHER = (int)131L; + /** + * {@snippet lang=c : + * #define EOTHER 131 + * } + */ + public static int EOTHER() { + return EOTHER; + } + private static final int EOVERFLOW = (int)132L; + /** + * {@snippet lang=c : + * #define EOVERFLOW 132 + * } + */ + public static int EOVERFLOW() { + return EOVERFLOW; + } + private static final int EOWNERDEAD = (int)133L; + /** + * {@snippet lang=c : + * #define EOWNERDEAD 133 + * } + */ + public static int EOWNERDEAD() { + return EOWNERDEAD; + } + private static final int EPROTO = (int)134L; + /** + * {@snippet lang=c : + * #define EPROTO 134 + * } + */ + public static int EPROTO() { + return EPROTO; + } + private static final int EPROTONOSUPPORT = (int)135L; + /** + * {@snippet lang=c : + * #define EPROTONOSUPPORT 135 + * } + */ + public static int EPROTONOSUPPORT() { + return EPROTONOSUPPORT; + } + private static final int EPROTOTYPE = (int)136L; + /** + * {@snippet lang=c : + * #define EPROTOTYPE 136 + * } + */ + public static int EPROTOTYPE() { + return EPROTOTYPE; + } + private static final int ETIME = (int)137L; + /** + * {@snippet lang=c : + * #define ETIME 137 + * } + */ + public static int ETIME() { + return ETIME; + } + private static final int ETIMEDOUT = (int)138L; + /** + * {@snippet lang=c : + * #define ETIMEDOUT 138 + * } + */ + public static int ETIMEDOUT() { + return ETIMEDOUT; + } + private static final int ETXTBSY = (int)139L; + /** + * {@snippet lang=c : + * #define ETXTBSY 139 + * } + */ + public static int ETXTBSY() { + return ETXTBSY; + } + private static final int EWOULDBLOCK = (int)140L; + /** + * {@snippet lang=c : + * #define EWOULDBLOCK 140 + * } + */ + public static int EWOULDBLOCK() { + return EWOULDBLOCK; + } + private static final int WEBP_MUX_ABI_VERSION = (int)265L; + /** + * {@snippet lang=c : + * #define WEBP_MUX_ABI_VERSION 265 + * } + */ + public static int WEBP_MUX_ABI_VERSION() { + return WEBP_MUX_ABI_VERSION; + } + /** + * {@snippet lang=c : + * typedef unsigned long long uintptr_t + * } + */ + public static final OfLong uintptr_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef char *va_list + * } + */ + public static final AddressLayout va_list = mux_h.C_POINTER; + + /** + * Variadic invoker class for: + * {@snippet lang=c : + * void __va_start(va_list *, ...) + * } + */ + public static class __va_start { + private static final FunctionDescriptor BASE_DESC = FunctionDescriptor.ofVoid( + mux_h.C_POINTER + ); + private static final MemorySegment ADDR = mux_h.findOrThrow("__va_start"); + + private final MethodHandle handle; + private final FunctionDescriptor descriptor; + private final MethodHandle spreader; + + private __va_start(MethodHandle handle, FunctionDescriptor descriptor, MethodHandle spreader) { + this.handle = handle; + this.descriptor = descriptor; + this.spreader = spreader; + } + + /** + * Variadic invoker factory for: + * {@snippet lang=c : + * void __va_start(va_list *, ...) + * } + */ + public static __va_start makeInvoker(MemoryLayout... layouts) { + FunctionDescriptor desc$ = BASE_DESC.appendArgumentLayouts(layouts); + Linker.Option fva$ = Linker.Option.firstVariadicArg(BASE_DESC.argumentLayouts().size()); + var mh$ = Linker.nativeLinker().downcallHandle(ADDR, desc$, fva$); + var spreader$ = mh$.asSpreader(Object[].class, layouts.length); + return new __va_start(mh$, desc$, spreader$); + } + + /** + * {@return the address} + */ + public static MemorySegment address() { + return ADDR; + } + + /** + * {@return the specialized method handle} + */ + public MethodHandle handle() { + return handle; + } + + /** + * {@return the specialized descriptor} + */ + public FunctionDescriptor descriptor() { + return descriptor; + } + + public void apply(MemorySegment x0, Object... x1) { + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__va_start", x0, x1); + } + spreader.invokeExact(x0, x1); + } catch(IllegalArgumentException | ClassCastException ex$) { + throw ex$; // rethrow IAE from passing wrong number/type of args + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + /** + * {@snippet lang=c : + * typedef unsigned long long size_t + * } + */ + public static final OfLong size_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef long long ptrdiff_t + * } + */ + public static final OfLong ptrdiff_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef long long intptr_t + * } + */ + public static final OfLong intptr_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef _Bool __vcrt_bool + * } + */ + public static final OfBoolean __vcrt_bool = mux_h.C_BOOL; + /** + * {@snippet lang=c : + * typedef unsigned short wchar_t + * } + */ + public static final OfShort wchar_t = mux_h.C_SHORT; + + private static class __security_init_cookie { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__security_init_cookie"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void __security_init_cookie() + * } + */ + public static FunctionDescriptor __security_init_cookie$descriptor() { + return __security_init_cookie.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void __security_init_cookie() + * } + */ + public static MethodHandle __security_init_cookie$handle() { + return __security_init_cookie.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void __security_init_cookie() + * } + */ + public static MemorySegment __security_init_cookie$address() { + return __security_init_cookie.ADDR; + } + + /** + * {@snippet lang=c : + * void __security_init_cookie() + * } + */ + public static void __security_init_cookie() { + var mh$ = __security_init_cookie.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__security_init_cookie"); + } + mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __security_check_cookie { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__security_check_cookie"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void __security_check_cookie(uintptr_t _StackCookie) + * } + */ + public static FunctionDescriptor __security_check_cookie$descriptor() { + return __security_check_cookie.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void __security_check_cookie(uintptr_t _StackCookie) + * } + */ + public static MethodHandle __security_check_cookie$handle() { + return __security_check_cookie.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void __security_check_cookie(uintptr_t _StackCookie) + * } + */ + public static MemorySegment __security_check_cookie$address() { + return __security_check_cookie.ADDR; + } + + /** + * {@snippet lang=c : + * void __security_check_cookie(uintptr_t _StackCookie) + * } + */ + public static void __security_check_cookie(long _StackCookie) { + var mh$ = __security_check_cookie.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__security_check_cookie", _StackCookie); + } + mh$.invokeExact(_StackCookie); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __report_gsfailure { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__report_gsfailure"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void __report_gsfailure(uintptr_t _StackCookie) + * } + */ + public static FunctionDescriptor __report_gsfailure$descriptor() { + return __report_gsfailure.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void __report_gsfailure(uintptr_t _StackCookie) + * } + */ + public static MethodHandle __report_gsfailure$handle() { + return __report_gsfailure.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void __report_gsfailure(uintptr_t _StackCookie) + * } + */ + public static MemorySegment __report_gsfailure$address() { + return __report_gsfailure.ADDR; + } + + /** + * {@snippet lang=c : + * void __report_gsfailure(uintptr_t _StackCookie) + * } + */ + public static void __report_gsfailure(long _StackCookie) { + var mh$ = __report_gsfailure.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__report_gsfailure", _StackCookie); + } + mh$.invokeExact(_StackCookie); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __security_cookie$constants { + public static final OfLong LAYOUT = mux_h.C_LONG_LONG; + public static final MemorySegment SEGMENT = mux_h.findOrThrow("__security_cookie").reinterpret(LAYOUT.byteSize()); + } + + /** + * Layout for variable: + * {@snippet lang=c : + * extern uintptr_t __security_cookie + * } + */ + public static OfLong __security_cookie$layout() { + return __security_cookie$constants.LAYOUT; + } + + /** + * Segment for variable: + * {@snippet lang=c : + * extern uintptr_t __security_cookie + * } + */ + public static MemorySegment __security_cookie$segment() { + return __security_cookie$constants.SEGMENT; + } + + /** + * Getter for variable: + * {@snippet lang=c : + * extern uintptr_t __security_cookie + * } + */ + public static long __security_cookie() { + return __security_cookie$constants.SEGMENT.get(__security_cookie$constants.LAYOUT, 0L); + } + + /** + * Setter for variable: + * {@snippet lang=c : + * extern uintptr_t __security_cookie + * } + */ + public static void __security_cookie(long varValue) { + __security_cookie$constants.SEGMENT.set(__security_cookie$constants.LAYOUT, 0L, varValue); + } + /** + * {@snippet lang=c : + * typedef _Bool __crt_bool + * } + */ + public static final OfBoolean __crt_bool = mux_h.C_BOOL; + + private static class _invalid_parameter_noinfo { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_invalid_parameter_noinfo"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo() + * } + */ + public static FunctionDescriptor _invalid_parameter_noinfo$descriptor() { + return _invalid_parameter_noinfo.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo() + * } + */ + public static MethodHandle _invalid_parameter_noinfo$handle() { + return _invalid_parameter_noinfo.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo() + * } + */ + public static MemorySegment _invalid_parameter_noinfo$address() { + return _invalid_parameter_noinfo.ADDR; + } + + /** + * {@snippet lang=c : + * void _invalid_parameter_noinfo() + * } + */ + public static void _invalid_parameter_noinfo() { + var mh$ = _invalid_parameter_noinfo.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_invalid_parameter_noinfo"); + } + mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _invalid_parameter_noinfo_noreturn { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_invalid_parameter_noinfo_noreturn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo_noreturn() + * } + */ + public static FunctionDescriptor _invalid_parameter_noinfo_noreturn$descriptor() { + return _invalid_parameter_noinfo_noreturn.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo_noreturn() + * } + */ + public static MethodHandle _invalid_parameter_noinfo_noreturn$handle() { + return _invalid_parameter_noinfo_noreturn.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void _invalid_parameter_noinfo_noreturn() + * } + */ + public static MemorySegment _invalid_parameter_noinfo_noreturn$address() { + return _invalid_parameter_noinfo_noreturn.ADDR; + } + + /** + * {@snippet lang=c : + * void _invalid_parameter_noinfo_noreturn() + * } + */ + public static void _invalid_parameter_noinfo_noreturn() { + var mh$ = _invalid_parameter_noinfo_noreturn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_invalid_parameter_noinfo_noreturn"); + } + mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _invoke_watson { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_invoke_watson"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) + * } + */ + public static FunctionDescriptor _invoke_watson$descriptor() { + return _invoke_watson.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) + * } + */ + public static MethodHandle _invoke_watson$handle() { + return _invoke_watson.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) + * } + */ + public static MemorySegment _invoke_watson$address() { + return _invoke_watson.ADDR; + } + + /** + * {@snippet lang=c : + * void _invoke_watson(const wchar_t *_Expression, const wchar_t *_FunctionName, const wchar_t *_FileName, unsigned int _LineNo, uintptr_t _Reserved) + * } + */ + public static void _invoke_watson(MemorySegment _Expression, MemorySegment _FunctionName, MemorySegment _FileName, int _LineNo, long _Reserved) { + var mh$ = _invoke_watson.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_invoke_watson", _Expression, _FunctionName, _FileName, _LineNo, _Reserved); + } + mh$.invokeExact(_Expression, _FunctionName, _FileName, _LineNo, _Reserved); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + /** + * {@snippet lang=c : + * typedef int errno_t + * } + */ + public static final OfInt errno_t = mux_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned short wint_t + * } + */ + public static final OfShort wint_t = mux_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef unsigned short wctype_t + * } + */ + public static final OfShort wctype_t = mux_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef long __time32_t + * } + */ + public static final OfInt __time32_t = mux_h.C_LONG; + /** + * {@snippet lang=c : + * typedef long long __time64_t + * } + */ + public static final OfLong __time64_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef __crt_locale_pointers *_locale_t + * } + */ + public static final AddressLayout _locale_t = mux_h.C_POINTER; + /** + * {@snippet lang=c : + * typedef __time64_t time_t + * } + */ + public static final OfLong time_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef size_t rsize_t + * } + */ + public static final OfLong rsize_t = mux_h.C_LONG_LONG; + + private static class _errno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_errno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int *_errno() + * } + */ + public static FunctionDescriptor _errno$descriptor() { + return _errno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int *_errno() + * } + */ + public static MethodHandle _errno$handle() { + return _errno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int *_errno() + * } + */ + public static MemorySegment _errno$address() { + return _errno.ADDR; + } + + /** + * {@snippet lang=c : + * int *_errno() + * } + */ + public static MemorySegment _errno() { + var mh$ = _errno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_errno"); + } + return (MemorySegment)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _set_errno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_set_errno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _set_errno(int _Value) + * } + */ + public static FunctionDescriptor _set_errno$descriptor() { + return _set_errno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _set_errno(int _Value) + * } + */ + public static MethodHandle _set_errno$handle() { + return _set_errno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _set_errno(int _Value) + * } + */ + public static MemorySegment _set_errno$address() { + return _set_errno.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _set_errno(int _Value) + * } + */ + public static int _set_errno(int _Value) { + var mh$ = _set_errno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_set_errno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _get_errno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_get_errno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _get_errno(int *_Value) + * } + */ + public static FunctionDescriptor _get_errno$descriptor() { + return _get_errno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _get_errno(int *_Value) + * } + */ + public static MethodHandle _get_errno$handle() { + return _get_errno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _get_errno(int *_Value) + * } + */ + public static MemorySegment _get_errno$address() { + return _get_errno.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _get_errno(int *_Value) + * } + */ + public static int _get_errno(MemorySegment _Value) { + var mh$ = _get_errno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_get_errno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__doserrno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long *__doserrno() + * } + */ + public static FunctionDescriptor __doserrno$descriptor() { + return __doserrno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long *__doserrno() + * } + */ + public static MethodHandle __doserrno$handle() { + return __doserrno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long *__doserrno() + * } + */ + public static MemorySegment __doserrno$address() { + return __doserrno.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long *__doserrno() + * } + */ + public static MemorySegment __doserrno() { + var mh$ = __doserrno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__doserrno"); + } + return (MemorySegment)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _set_doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_set_doserrno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _set_doserrno(unsigned long _Value) + * } + */ + public static FunctionDescriptor _set_doserrno$descriptor() { + return _set_doserrno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _set_doserrno(unsigned long _Value) + * } + */ + public static MethodHandle _set_doserrno$handle() { + return _set_doserrno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _set_doserrno(unsigned long _Value) + * } + */ + public static MemorySegment _set_doserrno$address() { + return _set_doserrno.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _set_doserrno(unsigned long _Value) + * } + */ + public static int _set_doserrno(int _Value) { + var mh$ = _set_doserrno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_set_doserrno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _get_doserrno { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_get_doserrno"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _get_doserrno(unsigned long *_Value) + * } + */ + public static FunctionDescriptor _get_doserrno$descriptor() { + return _get_doserrno.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _get_doserrno(unsigned long *_Value) + * } + */ + public static MethodHandle _get_doserrno$handle() { + return _get_doserrno.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _get_doserrno(unsigned long *_Value) + * } + */ + public static MemorySegment _get_doserrno$address() { + return _get_doserrno.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _get_doserrno(unsigned long *_Value) + * } + */ + public static int _get_doserrno(MemorySegment _Value) { + var mh$ = _get_doserrno.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_get_doserrno", _Value); + } + return (int)mh$.invokeExact(_Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memchr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memchr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) + * } + */ + public static FunctionDescriptor memchr$descriptor() { + return memchr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) + * } + */ + public static MethodHandle memchr$handle() { + return memchr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) + * } + */ + public static MemorySegment memchr$address() { + return memchr.ADDR; + } + + /** + * {@snippet lang=c : + * void *memchr(const void *_Buf, int _Val, size_t _MaxCount) + * } + */ + public static MemorySegment memchr(MemorySegment _Buf, int _Val, long _MaxCount) { + var mh$ = memchr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memchr", _Buf, _Val, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_Buf, _Val, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memcmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memcmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static FunctionDescriptor memcmp$descriptor() { + return memcmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MethodHandle memcmp$handle() { + return memcmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MemorySegment memcmp$address() { + return memcmp.ADDR; + } + + /** + * {@snippet lang=c : + * int memcmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static int memcmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = memcmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memcmp", _Buf1, _Buf2, _Size); + } + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memcpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memcpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static FunctionDescriptor memcpy$descriptor() { + return memcpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MethodHandle memcpy$handle() { + return memcpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MemorySegment memcpy$address() { + return memcpy.ADDR; + } + + /** + * {@snippet lang=c : + * void *memcpy(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MemorySegment memcpy(MemorySegment _Dst, MemorySegment _Src, long _Size) { + var mh$ = memcpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memcpy", _Dst, _Src, _Size); + } + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memmove { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memmove"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *memmove(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static FunctionDescriptor memmove$descriptor() { + return memmove.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *memmove(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MethodHandle memmove$handle() { + return memmove.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *memmove(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MemorySegment memmove$address() { + return memmove.ADDR; + } + + /** + * {@snippet lang=c : + * void *memmove(void *_Dst, const void *_Src, size_t _Size) + * } + */ + public static MemorySegment memmove(MemorySegment _Dst, MemorySegment _Src, long _Size) { + var mh$ = memmove.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memmove", _Dst, _Src, _Size); + } + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *memset(void *_Dst, int _Val, size_t _Size) + * } + */ + public static FunctionDescriptor memset$descriptor() { + return memset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *memset(void *_Dst, int _Val, size_t _Size) + * } + */ + public static MethodHandle memset$handle() { + return memset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *memset(void *_Dst, int _Val, size_t _Size) + * } + */ + public static MemorySegment memset$address() { + return memset.ADDR; + } + + /** + * {@snippet lang=c : + * void *memset(void *_Dst, int _Val, size_t _Size) + * } + */ + public static MemorySegment memset(MemorySegment _Dst, int _Val, long _Size) { + var mh$ = memset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memset", _Dst, _Val, _Size); + } + return (MemorySegment)mh$.invokeExact(_Dst, _Val, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strchr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strchr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strchr(const char *_Str, int _Val) + * } + */ + public static FunctionDescriptor strchr$descriptor() { + return strchr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strchr(const char *_Str, int _Val) + * } + */ + public static MethodHandle strchr$handle() { + return strchr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strchr(const char *_Str, int _Val) + * } + */ + public static MemorySegment strchr$address() { + return strchr.ADDR; + } + + /** + * {@snippet lang=c : + * char *strchr(const char *_Str, int _Val) + * } + */ + public static MemorySegment strchr(MemorySegment _Str, int _Val) { + var mh$ = strchr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strchr", _Str, _Val); + } + return (MemorySegment)mh$.invokeExact(_Str, _Val); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strrchr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strrchr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strrchr(const char *_Str, int _Ch) + * } + */ + public static FunctionDescriptor strrchr$descriptor() { + return strrchr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strrchr(const char *_Str, int _Ch) + * } + */ + public static MethodHandle strrchr$handle() { + return strrchr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strrchr(const char *_Str, int _Ch) + * } + */ + public static MemorySegment strrchr$address() { + return strrchr.ADDR; + } + + /** + * {@snippet lang=c : + * char *strrchr(const char *_Str, int _Ch) + * } + */ + public static MemorySegment strrchr(MemorySegment _Str, int _Ch) { + var mh$ = strrchr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strrchr", _Str, _Ch); + } + return (MemorySegment)mh$.invokeExact(_Str, _Ch); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strstr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strstr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strstr(const char *_Str, const char *_SubStr) + * } + */ + public static FunctionDescriptor strstr$descriptor() { + return strstr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strstr(const char *_Str, const char *_SubStr) + * } + */ + public static MethodHandle strstr$handle() { + return strstr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strstr(const char *_Str, const char *_SubStr) + * } + */ + public static MemorySegment strstr$address() { + return strstr.ADDR; + } + + /** + * {@snippet lang=c : + * char *strstr(const char *_Str, const char *_SubStr) + * } + */ + public static MemorySegment strstr(MemorySegment _Str, MemorySegment _SubStr) { + var mh$ = strstr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strstr", _Str, _SubStr); + } + return (MemorySegment)mh$.invokeExact(_Str, _SubStr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcschr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcschr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static FunctionDescriptor wcschr$descriptor() { + return wcschr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MethodHandle wcschr$handle() { + return wcschr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MemorySegment wcschr$address() { + return wcschr.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned short *wcschr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MemorySegment wcschr(MemorySegment _Str, short _Ch) { + var mh$ = wcschr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcschr", _Str, _Ch); + } + return (MemorySegment)mh$.invokeExact(_Str, _Ch); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsrchr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsrchr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static FunctionDescriptor wcsrchr$descriptor() { + return wcsrchr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MethodHandle wcsrchr$handle() { + return wcsrchr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MemorySegment wcsrchr$address() { + return wcsrchr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsrchr(const wchar_t *_Str, wchar_t _Ch) + * } + */ + public static MemorySegment wcsrchr(MemorySegment _Str, short _Ch) { + var mh$ = wcsrchr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsrchr", _Str, _Ch); + } + return (MemorySegment)mh$.invokeExact(_Str, _Ch); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsstr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsstr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) + * } + */ + public static FunctionDescriptor wcsstr$descriptor() { + return wcsstr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) + * } + */ + public static MethodHandle wcsstr$handle() { + return wcsstr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) + * } + */ + public static MemorySegment wcsstr$address() { + return wcsstr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsstr(const wchar_t *_Str, const wchar_t *_SubStr) + * } + */ + public static MemorySegment wcsstr(MemorySegment _Str, MemorySegment _SubStr) { + var mh$ = wcsstr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsstr", _Str, _SubStr); + } + return (MemorySegment)mh$.invokeExact(_Str, _SubStr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _memicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_memicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static FunctionDescriptor _memicmp$descriptor() { + return _memicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MethodHandle _memicmp$handle() { + return _memicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MemorySegment _memicmp$address() { + return _memicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static int _memicmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = _memicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_memicmp", _Buf1, _Buf2, _Size); + } + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _memicmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_memicmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _memicmp_l$descriptor() { + return _memicmp_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) + * } + */ + public static MethodHandle _memicmp_l$handle() { + return _memicmp_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) + * } + */ + public static MemorySegment _memicmp_l$address() { + return _memicmp_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale) + * } + */ + public static int _memicmp_l(MemorySegment _Buf1, MemorySegment _Buf2, long _Size, MemorySegment _Locale) { + var mh$ = _memicmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_memicmp_l", _Buf1, _Buf2, _Size, _Locale); + } + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memccpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memccpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) + * } + */ + public static FunctionDescriptor memccpy$descriptor() { + return memccpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) + * } + */ + public static MethodHandle memccpy$handle() { + return memccpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) + * } + */ + public static MemorySegment memccpy$address() { + return memccpy.ADDR; + } + + /** + * {@snippet lang=c : + * void *memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size) + * } + */ + public static MemorySegment memccpy(MemorySegment _Dst, MemorySegment _Src, int _Val, long _Size) { + var mh$ = memccpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memccpy", _Dst, _Src, _Val, _Size); + } + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Val, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class memicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("memicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static FunctionDescriptor memicmp$descriptor() { + return memicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MethodHandle memicmp$handle() { + return memicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static MemorySegment memicmp$address() { + return memicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int memicmp(const void *_Buf1, const void *_Buf2, size_t _Size) + * } + */ + public static int memicmp(MemorySegment _Buf1, MemorySegment _Buf2, long _Size) { + var mh$ = memicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("memicmp", _Buf1, _Buf2, _Size); + } + return (int)mh$.invokeExact(_Buf1, _Buf2, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscat_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscat_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static FunctionDescriptor wcscat_s$descriptor() { + return wcscat_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static MethodHandle wcscat_s$handle() { + return wcscat_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscat_s$address() { + return wcscat_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static int wcscat_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source) { + var mh$ = wcscat_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscat_s", _Destination, _SizeInWords, _Source); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static FunctionDescriptor wcscpy_s$descriptor() { + return wcscpy_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static MethodHandle wcscpy_s$handle() { + return wcscpy_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscpy_s$address() { + return wcscpy_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source) + * } + */ + public static int wcscpy_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source) { + var mh$ = wcscpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscpy_s", _Destination, _SizeInWords, _Source); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsncat_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsncat_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsncat_s$descriptor() { + return wcsncat_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static MethodHandle wcsncat_s$handle() { + return wcsncat_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static MemorySegment wcsncat_s$address() { + return wcsncat_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static int wcsncat_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsncat_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsncat_s", _Destination, _SizeInWords, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsncpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsncpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsncpy_s$descriptor() { + return wcsncpy_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static MethodHandle wcsncpy_s$handle() { + return wcsncpy_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static MemorySegment wcsncpy_s$address() { + return wcsncpy_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, const wchar_t *_Source, rsize_t _MaxCount) + * } + */ + public static int wcsncpy_s(MemorySegment _Destination, long _SizeInWords, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsncpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsncpy_s", _Destination, _SizeInWords, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcstok_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcstok_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static FunctionDescriptor wcstok_s$descriptor() { + return wcstok_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MethodHandle wcstok_s$handle() { + return wcstok_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MemorySegment wcstok_s$address() { + return wcstok_s.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcstok_s(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MemorySegment wcstok_s(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = wcstok_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcstok_s", _String, _Delimiter, _Context); + } + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsdup { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsdup"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsdup(const wchar_t *_String) + * } + */ + public static FunctionDescriptor _wcsdup$descriptor() { + return _wcsdup.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsdup(const wchar_t *_String) + * } + */ + public static MethodHandle _wcsdup$handle() { + return _wcsdup.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsdup(const wchar_t *_String) + * } + */ + public static MemorySegment _wcsdup$address() { + return _wcsdup.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsdup(const wchar_t *_String) + * } + */ + public static MemorySegment _wcsdup(MemorySegment _String) { + var mh$ = _wcsdup.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsdup", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscat { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscat"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static FunctionDescriptor wcscat$descriptor() { + return wcscat.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MethodHandle wcscat$handle() { + return wcscat.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscat$address() { + return wcscat.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcscat(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscat(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = wcscat.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscat", _Destination, _Source); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor wcscmp$descriptor() { + return wcscmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle wcscmp$handle() { + return wcscmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment wcscmp$address() { + return wcscmp.ADDR; + } + + /** + * {@snippet lang=c : + * int wcscmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int wcscmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcscmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static FunctionDescriptor wcscpy$descriptor() { + return wcscpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MethodHandle wcscpy$handle() { + return wcscpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscpy$address() { + return wcscpy.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcscpy(wchar_t *_Destination, const wchar_t *_Source) + * } + */ + public static MemorySegment wcscpy(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = wcscpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscpy", _Destination, _Source); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscspn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static FunctionDescriptor wcscspn$descriptor() { + return wcscspn.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MethodHandle wcscspn$handle() { + return wcscspn.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MemorySegment wcscspn$address() { + return wcscspn.ADDR; + } + + /** + * {@snippet lang=c : + * size_t wcscspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static long wcscspn(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcscspn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscspn", _String, _Control); + } + return (long)mh$.invokeExact(_String, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcslen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcslen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long long wcslen(const wchar_t *_String) + * } + */ + public static FunctionDescriptor wcslen$descriptor() { + return wcslen.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long long wcslen(const wchar_t *_String) + * } + */ + public static MethodHandle wcslen$handle() { + return wcslen.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long long wcslen(const wchar_t *_String) + * } + */ + public static MemorySegment wcslen$address() { + return wcslen.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long long wcslen(const wchar_t *_String) + * } + */ + public static long wcslen(MemorySegment _String) { + var mh$ = wcslen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcslen", _String); + } + return (long)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsnlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsnlen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsnlen$descriptor() { + return wcsnlen.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static MethodHandle wcsnlen$handle() { + return wcsnlen.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static MemorySegment wcsnlen$address() { + return wcsnlen.ADDR; + } + + /** + * {@snippet lang=c : + * size_t wcsnlen(const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static long wcsnlen(MemorySegment _Source, long _MaxCount) { + var mh$ = wcsnlen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsnlen", _Source, _MaxCount); + } + return (long)mh$.invokeExact(_Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsncat { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsncat"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static FunctionDescriptor wcsncat$descriptor() { + return wcsncat.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MethodHandle wcsncat$handle() { + return wcsncat.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MemorySegment wcsncat$address() { + return wcsncat.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsncat(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MemorySegment wcsncat(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = wcsncat.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsncat", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsncmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsncmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsncmp$descriptor() { + return wcsncmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle wcsncmp$handle() { + return wcsncmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment wcsncmp$address() { + return wcsncmp.ADDR; + } + + /** + * {@snippet lang=c : + * int wcsncmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static int wcsncmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = wcsncmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsncmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsncpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsncpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static FunctionDescriptor wcsncpy$descriptor() { + return wcsncpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MethodHandle wcsncpy$handle() { + return wcsncpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MemorySegment wcsncpy$address() { + return wcsncpy.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsncpy(wchar_t *_Destination, const wchar_t *_Source, size_t _Count) + * } + */ + public static MemorySegment wcsncpy(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = wcsncpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsncpy", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcspbrk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcspbrk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static FunctionDescriptor wcspbrk$descriptor() { + return wcspbrk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MethodHandle wcspbrk$handle() { + return wcspbrk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MemorySegment wcspbrk$address() { + return wcspbrk.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcspbrk(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MemorySegment wcspbrk(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcspbrk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcspbrk", _String, _Control); + } + return (MemorySegment)mh$.invokeExact(_String, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsspn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static FunctionDescriptor wcsspn$descriptor() { + return wcsspn.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MethodHandle wcsspn$handle() { + return wcsspn.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static MemorySegment wcsspn$address() { + return wcsspn.ADDR; + } + + /** + * {@snippet lang=c : + * size_t wcsspn(const wchar_t *_String, const wchar_t *_Control) + * } + */ + public static long wcsspn(MemorySegment _String, MemorySegment _Control) { + var mh$ = wcsspn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsspn", _String, _Control); + } + return (long)mh$.invokeExact(_String, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcstok { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcstok"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static FunctionDescriptor wcstok$descriptor() { + return wcstok.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MethodHandle wcstok$handle() { + return wcstok.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MemorySegment wcstok$address() { + return wcstok.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcstok(wchar_t *_String, const wchar_t *_Delimiter, wchar_t **_Context) + * } + */ + public static MemorySegment wcstok(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = wcstok.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcstok", _String, _Delimiter, _Context); + } + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcserror { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcserror"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcserror(int _ErrorNumber) + * } + */ + public static FunctionDescriptor _wcserror$descriptor() { + return _wcserror.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcserror(int _ErrorNumber) + * } + */ + public static MethodHandle _wcserror$handle() { + return _wcserror.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcserror(int _ErrorNumber) + * } + */ + public static MemorySegment _wcserror$address() { + return _wcserror.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcserror(int _ErrorNumber) + * } + */ + public static MemorySegment _wcserror(int _ErrorNumber) { + var mh$ = _wcserror.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcserror", _ErrorNumber); + } + return (MemorySegment)mh$.invokeExact(_ErrorNumber); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcserror_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcserror_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) + * } + */ + public static FunctionDescriptor _wcserror_s$descriptor() { + return _wcserror_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) + * } + */ + public static MethodHandle _wcserror_s$handle() { + return _wcserror_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) + * } + */ + public static MemorySegment _wcserror_s$address() { + return _wcserror_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber) + * } + */ + public static int _wcserror_s(MemorySegment _Buffer, long _SizeInWords, int _ErrorNumber) { + var mh$ = _wcserror_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcserror_s", _Buffer, _SizeInWords, _ErrorNumber); + } + return (int)mh$.invokeExact(_Buffer, _SizeInWords, _ErrorNumber); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __wcserror { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__wcserror"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *__wcserror(const wchar_t *_String) + * } + */ + public static FunctionDescriptor __wcserror$descriptor() { + return __wcserror.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *__wcserror(const wchar_t *_String) + * } + */ + public static MethodHandle __wcserror$handle() { + return __wcserror.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *__wcserror(const wchar_t *_String) + * } + */ + public static MemorySegment __wcserror$address() { + return __wcserror.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *__wcserror(const wchar_t *_String) + * } + */ + public static MemorySegment __wcserror(MemorySegment _String) { + var mh$ = __wcserror.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__wcserror", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __wcserror_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__wcserror_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) + * } + */ + public static FunctionDescriptor __wcserror_s$descriptor() { + return __wcserror_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) + * } + */ + public static MethodHandle __wcserror_s$handle() { + return __wcserror_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) + * } + */ + public static MemorySegment __wcserror_s$address() { + return __wcserror_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrorMessage) + * } + */ + public static int __wcserror_s(MemorySegment _Buffer, long _SizeInWords, MemorySegment _ErrorMessage) { + var mh$ = __wcserror_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__wcserror_s", _Buffer, _SizeInWords, _ErrorMessage); + } + return (int)mh$.invokeExact(_Buffer, _SizeInWords, _ErrorMessage); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor _wcsicmp$descriptor() { + return _wcsicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle _wcsicmp$handle() { + return _wcsicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment _wcsicmp$address() { + return _wcsicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int _wcsicmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _wcsicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsicmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsicmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsicmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsicmp_l$descriptor() { + return _wcsicmp_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsicmp_l$handle() { + return _wcsicmp_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsicmp_l$address() { + return _wcsicmp_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsicmp_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static int _wcsicmp_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcsicmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsicmp_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _wcsnicmp$descriptor() { + return _wcsnicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _wcsnicmp$handle() { + return _wcsnicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsnicmp$address() { + return _wcsnicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static int _wcsnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnicmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnicmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsnicmp_l$descriptor() { + return _wcsnicmp_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsnicmp_l$handle() { + return _wcsnicmp_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsnicmp_l$address() { + return _wcsnicmp_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsnicmp_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _wcsnicmp_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsnicmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnicmp_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_SHORT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _wcsnset_s$descriptor() { + return _wcsnset_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MethodHandle _wcsnset_s$handle() { + return _wcsnset_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsnset_s$address() { + return _wcsnset_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount) + * } + */ + public static int _wcsnset_s(MemorySegment _Destination, long _SizeInWords, short _Value, long _MaxCount) { + var mh$ = _wcsnset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnset_s", _Destination, _SizeInWords, _Value, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _wcsnset$descriptor() { + return _wcsnset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MethodHandle _wcsnset$handle() { + return _wcsnset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsnset$address() { + return _wcsnset.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsnset(MemorySegment _String, short _Value, long _MaxCount) { + var mh$ = _wcsnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnset", _String, _Value, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsrev(wchar_t *_String) + * } + */ + public static FunctionDescriptor _wcsrev$descriptor() { + return _wcsrev.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsrev(wchar_t *_String) + * } + */ + public static MethodHandle _wcsrev$handle() { + return _wcsrev.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsrev(wchar_t *_String) + * } + */ + public static MemorySegment _wcsrev$address() { + return _wcsrev.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsrev(wchar_t *_String) + * } + */ + public static MemorySegment _wcsrev(MemorySegment _String) { + var mh$ = _wcsrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsrev", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_SHORT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) + * } + */ + public static FunctionDescriptor _wcsset_s$descriptor() { + return _wcsset_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) + * } + */ + public static MethodHandle _wcsset_s$handle() { + return _wcsset_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) + * } + */ + public static MemorySegment _wcsset_s$address() { + return _wcsset_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value) + * } + */ + public static int _wcsset_s(MemorySegment _Destination, long _SizeInWords, short _Value) { + var mh$ = _wcsset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsset_s", _Destination, _SizeInWords, _Value); + } + return (int)mh$.invokeExact(_Destination, _SizeInWords, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static FunctionDescriptor _wcsset$descriptor() { + return _wcsset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MethodHandle _wcsset$handle() { + return _wcsset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MemorySegment _wcsset$address() { + return _wcsset.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MemorySegment _wcsset(MemorySegment _String, short _Value) { + var mh$ = _wcsset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsset", _String, _Value); + } + return (MemorySegment)mh$.invokeExact(_String, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcslwr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcslwr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) + * } + */ + public static FunctionDescriptor _wcslwr_s$descriptor() { + return _wcslwr_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) + * } + */ + public static MethodHandle _wcslwr_s$handle() { + return _wcslwr_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) + * } + */ + public static MemorySegment _wcslwr_s$address() { + return _wcslwr_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcslwr_s(wchar_t *_String, size_t _SizeInWords) + * } + */ + public static int _wcslwr_s(MemorySegment _String, long _SizeInWords) { + var mh$ = _wcslwr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcslwr_s", _String, _SizeInWords); + } + return (int)mh$.invokeExact(_String, _SizeInWords); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcslwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcslwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcslwr(wchar_t *_String) + * } + */ + public static FunctionDescriptor _wcslwr$descriptor() { + return _wcslwr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcslwr(wchar_t *_String) + * } + */ + public static MethodHandle _wcslwr$handle() { + return _wcslwr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcslwr(wchar_t *_String) + * } + */ + public static MemorySegment _wcslwr$address() { + return _wcslwr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcslwr(wchar_t *_String) + * } + */ + public static MemorySegment _wcslwr(MemorySegment _String) { + var mh$ = _wcslwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcslwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcslwr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcslwr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcslwr_s_l$descriptor() { + return _wcslwr_s_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) + * } + */ + public static MethodHandle _wcslwr_s_l$handle() { + return _wcslwr_s_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) + * } + */ + public static MemorySegment _wcslwr_s_l$address() { + return _wcslwr_s_l.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale) + * } + */ + public static int _wcslwr_s_l(MemorySegment _String, long _SizeInWords, MemorySegment _Locale) { + var mh$ = _wcslwr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcslwr_s_l", _String, _SizeInWords, _Locale); + } + return (int)mh$.invokeExact(_String, _SizeInWords, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcslwr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcslwr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcslwr_l$descriptor() { + return _wcslwr_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MethodHandle _wcslwr_l$handle() { + return _wcslwr_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _wcslwr_l$address() { + return _wcslwr_l.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _wcslwr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _wcslwr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcslwr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsupr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsupr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) + * } + */ + public static FunctionDescriptor _wcsupr_s$descriptor() { + return _wcsupr_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) + * } + */ + public static MethodHandle _wcsupr_s$handle() { + return _wcsupr_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) + * } + */ + public static MemorySegment _wcsupr_s$address() { + return _wcsupr_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcsupr_s(wchar_t *_String, size_t _Size) + * } + */ + public static int _wcsupr_s(MemorySegment _String, long _Size) { + var mh$ = _wcsupr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsupr_s", _String, _Size); + } + return (int)mh$.invokeExact(_String, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsupr(wchar_t *_String) + * } + */ + public static FunctionDescriptor _wcsupr$descriptor() { + return _wcsupr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsupr(wchar_t *_String) + * } + */ + public static MethodHandle _wcsupr$handle() { + return _wcsupr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsupr(wchar_t *_String) + * } + */ + public static MemorySegment _wcsupr$address() { + return _wcsupr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsupr(wchar_t *_String) + * } + */ + public static MemorySegment _wcsupr(MemorySegment _String) { + var mh$ = _wcsupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsupr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsupr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsupr_s_l$descriptor() { + return _wcsupr_s_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsupr_s_l$handle() { + return _wcsupr_s_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsupr_s_l$address() { + return _wcsupr_s_l.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static int _wcsupr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _wcsupr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsupr_s_l", _String, _Size, _Locale); + } + return (int)mh$.invokeExact(_String, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsupr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsupr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsupr_l$descriptor() { + return _wcsupr_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsupr_l$handle() { + return _wcsupr_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsupr_l$address() { + return _wcsupr_l.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsupr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _wcsupr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsupr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsxfrm { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsxfrm"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsxfrm$descriptor() { + return wcsxfrm.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static MethodHandle wcsxfrm$handle() { + return wcsxfrm.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static MemorySegment wcsxfrm$address() { + return wcsxfrm.ADDR; + } + + /** + * {@snippet lang=c : + * size_t wcsxfrm(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount) + * } + */ + public static long wcsxfrm(MemorySegment _Destination, MemorySegment _Source, long _MaxCount) { + var mh$ = wcsxfrm.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsxfrm", _Destination, _Source, _MaxCount); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsxfrm_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsxfrm_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsxfrm_l$descriptor() { + return _wcsxfrm_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsxfrm_l$handle() { + return _wcsxfrm_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsxfrm_l$address() { + return _wcsxfrm_l.ADDR; + } + + /** + * {@snippet lang=c : + * size_t _wcsxfrm_l(wchar_t *_Destination, const wchar_t *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static long _wcsxfrm_l(MemorySegment _Destination, MemorySegment _Source, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsxfrm_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsxfrm_l", _Destination, _Source, _MaxCount, _Locale); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcscoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcscoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor wcscoll$descriptor() { + return wcscoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle wcscoll$handle() { + return wcscoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment wcscoll$address() { + return wcscoll.ADDR; + } + + /** + * {@snippet lang=c : + * int wcscoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int wcscoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcscoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcscoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcscoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcscoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcscoll_l$descriptor() { + return _wcscoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _wcscoll_l$handle() { + return _wcscoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _wcscoll_l$address() { + return _wcscoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcscoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static int _wcscoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcscoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcscoll_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor _wcsicoll$descriptor() { + return _wcsicoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle _wcsicoll$handle() { + return _wcsicoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment _wcsicoll$address() { + return _wcsicoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int _wcsicoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _wcsicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsicoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsicoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsicoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsicoll_l$descriptor() { + return _wcsicoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsicoll_l$handle() { + return _wcsicoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsicoll_l$address() { + return _wcsicoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsicoll_l(const wchar_t *_String1, const wchar_t *_String2, _locale_t _Locale) + * } + */ + public static int _wcsicoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _wcsicoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsicoll_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsncoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsncoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _wcsncoll$descriptor() { + return _wcsncoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _wcsncoll$handle() { + return _wcsncoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsncoll$address() { + return _wcsncoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsncoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static int _wcsncoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsncoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsncoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsncoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsncoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsncoll_l$descriptor() { + return _wcsncoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsncoll_l$handle() { + return _wcsncoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsncoll_l$address() { + return _wcsncoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsncoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _wcsncoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsncoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsncoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _wcsnicoll$descriptor() { + return _wcsnicoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _wcsnicoll$handle() { + return _wcsnicoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _wcsnicoll$address() { + return _wcsnicoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsnicoll(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static int _wcsnicoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _wcsnicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnicoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _wcsnicoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_wcsnicoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _wcsnicoll_l$descriptor() { + return _wcsnicoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _wcsnicoll_l$handle() { + return _wcsnicoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _wcsnicoll_l$address() { + return _wcsnicoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _wcsnicoll_l(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _wcsnicoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _wcsnicoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_wcsnicoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsdup { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsdup"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsdup(const wchar_t *_String) + * } + */ + public static FunctionDescriptor wcsdup$descriptor() { + return wcsdup.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsdup(const wchar_t *_String) + * } + */ + public static MethodHandle wcsdup$handle() { + return wcsdup.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsdup(const wchar_t *_String) + * } + */ + public static MemorySegment wcsdup$address() { + return wcsdup.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsdup(const wchar_t *_String) + * } + */ + public static MemorySegment wcsdup(MemorySegment _String) { + var mh$ = wcsdup.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsdup", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor wcsicmp$descriptor() { + return wcsicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle wcsicmp$handle() { + return wcsicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment wcsicmp$address() { + return wcsicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int wcsicmp(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int wcsicmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcsicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsicmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsnicmp$descriptor() { + return wcsnicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle wcsnicmp$handle() { + return wcsnicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment wcsnicmp$address() { + return wcsnicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int wcsnicmp(const wchar_t *_String1, const wchar_t *_String2, size_t _MaxCount) + * } + */ + public static int wcsnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = wcsnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static FunctionDescriptor wcsnset$descriptor() { + return wcsnset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MethodHandle wcsnset$handle() { + return wcsnset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MemorySegment wcsnset$address() { + return wcsnset.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount) + * } + */ + public static MemorySegment wcsnset(MemorySegment _String, short _Value, long _MaxCount) { + var mh$ = wcsnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsnset", _String, _Value, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsrev(wchar_t *_String) + * } + */ + public static FunctionDescriptor wcsrev$descriptor() { + return wcsrev.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsrev(wchar_t *_String) + * } + */ + public static MethodHandle wcsrev$handle() { + return wcsrev.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsrev(wchar_t *_String) + * } + */ + public static MemorySegment wcsrev$address() { + return wcsrev.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsrev(wchar_t *_String) + * } + */ + public static MemorySegment wcsrev(MemorySegment _String) { + var mh$ = wcsrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsrev", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_SHORT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static FunctionDescriptor wcsset$descriptor() { + return wcsset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MethodHandle wcsset$handle() { + return wcsset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MemorySegment wcsset$address() { + return wcsset.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsset(wchar_t *_String, wchar_t _Value) + * } + */ + public static MemorySegment wcsset(MemorySegment _String, short _Value) { + var mh$ = wcsset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsset", _String, _Value); + } + return (MemorySegment)mh$.invokeExact(_String, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcslwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcslwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcslwr(wchar_t *_String) + * } + */ + public static FunctionDescriptor wcslwr$descriptor() { + return wcslwr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcslwr(wchar_t *_String) + * } + */ + public static MethodHandle wcslwr$handle() { + return wcslwr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcslwr(wchar_t *_String) + * } + */ + public static MemorySegment wcslwr$address() { + return wcslwr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcslwr(wchar_t *_String) + * } + */ + public static MemorySegment wcslwr(MemorySegment _String) { + var mh$ = wcslwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcslwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * wchar_t *wcsupr(wchar_t *_String) + * } + */ + public static FunctionDescriptor wcsupr$descriptor() { + return wcsupr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * wchar_t *wcsupr(wchar_t *_String) + * } + */ + public static MethodHandle wcsupr$handle() { + return wcsupr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * wchar_t *wcsupr(wchar_t *_String) + * } + */ + public static MemorySegment wcsupr$address() { + return wcsupr.ADDR; + } + + /** + * {@snippet lang=c : + * wchar_t *wcsupr(wchar_t *_String) + * } + */ + public static MemorySegment wcsupr(MemorySegment _String) { + var mh$ = wcsupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class wcsicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("wcsicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static FunctionDescriptor wcsicoll$descriptor() { + return wcsicoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MethodHandle wcsicoll$handle() { + return wcsicoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static MemorySegment wcsicoll$address() { + return wcsicoll.ADDR; + } + + /** + * {@snippet lang=c : + * int wcsicoll(const wchar_t *_String1, const wchar_t *_String2) + * } + */ + public static int wcsicoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = wcsicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("wcsicoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static FunctionDescriptor strcpy_s$descriptor() { + return strcpy_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static MethodHandle strcpy_s$handle() { + return strcpy_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static MemorySegment strcpy_s$address() { + return strcpy_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t strcpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static int strcpy_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source) { + var mh$ = strcpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcpy_s", _Destination, _SizeInBytes, _Source); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcat_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcat_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static FunctionDescriptor strcat_s$descriptor() { + return strcat_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static MethodHandle strcat_s$handle() { + return strcat_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static MemorySegment strcat_s$address() { + return strcat_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t strcat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source) + * } + */ + public static int strcat_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source) { + var mh$ = strcat_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcat_s", _Destination, _SizeInBytes, _Source); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strerror_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strerror_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) + * } + */ + public static FunctionDescriptor strerror_s$descriptor() { + return strerror_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) + * } + */ + public static MethodHandle strerror_s$handle() { + return strerror_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) + * } + */ + public static MemorySegment strerror_s$address() { + return strerror_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber) + * } + */ + public static int strerror_s(MemorySegment _Buffer, long _SizeInBytes, int _ErrorNumber) { + var mh$ = strerror_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strerror_s", _Buffer, _SizeInBytes, _ErrorNumber); + } + return (int)mh$.invokeExact(_Buffer, _SizeInBytes, _ErrorNumber); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strncat_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strncat_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static FunctionDescriptor strncat_s$descriptor() { + return strncat_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static MethodHandle strncat_s$handle() { + return strncat_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static MemorySegment strncat_s$address() { + return strncat_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t strncat_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static int strncat_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source, long _MaxCount) { + var mh$ = strncat_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncat_s", _Destination, _SizeInBytes, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strncpy_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strncpy_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static FunctionDescriptor strncpy_s$descriptor() { + return strncpy_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static MethodHandle strncpy_s$handle() { + return strncpy_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static MemorySegment strncpy_s$address() { + return strncpy_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t strncpy_s(char *_Destination, rsize_t _SizeInBytes, const char *_Source, rsize_t _MaxCount) + * } + */ + public static int strncpy_s(MemorySegment _Destination, long _SizeInBytes, MemorySegment _Source, long _MaxCount) { + var mh$ = strncpy_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncpy_s", _Destination, _SizeInBytes, _Source, _MaxCount); + } + return (int)mh$.invokeExact(_Destination, _SizeInBytes, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strtok_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strtok_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) + * } + */ + public static FunctionDescriptor strtok_s$descriptor() { + return strtok_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) + * } + */ + public static MethodHandle strtok_s$handle() { + return strtok_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) + * } + */ + public static MemorySegment strtok_s$address() { + return strtok_s.ADDR; + } + + /** + * {@snippet lang=c : + * char *strtok_s(char *_String, const char *_Delimiter, char **_Context) + * } + */ + public static MemorySegment strtok_s(MemorySegment _String, MemorySegment _Delimiter, MemorySegment _Context) { + var mh$ = strtok_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strtok_s", _String, _Delimiter, _Context); + } + return (MemorySegment)mh$.invokeExact(_String, _Delimiter, _Context); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _memccpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_memccpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _memccpy$descriptor() { + return _memccpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) + * } + */ + public static MethodHandle _memccpy$handle() { + return _memccpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) + * } + */ + public static MemorySegment _memccpy$address() { + return _memccpy.ADDR; + } + + /** + * {@snippet lang=c : + * void *_memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount) + * } + */ + public static MemorySegment _memccpy(MemorySegment _Dst, MemorySegment _Src, int _Val, long _MaxCount) { + var mh$ = _memccpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_memccpy", _Dst, _Src, _Val, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_Dst, _Src, _Val, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcat { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcat"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strcat(char *_Destination, const char *_Source) + * } + */ + public static FunctionDescriptor strcat$descriptor() { + return strcat.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strcat(char *_Destination, const char *_Source) + * } + */ + public static MethodHandle strcat$handle() { + return strcat.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strcat(char *_Destination, const char *_Source) + * } + */ + public static MemorySegment strcat$address() { + return strcat.ADDR; + } + + /** + * {@snippet lang=c : + * char *strcat(char *_Destination, const char *_Source) + * } + */ + public static MemorySegment strcat(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = strcat.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcat", _Destination, _Source); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int strcmp(const char *_Str1, const char *_Str2) + * } + */ + public static FunctionDescriptor strcmp$descriptor() { + return strcmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int strcmp(const char *_Str1, const char *_Str2) + * } + */ + public static MethodHandle strcmp$handle() { + return strcmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int strcmp(const char *_Str1, const char *_Str2) + * } + */ + public static MemorySegment strcmp$address() { + return strcmp.ADDR; + } + + /** + * {@snippet lang=c : + * int strcmp(const char *_Str1, const char *_Str2) + * } + */ + public static int strcmp(MemorySegment _Str1, MemorySegment _Str2) { + var mh$ = strcmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcmp", _Str1, _Str2); + } + return (int)mh$.invokeExact(_Str1, _Str2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strcmpi { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strcmpi"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strcmpi(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor _strcmpi$descriptor() { + return _strcmpi.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strcmpi(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle _strcmpi$handle() { + return _strcmpi.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strcmpi(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment _strcmpi$address() { + return _strcmpi.ADDR; + } + + /** + * {@snippet lang=c : + * int _strcmpi(const char *_String1, const char *_String2) + * } + */ + public static int _strcmpi(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _strcmpi.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strcmpi", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int strcoll(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor strcoll$descriptor() { + return strcoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int strcoll(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle strcoll$handle() { + return strcoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int strcoll(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment strcoll$address() { + return strcoll.ADDR; + } + + /** + * {@snippet lang=c : + * int strcoll(const char *_String1, const char *_String2) + * } + */ + public static int strcoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = strcoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strcoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strcoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strcoll_l$descriptor() { + return _strcoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _strcoll_l$handle() { + return _strcoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _strcoll_l$address() { + return _strcoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _strcoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static int _strcoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _strcoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strcoll_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strcpy(char *_Destination, const char *_Source) + * } + */ + public static FunctionDescriptor strcpy$descriptor() { + return strcpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strcpy(char *_Destination, const char *_Source) + * } + */ + public static MethodHandle strcpy$handle() { + return strcpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strcpy(char *_Destination, const char *_Source) + * } + */ + public static MemorySegment strcpy$address() { + return strcpy.ADDR; + } + + /** + * {@snippet lang=c : + * char *strcpy(char *_Destination, const char *_Source) + * } + */ + public static MemorySegment strcpy(MemorySegment _Destination, MemorySegment _Source) { + var mh$ = strcpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcpy", _Destination, _Source); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcspn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long long strcspn(const char *_Str, const char *_Control) + * } + */ + public static FunctionDescriptor strcspn$descriptor() { + return strcspn.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long long strcspn(const char *_Str, const char *_Control) + * } + */ + public static MethodHandle strcspn$handle() { + return strcspn.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long long strcspn(const char *_Str, const char *_Control) + * } + */ + public static MemorySegment strcspn$address() { + return strcspn.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long long strcspn(const char *_Str, const char *_Control) + * } + */ + public static long strcspn(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strcspn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcspn", _Str, _Control); + } + return (long)mh$.invokeExact(_Str, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strdup { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strdup"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strdup(const char *_Source) + * } + */ + public static FunctionDescriptor _strdup$descriptor() { + return _strdup.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strdup(const char *_Source) + * } + */ + public static MethodHandle _strdup$handle() { + return _strdup.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strdup(const char *_Source) + * } + */ + public static MemorySegment _strdup$address() { + return _strdup.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strdup(const char *_Source) + * } + */ + public static MemorySegment _strdup(MemorySegment _Source) { + var mh$ = _strdup.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strdup", _Source); + } + return (MemorySegment)mh$.invokeExact(_Source); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strerror { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strerror"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strerror(const char *_ErrorMessage) + * } + */ + public static FunctionDescriptor _strerror$descriptor() { + return _strerror.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strerror(const char *_ErrorMessage) + * } + */ + public static MethodHandle _strerror$handle() { + return _strerror.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strerror(const char *_ErrorMessage) + * } + */ + public static MemorySegment _strerror$address() { + return _strerror.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strerror(const char *_ErrorMessage) + * } + */ + public static MemorySegment _strerror(MemorySegment _ErrorMessage) { + var mh$ = _strerror.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strerror", _ErrorMessage); + } + return (MemorySegment)mh$.invokeExact(_ErrorMessage); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strerror_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strerror_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) + * } + */ + public static FunctionDescriptor _strerror_s$descriptor() { + return _strerror_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) + * } + */ + public static MethodHandle _strerror_s$handle() { + return _strerror_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) + * } + */ + public static MemorySegment _strerror_s$address() { + return _strerror_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strerror_s(char *_Buffer, size_t _SizeInBytes, const char *_ErrorMessage) + * } + */ + public static int _strerror_s(MemorySegment _Buffer, long _SizeInBytes, MemorySegment _ErrorMessage) { + var mh$ = _strerror_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strerror_s", _Buffer, _SizeInBytes, _ErrorMessage); + } + return (int)mh$.invokeExact(_Buffer, _SizeInBytes, _ErrorMessage); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strerror { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strerror"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strerror(int _ErrorMessage) + * } + */ + public static FunctionDescriptor strerror$descriptor() { + return strerror.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strerror(int _ErrorMessage) + * } + */ + public static MethodHandle strerror$handle() { + return strerror.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strerror(int _ErrorMessage) + * } + */ + public static MemorySegment strerror$address() { + return strerror.ADDR; + } + + /** + * {@snippet lang=c : + * char *strerror(int _ErrorMessage) + * } + */ + public static MemorySegment strerror(int _ErrorMessage) { + var mh$ = strerror.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strerror", _ErrorMessage); + } + return (MemorySegment)mh$.invokeExact(_ErrorMessage); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _stricmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_stricmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _stricmp(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor _stricmp$descriptor() { + return _stricmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _stricmp(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle _stricmp$handle() { + return _stricmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _stricmp(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment _stricmp$address() { + return _stricmp.ADDR; + } + + /** + * {@snippet lang=c : + * int _stricmp(const char *_String1, const char *_String2) + * } + */ + public static int _stricmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _stricmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_stricmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _stricoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_stricoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _stricoll(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor _stricoll$descriptor() { + return _stricoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _stricoll(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle _stricoll$handle() { + return _stricoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _stricoll(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment _stricoll$address() { + return _stricoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _stricoll(const char *_String1, const char *_String2) + * } + */ + public static int _stricoll(MemorySegment _String1, MemorySegment _String2) { + var mh$ = _stricoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_stricoll", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _stricoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_stricoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _stricoll_l$descriptor() { + return _stricoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _stricoll_l$handle() { + return _stricoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _stricoll_l$address() { + return _stricoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _stricoll_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static int _stricoll_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _stricoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_stricoll_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _stricmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_stricmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _stricmp_l$descriptor() { + return _stricmp_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MethodHandle _stricmp_l$handle() { + return _stricmp_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static MemorySegment _stricmp_l$address() { + return _stricmp_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _stricmp_l(const char *_String1, const char *_String2, _locale_t _Locale) + * } + */ + public static int _stricmp_l(MemorySegment _String1, MemorySegment _String2, MemorySegment _Locale) { + var mh$ = _stricmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_stricmp_l", _String1, _String2, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strlen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long long strlen(const char *_Str) + * } + */ + public static FunctionDescriptor strlen$descriptor() { + return strlen.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long long strlen(const char *_Str) + * } + */ + public static MethodHandle strlen$handle() { + return strlen.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long long strlen(const char *_Str) + * } + */ + public static MemorySegment strlen$address() { + return strlen.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long long strlen(const char *_Str) + * } + */ + public static long strlen(MemorySegment _Str) { + var mh$ = strlen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strlen", _Str); + } + return (long)mh$.invokeExact(_Str); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strlwr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strlwr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strlwr_s(char *_String, size_t _Size) + * } + */ + public static FunctionDescriptor _strlwr_s$descriptor() { + return _strlwr_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strlwr_s(char *_String, size_t _Size) + * } + */ + public static MethodHandle _strlwr_s$handle() { + return _strlwr_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strlwr_s(char *_String, size_t _Size) + * } + */ + public static MemorySegment _strlwr_s$address() { + return _strlwr_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strlwr_s(char *_String, size_t _Size) + * } + */ + public static int _strlwr_s(MemorySegment _String, long _Size) { + var mh$ = _strlwr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_s", _String, _Size); + } + return (int)mh$.invokeExact(_String, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strlwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strlwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strlwr(char *_String) + * } + */ + public static FunctionDescriptor _strlwr$descriptor() { + return _strlwr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strlwr(char *_String) + * } + */ + public static MethodHandle _strlwr$handle() { + return _strlwr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strlwr(char *_String) + * } + */ + public static MemorySegment _strlwr$address() { + return _strlwr.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strlwr(char *_String) + * } + */ + public static MemorySegment _strlwr(MemorySegment _String) { + var mh$ = _strlwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strlwr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strlwr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strlwr_s_l$descriptor() { + return _strlwr_s_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MethodHandle _strlwr_s_l$handle() { + return _strlwr_s_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MemorySegment _strlwr_s_l$address() { + return _strlwr_s_l.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static int _strlwr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _strlwr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_s_l", _String, _Size, _Locale); + } + return (int)mh$.invokeExact(_String, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strlwr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strlwr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strlwr_l(char *_String, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strlwr_l$descriptor() { + return _strlwr_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strlwr_l(char *_String, _locale_t _Locale) + * } + */ + public static MethodHandle _strlwr_l$handle() { + return _strlwr_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strlwr_l(char *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _strlwr_l$address() { + return _strlwr_l.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strlwr_l(char *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _strlwr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _strlwr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strlwr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strncat { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strncat"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strncat(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static FunctionDescriptor strncat$descriptor() { + return strncat.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strncat(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MethodHandle strncat$handle() { + return strncat.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strncat(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MemorySegment strncat$address() { + return strncat.ADDR; + } + + /** + * {@snippet lang=c : + * char *strncat(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MemorySegment strncat(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = strncat.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncat", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strncmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strncmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor strncmp$descriptor() { + return strncmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) + * } + */ + public static MethodHandle strncmp$handle() { + return strncmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) + * } + */ + public static MemorySegment strncmp$address() { + return strncmp.ADDR; + } + + /** + * {@snippet lang=c : + * int strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount) + * } + */ + public static int strncmp(MemorySegment _Str1, MemorySegment _Str2, long _MaxCount) { + var mh$ = strncmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncmp", _Str1, _Str2, _MaxCount); + } + return (int)mh$.invokeExact(_Str1, _Str2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _strnicmp$descriptor() { + return _strnicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _strnicmp$handle() { + return _strnicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _strnicmp$address() { + return _strnicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int _strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static int _strnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnicmp_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnicmp_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strnicmp_l$descriptor() { + return _strnicmp_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _strnicmp_l$handle() { + return _strnicmp_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _strnicmp_l$address() { + return _strnicmp_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _strnicmp_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _strnicmp_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strnicmp_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicmp_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnicoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnicoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _strnicoll$descriptor() { + return _strnicoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _strnicoll$handle() { + return _strnicoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _strnicoll$address() { + return _strnicoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _strnicoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static int _strnicoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strnicoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnicoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnicoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strnicoll_l$descriptor() { + return _strnicoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _strnicoll_l$handle() { + return _strnicoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _strnicoll_l$address() { + return _strnicoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _strnicoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _strnicoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strnicoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnicoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strncoll { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strncoll"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _strncoll$descriptor() { + return _strncoll.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle _strncoll$handle() { + return _strncoll.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment _strncoll$address() { + return _strncoll.ADDR; + } + + /** + * {@snippet lang=c : + * int _strncoll(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static int _strncoll(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = _strncoll.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strncoll", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strncoll_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strncoll_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strncoll_l$descriptor() { + return _strncoll_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _strncoll_l$handle() { + return _strncoll_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _strncoll_l$address() { + return _strncoll_l.ADDR; + } + + /** + * {@snippet lang=c : + * int _strncoll_l(const char *_String1, const char *_String2, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static int _strncoll_l(MemorySegment _String1, MemorySegment _String2, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strncoll_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strncoll_l", _String1, _String2, _MaxCount, _Locale); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class __strncnt { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("__strncnt"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t __strncnt(const char *_String, size_t _Count) + * } + */ + public static FunctionDescriptor __strncnt$descriptor() { + return __strncnt.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t __strncnt(const char *_String, size_t _Count) + * } + */ + public static MethodHandle __strncnt$handle() { + return __strncnt.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t __strncnt(const char *_String, size_t _Count) + * } + */ + public static MemorySegment __strncnt$address() { + return __strncnt.ADDR; + } + + /** + * {@snippet lang=c : + * size_t __strncnt(const char *_String, size_t _Count) + * } + */ + public static long __strncnt(MemorySegment _String, long _Count) { + var mh$ = __strncnt.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("__strncnt", _String, _Count); + } + return (long)mh$.invokeExact(_String, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strncpy { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strncpy"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static FunctionDescriptor strncpy$descriptor() { + return strncpy.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MethodHandle strncpy$handle() { + return strncpy.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MemorySegment strncpy$address() { + return strncpy.ADDR; + } + + /** + * {@snippet lang=c : + * char *strncpy(char *_Destination, const char *_Source, size_t _Count) + * } + */ + public static MemorySegment strncpy(MemorySegment _Destination, MemorySegment _Source, long _Count) { + var mh$ = strncpy.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strncpy", _Destination, _Source, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Source, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strnlen { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strnlen"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t strnlen(const char *_String, size_t _MaxCount) + * } + */ + public static FunctionDescriptor strnlen$descriptor() { + return strnlen.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t strnlen(const char *_String, size_t _MaxCount) + * } + */ + public static MethodHandle strnlen$handle() { + return strnlen.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t strnlen(const char *_String, size_t _MaxCount) + * } + */ + public static MemorySegment strnlen$address() { + return strnlen.ADDR; + } + + /** + * {@snippet lang=c : + * size_t strnlen(const char *_String, size_t _MaxCount) + * } + */ + public static long strnlen(MemorySegment _String, long _MaxCount) { + var mh$ = strnlen.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnlen", _String, _MaxCount); + } + return (long)mh$.invokeExact(_String, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) + * } + */ + public static FunctionDescriptor _strnset_s$descriptor() { + return _strnset_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) + * } + */ + public static MethodHandle _strnset_s$handle() { + return _strnset_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) + * } + */ + public static MemorySegment _strnset_s$address() { + return _strnset_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount) + * } + */ + public static int _strnset_s(MemorySegment _String, long _SizeInBytes, int _Value, long _MaxCount) { + var mh$ = _strnset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnset_s", _String, _SizeInBytes, _Value, _MaxCount); + } + return (int)mh$.invokeExact(_String, _SizeInBytes, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strnset(char *_Destination, int _Value, size_t _Count) + * } + */ + public static FunctionDescriptor _strnset$descriptor() { + return _strnset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strnset(char *_Destination, int _Value, size_t _Count) + * } + */ + public static MethodHandle _strnset$handle() { + return _strnset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strnset(char *_Destination, int _Value, size_t _Count) + * } + */ + public static MemorySegment _strnset$address() { + return _strnset.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strnset(char *_Destination, int _Value, size_t _Count) + * } + */ + public static MemorySegment _strnset(MemorySegment _Destination, int _Value, long _Count) { + var mh$ = _strnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strnset", _Destination, _Value, _Count); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Value, _Count); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strpbrk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strpbrk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strpbrk(const char *_Str, const char *_Control) + * } + */ + public static FunctionDescriptor strpbrk$descriptor() { + return strpbrk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strpbrk(const char *_Str, const char *_Control) + * } + */ + public static MethodHandle strpbrk$handle() { + return strpbrk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strpbrk(const char *_Str, const char *_Control) + * } + */ + public static MemorySegment strpbrk$address() { + return strpbrk.ADDR; + } + + /** + * {@snippet lang=c : + * char *strpbrk(const char *_Str, const char *_Control) + * } + */ + public static MemorySegment strpbrk(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strpbrk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strpbrk", _Str, _Control); + } + return (MemorySegment)mh$.invokeExact(_Str, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strrev(char *_Str) + * } + */ + public static FunctionDescriptor _strrev$descriptor() { + return _strrev.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strrev(char *_Str) + * } + */ + public static MethodHandle _strrev$handle() { + return _strrev.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strrev(char *_Str) + * } + */ + public static MemorySegment _strrev$address() { + return _strrev.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strrev(char *_Str) + * } + */ + public static MemorySegment _strrev(MemorySegment _Str) { + var mh$ = _strrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strrev", _Str); + } + return (MemorySegment)mh$.invokeExact(_Str); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strset_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strset_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) + * } + */ + public static FunctionDescriptor _strset_s$descriptor() { + return _strset_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) + * } + */ + public static MethodHandle _strset_s$handle() { + return _strset_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) + * } + */ + public static MemorySegment _strset_s$address() { + return _strset_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strset_s(char *_Destination, size_t _DestinationSize, int _Value) + * } + */ + public static int _strset_s(MemorySegment _Destination, long _DestinationSize, int _Value) { + var mh$ = _strset_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strset_s", _Destination, _DestinationSize, _Value); + } + return (int)mh$.invokeExact(_Destination, _DestinationSize, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strset(char *_Destination, int _Value) + * } + */ + public static FunctionDescriptor _strset$descriptor() { + return _strset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strset(char *_Destination, int _Value) + * } + */ + public static MethodHandle _strset$handle() { + return _strset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strset(char *_Destination, int _Value) + * } + */ + public static MemorySegment _strset$address() { + return _strset.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strset(char *_Destination, int _Value) + * } + */ + public static MemorySegment _strset(MemorySegment _Destination, int _Value) { + var mh$ = _strset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strset", _Destination, _Value); + } + return (MemorySegment)mh$.invokeExact(_Destination, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strspn { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strspn"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long long strspn(const char *_Str, const char *_Control) + * } + */ + public static FunctionDescriptor strspn$descriptor() { + return strspn.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long long strspn(const char *_Str, const char *_Control) + * } + */ + public static MethodHandle strspn$handle() { + return strspn.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long long strspn(const char *_Str, const char *_Control) + * } + */ + public static MemorySegment strspn$address() { + return strspn.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long long strspn(const char *_Str, const char *_Control) + * } + */ + public static long strspn(MemorySegment _Str, MemorySegment _Control) { + var mh$ = strspn.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strspn", _Str, _Control); + } + return (long)mh$.invokeExact(_Str, _Control); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strtok { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strtok"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strtok(char *_String, const char *_Delimiter) + * } + */ + public static FunctionDescriptor strtok$descriptor() { + return strtok.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strtok(char *_String, const char *_Delimiter) + * } + */ + public static MethodHandle strtok$handle() { + return strtok.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strtok(char *_String, const char *_Delimiter) + * } + */ + public static MemorySegment strtok$address() { + return strtok.ADDR; + } + + /** + * {@snippet lang=c : + * char *strtok(char *_String, const char *_Delimiter) + * } + */ + public static MemorySegment strtok(MemorySegment _String, MemorySegment _Delimiter) { + var mh$ = strtok.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strtok", _String, _Delimiter); + } + return (MemorySegment)mh$.invokeExact(_String, _Delimiter); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strupr_s { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strupr_s"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strupr_s(char *_String, size_t _Size) + * } + */ + public static FunctionDescriptor _strupr_s$descriptor() { + return _strupr_s.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strupr_s(char *_String, size_t _Size) + * } + */ + public static MethodHandle _strupr_s$handle() { + return _strupr_s.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strupr_s(char *_String, size_t _Size) + * } + */ + public static MemorySegment _strupr_s$address() { + return _strupr_s.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strupr_s(char *_String, size_t _Size) + * } + */ + public static int _strupr_s(MemorySegment _String, long _Size) { + var mh$ = _strupr_s.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_s", _String, _Size); + } + return (int)mh$.invokeExact(_String, _Size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strupr(char *_String) + * } + */ + public static FunctionDescriptor _strupr$descriptor() { + return _strupr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strupr(char *_String) + * } + */ + public static MethodHandle _strupr$handle() { + return _strupr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strupr(char *_String) + * } + */ + public static MemorySegment _strupr$address() { + return _strupr.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strupr(char *_String) + * } + */ + public static MemorySegment _strupr(MemorySegment _String) { + var mh$ = _strupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strupr_s_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strupr_s_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strupr_s_l$descriptor() { + return _strupr_s_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MethodHandle _strupr_s_l$handle() { + return _strupr_s_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static MemorySegment _strupr_s_l$address() { + return _strupr_s_l.ADDR; + } + + /** + * {@snippet lang=c : + * errno_t _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale) + * } + */ + public static int _strupr_s_l(MemorySegment _String, long _Size, MemorySegment _Locale) { + var mh$ = _strupr_s_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_s_l", _String, _Size, _Locale); + } + return (int)mh$.invokeExact(_String, _Size, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strupr_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strupr_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *_strupr_l(char *_String, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strupr_l$descriptor() { + return _strupr_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *_strupr_l(char *_String, _locale_t _Locale) + * } + */ + public static MethodHandle _strupr_l$handle() { + return _strupr_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *_strupr_l(char *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _strupr_l$address() { + return _strupr_l.ADDR; + } + + /** + * {@snippet lang=c : + * char *_strupr_l(char *_String, _locale_t _Locale) + * } + */ + public static MemorySegment _strupr_l(MemorySegment _String, MemorySegment _Locale) { + var mh$ = _strupr_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strupr_l", _String, _Locale); + } + return (MemorySegment)mh$.invokeExact(_String, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strxfrm { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strxfrm"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) + * } + */ + public static FunctionDescriptor strxfrm$descriptor() { + return strxfrm.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) + * } + */ + public static MethodHandle strxfrm$handle() { + return strxfrm.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) + * } + */ + public static MemorySegment strxfrm$address() { + return strxfrm.ADDR; + } + + /** + * {@snippet lang=c : + * unsigned long long strxfrm(char *_Destination, const char *_Source, size_t _MaxCount) + * } + */ + public static long strxfrm(MemorySegment _Destination, MemorySegment _Source, long _MaxCount) { + var mh$ = strxfrm.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strxfrm", _Destination, _Source, _MaxCount); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class _strxfrm_l { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_LONG_LONG, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("_strxfrm_l"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static FunctionDescriptor _strxfrm_l$descriptor() { + return _strxfrm_l.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MethodHandle _strxfrm_l$handle() { + return _strxfrm_l.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static MemorySegment _strxfrm_l$address() { + return _strxfrm_l.ADDR; + } + + /** + * {@snippet lang=c : + * size_t _strxfrm_l(char *_Destination, const char *_Source, size_t _MaxCount, _locale_t _Locale) + * } + */ + public static long _strxfrm_l(MemorySegment _Destination, MemorySegment _Source, long _MaxCount, MemorySegment _Locale) { + var mh$ = _strxfrm_l.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("_strxfrm_l", _Destination, _Source, _MaxCount, _Locale); + } + return (long)mh$.invokeExact(_Destination, _Source, _MaxCount, _Locale); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strdup { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strdup"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strdup(const char *_String) + * } + */ + public static FunctionDescriptor strdup$descriptor() { + return strdup.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strdup(const char *_String) + * } + */ + public static MethodHandle strdup$handle() { + return strdup.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strdup(const char *_String) + * } + */ + public static MemorySegment strdup$address() { + return strdup.ADDR; + } + + /** + * {@snippet lang=c : + * char *strdup(const char *_String) + * } + */ + public static MemorySegment strdup(MemorySegment _String) { + var mh$ = strdup.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strdup", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strcmpi { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strcmpi"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int strcmpi(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor strcmpi$descriptor() { + return strcmpi.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int strcmpi(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle strcmpi$handle() { + return strcmpi.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int strcmpi(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment strcmpi$address() { + return strcmpi.ADDR; + } + + /** + * {@snippet lang=c : + * int strcmpi(const char *_String1, const char *_String2) + * } + */ + public static int strcmpi(MemorySegment _String1, MemorySegment _String2) { + var mh$ = strcmpi.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strcmpi", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class stricmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("stricmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int stricmp(const char *_String1, const char *_String2) + * } + */ + public static FunctionDescriptor stricmp$descriptor() { + return stricmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int stricmp(const char *_String1, const char *_String2) + * } + */ + public static MethodHandle stricmp$handle() { + return stricmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int stricmp(const char *_String1, const char *_String2) + * } + */ + public static MemorySegment stricmp$address() { + return stricmp.ADDR; + } + + /** + * {@snippet lang=c : + * int stricmp(const char *_String1, const char *_String2) + * } + */ + public static int stricmp(MemorySegment _String1, MemorySegment _String2) { + var mh$ = stricmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("stricmp", _String1, _String2); + } + return (int)mh$.invokeExact(_String1, _String2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strlwr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strlwr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strlwr(char *_String) + * } + */ + public static FunctionDescriptor strlwr$descriptor() { + return strlwr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strlwr(char *_String) + * } + */ + public static MethodHandle strlwr$handle() { + return strlwr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strlwr(char *_String) + * } + */ + public static MemorySegment strlwr$address() { + return strlwr.ADDR; + } + + /** + * {@snippet lang=c : + * char *strlwr(char *_String) + * } + */ + public static MemorySegment strlwr(MemorySegment _String) { + var mh$ = strlwr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strlwr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strnicmp { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strnicmp"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static FunctionDescriptor strnicmp$descriptor() { + return strnicmp.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MethodHandle strnicmp$handle() { + return strnicmp.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static MemorySegment strnicmp$address() { + return strnicmp.ADDR; + } + + /** + * {@snippet lang=c : + * int strnicmp(const char *_String1, const char *_String2, size_t _MaxCount) + * } + */ + public static int strnicmp(MemorySegment _String1, MemorySegment _String2, long _MaxCount) { + var mh$ = strnicmp.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnicmp", _String1, _String2, _MaxCount); + } + return (int)mh$.invokeExact(_String1, _String2, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strnset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strnset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strnset(char *_String, int _Value, size_t _MaxCount) + * } + */ + public static FunctionDescriptor strnset$descriptor() { + return strnset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strnset(char *_String, int _Value, size_t _MaxCount) + * } + */ + public static MethodHandle strnset$handle() { + return strnset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strnset(char *_String, int _Value, size_t _MaxCount) + * } + */ + public static MemorySegment strnset$address() { + return strnset.ADDR; + } + + /** + * {@snippet lang=c : + * char *strnset(char *_String, int _Value, size_t _MaxCount) + * } + */ + public static MemorySegment strnset(MemorySegment _String, int _Value, long _MaxCount) { + var mh$ = strnset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strnset", _String, _Value, _MaxCount); + } + return (MemorySegment)mh$.invokeExact(_String, _Value, _MaxCount); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strrev { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strrev"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strrev(char *_String) + * } + */ + public static FunctionDescriptor strrev$descriptor() { + return strrev.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strrev(char *_String) + * } + */ + public static MethodHandle strrev$handle() { + return strrev.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strrev(char *_String) + * } + */ + public static MemorySegment strrev$address() { + return strrev.ADDR; + } + + /** + * {@snippet lang=c : + * char *strrev(char *_String) + * } + */ + public static MemorySegment strrev(MemorySegment _String) { + var mh$ = strrev.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strrev", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strset { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strset"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strset(char *_String, int _Value) + * } + */ + public static FunctionDescriptor strset$descriptor() { + return strset.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strset(char *_String, int _Value) + * } + */ + public static MethodHandle strset$handle() { + return strset.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strset(char *_String, int _Value) + * } + */ + public static MemorySegment strset$address() { + return strset.ADDR; + } + + /** + * {@snippet lang=c : + * char *strset(char *_String, int _Value) + * } + */ + public static MemorySegment strset(MemorySegment _String, int _Value) { + var mh$ = strset.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strset", _String, _Value); + } + return (MemorySegment)mh$.invokeExact(_String, _Value); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class strupr { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("strupr"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * char *strupr(char *_String) + * } + */ + public static FunctionDescriptor strupr$descriptor() { + return strupr.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * char *strupr(char *_String) + * } + */ + public static MethodHandle strupr$handle() { + return strupr.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * char *strupr(char *_String) + * } + */ + public static MemorySegment strupr$address() { + return strupr.ADDR; + } + + /** + * {@snippet lang=c : + * char *strupr(char *_String) + * } + */ + public static MemorySegment strupr(MemorySegment _String) { + var mh$ = strupr.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("strupr", _String); + } + return (MemorySegment)mh$.invokeExact(_String); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + /** + * {@snippet lang=c : + * typedef double max_align_t + * } + */ + public static final OfDouble max_align_t = mux_h.C_DOUBLE; + /** + * {@snippet lang=c : + * typedef signed char int8_t + * } + */ + public static final OfByte int8_t = mux_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef unsigned char uint8_t + * } + */ + public static final OfByte uint8_t = mux_h.C_CHAR; + /** + * {@snippet lang=c : + * typedef short int16_t + * } + */ + public static final OfShort int16_t = mux_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef unsigned short uint16_t + * } + */ + public static final OfShort uint16_t = mux_h.C_SHORT; + /** + * {@snippet lang=c : + * typedef int int32_t + * } + */ + public static final OfInt int32_t = mux_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned int uint32_t + * } + */ + public static final OfInt uint32_t = mux_h.C_INT; + /** + * {@snippet lang=c : + * typedef unsigned long long uint64_t + * } + */ + public static final OfLong uint64_t = mux_h.C_LONG_LONG; + /** + * {@snippet lang=c : + * typedef long long int64_t + * } + */ + public static final OfLong int64_t = mux_h.C_LONG_LONG; + + private static class WebPMalloc { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_LONG_LONG + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMalloc"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static FunctionDescriptor WebPMalloc$descriptor() { + return WebPMalloc.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MethodHandle WebPMalloc$handle() { + return WebPMalloc.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc$address() { + return WebPMalloc.ADDR; + } + + /** + * {@snippet lang=c : + * extern void *WebPMalloc(size_t size) + * } + */ + public static MemorySegment WebPMalloc(long size) { + var mh$ = WebPMalloc.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMalloc", size); + } + return (MemorySegment)mh$.invokeExact(size); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPFree { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPFree"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static FunctionDescriptor WebPFree$descriptor() { + return WebPFree.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MethodHandle WebPFree$handle() { + return WebPFree.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static MemorySegment WebPFree$address() { + return WebPFree.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPFree(void *ptr) + * } + */ + public static void WebPFree(MemorySegment ptr) { + var mh$ = WebPFree.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPFree", ptr); + } + mh$.invokeExact(ptr); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int ANIMATION_FLAG = (int)2L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.ANIMATION_FLAG = 2 + * } + */ + public static int ANIMATION_FLAG() { + return ANIMATION_FLAG; + } + private static final int XMP_FLAG = (int)4L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.XMP_FLAG = 4 + * } + */ + public static int XMP_FLAG() { + return XMP_FLAG; + } + private static final int EXIF_FLAG = (int)8L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.EXIF_FLAG = 8 + * } + */ + public static int EXIF_FLAG() { + return EXIF_FLAG; + } + private static final int ALPHA_FLAG = (int)16L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.ALPHA_FLAG = 16 + * } + */ + public static int ALPHA_FLAG() { + return ALPHA_FLAG; + } + private static final int ICCP_FLAG = (int)32L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.ICCP_FLAG = 32 + * } + */ + public static int ICCP_FLAG() { + return ICCP_FLAG; + } + private static final int ALL_VALID_FLAGS = (int)62L; + /** + * {@snippet lang=c : + * enum WebPFeatureFlags.ALL_VALID_FLAGS = 62 + * } + */ + public static int ALL_VALID_FLAGS() { + return ALL_VALID_FLAGS; + } + private static final int WEBP_MUX_DISPOSE_NONE = (int)0L; + /** + * {@snippet lang=c : + * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_NONE = 0 + * } + */ + public static int WEBP_MUX_DISPOSE_NONE() { + return WEBP_MUX_DISPOSE_NONE; + } + private static final int WEBP_MUX_DISPOSE_BACKGROUND = (int)1L; + /** + * {@snippet lang=c : + * enum WebPMuxAnimDispose.WEBP_MUX_DISPOSE_BACKGROUND = 1 + * } + */ + public static int WEBP_MUX_DISPOSE_BACKGROUND() { + return WEBP_MUX_DISPOSE_BACKGROUND; + } + private static final int WEBP_MUX_BLEND = (int)0L; + /** + * {@snippet lang=c : + * enum WebPMuxAnimBlend.WEBP_MUX_BLEND = 0 + * } + */ + public static int WEBP_MUX_BLEND() { + return WEBP_MUX_BLEND; + } + private static final int WEBP_MUX_NO_BLEND = (int)1L; + /** + * {@snippet lang=c : + * enum WebPMuxAnimBlend.WEBP_MUX_NO_BLEND = 1 + * } + */ + public static int WEBP_MUX_NO_BLEND() { + return WEBP_MUX_NO_BLEND; + } + private static final int WEBP_MUX_OK = (int)1L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_OK = 1 + * } + */ + public static int WEBP_MUX_OK() { + return WEBP_MUX_OK; + } + private static final int WEBP_MUX_NOT_FOUND = (int)0L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_NOT_FOUND = 0 + * } + */ + public static int WEBP_MUX_NOT_FOUND() { + return WEBP_MUX_NOT_FOUND; + } + private static final int WEBP_MUX_INVALID_ARGUMENT = (int)-1L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_INVALID_ARGUMENT = -1 + * } + */ + public static int WEBP_MUX_INVALID_ARGUMENT() { + return WEBP_MUX_INVALID_ARGUMENT; + } + private static final int WEBP_MUX_BAD_DATA = (int)-2L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_BAD_DATA = -2 + * } + */ + public static int WEBP_MUX_BAD_DATA() { + return WEBP_MUX_BAD_DATA; + } + private static final int WEBP_MUX_MEMORY_ERROR = (int)-3L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_MEMORY_ERROR = -3 + * } + */ + public static int WEBP_MUX_MEMORY_ERROR() { + return WEBP_MUX_MEMORY_ERROR; + } + private static final int WEBP_MUX_NOT_ENOUGH_DATA = (int)-4L; + /** + * {@snippet lang=c : + * enum WebPMuxError.WEBP_MUX_NOT_ENOUGH_DATA = -4 + * } + */ + public static int WEBP_MUX_NOT_ENOUGH_DATA() { + return WEBP_MUX_NOT_ENOUGH_DATA; + } + private static final int WEBP_CHUNK_VP8X = (int)0L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_VP8X = 0 + * } + */ + public static int WEBP_CHUNK_VP8X() { + return WEBP_CHUNK_VP8X; + } + private static final int WEBP_CHUNK_ICCP = (int)1L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_ICCP = 1 + * } + */ + public static int WEBP_CHUNK_ICCP() { + return WEBP_CHUNK_ICCP; + } + private static final int WEBP_CHUNK_ANIM = (int)2L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_ANIM = 2 + * } + */ + public static int WEBP_CHUNK_ANIM() { + return WEBP_CHUNK_ANIM; + } + private static final int WEBP_CHUNK_ANMF = (int)3L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_ANMF = 3 + * } + */ + public static int WEBP_CHUNK_ANMF() { + return WEBP_CHUNK_ANMF; + } + private static final int WEBP_CHUNK_DEPRECATED = (int)4L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_DEPRECATED = 4 + * } + */ + public static int WEBP_CHUNK_DEPRECATED() { + return WEBP_CHUNK_DEPRECATED; + } + private static final int WEBP_CHUNK_ALPHA = (int)5L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_ALPHA = 5 + * } + */ + public static int WEBP_CHUNK_ALPHA() { + return WEBP_CHUNK_ALPHA; + } + private static final int WEBP_CHUNK_IMAGE = (int)6L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_IMAGE = 6 + * } + */ + public static int WEBP_CHUNK_IMAGE() { + return WEBP_CHUNK_IMAGE; + } + private static final int WEBP_CHUNK_EXIF = (int)7L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_EXIF = 7 + * } + */ + public static int WEBP_CHUNK_EXIF() { + return WEBP_CHUNK_EXIF; + } + private static final int WEBP_CHUNK_XMP = (int)8L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_XMP = 8 + * } + */ + public static int WEBP_CHUNK_XMP() { + return WEBP_CHUNK_XMP; + } + private static final int WEBP_CHUNK_UNKNOWN = (int)9L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_UNKNOWN = 9 + * } + */ + public static int WEBP_CHUNK_UNKNOWN() { + return WEBP_CHUNK_UNKNOWN; + } + private static final int WEBP_CHUNK_NIL = (int)10L; + /** + * {@snippet lang=c : + * enum WebPChunkId.WEBP_CHUNK_NIL = 10 + * } + */ + public static int WEBP_CHUNK_NIL() { + return WEBP_CHUNK_NIL; + } + + private static class WebPGetMuxVersion { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPGetMuxVersion"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPGetMuxVersion() + * } + */ + public static FunctionDescriptor WebPGetMuxVersion$descriptor() { + return WebPGetMuxVersion.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPGetMuxVersion() + * } + */ + public static MethodHandle WebPGetMuxVersion$handle() { + return WebPGetMuxVersion.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPGetMuxVersion() + * } + */ + public static MemorySegment WebPGetMuxVersion$address() { + return WebPGetMuxVersion.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPGetMuxVersion() + * } + */ + public static int WebPGetMuxVersion() { + var mh$ = WebPGetMuxVersion.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPGetMuxVersion"); + } + return (int)mh$.invokeExact(); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPNewInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPNewInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMux *WebPNewInternal(int) + * } + */ + public static FunctionDescriptor WebPNewInternal$descriptor() { + return WebPNewInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMux *WebPNewInternal(int) + * } + */ + public static MethodHandle WebPNewInternal$handle() { + return WebPNewInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMux *WebPNewInternal(int) + * } + */ + public static MemorySegment WebPNewInternal$address() { + return WebPNewInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMux *WebPNewInternal(int) + * } + */ + public static MemorySegment WebPNewInternal(int x0) { + var mh$ = WebPNewInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPNewInternal", x0); + } + return (MemorySegment)mh$.invokeExact(x0); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxDelete"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPMuxDelete(WebPMux *mux) + * } + */ + public static FunctionDescriptor WebPMuxDelete$descriptor() { + return WebPMuxDelete.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPMuxDelete(WebPMux *mux) + * } + */ + public static MethodHandle WebPMuxDelete$handle() { + return WebPMuxDelete.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPMuxDelete(WebPMux *mux) + * } + */ + public static MemorySegment WebPMuxDelete$address() { + return WebPMuxDelete.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPMuxDelete(WebPMux *mux) + * } + */ + public static void WebPMuxDelete(MemorySegment mux) { + var mh$ = WebPMuxDelete.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxDelete", mux); + } + mh$.invokeExact(mux); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxCreateInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxCreateInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMux *WebPMuxCreateInternal(const WebPData *, int, int) + * } + */ + public static FunctionDescriptor WebPMuxCreateInternal$descriptor() { + return WebPMuxCreateInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMux *WebPMuxCreateInternal(const WebPData *, int, int) + * } + */ + public static MethodHandle WebPMuxCreateInternal$handle() { + return WebPMuxCreateInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMux *WebPMuxCreateInternal(const WebPData *, int, int) + * } + */ + public static MemorySegment WebPMuxCreateInternal$address() { + return WebPMuxCreateInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMux *WebPMuxCreateInternal(const WebPData *, int, int) + * } + */ + public static MemorySegment WebPMuxCreateInternal(MemorySegment x0, int x1, int x2) { + var mh$ = WebPMuxCreateInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxCreateInternal", x0, x1, x2); + } + return (MemorySegment)mh$.invokeExact(x0, x1, x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxSetChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxSetChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetChunk(WebPMux *mux, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static FunctionDescriptor WebPMuxSetChunk$descriptor() { + return WebPMuxSetChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetChunk(WebPMux *mux, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static MethodHandle WebPMuxSetChunk$handle() { + return WebPMuxSetChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetChunk(WebPMux *mux, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static MemorySegment WebPMuxSetChunk$address() { + return WebPMuxSetChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetChunk(WebPMux *mux, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static int WebPMuxSetChunk(MemorySegment mux, MemorySegment fourcc, MemorySegment chunk_data, int copy_data) { + var mh$ = WebPMuxSetChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxSetChunk", mux, fourcc, chunk_data, copy_data); + } + return (int)mh$.invokeExact(mux, fourcc, chunk_data, copy_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxGetChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxGetChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetChunk(const WebPMux *mux, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static FunctionDescriptor WebPMuxGetChunk$descriptor() { + return WebPMuxGetChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetChunk(const WebPMux *mux, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static MethodHandle WebPMuxGetChunk$handle() { + return WebPMuxGetChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetChunk(const WebPMux *mux, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static MemorySegment WebPMuxGetChunk$address() { + return WebPMuxGetChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetChunk(const WebPMux *mux, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static int WebPMuxGetChunk(MemorySegment mux, MemorySegment fourcc, MemorySegment chunk_data) { + var mh$ = WebPMuxGetChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxGetChunk", mux, fourcc, chunk_data); + } + return (int)mh$.invokeExact(mux, fourcc, chunk_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxDeleteChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxDeleteChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteChunk(WebPMux *mux, const char fourcc[4]) + * } + */ + public static FunctionDescriptor WebPMuxDeleteChunk$descriptor() { + return WebPMuxDeleteChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteChunk(WebPMux *mux, const char fourcc[4]) + * } + */ + public static MethodHandle WebPMuxDeleteChunk$handle() { + return WebPMuxDeleteChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteChunk(WebPMux *mux, const char fourcc[4]) + * } + */ + public static MemorySegment WebPMuxDeleteChunk$address() { + return WebPMuxDeleteChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteChunk(WebPMux *mux, const char fourcc[4]) + * } + */ + public static int WebPMuxDeleteChunk(MemorySegment mux, MemorySegment fourcc) { + var mh$ = WebPMuxDeleteChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxDeleteChunk", mux, fourcc); + } + return (int)mh$.invokeExact(mux, fourcc); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxSetImage { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxSetImage"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetImage(WebPMux *mux, const WebPData *bitstream, int copy_data) + * } + */ + public static FunctionDescriptor WebPMuxSetImage$descriptor() { + return WebPMuxSetImage.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetImage(WebPMux *mux, const WebPData *bitstream, int copy_data) + * } + */ + public static MethodHandle WebPMuxSetImage$handle() { + return WebPMuxSetImage.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetImage(WebPMux *mux, const WebPData *bitstream, int copy_data) + * } + */ + public static MemorySegment WebPMuxSetImage$address() { + return WebPMuxSetImage.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetImage(WebPMux *mux, const WebPData *bitstream, int copy_data) + * } + */ + public static int WebPMuxSetImage(MemorySegment mux, MemorySegment bitstream, int copy_data) { + var mh$ = WebPMuxSetImage.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxSetImage", mux, bitstream, copy_data); + } + return (int)mh$.invokeExact(mux, bitstream, copy_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxPushFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxPushFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxPushFrame(WebPMux *mux, const WebPMuxFrameInfo *frame, int copy_data) + * } + */ + public static FunctionDescriptor WebPMuxPushFrame$descriptor() { + return WebPMuxPushFrame.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxPushFrame(WebPMux *mux, const WebPMuxFrameInfo *frame, int copy_data) + * } + */ + public static MethodHandle WebPMuxPushFrame$handle() { + return WebPMuxPushFrame.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxPushFrame(WebPMux *mux, const WebPMuxFrameInfo *frame, int copy_data) + * } + */ + public static MemorySegment WebPMuxPushFrame$address() { + return WebPMuxPushFrame.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxPushFrame(WebPMux *mux, const WebPMuxFrameInfo *frame, int copy_data) + * } + */ + public static int WebPMuxPushFrame(MemorySegment mux, MemorySegment frame, int copy_data) { + var mh$ = WebPMuxPushFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxPushFrame", mux, frame, copy_data); + } + return (int)mh$.invokeExact(mux, frame, copy_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxGetFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxGetFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFrame(const WebPMux *mux, uint32_t nth, WebPMuxFrameInfo *frame) + * } + */ + public static FunctionDescriptor WebPMuxGetFrame$descriptor() { + return WebPMuxGetFrame.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFrame(const WebPMux *mux, uint32_t nth, WebPMuxFrameInfo *frame) + * } + */ + public static MethodHandle WebPMuxGetFrame$handle() { + return WebPMuxGetFrame.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFrame(const WebPMux *mux, uint32_t nth, WebPMuxFrameInfo *frame) + * } + */ + public static MemorySegment WebPMuxGetFrame$address() { + return WebPMuxGetFrame.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFrame(const WebPMux *mux, uint32_t nth, WebPMuxFrameInfo *frame) + * } + */ + public static int WebPMuxGetFrame(MemorySegment mux, int nth, MemorySegment frame) { + var mh$ = WebPMuxGetFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxGetFrame", mux, nth, frame); + } + return (int)mh$.invokeExact(mux, nth, frame); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxDeleteFrame { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxDeleteFrame"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteFrame(WebPMux *mux, uint32_t nth) + * } + */ + public static FunctionDescriptor WebPMuxDeleteFrame$descriptor() { + return WebPMuxDeleteFrame.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteFrame(WebPMux *mux, uint32_t nth) + * } + */ + public static MethodHandle WebPMuxDeleteFrame$handle() { + return WebPMuxDeleteFrame.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteFrame(WebPMux *mux, uint32_t nth) + * } + */ + public static MemorySegment WebPMuxDeleteFrame$address() { + return WebPMuxDeleteFrame.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxDeleteFrame(WebPMux *mux, uint32_t nth) + * } + */ + public static int WebPMuxDeleteFrame(MemorySegment mux, int nth) { + var mh$ = WebPMuxDeleteFrame.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxDeleteFrame", mux, nth); + } + return (int)mh$.invokeExact(mux, nth); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxSetAnimationParams { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxSetAnimationParams"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetAnimationParams(WebPMux *mux, const WebPMuxAnimParams *params) + * } + */ + public static FunctionDescriptor WebPMuxSetAnimationParams$descriptor() { + return WebPMuxSetAnimationParams.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetAnimationParams(WebPMux *mux, const WebPMuxAnimParams *params) + * } + */ + public static MethodHandle WebPMuxSetAnimationParams$handle() { + return WebPMuxSetAnimationParams.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetAnimationParams(WebPMux *mux, const WebPMuxAnimParams *params) + * } + */ + public static MemorySegment WebPMuxSetAnimationParams$address() { + return WebPMuxSetAnimationParams.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetAnimationParams(WebPMux *mux, const WebPMuxAnimParams *params) + * } + */ + public static int WebPMuxSetAnimationParams(MemorySegment mux, MemorySegment params) { + var mh$ = WebPMuxSetAnimationParams.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxSetAnimationParams", mux, params); + } + return (int)mh$.invokeExact(mux, params); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxGetAnimationParams { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxGetAnimationParams"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetAnimationParams(const WebPMux *mux, WebPMuxAnimParams *params) + * } + */ + public static FunctionDescriptor WebPMuxGetAnimationParams$descriptor() { + return WebPMuxGetAnimationParams.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetAnimationParams(const WebPMux *mux, WebPMuxAnimParams *params) + * } + */ + public static MethodHandle WebPMuxGetAnimationParams$handle() { + return WebPMuxGetAnimationParams.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetAnimationParams(const WebPMux *mux, WebPMuxAnimParams *params) + * } + */ + public static MemorySegment WebPMuxGetAnimationParams$address() { + return WebPMuxGetAnimationParams.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetAnimationParams(const WebPMux *mux, WebPMuxAnimParams *params) + * } + */ + public static int WebPMuxGetAnimationParams(MemorySegment mux, MemorySegment params) { + var mh$ = WebPMuxGetAnimationParams.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxGetAnimationParams", mux, params); + } + return (int)mh$.invokeExact(mux, params); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxSetCanvasSize { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxSetCanvasSize"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetCanvasSize(WebPMux *mux, int width, int height) + * } + */ + public static FunctionDescriptor WebPMuxSetCanvasSize$descriptor() { + return WebPMuxSetCanvasSize.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetCanvasSize(WebPMux *mux, int width, int height) + * } + */ + public static MethodHandle WebPMuxSetCanvasSize$handle() { + return WebPMuxSetCanvasSize.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetCanvasSize(WebPMux *mux, int width, int height) + * } + */ + public static MemorySegment WebPMuxSetCanvasSize$address() { + return WebPMuxSetCanvasSize.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxSetCanvasSize(WebPMux *mux, int width, int height) + * } + */ + public static int WebPMuxSetCanvasSize(MemorySegment mux, int width, int height) { + var mh$ = WebPMuxSetCanvasSize.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxSetCanvasSize", mux, width, height); + } + return (int)mh$.invokeExact(mux, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxGetCanvasSize { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxGetCanvasSize"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetCanvasSize(const WebPMux *mux, int *width, int *height) + * } + */ + public static FunctionDescriptor WebPMuxGetCanvasSize$descriptor() { + return WebPMuxGetCanvasSize.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetCanvasSize(const WebPMux *mux, int *width, int *height) + * } + */ + public static MethodHandle WebPMuxGetCanvasSize$handle() { + return WebPMuxGetCanvasSize.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetCanvasSize(const WebPMux *mux, int *width, int *height) + * } + */ + public static MemorySegment WebPMuxGetCanvasSize$address() { + return WebPMuxGetCanvasSize.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetCanvasSize(const WebPMux *mux, int *width, int *height) + * } + */ + public static int WebPMuxGetCanvasSize(MemorySegment mux, MemorySegment width, MemorySegment height) { + var mh$ = WebPMuxGetCanvasSize.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxGetCanvasSize", mux, width, height); + } + return (int)mh$.invokeExact(mux, width, height); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxGetFeatures { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxGetFeatures"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFeatures(const WebPMux *mux, uint32_t *flags) + * } + */ + public static FunctionDescriptor WebPMuxGetFeatures$descriptor() { + return WebPMuxGetFeatures.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFeatures(const WebPMux *mux, uint32_t *flags) + * } + */ + public static MethodHandle WebPMuxGetFeatures$handle() { + return WebPMuxGetFeatures.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFeatures(const WebPMux *mux, uint32_t *flags) + * } + */ + public static MemorySegment WebPMuxGetFeatures$address() { + return WebPMuxGetFeatures.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxGetFeatures(const WebPMux *mux, uint32_t *flags) + * } + */ + public static int WebPMuxGetFeatures(MemorySegment mux, MemorySegment flags) { + var mh$ = WebPMuxGetFeatures.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxGetFeatures", mux, flags); + } + return (int)mh$.invokeExact(mux, flags); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxNumChunks { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxNumChunks"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxNumChunks(const WebPMux *mux, WebPChunkId id, int *num_elements) + * } + */ + public static FunctionDescriptor WebPMuxNumChunks$descriptor() { + return WebPMuxNumChunks.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxNumChunks(const WebPMux *mux, WebPChunkId id, int *num_elements) + * } + */ + public static MethodHandle WebPMuxNumChunks$handle() { + return WebPMuxNumChunks.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxNumChunks(const WebPMux *mux, WebPChunkId id, int *num_elements) + * } + */ + public static MemorySegment WebPMuxNumChunks$address() { + return WebPMuxNumChunks.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxNumChunks(const WebPMux *mux, WebPChunkId id, int *num_elements) + * } + */ + public static int WebPMuxNumChunks(MemorySegment mux, int id, MemorySegment num_elements) { + var mh$ = WebPMuxNumChunks.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxNumChunks", mux, id, num_elements); + } + return (int)mh$.invokeExact(mux, id, num_elements); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPMuxAssemble { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPMuxAssemble"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxAssemble(WebPMux *mux, WebPData *assembled_data) + * } + */ + public static FunctionDescriptor WebPMuxAssemble$descriptor() { + return WebPMuxAssemble.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxAssemble(WebPMux *mux, WebPData *assembled_data) + * } + */ + public static MethodHandle WebPMuxAssemble$handle() { + return WebPMuxAssemble.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPMuxAssemble(WebPMux *mux, WebPData *assembled_data) + * } + */ + public static MemorySegment WebPMuxAssemble$address() { + return WebPMuxAssemble.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPMuxAssemble(WebPMux *mux, WebPData *assembled_data) + * } + */ + public static int WebPMuxAssemble(MemorySegment mux, MemorySegment assembled_data) { + var mh$ = WebPMuxAssemble.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPMuxAssemble", mux, assembled_data); + } + return (int)mh$.invokeExact(mux, assembled_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderOptionsInitInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderOptionsInitInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions *, int) + * } + */ + public static FunctionDescriptor WebPAnimEncoderOptionsInitInternal$descriptor() { + return WebPAnimEncoderOptionsInitInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions *, int) + * } + */ + public static MethodHandle WebPAnimEncoderOptionsInitInternal$handle() { + return WebPAnimEncoderOptionsInitInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions *, int) + * } + */ + public static MemorySegment WebPAnimEncoderOptionsInitInternal$address() { + return WebPAnimEncoderOptionsInitInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions *, int) + * } + */ + public static int WebPAnimEncoderOptionsInitInternal(MemorySegment x0, int x1) { + var mh$ = WebPAnimEncoderOptionsInitInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderOptionsInitInternal", x0, x1); + } + return (int)mh$.invokeExact(x0, x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderNewInternal { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderNewInternal"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPAnimEncoder *WebPAnimEncoderNewInternal(int, int, const WebPAnimEncoderOptions *, int) + * } + */ + public static FunctionDescriptor WebPAnimEncoderNewInternal$descriptor() { + return WebPAnimEncoderNewInternal.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPAnimEncoder *WebPAnimEncoderNewInternal(int, int, const WebPAnimEncoderOptions *, int) + * } + */ + public static MethodHandle WebPAnimEncoderNewInternal$handle() { + return WebPAnimEncoderNewInternal.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPAnimEncoder *WebPAnimEncoderNewInternal(int, int, const WebPAnimEncoderOptions *, int) + * } + */ + public static MemorySegment WebPAnimEncoderNewInternal$address() { + return WebPAnimEncoderNewInternal.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPAnimEncoder *WebPAnimEncoderNewInternal(int, int, const WebPAnimEncoderOptions *, int) + * } + */ + public static MemorySegment WebPAnimEncoderNewInternal(int x0, int x1, MemorySegment x2, int x3) { + var mh$ = WebPAnimEncoderNewInternal.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderNewInternal", x0, x1, x2, x3); + } + return (MemorySegment)mh$.invokeExact(x0, x1, x2, x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderAdd { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderAdd"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAdd(WebPAnimEncoder *enc, struct WebPPicture *frame, int timestamp_ms, const struct WebPConfig *config) + * } + */ + public static FunctionDescriptor WebPAnimEncoderAdd$descriptor() { + return WebPAnimEncoderAdd.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAdd(WebPAnimEncoder *enc, struct WebPPicture *frame, int timestamp_ms, const struct WebPConfig *config) + * } + */ + public static MethodHandle WebPAnimEncoderAdd$handle() { + return WebPAnimEncoderAdd.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAdd(WebPAnimEncoder *enc, struct WebPPicture *frame, int timestamp_ms, const struct WebPConfig *config) + * } + */ + public static MemorySegment WebPAnimEncoderAdd$address() { + return WebPAnimEncoderAdd.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPAnimEncoderAdd(WebPAnimEncoder *enc, struct WebPPicture *frame, int timestamp_ms, const struct WebPConfig *config) + * } + */ + public static int WebPAnimEncoderAdd(MemorySegment enc, MemorySegment frame, int timestamp_ms, MemorySegment config) { + var mh$ = WebPAnimEncoderAdd.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderAdd", enc, frame, timestamp_ms, config); + } + return (int)mh$.invokeExact(enc, frame, timestamp_ms, config); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderAssemble { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderAssemble"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAssemble(WebPAnimEncoder *enc, WebPData *webp_data) + * } + */ + public static FunctionDescriptor WebPAnimEncoderAssemble$descriptor() { + return WebPAnimEncoderAssemble.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAssemble(WebPAnimEncoder *enc, WebPData *webp_data) + * } + */ + public static MethodHandle WebPAnimEncoderAssemble$handle() { + return WebPAnimEncoderAssemble.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern int WebPAnimEncoderAssemble(WebPAnimEncoder *enc, WebPData *webp_data) + * } + */ + public static MemorySegment WebPAnimEncoderAssemble$address() { + return WebPAnimEncoderAssemble.ADDR; + } + + /** + * {@snippet lang=c : + * extern int WebPAnimEncoderAssemble(WebPAnimEncoder *enc, WebPData *webp_data) + * } + */ + public static int WebPAnimEncoderAssemble(MemorySegment enc, MemorySegment webp_data) { + var mh$ = WebPAnimEncoderAssemble.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderAssemble", enc, webp_data); + } + return (int)mh$.invokeExact(enc, webp_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderGetError { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderGetError"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern const char *WebPAnimEncoderGetError(WebPAnimEncoder *enc) + * } + */ + public static FunctionDescriptor WebPAnimEncoderGetError$descriptor() { + return WebPAnimEncoderGetError.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern const char *WebPAnimEncoderGetError(WebPAnimEncoder *enc) + * } + */ + public static MethodHandle WebPAnimEncoderGetError$handle() { + return WebPAnimEncoderGetError.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern const char *WebPAnimEncoderGetError(WebPAnimEncoder *enc) + * } + */ + public static MemorySegment WebPAnimEncoderGetError$address() { + return WebPAnimEncoderGetError.ADDR; + } + + /** + * {@snippet lang=c : + * extern const char *WebPAnimEncoderGetError(WebPAnimEncoder *enc) + * } + */ + public static MemorySegment WebPAnimEncoderGetError(MemorySegment enc) { + var mh$ = WebPAnimEncoderGetError.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderGetError", enc); + } + return (MemorySegment)mh$.invokeExact(enc); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderDelete { + public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderDelete"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern void WebPAnimEncoderDelete(WebPAnimEncoder *enc) + * } + */ + public static FunctionDescriptor WebPAnimEncoderDelete$descriptor() { + return WebPAnimEncoderDelete.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern void WebPAnimEncoderDelete(WebPAnimEncoder *enc) + * } + */ + public static MethodHandle WebPAnimEncoderDelete$handle() { + return WebPAnimEncoderDelete.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern void WebPAnimEncoderDelete(WebPAnimEncoder *enc) + * } + */ + public static MemorySegment WebPAnimEncoderDelete$address() { + return WebPAnimEncoderDelete.ADDR; + } + + /** + * {@snippet lang=c : + * extern void WebPAnimEncoderDelete(WebPAnimEncoder *enc) + * } + */ + public static void WebPAnimEncoderDelete(MemorySegment enc) { + var mh$ = WebPAnimEncoderDelete.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderDelete", enc); + } + mh$.invokeExact(enc); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderSetChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_INT + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderSetChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderSetChunk(WebPAnimEncoder *enc, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static FunctionDescriptor WebPAnimEncoderSetChunk$descriptor() { + return WebPAnimEncoderSetChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderSetChunk(WebPAnimEncoder *enc, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static MethodHandle WebPAnimEncoderSetChunk$handle() { + return WebPAnimEncoderSetChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderSetChunk(WebPAnimEncoder *enc, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static MemorySegment WebPAnimEncoderSetChunk$address() { + return WebPAnimEncoderSetChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderSetChunk(WebPAnimEncoder *enc, const char fourcc[4], const WebPData *chunk_data, int copy_data) + * } + */ + public static int WebPAnimEncoderSetChunk(MemorySegment enc, MemorySegment fourcc, MemorySegment chunk_data, int copy_data) { + var mh$ = WebPAnimEncoderSetChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderSetChunk", enc, fourcc, chunk_data, copy_data); + } + return (int)mh$.invokeExact(enc, fourcc, chunk_data, copy_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderGetChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderGetChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderGetChunk(const WebPAnimEncoder *enc, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static FunctionDescriptor WebPAnimEncoderGetChunk$descriptor() { + return WebPAnimEncoderGetChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderGetChunk(const WebPAnimEncoder *enc, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static MethodHandle WebPAnimEncoderGetChunk$handle() { + return WebPAnimEncoderGetChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderGetChunk(const WebPAnimEncoder *enc, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static MemorySegment WebPAnimEncoderGetChunk$address() { + return WebPAnimEncoderGetChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderGetChunk(const WebPAnimEncoder *enc, const char fourcc[4], WebPData *chunk_data) + * } + */ + public static int WebPAnimEncoderGetChunk(MemorySegment enc, MemorySegment fourcc, MemorySegment chunk_data) { + var mh$ = WebPAnimEncoderGetChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderGetChunk", enc, fourcc, chunk_data); + } + return (int)mh$.invokeExact(enc, fourcc, chunk_data); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + + private static class WebPAnimEncoderDeleteChunk { + public static final FunctionDescriptor DESC = FunctionDescriptor.of( + mux_h.C_INT, + mux_h.C_POINTER, + mux_h.C_POINTER + ); + + public static final MemorySegment ADDR = mux_h.findOrThrow("WebPAnimEncoderDeleteChunk"); + + public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); + } + + /** + * Function descriptor for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderDeleteChunk(WebPAnimEncoder *enc, const char fourcc[4]) + * } + */ + public static FunctionDescriptor WebPAnimEncoderDeleteChunk$descriptor() { + return WebPAnimEncoderDeleteChunk.DESC; + } + + /** + * Downcall method handle for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderDeleteChunk(WebPAnimEncoder *enc, const char fourcc[4]) + * } + */ + public static MethodHandle WebPAnimEncoderDeleteChunk$handle() { + return WebPAnimEncoderDeleteChunk.HANDLE; + } + + /** + * Address for: + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderDeleteChunk(WebPAnimEncoder *enc, const char fourcc[4]) + * } + */ + public static MemorySegment WebPAnimEncoderDeleteChunk$address() { + return WebPAnimEncoderDeleteChunk.ADDR; + } + + /** + * {@snippet lang=c : + * extern WebPMuxError WebPAnimEncoderDeleteChunk(WebPAnimEncoder *enc, const char fourcc[4]) + * } + */ + public static int WebPAnimEncoderDeleteChunk(MemorySegment enc, MemorySegment fourcc) { + var mh$ = WebPAnimEncoderDeleteChunk.HANDLE; + try { + if (TRACE_DOWNCALLS) { + traceDowncall("WebPAnimEncoderDeleteChunk", enc, fourcc); + } + return (int)mh$.invokeExact(enc, fourcc); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + private static final int _VCRUNTIME_DISABLED_WARNINGS = (int)4514L; + /** + * {@snippet lang=c : + * #define _VCRUNTIME_DISABLED_WARNINGS 4514 + * } + */ + public static int _VCRUNTIME_DISABLED_WARNINGS() { + return _VCRUNTIME_DISABLED_WARNINGS; + } + private static final MemorySegment NULL = MemorySegment.ofAddress(0L); + /** + * {@snippet lang=c : + * #define NULL (void*) 0 + * } + */ + public static MemorySegment NULL() { + return NULL; + } + private static final int _UCRT_DISABLED_WARNINGS = (int)4324L; + /** + * {@snippet lang=c : + * #define _UCRT_DISABLED_WARNINGS 4324 + * } + */ + public static int _UCRT_DISABLED_WARNINGS() { + return _UCRT_DISABLED_WARNINGS; + } + private static final long _TRUNCATE = -1L; + /** + * {@snippet lang=c : + * #define _TRUNCATE -1 + * } + */ + public static long _TRUNCATE() { + return _TRUNCATE; + } + private static final long _CRT_SIZE_MAX = -1L; + /** + * {@snippet lang=c : + * #define _CRT_SIZE_MAX -1 + * } + */ + public static long _CRT_SIZE_MAX() { + return _CRT_SIZE_MAX; + } + /** + * {@snippet lang=c : + * #define __FILEW__ "C" + * } + */ + public static MemorySegment __FILEW__() { + class Holder { + static final MemorySegment __FILEW__ + = mux_h.LIBRARY_ARENA.allocateFrom("C"); + } + return Holder.__FILEW__; + } + private static final int __STDC_SECURE_LIB__ = (int)200411L; + /** + * {@snippet lang=c : + * #define __STDC_SECURE_LIB__ 200411 + * } + */ + public static int __STDC_SECURE_LIB__() { + return __STDC_SECURE_LIB__; + } + private static final int __GOT_SECURE_LIB__ = (int)200411L; + /** + * {@snippet lang=c : + * #define __GOT_SECURE_LIB__ 200411 + * } + */ + public static int __GOT_SECURE_LIB__() { + return __GOT_SECURE_LIB__; + } + private static final int EDEADLOCK = (int)36L; + /** + * {@snippet lang=c : + * #define EDEADLOCK 36 + * } + */ + public static int EDEADLOCK() { + return EDEADLOCK; + } + private static final int _NLSCMPERROR = (int)2147483647L; + /** + * {@snippet lang=c : + * #define _NLSCMPERROR 2147483647 + * } + */ + public static int _NLSCMPERROR() { + return _NLSCMPERROR; + } +} + diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_attr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_attr_t.java deleted file mode 100644 index 5eb8f9f..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_attr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_attr_t { - * long __sig; - * char __opaque[56]; - * } __darwin_pthread_attr_t - * } - */ -public class __darwin_pthread_attr_t extends _opaque_pthread_attr_t { - - __darwin_pthread_attr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_cond_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_cond_t.java deleted file mode 100644 index b3cd3ad..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_cond_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_cond_t { - * long __sig; - * char __opaque[40]; - * } __darwin_pthread_cond_t - * } - */ -public class __darwin_pthread_cond_t extends _opaque_pthread_cond_t { - - __darwin_pthread_cond_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_condattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_condattr_t.java deleted file mode 100644 index c16534f..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_condattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_condattr_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_condattr_t - * } - */ -public class __darwin_pthread_condattr_t extends _opaque_pthread_condattr_t { - - __darwin_pthread_condattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_handler_rec.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_handler_rec.java deleted file mode 100644 index 14c3184..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_handler_rec.java +++ /dev/null @@ -1,272 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec { - * void (*__routine)(void *); - * void *__arg; - * struct __darwin_pthread_handler_rec *__next; - * } - * } - */ -public class __darwin_pthread_handler_rec { - - __darwin_pthread_handler_rec() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_POINTER.withName("__routine"), - decode_h.C_POINTER.withName("__arg"), - decode_h.C_POINTER.withName("__next") - ).withName("__darwin_pthread_handler_rec"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - /** - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static class __routine { - - __routine() { - // Should not be called directly - } - - /** - * The function pointer signature, expressed as a functional interface - */ - public interface Function { - void apply(MemorySegment _x0); - } - - private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid( - decode_h.C_POINTER - ); - - /** - * The descriptor of this function pointer - */ - public static FunctionDescriptor descriptor() { - return $DESC; - } - - private static final MethodHandle UP$MH = decode_h.upcallHandle(__routine.Function.class, "apply", $DESC); - - /** - * Allocates a new upcall stub, whose implementation is defined by {@code fi}. - * The lifetime of the returned segment is managed by {@code arena} - */ - public static MemorySegment allocate(__routine.Function fi, Arena arena) { - return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); - } - - private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); - - /** - * Invoke the upcall stub {@code funcPtr}, with given parameters - */ - public static void invoke(MemorySegment funcPtr,MemorySegment _x0) { - try { - DOWN$MH.invokeExact(funcPtr, _x0); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - } - - private static final AddressLayout __routine$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__routine")); - - /** - * Layout for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static final AddressLayout __routine$layout() { - return __routine$LAYOUT; - } - - private static final long __routine$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static final long __routine$offset() { - return __routine$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static MemorySegment __routine(MemorySegment struct) { - return struct.get(__routine$LAYOUT, __routine$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static void __routine(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__routine$LAYOUT, __routine$OFFSET, fieldValue); - } - - private static final AddressLayout __arg$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__arg")); - - /** - * Layout for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static final AddressLayout __arg$layout() { - return __arg$LAYOUT; - } - - private static final long __arg$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static final long __arg$offset() { - return __arg$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static MemorySegment __arg(MemorySegment struct) { - return struct.get(__arg$LAYOUT, __arg$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static void __arg(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__arg$LAYOUT, __arg$OFFSET, fieldValue); - } - - private static final AddressLayout __next$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__next")); - - /** - * Layout for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static final AddressLayout __next$layout() { - return __next$LAYOUT; - } - - private static final long __next$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static final long __next$offset() { - return __next$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static MemorySegment __next(MemorySegment struct) { - return struct.get(__next$LAYOUT, __next$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static void __next(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__next$LAYOUT, __next$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutex_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutex_t.java deleted file mode 100644 index 93f049f..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutex_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_mutex_t { - * long __sig; - * char __opaque[56]; - * } __darwin_pthread_mutex_t - * } - */ -public class __darwin_pthread_mutex_t extends _opaque_pthread_mutex_t { - - __darwin_pthread_mutex_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutexattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutexattr_t.java deleted file mode 100644 index 549b461..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_mutexattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_mutexattr_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_mutexattr_t - * } - */ -public class __darwin_pthread_mutexattr_t extends _opaque_pthread_mutexattr_t { - - __darwin_pthread_mutexattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_once_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_once_t.java deleted file mode 100644 index c79ca5d..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_once_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_once_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_once_t - * } - */ -public class __darwin_pthread_once_t extends _opaque_pthread_once_t { - - __darwin_pthread_once_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlock_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlock_t.java deleted file mode 100644 index d3f6f99..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlock_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_rwlock_t { - * long __sig; - * char __opaque[192]; - * } __darwin_pthread_rwlock_t - * } - */ -public class __darwin_pthread_rwlock_t extends _opaque_pthread_rwlock_t { - - __darwin_pthread_rwlock_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlockattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlockattr_t.java deleted file mode 100644 index 94c1941..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__darwin_pthread_rwlockattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_rwlockattr_t { - * long __sig; - * char __opaque[16]; - * } __darwin_pthread_rwlockattr_t - * } - */ -public class __darwin_pthread_rwlockattr_t extends _opaque_pthread_rwlockattr_t { - - __darwin_pthread_rwlockattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__mbstate_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__mbstate_t.java deleted file mode 100644 index 5594918..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/__mbstate_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * union { - * char __mbstate8[128]; - * long long _mbstateL; - * } - * } - */ -public class __mbstate_t { - - __mbstate_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.unionLayout( - MemoryLayout.sequenceLayout(128, decode_h.C_CHAR).withName("__mbstate8"), - decode_h.C_LONG_LONG.withName("_mbstateL") - ).withName("$anon$54:9"); - - /** - * The layout of this union - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final SequenceLayout __mbstate8$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__mbstate8")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static final SequenceLayout __mbstate8$layout() { - return __mbstate8$LAYOUT; - } - - private static final long __mbstate8$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static final long __mbstate8$offset() { - return __mbstate8$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static MemorySegment __mbstate8(MemorySegment union) { - return union.asSlice(__mbstate8$OFFSET, __mbstate8$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static void __mbstate8(MemorySegment union, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, union, __mbstate8$OFFSET, __mbstate8$LAYOUT.byteSize()); - } - - private static long[] __mbstate8$DIMS = { 128 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static long[] __mbstate8$dimensions() { - return __mbstate8$DIMS; - } - private static final VarHandle __mbstate8$ELEM_HANDLE = __mbstate8$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static byte __mbstate8(MemorySegment union, long index0) { - return (byte)__mbstate8$ELEM_HANDLE.get(union, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static void __mbstate8(MemorySegment union, long index0, byte fieldValue) { - __mbstate8$ELEM_HANDLE.set(union, 0L, index0, fieldValue); - } - - private static final OfLong _mbstateL$LAYOUT = (OfLong)$LAYOUT.select(groupElement("_mbstateL")); - - /** - * Layout for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static final OfLong _mbstateL$layout() { - return _mbstateL$LAYOUT; - } - - private static final long _mbstateL$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static final long _mbstateL$offset() { - return _mbstateL$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static long _mbstateL(MemorySegment union) { - return union.get(_mbstateL$LAYOUT, _mbstateL$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static void _mbstateL(MemorySegment union, long fieldValue) { - union.set(_mbstateL$LAYOUT, _mbstateL$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this union - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_attr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_attr_t.java deleted file mode 100644 index 6980824..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_attr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_attr_t { - * long __sig; - * char __opaque[56]; - * } - * } - */ -public class _opaque_pthread_attr_t { - - _opaque_pthread_attr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(56, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_attr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 56 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_cond_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_cond_t.java deleted file mode 100644 index c2deea1..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_cond_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_cond_t { - * long __sig; - * char __opaque[40]; - * } - * } - */ -public class _opaque_pthread_cond_t { - - _opaque_pthread_cond_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(40, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_cond_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 40 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_condattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_condattr_t.java deleted file mode 100644 index 21adf37..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_condattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_condattr_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_condattr_t { - - _opaque_pthread_condattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_condattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutex_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutex_t.java deleted file mode 100644 index 4081052..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutex_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_mutex_t { - * long __sig; - * char __opaque[56]; - * } - * } - */ -public class _opaque_pthread_mutex_t { - - _opaque_pthread_mutex_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(56, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_mutex_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 56 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutexattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutexattr_t.java deleted file mode 100644 index 1048041..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_mutexattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_mutexattr_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_mutexattr_t { - - _opaque_pthread_mutexattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_mutexattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_once_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_once_t.java deleted file mode 100644 index 6c53195..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_once_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_once_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_once_t { - - _opaque_pthread_once_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_once_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlock_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlock_t.java deleted file mode 100644 index 72694f2..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlock_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_rwlock_t { - * long __sig; - * char __opaque[192]; - * } - * } - */ -public class _opaque_pthread_rwlock_t { - - _opaque_pthread_rwlock_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(192, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_rwlock_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 192 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlockattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlockattr_t.java deleted file mode 100644 index c5d8cf3..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_rwlockattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_rwlockattr_t { - * long __sig; - * char __opaque[16]; - * } - * } - */ -public class _opaque_pthread_rwlockattr_t { - - _opaque_pthread_rwlockattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(16, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_rwlockattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 16 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_t.java deleted file mode 100644 index 00354e7..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/_opaque_pthread_t.java +++ /dev/null @@ -1,252 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_t { - * long __sig; - * struct __darwin_pthread_handler_rec *__cleanup_stack; - * char __opaque[8176]; - * } - * } - */ -public class _opaque_pthread_t { - - _opaque_pthread_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - decode_h.C_LONG.withName("__sig"), - decode_h.C_POINTER.withName("__cleanup_stack"), - MemoryLayout.sequenceLayout(8176, decode_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final AddressLayout __cleanup_stack$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__cleanup_stack")); - - /** - * Layout for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static final AddressLayout __cleanup_stack$layout() { - return __cleanup_stack$LAYOUT; - } - - private static final long __cleanup_stack$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static final long __cleanup_stack$offset() { - return __cleanup_stack$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static MemorySegment __cleanup_stack(MemorySegment struct) { - return struct.get(__cleanup_stack$LAYOUT, __cleanup_stack$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static void __cleanup_stack(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__cleanup_stack$LAYOUT, __cleanup_stack$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8176 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/decode_h.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/decode_h.java deleted file mode 100644 index d3e07d5..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webp/decode_h.java +++ /dev/null @@ -1,8903 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webp; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -public class decode_h { - - decode_h() { - // Should not be called directly - } - - static final Arena LIBRARY_ARENA = Arena.ofAuto(); - static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls"); - - static void traceDowncall(String name, Object... args) { - String traceArgs = Arrays.stream(args) - .map(Object::toString) - .collect(Collectors.joining(", ")); - System.out.printf("%s(%s)\n", name, traceArgs); - } - - static MemorySegment findOrThrow(String symbol) { - return SYMBOL_LOOKUP.find(symbol) - .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol)); - } - - static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { - try { - return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType()); - } catch (ReflectiveOperationException ex) { - throw new AssertionError(ex); - } - } - - static MemoryLayout align(MemoryLayout layout, long align) { - return switch (layout) { - case PaddingLayout p -> p; - case ValueLayout v -> v.withByteAlignment(align); - case GroupLayout g -> { - MemoryLayout[] alignedMembers = g.memberLayouts().stream() - .map(m -> align(m, align)).toArray(MemoryLayout[]::new); - yield g instanceof StructLayout ? - MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers); - } - case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align)); - }; - } - - - static { - System.loadLibrary("webp"); - } - - static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup() - .or(Linker.nativeLinker().defaultLookup()); - - public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; - public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE; - public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT; - public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT; - public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG; - public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT; - public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; - public static final AddressLayout C_POINTER = ValueLayout.ADDRESS - .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); - public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG; - private static final int __has_safe_buffers = (int)0L; - /** - * {@snippet lang=c : - * #define __has_safe_buffers 0 - * } - */ - public static int __has_safe_buffers() { - return __has_safe_buffers; - } - private static final int __DARWIN_ONLY_64_BIT_INO_T = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_ONLY_64_BIT_INO_T 1 - * } - */ - public static int __DARWIN_ONLY_64_BIT_INO_T() { - return __DARWIN_ONLY_64_BIT_INO_T; - } - private static final int __DARWIN_ONLY_UNIX_CONFORMANCE = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_ONLY_UNIX_CONFORMANCE 1 - * } - */ - public static int __DARWIN_ONLY_UNIX_CONFORMANCE() { - return __DARWIN_ONLY_UNIX_CONFORMANCE; - } - private static final int __DARWIN_ONLY_VERS_1050 = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_ONLY_VERS_1050 1 - * } - */ - public static int __DARWIN_ONLY_VERS_1050() { - return __DARWIN_ONLY_VERS_1050; - } - private static final int __DARWIN_UNIX03 = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_UNIX03 1 - * } - */ - public static int __DARWIN_UNIX03() { - return __DARWIN_UNIX03; - } - private static final int __DARWIN_64_BIT_INO_T = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_64_BIT_INO_T 1 - * } - */ - public static int __DARWIN_64_BIT_INO_T() { - return __DARWIN_64_BIT_INO_T; - } - private static final int __DARWIN_VERS_1050 = (int)1L; - /** - * {@snippet lang=c : - * #define __DARWIN_VERS_1050 1 - * } - */ - public static int __DARWIN_VERS_1050() { - return __DARWIN_VERS_1050; - } - private static final int __DARWIN_NON_CANCELABLE = (int)0L; - /** - * {@snippet lang=c : - * #define __DARWIN_NON_CANCELABLE 0 - * } - */ - public static int __DARWIN_NON_CANCELABLE() { - return __DARWIN_NON_CANCELABLE; - } - private static final int __STDC_WANT_LIB_EXT1__ = (int)1L; - /** - * {@snippet lang=c : - * #define __STDC_WANT_LIB_EXT1__ 1 - * } - */ - public static int __STDC_WANT_LIB_EXT1__() { - return __STDC_WANT_LIB_EXT1__; - } - private static final int __DARWIN_NO_LONG_LONG = (int)0L; - /** - * {@snippet lang=c : - * #define __DARWIN_NO_LONG_LONG 0 - * } - */ - public static int __DARWIN_NO_LONG_LONG() { - return __DARWIN_NO_LONG_LONG; - } - private static final int _DARWIN_FEATURE_64_BIT_INODE = (int)1L; - /** - * {@snippet lang=c : - * #define _DARWIN_FEATURE_64_BIT_INODE 1 - * } - */ - public static int _DARWIN_FEATURE_64_BIT_INODE() { - return _DARWIN_FEATURE_64_BIT_INODE; - } - private static final int _DARWIN_FEATURE_ONLY_64_BIT_INODE = (int)1L; - /** - * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_64_BIT_INODE 1 - * } - */ - public static int _DARWIN_FEATURE_ONLY_64_BIT_INODE() { - return _DARWIN_FEATURE_ONLY_64_BIT_INODE; - } - private static final int _DARWIN_FEATURE_ONLY_VERS_1050 = (int)1L; - /** - * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_VERS_1050 1 - * } - */ - public static int _DARWIN_FEATURE_ONLY_VERS_1050() { - return _DARWIN_FEATURE_ONLY_VERS_1050; - } - private static final int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = (int)1L; - /** - * {@snippet lang=c : - * #define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE 1 - * } - */ - public static int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE() { - return _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE; - } - private static final int _DARWIN_FEATURE_UNIX_CONFORMANCE = (int)3L; - /** - * {@snippet lang=c : - * #define _DARWIN_FEATURE_UNIX_CONFORMANCE 3 - * } - */ - public static int _DARWIN_FEATURE_UNIX_CONFORMANCE() { - return _DARWIN_FEATURE_UNIX_CONFORMANCE; - } - private static final int __has_ptrcheck = (int)0L; - /** - * {@snippet lang=c : - * #define __has_ptrcheck 0 - * } - */ - public static int __has_ptrcheck() { - return __has_ptrcheck; - } - private static final int __API_TO_BE_DEPRECATED = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED() { - return __API_TO_BE_DEPRECATED; - } - private static final int __API_TO_BE_DEPRECATED_MACOS = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_MACOS 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_MACOS() { - return __API_TO_BE_DEPRECATED_MACOS; - } - private static final int __API_TO_BE_DEPRECATED_IOS = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_IOS 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_IOS() { - return __API_TO_BE_DEPRECATED_IOS; - } - private static final int __API_TO_BE_DEPRECATED_MACCATALYST = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_MACCATALYST 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_MACCATALYST() { - return __API_TO_BE_DEPRECATED_MACCATALYST; - } - private static final int __API_TO_BE_DEPRECATED_WATCHOS = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_WATCHOS 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_WATCHOS() { - return __API_TO_BE_DEPRECATED_WATCHOS; - } - private static final int __API_TO_BE_DEPRECATED_TVOS = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_TVOS 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_TVOS() { - return __API_TO_BE_DEPRECATED_TVOS; - } - private static final int __API_TO_BE_DEPRECATED_DRIVERKIT = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_DRIVERKIT 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_DRIVERKIT() { - return __API_TO_BE_DEPRECATED_DRIVERKIT; - } - private static final int __API_TO_BE_DEPRECATED_VISIONOS = (int)100000L; - /** - * {@snippet lang=c : - * #define __API_TO_BE_DEPRECATED_VISIONOS 100000 - * } - */ - public static int __API_TO_BE_DEPRECATED_VISIONOS() { - return __API_TO_BE_DEPRECATED_VISIONOS; - } - private static final int __MAC_10_0 = (int)1000L; - /** - * {@snippet lang=c : - * #define __MAC_10_0 1000 - * } - */ - public static int __MAC_10_0() { - return __MAC_10_0; - } - private static final int __MAC_10_1 = (int)1010L; - /** - * {@snippet lang=c : - * #define __MAC_10_1 1010 - * } - */ - public static int __MAC_10_1() { - return __MAC_10_1; - } - private static final int __MAC_10_2 = (int)1020L; - /** - * {@snippet lang=c : - * #define __MAC_10_2 1020 - * } - */ - public static int __MAC_10_2() { - return __MAC_10_2; - } - private static final int __MAC_10_3 = (int)1030L; - /** - * {@snippet lang=c : - * #define __MAC_10_3 1030 - * } - */ - public static int __MAC_10_3() { - return __MAC_10_3; - } - private static final int __MAC_10_4 = (int)1040L; - /** - * {@snippet lang=c : - * #define __MAC_10_4 1040 - * } - */ - public static int __MAC_10_4() { - return __MAC_10_4; - } - private static final int __MAC_10_5 = (int)1050L; - /** - * {@snippet lang=c : - * #define __MAC_10_5 1050 - * } - */ - public static int __MAC_10_5() { - return __MAC_10_5; - } - private static final int __MAC_10_6 = (int)1060L; - /** - * {@snippet lang=c : - * #define __MAC_10_6 1060 - * } - */ - public static int __MAC_10_6() { - return __MAC_10_6; - } - private static final int __MAC_10_7 = (int)1070L; - /** - * {@snippet lang=c : - * #define __MAC_10_7 1070 - * } - */ - public static int __MAC_10_7() { - return __MAC_10_7; - } - private static final int __MAC_10_8 = (int)1080L; - /** - * {@snippet lang=c : - * #define __MAC_10_8 1080 - * } - */ - public static int __MAC_10_8() { - return __MAC_10_8; - } - private static final int __MAC_10_9 = (int)1090L; - /** - * {@snippet lang=c : - * #define __MAC_10_9 1090 - * } - */ - public static int __MAC_10_9() { - return __MAC_10_9; - } - private static final int __MAC_10_10 = (int)101000L; - /** - * {@snippet lang=c : - * #define __MAC_10_10 101000 - * } - */ - public static int __MAC_10_10() { - return __MAC_10_10; - } - private static final int __MAC_10_10_2 = (int)101002L; - /** - * {@snippet lang=c : - * #define __MAC_10_10_2 101002 - * } - */ - public static int __MAC_10_10_2() { - return __MAC_10_10_2; - } - private static final int __MAC_10_10_3 = (int)101003L; - /** - * {@snippet lang=c : - * #define __MAC_10_10_3 101003 - * } - */ - public static int __MAC_10_10_3() { - return __MAC_10_10_3; - } - private static final int __MAC_10_11 = (int)101100L; - /** - * {@snippet lang=c : - * #define __MAC_10_11 101100 - * } - */ - public static int __MAC_10_11() { - return __MAC_10_11; - } - private static final int __MAC_10_11_2 = (int)101102L; - /** - * {@snippet lang=c : - * #define __MAC_10_11_2 101102 - * } - */ - public static int __MAC_10_11_2() { - return __MAC_10_11_2; - } - private static final int __MAC_10_11_3 = (int)101103L; - /** - * {@snippet lang=c : - * #define __MAC_10_11_3 101103 - * } - */ - public static int __MAC_10_11_3() { - return __MAC_10_11_3; - } - private static final int __MAC_10_11_4 = (int)101104L; - /** - * {@snippet lang=c : - * #define __MAC_10_11_4 101104 - * } - */ - public static int __MAC_10_11_4() { - return __MAC_10_11_4; - } - private static final int __MAC_10_12 = (int)101200L; - /** - * {@snippet lang=c : - * #define __MAC_10_12 101200 - * } - */ - public static int __MAC_10_12() { - return __MAC_10_12; - } - private static final int __MAC_10_12_1 = (int)101201L; - /** - * {@snippet lang=c : - * #define __MAC_10_12_1 101201 - * } - */ - public static int __MAC_10_12_1() { - return __MAC_10_12_1; - } - private static final int __MAC_10_12_2 = (int)101202L; - /** - * {@snippet lang=c : - * #define __MAC_10_12_2 101202 - * } - */ - public static int __MAC_10_12_2() { - return __MAC_10_12_2; - } - private static final int __MAC_10_12_4 = (int)101204L; - /** - * {@snippet lang=c : - * #define __MAC_10_12_4 101204 - * } - */ - public static int __MAC_10_12_4() { - return __MAC_10_12_4; - } - private static final int __MAC_10_13 = (int)101300L; - /** - * {@snippet lang=c : - * #define __MAC_10_13 101300 - * } - */ - public static int __MAC_10_13() { - return __MAC_10_13; - } - private static final int __MAC_10_13_1 = (int)101301L; - /** - * {@snippet lang=c : - * #define __MAC_10_13_1 101301 - * } - */ - public static int __MAC_10_13_1() { - return __MAC_10_13_1; - } - private static final int __MAC_10_13_2 = (int)101302L; - /** - * {@snippet lang=c : - * #define __MAC_10_13_2 101302 - * } - */ - public static int __MAC_10_13_2() { - return __MAC_10_13_2; - } - private static final int __MAC_10_13_4 = (int)101304L; - /** - * {@snippet lang=c : - * #define __MAC_10_13_4 101304 - * } - */ - public static int __MAC_10_13_4() { - return __MAC_10_13_4; - } - private static final int __MAC_10_14 = (int)101400L; - /** - * {@snippet lang=c : - * #define __MAC_10_14 101400 - * } - */ - public static int __MAC_10_14() { - return __MAC_10_14; - } - private static final int __MAC_10_14_1 = (int)101401L; - /** - * {@snippet lang=c : - * #define __MAC_10_14_1 101401 - * } - */ - public static int __MAC_10_14_1() { - return __MAC_10_14_1; - } - private static final int __MAC_10_14_4 = (int)101404L; - /** - * {@snippet lang=c : - * #define __MAC_10_14_4 101404 - * } - */ - public static int __MAC_10_14_4() { - return __MAC_10_14_4; - } - private static final int __MAC_10_14_5 = (int)101405L; - /** - * {@snippet lang=c : - * #define __MAC_10_14_5 101405 - * } - */ - public static int __MAC_10_14_5() { - return __MAC_10_14_5; - } - private static final int __MAC_10_14_6 = (int)101406L; - /** - * {@snippet lang=c : - * #define __MAC_10_14_6 101406 - * } - */ - public static int __MAC_10_14_6() { - return __MAC_10_14_6; - } - private static final int __MAC_10_15 = (int)101500L; - /** - * {@snippet lang=c : - * #define __MAC_10_15 101500 - * } - */ - public static int __MAC_10_15() { - return __MAC_10_15; - } - private static final int __MAC_10_15_1 = (int)101501L; - /** - * {@snippet lang=c : - * #define __MAC_10_15_1 101501 - * } - */ - public static int __MAC_10_15_1() { - return __MAC_10_15_1; - } - private static final int __MAC_10_15_4 = (int)101504L; - /** - * {@snippet lang=c : - * #define __MAC_10_15_4 101504 - * } - */ - public static int __MAC_10_15_4() { - return __MAC_10_15_4; - } - private static final int __MAC_10_16 = (int)101600L; - /** - * {@snippet lang=c : - * #define __MAC_10_16 101600 - * } - */ - public static int __MAC_10_16() { - return __MAC_10_16; - } - private static final int __MAC_11_0 = (int)110000L; - /** - * {@snippet lang=c : - * #define __MAC_11_0 110000 - * } - */ - public static int __MAC_11_0() { - return __MAC_11_0; - } - private static final int __MAC_11_1 = (int)110100L; - /** - * {@snippet lang=c : - * #define __MAC_11_1 110100 - * } - */ - public static int __MAC_11_1() { - return __MAC_11_1; - } - private static final int __MAC_11_3 = (int)110300L; - /** - * {@snippet lang=c : - * #define __MAC_11_3 110300 - * } - */ - public static int __MAC_11_3() { - return __MAC_11_3; - } - private static final int __MAC_11_4 = (int)110400L; - /** - * {@snippet lang=c : - * #define __MAC_11_4 110400 - * } - */ - public static int __MAC_11_4() { - return __MAC_11_4; - } - private static final int __MAC_11_5 = (int)110500L; - /** - * {@snippet lang=c : - * #define __MAC_11_5 110500 - * } - */ - public static int __MAC_11_5() { - return __MAC_11_5; - } - private static final int __MAC_11_6 = (int)110600L; - /** - * {@snippet lang=c : - * #define __MAC_11_6 110600 - * } - */ - public static int __MAC_11_6() { - return __MAC_11_6; - } - private static final int __MAC_12_0 = (int)120000L; - /** - * {@snippet lang=c : - * #define __MAC_12_0 120000 - * } - */ - public static int __MAC_12_0() { - return __MAC_12_0; - } - private static final int __MAC_12_1 = (int)120100L; - /** - * {@snippet lang=c : - * #define __MAC_12_1 120100 - * } - */ - public static int __MAC_12_1() { - return __MAC_12_1; - } - private static final int __MAC_12_2 = (int)120200L; - /** - * {@snippet lang=c : - * #define __MAC_12_2 120200 - * } - */ - public static int __MAC_12_2() { - return __MAC_12_2; - } - private static final int __MAC_12_3 = (int)120300L; - /** - * {@snippet lang=c : - * #define __MAC_12_3 120300 - * } - */ - public static int __MAC_12_3() { - return __MAC_12_3; - } - private static final int __MAC_12_4 = (int)120400L; - /** - * {@snippet lang=c : - * #define __MAC_12_4 120400 - * } - */ - public static int __MAC_12_4() { - return __MAC_12_4; - } - private static final int __MAC_12_5 = (int)120500L; - /** - * {@snippet lang=c : - * #define __MAC_12_5 120500 - * } - */ - public static int __MAC_12_5() { - return __MAC_12_5; - } - private static final int __MAC_12_6 = (int)120600L; - /** - * {@snippet lang=c : - * #define __MAC_12_6 120600 - * } - */ - public static int __MAC_12_6() { - return __MAC_12_6; - } - private static final int __MAC_12_7 = (int)120700L; - /** - * {@snippet lang=c : - * #define __MAC_12_7 120700 - * } - */ - public static int __MAC_12_7() { - return __MAC_12_7; - } - private static final int __MAC_13_0 = (int)130000L; - /** - * {@snippet lang=c : - * #define __MAC_13_0 130000 - * } - */ - public static int __MAC_13_0() { - return __MAC_13_0; - } - private static final int __MAC_13_1 = (int)130100L; - /** - * {@snippet lang=c : - * #define __MAC_13_1 130100 - * } - */ - public static int __MAC_13_1() { - return __MAC_13_1; - } - private static final int __MAC_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define __MAC_13_2 130200 - * } - */ - public static int __MAC_13_2() { - return __MAC_13_2; - } - private static final int __MAC_13_3 = (int)130300L; - /** - * {@snippet lang=c : - * #define __MAC_13_3 130300 - * } - */ - public static int __MAC_13_3() { - return __MAC_13_3; - } - private static final int __MAC_13_4 = (int)130400L; - /** - * {@snippet lang=c : - * #define __MAC_13_4 130400 - * } - */ - public static int __MAC_13_4() { - return __MAC_13_4; - } - private static final int __MAC_13_5 = (int)130500L; - /** - * {@snippet lang=c : - * #define __MAC_13_5 130500 - * } - */ - public static int __MAC_13_5() { - return __MAC_13_5; - } - private static final int __MAC_13_6 = (int)130600L; - /** - * {@snippet lang=c : - * #define __MAC_13_6 130600 - * } - */ - public static int __MAC_13_6() { - return __MAC_13_6; - } - private static final int __MAC_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define __MAC_14_0 140000 - * } - */ - public static int __MAC_14_0() { - return __MAC_14_0; - } - private static final int __MAC_14_1 = (int)140100L; - /** - * {@snippet lang=c : - * #define __MAC_14_1 140100 - * } - */ - public static int __MAC_14_1() { - return __MAC_14_1; - } - private static final int __MAC_14_2 = (int)140200L; - /** - * {@snippet lang=c : - * #define __MAC_14_2 140200 - * } - */ - public static int __MAC_14_2() { - return __MAC_14_2; - } - private static final int __MAC_14_3 = (int)140300L; - /** - * {@snippet lang=c : - * #define __MAC_14_3 140300 - * } - */ - public static int __MAC_14_3() { - return __MAC_14_3; - } - private static final int __MAC_14_4 = (int)140400L; - /** - * {@snippet lang=c : - * #define __MAC_14_4 140400 - * } - */ - public static int __MAC_14_4() { - return __MAC_14_4; - } - private static final int __IPHONE_2_0 = (int)20000L; - /** - * {@snippet lang=c : - * #define __IPHONE_2_0 20000 - * } - */ - public static int __IPHONE_2_0() { - return __IPHONE_2_0; - } - private static final int __IPHONE_2_1 = (int)20100L; - /** - * {@snippet lang=c : - * #define __IPHONE_2_1 20100 - * } - */ - public static int __IPHONE_2_1() { - return __IPHONE_2_1; - } - private static final int __IPHONE_2_2 = (int)20200L; - /** - * {@snippet lang=c : - * #define __IPHONE_2_2 20200 - * } - */ - public static int __IPHONE_2_2() { - return __IPHONE_2_2; - } - private static final int __IPHONE_3_0 = (int)30000L; - /** - * {@snippet lang=c : - * #define __IPHONE_3_0 30000 - * } - */ - public static int __IPHONE_3_0() { - return __IPHONE_3_0; - } - private static final int __IPHONE_3_1 = (int)30100L; - /** - * {@snippet lang=c : - * #define __IPHONE_3_1 30100 - * } - */ - public static int __IPHONE_3_1() { - return __IPHONE_3_1; - } - private static final int __IPHONE_3_2 = (int)30200L; - /** - * {@snippet lang=c : - * #define __IPHONE_3_2 30200 - * } - */ - public static int __IPHONE_3_2() { - return __IPHONE_3_2; - } - private static final int __IPHONE_4_0 = (int)40000L; - /** - * {@snippet lang=c : - * #define __IPHONE_4_0 40000 - * } - */ - public static int __IPHONE_4_0() { - return __IPHONE_4_0; - } - private static final int __IPHONE_4_1 = (int)40100L; - /** - * {@snippet lang=c : - * #define __IPHONE_4_1 40100 - * } - */ - public static int __IPHONE_4_1() { - return __IPHONE_4_1; - } - private static final int __IPHONE_4_2 = (int)40200L; - /** - * {@snippet lang=c : - * #define __IPHONE_4_2 40200 - * } - */ - public static int __IPHONE_4_2() { - return __IPHONE_4_2; - } - private static final int __IPHONE_4_3 = (int)40300L; - /** - * {@snippet lang=c : - * #define __IPHONE_4_3 40300 - * } - */ - public static int __IPHONE_4_3() { - return __IPHONE_4_3; - } - private static final int __IPHONE_5_0 = (int)50000L; - /** - * {@snippet lang=c : - * #define __IPHONE_5_0 50000 - * } - */ - public static int __IPHONE_5_0() { - return __IPHONE_5_0; - } - private static final int __IPHONE_5_1 = (int)50100L; - /** - * {@snippet lang=c : - * #define __IPHONE_5_1 50100 - * } - */ - public static int __IPHONE_5_1() { - return __IPHONE_5_1; - } - private static final int __IPHONE_6_0 = (int)60000L; - /** - * {@snippet lang=c : - * #define __IPHONE_6_0 60000 - * } - */ - public static int __IPHONE_6_0() { - return __IPHONE_6_0; - } - private static final int __IPHONE_6_1 = (int)60100L; - /** - * {@snippet lang=c : - * #define __IPHONE_6_1 60100 - * } - */ - public static int __IPHONE_6_1() { - return __IPHONE_6_1; - } - private static final int __IPHONE_7_0 = (int)70000L; - /** - * {@snippet lang=c : - * #define __IPHONE_7_0 70000 - * } - */ - public static int __IPHONE_7_0() { - return __IPHONE_7_0; - } - private static final int __IPHONE_7_1 = (int)70100L; - /** - * {@snippet lang=c : - * #define __IPHONE_7_1 70100 - * } - */ - public static int __IPHONE_7_1() { - return __IPHONE_7_1; - } - private static final int __IPHONE_8_0 = (int)80000L; - /** - * {@snippet lang=c : - * #define __IPHONE_8_0 80000 - * } - */ - public static int __IPHONE_8_0() { - return __IPHONE_8_0; - } - private static final int __IPHONE_8_1 = (int)80100L; - /** - * {@snippet lang=c : - * #define __IPHONE_8_1 80100 - * } - */ - public static int __IPHONE_8_1() { - return __IPHONE_8_1; - } - private static final int __IPHONE_8_2 = (int)80200L; - /** - * {@snippet lang=c : - * #define __IPHONE_8_2 80200 - * } - */ - public static int __IPHONE_8_2() { - return __IPHONE_8_2; - } - private static final int __IPHONE_8_3 = (int)80300L; - /** - * {@snippet lang=c : - * #define __IPHONE_8_3 80300 - * } - */ - public static int __IPHONE_8_3() { - return __IPHONE_8_3; - } - private static final int __IPHONE_8_4 = (int)80400L; - /** - * {@snippet lang=c : - * #define __IPHONE_8_4 80400 - * } - */ - public static int __IPHONE_8_4() { - return __IPHONE_8_4; - } - private static final int __IPHONE_9_0 = (int)90000L; - /** - * {@snippet lang=c : - * #define __IPHONE_9_0 90000 - * } - */ - public static int __IPHONE_9_0() { - return __IPHONE_9_0; - } - private static final int __IPHONE_9_1 = (int)90100L; - /** - * {@snippet lang=c : - * #define __IPHONE_9_1 90100 - * } - */ - public static int __IPHONE_9_1() { - return __IPHONE_9_1; - } - private static final int __IPHONE_9_2 = (int)90200L; - /** - * {@snippet lang=c : - * #define __IPHONE_9_2 90200 - * } - */ - public static int __IPHONE_9_2() { - return __IPHONE_9_2; - } - private static final int __IPHONE_9_3 = (int)90300L; - /** - * {@snippet lang=c : - * #define __IPHONE_9_3 90300 - * } - */ - public static int __IPHONE_9_3() { - return __IPHONE_9_3; - } - private static final int __IPHONE_10_0 = (int)100000L; - /** - * {@snippet lang=c : - * #define __IPHONE_10_0 100000 - * } - */ - public static int __IPHONE_10_0() { - return __IPHONE_10_0; - } - private static final int __IPHONE_10_1 = (int)100100L; - /** - * {@snippet lang=c : - * #define __IPHONE_10_1 100100 - * } - */ - public static int __IPHONE_10_1() { - return __IPHONE_10_1; - } - private static final int __IPHONE_10_2 = (int)100200L; - /** - * {@snippet lang=c : - * #define __IPHONE_10_2 100200 - * } - */ - public static int __IPHONE_10_2() { - return __IPHONE_10_2; - } - private static final int __IPHONE_10_3 = (int)100300L; - /** - * {@snippet lang=c : - * #define __IPHONE_10_3 100300 - * } - */ - public static int __IPHONE_10_3() { - return __IPHONE_10_3; - } - private static final int __IPHONE_11_0 = (int)110000L; - /** - * {@snippet lang=c : - * #define __IPHONE_11_0 110000 - * } - */ - public static int __IPHONE_11_0() { - return __IPHONE_11_0; - } - private static final int __IPHONE_11_1 = (int)110100L; - /** - * {@snippet lang=c : - * #define __IPHONE_11_1 110100 - * } - */ - public static int __IPHONE_11_1() { - return __IPHONE_11_1; - } - private static final int __IPHONE_11_2 = (int)110200L; - /** - * {@snippet lang=c : - * #define __IPHONE_11_2 110200 - * } - */ - public static int __IPHONE_11_2() { - return __IPHONE_11_2; - } - private static final int __IPHONE_11_3 = (int)110300L; - /** - * {@snippet lang=c : - * #define __IPHONE_11_3 110300 - * } - */ - public static int __IPHONE_11_3() { - return __IPHONE_11_3; - } - private static final int __IPHONE_11_4 = (int)110400L; - /** - * {@snippet lang=c : - * #define __IPHONE_11_4 110400 - * } - */ - public static int __IPHONE_11_4() { - return __IPHONE_11_4; - } - private static final int __IPHONE_12_0 = (int)120000L; - /** - * {@snippet lang=c : - * #define __IPHONE_12_0 120000 - * } - */ - public static int __IPHONE_12_0() { - return __IPHONE_12_0; - } - private static final int __IPHONE_12_1 = (int)120100L; - /** - * {@snippet lang=c : - * #define __IPHONE_12_1 120100 - * } - */ - public static int __IPHONE_12_1() { - return __IPHONE_12_1; - } - private static final int __IPHONE_12_2 = (int)120200L; - /** - * {@snippet lang=c : - * #define __IPHONE_12_2 120200 - * } - */ - public static int __IPHONE_12_2() { - return __IPHONE_12_2; - } - private static final int __IPHONE_12_3 = (int)120300L; - /** - * {@snippet lang=c : - * #define __IPHONE_12_3 120300 - * } - */ - public static int __IPHONE_12_3() { - return __IPHONE_12_3; - } - private static final int __IPHONE_12_4 = (int)120400L; - /** - * {@snippet lang=c : - * #define __IPHONE_12_4 120400 - * } - */ - public static int __IPHONE_12_4() { - return __IPHONE_12_4; - } - private static final int __IPHONE_13_0 = (int)130000L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_0 130000 - * } - */ - public static int __IPHONE_13_0() { - return __IPHONE_13_0; - } - private static final int __IPHONE_13_1 = (int)130100L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_1 130100 - * } - */ - public static int __IPHONE_13_1() { - return __IPHONE_13_1; - } - private static final int __IPHONE_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_2 130200 - * } - */ - public static int __IPHONE_13_2() { - return __IPHONE_13_2; - } - private static final int __IPHONE_13_3 = (int)130300L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_3 130300 - * } - */ - public static int __IPHONE_13_3() { - return __IPHONE_13_3; - } - private static final int __IPHONE_13_4 = (int)130400L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_4 130400 - * } - */ - public static int __IPHONE_13_4() { - return __IPHONE_13_4; - } - private static final int __IPHONE_13_5 = (int)130500L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_5 130500 - * } - */ - public static int __IPHONE_13_5() { - return __IPHONE_13_5; - } - private static final int __IPHONE_13_6 = (int)130600L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_6 130600 - * } - */ - public static int __IPHONE_13_6() { - return __IPHONE_13_6; - } - private static final int __IPHONE_13_7 = (int)130700L; - /** - * {@snippet lang=c : - * #define __IPHONE_13_7 130700 - * } - */ - public static int __IPHONE_13_7() { - return __IPHONE_13_7; - } - private static final int __IPHONE_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_0 140000 - * } - */ - public static int __IPHONE_14_0() { - return __IPHONE_14_0; - } - private static final int __IPHONE_14_1 = (int)140100L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_1 140100 - * } - */ - public static int __IPHONE_14_1() { - return __IPHONE_14_1; - } - private static final int __IPHONE_14_2 = (int)140200L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_2 140200 - * } - */ - public static int __IPHONE_14_2() { - return __IPHONE_14_2; - } - private static final int __IPHONE_14_3 = (int)140300L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_3 140300 - * } - */ - public static int __IPHONE_14_3() { - return __IPHONE_14_3; - } - private static final int __IPHONE_14_5 = (int)140500L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_5 140500 - * } - */ - public static int __IPHONE_14_5() { - return __IPHONE_14_5; - } - private static final int __IPHONE_14_4 = (int)140400L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_4 140400 - * } - */ - public static int __IPHONE_14_4() { - return __IPHONE_14_4; - } - private static final int __IPHONE_14_6 = (int)140600L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_6 140600 - * } - */ - public static int __IPHONE_14_6() { - return __IPHONE_14_6; - } - private static final int __IPHONE_14_7 = (int)140700L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_7 140700 - * } - */ - public static int __IPHONE_14_7() { - return __IPHONE_14_7; - } - private static final int __IPHONE_14_8 = (int)140800L; - /** - * {@snippet lang=c : - * #define __IPHONE_14_8 140800 - * } - */ - public static int __IPHONE_14_8() { - return __IPHONE_14_8; - } - private static final int __IPHONE_15_0 = (int)150000L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_0 150000 - * } - */ - public static int __IPHONE_15_0() { - return __IPHONE_15_0; - } - private static final int __IPHONE_15_1 = (int)150100L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_1 150100 - * } - */ - public static int __IPHONE_15_1() { - return __IPHONE_15_1; - } - private static final int __IPHONE_15_2 = (int)150200L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_2 150200 - * } - */ - public static int __IPHONE_15_2() { - return __IPHONE_15_2; - } - private static final int __IPHONE_15_3 = (int)150300L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_3 150300 - * } - */ - public static int __IPHONE_15_3() { - return __IPHONE_15_3; - } - private static final int __IPHONE_15_4 = (int)150400L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_4 150400 - * } - */ - public static int __IPHONE_15_4() { - return __IPHONE_15_4; - } - private static final int __IPHONE_15_5 = (int)150500L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_5 150500 - * } - */ - public static int __IPHONE_15_5() { - return __IPHONE_15_5; - } - private static final int __IPHONE_15_6 = (int)150600L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_6 150600 - * } - */ - public static int __IPHONE_15_6() { - return __IPHONE_15_6; - } - private static final int __IPHONE_15_7 = (int)150700L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_7 150700 - * } - */ - public static int __IPHONE_15_7() { - return __IPHONE_15_7; - } - private static final int __IPHONE_15_8 = (int)150800L; - /** - * {@snippet lang=c : - * #define __IPHONE_15_8 150800 - * } - */ - public static int __IPHONE_15_8() { - return __IPHONE_15_8; - } - private static final int __IPHONE_16_0 = (int)160000L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_0 160000 - * } - */ - public static int __IPHONE_16_0() { - return __IPHONE_16_0; - } - private static final int __IPHONE_16_1 = (int)160100L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_1 160100 - * } - */ - public static int __IPHONE_16_1() { - return __IPHONE_16_1; - } - private static final int __IPHONE_16_2 = (int)160200L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_2 160200 - * } - */ - public static int __IPHONE_16_2() { - return __IPHONE_16_2; - } - private static final int __IPHONE_16_3 = (int)160300L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_3 160300 - * } - */ - public static int __IPHONE_16_3() { - return __IPHONE_16_3; - } - private static final int __IPHONE_16_4 = (int)160400L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_4 160400 - * } - */ - public static int __IPHONE_16_4() { - return __IPHONE_16_4; - } - private static final int __IPHONE_16_5 = (int)160500L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_5 160500 - * } - */ - public static int __IPHONE_16_5() { - return __IPHONE_16_5; - } - private static final int __IPHONE_16_6 = (int)160600L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_6 160600 - * } - */ - public static int __IPHONE_16_6() { - return __IPHONE_16_6; - } - private static final int __IPHONE_16_7 = (int)160700L; - /** - * {@snippet lang=c : - * #define __IPHONE_16_7 160700 - * } - */ - public static int __IPHONE_16_7() { - return __IPHONE_16_7; - } - private static final int __IPHONE_17_0 = (int)170000L; - /** - * {@snippet lang=c : - * #define __IPHONE_17_0 170000 - * } - */ - public static int __IPHONE_17_0() { - return __IPHONE_17_0; - } - private static final int __IPHONE_17_1 = (int)170100L; - /** - * {@snippet lang=c : - * #define __IPHONE_17_1 170100 - * } - */ - public static int __IPHONE_17_1() { - return __IPHONE_17_1; - } - private static final int __IPHONE_17_2 = (int)170200L; - /** - * {@snippet lang=c : - * #define __IPHONE_17_2 170200 - * } - */ - public static int __IPHONE_17_2() { - return __IPHONE_17_2; - } - private static final int __IPHONE_17_3 = (int)170300L; - /** - * {@snippet lang=c : - * #define __IPHONE_17_3 170300 - * } - */ - public static int __IPHONE_17_3() { - return __IPHONE_17_3; - } - private static final int __IPHONE_17_4 = (int)170400L; - /** - * {@snippet lang=c : - * #define __IPHONE_17_4 170400 - * } - */ - public static int __IPHONE_17_4() { - return __IPHONE_17_4; - } - private static final int __WATCHOS_1_0 = (int)10000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_1_0 10000 - * } - */ - public static int __WATCHOS_1_0() { - return __WATCHOS_1_0; - } - private static final int __WATCHOS_2_0 = (int)20000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_2_0 20000 - * } - */ - public static int __WATCHOS_2_0() { - return __WATCHOS_2_0; - } - private static final int __WATCHOS_2_1 = (int)20100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_2_1 20100 - * } - */ - public static int __WATCHOS_2_1() { - return __WATCHOS_2_1; - } - private static final int __WATCHOS_2_2 = (int)20200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_2_2 20200 - * } - */ - public static int __WATCHOS_2_2() { - return __WATCHOS_2_2; - } - private static final int __WATCHOS_3_0 = (int)30000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_3_0 30000 - * } - */ - public static int __WATCHOS_3_0() { - return __WATCHOS_3_0; - } - private static final int __WATCHOS_3_1 = (int)30100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_3_1 30100 - * } - */ - public static int __WATCHOS_3_1() { - return __WATCHOS_3_1; - } - private static final int __WATCHOS_3_1_1 = (int)30101L; - /** - * {@snippet lang=c : - * #define __WATCHOS_3_1_1 30101 - * } - */ - public static int __WATCHOS_3_1_1() { - return __WATCHOS_3_1_1; - } - private static final int __WATCHOS_3_2 = (int)30200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_3_2 30200 - * } - */ - public static int __WATCHOS_3_2() { - return __WATCHOS_3_2; - } - private static final int __WATCHOS_4_0 = (int)40000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_0 40000 - * } - */ - public static int __WATCHOS_4_0() { - return __WATCHOS_4_0; - } - private static final int __WATCHOS_4_1 = (int)40100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_1 40100 - * } - */ - public static int __WATCHOS_4_1() { - return __WATCHOS_4_1; - } - private static final int __WATCHOS_4_2 = (int)40200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_2 40200 - * } - */ - public static int __WATCHOS_4_2() { - return __WATCHOS_4_2; - } - private static final int __WATCHOS_4_3 = (int)40300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_4_3 40300 - * } - */ - public static int __WATCHOS_4_3() { - return __WATCHOS_4_3; - } - private static final int __WATCHOS_5_0 = (int)50000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_0 50000 - * } - */ - public static int __WATCHOS_5_0() { - return __WATCHOS_5_0; - } - private static final int __WATCHOS_5_1 = (int)50100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_1 50100 - * } - */ - public static int __WATCHOS_5_1() { - return __WATCHOS_5_1; - } - private static final int __WATCHOS_5_2 = (int)50200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_2 50200 - * } - */ - public static int __WATCHOS_5_2() { - return __WATCHOS_5_2; - } - private static final int __WATCHOS_5_3 = (int)50300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_5_3 50300 - * } - */ - public static int __WATCHOS_5_3() { - return __WATCHOS_5_3; - } - private static final int __WATCHOS_6_0 = (int)60000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_0 60000 - * } - */ - public static int __WATCHOS_6_0() { - return __WATCHOS_6_0; - } - private static final int __WATCHOS_6_1 = (int)60100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_1 60100 - * } - */ - public static int __WATCHOS_6_1() { - return __WATCHOS_6_1; - } - private static final int __WATCHOS_6_2 = (int)60200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_6_2 60200 - * } - */ - public static int __WATCHOS_6_2() { - return __WATCHOS_6_2; - } - private static final int __WATCHOS_7_0 = (int)70000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_0 70000 - * } - */ - public static int __WATCHOS_7_0() { - return __WATCHOS_7_0; - } - private static final int __WATCHOS_7_1 = (int)70100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_1 70100 - * } - */ - public static int __WATCHOS_7_1() { - return __WATCHOS_7_1; - } - private static final int __WATCHOS_7_2 = (int)70200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_2 70200 - * } - */ - public static int __WATCHOS_7_2() { - return __WATCHOS_7_2; - } - private static final int __WATCHOS_7_3 = (int)70300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_3 70300 - * } - */ - public static int __WATCHOS_7_3() { - return __WATCHOS_7_3; - } - private static final int __WATCHOS_7_4 = (int)70400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_4 70400 - * } - */ - public static int __WATCHOS_7_4() { - return __WATCHOS_7_4; - } - private static final int __WATCHOS_7_5 = (int)70500L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_5 70500 - * } - */ - public static int __WATCHOS_7_5() { - return __WATCHOS_7_5; - } - private static final int __WATCHOS_7_6 = (int)70600L; - /** - * {@snippet lang=c : - * #define __WATCHOS_7_6 70600 - * } - */ - public static int __WATCHOS_7_6() { - return __WATCHOS_7_6; - } - private static final int __WATCHOS_8_0 = (int)80000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_0 80000 - * } - */ - public static int __WATCHOS_8_0() { - return __WATCHOS_8_0; - } - private static final int __WATCHOS_8_1 = (int)80100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_1 80100 - * } - */ - public static int __WATCHOS_8_1() { - return __WATCHOS_8_1; - } - private static final int __WATCHOS_8_3 = (int)80300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_3 80300 - * } - */ - public static int __WATCHOS_8_3() { - return __WATCHOS_8_3; - } - private static final int __WATCHOS_8_4 = (int)80400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_4 80400 - * } - */ - public static int __WATCHOS_8_4() { - return __WATCHOS_8_4; - } - private static final int __WATCHOS_8_5 = (int)80500L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_5 80500 - * } - */ - public static int __WATCHOS_8_5() { - return __WATCHOS_8_5; - } - private static final int __WATCHOS_8_6 = (int)80600L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_6 80600 - * } - */ - public static int __WATCHOS_8_6() { - return __WATCHOS_8_6; - } - private static final int __WATCHOS_8_7 = (int)80700L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_7 80700 - * } - */ - public static int __WATCHOS_8_7() { - return __WATCHOS_8_7; - } - private static final int __WATCHOS_8_8 = (int)80800L; - /** - * {@snippet lang=c : - * #define __WATCHOS_8_8 80800 - * } - */ - public static int __WATCHOS_8_8() { - return __WATCHOS_8_8; - } - private static final int __WATCHOS_9_0 = (int)90000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_0 90000 - * } - */ - public static int __WATCHOS_9_0() { - return __WATCHOS_9_0; - } - private static final int __WATCHOS_9_1 = (int)90100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_1 90100 - * } - */ - public static int __WATCHOS_9_1() { - return __WATCHOS_9_1; - } - private static final int __WATCHOS_9_2 = (int)90200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_2 90200 - * } - */ - public static int __WATCHOS_9_2() { - return __WATCHOS_9_2; - } - private static final int __WATCHOS_9_3 = (int)90300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_3 90300 - * } - */ - public static int __WATCHOS_9_3() { - return __WATCHOS_9_3; - } - private static final int __WATCHOS_9_4 = (int)90400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_4 90400 - * } - */ - public static int __WATCHOS_9_4() { - return __WATCHOS_9_4; - } - private static final int __WATCHOS_9_5 = (int)90500L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_5 90500 - * } - */ - public static int __WATCHOS_9_5() { - return __WATCHOS_9_5; - } - private static final int __WATCHOS_9_6 = (int)90600L; - /** - * {@snippet lang=c : - * #define __WATCHOS_9_6 90600 - * } - */ - public static int __WATCHOS_9_6() { - return __WATCHOS_9_6; - } - private static final int __WATCHOS_10_0 = (int)100000L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_0 100000 - * } - */ - public static int __WATCHOS_10_0() { - return __WATCHOS_10_0; - } - private static final int __WATCHOS_10_1 = (int)100100L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_1 100100 - * } - */ - public static int __WATCHOS_10_1() { - return __WATCHOS_10_1; - } - private static final int __WATCHOS_10_2 = (int)100200L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_2 100200 - * } - */ - public static int __WATCHOS_10_2() { - return __WATCHOS_10_2; - } - private static final int __WATCHOS_10_3 = (int)100300L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_3 100300 - * } - */ - public static int __WATCHOS_10_3() { - return __WATCHOS_10_3; - } - private static final int __WATCHOS_10_4 = (int)100400L; - /** - * {@snippet lang=c : - * #define __WATCHOS_10_4 100400 - * } - */ - public static int __WATCHOS_10_4() { - return __WATCHOS_10_4; - } - private static final int __TVOS_9_0 = (int)90000L; - /** - * {@snippet lang=c : - * #define __TVOS_9_0 90000 - * } - */ - public static int __TVOS_9_0() { - return __TVOS_9_0; - } - private static final int __TVOS_9_1 = (int)90100L; - /** - * {@snippet lang=c : - * #define __TVOS_9_1 90100 - * } - */ - public static int __TVOS_9_1() { - return __TVOS_9_1; - } - private static final int __TVOS_9_2 = (int)90200L; - /** - * {@snippet lang=c : - * #define __TVOS_9_2 90200 - * } - */ - public static int __TVOS_9_2() { - return __TVOS_9_2; - } - private static final int __TVOS_10_0 = (int)100000L; - /** - * {@snippet lang=c : - * #define __TVOS_10_0 100000 - * } - */ - public static int __TVOS_10_0() { - return __TVOS_10_0; - } - private static final int __TVOS_10_0_1 = (int)100001L; - /** - * {@snippet lang=c : - * #define __TVOS_10_0_1 100001 - * } - */ - public static int __TVOS_10_0_1() { - return __TVOS_10_0_1; - } - private static final int __TVOS_10_1 = (int)100100L; - /** - * {@snippet lang=c : - * #define __TVOS_10_1 100100 - * } - */ - public static int __TVOS_10_1() { - return __TVOS_10_1; - } - private static final int __TVOS_10_2 = (int)100200L; - /** - * {@snippet lang=c : - * #define __TVOS_10_2 100200 - * } - */ - public static int __TVOS_10_2() { - return __TVOS_10_2; - } - private static final int __TVOS_11_0 = (int)110000L; - /** - * {@snippet lang=c : - * #define __TVOS_11_0 110000 - * } - */ - public static int __TVOS_11_0() { - return __TVOS_11_0; - } - private static final int __TVOS_11_1 = (int)110100L; - /** - * {@snippet lang=c : - * #define __TVOS_11_1 110100 - * } - */ - public static int __TVOS_11_1() { - return __TVOS_11_1; - } - private static final int __TVOS_11_2 = (int)110200L; - /** - * {@snippet lang=c : - * #define __TVOS_11_2 110200 - * } - */ - public static int __TVOS_11_2() { - return __TVOS_11_2; - } - private static final int __TVOS_11_3 = (int)110300L; - /** - * {@snippet lang=c : - * #define __TVOS_11_3 110300 - * } - */ - public static int __TVOS_11_3() { - return __TVOS_11_3; - } - private static final int __TVOS_11_4 = (int)110400L; - /** - * {@snippet lang=c : - * #define __TVOS_11_4 110400 - * } - */ - public static int __TVOS_11_4() { - return __TVOS_11_4; - } - private static final int __TVOS_12_0 = (int)120000L; - /** - * {@snippet lang=c : - * #define __TVOS_12_0 120000 - * } - */ - public static int __TVOS_12_0() { - return __TVOS_12_0; - } - private static final int __TVOS_12_1 = (int)120100L; - /** - * {@snippet lang=c : - * #define __TVOS_12_1 120100 - * } - */ - public static int __TVOS_12_1() { - return __TVOS_12_1; - } - private static final int __TVOS_12_2 = (int)120200L; - /** - * {@snippet lang=c : - * #define __TVOS_12_2 120200 - * } - */ - public static int __TVOS_12_2() { - return __TVOS_12_2; - } - private static final int __TVOS_12_3 = (int)120300L; - /** - * {@snippet lang=c : - * #define __TVOS_12_3 120300 - * } - */ - public static int __TVOS_12_3() { - return __TVOS_12_3; - } - private static final int __TVOS_12_4 = (int)120400L; - /** - * {@snippet lang=c : - * #define __TVOS_12_4 120400 - * } - */ - public static int __TVOS_12_4() { - return __TVOS_12_4; - } - private static final int __TVOS_13_0 = (int)130000L; - /** - * {@snippet lang=c : - * #define __TVOS_13_0 130000 - * } - */ - public static int __TVOS_13_0() { - return __TVOS_13_0; - } - private static final int __TVOS_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define __TVOS_13_2 130200 - * } - */ - public static int __TVOS_13_2() { - return __TVOS_13_2; - } - private static final int __TVOS_13_3 = (int)130300L; - /** - * {@snippet lang=c : - * #define __TVOS_13_3 130300 - * } - */ - public static int __TVOS_13_3() { - return __TVOS_13_3; - } - private static final int __TVOS_13_4 = (int)130400L; - /** - * {@snippet lang=c : - * #define __TVOS_13_4 130400 - * } - */ - public static int __TVOS_13_4() { - return __TVOS_13_4; - } - private static final int __TVOS_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define __TVOS_14_0 140000 - * } - */ - public static int __TVOS_14_0() { - return __TVOS_14_0; - } - private static final int __TVOS_14_1 = (int)140100L; - /** - * {@snippet lang=c : - * #define __TVOS_14_1 140100 - * } - */ - public static int __TVOS_14_1() { - return __TVOS_14_1; - } - private static final int __TVOS_14_2 = (int)140200L; - /** - * {@snippet lang=c : - * #define __TVOS_14_2 140200 - * } - */ - public static int __TVOS_14_2() { - return __TVOS_14_2; - } - private static final int __TVOS_14_3 = (int)140300L; - /** - * {@snippet lang=c : - * #define __TVOS_14_3 140300 - * } - */ - public static int __TVOS_14_3() { - return __TVOS_14_3; - } - private static final int __TVOS_14_5 = (int)140500L; - /** - * {@snippet lang=c : - * #define __TVOS_14_5 140500 - * } - */ - public static int __TVOS_14_5() { - return __TVOS_14_5; - } - private static final int __TVOS_14_6 = (int)140600L; - /** - * {@snippet lang=c : - * #define __TVOS_14_6 140600 - * } - */ - public static int __TVOS_14_6() { - return __TVOS_14_6; - } - private static final int __TVOS_14_7 = (int)140700L; - /** - * {@snippet lang=c : - * #define __TVOS_14_7 140700 - * } - */ - public static int __TVOS_14_7() { - return __TVOS_14_7; - } - private static final int __TVOS_15_0 = (int)150000L; - /** - * {@snippet lang=c : - * #define __TVOS_15_0 150000 - * } - */ - public static int __TVOS_15_0() { - return __TVOS_15_0; - } - private static final int __TVOS_15_1 = (int)150100L; - /** - * {@snippet lang=c : - * #define __TVOS_15_1 150100 - * } - */ - public static int __TVOS_15_1() { - return __TVOS_15_1; - } - private static final int __TVOS_15_2 = (int)150200L; - /** - * {@snippet lang=c : - * #define __TVOS_15_2 150200 - * } - */ - public static int __TVOS_15_2() { - return __TVOS_15_2; - } - private static final int __TVOS_15_3 = (int)150300L; - /** - * {@snippet lang=c : - * #define __TVOS_15_3 150300 - * } - */ - public static int __TVOS_15_3() { - return __TVOS_15_3; - } - private static final int __TVOS_15_4 = (int)150400L; - /** - * {@snippet lang=c : - * #define __TVOS_15_4 150400 - * } - */ - public static int __TVOS_15_4() { - return __TVOS_15_4; - } - private static final int __TVOS_15_5 = (int)150500L; - /** - * {@snippet lang=c : - * #define __TVOS_15_5 150500 - * } - */ - public static int __TVOS_15_5() { - return __TVOS_15_5; - } - private static final int __TVOS_15_6 = (int)150600L; - /** - * {@snippet lang=c : - * #define __TVOS_15_6 150600 - * } - */ - public static int __TVOS_15_6() { - return __TVOS_15_6; - } - private static final int __TVOS_16_0 = (int)160000L; - /** - * {@snippet lang=c : - * #define __TVOS_16_0 160000 - * } - */ - public static int __TVOS_16_0() { - return __TVOS_16_0; - } - private static final int __TVOS_16_1 = (int)160100L; - /** - * {@snippet lang=c : - * #define __TVOS_16_1 160100 - * } - */ - public static int __TVOS_16_1() { - return __TVOS_16_1; - } - private static final int __TVOS_16_2 = (int)160200L; - /** - * {@snippet lang=c : - * #define __TVOS_16_2 160200 - * } - */ - public static int __TVOS_16_2() { - return __TVOS_16_2; - } - private static final int __TVOS_16_3 = (int)160300L; - /** - * {@snippet lang=c : - * #define __TVOS_16_3 160300 - * } - */ - public static int __TVOS_16_3() { - return __TVOS_16_3; - } - private static final int __TVOS_16_4 = (int)160400L; - /** - * {@snippet lang=c : - * #define __TVOS_16_4 160400 - * } - */ - public static int __TVOS_16_4() { - return __TVOS_16_4; - } - private static final int __TVOS_16_5 = (int)160500L; - /** - * {@snippet lang=c : - * #define __TVOS_16_5 160500 - * } - */ - public static int __TVOS_16_5() { - return __TVOS_16_5; - } - private static final int __TVOS_16_6 = (int)160600L; - /** - * {@snippet lang=c : - * #define __TVOS_16_6 160600 - * } - */ - public static int __TVOS_16_6() { - return __TVOS_16_6; - } - private static final int __TVOS_17_0 = (int)170000L; - /** - * {@snippet lang=c : - * #define __TVOS_17_0 170000 - * } - */ - public static int __TVOS_17_0() { - return __TVOS_17_0; - } - private static final int __TVOS_17_1 = (int)170100L; - /** - * {@snippet lang=c : - * #define __TVOS_17_1 170100 - * } - */ - public static int __TVOS_17_1() { - return __TVOS_17_1; - } - private static final int __TVOS_17_2 = (int)170200L; - /** - * {@snippet lang=c : - * #define __TVOS_17_2 170200 - * } - */ - public static int __TVOS_17_2() { - return __TVOS_17_2; - } - private static final int __TVOS_17_3 = (int)170300L; - /** - * {@snippet lang=c : - * #define __TVOS_17_3 170300 - * } - */ - public static int __TVOS_17_3() { - return __TVOS_17_3; - } - private static final int __TVOS_17_4 = (int)170400L; - /** - * {@snippet lang=c : - * #define __TVOS_17_4 170400 - * } - */ - public static int __TVOS_17_4() { - return __TVOS_17_4; - } - private static final int __BRIDGEOS_2_0 = (int)20000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_2_0 20000 - * } - */ - public static int __BRIDGEOS_2_0() { - return __BRIDGEOS_2_0; - } - private static final int __BRIDGEOS_3_0 = (int)30000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_0 30000 - * } - */ - public static int __BRIDGEOS_3_0() { - return __BRIDGEOS_3_0; - } - private static final int __BRIDGEOS_3_1 = (int)30100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_1 30100 - * } - */ - public static int __BRIDGEOS_3_1() { - return __BRIDGEOS_3_1; - } - private static final int __BRIDGEOS_3_4 = (int)30400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_3_4 30400 - * } - */ - public static int __BRIDGEOS_3_4() { - return __BRIDGEOS_3_4; - } - private static final int __BRIDGEOS_4_0 = (int)40000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_4_0 40000 - * } - */ - public static int __BRIDGEOS_4_0() { - return __BRIDGEOS_4_0; - } - private static final int __BRIDGEOS_4_1 = (int)40100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_4_1 40100 - * } - */ - public static int __BRIDGEOS_4_1() { - return __BRIDGEOS_4_1; - } - private static final int __BRIDGEOS_5_0 = (int)50000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_0 50000 - * } - */ - public static int __BRIDGEOS_5_0() { - return __BRIDGEOS_5_0; - } - private static final int __BRIDGEOS_5_1 = (int)50100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_1 50100 - * } - */ - public static int __BRIDGEOS_5_1() { - return __BRIDGEOS_5_1; - } - private static final int __BRIDGEOS_5_3 = (int)50300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_5_3 50300 - * } - */ - public static int __BRIDGEOS_5_3() { - return __BRIDGEOS_5_3; - } - private static final int __BRIDGEOS_6_0 = (int)60000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_0 60000 - * } - */ - public static int __BRIDGEOS_6_0() { - return __BRIDGEOS_6_0; - } - private static final int __BRIDGEOS_6_2 = (int)60200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_2 60200 - * } - */ - public static int __BRIDGEOS_6_2() { - return __BRIDGEOS_6_2; - } - private static final int __BRIDGEOS_6_4 = (int)60400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_4 60400 - * } - */ - public static int __BRIDGEOS_6_4() { - return __BRIDGEOS_6_4; - } - private static final int __BRIDGEOS_6_5 = (int)60500L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_5 60500 - * } - */ - public static int __BRIDGEOS_6_5() { - return __BRIDGEOS_6_5; - } - private static final int __BRIDGEOS_6_6 = (int)60600L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_6_6 60600 - * } - */ - public static int __BRIDGEOS_6_6() { - return __BRIDGEOS_6_6; - } - private static final int __BRIDGEOS_7_0 = (int)70000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_0 70000 - * } - */ - public static int __BRIDGEOS_7_0() { - return __BRIDGEOS_7_0; - } - private static final int __BRIDGEOS_7_1 = (int)70100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_1 70100 - * } - */ - public static int __BRIDGEOS_7_1() { - return __BRIDGEOS_7_1; - } - private static final int __BRIDGEOS_7_2 = (int)70200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_2 70200 - * } - */ - public static int __BRIDGEOS_7_2() { - return __BRIDGEOS_7_2; - } - private static final int __BRIDGEOS_7_3 = (int)70300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_3 70300 - * } - */ - public static int __BRIDGEOS_7_3() { - return __BRIDGEOS_7_3; - } - private static final int __BRIDGEOS_7_4 = (int)70400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_4 70400 - * } - */ - public static int __BRIDGEOS_7_4() { - return __BRIDGEOS_7_4; - } - private static final int __BRIDGEOS_7_6 = (int)70600L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_7_6 70600 - * } - */ - public static int __BRIDGEOS_7_6() { - return __BRIDGEOS_7_6; - } - private static final int __BRIDGEOS_8_0 = (int)80000L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_0 80000 - * } - */ - public static int __BRIDGEOS_8_0() { - return __BRIDGEOS_8_0; - } - private static final int __BRIDGEOS_8_1 = (int)80100L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_1 80100 - * } - */ - public static int __BRIDGEOS_8_1() { - return __BRIDGEOS_8_1; - } - private static final int __BRIDGEOS_8_2 = (int)80200L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_2 80200 - * } - */ - public static int __BRIDGEOS_8_2() { - return __BRIDGEOS_8_2; - } - private static final int __BRIDGEOS_8_3 = (int)80300L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_3 80300 - * } - */ - public static int __BRIDGEOS_8_3() { - return __BRIDGEOS_8_3; - } - private static final int __BRIDGEOS_8_4 = (int)80400L; - /** - * {@snippet lang=c : - * #define __BRIDGEOS_8_4 80400 - * } - */ - public static int __BRIDGEOS_8_4() { - return __BRIDGEOS_8_4; - } - private static final int __DRIVERKIT_19_0 = (int)190000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_19_0 190000 - * } - */ - public static int __DRIVERKIT_19_0() { - return __DRIVERKIT_19_0; - } - private static final int __DRIVERKIT_20_0 = (int)200000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_20_0 200000 - * } - */ - public static int __DRIVERKIT_20_0() { - return __DRIVERKIT_20_0; - } - private static final int __DRIVERKIT_21_0 = (int)210000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_21_0 210000 - * } - */ - public static int __DRIVERKIT_21_0() { - return __DRIVERKIT_21_0; - } - private static final int __DRIVERKIT_22_0 = (int)220000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_0 220000 - * } - */ - public static int __DRIVERKIT_22_0() { - return __DRIVERKIT_22_0; - } - private static final int __DRIVERKIT_22_4 = (int)220400L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_4 220400 - * } - */ - public static int __DRIVERKIT_22_4() { - return __DRIVERKIT_22_4; - } - private static final int __DRIVERKIT_22_5 = (int)220500L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_5 220500 - * } - */ - public static int __DRIVERKIT_22_5() { - return __DRIVERKIT_22_5; - } - private static final int __DRIVERKIT_22_6 = (int)220600L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_22_6 220600 - * } - */ - public static int __DRIVERKIT_22_6() { - return __DRIVERKIT_22_6; - } - private static final int __DRIVERKIT_23_0 = (int)230000L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_0 230000 - * } - */ - public static int __DRIVERKIT_23_0() { - return __DRIVERKIT_23_0; - } - private static final int __DRIVERKIT_23_1 = (int)230100L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_1 230100 - * } - */ - public static int __DRIVERKIT_23_1() { - return __DRIVERKIT_23_1; - } - private static final int __DRIVERKIT_23_2 = (int)230200L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_2 230200 - * } - */ - public static int __DRIVERKIT_23_2() { - return __DRIVERKIT_23_2; - } - private static final int __DRIVERKIT_23_3 = (int)230300L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_3 230300 - * } - */ - public static int __DRIVERKIT_23_3() { - return __DRIVERKIT_23_3; - } - private static final int __DRIVERKIT_23_4 = (int)230400L; - /** - * {@snippet lang=c : - * #define __DRIVERKIT_23_4 230400 - * } - */ - public static int __DRIVERKIT_23_4() { - return __DRIVERKIT_23_4; - } - private static final int __VISIONOS_1_0 = (int)10000L; - /** - * {@snippet lang=c : - * #define __VISIONOS_1_0 10000 - * } - */ - public static int __VISIONOS_1_0() { - return __VISIONOS_1_0; - } - private static final int __VISIONOS_1_1 = (int)10100L; - /** - * {@snippet lang=c : - * #define __VISIONOS_1_1 10100 - * } - */ - public static int __VISIONOS_1_1() { - return __VISIONOS_1_1; - } - private static final int __ENABLE_LEGACY_MAC_AVAILABILITY = (int)1L; - /** - * {@snippet lang=c : - * #define __ENABLE_LEGACY_MAC_AVAILABILITY 1 - * } - */ - public static int __ENABLE_LEGACY_MAC_AVAILABILITY() { - return __ENABLE_LEGACY_MAC_AVAILABILITY; - } - private static final int __PTHREAD_SIZE__ = (int)8176L; - /** - * {@snippet lang=c : - * #define __PTHREAD_SIZE__ 8176 - * } - */ - public static int __PTHREAD_SIZE__() { - return __PTHREAD_SIZE__; - } - private static final int __PTHREAD_ATTR_SIZE__ = (int)56L; - /** - * {@snippet lang=c : - * #define __PTHREAD_ATTR_SIZE__ 56 - * } - */ - public static int __PTHREAD_ATTR_SIZE__() { - return __PTHREAD_ATTR_SIZE__; - } - private static final int __PTHREAD_MUTEXATTR_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_MUTEXATTR_SIZE__ 8 - * } - */ - public static int __PTHREAD_MUTEXATTR_SIZE__() { - return __PTHREAD_MUTEXATTR_SIZE__; - } - private static final int __PTHREAD_MUTEX_SIZE__ = (int)56L; - /** - * {@snippet lang=c : - * #define __PTHREAD_MUTEX_SIZE__ 56 - * } - */ - public static int __PTHREAD_MUTEX_SIZE__() { - return __PTHREAD_MUTEX_SIZE__; - } - private static final int __PTHREAD_CONDATTR_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_CONDATTR_SIZE__ 8 - * } - */ - public static int __PTHREAD_CONDATTR_SIZE__() { - return __PTHREAD_CONDATTR_SIZE__; - } - private static final int __PTHREAD_COND_SIZE__ = (int)40L; - /** - * {@snippet lang=c : - * #define __PTHREAD_COND_SIZE__ 40 - * } - */ - public static int __PTHREAD_COND_SIZE__() { - return __PTHREAD_COND_SIZE__; - } - private static final int __PTHREAD_ONCE_SIZE__ = (int)8L; - /** - * {@snippet lang=c : - * #define __PTHREAD_ONCE_SIZE__ 8 - * } - */ - public static int __PTHREAD_ONCE_SIZE__() { - return __PTHREAD_ONCE_SIZE__; - } - private static final int __PTHREAD_RWLOCK_SIZE__ = (int)192L; - /** - * {@snippet lang=c : - * #define __PTHREAD_RWLOCK_SIZE__ 192 - * } - */ - public static int __PTHREAD_RWLOCK_SIZE__() { - return __PTHREAD_RWLOCK_SIZE__; - } - private static final int __PTHREAD_RWLOCKATTR_SIZE__ = (int)16L; - /** - * {@snippet lang=c : - * #define __PTHREAD_RWLOCKATTR_SIZE__ 16 - * } - */ - public static int __PTHREAD_RWLOCKATTR_SIZE__() { - return __PTHREAD_RWLOCKATTR_SIZE__; - } - private static final int _FORTIFY_SOURCE = (int)2L; - /** - * {@snippet lang=c : - * #define _FORTIFY_SOURCE 2 - * } - */ - public static int _FORTIFY_SOURCE() { - return _FORTIFY_SOURCE; - } - private static final int __WORDSIZE = (int)64L; - /** - * {@snippet lang=c : - * #define __WORDSIZE 64 - * } - */ - public static int __WORDSIZE() { - return __WORDSIZE; - } - private static final int INT8_MAX = (int)127L; - /** - * {@snippet lang=c : - * #define INT8_MAX 127 - * } - */ - public static int INT8_MAX() { - return INT8_MAX; - } - private static final int INT16_MAX = (int)32767L; - /** - * {@snippet lang=c : - * #define INT16_MAX 32767 - * } - */ - public static int INT16_MAX() { - return INT16_MAX; - } - private static final int INT32_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define INT32_MAX 2147483647 - * } - */ - public static int INT32_MAX() { - return INT32_MAX; - } - private static final int UINT8_MAX = (int)255L; - /** - * {@snippet lang=c : - * #define UINT8_MAX 255 - * } - */ - public static int UINT8_MAX() { - return UINT8_MAX; - } - private static final int UINT16_MAX = (int)65535L; - /** - * {@snippet lang=c : - * #define UINT16_MAX 65535 - * } - */ - public static int UINT16_MAX() { - return UINT16_MAX; - } - private static final int WEBP_DECODER_ABI_VERSION = (int)521L; - /** - * {@snippet lang=c : - * #define WEBP_DECODER_ABI_VERSION 521 - * } - */ - public static int WEBP_DECODER_ABI_VERSION() { - return WEBP_DECODER_ABI_VERSION; - } - /** - * {@snippet lang=c : - * typedef long ptrdiff_t - * } - */ - public static final OfLong ptrdiff_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long size_t - * } - */ - public static final OfLong size_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef int wchar_t - * } - */ - public static final OfInt wchar_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef signed char __int8_t - * } - */ - public static final OfByte __int8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef unsigned char __uint8_t - * } - */ - public static final OfByte __uint8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef short __int16_t - * } - */ - public static final OfShort __int16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef unsigned short __uint16_t - * } - */ - public static final OfShort __uint16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int __int32_t - * } - */ - public static final OfInt __int32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __uint32_t - * } - */ - public static final OfInt __uint32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef long long __int64_t - * } - */ - public static final OfLong __int64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long long __uint64_t - * } - */ - public static final OfLong __uint64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef long __darwin_intptr_t - * } - */ - public static final OfLong __darwin_intptr_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_natural_t - * } - */ - public static final OfInt __darwin_natural_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_ct_rune_t - * } - */ - public static final OfInt __darwin_ct_rune_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef long __darwin_ptrdiff_t - * } - */ - public static final OfLong __darwin_ptrdiff_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_size_t - * } - */ - public static final OfLong __darwin_size_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __builtin_va_list __darwin_va_list - * } - */ - public static final AddressLayout __darwin_va_list = decode_h.C_POINTER; - /** - * {@snippet lang=c : - * typedef int __darwin_wchar_t - * } - */ - public static final OfInt __darwin_wchar_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __darwin_wchar_t __darwin_rune_t - * } - */ - public static final OfInt __darwin_rune_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_wint_t - * } - */ - public static final OfInt __darwin_wint_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_clock_t - * } - */ - public static final OfLong __darwin_clock_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_socklen_t - * } - */ - public static final OfInt __darwin_socklen_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef long __darwin_ssize_t - * } - */ - public static final OfLong __darwin_ssize_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef long __darwin_time_t - * } - */ - public static final OfLong __darwin_time_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef __int64_t __darwin_blkcnt_t - * } - */ - public static final OfLong __darwin_blkcnt_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_blksize_t - * } - */ - public static final OfInt __darwin_blksize_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_dev_t - * } - */ - public static final OfInt __darwin_dev_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_fsblkcnt_t - * } - */ - public static final OfInt __darwin_fsblkcnt_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned int __darwin_fsfilcnt_t - * } - */ - public static final OfInt __darwin_fsfilcnt_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_gid_t - * } - */ - public static final OfInt __darwin_gid_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_id_t - * } - */ - public static final OfInt __darwin_id_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint64_t __darwin_ino64_t - * } - */ - public static final OfLong __darwin_ino64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __darwin_ino64_t __darwin_ino_t - * } - */ - public static final OfLong __darwin_ino_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __darwin_natural_t __darwin_mach_port_name_t - * } - */ - public static final OfInt __darwin_mach_port_name_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __darwin_mach_port_name_t __darwin_mach_port_t - * } - */ - public static final OfInt __darwin_mach_port_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint16_t __darwin_mode_t - * } - */ - public static final OfShort __darwin_mode_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef __int64_t __darwin_off_t - * } - */ - public static final OfLong __darwin_off_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_pid_t - * } - */ - public static final OfInt __darwin_pid_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_sigset_t - * } - */ - public static final OfInt __darwin_sigset_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __int32_t __darwin_suseconds_t - * } - */ - public static final OfInt __darwin_suseconds_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_uid_t - * } - */ - public static final OfInt __darwin_uid_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_useconds_t - * } - */ - public static final OfInt __darwin_useconds_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long __darwin_pthread_key_t - * } - */ - public static final OfLong __darwin_pthread_key_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef struct _opaque_pthread_t { - * long __sig; - * struct __darwin_pthread_handler_rec *__cleanup_stack; - * char __opaque[8176]; - * } *__darwin_pthread_t - * } - */ - public static final AddressLayout __darwin_pthread_t = decode_h.C_POINTER; - /** - * {@snippet lang=c : - * typedef int __darwin_nl_item - * } - */ - public static final OfInt __darwin_nl_item = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef int __darwin_wctrans_t - * } - */ - public static final OfInt __darwin_wctrans_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef __uint32_t __darwin_wctype_t - * } - */ - public static final OfInt __darwin_wctype_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef signed char int8_t - * } - */ - public static final OfByte int8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef short int16_t - * } - */ - public static final OfShort int16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int int32_t - * } - */ - public static final OfInt int32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef long long int64_t - * } - */ - public static final OfLong int64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned char uint8_t - * } - */ - public static final OfByte uint8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef unsigned short uint16_t - * } - */ - public static final OfShort uint16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef unsigned int uint32_t - * } - */ - public static final OfInt uint32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long long uint64_t - * } - */ - public static final OfLong uint64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int8_t int_least8_t - * } - */ - public static final OfByte int_least8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef int16_t int_least16_t - * } - */ - public static final OfShort int_least16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int32_t int_least32_t - * } - */ - public static final OfInt int_least32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef int64_t int_least64_t - * } - */ - public static final OfLong int_least64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef uint8_t uint_least8_t - * } - */ - public static final OfByte uint_least8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef uint16_t uint_least16_t - * } - */ - public static final OfShort uint_least16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef uint32_t uint_least32_t - * } - */ - public static final OfInt uint_least32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef uint64_t uint_least64_t - * } - */ - public static final OfLong uint_least64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int8_t int_fast8_t - * } - */ - public static final OfByte int_fast8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef int16_t int_fast16_t - * } - */ - public static final OfShort int_fast16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef int32_t int_fast32_t - * } - */ - public static final OfInt int_fast32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef int64_t int_fast64_t - * } - */ - public static final OfLong int_fast64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef uint8_t uint_fast8_t - * } - */ - public static final OfByte uint_fast8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef uint16_t uint_fast16_t - * } - */ - public static final OfShort uint_fast16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef uint32_t uint_fast32_t - * } - */ - public static final OfInt uint_fast32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef uint64_t uint_fast64_t - * } - */ - public static final OfLong uint_fast64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned char u_int8_t - * } - */ - public static final OfByte u_int8_t = decode_h.C_CHAR; - /** - * {@snippet lang=c : - * typedef unsigned short u_int16_t - * } - */ - public static final OfShort u_int16_t = decode_h.C_SHORT; - /** - * {@snippet lang=c : - * typedef unsigned int u_int32_t - * } - */ - public static final OfInt u_int32_t = decode_h.C_INT; - /** - * {@snippet lang=c : - * typedef unsigned long long u_int64_t - * } - */ - public static final OfLong u_int64_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int64_t register_t - * } - */ - public static final OfLong register_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long uintptr_t - * } - */ - public static final OfLong uintptr_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef u_int64_t user_addr_t - * } - */ - public static final OfLong user_addr_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef u_int64_t user_size_t - * } - */ - public static final OfLong user_size_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int64_t user_ssize_t - * } - */ - public static final OfLong user_ssize_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int64_t user_long_t - * } - */ - public static final OfLong user_long_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef u_int64_t user_ulong_t - * } - */ - public static final OfLong user_ulong_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int64_t user_time_t - * } - */ - public static final OfLong user_time_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef int64_t user_off_t - * } - */ - public static final OfLong user_off_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef u_int64_t syscall_arg_t - * } - */ - public static final OfLong syscall_arg_t = decode_h.C_LONG_LONG; - /** - * {@snippet lang=c : - * typedef __darwin_intptr_t intptr_t - * } - */ - public static final OfLong intptr_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef long intmax_t - * } - */ - public static final OfLong intmax_t = decode_h.C_LONG; - /** - * {@snippet lang=c : - * typedef unsigned long uintmax_t - * } - */ - public static final OfLong uintmax_t = decode_h.C_LONG; - - private static class imaxabs { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_LONG, - decode_h.C_LONG - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("imaxabs"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) - * } - */ - public static FunctionDescriptor imaxabs$descriptor() { - return imaxabs.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) - * } - */ - public static MethodHandle imaxabs$handle() { - return imaxabs.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) - * } - */ - public static MemorySegment imaxabs$address() { - return imaxabs.ADDR; - } - - /** - * {@snippet lang=c : - * extern intmax_t imaxabs(intmax_t j) - * } - */ - public static long imaxabs(long j) { - var mh$ = imaxabs.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("imaxabs", j); - } - return (long)mh$.invokeExact(j); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class imaxdiv { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - imaxdiv_t.layout(), - decode_h.C_LONG, - decode_h.C_LONG - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("imaxdiv"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) - * } - */ - public static FunctionDescriptor imaxdiv$descriptor() { - return imaxdiv.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) - * } - */ - public static MethodHandle imaxdiv$handle() { - return imaxdiv.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) - * } - */ - public static MemorySegment imaxdiv$address() { - return imaxdiv.ADDR; - } - - /** - * {@snippet lang=c : - * extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) - * } - */ - public static MemorySegment imaxdiv(SegmentAllocator allocator, long __numer, long __denom) { - var mh$ = imaxdiv.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("imaxdiv", allocator, __numer, __denom); - } - return (MemorySegment)mh$.invokeExact(allocator, __numer, __denom); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class strtoimax { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("strtoimax"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static FunctionDescriptor strtoimax$descriptor() { - return strtoimax.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static MethodHandle strtoimax$handle() { - return strtoimax.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static MemorySegment strtoimax$address() { - return strtoimax.ADDR; - } - - /** - * {@snippet lang=c : - * extern intmax_t strtoimax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static long strtoimax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = strtoimax.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("strtoimax", __nptr, __endptr, __base); - } - return (long)mh$.invokeExact(__nptr, __endptr, __base); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class strtoumax { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("strtoumax"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static FunctionDescriptor strtoumax$descriptor() { - return strtoumax.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static MethodHandle strtoumax$handle() { - return strtoumax.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static MemorySegment strtoumax$address() { - return strtoumax.ADDR; - } - - /** - * {@snippet lang=c : - * extern uintmax_t strtoumax(const char *restrict __nptr, char **restrict __endptr, int __base) - * } - */ - public static long strtoumax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = strtoumax.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("strtoumax", __nptr, __endptr, __base); - } - return (long)mh$.invokeExact(__nptr, __endptr, __base); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class wcstoimax { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("wcstoimax"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static FunctionDescriptor wcstoimax$descriptor() { - return wcstoimax.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static MethodHandle wcstoimax$handle() { - return wcstoimax.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static MemorySegment wcstoimax$address() { - return wcstoimax.ADDR; - } - - /** - * {@snippet lang=c : - * extern intmax_t wcstoimax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static long wcstoimax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = wcstoimax.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("wcstoimax", __nptr, __endptr, __base); - } - return (long)mh$.invokeExact(__nptr, __endptr, __base); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class wcstoumax { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("wcstoumax"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static FunctionDescriptor wcstoumax$descriptor() { - return wcstoumax.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static MethodHandle wcstoumax$handle() { - return wcstoumax.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static MemorySegment wcstoumax$address() { - return wcstoumax.ADDR; - } - - /** - * {@snippet lang=c : - * extern uintmax_t wcstoumax(const wchar_t *restrict __nptr, wchar_t **restrict __endptr, int __base) - * } - */ - public static long wcstoumax(MemorySegment __nptr, MemorySegment __endptr, int __base) { - var mh$ = wcstoumax.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("wcstoumax", __nptr, __endptr, __base); - } - return (long)mh$.invokeExact(__nptr, __endptr, __base); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPMalloc { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_LONG - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPMalloc"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) - * } - */ - public static FunctionDescriptor WebPMalloc$descriptor() { - return WebPMalloc.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) - * } - */ - public static MethodHandle WebPMalloc$handle() { - return WebPMalloc.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) - * } - */ - public static MemorySegment WebPMalloc$address() { - return WebPMalloc.ADDR; - } - - /** - * {@snippet lang=c : - * extern void *WebPMalloc(size_t size) - * } - */ - public static MemorySegment WebPMalloc(long size) { - var mh$ = WebPMalloc.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPMalloc", size); - } - return (MemorySegment)mh$.invokeExact(size); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPFree { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPFree"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern void WebPFree(void *ptr) - * } - */ - public static FunctionDescriptor WebPFree$descriptor() { - return WebPFree.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern void WebPFree(void *ptr) - * } - */ - public static MethodHandle WebPFree$handle() { - return WebPFree.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern void WebPFree(void *ptr) - * } - */ - public static MemorySegment WebPFree$address() { - return WebPFree.ADDR; - } - - /** - * {@snippet lang=c : - * extern void WebPFree(void *ptr) - * } - */ - public static void WebPFree(MemorySegment ptr) { - var mh$ = WebPFree.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPFree", ptr); - } - mh$.invokeExact(ptr); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPGetDecoderVersion { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetDecoderVersion"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern int WebPGetDecoderVersion() - * } - */ - public static FunctionDescriptor WebPGetDecoderVersion$descriptor() { - return WebPGetDecoderVersion.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern int WebPGetDecoderVersion() - * } - */ - public static MethodHandle WebPGetDecoderVersion$handle() { - return WebPGetDecoderVersion.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern int WebPGetDecoderVersion() - * } - */ - public static MemorySegment WebPGetDecoderVersion$address() { - return WebPGetDecoderVersion.ADDR; - } - - /** - * {@snippet lang=c : - * extern int WebPGetDecoderVersion() - * } - */ - public static int WebPGetDecoderVersion() { - var mh$ = WebPGetDecoderVersion.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetDecoderVersion"); - } - return (int)mh$.invokeExact(); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPGetInfo { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetInfo"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPGetInfo$descriptor() { - return WebPGetInfo.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPGetInfo$handle() { - return WebPGetInfo.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPGetInfo$address() { - return WebPGetInfo.ADDR; - } - - /** - * {@snippet lang=c : - * extern int WebPGetInfo(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static int WebPGetInfo(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPGetInfo.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetInfo", data, data_size, width, height); - } - return (int)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeRGBA { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBA"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPDecodeRGBA$descriptor() { - return WebPDecodeRGBA.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPDecodeRGBA$handle() { - return WebPDecodeRGBA.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeRGBA$address() { - return WebPDecodeRGBA.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeRGBA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeRGBA.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBA", data, data_size, width, height); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeARGB { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeARGB"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPDecodeARGB$descriptor() { - return WebPDecodeARGB.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPDecodeARGB$handle() { - return WebPDecodeARGB.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeARGB$address() { - return WebPDecodeARGB.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeARGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeARGB.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeARGB", data, data_size, width, height); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeBGRA { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRA"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPDecodeBGRA$descriptor() { - return WebPDecodeBGRA.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPDecodeBGRA$handle() { - return WebPDecodeBGRA.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeBGRA$address() { - return WebPDecodeBGRA.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRA(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeBGRA(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeBGRA.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRA", data, data_size, width, height); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeRGB { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGB"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPDecodeRGB$descriptor() { - return WebPDecodeRGB.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPDecodeRGB$handle() { - return WebPDecodeRGB.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeRGB$address() { - return WebPDecodeRGB.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGB(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeRGB(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeRGB.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGB", data, data_size, width, height); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeBGR { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGR"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPDecodeBGR$descriptor() { - return WebPDecodeBGR.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MethodHandle WebPDecodeBGR$handle() { - return WebPDecodeBGR.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeBGR$address() { - return WebPDecodeBGR.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGR(const uint8_t *data, size_t data_size, int *width, int *height) - * } - */ - public static MemorySegment WebPDecodeBGR(MemorySegment data, long data_size, MemorySegment width, MemorySegment height) { - var mh$ = WebPDecodeBGR.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGR", data, data_size, width, height); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeYUV { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeYUV"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) - * } - */ - public static FunctionDescriptor WebPDecodeYUV$descriptor() { - return WebPDecodeYUV.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) - * } - */ - public static MethodHandle WebPDecodeYUV$handle() { - return WebPDecodeYUV.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) - * } - */ - public static MemorySegment WebPDecodeYUV$address() { - return WebPDecodeYUV.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUV(const uint8_t *data, size_t data_size, int *width, int *height, uint8_t **u, uint8_t **v, int *stride, int *uv_stride) - * } - */ - public static MemorySegment WebPDecodeYUV(MemorySegment data, long data_size, MemorySegment width, MemorySegment height, MemorySegment u, MemorySegment v, MemorySegment stride, MemorySegment uv_stride) { - var mh$ = WebPDecodeYUV.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeYUV", data, data_size, width, height, u, v, stride, uv_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, width, height, u, v, stride, uv_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeRGBAInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBAInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPDecodeRGBAInto$descriptor() { - return WebPDecodeRGBAInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPDecodeRGBAInto$handle() { - return WebPDecodeRGBAInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeRGBAInto$address() { - return WebPDecodeRGBAInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeRGBAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeRGBAInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBAInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeARGBInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeARGBInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPDecodeARGBInto$descriptor() { - return WebPDecodeARGBInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPDecodeARGBInto$handle() { - return WebPDecodeARGBInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeARGBInto$address() { - return WebPDecodeARGBInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeARGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeARGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeARGBInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeARGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeBGRAInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRAInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPDecodeBGRAInto$descriptor() { - return WebPDecodeBGRAInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPDecodeBGRAInto$handle() { - return WebPDecodeBGRAInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeBGRAInto$address() { - return WebPDecodeBGRAInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRAInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeBGRAInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeBGRAInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRAInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeRGBInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeRGBInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPDecodeRGBInto$descriptor() { - return WebPDecodeRGBInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPDecodeRGBInto$handle() { - return WebPDecodeRGBInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeRGBInto$address() { - return WebPDecodeRGBInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeRGBInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeRGBInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeRGBInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeRGBInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeBGRInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeBGRInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPDecodeBGRInto$descriptor() { - return WebPDecodeBGRInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPDecodeBGRInto$handle() { - return WebPDecodeBGRInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeBGRInto$address() { - return WebPDecodeBGRInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeBGRInto(const uint8_t *data, size_t data_size, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPDecodeBGRInto(MemorySegment data, long data_size, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPDecodeBGRInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeBGRInto", data, data_size, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecodeYUVInto { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecodeYUVInto"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static FunctionDescriptor WebPDecodeYUVInto$descriptor() { - return WebPDecodeYUVInto.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MethodHandle WebPDecodeYUVInto$handle() { - return WebPDecodeYUVInto.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MemorySegment WebPDecodeYUVInto$address() { - return WebPDecodeYUVInto.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPDecodeYUVInto(const uint8_t *data, size_t data_size, uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MemorySegment WebPDecodeYUVInto(MemorySegment data, long data_size, MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { - var mh$ = WebPDecodeYUVInto.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecodeYUVInto", data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); - } - return (MemorySegment)mh$.invokeExact(data, data_size, luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - private static final int MODE_RGB = (int)0L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGB = 0 - * } - */ - public static int MODE_RGB() { - return MODE_RGB; - } - private static final int MODE_RGBA = (int)1L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGBA = 1 - * } - */ - public static int MODE_RGBA() { - return MODE_RGBA; - } - private static final int MODE_BGR = (int)2L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_BGR = 2 - * } - */ - public static int MODE_BGR() { - return MODE_BGR; - } - private static final int MODE_BGRA = (int)3L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_BGRA = 3 - * } - */ - public static int MODE_BGRA() { - return MODE_BGRA; - } - private static final int MODE_ARGB = (int)4L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_ARGB = 4 - * } - */ - public static int MODE_ARGB() { - return MODE_ARGB; - } - private static final int MODE_RGBA_4444 = (int)5L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGBA_4444 = 5 - * } - */ - public static int MODE_RGBA_4444() { - return MODE_RGBA_4444; - } - private static final int MODE_RGB_565 = (int)6L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_RGB_565 = 6 - * } - */ - public static int MODE_RGB_565() { - return MODE_RGB_565; - } - private static final int MODE_rgbA = (int)7L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_rgbA = 7 - * } - */ - public static int MODE_rgbA() { - return MODE_rgbA; - } - private static final int MODE_bgrA = (int)8L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_bgrA = 8 - * } - */ - public static int MODE_bgrA() { - return MODE_bgrA; - } - private static final int MODE_Argb = (int)9L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_Argb = 9 - * } - */ - public static int MODE_Argb() { - return MODE_Argb; - } - private static final int MODE_rgbA_4444 = (int)10L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_rgbA_4444 = 10 - * } - */ - public static int MODE_rgbA_4444() { - return MODE_rgbA_4444; - } - private static final int MODE_YUV = (int)11L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_YUV = 11 - * } - */ - public static int MODE_YUV() { - return MODE_YUV; - } - private static final int MODE_YUVA = (int)12L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_YUVA = 12 - * } - */ - public static int MODE_YUVA() { - return MODE_YUVA; - } - private static final int MODE_LAST = (int)13L; - /** - * {@snippet lang=c : - * enum WEBP_CSP_MODE.MODE_LAST = 13 - * } - */ - public static int MODE_LAST() { - return MODE_LAST; - } - - private static class WebPInitDecBufferInternal { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPInitDecBufferInternal"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) - * } - */ - public static FunctionDescriptor WebPInitDecBufferInternal$descriptor() { - return WebPInitDecBufferInternal.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) - * } - */ - public static MethodHandle WebPInitDecBufferInternal$handle() { - return WebPInitDecBufferInternal.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) - * } - */ - public static MemorySegment WebPInitDecBufferInternal$address() { - return WebPInitDecBufferInternal.ADDR; - } - - /** - * {@snippet lang=c : - * extern int WebPInitDecBufferInternal(WebPDecBuffer *, int) - * } - */ - public static int WebPInitDecBufferInternal(MemorySegment x0, int x1) { - var mh$ = WebPInitDecBufferInternal.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPInitDecBufferInternal", x0, x1); - } - return (int)mh$.invokeExact(x0, x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPFreeDecBuffer { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPFreeDecBuffer"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) - * } - */ - public static FunctionDescriptor WebPFreeDecBuffer$descriptor() { - return WebPFreeDecBuffer.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) - * } - */ - public static MethodHandle WebPFreeDecBuffer$handle() { - return WebPFreeDecBuffer.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) - * } - */ - public static MemorySegment WebPFreeDecBuffer$address() { - return WebPFreeDecBuffer.ADDR; - } - - /** - * {@snippet lang=c : - * extern void WebPFreeDecBuffer(WebPDecBuffer *buffer) - * } - */ - public static void WebPFreeDecBuffer(MemorySegment buffer) { - var mh$ = WebPFreeDecBuffer.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPFreeDecBuffer", buffer); - } - mh$.invokeExact(buffer); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - private static final int VP8_STATUS_OK = (int)0L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_OK = 0 - * } - */ - public static int VP8_STATUS_OK() { - return VP8_STATUS_OK; - } - private static final int VP8_STATUS_OUT_OF_MEMORY = (int)1L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_OUT_OF_MEMORY = 1 - * } - */ - public static int VP8_STATUS_OUT_OF_MEMORY() { - return VP8_STATUS_OUT_OF_MEMORY; - } - private static final int VP8_STATUS_INVALID_PARAM = (int)2L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_INVALID_PARAM = 2 - * } - */ - public static int VP8_STATUS_INVALID_PARAM() { - return VP8_STATUS_INVALID_PARAM; - } - private static final int VP8_STATUS_BITSTREAM_ERROR = (int)3L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_BITSTREAM_ERROR = 3 - * } - */ - public static int VP8_STATUS_BITSTREAM_ERROR() { - return VP8_STATUS_BITSTREAM_ERROR; - } - private static final int VP8_STATUS_UNSUPPORTED_FEATURE = (int)4L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_UNSUPPORTED_FEATURE = 4 - * } - */ - public static int VP8_STATUS_UNSUPPORTED_FEATURE() { - return VP8_STATUS_UNSUPPORTED_FEATURE; - } - private static final int VP8_STATUS_SUSPENDED = (int)5L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_SUSPENDED = 5 - * } - */ - public static int VP8_STATUS_SUSPENDED() { - return VP8_STATUS_SUSPENDED; - } - private static final int VP8_STATUS_USER_ABORT = (int)6L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_USER_ABORT = 6 - * } - */ - public static int VP8_STATUS_USER_ABORT() { - return VP8_STATUS_USER_ABORT; - } - private static final int VP8_STATUS_NOT_ENOUGH_DATA = (int)7L; - /** - * {@snippet lang=c : - * enum VP8StatusCode.VP8_STATUS_NOT_ENOUGH_DATA = 7 - * } - */ - public static int VP8_STATUS_NOT_ENOUGH_DATA() { - return VP8_STATUS_NOT_ENOUGH_DATA; - } - - private static class WebPINewDecoder { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewDecoder"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) - * } - */ - public static FunctionDescriptor WebPINewDecoder$descriptor() { - return WebPINewDecoder.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) - * } - */ - public static MethodHandle WebPINewDecoder$handle() { - return WebPINewDecoder.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) - * } - */ - public static MemorySegment WebPINewDecoder$address() { - return WebPINewDecoder.ADDR; - } - - /** - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewDecoder(WebPDecBuffer *output_buffer) - * } - */ - public static MemorySegment WebPINewDecoder(MemorySegment output_buffer) { - var mh$ = WebPINewDecoder.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewDecoder", output_buffer); - } - return (MemorySegment)mh$.invokeExact(output_buffer); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPINewRGB { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewRGB"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static FunctionDescriptor WebPINewRGB$descriptor() { - return WebPINewRGB.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MethodHandle WebPINewRGB$handle() { - return WebPINewRGB.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPINewRGB$address() { - return WebPINewRGB.ADDR; - } - - /** - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewRGB(WEBP_CSP_MODE csp, uint8_t *output_buffer, size_t output_buffer_size, int output_stride) - * } - */ - public static MemorySegment WebPINewRGB(int csp, MemorySegment output_buffer, long output_buffer_size, int output_stride) { - var mh$ = WebPINewRGB.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewRGB", csp, output_buffer, output_buffer_size, output_stride); - } - return (MemorySegment)mh$.invokeExact(csp, output_buffer, output_buffer_size, output_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPINewYUVA { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewYUVA"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) - * } - */ - public static FunctionDescriptor WebPINewYUVA$descriptor() { - return WebPINewYUVA.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) - * } - */ - public static MethodHandle WebPINewYUVA$handle() { - return WebPINewYUVA.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) - * } - */ - public static MemorySegment WebPINewYUVA$address() { - return WebPINewYUVA.ADDR; - } - - /** - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUVA(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride, uint8_t *a, size_t a_size, int a_stride) - * } - */ - public static MemorySegment WebPINewYUVA(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride, MemorySegment a, long a_size, int a_stride) { - var mh$ = WebPINewYUVA.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewYUVA", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); - } - return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride, a, a_size, a_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPINewYUV { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPINewYUV"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static FunctionDescriptor WebPINewYUV$descriptor() { - return WebPINewYUV.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MethodHandle WebPINewYUV$handle() { - return WebPINewYUV.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MemorySegment WebPINewYUV$address() { - return WebPINewYUV.ADDR; - } - - /** - * {@snippet lang=c : - * extern WebPIDecoder *WebPINewYUV(uint8_t *luma, size_t luma_size, int luma_stride, uint8_t *u, size_t u_size, int u_stride, uint8_t *v, size_t v_size, int v_stride) - * } - */ - public static MemorySegment WebPINewYUV(MemorySegment luma, long luma_size, int luma_stride, MemorySegment u, long u_size, int u_stride, MemorySegment v, long v_size, int v_stride) { - var mh$ = WebPINewYUV.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPINewYUV", luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); - } - return (MemorySegment)mh$.invokeExact(luma, luma_size, luma_stride, u, u_size, u_stride, v, v_size, v_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIDelete { - public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid( - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDelete"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) - * } - */ - public static FunctionDescriptor WebPIDelete$descriptor() { - return WebPIDelete.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) - * } - */ - public static MethodHandle WebPIDelete$handle() { - return WebPIDelete.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) - * } - */ - public static MemorySegment WebPIDelete$address() { - return WebPIDelete.ADDR; - } - - /** - * {@snippet lang=c : - * extern void WebPIDelete(WebPIDecoder *idec) - * } - */ - public static void WebPIDelete(MemorySegment idec) { - var mh$ = WebPIDelete.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDelete", idec); - } - mh$.invokeExact(idec); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIAppend { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIAppend"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static FunctionDescriptor WebPIAppend$descriptor() { - return WebPIAppend.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static MethodHandle WebPIAppend$handle() { - return WebPIAppend.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static MemorySegment WebPIAppend$address() { - return WebPIAppend.ADDR; - } - - /** - * {@snippet lang=c : - * extern VP8StatusCode WebPIAppend(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static int WebPIAppend(MemorySegment idec, MemorySegment data, long data_size) { - var mh$ = WebPIAppend.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIAppend", idec, data, data_size); - } - return (int)mh$.invokeExact(idec, data, data_size); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIUpdate { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIUpdate"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static FunctionDescriptor WebPIUpdate$descriptor() { - return WebPIUpdate.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static MethodHandle WebPIUpdate$handle() { - return WebPIUpdate.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static MemorySegment WebPIUpdate$address() { - return WebPIUpdate.ADDR; - } - - /** - * {@snippet lang=c : - * extern VP8StatusCode WebPIUpdate(WebPIDecoder *idec, const uint8_t *data, size_t data_size) - * } - */ - public static int WebPIUpdate(MemorySegment idec, MemorySegment data, long data_size) { - var mh$ = WebPIUpdate.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIUpdate", idec, data, data_size); - } - return (int)mh$.invokeExact(idec, data, data_size); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIDecGetRGB { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecGetRGB"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) - * } - */ - public static FunctionDescriptor WebPIDecGetRGB$descriptor() { - return WebPIDecGetRGB.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) - * } - */ - public static MethodHandle WebPIDecGetRGB$handle() { - return WebPIDecGetRGB.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) - * } - */ - public static MemorySegment WebPIDecGetRGB$address() { - return WebPIDecGetRGB.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetRGB(const WebPIDecoder *idec, int *last_y, int *width, int *height, int *stride) - * } - */ - public static MemorySegment WebPIDecGetRGB(MemorySegment idec, MemorySegment last_y, MemorySegment width, MemorySegment height, MemorySegment stride) { - var mh$ = WebPIDecGetRGB.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecGetRGB", idec, last_y, width, height, stride); - } - return (MemorySegment)mh$.invokeExact(idec, last_y, width, height, stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIDecGetYUVA { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecGetYUVA"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) - * } - */ - public static FunctionDescriptor WebPIDecGetYUVA$descriptor() { - return WebPIDecGetYUVA.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) - * } - */ - public static MethodHandle WebPIDecGetYUVA$handle() { - return WebPIDecGetYUVA.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) - * } - */ - public static MemorySegment WebPIDecGetYUVA$address() { - return WebPIDecGetYUVA.ADDR; - } - - /** - * {@snippet lang=c : - * extern uint8_t *WebPIDecGetYUVA(const WebPIDecoder *idec, int *last_y, uint8_t **u, uint8_t **v, uint8_t **a, int *width, int *height, int *stride, int *uv_stride, int *a_stride) - * } - */ - public static MemorySegment WebPIDecGetYUVA(MemorySegment idec, MemorySegment last_y, MemorySegment u, MemorySegment v, MemorySegment a, MemorySegment width, MemorySegment height, MemorySegment stride, MemorySegment uv_stride, MemorySegment a_stride) { - var mh$ = WebPIDecGetYUVA.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecGetYUVA", idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); - } - return (MemorySegment)mh$.invokeExact(idec, last_y, u, v, a, width, height, stride, uv_stride, a_stride); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIDecodedArea { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecodedArea"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) - * } - */ - public static FunctionDescriptor WebPIDecodedArea$descriptor() { - return WebPIDecodedArea.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) - * } - */ - public static MethodHandle WebPIDecodedArea$handle() { - return WebPIDecodedArea.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) - * } - */ - public static MemorySegment WebPIDecodedArea$address() { - return WebPIDecodedArea.ADDR; - } - - /** - * {@snippet lang=c : - * extern const WebPDecBuffer *WebPIDecodedArea(const WebPIDecoder *idec, int *left, int *top, int *width, int *height) - * } - */ - public static MemorySegment WebPIDecodedArea(MemorySegment idec, MemorySegment left, MemorySegment top, MemorySegment width, MemorySegment height) { - var mh$ = WebPIDecodedArea.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecodedArea", idec, left, top, width, height); - } - return (MemorySegment)mh$.invokeExact(idec, left, top, width, height); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPGetFeaturesInternal { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPGetFeaturesInternal"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) - * } - */ - public static FunctionDescriptor WebPGetFeaturesInternal$descriptor() { - return WebPGetFeaturesInternal.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) - * } - */ - public static MethodHandle WebPGetFeaturesInternal$handle() { - return WebPGetFeaturesInternal.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) - * } - */ - public static MemorySegment WebPGetFeaturesInternal$address() { - return WebPGetFeaturesInternal.ADDR; - } - - /** - * {@snippet lang=c : - * extern VP8StatusCode WebPGetFeaturesInternal(const uint8_t *, size_t, WebPBitstreamFeatures *, int) - * } - */ - public static int WebPGetFeaturesInternal(MemorySegment x0, long x1, MemorySegment x2, int x3) { - var mh$ = WebPGetFeaturesInternal.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPGetFeaturesInternal", x0, x1, x2, x3); - } - return (int)mh$.invokeExact(x0, x1, x2, x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPInitDecoderConfigInternal { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_INT - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPInitDecoderConfigInternal"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) - * } - */ - public static FunctionDescriptor WebPInitDecoderConfigInternal$descriptor() { - return WebPInitDecoderConfigInternal.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) - * } - */ - public static MethodHandle WebPInitDecoderConfigInternal$handle() { - return WebPInitDecoderConfigInternal.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) - * } - */ - public static MemorySegment WebPInitDecoderConfigInternal$address() { - return WebPInitDecoderConfigInternal.ADDR; - } - - /** - * {@snippet lang=c : - * extern int WebPInitDecoderConfigInternal(WebPDecoderConfig *, int) - * } - */ - public static int WebPInitDecoderConfigInternal(MemorySegment x0, int x1) { - var mh$ = WebPInitDecoderConfigInternal.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPInitDecoderConfigInternal", x0, x1); - } - return (int)mh$.invokeExact(x0, x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPIDecode { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_POINTER, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPIDecode"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static FunctionDescriptor WebPIDecode$descriptor() { - return WebPIDecode.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static MethodHandle WebPIDecode$handle() { - return WebPIDecode.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static MemorySegment WebPIDecode$address() { - return WebPIDecode.ADDR; - } - - /** - * {@snippet lang=c : - * extern WebPIDecoder *WebPIDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static MemorySegment WebPIDecode(MemorySegment data, long data_size, MemorySegment config) { - var mh$ = WebPIDecode.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPIDecode", data, data_size, config); - } - return (MemorySegment)mh$.invokeExact(data, data_size, config); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - - private static class WebPDecode { - public static final FunctionDescriptor DESC = FunctionDescriptor.of( - decode_h.C_INT, - decode_h.C_POINTER, - decode_h.C_LONG, - decode_h.C_POINTER - ); - - public static final MemorySegment ADDR = decode_h.findOrThrow("WebPDecode"); - - public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC); - } - - /** - * Function descriptor for: - * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static FunctionDescriptor WebPDecode$descriptor() { - return WebPDecode.DESC; - } - - /** - * Downcall method handle for: - * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static MethodHandle WebPDecode$handle() { - return WebPDecode.HANDLE; - } - - /** - * Address for: - * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static MemorySegment WebPDecode$address() { - return WebPDecode.ADDR; - } - - /** - * {@snippet lang=c : - * extern VP8StatusCode WebPDecode(const uint8_t *data, size_t data_size, WebPDecoderConfig *config) - * } - */ - public static int WebPDecode(MemorySegment data, long data_size, MemorySegment config) { - var mh$ = WebPDecode.HANDLE; - try { - if (TRACE_DOWNCALLS) { - traceDowncall("WebPDecode", data, data_size, config); - } - return (int)mh$.invokeExact(data, data_size, config); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - private static final MemorySegment NULL = MemorySegment.ofAddress(0L); - /** - * {@snippet lang=c : - * #define NULL (void*) 0 - * } - */ - public static MemorySegment NULL() { - return NULL; - } - /** - * {@snippet lang=c : - * #define __PRI_8_LENGTH_MODIFIER__ "hh" - * } - */ - public static MemorySegment __PRI_8_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_8_LENGTH_MODIFIER__ - = decode_h.LIBRARY_ARENA.allocateFrom("hh"); - } - return Holder.__PRI_8_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __PRI_64_LENGTH_MODIFIER__ "ll" - * } - */ - public static MemorySegment __PRI_64_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_64_LENGTH_MODIFIER__ - = decode_h.LIBRARY_ARENA.allocateFrom("ll"); - } - return Holder.__PRI_64_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __SCN_64_LENGTH_MODIFIER__ "ll" - * } - */ - public static MemorySegment __SCN_64_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __SCN_64_LENGTH_MODIFIER__ - = decode_h.LIBRARY_ARENA.allocateFrom("ll"); - } - return Holder.__SCN_64_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __PRI_MAX_LENGTH_MODIFIER__ "j" - * } - */ - public static MemorySegment __PRI_MAX_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __PRI_MAX_LENGTH_MODIFIER__ - = decode_h.LIBRARY_ARENA.allocateFrom("j"); - } - return Holder.__PRI_MAX_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define __SCN_MAX_LENGTH_MODIFIER__ "j" - * } - */ - public static MemorySegment __SCN_MAX_LENGTH_MODIFIER__() { - class Holder { - static final MemorySegment __SCN_MAX_LENGTH_MODIFIER__ - = decode_h.LIBRARY_ARENA.allocateFrom("j"); - } - return Holder.__SCN_MAX_LENGTH_MODIFIER__; - } - /** - * {@snippet lang=c : - * #define PRId8 "hhd" - * } - */ - public static MemorySegment PRId8() { - class Holder { - static final MemorySegment PRId8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRId8; - } - /** - * {@snippet lang=c : - * #define PRIi8 "hhi" - * } - */ - public static MemorySegment PRIi8() { - class Holder { - static final MemorySegment PRIi8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.PRIi8; - } - /** - * {@snippet lang=c : - * #define PRIo8 "hho" - * } - */ - public static MemorySegment PRIo8() { - class Holder { - static final MemorySegment PRIo8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.PRIo8; - } - /** - * {@snippet lang=c : - * #define PRIu8 "hhu" - * } - */ - public static MemorySegment PRIu8() { - class Holder { - static final MemorySegment PRIu8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIu8; - } - /** - * {@snippet lang=c : - * #define PRIx8 "hhx" - * } - */ - public static MemorySegment PRIx8() { - class Holder { - static final MemorySegment PRIx8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIx8; - } - /** - * {@snippet lang=c : - * #define PRIX8 "hhX" - * } - */ - public static MemorySegment PRIX8() { - class Holder { - static final MemorySegment PRIX8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIX8; - } - /** - * {@snippet lang=c : - * #define PRId16 "hd" - * } - */ - public static MemorySegment PRId16() { - class Holder { - static final MemorySegment PRId16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.PRId16; - } - /** - * {@snippet lang=c : - * #define PRIi16 "hi" - * } - */ - public static MemorySegment PRIi16() { - class Holder { - static final MemorySegment PRIi16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIi16; - } - /** - * {@snippet lang=c : - * #define PRIo16 "ho" - * } - */ - public static MemorySegment PRIo16() { - class Holder { - static final MemorySegment PRIo16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIo16; - } - /** - * {@snippet lang=c : - * #define PRIu16 "hu" - * } - */ - public static MemorySegment PRIu16() { - class Holder { - static final MemorySegment PRIu16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIu16; - } - /** - * {@snippet lang=c : - * #define PRIx16 "hx" - * } - */ - public static MemorySegment PRIx16() { - class Holder { - static final MemorySegment PRIx16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.PRIx16; - } - /** - * {@snippet lang=c : - * #define PRIX16 "hX" - * } - */ - public static MemorySegment PRIX16() { - class Holder { - static final MemorySegment PRIX16 - = decode_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIX16; - } - /** - * {@snippet lang=c : - * #define PRId32 "d" - * } - */ - public static MemorySegment PRId32() { - class Holder { - static final MemorySegment PRId32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRId32; - } - /** - * {@snippet lang=c : - * #define PRIi32 "i" - * } - */ - public static MemorySegment PRIi32() { - class Holder { - static final MemorySegment PRIi32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIi32; - } - /** - * {@snippet lang=c : - * #define PRIo32 "o" - * } - */ - public static MemorySegment PRIo32() { - class Holder { - static final MemorySegment PRIo32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.PRIo32; - } - /** - * {@snippet lang=c : - * #define PRIu32 "u" - * } - */ - public static MemorySegment PRIu32() { - class Holder { - static final MemorySegment PRIu32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIu32; - } - /** - * {@snippet lang=c : - * #define PRIx32 "x" - * } - */ - public static MemorySegment PRIx32() { - class Holder { - static final MemorySegment PRIx32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIx32; - } - /** - * {@snippet lang=c : - * #define PRIX32 "X" - * } - */ - public static MemorySegment PRIX32() { - class Holder { - static final MemorySegment PRIX32 - = decode_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIX32; - } - /** - * {@snippet lang=c : - * #define PRId64 "lld" - * } - */ - public static MemorySegment PRId64() { - class Holder { - static final MemorySegment PRId64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.PRId64; - } - /** - * {@snippet lang=c : - * #define PRIi64 "lli" - * } - */ - public static MemorySegment PRIi64() { - class Holder { - static final MemorySegment PRIi64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIi64; - } - /** - * {@snippet lang=c : - * #define PRIo64 "llo" - * } - */ - public static MemorySegment PRIo64() { - class Holder { - static final MemorySegment PRIo64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIo64; - } - /** - * {@snippet lang=c : - * #define PRIu64 "llu" - * } - */ - public static MemorySegment PRIu64() { - class Holder { - static final MemorySegment PRIu64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIu64; - } - /** - * {@snippet lang=c : - * #define PRIx64 "llx" - * } - */ - public static MemorySegment PRIx64() { - class Holder { - static final MemorySegment PRIx64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.PRIx64; - } - /** - * {@snippet lang=c : - * #define PRIX64 "llX" - * } - */ - public static MemorySegment PRIX64() { - class Holder { - static final MemorySegment PRIX64 - = decode_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIX64; - } - /** - * {@snippet lang=c : - * #define PRIdLEAST8 "hhd" - * } - */ - public static MemorySegment PRIdLEAST8() { - class Holder { - static final MemorySegment PRIdLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRIdLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIiLEAST8 "hhi" - * } - */ - public static MemorySegment PRIiLEAST8() { - class Holder { - static final MemorySegment PRIiLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.PRIiLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIoLEAST8 "hho" - * } - */ - public static MemorySegment PRIoLEAST8() { - class Holder { - static final MemorySegment PRIoLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.PRIoLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIuLEAST8 "hhu" - * } - */ - public static MemorySegment PRIuLEAST8() { - class Holder { - static final MemorySegment PRIuLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIuLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIxLEAST8 "hhx" - * } - */ - public static MemorySegment PRIxLEAST8() { - class Holder { - static final MemorySegment PRIxLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIxLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIXLEAST8 "hhX" - * } - */ - public static MemorySegment PRIXLEAST8() { - class Holder { - static final MemorySegment PRIXLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIXLEAST8; - } - /** - * {@snippet lang=c : - * #define PRIdLEAST16 "hd" - * } - */ - public static MemorySegment PRIdLEAST16() { - class Holder { - static final MemorySegment PRIdLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.PRIdLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIiLEAST16 "hi" - * } - */ - public static MemorySegment PRIiLEAST16() { - class Holder { - static final MemorySegment PRIiLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIiLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIoLEAST16 "ho" - * } - */ - public static MemorySegment PRIoLEAST16() { - class Holder { - static final MemorySegment PRIoLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIoLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIuLEAST16 "hu" - * } - */ - public static MemorySegment PRIuLEAST16() { - class Holder { - static final MemorySegment PRIuLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIuLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIxLEAST16 "hx" - * } - */ - public static MemorySegment PRIxLEAST16() { - class Holder { - static final MemorySegment PRIxLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.PRIxLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIXLEAST16 "hX" - * } - */ - public static MemorySegment PRIXLEAST16() { - class Holder { - static final MemorySegment PRIXLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIXLEAST16; - } - /** - * {@snippet lang=c : - * #define PRIdLEAST32 "d" - * } - */ - public static MemorySegment PRIdLEAST32() { - class Holder { - static final MemorySegment PRIdLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRIdLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIiLEAST32 "i" - * } - */ - public static MemorySegment PRIiLEAST32() { - class Holder { - static final MemorySegment PRIiLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIiLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIoLEAST32 "o" - * } - */ - public static MemorySegment PRIoLEAST32() { - class Holder { - static final MemorySegment PRIoLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.PRIoLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIuLEAST32 "u" - * } - */ - public static MemorySegment PRIuLEAST32() { - class Holder { - static final MemorySegment PRIuLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIuLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIxLEAST32 "x" - * } - */ - public static MemorySegment PRIxLEAST32() { - class Holder { - static final MemorySegment PRIxLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIxLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIXLEAST32 "X" - * } - */ - public static MemorySegment PRIXLEAST32() { - class Holder { - static final MemorySegment PRIXLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIXLEAST32; - } - /** - * {@snippet lang=c : - * #define PRIdLEAST64 "lld" - * } - */ - public static MemorySegment PRIdLEAST64() { - class Holder { - static final MemorySegment PRIdLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.PRIdLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIiLEAST64 "lli" - * } - */ - public static MemorySegment PRIiLEAST64() { - class Holder { - static final MemorySegment PRIiLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIiLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIoLEAST64 "llo" - * } - */ - public static MemorySegment PRIoLEAST64() { - class Holder { - static final MemorySegment PRIoLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIoLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIuLEAST64 "llu" - * } - */ - public static MemorySegment PRIuLEAST64() { - class Holder { - static final MemorySegment PRIuLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIuLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIxLEAST64 "llx" - * } - */ - public static MemorySegment PRIxLEAST64() { - class Holder { - static final MemorySegment PRIxLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.PRIxLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIXLEAST64 "llX" - * } - */ - public static MemorySegment PRIXLEAST64() { - class Holder { - static final MemorySegment PRIXLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIXLEAST64; - } - /** - * {@snippet lang=c : - * #define PRIdFAST8 "hhd" - * } - */ - public static MemorySegment PRIdFAST8() { - class Holder { - static final MemorySegment PRIdFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.PRIdFAST8; - } - /** - * {@snippet lang=c : - * #define PRIiFAST8 "hhi" - * } - */ - public static MemorySegment PRIiFAST8() { - class Holder { - static final MemorySegment PRIiFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.PRIiFAST8; - } - /** - * {@snippet lang=c : - * #define PRIoFAST8 "hho" - * } - */ - public static MemorySegment PRIoFAST8() { - class Holder { - static final MemorySegment PRIoFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.PRIoFAST8; - } - /** - * {@snippet lang=c : - * #define PRIuFAST8 "hhu" - * } - */ - public static MemorySegment PRIuFAST8() { - class Holder { - static final MemorySegment PRIuFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.PRIuFAST8; - } - /** - * {@snippet lang=c : - * #define PRIxFAST8 "hhx" - * } - */ - public static MemorySegment PRIxFAST8() { - class Holder { - static final MemorySegment PRIxFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.PRIxFAST8; - } - /** - * {@snippet lang=c : - * #define PRIXFAST8 "hhX" - * } - */ - public static MemorySegment PRIXFAST8() { - class Holder { - static final MemorySegment PRIXFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhX"); - } - return Holder.PRIXFAST8; - } - /** - * {@snippet lang=c : - * #define PRIdFAST16 "hd" - * } - */ - public static MemorySegment PRIdFAST16() { - class Holder { - static final MemorySegment PRIdFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.PRIdFAST16; - } - /** - * {@snippet lang=c : - * #define PRIiFAST16 "hi" - * } - */ - public static MemorySegment PRIiFAST16() { - class Holder { - static final MemorySegment PRIiFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.PRIiFAST16; - } - /** - * {@snippet lang=c : - * #define PRIoFAST16 "ho" - * } - */ - public static MemorySegment PRIoFAST16() { - class Holder { - static final MemorySegment PRIoFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.PRIoFAST16; - } - /** - * {@snippet lang=c : - * #define PRIuFAST16 "hu" - * } - */ - public static MemorySegment PRIuFAST16() { - class Holder { - static final MemorySegment PRIuFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.PRIuFAST16; - } - /** - * {@snippet lang=c : - * #define PRIxFAST16 "hx" - * } - */ - public static MemorySegment PRIxFAST16() { - class Holder { - static final MemorySegment PRIxFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.PRIxFAST16; - } - /** - * {@snippet lang=c : - * #define PRIXFAST16 "hX" - * } - */ - public static MemorySegment PRIXFAST16() { - class Holder { - static final MemorySegment PRIXFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hX"); - } - return Holder.PRIXFAST16; - } - /** - * {@snippet lang=c : - * #define PRIdFAST32 "d" - * } - */ - public static MemorySegment PRIdFAST32() { - class Holder { - static final MemorySegment PRIdFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.PRIdFAST32; - } - /** - * {@snippet lang=c : - * #define PRIiFAST32 "i" - * } - */ - public static MemorySegment PRIiFAST32() { - class Holder { - static final MemorySegment PRIiFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.PRIiFAST32; - } - /** - * {@snippet lang=c : - * #define PRIoFAST32 "o" - * } - */ - public static MemorySegment PRIoFAST32() { - class Holder { - static final MemorySegment PRIoFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.PRIoFAST32; - } - /** - * {@snippet lang=c : - * #define PRIuFAST32 "u" - * } - */ - public static MemorySegment PRIuFAST32() { - class Holder { - static final MemorySegment PRIuFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.PRIuFAST32; - } - /** - * {@snippet lang=c : - * #define PRIxFAST32 "x" - * } - */ - public static MemorySegment PRIxFAST32() { - class Holder { - static final MemorySegment PRIxFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.PRIxFAST32; - } - /** - * {@snippet lang=c : - * #define PRIXFAST32 "X" - * } - */ - public static MemorySegment PRIXFAST32() { - class Holder { - static final MemorySegment PRIXFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("X"); - } - return Holder.PRIXFAST32; - } - /** - * {@snippet lang=c : - * #define PRIdFAST64 "lld" - * } - */ - public static MemorySegment PRIdFAST64() { - class Holder { - static final MemorySegment PRIdFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.PRIdFAST64; - } - /** - * {@snippet lang=c : - * #define PRIiFAST64 "lli" - * } - */ - public static MemorySegment PRIiFAST64() { - class Holder { - static final MemorySegment PRIiFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.PRIiFAST64; - } - /** - * {@snippet lang=c : - * #define PRIoFAST64 "llo" - * } - */ - public static MemorySegment PRIoFAST64() { - class Holder { - static final MemorySegment PRIoFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.PRIoFAST64; - } - /** - * {@snippet lang=c : - * #define PRIuFAST64 "llu" - * } - */ - public static MemorySegment PRIuFAST64() { - class Holder { - static final MemorySegment PRIuFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.PRIuFAST64; - } - /** - * {@snippet lang=c : - * #define PRIxFAST64 "llx" - * } - */ - public static MemorySegment PRIxFAST64() { - class Holder { - static final MemorySegment PRIxFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.PRIxFAST64; - } - /** - * {@snippet lang=c : - * #define PRIXFAST64 "llX" - * } - */ - public static MemorySegment PRIXFAST64() { - class Holder { - static final MemorySegment PRIXFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llX"); - } - return Holder.PRIXFAST64; - } - /** - * {@snippet lang=c : - * #define PRIdPTR "ld" - * } - */ - public static MemorySegment PRIdPTR() { - class Holder { - static final MemorySegment PRIdPTR - = decode_h.LIBRARY_ARENA.allocateFrom("ld"); - } - return Holder.PRIdPTR; - } - /** - * {@snippet lang=c : - * #define PRIiPTR "li" - * } - */ - public static MemorySegment PRIiPTR() { - class Holder { - static final MemorySegment PRIiPTR - = decode_h.LIBRARY_ARENA.allocateFrom("li"); - } - return Holder.PRIiPTR; - } - /** - * {@snippet lang=c : - * #define PRIoPTR "lo" - * } - */ - public static MemorySegment PRIoPTR() { - class Holder { - static final MemorySegment PRIoPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lo"); - } - return Holder.PRIoPTR; - } - /** - * {@snippet lang=c : - * #define PRIuPTR "lu" - * } - */ - public static MemorySegment PRIuPTR() { - class Holder { - static final MemorySegment PRIuPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lu"); - } - return Holder.PRIuPTR; - } - /** - * {@snippet lang=c : - * #define PRIxPTR "lx" - * } - */ - public static MemorySegment PRIxPTR() { - class Holder { - static final MemorySegment PRIxPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lx"); - } - return Holder.PRIxPTR; - } - /** - * {@snippet lang=c : - * #define PRIXPTR "lX" - * } - */ - public static MemorySegment PRIXPTR() { - class Holder { - static final MemorySegment PRIXPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lX"); - } - return Holder.PRIXPTR; - } - /** - * {@snippet lang=c : - * #define PRIdMAX "jd" - * } - */ - public static MemorySegment PRIdMAX() { - class Holder { - static final MemorySegment PRIdMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jd"); - } - return Holder.PRIdMAX; - } - /** - * {@snippet lang=c : - * #define PRIiMAX "ji" - * } - */ - public static MemorySegment PRIiMAX() { - class Holder { - static final MemorySegment PRIiMAX - = decode_h.LIBRARY_ARENA.allocateFrom("ji"); - } - return Holder.PRIiMAX; - } - /** - * {@snippet lang=c : - * #define PRIoMAX "jo" - * } - */ - public static MemorySegment PRIoMAX() { - class Holder { - static final MemorySegment PRIoMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jo"); - } - return Holder.PRIoMAX; - } - /** - * {@snippet lang=c : - * #define PRIuMAX "ju" - * } - */ - public static MemorySegment PRIuMAX() { - class Holder { - static final MemorySegment PRIuMAX - = decode_h.LIBRARY_ARENA.allocateFrom("ju"); - } - return Holder.PRIuMAX; - } - /** - * {@snippet lang=c : - * #define PRIxMAX "jx" - * } - */ - public static MemorySegment PRIxMAX() { - class Holder { - static final MemorySegment PRIxMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jx"); - } - return Holder.PRIxMAX; - } - /** - * {@snippet lang=c : - * #define PRIXMAX "jX" - * } - */ - public static MemorySegment PRIXMAX() { - class Holder { - static final MemorySegment PRIXMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jX"); - } - return Holder.PRIXMAX; - } - /** - * {@snippet lang=c : - * #define SCNd8 "hhd" - * } - */ - public static MemorySegment SCNd8() { - class Holder { - static final MemorySegment SCNd8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNd8; - } - /** - * {@snippet lang=c : - * #define SCNi8 "hhi" - * } - */ - public static MemorySegment SCNi8() { - class Holder { - static final MemorySegment SCNi8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNi8; - } - /** - * {@snippet lang=c : - * #define SCNo8 "hho" - * } - */ - public static MemorySegment SCNo8() { - class Holder { - static final MemorySegment SCNo8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.SCNo8; - } - /** - * {@snippet lang=c : - * #define SCNu8 "hhu" - * } - */ - public static MemorySegment SCNu8() { - class Holder { - static final MemorySegment SCNu8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNu8; - } - /** - * {@snippet lang=c : - * #define SCNx8 "hhx" - * } - */ - public static MemorySegment SCNx8() { - class Holder { - static final MemorySegment SCNx8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNx8; - } - /** - * {@snippet lang=c : - * #define SCNd16 "hd" - * } - */ - public static MemorySegment SCNd16() { - class Holder { - static final MemorySegment SCNd16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNd16; - } - /** - * {@snippet lang=c : - * #define SCNi16 "hi" - * } - */ - public static MemorySegment SCNi16() { - class Holder { - static final MemorySegment SCNi16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.SCNi16; - } - /** - * {@snippet lang=c : - * #define SCNo16 "ho" - * } - */ - public static MemorySegment SCNo16() { - class Holder { - static final MemorySegment SCNo16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNo16; - } - /** - * {@snippet lang=c : - * #define SCNu16 "hu" - * } - */ - public static MemorySegment SCNu16() { - class Holder { - static final MemorySegment SCNu16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNu16; - } - /** - * {@snippet lang=c : - * #define SCNx16 "hx" - * } - */ - public static MemorySegment SCNx16() { - class Holder { - static final MemorySegment SCNx16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNx16; - } - /** - * {@snippet lang=c : - * #define SCNd32 "d" - * } - */ - public static MemorySegment SCNd32() { - class Holder { - static final MemorySegment SCNd32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.SCNd32; - } - /** - * {@snippet lang=c : - * #define SCNi32 "i" - * } - */ - public static MemorySegment SCNi32() { - class Holder { - static final MemorySegment SCNi32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNi32; - } - /** - * {@snippet lang=c : - * #define SCNo32 "o" - * } - */ - public static MemorySegment SCNo32() { - class Holder { - static final MemorySegment SCNo32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNo32; - } - /** - * {@snippet lang=c : - * #define SCNu32 "u" - * } - */ - public static MemorySegment SCNu32() { - class Holder { - static final MemorySegment SCNu32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNu32; - } - /** - * {@snippet lang=c : - * #define SCNx32 "x" - * } - */ - public static MemorySegment SCNx32() { - class Holder { - static final MemorySegment SCNx32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.SCNx32; - } - /** - * {@snippet lang=c : - * #define SCNd64 "lld" - * } - */ - public static MemorySegment SCNd64() { - class Holder { - static final MemorySegment SCNd64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNd64; - } - /** - * {@snippet lang=c : - * #define SCNi64 "lli" - * } - */ - public static MemorySegment SCNi64() { - class Holder { - static final MemorySegment SCNi64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNi64; - } - /** - * {@snippet lang=c : - * #define SCNo64 "llo" - * } - */ - public static MemorySegment SCNo64() { - class Holder { - static final MemorySegment SCNo64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNo64; - } - /** - * {@snippet lang=c : - * #define SCNu64 "llu" - * } - */ - public static MemorySegment SCNu64() { - class Holder { - static final MemorySegment SCNu64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.SCNu64; - } - /** - * {@snippet lang=c : - * #define SCNx64 "llx" - * } - */ - public static MemorySegment SCNx64() { - class Holder { - static final MemorySegment SCNx64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNx64; - } - /** - * {@snippet lang=c : - * #define SCNdLEAST8 "hhd" - * } - */ - public static MemorySegment SCNdLEAST8() { - class Holder { - static final MemorySegment SCNdLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNdLEAST8; - } - /** - * {@snippet lang=c : - * #define SCNiLEAST8 "hhi" - * } - */ - public static MemorySegment SCNiLEAST8() { - class Holder { - static final MemorySegment SCNiLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNiLEAST8; - } - /** - * {@snippet lang=c : - * #define SCNoLEAST8 "hho" - * } - */ - public static MemorySegment SCNoLEAST8() { - class Holder { - static final MemorySegment SCNoLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.SCNoLEAST8; - } - /** - * {@snippet lang=c : - * #define SCNuLEAST8 "hhu" - * } - */ - public static MemorySegment SCNuLEAST8() { - class Holder { - static final MemorySegment SCNuLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNuLEAST8; - } - /** - * {@snippet lang=c : - * #define SCNxLEAST8 "hhx" - * } - */ - public static MemorySegment SCNxLEAST8() { - class Holder { - static final MemorySegment SCNxLEAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNxLEAST8; - } - /** - * {@snippet lang=c : - * #define SCNdLEAST16 "hd" - * } - */ - public static MemorySegment SCNdLEAST16() { - class Holder { - static final MemorySegment SCNdLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNdLEAST16; - } - /** - * {@snippet lang=c : - * #define SCNiLEAST16 "hi" - * } - */ - public static MemorySegment SCNiLEAST16() { - class Holder { - static final MemorySegment SCNiLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.SCNiLEAST16; - } - /** - * {@snippet lang=c : - * #define SCNoLEAST16 "ho" - * } - */ - public static MemorySegment SCNoLEAST16() { - class Holder { - static final MemorySegment SCNoLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNoLEAST16; - } - /** - * {@snippet lang=c : - * #define SCNuLEAST16 "hu" - * } - */ - public static MemorySegment SCNuLEAST16() { - class Holder { - static final MemorySegment SCNuLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNuLEAST16; - } - /** - * {@snippet lang=c : - * #define SCNxLEAST16 "hx" - * } - */ - public static MemorySegment SCNxLEAST16() { - class Holder { - static final MemorySegment SCNxLEAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNxLEAST16; - } - /** - * {@snippet lang=c : - * #define SCNdLEAST32 "d" - * } - */ - public static MemorySegment SCNdLEAST32() { - class Holder { - static final MemorySegment SCNdLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.SCNdLEAST32; - } - /** - * {@snippet lang=c : - * #define SCNiLEAST32 "i" - * } - */ - public static MemorySegment SCNiLEAST32() { - class Holder { - static final MemorySegment SCNiLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNiLEAST32; - } - /** - * {@snippet lang=c : - * #define SCNoLEAST32 "o" - * } - */ - public static MemorySegment SCNoLEAST32() { - class Holder { - static final MemorySegment SCNoLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNoLEAST32; - } - /** - * {@snippet lang=c : - * #define SCNuLEAST32 "u" - * } - */ - public static MemorySegment SCNuLEAST32() { - class Holder { - static final MemorySegment SCNuLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNuLEAST32; - } - /** - * {@snippet lang=c : - * #define SCNxLEAST32 "x" - * } - */ - public static MemorySegment SCNxLEAST32() { - class Holder { - static final MemorySegment SCNxLEAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.SCNxLEAST32; - } - /** - * {@snippet lang=c : - * #define SCNdLEAST64 "lld" - * } - */ - public static MemorySegment SCNdLEAST64() { - class Holder { - static final MemorySegment SCNdLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNdLEAST64; - } - /** - * {@snippet lang=c : - * #define SCNiLEAST64 "lli" - * } - */ - public static MemorySegment SCNiLEAST64() { - class Holder { - static final MemorySegment SCNiLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNiLEAST64; - } - /** - * {@snippet lang=c : - * #define SCNoLEAST64 "llo" - * } - */ - public static MemorySegment SCNoLEAST64() { - class Holder { - static final MemorySegment SCNoLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNoLEAST64; - } - /** - * {@snippet lang=c : - * #define SCNuLEAST64 "llu" - * } - */ - public static MemorySegment SCNuLEAST64() { - class Holder { - static final MemorySegment SCNuLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.SCNuLEAST64; - } - /** - * {@snippet lang=c : - * #define SCNxLEAST64 "llx" - * } - */ - public static MemorySegment SCNxLEAST64() { - class Holder { - static final MemorySegment SCNxLEAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNxLEAST64; - } - /** - * {@snippet lang=c : - * #define SCNdFAST8 "hhd" - * } - */ - public static MemorySegment SCNdFAST8() { - class Holder { - static final MemorySegment SCNdFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhd"); - } - return Holder.SCNdFAST8; - } - /** - * {@snippet lang=c : - * #define SCNiFAST8 "hhi" - * } - */ - public static MemorySegment SCNiFAST8() { - class Holder { - static final MemorySegment SCNiFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhi"); - } - return Holder.SCNiFAST8; - } - /** - * {@snippet lang=c : - * #define SCNoFAST8 "hho" - * } - */ - public static MemorySegment SCNoFAST8() { - class Holder { - static final MemorySegment SCNoFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hho"); - } - return Holder.SCNoFAST8; - } - /** - * {@snippet lang=c : - * #define SCNuFAST8 "hhu" - * } - */ - public static MemorySegment SCNuFAST8() { - class Holder { - static final MemorySegment SCNuFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhu"); - } - return Holder.SCNuFAST8; - } - /** - * {@snippet lang=c : - * #define SCNxFAST8 "hhx" - * } - */ - public static MemorySegment SCNxFAST8() { - class Holder { - static final MemorySegment SCNxFAST8 - = decode_h.LIBRARY_ARENA.allocateFrom("hhx"); - } - return Holder.SCNxFAST8; - } - /** - * {@snippet lang=c : - * #define SCNdFAST16 "hd" - * } - */ - public static MemorySegment SCNdFAST16() { - class Holder { - static final MemorySegment SCNdFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hd"); - } - return Holder.SCNdFAST16; - } - /** - * {@snippet lang=c : - * #define SCNiFAST16 "hi" - * } - */ - public static MemorySegment SCNiFAST16() { - class Holder { - static final MemorySegment SCNiFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hi"); - } - return Holder.SCNiFAST16; - } - /** - * {@snippet lang=c : - * #define SCNoFAST16 "ho" - * } - */ - public static MemorySegment SCNoFAST16() { - class Holder { - static final MemorySegment SCNoFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("ho"); - } - return Holder.SCNoFAST16; - } - /** - * {@snippet lang=c : - * #define SCNuFAST16 "hu" - * } - */ - public static MemorySegment SCNuFAST16() { - class Holder { - static final MemorySegment SCNuFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hu"); - } - return Holder.SCNuFAST16; - } - /** - * {@snippet lang=c : - * #define SCNxFAST16 "hx" - * } - */ - public static MemorySegment SCNxFAST16() { - class Holder { - static final MemorySegment SCNxFAST16 - = decode_h.LIBRARY_ARENA.allocateFrom("hx"); - } - return Holder.SCNxFAST16; - } - /** - * {@snippet lang=c : - * #define SCNdFAST32 "d" - * } - */ - public static MemorySegment SCNdFAST32() { - class Holder { - static final MemorySegment SCNdFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("d"); - } - return Holder.SCNdFAST32; - } - /** - * {@snippet lang=c : - * #define SCNiFAST32 "i" - * } - */ - public static MemorySegment SCNiFAST32() { - class Holder { - static final MemorySegment SCNiFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("i"); - } - return Holder.SCNiFAST32; - } - /** - * {@snippet lang=c : - * #define SCNoFAST32 "o" - * } - */ - public static MemorySegment SCNoFAST32() { - class Holder { - static final MemorySegment SCNoFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("o"); - } - return Holder.SCNoFAST32; - } - /** - * {@snippet lang=c : - * #define SCNuFAST32 "u" - * } - */ - public static MemorySegment SCNuFAST32() { - class Holder { - static final MemorySegment SCNuFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("u"); - } - return Holder.SCNuFAST32; - } - /** - * {@snippet lang=c : - * #define SCNxFAST32 "x" - * } - */ - public static MemorySegment SCNxFAST32() { - class Holder { - static final MemorySegment SCNxFAST32 - = decode_h.LIBRARY_ARENA.allocateFrom("x"); - } - return Holder.SCNxFAST32; - } - /** - * {@snippet lang=c : - * #define SCNdFAST64 "lld" - * } - */ - public static MemorySegment SCNdFAST64() { - class Holder { - static final MemorySegment SCNdFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lld"); - } - return Holder.SCNdFAST64; - } - /** - * {@snippet lang=c : - * #define SCNiFAST64 "lli" - * } - */ - public static MemorySegment SCNiFAST64() { - class Holder { - static final MemorySegment SCNiFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("lli"); - } - return Holder.SCNiFAST64; - } - /** - * {@snippet lang=c : - * #define SCNoFAST64 "llo" - * } - */ - public static MemorySegment SCNoFAST64() { - class Holder { - static final MemorySegment SCNoFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llo"); - } - return Holder.SCNoFAST64; - } - /** - * {@snippet lang=c : - * #define SCNuFAST64 "llu" - * } - */ - public static MemorySegment SCNuFAST64() { - class Holder { - static final MemorySegment SCNuFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llu"); - } - return Holder.SCNuFAST64; - } - /** - * {@snippet lang=c : - * #define SCNxFAST64 "llx" - * } - */ - public static MemorySegment SCNxFAST64() { - class Holder { - static final MemorySegment SCNxFAST64 - = decode_h.LIBRARY_ARENA.allocateFrom("llx"); - } - return Holder.SCNxFAST64; - } - /** - * {@snippet lang=c : - * #define SCNdPTR "ld" - * } - */ - public static MemorySegment SCNdPTR() { - class Holder { - static final MemorySegment SCNdPTR - = decode_h.LIBRARY_ARENA.allocateFrom("ld"); - } - return Holder.SCNdPTR; - } - /** - * {@snippet lang=c : - * #define SCNiPTR "li" - * } - */ - public static MemorySegment SCNiPTR() { - class Holder { - static final MemorySegment SCNiPTR - = decode_h.LIBRARY_ARENA.allocateFrom("li"); - } - return Holder.SCNiPTR; - } - /** - * {@snippet lang=c : - * #define SCNoPTR "lo" - * } - */ - public static MemorySegment SCNoPTR() { - class Holder { - static final MemorySegment SCNoPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lo"); - } - return Holder.SCNoPTR; - } - /** - * {@snippet lang=c : - * #define SCNuPTR "lu" - * } - */ - public static MemorySegment SCNuPTR() { - class Holder { - static final MemorySegment SCNuPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lu"); - } - return Holder.SCNuPTR; - } - /** - * {@snippet lang=c : - * #define SCNxPTR "lx" - * } - */ - public static MemorySegment SCNxPTR() { - class Holder { - static final MemorySegment SCNxPTR - = decode_h.LIBRARY_ARENA.allocateFrom("lx"); - } - return Holder.SCNxPTR; - } - /** - * {@snippet lang=c : - * #define SCNdMAX "jd" - * } - */ - public static MemorySegment SCNdMAX() { - class Holder { - static final MemorySegment SCNdMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jd"); - } - return Holder.SCNdMAX; - } - /** - * {@snippet lang=c : - * #define SCNiMAX "ji" - * } - */ - public static MemorySegment SCNiMAX() { - class Holder { - static final MemorySegment SCNiMAX - = decode_h.LIBRARY_ARENA.allocateFrom("ji"); - } - return Holder.SCNiMAX; - } - /** - * {@snippet lang=c : - * #define SCNoMAX "jo" - * } - */ - public static MemorySegment SCNoMAX() { - class Holder { - static final MemorySegment SCNoMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jo"); - } - return Holder.SCNoMAX; - } - /** - * {@snippet lang=c : - * #define SCNuMAX "ju" - * } - */ - public static MemorySegment SCNuMAX() { - class Holder { - static final MemorySegment SCNuMAX - = decode_h.LIBRARY_ARENA.allocateFrom("ju"); - } - return Holder.SCNuMAX; - } - /** - * {@snippet lang=c : - * #define SCNxMAX "jx" - * } - */ - public static MemorySegment SCNxMAX() { - class Holder { - static final MemorySegment SCNxMAX - = decode_h.LIBRARY_ARENA.allocateFrom("jx"); - } - return Holder.SCNxMAX; - } - /** - * {@snippet lang=c : - * #define __DARWIN_SUF_EXTSN "$DARWIN_EXTSN" - * } - */ - public static MemorySegment __DARWIN_SUF_EXTSN() { - class Holder { - static final MemorySegment __DARWIN_SUF_EXTSN - = decode_h.LIBRARY_ARENA.allocateFrom("$DARWIN_EXTSN"); - } - return Holder.__DARWIN_SUF_EXTSN; - } - private static final long __DARWIN_C_ANSI = 4096L; - /** - * {@snippet lang=c : - * #define __DARWIN_C_ANSI 4096 - * } - */ - public static long __DARWIN_C_ANSI() { - return __DARWIN_C_ANSI; - } - private static final long __DARWIN_C_FULL = 900000L; - /** - * {@snippet lang=c : - * #define __DARWIN_C_FULL 900000 - * } - */ - public static long __DARWIN_C_FULL() { - return __DARWIN_C_FULL; - } - private static final long __DARWIN_C_LEVEL = 900000L; - /** - * {@snippet lang=c : - * #define __DARWIN_C_LEVEL 900000 - * } - */ - public static long __DARWIN_C_LEVEL() { - return __DARWIN_C_LEVEL; - } - private static final int MAC_OS_X_VERSION_10_0 = (int)1000L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_0 1000 - * } - */ - public static int MAC_OS_X_VERSION_10_0() { - return MAC_OS_X_VERSION_10_0; - } - private static final int MAC_OS_X_VERSION_10_1 = (int)1010L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_1 1010 - * } - */ - public static int MAC_OS_X_VERSION_10_1() { - return MAC_OS_X_VERSION_10_1; - } - private static final int MAC_OS_X_VERSION_10_2 = (int)1020L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_2 1020 - * } - */ - public static int MAC_OS_X_VERSION_10_2() { - return MAC_OS_X_VERSION_10_2; - } - private static final int MAC_OS_X_VERSION_10_3 = (int)1030L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_3 1030 - * } - */ - public static int MAC_OS_X_VERSION_10_3() { - return MAC_OS_X_VERSION_10_3; - } - private static final int MAC_OS_X_VERSION_10_4 = (int)1040L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_4 1040 - * } - */ - public static int MAC_OS_X_VERSION_10_4() { - return MAC_OS_X_VERSION_10_4; - } - private static final int MAC_OS_X_VERSION_10_5 = (int)1050L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_5 1050 - * } - */ - public static int MAC_OS_X_VERSION_10_5() { - return MAC_OS_X_VERSION_10_5; - } - private static final int MAC_OS_X_VERSION_10_6 = (int)1060L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_6 1060 - * } - */ - public static int MAC_OS_X_VERSION_10_6() { - return MAC_OS_X_VERSION_10_6; - } - private static final int MAC_OS_X_VERSION_10_7 = (int)1070L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_7 1070 - * } - */ - public static int MAC_OS_X_VERSION_10_7() { - return MAC_OS_X_VERSION_10_7; - } - private static final int MAC_OS_X_VERSION_10_8 = (int)1080L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_8 1080 - * } - */ - public static int MAC_OS_X_VERSION_10_8() { - return MAC_OS_X_VERSION_10_8; - } - private static final int MAC_OS_X_VERSION_10_9 = (int)1090L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_9 1090 - * } - */ - public static int MAC_OS_X_VERSION_10_9() { - return MAC_OS_X_VERSION_10_9; - } - private static final int MAC_OS_X_VERSION_10_10 = (int)101000L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10 101000 - * } - */ - public static int MAC_OS_X_VERSION_10_10() { - return MAC_OS_X_VERSION_10_10; - } - private static final int MAC_OS_X_VERSION_10_10_2 = (int)101002L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10_2 101002 - * } - */ - public static int MAC_OS_X_VERSION_10_10_2() { - return MAC_OS_X_VERSION_10_10_2; - } - private static final int MAC_OS_X_VERSION_10_10_3 = (int)101003L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_10_3 101003 - * } - */ - public static int MAC_OS_X_VERSION_10_10_3() { - return MAC_OS_X_VERSION_10_10_3; - } - private static final int MAC_OS_X_VERSION_10_11 = (int)101100L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11 101100 - * } - */ - public static int MAC_OS_X_VERSION_10_11() { - return MAC_OS_X_VERSION_10_11; - } - private static final int MAC_OS_X_VERSION_10_11_2 = (int)101102L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_2 101102 - * } - */ - public static int MAC_OS_X_VERSION_10_11_2() { - return MAC_OS_X_VERSION_10_11_2; - } - private static final int MAC_OS_X_VERSION_10_11_3 = (int)101103L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_3 101103 - * } - */ - public static int MAC_OS_X_VERSION_10_11_3() { - return MAC_OS_X_VERSION_10_11_3; - } - private static final int MAC_OS_X_VERSION_10_11_4 = (int)101104L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_11_4 101104 - * } - */ - public static int MAC_OS_X_VERSION_10_11_4() { - return MAC_OS_X_VERSION_10_11_4; - } - private static final int MAC_OS_X_VERSION_10_12 = (int)101200L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12 101200 - * } - */ - public static int MAC_OS_X_VERSION_10_12() { - return MAC_OS_X_VERSION_10_12; - } - private static final int MAC_OS_X_VERSION_10_12_1 = (int)101201L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_1 101201 - * } - */ - public static int MAC_OS_X_VERSION_10_12_1() { - return MAC_OS_X_VERSION_10_12_1; - } - private static final int MAC_OS_X_VERSION_10_12_2 = (int)101202L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_2 101202 - * } - */ - public static int MAC_OS_X_VERSION_10_12_2() { - return MAC_OS_X_VERSION_10_12_2; - } - private static final int MAC_OS_X_VERSION_10_12_4 = (int)101204L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_12_4 101204 - * } - */ - public static int MAC_OS_X_VERSION_10_12_4() { - return MAC_OS_X_VERSION_10_12_4; - } - private static final int MAC_OS_X_VERSION_10_13 = (int)101300L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13 101300 - * } - */ - public static int MAC_OS_X_VERSION_10_13() { - return MAC_OS_X_VERSION_10_13; - } - private static final int MAC_OS_X_VERSION_10_13_1 = (int)101301L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_1 101301 - * } - */ - public static int MAC_OS_X_VERSION_10_13_1() { - return MAC_OS_X_VERSION_10_13_1; - } - private static final int MAC_OS_X_VERSION_10_13_2 = (int)101302L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_2 101302 - * } - */ - public static int MAC_OS_X_VERSION_10_13_2() { - return MAC_OS_X_VERSION_10_13_2; - } - private static final int MAC_OS_X_VERSION_10_13_4 = (int)101304L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_13_4 101304 - * } - */ - public static int MAC_OS_X_VERSION_10_13_4() { - return MAC_OS_X_VERSION_10_13_4; - } - private static final int MAC_OS_X_VERSION_10_14 = (int)101400L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14 101400 - * } - */ - public static int MAC_OS_X_VERSION_10_14() { - return MAC_OS_X_VERSION_10_14; - } - private static final int MAC_OS_X_VERSION_10_14_1 = (int)101401L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_1 101401 - * } - */ - public static int MAC_OS_X_VERSION_10_14_1() { - return MAC_OS_X_VERSION_10_14_1; - } - private static final int MAC_OS_X_VERSION_10_14_4 = (int)101404L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_4 101404 - * } - */ - public static int MAC_OS_X_VERSION_10_14_4() { - return MAC_OS_X_VERSION_10_14_4; - } - private static final int MAC_OS_X_VERSION_10_14_5 = (int)101405L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_5 101405 - * } - */ - public static int MAC_OS_X_VERSION_10_14_5() { - return MAC_OS_X_VERSION_10_14_5; - } - private static final int MAC_OS_X_VERSION_10_14_6 = (int)101406L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_14_6 101406 - * } - */ - public static int MAC_OS_X_VERSION_10_14_6() { - return MAC_OS_X_VERSION_10_14_6; - } - private static final int MAC_OS_X_VERSION_10_15 = (int)101500L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15 101500 - * } - */ - public static int MAC_OS_X_VERSION_10_15() { - return MAC_OS_X_VERSION_10_15; - } - private static final int MAC_OS_X_VERSION_10_15_1 = (int)101501L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15_1 101501 - * } - */ - public static int MAC_OS_X_VERSION_10_15_1() { - return MAC_OS_X_VERSION_10_15_1; - } - private static final int MAC_OS_X_VERSION_10_15_4 = (int)101504L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_15_4 101504 - * } - */ - public static int MAC_OS_X_VERSION_10_15_4() { - return MAC_OS_X_VERSION_10_15_4; - } - private static final int MAC_OS_X_VERSION_10_16 = (int)101600L; - /** - * {@snippet lang=c : - * #define MAC_OS_X_VERSION_10_16 101600 - * } - */ - public static int MAC_OS_X_VERSION_10_16() { - return MAC_OS_X_VERSION_10_16; - } - private static final int MAC_OS_VERSION_11_0 = (int)110000L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_0 110000 - * } - */ - public static int MAC_OS_VERSION_11_0() { - return MAC_OS_VERSION_11_0; - } - private static final int MAC_OS_VERSION_11_1 = (int)110100L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_1 110100 - * } - */ - public static int MAC_OS_VERSION_11_1() { - return MAC_OS_VERSION_11_1; - } - private static final int MAC_OS_VERSION_11_3 = (int)110300L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_3 110300 - * } - */ - public static int MAC_OS_VERSION_11_3() { - return MAC_OS_VERSION_11_3; - } - private static final int MAC_OS_VERSION_11_4 = (int)110400L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_4 110400 - * } - */ - public static int MAC_OS_VERSION_11_4() { - return MAC_OS_VERSION_11_4; - } - private static final int MAC_OS_VERSION_11_5 = (int)110500L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_5 110500 - * } - */ - public static int MAC_OS_VERSION_11_5() { - return MAC_OS_VERSION_11_5; - } - private static final int MAC_OS_VERSION_11_6 = (int)110600L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_11_6 110600 - * } - */ - public static int MAC_OS_VERSION_11_6() { - return MAC_OS_VERSION_11_6; - } - private static final int MAC_OS_VERSION_12_0 = (int)120000L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_0 120000 - * } - */ - public static int MAC_OS_VERSION_12_0() { - return MAC_OS_VERSION_12_0; - } - private static final int MAC_OS_VERSION_12_1 = (int)120100L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_1 120100 - * } - */ - public static int MAC_OS_VERSION_12_1() { - return MAC_OS_VERSION_12_1; - } - private static final int MAC_OS_VERSION_12_2 = (int)120200L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_2 120200 - * } - */ - public static int MAC_OS_VERSION_12_2() { - return MAC_OS_VERSION_12_2; - } - private static final int MAC_OS_VERSION_12_3 = (int)120300L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_3 120300 - * } - */ - public static int MAC_OS_VERSION_12_3() { - return MAC_OS_VERSION_12_3; - } - private static final int MAC_OS_VERSION_12_4 = (int)120400L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_4 120400 - * } - */ - public static int MAC_OS_VERSION_12_4() { - return MAC_OS_VERSION_12_4; - } - private static final int MAC_OS_VERSION_12_5 = (int)120500L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_5 120500 - * } - */ - public static int MAC_OS_VERSION_12_5() { - return MAC_OS_VERSION_12_5; - } - private static final int MAC_OS_VERSION_12_6 = (int)120600L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_6 120600 - * } - */ - public static int MAC_OS_VERSION_12_6() { - return MAC_OS_VERSION_12_6; - } - private static final int MAC_OS_VERSION_12_7 = (int)120700L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_12_7 120700 - * } - */ - public static int MAC_OS_VERSION_12_7() { - return MAC_OS_VERSION_12_7; - } - private static final int MAC_OS_VERSION_13_0 = (int)130000L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_0 130000 - * } - */ - public static int MAC_OS_VERSION_13_0() { - return MAC_OS_VERSION_13_0; - } - private static final int MAC_OS_VERSION_13_1 = (int)130100L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_1 130100 - * } - */ - public static int MAC_OS_VERSION_13_1() { - return MAC_OS_VERSION_13_1; - } - private static final int MAC_OS_VERSION_13_2 = (int)130200L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_2 130200 - * } - */ - public static int MAC_OS_VERSION_13_2() { - return MAC_OS_VERSION_13_2; - } - private static final int MAC_OS_VERSION_13_3 = (int)130300L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_3 130300 - * } - */ - public static int MAC_OS_VERSION_13_3() { - return MAC_OS_VERSION_13_3; - } - private static final int MAC_OS_VERSION_13_4 = (int)130400L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_4 130400 - * } - */ - public static int MAC_OS_VERSION_13_4() { - return MAC_OS_VERSION_13_4; - } - private static final int MAC_OS_VERSION_13_5 = (int)130500L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_5 130500 - * } - */ - public static int MAC_OS_VERSION_13_5() { - return MAC_OS_VERSION_13_5; - } - private static final int MAC_OS_VERSION_13_6 = (int)130600L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_13_6 130600 - * } - */ - public static int MAC_OS_VERSION_13_6() { - return MAC_OS_VERSION_13_6; - } - private static final int MAC_OS_VERSION_14_0 = (int)140000L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_0 140000 - * } - */ - public static int MAC_OS_VERSION_14_0() { - return MAC_OS_VERSION_14_0; - } - private static final int MAC_OS_VERSION_14_1 = (int)140100L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_1 140100 - * } - */ - public static int MAC_OS_VERSION_14_1() { - return MAC_OS_VERSION_14_1; - } - private static final int MAC_OS_VERSION_14_2 = (int)140200L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_2 140200 - * } - */ - public static int MAC_OS_VERSION_14_2() { - return MAC_OS_VERSION_14_2; - } - private static final int MAC_OS_VERSION_14_3 = (int)140300L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_3 140300 - * } - */ - public static int MAC_OS_VERSION_14_3() { - return MAC_OS_VERSION_14_3; - } - private static final int MAC_OS_VERSION_14_4 = (int)140400L; - /** - * {@snippet lang=c : - * #define MAC_OS_VERSION_14_4 140400 - * } - */ - public static int MAC_OS_VERSION_14_4() { - return MAC_OS_VERSION_14_4; - } - private static final int __MAC_OS_X_VERSION_MAX_ALLOWED = (int)140400L; - /** - * {@snippet lang=c : - * #define __MAC_OS_X_VERSION_MAX_ALLOWED 140400 - * } - */ - public static int __MAC_OS_X_VERSION_MAX_ALLOWED() { - return __MAC_OS_X_VERSION_MAX_ALLOWED; - } - private static final MemorySegment __DARWIN_NULL = MemorySegment.ofAddress(0L); - /** - * {@snippet lang=c : - * #define __DARWIN_NULL (void*) 0 - * } - */ - public static MemorySegment __DARWIN_NULL() { - return __DARWIN_NULL; - } - private static final int __DARWIN_WCHAR_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define __DARWIN_WCHAR_MAX 2147483647 - * } - */ - public static int __DARWIN_WCHAR_MAX() { - return __DARWIN_WCHAR_MAX; - } - private static final int __DARWIN_WCHAR_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define __DARWIN_WCHAR_MIN -2147483648 - * } - */ - public static int __DARWIN_WCHAR_MIN() { - return __DARWIN_WCHAR_MIN; - } - private static final int __DARWIN_WEOF = (int)-1L; - /** - * {@snippet lang=c : - * #define __DARWIN_WEOF -1 - * } - */ - public static int __DARWIN_WEOF() { - return __DARWIN_WEOF; - } - private static final long USER_ADDR_NULL = 0L; - /** - * {@snippet lang=c : - * #define USER_ADDR_NULL 0 - * } - */ - public static long USER_ADDR_NULL() { - return USER_ADDR_NULL; - } - private static final long INT64_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define INT64_MAX 9223372036854775807 - * } - */ - public static long INT64_MAX() { - return INT64_MAX; - } - private static final int INT8_MIN = (int)-128L; - /** - * {@snippet lang=c : - * #define INT8_MIN -128 - * } - */ - public static int INT8_MIN() { - return INT8_MIN; - } - private static final int INT16_MIN = (int)-32768L; - /** - * {@snippet lang=c : - * #define INT16_MIN -32768 - * } - */ - public static int INT16_MIN() { - return INT16_MIN; - } - private static final int INT32_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define INT32_MIN -2147483648 - * } - */ - public static int INT32_MIN() { - return INT32_MIN; - } - private static final long INT64_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INT64_MIN -9223372036854775808 - * } - */ - public static long INT64_MIN() { - return INT64_MIN; - } - private static final int UINT32_MAX = (int)4294967295L; - /** - * {@snippet lang=c : - * #define UINT32_MAX 4294967295 - * } - */ - public static int UINT32_MAX() { - return UINT32_MAX; - } - private static final long UINT64_MAX = -1L; - /** - * {@snippet lang=c : - * #define UINT64_MAX -1 - * } - */ - public static long UINT64_MAX() { - return UINT64_MAX; - } - private static final int INT_LEAST8_MIN = (int)-128L; - /** - * {@snippet lang=c : - * #define INT_LEAST8_MIN -128 - * } - */ - public static int INT_LEAST8_MIN() { - return INT_LEAST8_MIN; - } - private static final int INT_LEAST16_MIN = (int)-32768L; - /** - * {@snippet lang=c : - * #define INT_LEAST16_MIN -32768 - * } - */ - public static int INT_LEAST16_MIN() { - return INT_LEAST16_MIN; - } - private static final int INT_LEAST32_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define INT_LEAST32_MIN -2147483648 - * } - */ - public static int INT_LEAST32_MIN() { - return INT_LEAST32_MIN; - } - private static final long INT_LEAST64_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INT_LEAST64_MIN -9223372036854775808 - * } - */ - public static long INT_LEAST64_MIN() { - return INT_LEAST64_MIN; - } - private static final int INT_LEAST8_MAX = (int)127L; - /** - * {@snippet lang=c : - * #define INT_LEAST8_MAX 127 - * } - */ - public static int INT_LEAST8_MAX() { - return INT_LEAST8_MAX; - } - private static final int INT_LEAST16_MAX = (int)32767L; - /** - * {@snippet lang=c : - * #define INT_LEAST16_MAX 32767 - * } - */ - public static int INT_LEAST16_MAX() { - return INT_LEAST16_MAX; - } - private static final int INT_LEAST32_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define INT_LEAST32_MAX 2147483647 - * } - */ - public static int INT_LEAST32_MAX() { - return INT_LEAST32_MAX; - } - private static final long INT_LEAST64_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define INT_LEAST64_MAX 9223372036854775807 - * } - */ - public static long INT_LEAST64_MAX() { - return INT_LEAST64_MAX; - } - private static final int UINT_LEAST8_MAX = (int)255L; - /** - * {@snippet lang=c : - * #define UINT_LEAST8_MAX 255 - * } - */ - public static int UINT_LEAST8_MAX() { - return UINT_LEAST8_MAX; - } - private static final int UINT_LEAST16_MAX = (int)65535L; - /** - * {@snippet lang=c : - * #define UINT_LEAST16_MAX 65535 - * } - */ - public static int UINT_LEAST16_MAX() { - return UINT_LEAST16_MAX; - } - private static final int UINT_LEAST32_MAX = (int)4294967295L; - /** - * {@snippet lang=c : - * #define UINT_LEAST32_MAX 4294967295 - * } - */ - public static int UINT_LEAST32_MAX() { - return UINT_LEAST32_MAX; - } - private static final long UINT_LEAST64_MAX = -1L; - /** - * {@snippet lang=c : - * #define UINT_LEAST64_MAX -1 - * } - */ - public static long UINT_LEAST64_MAX() { - return UINT_LEAST64_MAX; - } - private static final int INT_FAST8_MIN = (int)-128L; - /** - * {@snippet lang=c : - * #define INT_FAST8_MIN -128 - * } - */ - public static int INT_FAST8_MIN() { - return INT_FAST8_MIN; - } - private static final int INT_FAST16_MIN = (int)-32768L; - /** - * {@snippet lang=c : - * #define INT_FAST16_MIN -32768 - * } - */ - public static int INT_FAST16_MIN() { - return INT_FAST16_MIN; - } - private static final int INT_FAST32_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define INT_FAST32_MIN -2147483648 - * } - */ - public static int INT_FAST32_MIN() { - return INT_FAST32_MIN; - } - private static final long INT_FAST64_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INT_FAST64_MIN -9223372036854775808 - * } - */ - public static long INT_FAST64_MIN() { - return INT_FAST64_MIN; - } - private static final int INT_FAST8_MAX = (int)127L; - /** - * {@snippet lang=c : - * #define INT_FAST8_MAX 127 - * } - */ - public static int INT_FAST8_MAX() { - return INT_FAST8_MAX; - } - private static final int INT_FAST16_MAX = (int)32767L; - /** - * {@snippet lang=c : - * #define INT_FAST16_MAX 32767 - * } - */ - public static int INT_FAST16_MAX() { - return INT_FAST16_MAX; - } - private static final int INT_FAST32_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define INT_FAST32_MAX 2147483647 - * } - */ - public static int INT_FAST32_MAX() { - return INT_FAST32_MAX; - } - private static final long INT_FAST64_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define INT_FAST64_MAX 9223372036854775807 - * } - */ - public static long INT_FAST64_MAX() { - return INT_FAST64_MAX; - } - private static final int UINT_FAST8_MAX = (int)255L; - /** - * {@snippet lang=c : - * #define UINT_FAST8_MAX 255 - * } - */ - public static int UINT_FAST8_MAX() { - return UINT_FAST8_MAX; - } - private static final int UINT_FAST16_MAX = (int)65535L; - /** - * {@snippet lang=c : - * #define UINT_FAST16_MAX 65535 - * } - */ - public static int UINT_FAST16_MAX() { - return UINT_FAST16_MAX; - } - private static final int UINT_FAST32_MAX = (int)4294967295L; - /** - * {@snippet lang=c : - * #define UINT_FAST32_MAX 4294967295 - * } - */ - public static int UINT_FAST32_MAX() { - return UINT_FAST32_MAX; - } - private static final long UINT_FAST64_MAX = -1L; - /** - * {@snippet lang=c : - * #define UINT_FAST64_MAX -1 - * } - */ - public static long UINT_FAST64_MAX() { - return UINT_FAST64_MAX; - } - private static final long INTPTR_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define INTPTR_MAX 9223372036854775807 - * } - */ - public static long INTPTR_MAX() { - return INTPTR_MAX; - } - private static final long INTPTR_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INTPTR_MIN -9223372036854775808 - * } - */ - public static long INTPTR_MIN() { - return INTPTR_MIN; - } - private static final long UINTPTR_MAX = -1L; - /** - * {@snippet lang=c : - * #define UINTPTR_MAX -1 - * } - */ - public static long UINTPTR_MAX() { - return UINTPTR_MAX; - } - private static final long INTMAX_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define INTMAX_MAX 9223372036854775807 - * } - */ - public static long INTMAX_MAX() { - return INTMAX_MAX; - } - private static final long UINTMAX_MAX = -1L; - /** - * {@snippet lang=c : - * #define UINTMAX_MAX -1 - * } - */ - public static long UINTMAX_MAX() { - return UINTMAX_MAX; - } - private static final long INTMAX_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define INTMAX_MIN -9223372036854775808 - * } - */ - public static long INTMAX_MIN() { - return INTMAX_MIN; - } - private static final long PTRDIFF_MIN = -9223372036854775808L; - /** - * {@snippet lang=c : - * #define PTRDIFF_MIN -9223372036854775808 - * } - */ - public static long PTRDIFF_MIN() { - return PTRDIFF_MIN; - } - private static final long PTRDIFF_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define PTRDIFF_MAX 9223372036854775807 - * } - */ - public static long PTRDIFF_MAX() { - return PTRDIFF_MAX; - } - private static final long SIZE_MAX = -1L; - /** - * {@snippet lang=c : - * #define SIZE_MAX -1 - * } - */ - public static long SIZE_MAX() { - return SIZE_MAX; - } - private static final long RSIZE_MAX = 9223372036854775807L; - /** - * {@snippet lang=c : - * #define RSIZE_MAX 9223372036854775807 - * } - */ - public static long RSIZE_MAX() { - return RSIZE_MAX; - } - private static final int WCHAR_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define WCHAR_MAX 2147483647 - * } - */ - public static int WCHAR_MAX() { - return WCHAR_MAX; - } - private static final int WCHAR_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define WCHAR_MIN -2147483648 - * } - */ - public static int WCHAR_MIN() { - return WCHAR_MIN; - } - private static final int WINT_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define WINT_MIN -2147483648 - * } - */ - public static int WINT_MIN() { - return WINT_MIN; - } - private static final int WINT_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define WINT_MAX 2147483647 - * } - */ - public static int WINT_MAX() { - return WINT_MAX; - } - private static final int SIG_ATOMIC_MIN = (int)-2147483648L; - /** - * {@snippet lang=c : - * #define SIG_ATOMIC_MIN -2147483648 - * } - */ - public static int SIG_ATOMIC_MIN() { - return SIG_ATOMIC_MIN; - } - private static final int SIG_ATOMIC_MAX = (int)2147483647L; - /** - * {@snippet lang=c : - * #define SIG_ATOMIC_MAX 2147483647 - * } - */ - public static int SIG_ATOMIC_MAX() { - return SIG_ATOMIC_MAX; - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecBuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecBuffer.java deleted file mode 100644 index 7bed727..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecBuffer.java +++ /dev/null @@ -1,610 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct WebPDecBuffer { - * WEBP_CSP_MODE colorspace; - * int width; - * int height; - * int is_external_memory; - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } u; - * uint32_t pad[4]; - * uint8_t *private_memory; - * } - * } - */ -public class WebPDecBuffer { - - WebPDecBuffer() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_INT.withName("colorspace"), - demux_h.C_INT.withName("width"), - demux_h.C_INT.withName("height"), - demux_h.C_INT.withName("is_external_memory"), - WebPDecBuffer.u.layout().withName("u"), - MemoryLayout.sequenceLayout(4, demux_h.C_INT).withName("pad"), - demux_h.C_POINTER.withName("private_memory") - ).withName("WebPDecBuffer"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfInt colorspace$LAYOUT = (OfInt)$LAYOUT.select(groupElement("colorspace")); - - /** - * Layout for field: - * {@snippet lang=c : - * WEBP_CSP_MODE colorspace - * } - */ - public static final OfInt colorspace$layout() { - return colorspace$LAYOUT; - } - - private static final long colorspace$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * WEBP_CSP_MODE colorspace - * } - */ - public static final long colorspace$offset() { - return colorspace$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * WEBP_CSP_MODE colorspace - * } - */ - public static int colorspace(MemorySegment struct) { - return struct.get(colorspace$LAYOUT, colorspace$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * WEBP_CSP_MODE colorspace - * } - */ - public static void colorspace(MemorySegment struct, int fieldValue) { - struct.set(colorspace$LAYOUT, colorspace$OFFSET, fieldValue); - } - - private static final OfInt width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("width")); - - /** - * Layout for field: - * {@snippet lang=c : - * int width - * } - */ - public static final OfInt width$layout() { - return width$LAYOUT; - } - - private static final long width$OFFSET = 4; - - /** - * Offset for field: - * {@snippet lang=c : - * int width - * } - */ - public static final long width$offset() { - return width$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int width - * } - */ - public static int width(MemorySegment struct) { - return struct.get(width$LAYOUT, width$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int width - * } - */ - public static void width(MemorySegment struct, int fieldValue) { - struct.set(width$LAYOUT, width$OFFSET, fieldValue); - } - - private static final OfInt height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("height")); - - /** - * Layout for field: - * {@snippet lang=c : - * int height - * } - */ - public static final OfInt height$layout() { - return height$LAYOUT; - } - - private static final long height$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * int height - * } - */ - public static final long height$offset() { - return height$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int height - * } - */ - public static int height(MemorySegment struct) { - return struct.get(height$LAYOUT, height$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int height - * } - */ - public static void height(MemorySegment struct, int fieldValue) { - struct.set(height$LAYOUT, height$OFFSET, fieldValue); - } - - private static final OfInt is_external_memory$LAYOUT = (OfInt)$LAYOUT.select(groupElement("is_external_memory")); - - /** - * Layout for field: - * {@snippet lang=c : - * int is_external_memory - * } - */ - public static final OfInt is_external_memory$layout() { - return is_external_memory$LAYOUT; - } - - private static final long is_external_memory$OFFSET = 12; - - /** - * Offset for field: - * {@snippet lang=c : - * int is_external_memory - * } - */ - public static final long is_external_memory$offset() { - return is_external_memory$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int is_external_memory - * } - */ - public static int is_external_memory(MemorySegment struct) { - return struct.get(is_external_memory$LAYOUT, is_external_memory$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int is_external_memory - * } - */ - public static void is_external_memory(MemorySegment struct, int fieldValue) { - struct.set(is_external_memory$LAYOUT, is_external_memory$OFFSET, fieldValue); - } - - /** - * {@snippet lang=c : - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } - * } - */ - public static class u { - - u() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.unionLayout( - WebPRGBABuffer.layout().withName("RGBA"), - WebPYUVABuffer.layout().withName("YUVA") - ).withName("$anon$207:3"); - - /** - * The layout of this union - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final GroupLayout RGBA$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("RGBA")); - - /** - * Layout for field: - * {@snippet lang=c : - * WebPRGBABuffer RGBA - * } - */ - public static final GroupLayout RGBA$layout() { - return RGBA$LAYOUT; - } - - private static final long RGBA$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * WebPRGBABuffer RGBA - * } - */ - public static final long RGBA$offset() { - return RGBA$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * WebPRGBABuffer RGBA - * } - */ - public static MemorySegment RGBA(MemorySegment union) { - return union.asSlice(RGBA$OFFSET, RGBA$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * WebPRGBABuffer RGBA - * } - */ - public static void RGBA(MemorySegment union, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, union, RGBA$OFFSET, RGBA$LAYOUT.byteSize()); - } - - private static final GroupLayout YUVA$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("YUVA")); - - /** - * Layout for field: - * {@snippet lang=c : - * WebPYUVABuffer YUVA - * } - */ - public static final GroupLayout YUVA$layout() { - return YUVA$LAYOUT; - } - - private static final long YUVA$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * WebPYUVABuffer YUVA - * } - */ - public static final long YUVA$offset() { - return YUVA$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * WebPYUVABuffer YUVA - * } - */ - public static MemorySegment YUVA(MemorySegment union) { - return union.asSlice(YUVA$OFFSET, YUVA$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * WebPYUVABuffer YUVA - * } - */ - public static void YUVA(MemorySegment union, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, union, YUVA$OFFSET, YUVA$LAYOUT.byteSize()); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this union - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } - } - - private static final GroupLayout u$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("u")); - - /** - * Layout for field: - * {@snippet lang=c : - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } u - * } - */ - public static final GroupLayout u$layout() { - return u$LAYOUT; - } - - private static final long u$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } u - * } - */ - public static final long u$offset() { - return u$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } u - * } - */ - public static MemorySegment u(MemorySegment struct) { - return struct.asSlice(u$OFFSET, u$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * union { - * WebPRGBABuffer RGBA; - * WebPYUVABuffer YUVA; - * } u - * } - */ - public static void u(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, u$OFFSET, u$LAYOUT.byteSize()); - } - - private static final SequenceLayout pad$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static final SequenceLayout pad$layout() { - return pad$LAYOUT; - } - - private static final long pad$OFFSET = 96; - - /** - * Offset for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static final long pad$offset() { - return pad$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static MemorySegment pad(MemorySegment struct) { - return struct.asSlice(pad$OFFSET, pad$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static void pad(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, pad$OFFSET, pad$LAYOUT.byteSize()); - } - - private static long[] pad$DIMS = { 4 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static long[] pad$dimensions() { - return pad$DIMS; - } - private static final VarHandle pad$ELEM_HANDLE = pad$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static int pad(MemorySegment struct, long index0) { - return (int)pad$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * uint32_t pad[4] - * } - */ - public static void pad(MemorySegment struct, long index0, int fieldValue) { - pad$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - private static final AddressLayout private_memory$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("private_memory")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint8_t *private_memory - * } - */ - public static final AddressLayout private_memory$layout() { - return private_memory$LAYOUT; - } - - private static final long private_memory$OFFSET = 112; - - /** - * Offset for field: - * {@snippet lang=c : - * uint8_t *private_memory - * } - */ - public static final long private_memory$offset() { - return private_memory$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint8_t *private_memory - * } - */ - public static MemorySegment private_memory(MemorySegment struct) { - return struct.get(private_memory$LAYOUT, private_memory$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint8_t *private_memory - * } - */ - public static void private_memory(MemorySegment struct, MemorySegment fieldValue) { - struct.set(private_memory$LAYOUT, private_memory$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderOptions.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderOptions.java deleted file mode 100644 index b749086..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPDecoderOptions.java +++ /dev/null @@ -1,804 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct WebPDecoderOptions { - * int bypass_filtering; - * int no_fancy_upsampling; - * int use_cropping; - * int crop_left; - * int crop_top; - * int crop_width; - * int crop_height; - * int use_scaling; - * int scaled_width; - * int scaled_height; - * int use_threads; - * int dithering_strength; - * int flip; - * int alpha_dithering_strength; - * uint32_t pad[5]; - * } - * } - */ -public class WebPDecoderOptions { - - WebPDecoderOptions() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_INT.withName("bypass_filtering"), - demux_h.C_INT.withName("no_fancy_upsampling"), - demux_h.C_INT.withName("use_cropping"), - demux_h.C_INT.withName("crop_left"), - demux_h.C_INT.withName("crop_top"), - demux_h.C_INT.withName("crop_width"), - demux_h.C_INT.withName("crop_height"), - demux_h.C_INT.withName("use_scaling"), - demux_h.C_INT.withName("scaled_width"), - demux_h.C_INT.withName("scaled_height"), - demux_h.C_INT.withName("use_threads"), - demux_h.C_INT.withName("dithering_strength"), - demux_h.C_INT.withName("flip"), - demux_h.C_INT.withName("alpha_dithering_strength"), - MemoryLayout.sequenceLayout(5, demux_h.C_INT).withName("pad") - ).withName("WebPDecoderOptions"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfInt bypass_filtering$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bypass_filtering")); - - /** - * Layout for field: - * {@snippet lang=c : - * int bypass_filtering - * } - */ - public static final OfInt bypass_filtering$layout() { - return bypass_filtering$LAYOUT; - } - - private static final long bypass_filtering$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * int bypass_filtering - * } - */ - public static final long bypass_filtering$offset() { - return bypass_filtering$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int bypass_filtering - * } - */ - public static int bypass_filtering(MemorySegment struct) { - return struct.get(bypass_filtering$LAYOUT, bypass_filtering$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int bypass_filtering - * } - */ - public static void bypass_filtering(MemorySegment struct, int fieldValue) { - struct.set(bypass_filtering$LAYOUT, bypass_filtering$OFFSET, fieldValue); - } - - private static final OfInt no_fancy_upsampling$LAYOUT = (OfInt)$LAYOUT.select(groupElement("no_fancy_upsampling")); - - /** - * Layout for field: - * {@snippet lang=c : - * int no_fancy_upsampling - * } - */ - public static final OfInt no_fancy_upsampling$layout() { - return no_fancy_upsampling$LAYOUT; - } - - private static final long no_fancy_upsampling$OFFSET = 4; - - /** - * Offset for field: - * {@snippet lang=c : - * int no_fancy_upsampling - * } - */ - public static final long no_fancy_upsampling$offset() { - return no_fancy_upsampling$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int no_fancy_upsampling - * } - */ - public static int no_fancy_upsampling(MemorySegment struct) { - return struct.get(no_fancy_upsampling$LAYOUT, no_fancy_upsampling$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int no_fancy_upsampling - * } - */ - public static void no_fancy_upsampling(MemorySegment struct, int fieldValue) { - struct.set(no_fancy_upsampling$LAYOUT, no_fancy_upsampling$OFFSET, fieldValue); - } - - private static final OfInt use_cropping$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_cropping")); - - /** - * Layout for field: - * {@snippet lang=c : - * int use_cropping - * } - */ - public static final OfInt use_cropping$layout() { - return use_cropping$LAYOUT; - } - - private static final long use_cropping$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * int use_cropping - * } - */ - public static final long use_cropping$offset() { - return use_cropping$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int use_cropping - * } - */ - public static int use_cropping(MemorySegment struct) { - return struct.get(use_cropping$LAYOUT, use_cropping$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int use_cropping - * } - */ - public static void use_cropping(MemorySegment struct, int fieldValue) { - struct.set(use_cropping$LAYOUT, use_cropping$OFFSET, fieldValue); - } - - private static final OfInt crop_left$LAYOUT = (OfInt)$LAYOUT.select(groupElement("crop_left")); - - /** - * Layout for field: - * {@snippet lang=c : - * int crop_left - * } - */ - public static final OfInt crop_left$layout() { - return crop_left$LAYOUT; - } - - private static final long crop_left$OFFSET = 12; - - /** - * Offset for field: - * {@snippet lang=c : - * int crop_left - * } - */ - public static final long crop_left$offset() { - return crop_left$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int crop_left - * } - */ - public static int crop_left(MemorySegment struct) { - return struct.get(crop_left$LAYOUT, crop_left$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int crop_left - * } - */ - public static void crop_left(MemorySegment struct, int fieldValue) { - struct.set(crop_left$LAYOUT, crop_left$OFFSET, fieldValue); - } - - private static final OfInt crop_top$LAYOUT = (OfInt)$LAYOUT.select(groupElement("crop_top")); - - /** - * Layout for field: - * {@snippet lang=c : - * int crop_top - * } - */ - public static final OfInt crop_top$layout() { - return crop_top$LAYOUT; - } - - private static final long crop_top$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * int crop_top - * } - */ - public static final long crop_top$offset() { - return crop_top$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int crop_top - * } - */ - public static int crop_top(MemorySegment struct) { - return struct.get(crop_top$LAYOUT, crop_top$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int crop_top - * } - */ - public static void crop_top(MemorySegment struct, int fieldValue) { - struct.set(crop_top$LAYOUT, crop_top$OFFSET, fieldValue); - } - - private static final OfInt crop_width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("crop_width")); - - /** - * Layout for field: - * {@snippet lang=c : - * int crop_width - * } - */ - public static final OfInt crop_width$layout() { - return crop_width$LAYOUT; - } - - private static final long crop_width$OFFSET = 20; - - /** - * Offset for field: - * {@snippet lang=c : - * int crop_width - * } - */ - public static final long crop_width$offset() { - return crop_width$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int crop_width - * } - */ - public static int crop_width(MemorySegment struct) { - return struct.get(crop_width$LAYOUT, crop_width$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int crop_width - * } - */ - public static void crop_width(MemorySegment struct, int fieldValue) { - struct.set(crop_width$LAYOUT, crop_width$OFFSET, fieldValue); - } - - private static final OfInt crop_height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("crop_height")); - - /** - * Layout for field: - * {@snippet lang=c : - * int crop_height - * } - */ - public static final OfInt crop_height$layout() { - return crop_height$LAYOUT; - } - - private static final long crop_height$OFFSET = 24; - - /** - * Offset for field: - * {@snippet lang=c : - * int crop_height - * } - */ - public static final long crop_height$offset() { - return crop_height$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int crop_height - * } - */ - public static int crop_height(MemorySegment struct) { - return struct.get(crop_height$LAYOUT, crop_height$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int crop_height - * } - */ - public static void crop_height(MemorySegment struct, int fieldValue) { - struct.set(crop_height$LAYOUT, crop_height$OFFSET, fieldValue); - } - - private static final OfInt use_scaling$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_scaling")); - - /** - * Layout for field: - * {@snippet lang=c : - * int use_scaling - * } - */ - public static final OfInt use_scaling$layout() { - return use_scaling$LAYOUT; - } - - private static final long use_scaling$OFFSET = 28; - - /** - * Offset for field: - * {@snippet lang=c : - * int use_scaling - * } - */ - public static final long use_scaling$offset() { - return use_scaling$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int use_scaling - * } - */ - public static int use_scaling(MemorySegment struct) { - return struct.get(use_scaling$LAYOUT, use_scaling$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int use_scaling - * } - */ - public static void use_scaling(MemorySegment struct, int fieldValue) { - struct.set(use_scaling$LAYOUT, use_scaling$OFFSET, fieldValue); - } - - private static final OfInt scaled_width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("scaled_width")); - - /** - * Layout for field: - * {@snippet lang=c : - * int scaled_width - * } - */ - public static final OfInt scaled_width$layout() { - return scaled_width$LAYOUT; - } - - private static final long scaled_width$OFFSET = 32; - - /** - * Offset for field: - * {@snippet lang=c : - * int scaled_width - * } - */ - public static final long scaled_width$offset() { - return scaled_width$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int scaled_width - * } - */ - public static int scaled_width(MemorySegment struct) { - return struct.get(scaled_width$LAYOUT, scaled_width$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int scaled_width - * } - */ - public static void scaled_width(MemorySegment struct, int fieldValue) { - struct.set(scaled_width$LAYOUT, scaled_width$OFFSET, fieldValue); - } - - private static final OfInt scaled_height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("scaled_height")); - - /** - * Layout for field: - * {@snippet lang=c : - * int scaled_height - * } - */ - public static final OfInt scaled_height$layout() { - return scaled_height$LAYOUT; - } - - private static final long scaled_height$OFFSET = 36; - - /** - * Offset for field: - * {@snippet lang=c : - * int scaled_height - * } - */ - public static final long scaled_height$offset() { - return scaled_height$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int scaled_height - * } - */ - public static int scaled_height(MemorySegment struct) { - return struct.get(scaled_height$LAYOUT, scaled_height$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int scaled_height - * } - */ - public static void scaled_height(MemorySegment struct, int fieldValue) { - struct.set(scaled_height$LAYOUT, scaled_height$OFFSET, fieldValue); - } - - private static final OfInt use_threads$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_threads")); - - /** - * Layout for field: - * {@snippet lang=c : - * int use_threads - * } - */ - public static final OfInt use_threads$layout() { - return use_threads$LAYOUT; - } - - private static final long use_threads$OFFSET = 40; - - /** - * Offset for field: - * {@snippet lang=c : - * int use_threads - * } - */ - public static final long use_threads$offset() { - return use_threads$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int use_threads - * } - */ - public static int use_threads(MemorySegment struct) { - return struct.get(use_threads$LAYOUT, use_threads$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int use_threads - * } - */ - public static void use_threads(MemorySegment struct, int fieldValue) { - struct.set(use_threads$LAYOUT, use_threads$OFFSET, fieldValue); - } - - private static final OfInt dithering_strength$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dithering_strength")); - - /** - * Layout for field: - * {@snippet lang=c : - * int dithering_strength - * } - */ - public static final OfInt dithering_strength$layout() { - return dithering_strength$LAYOUT; - } - - private static final long dithering_strength$OFFSET = 44; - - /** - * Offset for field: - * {@snippet lang=c : - * int dithering_strength - * } - */ - public static final long dithering_strength$offset() { - return dithering_strength$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int dithering_strength - * } - */ - public static int dithering_strength(MemorySegment struct) { - return struct.get(dithering_strength$LAYOUT, dithering_strength$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int dithering_strength - * } - */ - public static void dithering_strength(MemorySegment struct, int fieldValue) { - struct.set(dithering_strength$LAYOUT, dithering_strength$OFFSET, fieldValue); - } - - private static final OfInt flip$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flip")); - - /** - * Layout for field: - * {@snippet lang=c : - * int flip - * } - */ - public static final OfInt flip$layout() { - return flip$LAYOUT; - } - - private static final long flip$OFFSET = 48; - - /** - * Offset for field: - * {@snippet lang=c : - * int flip - * } - */ - public static final long flip$offset() { - return flip$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int flip - * } - */ - public static int flip(MemorySegment struct) { - return struct.get(flip$LAYOUT, flip$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int flip - * } - */ - public static void flip(MemorySegment struct, int fieldValue) { - struct.set(flip$LAYOUT, flip$OFFSET, fieldValue); - } - - private static final OfInt alpha_dithering_strength$LAYOUT = (OfInt)$LAYOUT.select(groupElement("alpha_dithering_strength")); - - /** - * Layout for field: - * {@snippet lang=c : - * int alpha_dithering_strength - * } - */ - public static final OfInt alpha_dithering_strength$layout() { - return alpha_dithering_strength$LAYOUT; - } - - private static final long alpha_dithering_strength$OFFSET = 52; - - /** - * Offset for field: - * {@snippet lang=c : - * int alpha_dithering_strength - * } - */ - public static final long alpha_dithering_strength$offset() { - return alpha_dithering_strength$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int alpha_dithering_strength - * } - */ - public static int alpha_dithering_strength(MemorySegment struct) { - return struct.get(alpha_dithering_strength$LAYOUT, alpha_dithering_strength$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int alpha_dithering_strength - * } - */ - public static void alpha_dithering_strength(MemorySegment struct, int fieldValue) { - struct.set(alpha_dithering_strength$LAYOUT, alpha_dithering_strength$OFFSET, fieldValue); - } - - private static final SequenceLayout pad$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("pad")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static final SequenceLayout pad$layout() { - return pad$LAYOUT; - } - - private static final long pad$OFFSET = 56; - - /** - * Offset for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static final long pad$offset() { - return pad$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static MemorySegment pad(MemorySegment struct) { - return struct.asSlice(pad$OFFSET, pad$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static void pad(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, pad$OFFSET, pad$LAYOUT.byteSize()); - } - - private static long[] pad$DIMS = { 5 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static long[] pad$dimensions() { - return pad$DIMS; - } - private static final VarHandle pad$ELEM_HANDLE = pad$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static int pad(MemorySegment struct, long index0) { - return (int)pad$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * uint32_t pad[5] - * } - */ - public static void pad(MemorySegment struct, long index0, int fieldValue) { - pad$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPYUVABuffer.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPYUVABuffer.java deleted file mode 100644 index b296566..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/WebPYUVABuffer.java +++ /dev/null @@ -1,633 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct WebPYUVABuffer { - * uint8_t *y; - * uint8_t *u; - * uint8_t *v; - * uint8_t *a; - * int y_stride; - * int u_stride; - * int v_stride; - * int a_stride; - * size_t y_size; - * size_t u_size; - * size_t v_size; - * size_t a_size; - * } - * } - */ -public class WebPYUVABuffer { - - WebPYUVABuffer() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_POINTER.withName("y"), - demux_h.C_POINTER.withName("u"), - demux_h.C_POINTER.withName("v"), - demux_h.C_POINTER.withName("a"), - demux_h.C_INT.withName("y_stride"), - demux_h.C_INT.withName("u_stride"), - demux_h.C_INT.withName("v_stride"), - demux_h.C_INT.withName("a_stride"), - demux_h.C_LONG.withName("y_size"), - demux_h.C_LONG.withName("u_size"), - demux_h.C_LONG.withName("v_size"), - demux_h.C_LONG.withName("a_size") - ).withName("WebPYUVABuffer"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final AddressLayout y$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("y")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint8_t *y - * } - */ - public static final AddressLayout y$layout() { - return y$LAYOUT; - } - - private static final long y$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * uint8_t *y - * } - */ - public static final long y$offset() { - return y$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint8_t *y - * } - */ - public static MemorySegment y(MemorySegment struct) { - return struct.get(y$LAYOUT, y$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint8_t *y - * } - */ - public static void y(MemorySegment struct, MemorySegment fieldValue) { - struct.set(y$LAYOUT, y$OFFSET, fieldValue); - } - - private static final AddressLayout u$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("u")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint8_t *u - * } - */ - public static final AddressLayout u$layout() { - return u$LAYOUT; - } - - private static final long u$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * uint8_t *u - * } - */ - public static final long u$offset() { - return u$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint8_t *u - * } - */ - public static MemorySegment u(MemorySegment struct) { - return struct.get(u$LAYOUT, u$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint8_t *u - * } - */ - public static void u(MemorySegment struct, MemorySegment fieldValue) { - struct.set(u$LAYOUT, u$OFFSET, fieldValue); - } - - private static final AddressLayout v$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("v")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint8_t *v - * } - */ - public static final AddressLayout v$layout() { - return v$LAYOUT; - } - - private static final long v$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * uint8_t *v - * } - */ - public static final long v$offset() { - return v$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint8_t *v - * } - */ - public static MemorySegment v(MemorySegment struct) { - return struct.get(v$LAYOUT, v$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint8_t *v - * } - */ - public static void v(MemorySegment struct, MemorySegment fieldValue) { - struct.set(v$LAYOUT, v$OFFSET, fieldValue); - } - - private static final AddressLayout a$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("a")); - - /** - * Layout for field: - * {@snippet lang=c : - * uint8_t *a - * } - */ - public static final AddressLayout a$layout() { - return a$LAYOUT; - } - - private static final long a$OFFSET = 24; - - /** - * Offset for field: - * {@snippet lang=c : - * uint8_t *a - * } - */ - public static final long a$offset() { - return a$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * uint8_t *a - * } - */ - public static MemorySegment a(MemorySegment struct) { - return struct.get(a$LAYOUT, a$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * uint8_t *a - * } - */ - public static void a(MemorySegment struct, MemorySegment fieldValue) { - struct.set(a$LAYOUT, a$OFFSET, fieldValue); - } - - private static final OfInt y_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("y_stride")); - - /** - * Layout for field: - * {@snippet lang=c : - * int y_stride - * } - */ - public static final OfInt y_stride$layout() { - return y_stride$LAYOUT; - } - - private static final long y_stride$OFFSET = 32; - - /** - * Offset for field: - * {@snippet lang=c : - * int y_stride - * } - */ - public static final long y_stride$offset() { - return y_stride$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int y_stride - * } - */ - public static int y_stride(MemorySegment struct) { - return struct.get(y_stride$LAYOUT, y_stride$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int y_stride - * } - */ - public static void y_stride(MemorySegment struct, int fieldValue) { - struct.set(y_stride$LAYOUT, y_stride$OFFSET, fieldValue); - } - - private static final OfInt u_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("u_stride")); - - /** - * Layout for field: - * {@snippet lang=c : - * int u_stride - * } - */ - public static final OfInt u_stride$layout() { - return u_stride$LAYOUT; - } - - private static final long u_stride$OFFSET = 36; - - /** - * Offset for field: - * {@snippet lang=c : - * int u_stride - * } - */ - public static final long u_stride$offset() { - return u_stride$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int u_stride - * } - */ - public static int u_stride(MemorySegment struct) { - return struct.get(u_stride$LAYOUT, u_stride$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int u_stride - * } - */ - public static void u_stride(MemorySegment struct, int fieldValue) { - struct.set(u_stride$LAYOUT, u_stride$OFFSET, fieldValue); - } - - private static final OfInt v_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("v_stride")); - - /** - * Layout for field: - * {@snippet lang=c : - * int v_stride - * } - */ - public static final OfInt v_stride$layout() { - return v_stride$LAYOUT; - } - - private static final long v_stride$OFFSET = 40; - - /** - * Offset for field: - * {@snippet lang=c : - * int v_stride - * } - */ - public static final long v_stride$offset() { - return v_stride$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int v_stride - * } - */ - public static int v_stride(MemorySegment struct) { - return struct.get(v_stride$LAYOUT, v_stride$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int v_stride - * } - */ - public static void v_stride(MemorySegment struct, int fieldValue) { - struct.set(v_stride$LAYOUT, v_stride$OFFSET, fieldValue); - } - - private static final OfInt a_stride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("a_stride")); - - /** - * Layout for field: - * {@snippet lang=c : - * int a_stride - * } - */ - public static final OfInt a_stride$layout() { - return a_stride$LAYOUT; - } - - private static final long a_stride$OFFSET = 44; - - /** - * Offset for field: - * {@snippet lang=c : - * int a_stride - * } - */ - public static final long a_stride$offset() { - return a_stride$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * int a_stride - * } - */ - public static int a_stride(MemorySegment struct) { - return struct.get(a_stride$LAYOUT, a_stride$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * int a_stride - * } - */ - public static void a_stride(MemorySegment struct, int fieldValue) { - struct.set(a_stride$LAYOUT, a_stride$OFFSET, fieldValue); - } - - private static final OfLong y_size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("y_size")); - - /** - * Layout for field: - * {@snippet lang=c : - * size_t y_size - * } - */ - public static final OfLong y_size$layout() { - return y_size$LAYOUT; - } - - private static final long y_size$OFFSET = 48; - - /** - * Offset for field: - * {@snippet lang=c : - * size_t y_size - * } - */ - public static final long y_size$offset() { - return y_size$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * size_t y_size - * } - */ - public static long y_size(MemorySegment struct) { - return struct.get(y_size$LAYOUT, y_size$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * size_t y_size - * } - */ - public static void y_size(MemorySegment struct, long fieldValue) { - struct.set(y_size$LAYOUT, y_size$OFFSET, fieldValue); - } - - private static final OfLong u_size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("u_size")); - - /** - * Layout for field: - * {@snippet lang=c : - * size_t u_size - * } - */ - public static final OfLong u_size$layout() { - return u_size$LAYOUT; - } - - private static final long u_size$OFFSET = 56; - - /** - * Offset for field: - * {@snippet lang=c : - * size_t u_size - * } - */ - public static final long u_size$offset() { - return u_size$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * size_t u_size - * } - */ - public static long u_size(MemorySegment struct) { - return struct.get(u_size$LAYOUT, u_size$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * size_t u_size - * } - */ - public static void u_size(MemorySegment struct, long fieldValue) { - struct.set(u_size$LAYOUT, u_size$OFFSET, fieldValue); - } - - private static final OfLong v_size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("v_size")); - - /** - * Layout for field: - * {@snippet lang=c : - * size_t v_size - * } - */ - public static final OfLong v_size$layout() { - return v_size$LAYOUT; - } - - private static final long v_size$OFFSET = 64; - - /** - * Offset for field: - * {@snippet lang=c : - * size_t v_size - * } - */ - public static final long v_size$offset() { - return v_size$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * size_t v_size - * } - */ - public static long v_size(MemorySegment struct) { - return struct.get(v_size$LAYOUT, v_size$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * size_t v_size - * } - */ - public static void v_size(MemorySegment struct, long fieldValue) { - struct.set(v_size$LAYOUT, v_size$OFFSET, fieldValue); - } - - private static final OfLong a_size$LAYOUT = (OfLong)$LAYOUT.select(groupElement("a_size")); - - /** - * Layout for field: - * {@snippet lang=c : - * size_t a_size - * } - */ - public static final OfLong a_size$layout() { - return a_size$LAYOUT; - } - - private static final long a_size$OFFSET = 72; - - /** - * Offset for field: - * {@snippet lang=c : - * size_t a_size - * } - */ - public static final long a_size$offset() { - return a_size$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * size_t a_size - * } - */ - public static long a_size(MemorySegment struct) { - return struct.get(a_size$LAYOUT, a_size$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * size_t a_size - * } - */ - public static void a_size(MemorySegment struct, long fieldValue) { - struct.set(a_size$LAYOUT, a_size$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_mbstate_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_mbstate_t.java deleted file mode 100644 index e67b099..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_mbstate_t.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef __mbstate_t __darwin_mbstate_t - * } - */ -public class __darwin_mbstate_t extends __mbstate_t { - - __darwin_mbstate_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_attr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_attr_t.java deleted file mode 100644 index 1ec0084..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_attr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_attr_t { - * long __sig; - * char __opaque[56]; - * } __darwin_pthread_attr_t - * } - */ -public class __darwin_pthread_attr_t extends _opaque_pthread_attr_t { - - __darwin_pthread_attr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_cond_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_cond_t.java deleted file mode 100644 index 5f138fd..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_cond_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_cond_t { - * long __sig; - * char __opaque[40]; - * } __darwin_pthread_cond_t - * } - */ -public class __darwin_pthread_cond_t extends _opaque_pthread_cond_t { - - __darwin_pthread_cond_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_condattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_condattr_t.java deleted file mode 100644 index 699a837..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_condattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_condattr_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_condattr_t - * } - */ -public class __darwin_pthread_condattr_t extends _opaque_pthread_condattr_t { - - __darwin_pthread_condattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_handler_rec.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_handler_rec.java deleted file mode 100644 index 2f66e8d..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_handler_rec.java +++ /dev/null @@ -1,272 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec { - * void (*__routine)(void *); - * void *__arg; - * struct __darwin_pthread_handler_rec *__next; - * } - * } - */ -public class __darwin_pthread_handler_rec { - - __darwin_pthread_handler_rec() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_POINTER.withName("__routine"), - demux_h.C_POINTER.withName("__arg"), - demux_h.C_POINTER.withName("__next") - ).withName("__darwin_pthread_handler_rec"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - /** - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static class __routine { - - __routine() { - // Should not be called directly - } - - /** - * The function pointer signature, expressed as a functional interface - */ - public interface Function { - void apply(MemorySegment _x0); - } - - private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid( - demux_h.C_POINTER - ); - - /** - * The descriptor of this function pointer - */ - public static FunctionDescriptor descriptor() { - return $DESC; - } - - private static final MethodHandle UP$MH = demux_h.upcallHandle(__routine.Function.class, "apply", $DESC); - - /** - * Allocates a new upcall stub, whose implementation is defined by {@code fi}. - * The lifetime of the returned segment is managed by {@code arena} - */ - public static MemorySegment allocate(__routine.Function fi, Arena arena) { - return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); - } - - private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); - - /** - * Invoke the upcall stub {@code funcPtr}, with given parameters - */ - public static void invoke(MemorySegment funcPtr,MemorySegment _x0) { - try { - DOWN$MH.invokeExact(funcPtr, _x0); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - } - } - - private static final AddressLayout __routine$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__routine")); - - /** - * Layout for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static final AddressLayout __routine$layout() { - return __routine$LAYOUT; - } - - private static final long __routine$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static final long __routine$offset() { - return __routine$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static MemorySegment __routine(MemorySegment struct) { - return struct.get(__routine$LAYOUT, __routine$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * void (*__routine)(void *) - * } - */ - public static void __routine(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__routine$LAYOUT, __routine$OFFSET, fieldValue); - } - - private static final AddressLayout __arg$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__arg")); - - /** - * Layout for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static final AddressLayout __arg$layout() { - return __arg$LAYOUT; - } - - private static final long __arg$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static final long __arg$offset() { - return __arg$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static MemorySegment __arg(MemorySegment struct) { - return struct.get(__arg$LAYOUT, __arg$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * void *__arg - * } - */ - public static void __arg(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__arg$LAYOUT, __arg$OFFSET, fieldValue); - } - - private static final AddressLayout __next$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__next")); - - /** - * Layout for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static final AddressLayout __next$layout() { - return __next$LAYOUT; - } - - private static final long __next$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static final long __next$offset() { - return __next$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static MemorySegment __next(MemorySegment struct) { - return struct.get(__next$LAYOUT, __next$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__next - * } - */ - public static void __next(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__next$LAYOUT, __next$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutex_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutex_t.java deleted file mode 100644 index 9cce015..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutex_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_mutex_t { - * long __sig; - * char __opaque[56]; - * } __darwin_pthread_mutex_t - * } - */ -public class __darwin_pthread_mutex_t extends _opaque_pthread_mutex_t { - - __darwin_pthread_mutex_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutexattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutexattr_t.java deleted file mode 100644 index f4baa54..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_mutexattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_mutexattr_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_mutexattr_t - * } - */ -public class __darwin_pthread_mutexattr_t extends _opaque_pthread_mutexattr_t { - - __darwin_pthread_mutexattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_once_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_once_t.java deleted file mode 100644 index 80c6f6d..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_once_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_once_t { - * long __sig; - * char __opaque[8]; - * } __darwin_pthread_once_t - * } - */ -public class __darwin_pthread_once_t extends _opaque_pthread_once_t { - - __darwin_pthread_once_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlock_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlock_t.java deleted file mode 100644 index 3c03815..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlock_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_rwlock_t { - * long __sig; - * char __opaque[192]; - * } __darwin_pthread_rwlock_t - * } - */ -public class __darwin_pthread_rwlock_t extends _opaque_pthread_rwlock_t { - - __darwin_pthread_rwlock_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlockattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlockattr_t.java deleted file mode 100644 index b1cdf4d..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__darwin_pthread_rwlockattr_t.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * typedef struct _opaque_pthread_rwlockattr_t { - * long __sig; - * char __opaque[16]; - * } __darwin_pthread_rwlockattr_t - * } - */ -public class __darwin_pthread_rwlockattr_t extends _opaque_pthread_rwlockattr_t { - - __darwin_pthread_rwlockattr_t() { - // Should not be called directly - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__mbstate_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__mbstate_t.java deleted file mode 100644 index 86983f3..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/__mbstate_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * union { - * char __mbstate8[128]; - * long long _mbstateL; - * } - * } - */ -public class __mbstate_t { - - __mbstate_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.unionLayout( - MemoryLayout.sequenceLayout(128, demux_h.C_CHAR).withName("__mbstate8"), - demux_h.C_LONG_LONG.withName("_mbstateL") - ).withName("$anon$54:9"); - - /** - * The layout of this union - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final SequenceLayout __mbstate8$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__mbstate8")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static final SequenceLayout __mbstate8$layout() { - return __mbstate8$LAYOUT; - } - - private static final long __mbstate8$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static final long __mbstate8$offset() { - return __mbstate8$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static MemorySegment __mbstate8(MemorySegment union) { - return union.asSlice(__mbstate8$OFFSET, __mbstate8$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static void __mbstate8(MemorySegment union, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, union, __mbstate8$OFFSET, __mbstate8$LAYOUT.byteSize()); - } - - private static long[] __mbstate8$DIMS = { 128 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static long[] __mbstate8$dimensions() { - return __mbstate8$DIMS; - } - private static final VarHandle __mbstate8$ELEM_HANDLE = __mbstate8$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static byte __mbstate8(MemorySegment union, long index0) { - return (byte)__mbstate8$ELEM_HANDLE.get(union, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __mbstate8[128] - * } - */ - public static void __mbstate8(MemorySegment union, long index0, byte fieldValue) { - __mbstate8$ELEM_HANDLE.set(union, 0L, index0, fieldValue); - } - - private static final OfLong _mbstateL$LAYOUT = (OfLong)$LAYOUT.select(groupElement("_mbstateL")); - - /** - * Layout for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static final OfLong _mbstateL$layout() { - return _mbstateL$LAYOUT; - } - - private static final long _mbstateL$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static final long _mbstateL$offset() { - return _mbstateL$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static long _mbstateL(MemorySegment union) { - return union.get(_mbstateL$LAYOUT, _mbstateL$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long long _mbstateL - * } - */ - public static void _mbstateL(MemorySegment union, long fieldValue) { - union.set(_mbstateL$LAYOUT, _mbstateL$OFFSET, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this union - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_attr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_attr_t.java deleted file mode 100644 index 4e452cd..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_attr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_attr_t { - * long __sig; - * char __opaque[56]; - * } - * } - */ -public class _opaque_pthread_attr_t { - - _opaque_pthread_attr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(56, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_attr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 56 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_cond_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_cond_t.java deleted file mode 100644 index 048b9ec..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_cond_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_cond_t { - * long __sig; - * char __opaque[40]; - * } - * } - */ -public class _opaque_pthread_cond_t { - - _opaque_pthread_cond_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(40, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_cond_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 40 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[40] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_condattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_condattr_t.java deleted file mode 100644 index fafdd64..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_condattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_condattr_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_condattr_t { - - _opaque_pthread_condattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_condattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutex_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutex_t.java deleted file mode 100644 index de632db..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutex_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_mutex_t { - * long __sig; - * char __opaque[56]; - * } - * } - */ -public class _opaque_pthread_mutex_t { - - _opaque_pthread_mutex_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(56, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_mutex_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 56 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[56] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutexattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutexattr_t.java deleted file mode 100644 index 35f6e90..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_mutexattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_mutexattr_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_mutexattr_t { - - _opaque_pthread_mutexattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_mutexattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_once_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_once_t.java deleted file mode 100644 index fa37fbc..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_once_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_once_t { - * long __sig; - * char __opaque[8]; - * } - * } - */ -public class _opaque_pthread_once_t { - - _opaque_pthread_once_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(8, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_once_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlock_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlock_t.java deleted file mode 100644 index b04b29c..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlock_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_rwlock_t { - * long __sig; - * char __opaque[192]; - * } - * } - */ -public class _opaque_pthread_rwlock_t { - - _opaque_pthread_rwlock_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(192, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_rwlock_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 192 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[192] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlockattr_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlockattr_t.java deleted file mode 100644 index acaf218..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_rwlockattr_t.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_rwlockattr_t { - * long __sig; - * char __opaque[16]; - * } - * } - */ -public class _opaque_pthread_rwlockattr_t { - - _opaque_pthread_rwlockattr_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - MemoryLayout.sequenceLayout(16, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_rwlockattr_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 16 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[16] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_t.java b/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_t.java deleted file mode 100644 index 4156880..0000000 --- a/imageio-webp/src/main/java22/com/github/gotson/nightmonkeys/webp/lib/panama/webpdemux/_opaque_pthread_t.java +++ /dev/null @@ -1,252 +0,0 @@ -// Generated by jextract - -package com.github.gotson.nightmonkeys.webp.lib.panama.webpdemux; - -import java.lang.invoke.*; -import java.lang.foreign.*; -import java.nio.ByteOrder; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static java.lang.foreign.ValueLayout.*; -import static java.lang.foreign.MemoryLayout.PathElement.*; - -/** - * {@snippet lang=c : - * struct _opaque_pthread_t { - * long __sig; - * struct __darwin_pthread_handler_rec *__cleanup_stack; - * char __opaque[8176]; - * } - * } - */ -public class _opaque_pthread_t { - - _opaque_pthread_t() { - // Should not be called directly - } - - private static final GroupLayout $LAYOUT = MemoryLayout.structLayout( - demux_h.C_LONG.withName("__sig"), - demux_h.C_POINTER.withName("__cleanup_stack"), - MemoryLayout.sequenceLayout(8176, demux_h.C_CHAR).withName("__opaque") - ).withName("_opaque_pthread_t"); - - /** - * The layout of this struct - */ - public static final GroupLayout layout() { - return $LAYOUT; - } - - private static final OfLong __sig$LAYOUT = (OfLong)$LAYOUT.select(groupElement("__sig")); - - /** - * Layout for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final OfLong __sig$layout() { - return __sig$LAYOUT; - } - - private static final long __sig$OFFSET = 0; - - /** - * Offset for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static final long __sig$offset() { - return __sig$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static long __sig(MemorySegment struct) { - return struct.get(__sig$LAYOUT, __sig$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * long __sig - * } - */ - public static void __sig(MemorySegment struct, long fieldValue) { - struct.set(__sig$LAYOUT, __sig$OFFSET, fieldValue); - } - - private static final AddressLayout __cleanup_stack$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("__cleanup_stack")); - - /** - * Layout for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static final AddressLayout __cleanup_stack$layout() { - return __cleanup_stack$LAYOUT; - } - - private static final long __cleanup_stack$OFFSET = 8; - - /** - * Offset for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static final long __cleanup_stack$offset() { - return __cleanup_stack$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static MemorySegment __cleanup_stack(MemorySegment struct) { - return struct.get(__cleanup_stack$LAYOUT, __cleanup_stack$OFFSET); - } - - /** - * Setter for field: - * {@snippet lang=c : - * struct __darwin_pthread_handler_rec *__cleanup_stack - * } - */ - public static void __cleanup_stack(MemorySegment struct, MemorySegment fieldValue) { - struct.set(__cleanup_stack$LAYOUT, __cleanup_stack$OFFSET, fieldValue); - } - - private static final SequenceLayout __opaque$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("__opaque")); - - /** - * Layout for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static final SequenceLayout __opaque$layout() { - return __opaque$LAYOUT; - } - - private static final long __opaque$OFFSET = 16; - - /** - * Offset for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static final long __opaque$offset() { - return __opaque$OFFSET; - } - - /** - * Getter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static MemorySegment __opaque(MemorySegment struct) { - return struct.asSlice(__opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - /** - * Setter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static void __opaque(MemorySegment struct, MemorySegment fieldValue) { - MemorySegment.copy(fieldValue, 0L, struct, __opaque$OFFSET, __opaque$LAYOUT.byteSize()); - } - - private static long[] __opaque$DIMS = { 8176 }; - - /** - * Dimensions for array field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static long[] __opaque$dimensions() { - return __opaque$DIMS; - } - private static final VarHandle __opaque$ELEM_HANDLE = __opaque$LAYOUT.varHandle(sequenceElement()); - - /** - * Indexed getter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static byte __opaque(MemorySegment struct, long index0) { - return (byte)__opaque$ELEM_HANDLE.get(struct, 0L, index0); - } - - /** - * Indexed setter for field: - * {@snippet lang=c : - * char __opaque[8176] - * } - */ - public static void __opaque(MemorySegment struct, long index0, byte fieldValue) { - __opaque$ELEM_HANDLE.set(struct, 0L, index0, fieldValue); - } - - /** - * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. - * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} - */ - public static MemorySegment asSlice(MemorySegment array, long index) { - return array.asSlice(layout().byteSize() * index); - } - - /** - * The size (in bytes) of this struct - */ - public static long sizeof() { return layout().byteSize(); } - - /** - * Allocate a segment of size {@code layout().byteSize()} using {@code allocator} - */ - public static MemorySegment allocate(SegmentAllocator allocator) { - return allocator.allocate(layout()); - } - - /** - * Allocate an array of size {@code elementCount} using {@code allocator}. - * The returned segment has size {@code elementCount * layout().byteSize()}. - */ - public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout())); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) { - return reinterpret(addr, 1, arena, cleanup); - } - - /** - * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any). - * The returned segment has size {@code elementCount * layout().byteSize()} - */ - public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) { - return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup); - } -} - diff --git a/imageio-webp/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi b/imageio-webp/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi new file mode 100644 index 0000000..51bfd63 --- /dev/null +++ b/imageio-webp/src/main/resources/META-INF/services/javax.imageio.spi.ImageWriterSpi @@ -0,0 +1 @@ +com.github.gotson.nightmonkeys.webp.imageio.plugins.WebpImageWriterSpi \ No newline at end of file diff --git a/imageio-webp/src/test/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java b/imageio-webp/src/test/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java new file mode 100644 index 0000000..1c93709 --- /dev/null +++ b/imageio-webp/src/test/java/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java @@ -0,0 +1,24 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.github.gotson.nightmonkeys.common.imageio.NoOpImageWriterAbstractTest; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +class WebpImageWriterTest extends NoOpImageWriterAbstractTest { + @Override + protected List getFormatNames() { + return Arrays.asList("webp", "WebP"); + } + + @Override + protected List getSuffixes() { + return Collections.singletonList("webp"); + } + + @Override + protected List getMIMETypes() { + return Collections.singletonList("image/webp"); + } +} diff --git a/imageio-webp/src/test/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java b/imageio-webp/src/test/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java new file mode 100644 index 0000000..eb1ce48 --- /dev/null +++ b/imageio-webp/src/test/java22/com/github/gotson/nightmonkeys/webp/imageio/plugins/WebpImageWriterTest.java @@ -0,0 +1,21 @@ +package com.github.gotson.nightmonkeys.webp.imageio.plugins; + +import com.twelvemonkeys.imageio.util.ImageWriterAbstractTest; + +import javax.imageio.spi.ImageWriterSpi; +import java.awt.image.BufferedImage; +import java.awt.image.RenderedImage; +import java.util.List; + +public class WebpImageWriterTest extends ImageWriterAbstractTest { + + @Override + protected ImageWriterSpi createProvider() { + return new WebpImageWriterSpi(); + } + + @Override + protected List getTestData() { + return List.of(new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB)); + } +} \ No newline at end of file