Package org.gnome.gdk
Interface Toplevel.ComputeSizeCallback
- All Superinterfaces:
FunctionPointer
- Enclosing interface:
Toplevel
- 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
ComputeSizeCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(ToplevelSize size) Emitted when the size for the surface needs to be computed, when it is present.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceToplevel, MemorySegment size) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted when the size for the surface needs to be computed, when it is present.This signal will normally be emitted during or after a call to
Toplevel.present(org.gnome.gdk.ToplevelLayout)
, depending on the configuration received by the windowing system. It may also be emitted at any other point in time, in response to the windowing system spontaneously changing the configuration of the toplevel surface.It is the responsibility of the toplevel user to handle this signal and compute the desired size of the toplevel, given the information passed via the
Gdk.ToplevelSize
object. Failing to do so will result in an arbitrary size being used as a result. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gdk.ToplevelSize)
is executed. -
toCallback
Creates a native function pointer to theupcall(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
-