Package org.gnome.gdkpixbuf
Interface PixbufModuleSizeFunc
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("io.github.jwharm.JavaGI")
public interface PixbufModuleSizeFunc
extends FunctionPointer
Functional interface declaration of the
PixbufModuleSizeFunc
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(MemorySegment width, MemorySegment height) Defines the type of the function that gets called once the size of the loaded image is known.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment width, MemorySegment height, MemorySegment userData) Theupcall
method is called from native code.
-
Method Details
-
run
Defines the type of the function that gets called once the size of the loaded image is known.The function is expected to set
width
andheight
to the desired size to which the image should be scaled. If a module has no efficient way to achieve the desired scaling during the loading of the image, it may either ignore the size request, or only approximate it - gdk-pixbuf will then perform the required scaling on the completely loaded image.If the function sets
width
orheight
to zero, the module should interpret this as a hint that it will be closed soon and shouldn't allocate further resources. This convention is used to implement gdk_pixbuf_get_file_info() efficiently. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-