Gtk.BuilderCScope¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gtk.BuilderCScope(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
GtkBuilderScopeimplementation for the C language.GtkBuilderCScopeinstances use symbols explicitly added to builder with prior calls to [method`Gtk`.BuilderCScope.add_callback_symbol]. If developers want to do that, they are encouraged to create their own scopes for that purpose.In the case that symbols are not explicitly added; GTK will uses
GModule’s introspective features (by opening the moduleNone) to look at the application’s symbol table. From here it tries to match the signal function names given in the interface description with symbols in the application.Note that unless [method`Gtk`.BuilderCScope.add_callback_symbol] is called for all signal callbacks which are referenced by the loaded XML, this functionality will require that
GModulebe supported on the platform.- classmethod new()[source]¶
- Returns:
a new
GtkBuilderCScope- Return type:
Creates a new
GtkBuilderCScopeobject to use with futureGtkBuilderinstances.Calling this function is only necessary if you want to add custom callbacks via [method`Gtk`.BuilderCScope.add_callback_symbol].
- add_callback_symbol(callback_name, callback_symbol)[source]¶
- Parameters:
callback_name (
str) – The name of the callback, as expected in the XMLcallback_symbol (
GObject.Callback) – The callback pointer
Adds the callback_symbol to the scope of builder under the given callback_name.
Using this function overrides the behavior of [method`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.