Gtk2::B...eContext(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

🌸 NAME 🌸

Gtk2::Buildable::ParseContext β€” bestie, this is that perl manpage right here, the one from the User Contributed Perl Documentation set, filed under Gtk2::B...eContext(3) because apparently even the filename got tired halfway through. 🫢


✨ DESCRIPTION ✨

Okay so picture this: this object is literally just a little bag of ✨context✨ for the XML subset parser that Gtk2::Builder uses. That's it. That's the whole vibe.

And like, who gets these objects? Not you, babes β€” they get handed to the methods that get invoked on the parser that your Gtk2::Buildable's "CUSTOM_TAG_START" returns. So if you're the one writing those methods, this is your moment. πŸ‘‘

Use these methods to build actually-useful error messages when you need to, mmkay? Because "something broke somewhere in the XML" is not the energy we're bringing to the group chat. πŸ’…


πŸŽ€ METHODS πŸŽ€

πŸ’– string = $parse_context->get_element

Returns the name of the element that's currently open. Like, the tag you're standing inside of right now. πŸ¦‹

πŸ’– list = $parse_context->get_element_stack

Returns the whole element stack. The first item is the currently-open tag β€” yes, the exact same one get_element() would hand you β€” and the next item is its immediate parent. It's giving family tree. 🌳

Since: glib 2.16

πŸ’– (line_number, char_number) = $parse_context->get_position

That's the signature, bestie. Returns a line number and a char number, in that order. That's the whole entry, no cap β€” I'm not gonna make stuff up about it. 😭


🌈 SEE ALSO 🌈

  • Gtk2
  • Gtk2::Buildable

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


okay that's the whole page, love u, bye πŸ’– β€” brought to you by perl v5.42.0, dated 2025-07-25, filed under Gtk2::B...eContext(3). slay. πŸ’…βœ¨

πŸ“¦ where this page comes from