Package org.gnome.gtk
Interface CellRenderer.EditingStartedCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
CellRenderer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface CellRenderer.EditingStartedCallback
extends FunctionPointer
Functional interface declaration of the
EditingStartedCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(@Nullable CellEditable editable, String path) This signal gets emitted when a cell starts to be edited.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default voidupcall(MemorySegment sourceCellRenderer, MemorySegment editable, MemorySegment path) Theupcallmethod is called from native code.
-
Method Details
-
run
This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup oneditable,e.g. adding aGtkEntryCompletionor setting up additional columns in aGtkComboBox.See gtk_cell_editable_start_editing() for information on the lifecycle of the
editableand a way to do setup that doesn’t depend on therenderer.Note that GTK doesn't guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of
editablebefore doing any specific setup, as in the following example:static void text_editing_started (GtkCellRenderer *cell, GtkCellEditable *editable, const char *path, gpointer data) { if (GTK_IS_ENTRY (editable)) { GtkEntry *entry = GTK_ENTRY (editable); // ... create a GtkEntryCompletion gtk_entry_set_completion (entry, completion); } } -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.gnome.gtk.CellEditable, java.lang.String)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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-