package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Buildable_parse_context

type t = [ `buildable_parse_context ] Gobject.obj

An opaque context struct for `GtkBuildableParser`.

val get_position : t -> int * int

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."

val get_element_stack : t -> string array

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 gtk_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 gtk_buildable_parse_context_get_element() would merely return the name of the element that is being processed.

val get_element : t -> string option

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 gtk_buildable_parse_context_get_element_stack().