<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi Manuel,
<div><br>
</div>
<div>Very interesting approach, and I think a good one when a rich platform/framework provides metadata that cannot be or not easily be represented in C header files. A specific tool in these cases should result in superior binding APIs.</div>
<div><br>
</div>
<div>I have seen a very similar approach applied to generate Java bindings to Gtk, GStreamer etc, operating on the GObject introspection files rather than the C header files.</div>
<div> </div>
<div>  https://jwharm.github.io/java-gi/</div>
<div><br>
</div>
<div>
<div>So you are in good company here :-)</div>
</div>
<div><br>
</div>
<div>Paul.</div>
<div><br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Jun 4, 2025, at 9:12 AM, Manuel Bleichenbacher <manuel.bleichenbacher@gmail.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="ltr">Dear Panama team
<div><br>
</div>
<div>Here is a project I would like to bring to your attention: Windows API Generator (<a href="https://github.com/manuelbl/WindowsApiGenerator">https://github.com/manuelbl/WindowsApiGenerator</a>) generates Java code for accessing the Windows API using the
 FFM API.</div>
<div><br>
</div>
<div>For the Windows API, it achieves something similar to jextract. Unlike jextract, it does not process C header files. Instead, the generator processes rich metadata curated by Microsoft. And it takes full advantage of it...</div>
<div><br>
</div>
<div>The generator produces code for functions, structs, unions, callback functions, constants, enumerations and COM interfaces. It adds the call state capture parameter where necessary, produces code for structs of variable size, automatically initializes
 the "cbSize" field etc. COM objects can be called from Java, and they can be implemented in Java. Constants do not just cover integer constants, but also strings, GUIDs, DEVPKEYs and more.</div>
<div><br>
</div>
<div>The generator is easy to use as it is available both as a Maven and Gradle plugin. And it is sufficient to specify a small number of functions and structs in pom.xml or build.gradle. The related types such a function parameter types or types referenced
 by structs will be added automatically.</div>
<div><br>
</div>
<div>For the Java Does USB project (<a href="https://github.com/manuelbl/JavaDoesUSB">https://github.com/manuelbl/JavaDoesUSB</a>), it has tremendously helped to remove manually written code that was beyond the capability of jextract, and to simplify the code
 using variable size structs and non-integer constants.</div>
<div><br>
</div>
<div>Regards</div>
<div>Manuel</div>
<div><br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>