mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Add gtk_builder_cscope_add_callback
This is a convenience method for the common case that symbols are used under their own name.
This commit is contained in:
parent
21b9667f08
commit
faa9ef2dc0
@ -428,6 +428,19 @@ gtk_builder_cscope_new (void)
|
||||
return g_object_new (GTK_TYPE_BUILDER_CSCOPE, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_builder_cscope_add_callback:
|
||||
* @self: a `GtkBuilderCScope`
|
||||
* @callback_symbols: (scope async): The callback pointer
|
||||
*
|
||||
* Adds the @callback_symbol to the scope of @builder under its
|
||||
* own name.
|
||||
*
|
||||
* This is a convenience wrapper of [method@Gtk.BuilderCScope.add_callback_symbol].
|
||||
*
|
||||
* Since: 4.8
|
||||
*/
|
||||
|
||||
/**
|
||||
* gtk_builder_cscope_add_callback_symbol:
|
||||
* @self: a `GtkBuilderCScope`
|
||||
|
@ -115,6 +115,10 @@ void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScop
|
||||
const char *first_callback_name,
|
||||
GCallback first_callback_symbol,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
#define gtk_builder_cscope_add_callback(scope, callback) \
|
||||
gtk_builder_cscope_add_callback_symbol (GTK_BUILDER_CSCOPE (scope), #callback, G_CALLBACK (callback))
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GCallback gtk_builder_cscope_lookup_callback_symbol(GtkBuilderCScope *self,
|
||||
const char *callback_name);
|
||||
|
Loading…
Reference in New Issue
Block a user