From: Jürg Billeter Date: Fri, 17 Oct 2008 10:58:48 +0000 (+0000) Subject: Add g_strcanon, g_object_class_install_property, GToggleNotify, and X-Git-Tag: VALA_0_4_0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9307a8ff1cebb12cc61adaa0bbad344cce75665d;p=thirdparty%2Fvala.git Add g_strcanon, g_object_class_install_property, GToggleNotify, and 2008-10-17 Jürg Billeter * vapi/glib-2.0.vapi: Add g_strcanon, g_object_class_install_property, GToggleNotify, and GStringChunk bindings, patch by Yu Feng, fixes part of bug 555566 svn path=/trunk/; revision=1840 --- diff --git a/ChangeLog b/ChangeLog index aeaf6d7a6..fec79807c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-17 Jürg Billeter + + * vapi/glib-2.0.vapi: + + Add g_strcanon, g_object_class_install_property, GToggleNotify, + and GStringChunk bindings, patch by Yu Feng, + fixes part of bug 555566 + 2008-10-17 Roberto Majadas * vapi/tracker-indexer-module-1.0.vapi: Add tracker indexer bindings diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 062eba1b1..e61b2fc0f 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -787,6 +787,11 @@ public class string { [CCode (cname = "g_utf8_skip")] public static char[] skip; + /* modifies string in place */ + [CCode (cname = "g_strcanon")] + public void canon (string valid_chars, char substitutor); + + /* internal method */ public string substring (long offset, long len); public long length { @@ -910,6 +915,11 @@ namespace GLib { public ParamSpecUInt (string name, string nick, string blurb, uint minimum, uint maximum, uint default_value, ParamFlags flags); } + public class ParamSpecBoolean : ParamSpec { + [CCode (cname = "g_param_spec_boolean")] + public ParamSpecBoolean (string name, string nick, string blurb, bool defaultvalue, ParamFlags flags); + } + [CCode (cprefix = "G_PARAM_", has_type_id = false)] public enum ParamFlags { READABLE, @@ -928,6 +938,7 @@ namespace GLib { public class ObjectClass : TypeClass { public weak ParamSpec find_property (string property_name); public weak ParamSpec[] list_properties (); + public void install_property (uint property_id, ParamSpec pspec); } public struct ObjectConstructParam { @@ -973,8 +984,14 @@ namespace GLib { public signal void notify (ParamSpec pspec); public weak Object connect (string signal_spec, ...); + + public void add_toggle_ref (ToggleNotify notify); + public void remove_toggle_ref (ToggleNotify notify); } + [CCode (instance_pos = 0)] + public delegate void ToggleNotify (GLib.Object object, bool is_last_ref); + public struct Parameter { public string name; public Value value; @@ -3230,6 +3247,18 @@ namespace GLib { public long allocated_len; } + /* String Chunks */ + + [Compact] + [CCode (free_function = "g_string_chunk_free")] + public class StringChunk { + public StringChunk (size_t size); + public weak string insert (string str); + public weak string insert_const (string str); + public weak string insert_len (string str, ssize_t len); + public void clear (); + } + /* Pointer Arrays */ [Compact]