summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilderprivate.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2019-08-26 23:28:18 +0300
committerMatthias Clasen <mclasen@redhat.com>2019-09-10 12:07:15 -0400
commit135cea76fbe41cea7a83ebb3381bdc1410f8f9fb (patch)
tree83fa2157a2601ecf0104f347f5d3915cf36e193b /gtk/gtkbuilderprivate.h
parentff087e126fb12cd3bb9f5d4322cf12fb654da00a (diff)
downloadgtk+-135cea76fbe41cea7a83ebb3381bdc1410f8f9fb.tar.gz
GtkBuildableParser: Add a wrapper for GMarkupParser
This currenly just wraps GMarkupParser, but the plan is to expose this instead of GMarkup in the GtkBuildable interfaces, allowing us to replace the parser with something that handles pre-parsed input instead. Note that we duplicate some of the features of GMarkup to implement the APIs rather then call down to GMarkup, as we need to support these in the pre-parsed case anyway.
Diffstat (limited to 'gtk/gtkbuilderprivate.h')
-rw-r--r--gtk/gtkbuilderprivate.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkbuilderprivate.h b/gtk/gtkbuilderprivate.h
index 29c2086ca4..d64616b639 100644
--- a/gtk/gtkbuilderprivate.h
+++ b/gtk/gtkbuilderprivate.h
@@ -20,6 +20,7 @@
#define __GTK_BUILDER_PRIVATE_H__
#include "gtkbuilder.h"
+#include "gtkbuildable.h"
enum {
TAG_PROPERTY,
@@ -99,6 +100,20 @@ typedef struct {
gint minor;
} RequiresInfo;
+struct _GtkBuildableParseContext {
+ const GMarkupParser *internal_callbacks;
+ GMarkupParseContext *ctx;
+
+ const GtkBuildableParser *parser;
+ gpointer user_data;
+
+ GPtrArray *tag_stack;
+
+ GArray *subparser_stack;
+ gpointer held_user_data;
+ gboolean awaiting_pop;
+};
+
typedef struct {
GMarkupParser *parser;
gchar *tagname;