Provides context for parsing GtkBuilder UI files.
<GtkBuildableParseContext> is an
opaque struct.
Retrieves the name of the currently open element.
If called from the start_element or end_element handlers this will give
the element_name as passed to those functions. For the parent elements,
see buildable-parse-context:get-element-stack.
Passed: a
<GtkBuildableParseContext>.
a GtkBuildablParseContext
Returned: a string, or #f.
the name of the currently open element
Retrieves the element stack from the internal state of the parser.
The returned <GPtrArray> is an array of
strings where the last item is the currently open tag (as would be
returned by buildable-parse-context:get-element) and the previous
item is its immediate parent.
This function is intended to be used in the start_element and
end_element handlers where buildable-parse-context:get-element would merely return
the name of the element that is being processed.
Passed: a
<GtkBuildableParseContext>.
Returned: a vector, each a string.
the element stack, which must not be modified
Retrieves the current line number and the number of the character on that line. Intended for use in error messages; there are no strict semantics for what constitutes the "current" line number other than "the best number we could come up with for error messages."
Passed: a
<GtkBuildableParseContext>.
Returned: a 32-bit integer.
return location for a line number
Returned: a 32-bit integer.
return location for a char-on-line number
Completes the process of a temporary sub-parser redirection.
This function exists to collect the user_data allocated by a matching
call to gtk_buildable_parse_context_push(). It must be called in
the end_element handler corresponding to the start_element handler
during which gtk_buildable_parse_context_push() was called. You
must not call this function from the error callback – the
user-data is provided directly to the callback in that case.
This function is not intended to be directly called by users interested in invoking subparsers. Instead, it is intended to be used by the subparsers themselves to implement a higher-level interface.
Passed: a
<GtkBuildableParseContext>.
Returned: a foreign pointer, or #f.
the user data passed to gtk_buildable_parse_context_push()