:right-sidebar: True BuilderCScope =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: BuilderCScope(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.BuilderScope` :Constructors: :: BuilderCScope(**properties) new() -> Gtk.BuilderCScope Constructors ------------ .. rst-class:: interim-class .. class:: BuilderCScope :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.BuilderCScope Creates a new ``GtkBuilderCScope`` object to use with future ``GtkBuilder`` instances. Calling this function is only necessary if you want to add custom callbacks via :obj:`~gi.repository.Gtk.BuilderCScope.add_callback_symbol`. Methods ------- .. rst-class:: interim-class .. class:: BuilderCScope :no-index: .. method:: add_callback_symbol(callback_name: str, callback_symbol: ~typing.Callable[[], None]) -> None Adds the ``callback_symbol`` to the scope of ``builder`` under the given ``callback_name``. Using this function overrides the behavior of :obj:`~gi.repository.Gtk.Builder.create_closure` for any callback symbols that are added. Using this method allows for better encapsulation as it does not require that callback symbols be declared in the global namespace. :param callback_name: The name of the callback, as expected in the XML :param callback_symbol: The callback pointer Fields ------ .. rst-class:: interim-class .. class:: BuilderCScope :no-index: .. attribute:: parent_instance