From de47bdf3b3b66ac5496f00ae70d04a8bbc18e20f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Tue, 26 Sep 2006 21:09:44 +0000 Subject: [PATCH] add string.reverse, Source.remove, Environment.get_variable, MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2006-09-26 Jürg Billeter * vapi/glib-2.0.vala: add string.reverse, Source.remove, Environment.get_variable, Environment.set_variable, Environment.get_current_dir, Path.is_absolute, Path.skip_root svn path=/trunk/; revision=125 --- vala/ChangeLog | 6 ++++++ vala/vapi/glib-2.0.vala | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/vala/ChangeLog b/vala/ChangeLog index 11a69eb..46edecf 100644 --- a/vala/ChangeLog +++ b/vala/ChangeLog @@ -1,5 +1,11 @@ 2006-09-26 Jürg Billeter + * vapi/glib-2.0.vala: add string.reverse, Source.remove, + Environment.get_variable, Environment.set_variable, + Environment.get_current_dir, Path.is_absolute, Path.skip_root + +2006-09-26 Jürg Billeter + * vala/valaassignment.vala, vala/valabinaryexpression.vala, vala/valacastexpression.vala, vala/valadostatement.vala, vala/valaexpressionstatement.vala, vala/valaforeachstatement.vala, diff --git a/vala/vapi/glib-2.0.vala b/vala/vapi/glib-2.0.vala index 23c73bc..ce89d2a 100644 --- a/vala/vapi/glib-2.0.vala +++ b/vala/vapi/glib-2.0.vala @@ -199,6 +199,8 @@ public struct string { public long len (long max = -1); [CCode (cname = "g_utf8_strchr")] public string chr (long len, unichar c); + [CCode (cname = "g_utf8_strreverse")] + public string reverse (int len = -1); [CCode (cname = "g_utf8_validate")] public bool validate (long max_len = -1, out string end = null); @@ -336,6 +338,7 @@ namespace GLib { public construct (SourceFuncs source_funcs, uint struct_size); public uint attach (MainContext context); public void set_callback (SourceFunc func, pointer data, DestroyNotify notify); + public static void remove (uint id); } public callback bool SourcePrepareFunc (Source source, ref int timeout_); @@ -400,15 +403,23 @@ namespace GLib { public static string get_application_name (); [CCode (cname = "g_set_application_name")] public static void set_application_name (string application_name); + [CCode (cname = "g_getenv")] + public static string get_variable (string! variable); + [CCode (cname = "g_setenv")] + public static bool set_variable (string! variable, string! value, bool overwrite); [CCode (cname = "g_get_user_name")] public static string get_user_name (); [CCode (cname = "g_get_host_name")] public static string! get_host_name (); [CCode (cname = "g_get_home_dir")] public static string get_home_dir (); + [CCode (cname = "g_get_current_dir")] + public static ref string get_current_dir (); } public struct Path { + public static bool is_absolute (string! file_name); + public static string skip_root (string! file_name); public static ref string get_basename (string file_name); public static ref string get_dirname (string file_name); [CCode (cname = "g_build_filename")] -- 2.7.4