1.19 <GtkBuilderCScope>

Class: <GtkBuilderCScope>

It derives from <GObject>.

A <GtkBuilderScope> implementation for the C language.

<GtkBuilderCScope> instances use symbols explicitly added to builder with prior calls to builder-cscope: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 module #f) 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 builder-cscope:add-callback-symbol is called for all signal callbacks which are referenced by the loaded XML, this functionality will require that GModule be supported on the platform.

Fields

parent-instance

Procedures

Method: builder-cscope:add-callback-symbol self callback-name callback-symbol
Method: add-callback-symbol self callback-name callback-symbol

Adds the callback-symbol to the scope of builder under the given callback-name.

Using this function overrides the behavior of 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.

self

Passed: a <GtkBuilderCScope>.

a <GtkBuilderCScope>

callback-name

Passed: a string.

The name of the callback, as expected in the XML

callback-symbol

Passed: a procedure.

The callback pointer

See GCallback for how it is called.

Procedure: builder-cscope:new ⇒ %return

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 builder-cscope:add-callback-symbol.

%return

Returned: a <GtkBuilderCScope>.

a new <GtkBuilderCScope>