Foundry.GirNode

g Foundry.GirNode Foundry.GirNode GObject.Object GObject.Object GObject.Object->Foundry.GirNode

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (type, tag_name)

class

type_to_string (type)

find_child (type, name)

get_attribute (attribute)

get_children ()

get_content ()

get_name ()

get_node_type ()

get_parent ()

get_tag_name ()

has_attribute (attribute)

list_attributes ()

list_children_typed (type)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.GirNode(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.GirNodeClass

Represents a node in a GObject.Object Introspection Repository (GIR) file.

Foundry.GirNode provides functionality for representing and manipulating nodes in GIR files including attributes, children, and content. It supports hierarchical navigation and provides efficient access to GIR data for development tools and documentation generation.

classmethod new(type, tag_name)
Parameters:
Return type:

Foundry.GirNode

classmethod type_to_string(type)
Parameters:

type (Foundry.GirNodeType) –

Return type:

str

find_child(type, name)
Parameters:
Return type:

Foundry.GirNode or None

get_attribute(attribute)
Parameters:

attribute (str) –

Return type:

str

get_children()
Return type:

[Foundry.GirNode] or None

Gets a list of children of this node in the Gir file.

get_content()
Return type:

str

get_name()
Return type:

str

get_node_type()
Return type:

Foundry.GirNodeType

get_parent()
Return type:

Foundry.GirNode or None

get_tag_name()
Return type:

str

has_attribute(attribute)
Parameters:

attribute (str) –

Return type:

bool

list_attributes()
Return type:

[str]

Gets the keys of the node.

The caller should free the resulting array but not the elements within it.

list_children_typed(type)
Parameters:

type (Foundry.GirNodeType) – the type of node to collect

Return type:

[Foundry.GirNode] or None

Collects all of the children that match type.

The result is an array of borrowed pointers to children nodes. In C that means you free the resulting pointer but not the nodes within it.

``c guint n_nodes = 0; g_autofree FoundryGirNode **nodes = foundry_gir_node_list_children_typed (parent, type, &n_nodes); ``