| Top |
| GtkBuilderScope * | gtk_builder_cscope_new () |
| void | gtk_builder_cscope_add_callback_symbol () |
| void | gtk_builder_cscope_add_callback_symbols () |
| GCallback | gtk_builder_cscope_lookup_callback_symbol () |
GtkBuilderScope is an interface to provide support to GtkBuilder, primarily for looking up programming-language-specific values for strings that are given in a GtkBuilder UI file.
The primary intended audience is bindings that want to provide deeper integration of GtkBuilder into the language.
A GtkBuilderScope instance may be used with multiple GtkBuilder objects, even at once.
By default, GTK will use its own implementation of GtkBuilderScope for the C
language which can be created via gtk_builder_cscope_new().
GtkBuilderCScope instances use symbols explicitly added to builder
with prior calls to gtk_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 NULL) 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 gtk_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.
GtkBuilderScope *
gtk_builder_cscope_new (void);
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 gtk_builder_cscope_add_callback_symbol().
void gtk_builder_cscope_add_callback_symbol (GtkBuilderCScope *self,const gchar *callback_name,GCallback callback_symbol);
Adds the callback_symbol
to the scope of builder
under the given callback_name
.
Using this function overrides the behavior of 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.
void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self,const gchar *first_callback_name,GCallback first_callback_symbol,...);
A convenience function to add many callbacks instead of calling
gtk_builder_cscope_add_callback_symbol() for each symbol.
[skip]
GCallback gtk_builder_cscope_lookup_callback_symbol (GtkBuilderCScope *self,const gchar *callback_name);
Fetches a symbol previously added to self
with gtk_builder_cscope_add_callback_symbol().
[skip]