mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +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);
|
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:
|
* gtk_builder_cscope_add_callback_symbol:
|
||||||
* @self: a `GtkBuilderCScope`
|
* @self: a `GtkBuilderCScope`
|
||||||
|
@ -114,10 +114,14 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self,
|
void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self,
|
||||||
const char *first_callback_name,
|
const char *first_callback_name,
|
||||||
GCallback first_callback_symbol,
|
GCallback first_callback_symbol,
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
...) 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
|
GDK_AVAILABLE_IN_ALL
|
||||||
GCallback gtk_builder_cscope_lookup_callback_symbol(GtkBuilderCScope *self,
|
GCallback gtk_builder_cscope_lookup_callback_symbol(GtkBuilderCScope *self,
|
||||||
const char *callback_name);
|
const char *callback_name);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
Loading…
Reference in New Issue
Block a user