Package org.gnome.gtk
Interface CssProvider.ParsingErrorCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
CssProvider
- 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 CssProvider.ParsingErrorCallback
extends FunctionPointer
Functional interface declaration of the
ParsingErrorCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(@Nullable CssSection section, @Nullable GError error) Signals that a parsing error occurred.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 sourceCssProvider, MemorySegment section, MemorySegment error) Theupcallmethod is called from native code.
-
Method Details
-
run
Signals that a parsing error occurred.The expected error values are in the
Gtk.CssParserErrorandGtk.CssParserWarningenumerations.The
path,lineandpositiondescribe the actual location of the error as accurately as possible.Parsing errors are never fatal, so the parsing will resume after the error. Errors may however cause parts of the given data or even all of it to not be parsed at all. So it is a useful idea to check that the parsing succeeds by connecting to this signal.
Errors in the
Gtk.CssParserWarningenumeration should not be treated as fatal errors.Note that this signal may be emitted at any time as the css provider may opt to defer parsing parts or all of the input to a later time than when a loading function was called.
-
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.gnome.gtk.CssSection, org.gnome.glib.GError)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
-