-
-
Save Therzok/49316a8d6b505ac2bc42e003007509da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git b/atk/generated/Relation.cs a/atk/generated/Relation.cs | |
index df202a9..920a8b2 100644 | |
--- b/atk/generated/Relation.cs | |
+++ a/atk/generated/Relation.cs | |
@@ -25,8 +25,9 @@ namespace Atk { | |
} | |
int cnt_targets = targets == null ? 0 : targets.Length; | |
IntPtr[] native_targets = new IntPtr [cnt_targets]; | |
- for (int i = 0; i < cnt_targets; i++) | |
+ for (int i = 0; i < cnt_targets; i++) { | |
native_targets [i] = targets[i] == null ? IntPtr.Zero : targets[i].Handle; | |
+ } | |
Raw = atk_relation_new(native_targets, (targets == null ? 0 : targets.Length), (int) relationship); | |
} | |
diff --git b/gdk/generated/Pixbuf.cs a/gdk/generated/Pixbuf.cs | |
index 9c7db3b..ddd75d4 100644 | |
--- b/gdk/generated/Pixbuf.cs | |
+++ a/gdk/generated/Pixbuf.cs | |
@@ -107,11 +107,11 @@ namespace Gdk { | |
} | |
int cnt_data = data == null ? 0 : data.Length; | |
IntPtr[] native_data = new IntPtr [cnt_data]; | |
- for (int i = 0; i < cnt_data; i++) | |
+ for (int i = 0; i < cnt_data; i++) { | |
native_data [i] = GLib.Marshaller.StringToPtrGStrdup (data[i]); | |
+ } | |
Raw = gdk_pixbuf_new_from_xpm_data(native_data); | |
- for (int i = 0; i < native_data.Length; i++) { | |
- data [i] = GLib.Marshaller.Utf8PtrToString (native_data[i]); | |
+ for (int i = 0; i < cnt_data; i++) { | |
GLib.Marshaller.Free (native_data[i]); | |
} | |
} | |
diff --git b/gdk/generated/PixbufFormat.cs a/gdk/generated/PixbufFormat.cs | |
index 0051c40..8dcfa44 100644 | |
--- b/gdk/generated/PixbufFormat.cs | |
+++ a/gdk/generated/PixbufFormat.cs | |
@@ -72,7 +72,7 @@ namespace Gdk { | |
public string[] Extensions { | |
get { | |
IntPtr raw_ret = gdk_pixbuf_format_get_extensions(Handle); | |
- string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
return ret; | |
} | |
} | |
diff --git b/gdk/generated/Pixmap.cs a/gdk/generated/Pixmap.cs | |
index 55a2af1..c878f23 100644 | |
--- b/gdk/generated/Pixmap.cs | |
+++ a/gdk/generated/Pixmap.cs | |
@@ -53,12 +53,16 @@ namespace Gdk { | |
IntPtr native_transparent_color = GLib.Marshaller.StructureToPtrAlloc (transparent_color); | |
int cnt_data = data == null ? 0 : data.Length; | |
IntPtr[] native_data = new IntPtr [cnt_data]; | |
- for (int i = 0; i < cnt_data; i++) | |
+ for (int i = 0; i < cnt_data; i++) { | |
native_data [i] = GLib.Marshaller.StringToPtrGStrdup(data[i]); | |
+ } | |
IntPtr raw_ret = gdk_pixmap_create_from_xpm_d(drawable == null ? IntPtr.Zero : drawable.Handle, out native_mask, native_transparent_color, native_data); | |
Gdk.Pixmap ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixmap; | |
mask = GLib.Object.GetObject(native_mask) as Gdk.Pixmap; | |
Marshal.FreeHGlobal (native_transparent_color); | |
+ for (int i = 0; i < cnt_data; i++) { | |
+ GLib.Marshaller.Free (native_data[i]); | |
+ } | |
return ret; | |
} | |
@@ -138,12 +142,16 @@ namespace Gdk { | |
IntPtr native_transparent_color = GLib.Marshaller.StructureToPtrAlloc (transparent_color); | |
int cnt_data = data == null ? 0 : data.Length; | |
IntPtr[] native_data = new IntPtr [cnt_data]; | |
- for (int i = 0; i < cnt_data; i++) | |
+ for (int i = 0; i < cnt_data; i++) { | |
native_data [i] = GLib.Marshaller.StringToPtrGStrdup(data[i]); | |
+ } | |
IntPtr raw_ret = gdk_pixmap_colormap_create_from_xpm_d(drawable == null ? IntPtr.Zero : drawable.Handle, colormap == null ? IntPtr.Zero : colormap.Handle, out native_mask, native_transparent_color, native_data); | |
Gdk.Pixmap ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixmap; | |
mask = GLib.Object.GetObject(native_mask) as Gdk.Pixmap; | |
Marshal.FreeHGlobal (native_transparent_color); | |
+ for (int i = 0; i < cnt_data; i++) { | |
+ GLib.Marshaller.Free (native_data[i]); | |
+ } | |
return ret; | |
} | |
diff --git b/gdk/generated/Spawn.cs a/gdk/generated/Spawn.cs | |
index 1ff8d3b..4860ecf 100644 | |
--- b/gdk/generated/Spawn.cs | |
+++ a/gdk/generated/Spawn.cs | |
@@ -16,13 +16,15 @@ namespace Gdk { | |
IntPtr native_working_directory = GLib.Marshaller.StringToPtrGStrdup (working_directory); | |
int cnt_argv = argv == null ? 0 : argv.Length; | |
IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; | |
- for (int i = 0; i < cnt_argv; i++) | |
+ for (int i = 0; i < cnt_argv; i++) { | |
native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); | |
+ } | |
native_argv [cnt_argv] = IntPtr.Zero; | |
int cnt_envp = envp == null ? 0 : envp.Length; | |
IntPtr[] native_envp = new IntPtr [cnt_envp + 1]; | |
- for (int i = 0; i < cnt_envp; i++) | |
+ for (int i = 0; i < cnt_envp; i++) { | |
native_envp [i] = GLib.Marshaller.StringToPtrGStrdup(envp[i]); | |
+ } | |
native_envp [cnt_envp] = IntPtr.Zero; | |
GLibSharp.SpawnChildSetupFuncWrapper child_setup_wrapper = new GLibSharp.SpawnChildSetupFuncWrapper (child_setup); | |
child_setup_wrapper.PersistUntilCalled (); | |
@@ -30,6 +32,12 @@ namespace Gdk { | |
bool raw_ret = gdk_spawn_on_screen(screen == null ? IntPtr.Zero : screen.Handle, native_working_directory, native_argv, native_envp, (int) flags, child_setup_wrapper.NativeDelegate, IntPtr.Zero, out child_pid, out error); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_working_directory); | |
+ for (int i = 0; i < cnt_argv; i++) { | |
+ GLib.Marshaller.Free (native_argv[i]); | |
+ } | |
+ for (int i = 0; i < cnt_envp; i++) { | |
+ GLib.Marshaller.Free (native_envp[i]); | |
+ } | |
if (error != IntPtr.Zero) throw new GLib.GException (error); | |
return ret; | |
} | |
@@ -41,13 +49,15 @@ namespace Gdk { | |
IntPtr native_working_directory = GLib.Marshaller.StringToPtrGStrdup (working_directory); | |
int cnt_argv = argv == null ? 0 : argv.Length; | |
IntPtr[] native_argv = new IntPtr [cnt_argv + 1]; | |
- for (int i = 0; i < cnt_argv; i++) | |
+ for (int i = 0; i < cnt_argv; i++) { | |
native_argv [i] = GLib.Marshaller.StringToPtrGStrdup(argv[i]); | |
+ } | |
native_argv [cnt_argv] = IntPtr.Zero; | |
int cnt_envp = envp == null ? 0 : envp.Length; | |
IntPtr[] native_envp = new IntPtr [cnt_envp + 1]; | |
- for (int i = 0; i < cnt_envp; i++) | |
+ for (int i = 0; i < cnt_envp; i++) { | |
native_envp [i] = GLib.Marshaller.StringToPtrGStrdup(envp[i]); | |
+ } | |
native_envp [cnt_envp] = IntPtr.Zero; | |
GLibSharp.SpawnChildSetupFuncWrapper child_setup_wrapper = new GLibSharp.SpawnChildSetupFuncWrapper (child_setup); | |
child_setup_wrapper.PersistUntilCalled (); | |
@@ -55,6 +65,12 @@ namespace Gdk { | |
bool raw_ret = gdk_spawn_on_screen_with_pipes(screen == null ? IntPtr.Zero : screen.Handle, native_working_directory, native_argv, native_envp, (int) flags, child_setup_wrapper.NativeDelegate, IntPtr.Zero, out child_pid, out standard_input, out standard_output, out standard_error, out error); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_working_directory); | |
+ for (int i = 0; i < cnt_argv; i++) { | |
+ GLib.Marshaller.Free (native_argv[i]); | |
+ } | |
+ for (int i = 0; i < cnt_envp; i++) { | |
+ GLib.Marshaller.Free (native_envp[i]); | |
+ } | |
if (error != IntPtr.Zero) throw new GLib.GException (error); | |
return ret; | |
} | |
diff --git b/gdk/generated/Window.cs a/gdk/generated/Window.cs | |
index e3ceee6..02c2605 100644 | |
--- b/gdk/generated/Window.cs | |
+++ a/gdk/generated/Window.cs | |
@@ -8,7 +8,7 @@ namespace Gdk { | |
using System.Runtime.InteropServices; | |
#region Autogenerated code | |
- [Drawable] | |
+ [Window] | |
public class Window : Gdk.Drawable { | |
[Obsolete] | |
@@ -735,6 +735,16 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern IntPtr gdk_window_object_get_type(); | |
+ | |
+ static GLib.GType _gtype = new GLib.GType (gdk_window_object_get_type()); | |
+ public static new GLib.GType GType { | |
+ get { | |
+ return _gtype; | |
+ } | |
+ } | |
+ | |
+ [DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern bool gdk_window_get_deskrelative_origin(IntPtr raw, out int x, out int y); | |
[Obsolete] | |
@@ -1058,4 +1068,14 @@ namespace Gdk { | |
#endregion | |
} | |
+ | |
+ internal class WindowAttribute : GLib.GTypeTypeAttribute { | |
+ [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern IntPtr gdk_window_object_get_type (); | |
+ | |
+ private static GLib.GType _gtype = new GLib.GType (gdk_window_object_get_type ()); | |
+ public static GLib.GType GType { get { return _gtype; } } | |
+ public override GLib.GType Type { get { return _gtype; } } | |
+ | |
+ } | |
} | |
diff --git b/gtk/generated/IconTheme.cs a/gtk/generated/IconTheme.cs | |
index d9d7f11..00413cf 100644 | |
--- b/gtk/generated/IconTheme.cs | |
+++ a/gtk/generated/IconTheme.cs | |
@@ -112,13 +112,13 @@ namespace Gtk { | |
public Gtk.IconInfo ChooseIcon(string[] icon_names, int size, Gtk.IconLookupFlags flags) { | |
int cnt_icon_names = icon_names == null ? 0 : icon_names.Length; | |
IntPtr[] native_icon_names = new IntPtr [cnt_icon_names + 1]; | |
- for (int i = 0; i < cnt_icon_names; i++) | |
+ for (int i = 0; i < cnt_icon_names; i++) { | |
native_icon_names [i] = GLib.Marshaller.StringToPtrGStrdup (icon_names[i]); | |
+ } | |
native_icon_names [cnt_icon_names] = IntPtr.Zero; | |
IntPtr raw_ret = gtk_icon_theme_choose_icon(Handle, native_icon_names, size, (int) flags); | |
Gtk.IconInfo ret = raw_ret == IntPtr.Zero ? null : (Gtk.IconInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.IconInfo), false); | |
- for (int i = 0; i < native_icon_names.Length - 1; i++) { | |
- icon_names [i] = GLib.Marshaller.Utf8PtrToString (native_icon_names[i]); | |
+ for (int i = 0; i < cnt_icon_names; i++) { | |
GLib.Marshaller.Free (native_icon_names[i]); | |
} | |
return ret; | |
diff --git b/gtk/generated/ListStore.cs a/gtk/generated/ListStore.cs | |
index 1523525..ba3a515 100644 | |
--- b/gtk/generated/ListStore.cs | |
+++ a/gtk/generated/ListStore.cs | |
@@ -157,8 +157,9 @@ namespace Gtk { | |
set { | |
int cnt_value = value == null ? 0 : value.Length; | |
IntPtr[] native_value = new IntPtr [cnt_value]; | |
- for (int i = 0; i < cnt_value; i++) | |
+ for (int i = 0; i < cnt_value; i++) { | |
native_value [i] = value[i].Val; | |
+ } | |
gtk_list_store_set_column_types(Handle, (value == null ? 0 : value.Length), native_value); | |
} | |
} | |
diff --git b/gtk/generated/Rc.cs a/gtk/generated/Rc.cs | |
index 96579b4..888747f 100644 | |
--- b/gtk/generated/Rc.cs | |
+++ a/gtk/generated/Rc.cs | |
@@ -27,8 +27,9 @@ namespace Gtk { | |
set { | |
int cnt_value = value == null ? 0 : value.Length; | |
IntPtr[] native_value = new IntPtr [cnt_value + 1]; | |
- for (int i = 0; i < cnt_value; i++) | |
+ for (int i = 0; i < cnt_value; i++) { | |
native_value [i] = GLib.Marshaller.StringToPtrGStrdup(value[i]); | |
+ } | |
native_value [cnt_value] = IntPtr.Zero; | |
if (Environment.OSVersion.Platform == PlatformID.Win32NT || | |
Environment.OSVersion.Platform == PlatformID.Win32S || | |
@@ -37,6 +38,9 @@ namespace Gtk { | |
gtk_rc_set_default_files_utf8(native_value); | |
else | |
gtk_rc_set_default_files(native_value); | |
+ for (int i = 0; i < cnt_value; i++) { | |
+ GLib.Marshaller.Free (native_value[i]); | |
+ } | |
} | |
} | |
diff --git b/gtk/generated/RecentAction.cs a/gtk/generated/RecentAction.cs | |
index d2604b8..d761d97 100644 | |
--- b/gtk/generated/RecentAction.cs | |
+++ a/gtk/generated/RecentAction.cs | |
@@ -235,10 +235,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentChooser.cs a/gtk/generated/RecentChooser.cs | |
index 58b4da6..0956033 100644 | |
--- b/gtk/generated/RecentChooser.cs | |
+++ a/gtk/generated/RecentChooser.cs | |
@@ -33,7 +33,7 @@ namespace Gtk { | |
set; | |
} | |
void SelectAll(); | |
- string GetUris(out ulong length); | |
+ string[] GetUris(out ulong length); | |
bool LocalOnly { | |
get; set; | |
} | |
diff --git b/gtk/generated/RecentChooserAdapter.cs a/gtk/generated/RecentChooserAdapter.cs | |
index 3f7aecc..ba3c1b7 100644 | |
--- b/gtk/generated/RecentChooserAdapter.cs | |
+++ a/gtk/generated/RecentChooserAdapter.cs | |
@@ -633,10 +633,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentChooserDefault.cs a/gtk/generated/RecentChooserDefault.cs | |
index b8eac22..6761a22 100644 | |
--- b/gtk/generated/RecentChooserDefault.cs | |
+++ a/gtk/generated/RecentChooserDefault.cs | |
@@ -165,10 +165,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentChooserDialog.cs a/gtk/generated/RecentChooserDialog.cs | |
index 8451206..c929808 100644 | |
--- b/gtk/generated/RecentChooserDialog.cs | |
+++ a/gtk/generated/RecentChooserDialog.cs | |
@@ -175,10 +175,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentChooserMenu.cs a/gtk/generated/RecentChooserMenu.cs | |
index 7f5e297..f8b42ce 100644 | |
--- b/gtk/generated/RecentChooserMenu.cs | |
+++ a/gtk/generated/RecentChooserMenu.cs | |
@@ -193,10 +193,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentChooserWidget.cs a/gtk/generated/RecentChooserWidget.cs | |
index 0bb7f22..51c1f77 100644 | |
--- b/gtk/generated/RecentChooserWidget.cs | |
+++ a/gtk/generated/RecentChooserWidget.cs | |
@@ -193,10 +193,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length); | |
- public string GetUris(out ulong length) { | |
+ public string[] GetUris(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentData.cs a/gtk/generated/RecentData.cs | |
index 6c3e7bb..9728193 100644 | |
--- b/gtk/generated/RecentData.cs | |
+++ a/gtk/generated/RecentData.cs | |
@@ -17,7 +17,12 @@ namespace Gtk { | |
public string MimeType; | |
public string AppName; | |
public string AppExec; | |
- public string Groups; | |
+ public IntPtr NativeGroups; | |
+ public string[] Groups { | |
+ get { | |
+ return GLib.Marshaller.NullTermPtrToStringArray (NativeGroups, false); | |
+ } | |
+ } | |
public bool IsPrivate; | |
public static Gtk.RecentData Zero = new Gtk.RecentData (); | |
diff --git b/gtk/generated/RecentFilterInfo.cs a/gtk/generated/RecentFilterInfo.cs | |
index 5aa8303..2172cfa 100644 | |
--- b/gtk/generated/RecentFilterInfo.cs | |
+++ a/gtk/generated/RecentFilterInfo.cs | |
@@ -16,8 +16,18 @@ namespace Gtk { | |
public string Uri; | |
public string DisplayName; | |
public string MimeType; | |
- public string Applications; | |
- public string Groups; | |
+ public IntPtr NativeApplications; | |
+ public string[] Applications { | |
+ get { | |
+ return GLib.Marshaller.NullTermPtrToStringArray (NativeApplications, false); | |
+ } | |
+ } | |
+ public IntPtr NativeGroups; | |
+ public string[] Groups { | |
+ get { | |
+ return GLib.Marshaller.NullTermPtrToStringArray (NativeGroups, false); | |
+ } | |
+ } | |
public int Age; | |
public static Gtk.RecentFilterInfo Zero = new Gtk.RecentFilterInfo (); | |
diff --git b/gtk/generated/RecentInfo.cs a/gtk/generated/RecentInfo.cs | |
index e694006..d0bd2d1 100644 | |
--- b/gtk/generated/RecentInfo.cs | |
+++ a/gtk/generated/RecentInfo.cs | |
@@ -133,10 +133,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_info_get_applications(IntPtr raw, out UIntPtr length); | |
- public string GetApplications(out ulong length) { | |
+ public string[] GetApplications(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_info_get_applications(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
@@ -162,10 +162,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_recent_info_get_groups(IntPtr raw, out UIntPtr length); | |
- public string GetGroups(out ulong length) { | |
+ public string[] GetGroups(out ulong length) { | |
UIntPtr native_length; | |
IntPtr raw_ret = gtk_recent_info_get_groups(Handle, out native_length); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
length = (ulong) native_length; | |
return ret; | |
} | |
diff --git b/gtk/generated/ScaleButton.cs a/gtk/generated/ScaleButton.cs | |
index 2b3f0fe..6daaf2c 100644 | |
--- b/gtk/generated/ScaleButton.cs | |
+++ a/gtk/generated/ScaleButton.cs | |
@@ -23,12 +23,12 @@ namespace Gtk { | |
} | |
int cnt_icons = icons == null ? 0 : icons.Length; | |
IntPtr[] native_icons = new IntPtr [cnt_icons + 1]; | |
- for (int i = 0; i < cnt_icons; i++) | |
+ for (int i = 0; i < cnt_icons; i++) { | |
native_icons [i] = GLib.Marshaller.StringToPtrGStrdup (icons[i]); | |
+ } | |
native_icons [cnt_icons] = IntPtr.Zero; | |
Raw = gtk_scale_button_new((int) size, min, max, step, native_icons); | |
- for (int i = 0; i < native_icons.Length - 1; i++) { | |
- icons [i] = GLib.Marshaller.Utf8PtrToString (native_icons[i]); | |
+ for (int i = 0; i < cnt_icons; i++) { | |
GLib.Marshaller.Free (native_icons[i]); | |
} | |
} | |
@@ -65,12 +65,12 @@ namespace Gtk { | |
set { | |
int cnt_value = value == null ? 0 : value.Length; | |
IntPtr[] native_value = new IntPtr [cnt_value + 1]; | |
- for (int i = 0; i < cnt_value; i++) | |
+ for (int i = 0; i < cnt_value; i++) { | |
native_value [i] = GLib.Marshaller.StringToPtrGStrdup (value[i]); | |
+ } | |
native_value [cnt_value] = IntPtr.Zero; | |
gtk_scale_button_set_icons(Handle, native_value); | |
- for (int i = 0; i < native_value.Length - 1; i++) { | |
- value [i] = GLib.Marshaller.Utf8PtrToString (native_value[i]); | |
+ for (int i = 0; i < cnt_value; i++) { | |
GLib.Marshaller.Free (native_value[i]); | |
} | |
} | |
diff --git b/gtk/generated/SelectionData.cs a/gtk/generated/SelectionData.cs | |
index 43fddf2..51cf36d 100644 | |
--- b/gtk/generated/SelectionData.cs | |
+++ a/gtk/generated/SelectionData.cs | |
@@ -86,11 +86,20 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_selection_data_set_uris(IntPtr raw, IntPtr uris); | |
+ static extern bool gtk_selection_data_set_uris(IntPtr raw, IntPtr[] uris); | |
- public bool SetUris(string uris) { | |
- bool raw_ret = gtk_selection_data_set_uris(Handle, GLib.Marshaller.StringToPtrGStrdup(uris)); | |
+ public bool SetUris(string[] uris) { | |
+ int cnt_uris = uris == null ? 0 : uris.Length; | |
+ IntPtr[] native_uris = new IntPtr [cnt_uris + 1]; | |
+ for (int i = 0; i < cnt_uris; i++) { | |
+ native_uris [i] = GLib.Marshaller.StringToPtrGStrdup(uris[i]); | |
+ } | |
+ native_uris [cnt_uris] = IntPtr.Zero; | |
+ bool raw_ret = gtk_selection_data_set_uris(Handle, native_uris); | |
bool ret = raw_ret; | |
+ for (int i = 0; i < cnt_uris; i++) { | |
+ GLib.Marshaller.Free (native_uris[i]); | |
+ } | |
return ret; | |
} | |
@@ -161,10 +170,10 @@ namespace Gtk { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr gtk_selection_data_get_uris(IntPtr raw); | |
- public string Uris { | |
+ public string[] Uris { | |
get { | |
IntPtr raw_ret = gtk_selection_data_get_uris(Handle); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
return ret; | |
} | |
} | |
diff --git b/gtk/generated/TreeStore.cs a/gtk/generated/TreeStore.cs | |
index 768d88e..e4f438e 100644 | |
--- b/gtk/generated/TreeStore.cs | |
+++ a/gtk/generated/TreeStore.cs | |
@@ -97,8 +97,9 @@ namespace Gtk { | |
set { | |
int cnt_value = value == null ? 0 : value.Length; | |
IntPtr[] native_value = new IntPtr [cnt_value]; | |
- for (int i = 0; i < cnt_value; i++) | |
+ for (int i = 0; i < cnt_value; i++) { | |
native_value [i] = value[i].Val; | |
+ } | |
gtk_tree_store_set_column_types(Handle, (value == null ? 0 : value.Length), native_value); | |
} | |
} | |
diff --git b/pango/generated/Global.cs a/pango/generated/Global.cs | |
index 6701045..e67c920 100644 | |
--- b/pango/generated/Global.cs | |
+++ a/pango/generated/Global.cs | |
@@ -165,10 +165,10 @@ namespace Pango { | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr pango_split_file_list(IntPtr str); | |
- public static string SplitFileList(string str) { | |
+ public static string[] SplitFileList(string str) { | |
IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); | |
IntPtr raw_ret = pango_split_file_list(native_str); | |
- string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
+ string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); | |
GLib.Marshaller.Free (native_str); | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment