Package org.gnome.gdk
Interface Surface.LayoutCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
Surface
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the
LayoutCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(int width, int height) Emitted when the size ofsurface
is changed, or when relayout should be performed.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int)
method.default void
upcall
(MemorySegment sourceSurface, int width, int height) Theupcall
method is called from native code.
-
Method Details
-
run
void run(int width, int height) Emitted when the size ofsurface
is changed, or when relayout should be performed.Surface size is reported in ”application pixels”, not ”device pixels” (see gdk_surface_get_scale_factor()).
-
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(int, int)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-