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 TypeMethodDescriptionvoid
run
(CssSection section, GError error) Signals that a parsing error occurred.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceCssProvider, MemorySegment section, MemorySegment error) Theupcall
method is called from native code.
-
Method Details
-
run
Signals that a parsing error occurred.The expected error values are in the
Gtk.CssParserError
andGtk.CssParserWarning
enumerations.The
path
,line
andposition
describe 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.CssParserWarning
enumeration 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
Theupcall
method 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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-