[vala] glib-2.0: Add more GMarkup bindings



commit 36cfc1272adb7973aeb7437ac689ff2168c9777d
Author: Evan Nemerson <evan polussystems com>
Date:   Wed Jul 8 18:19:18 2009 -0700

    glib-2.0: Add more GMarkup bindings
    
    Add g_markup_collect_attributes, g_markup_parser_context_push,
    g_markup_parser_context_pop, and GMarkupCollectType bindings,
    based on patch by Yu Feng, fixes bug 564704.

 vapi/glib-2.0.vapi |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index d1d075f..ff9474e 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -2684,7 +2684,8 @@ namespace GLib {
 		PARSE,
 		UNKNOWN_ELEMENT,
 		UNKNOWN_ATTRIBUTE,
-		INVALID_CONTENT
+		INVALID_CONTENT,
+		MISSING_ATTRIBUTE
 	}
 
 	[CCode (cprefix = "G_MARKUP_", has_type_id = false)]
@@ -2701,6 +2702,8 @@ namespace GLib {
 		public weak string get_element ();
 		public weak SList<string> get_element_stack ();
 		public void get_position (out int line_number, out int char_number);
+		public void push (MarkupParser parser, void* user_data);
+		public void* pop (MarkupParser parser);
 	}
 	
 	public delegate void MarkupParserStartElementFunc (MarkupParseContext context, string element_name, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_names, [CCode (array_length = false, array_null_terminated = true)] string[] attribute_values) throws MarkupError;
@@ -2722,9 +2725,21 @@ namespace GLib {
 	}
 
 	namespace Markup {
+		[CCode (cprefix = "G_MARKUP_COLLECT_", has_type_id = false)]
+		public enum CollectType {
+			INVALID,
+			STRING,
+			STRDUP,
+			BOOLEAN,
+			TRISTATE,
+			OPTIONAL
+		}
+
 		public static string escape_text (string text, long length = -1);
 		[PrintfFormat]
 		public static string printf_escaped (string format, ...);
+		[CCode (sentinel = "G_MARKUP_COLLECT_INVALID")]
+		public static bool collect_attributes (string element_name, string[] attribute_names, string[] attribute_values, ...) throws MarkupError;
 	}
 
 	/* Key-value file parser */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]