diff options
author | Benjamin Otte <otte@redhat.com> | 2019-11-21 21:20:16 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2019-11-22 07:46:18 +0100 |
commit | 094c537001c4618aad71e890af937013d06a579a (patch) | |
tree | 54e859bb4e6281ed3346f88213e0cfe6df1664f3 /gtk/gtkbuilder.h | |
parent | 27d05102ab6182220da454b2597d975cf42ba077 (diff) | |
download | gtk+-094c537001c4618aad71e890af937013d06a579a.tar.gz |
builder: Add gtk_builder_create_closure()
This will be the future way to connect signals automatically (and be
used for other things, too).
For now, gtk_builder_connect_signals_default() is ported to use it.
Diffstat (limited to 'gtk/gtkbuilder.h')
-rw-r--r-- | gtk/gtkbuilder.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gtk/gtkbuilder.h b/gtk/gtkbuilder.h index f3353cedcf..fb192dc4a9 100644 --- a/gtk/gtkbuilder.h +++ b/gtk/gtkbuilder.h @@ -63,7 +63,10 @@ typedef struct _GtkBuilderClass GtkBuilderClass; * @GTK_BUILDER_ERROR_TEMPLATE_MISMATCH: The wrong type was specified in a composite class’s template XML * @GTK_BUILDER_ERROR_INVALID_PROPERTY: The specified property is unknown for the object class. * @GTK_BUILDER_ERROR_INVALID_SIGNAL: The specified signal is unknown for the object class. - * @GTK_BUILDER_ERROR_INVALID_ID: An object id is unknown + * @GTK_BUILDER_ERROR_INVALID_ID: An object id is unknown. + * @GTK_BUILDER_ERROR_INVALID_FUNCTION: A function could not be found. This often happens + * when symbols are set to be kept private. Compiling code with -rdynamic or using the + * `gmodule-export-2.0` pkgconfig module can fix this problem. * * Error codes that identify various errors that can occur while using * #GtkBuilder. @@ -83,7 +86,8 @@ typedef enum GTK_BUILDER_ERROR_TEMPLATE_MISMATCH, GTK_BUILDER_ERROR_INVALID_PROPERTY, GTK_BUILDER_ERROR_INVALID_SIGNAL, - GTK_BUILDER_ERROR_INVALID_ID + GTK_BUILDER_ERROR_INVALID_ID, + GTK_BUILDER_ERROR_INVALID_FUNCTION } GtkBuilderError; GDK_AVAILABLE_IN_ALL @@ -196,6 +200,19 @@ void gtk_builder_add_callback_symbols (GtkBuilder *builder, GDK_AVAILABLE_IN_ALL GCallback gtk_builder_lookup_callback_symbol (GtkBuilder *builder, const gchar *callback_name); +GDK_AVAILABLE_IN_ALL +GClosure * gtk_builder_create_closure (GtkBuilder *builder, + const char *function_name, + gboolean swapped, + GObject *object, + GError **error); +GDK_AVAILABLE_IN_ALL +GClosure * gtk_builder_create_cclosure (GtkBuilder *builder, + const char *function_name, + gboolean swapped, + GObject *object, + GError **error); + /** |