Package org.gnome.gio
Interface ListModel.ItemsChangedCallback
- 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.
Functional interface declaration of the
ItemsChangedCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(int position, int removed, int added) This signal is emitted whenever items were added to or removed fromlist
.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int, int)
method.default void
upcall
(MemorySegment sourceListModel, int position, int removed, int added) Theupcall
method is called from native code.
-
Method Details
-
run
void run(int position, int removed, int added) This signal is emitted whenever items were added to or removed fromlist
. Atposition
,removed
items were removed andadded
items were added in their place.Note: If
removed != added
, the positions of all later items in the model change. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(int, int, int)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int, int)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-