[gtk+] GtkBuilder: Export the template parsing entry point
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkBuilder: Export the template parsing entry point
- Date: Thu, 30 Apr 2015 10:21:08 +0000 (UTC)
commit 569d5ad763ff6a971b206373a89bfb97259bf33b
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 30 01:18:09 2015 -0400
GtkBuilder: Export the template parsing entry point
This will let gtk-builder-tool validate templates.
gtk/gtkbuilder.c | 16 +++++++++-------
gtk/gtkbuilderprivate.h | 12 ++++++------
gtk/gtkwidget.c | 2 +-
3 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index fbf0a58..2b7a937 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -1115,15 +1115,17 @@ gtk_builder_add_objects_from_file (GtkBuilder *builder,
}
/* Main private entry point for building composite container
- * components from template XML
+ * components from template XML.
+ * This is exported purely to let gtk-builder-tool validate
+ * templates, applications have no need to call this function.
*/
guint
-_gtk_builder_extend_with_template (GtkBuilder *builder,
- GtkWidget *widget,
- GType template_type,
- const gchar *buffer,
- gsize length,
- GError **error)
+gtk_builder_extend_with_template (GtkBuilder *builder,
+ GtkWidget *widget,
+ GType template_type,
+ const gchar *buffer,
+ gsize length,
+ GError **error)
{
GError *tmp_error;
diff --git a/gtk/gtkbuilderprivate.h b/gtk/gtkbuilderprivate.h
index 2a539eb..0e3ad8a 100644
--- a/gtk/gtkbuilderprivate.h
+++ b/gtk/gtkbuilderprivate.h
@@ -182,12 +182,12 @@ void _gtk_builder_menu_start (ParserData *parser_data,
void _gtk_builder_menu_end (ParserData *parser_data);
GType _gtk_builder_get_template_type (GtkBuilder *builder);
-guint _gtk_builder_extend_with_template (GtkBuilder *builder,
- GtkWidget *widget,
- GType template_type,
- const gchar *buffer,
- gsize length,
- GError **error);
+GDK_AVAILABLE_IN_3_18
+guint gtk_builder_extend_with_template (GtkBuilder *builder,
+ GtkWidget *widget,
+ GType template_type,
const gchar *buffer,
+ gsize length,
+ GError **error);
void _gtk_builder_prefix_error (GtkBuilder *builder,
GMarkupParseContext *context,
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 4d39ece..8af820f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -16812,7 +16812,7 @@ gtk_widget_init_template (GtkWidget *widget)
* will validate that the template is created for the correct GType and assert that
* there is no infinite recursion.
*/
- if (!_gtk_builder_extend_with_template (builder, widget, class_type,
+ if (!gtk_builder_extend_with_template (builder, widget, class_type,
(const gchar *)g_bytes_get_data (template->data, NULL),
g_bytes_get_size (template->data),
&error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]