PgAttribute.markupParserNew

Parses marked-up text (see <link linkend="PangoMarkupFormat">markup format</link>) to create a plain-text string and an attribute list.

If accel_marker is nonzero, the given character will mark the character following it as an accelerator. For example, accel_marker might be an ampersand or underscore. All characters marked as an accelerator will receive a PANGO_UNDERLINE_LOW attribute, and the first character so marked will be returned in accel_char, when calling finish(). Two accel_marker characters following each other produce a single literal accel_marker character.

To feed markup to the parser, use g_markup_parse_context_parse() on the returned GMarkupParseContext When done with feeding markup to the parser, use pango_markup_parser_finish() to get the data out of it, and then use g_markup_parse_context_free() to free it.

This function is designed for applications that read pango markup from streams. To simply parse a string containing pango markup, the simpler pango_parse_markup() API is recommended instead.

class PgAttribute
static
markupParserNew
()

Parameters

accelMarker dchar

character that precedes an accelerator, or 0 for none

Return Value

Type: SimpleXML

a GMarkupParseContext that should be destroyed with g_markup_parse_context_free().

Meta

Since

1.31.0