-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
53,611 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ build | |
|
||
jextract* | ||
logo* | ||
libs/lib* | ||
native_libs/lib* | ||
includes.txt | ||
includes_filtered.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdocs build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
core/src/main/java/app/photofox/imffm/generated/AcquireAlignedMemoryHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Generated by jextract | ||
|
||
package app.photofox.imffm.generated; | ||
|
||
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 void *(*AcquireAlignedMemoryHandler)(const size_t, const size_t) | ||
* } | ||
*/ | ||
public class AcquireAlignedMemoryHandler { | ||
|
||
AcquireAlignedMemoryHandler() { | ||
// Should not be called directly | ||
} | ||
|
||
/** | ||
* The function pointer signature, expressed as a functional interface | ||
*/ | ||
public interface Function { | ||
MemorySegment apply(long _x0, long _x1); | ||
} | ||
|
||
private static final FunctionDescriptor $DESC = FunctionDescriptor.of( | ||
MagickWand_h.C_POINTER, | ||
MagickWand_h.C_LONG, | ||
MagickWand_h.C_LONG | ||
); | ||
|
||
/** | ||
* The descriptor of this function pointer | ||
*/ | ||
public static FunctionDescriptor descriptor() { | ||
return $DESC; | ||
} | ||
|
||
private static final MethodHandle UP$MH = MagickWand_h.upcallHandle(AcquireAlignedMemoryHandler.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(AcquireAlignedMemoryHandler.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 MemorySegment invoke(MemorySegment funcPtr,long _x0, long _x1) { | ||
try { | ||
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); | ||
} catch (Throwable ex$) { | ||
throw new AssertionError("should not reach here", ex$); | ||
} | ||
} | ||
} | ||
|
68 changes: 68 additions & 0 deletions
68
core/src/main/java/app/photofox/imffm/generated/AcquireMemoryHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Generated by jextract | ||
|
||
package app.photofox.imffm.generated; | ||
|
||
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 void *(*AcquireMemoryHandler)(size_t) | ||
* } | ||
*/ | ||
public class AcquireMemoryHandler { | ||
|
||
AcquireMemoryHandler() { | ||
// Should not be called directly | ||
} | ||
|
||
/** | ||
* The function pointer signature, expressed as a functional interface | ||
*/ | ||
public interface Function { | ||
MemorySegment apply(long _x0); | ||
} | ||
|
||
private static final FunctionDescriptor $DESC = FunctionDescriptor.of( | ||
MagickWand_h.C_POINTER, | ||
MagickWand_h.C_LONG | ||
); | ||
|
||
/** | ||
* The descriptor of this function pointer | ||
*/ | ||
public static FunctionDescriptor descriptor() { | ||
return $DESC; | ||
} | ||
|
||
private static final MethodHandle UP$MH = MagickWand_h.upcallHandle(AcquireMemoryHandler.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(AcquireMemoryHandler.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 MemorySegment invoke(MemorySegment funcPtr,long _x0) { | ||
try { | ||
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0); | ||
} catch (Throwable ex$) { | ||
throw new AssertionError("should not reach here", ex$); | ||
} | ||
} | ||
} | ||
|
70 changes: 70 additions & 0 deletions
70
core/src/main/java/app/photofox/imffm/generated/CustomStreamHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Generated by jextract | ||
|
||
package app.photofox.imffm.generated; | ||
|
||
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 ssize_t (*CustomStreamHandler)(unsigned char *, const size_t, void *) | ||
* } | ||
*/ | ||
public class CustomStreamHandler { | ||
|
||
CustomStreamHandler() { | ||
// Should not be called directly | ||
} | ||
|
||
/** | ||
* The function pointer signature, expressed as a functional interface | ||
*/ | ||
public interface Function { | ||
long apply(MemorySegment _x0, long _x1, MemorySegment _x2); | ||
} | ||
|
||
private static final FunctionDescriptor $DESC = FunctionDescriptor.of( | ||
MagickWand_h.C_LONG, | ||
MagickWand_h.C_POINTER, | ||
MagickWand_h.C_LONG, | ||
MagickWand_h.C_POINTER | ||
); | ||
|
||
/** | ||
* The descriptor of this function pointer | ||
*/ | ||
public static FunctionDescriptor descriptor() { | ||
return $DESC; | ||
} | ||
|
||
private static final MethodHandle UP$MH = MagickWand_h.upcallHandle(CustomStreamHandler.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(CustomStreamHandler.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 long invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, MemorySegment _x2) { | ||
try { | ||
return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2); | ||
} catch (Throwable ex$) { | ||
throw new AssertionError("should not reach here", ex$); | ||
} | ||
} | ||
} | ||
|
69 changes: 69 additions & 0 deletions
69
core/src/main/java/app/photofox/imffm/generated/DecodeImageHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Generated by jextract | ||
|
||
package app.photofox.imffm.generated; | ||
|
||
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 Image *(DecodeImageHandler)(const ImageInfo *, ExceptionInfo *) | ||
* } | ||
*/ | ||
public class DecodeImageHandler { | ||
|
||
DecodeImageHandler() { | ||
// Should not be called directly | ||
} | ||
|
||
/** | ||
* The function pointer signature, expressed as a functional interface | ||
*/ | ||
public interface Function { | ||
MemorySegment apply(MemorySegment _x0, MemorySegment _x1); | ||
} | ||
|
||
private static final FunctionDescriptor $DESC = FunctionDescriptor.of( | ||
MagickWand_h.C_POINTER, | ||
MagickWand_h.C_POINTER, | ||
MagickWand_h.C_POINTER | ||
); | ||
|
||
/** | ||
* The descriptor of this function pointer | ||
*/ | ||
public static FunctionDescriptor descriptor() { | ||
return $DESC; | ||
} | ||
|
||
private static final MethodHandle UP$MH = MagickWand_h.upcallHandle(DecodeImageHandler.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(DecodeImageHandler.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 MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) { | ||
try { | ||
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); | ||
} catch (Throwable ex$) { | ||
throw new AssertionError("should not reach here", ex$); | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.