diff --git a/ChangeLog b/ChangeLog index 2a27bb09c..1634b6d8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2005-04-22 Dan Winship + * gnome/Gnome.metadata: mark GnomeTriggerActionFunction's char** + param const + + * glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[] + overload, since that's what we actually need in the case where + it's used (above). Leave the IntPtr[]->string[] overload of + PtrToStringGFree in case anyone is using it manually. + + * gtk/Gtk.metadata: hide GtkModuleInitFunc and + GtkModuleDisplayInitFunc; they are the signatures of user-defined + methods that gtk only ever resolves via g_module_symbol(), so + they're not useful from C#. (And the marshalling was all wrong + anyway...) + * glib/Type.cs: * glib/TypeConverter.cs: * glib/Value.cs: sort lists of GTypes into TypeFundamental order diff --git a/doc/ChangeLog b/doc/ChangeLog index 50a189abe..2fa2b7bd8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-21 Dan Winship + + * en/GLib/Marshaller.xml: update + + * en/Gtk/ModuleDisplayInitFunc.xml: + * en/Gtk/ModuleInitFunc.xml: gone + 2005-04-22 John Luke * en/*/*.xml: run gen*.exe to fill in some docs diff --git a/doc/en/GLib/Marshaller.xml b/doc/en/GLib/Marshaller.xml index a03576f06..b448e8020 100644 --- a/doc/en/GLib/Marshaller.xml +++ b/doc/en/GLib/Marshaller.xml @@ -201,6 +201,22 @@ + + + Method + + System.String[] + + + + + + Marshals an array of native Utf8 strings to an array of managed strings. + a + a + + + Method diff --git a/doc/en/Gtk/ModuleDisplayInitFunc.xml b/doc/en/Gtk/ModuleDisplayInitFunc.xml deleted file mode 100644 index 26c87b0bd..000000000 --- a/doc/en/Gtk/ModuleDisplayInitFunc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - gtk-sharp - - 0.0.0.0 - neutral - - - Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - - Do not use. - - - - System.Delegate - - - - System.ICloneable - - - System.Runtime.Serialization.ISerializable - - - - - - - - - System.Void - - \ No newline at end of file diff --git a/doc/en/Gtk/ModuleInitFunc.xml b/doc/en/Gtk/ModuleInitFunc.xml deleted file mode 100644 index 46d6dbade..000000000 --- a/doc/en/Gtk/ModuleInitFunc.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - gtk-sharp - 0.0.0.0 - - - Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - - Do not use. - - - - System.Delegate - - - - System.ICloneable - - - System.Runtime.Serialization.ISerializable - - - - - - - - - - System.Void - - \ No newline at end of file diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index f4eb3e4b9..db8b80fc9 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -51,6 +51,14 @@ namespace GLib { return System.Text.Encoding.UTF8.GetString (bytes); } + public static string[] Utf8PtrToString (IntPtr[] ptrs) { + // The last pointer is a null terminator. + string[] ret = new string[ptrs.Length - 1]; + for (int i = 0; i < ret.Length; i++) + ret[i] = Utf8PtrToString (ptrs[i]); + return ret; + } + public static string PtrToStringGFree (IntPtr ptr) { string ret = Utf8PtrToString (ptr); @@ -58,9 +66,6 @@ namespace GLib { return ret; } - [DllImport("libglib-2.0-0.dll")] - static extern void g_strfreev (IntPtr mem); - public static string[] PtrToStringGFree (IntPtr[] ptrs) { // The last pointer is a null terminator. string[] ret = new string[ptrs.Length - 1]; diff --git a/gnome/Gnome.metadata b/gnome/Gnome.metadata index f88ad2a33..4fed8303a 100644 --- a/gnome/Gnome.metadata +++ b/gnome/Gnome.metadata @@ -9,6 +9,7 @@ const-gchar* const-gchar* Base + const-char* PrintWidget GnomePrintWidget_ 1 diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 0d82e3632..c990850a5 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -27,7 +27,8 @@ 1 1 1 - 1 + 1 + 1 1 GdkModifierType BindingsActivate