-
-
Save Therzok/4e76d191033cc5f8fd5dde9b79ea0a1c to your computer and use it in GitHub Desktop.
newer struct changes
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/AtkSharp.KeySnoopFuncNative.cs a/atk/generated/AtkSharp.KeySnoopFuncNative.cs | |
index 62b1716..ddc1a4c 100644 | |
--- b/atk/generated/AtkSharp.KeySnoopFuncNative.cs | |
+++ a/atk/generated/AtkSharp.KeySnoopFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace AtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate int KeySnoopFuncNative(IntPtr evnt, IntPtr func_data); | |
+ internal delegate int KeySnoopFuncNative(ref Atk.KeyEventStruct evnt, IntPtr func_data); | |
internal class KeySnoopFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace AtkSharp { | |
int InvokeNative (Atk.KeyEventStruct evnt) | |
{ | |
- IntPtr native_evnt = GLib.Marshaller.StructureToPtrAlloc (evnt); | |
- int result = native_cb (native_evnt, __data); | |
- Marshal.FreeHGlobal (native_evnt); | |
+ int result = native_cb (ref evnt, __data); | |
+ | |
return result; | |
} | |
} | |
internal class KeySnoopFuncWrapper { | |
- public int NativeCallback (IntPtr evnt, IntPtr func_data) | |
+ public int NativeCallback (ref Atk.KeyEventStruct evnt, IntPtr func_data) | |
{ | |
try { | |
- int __ret = managed (Atk.KeyEventStruct.New (evnt)); | |
+ int __ret = managed (evnt); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/atk/generated/AtkSharp.PropertyChangeHandlerNative.cs a/atk/generated/AtkSharp.PropertyChangeHandlerNative.cs | |
index 70b51cd..f9ef468 100644 | |
--- b/atk/generated/AtkSharp.PropertyChangeHandlerNative.cs | |
+++ a/atk/generated/AtkSharp.PropertyChangeHandlerNative.cs | |
@@ -8,7 +8,7 @@ namespace AtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void PropertyChangeHandlerNative(IntPtr arg1, IntPtr arg2); | |
+ internal delegate void PropertyChangeHandlerNative(IntPtr arg1, ref Atk.PropertyValues arg2); | |
internal class PropertyChangeHandlerInvoker { | |
@@ -42,18 +42,17 @@ namespace AtkSharp { | |
void InvokeNative (Atk.Object arg1, Atk.PropertyValues arg2) | |
{ | |
- IntPtr native_arg2 = GLib.Marshaller.StructureToPtrAlloc (arg2); | |
- native_cb (arg1 == null ? IntPtr.Zero : arg1.Handle, native_arg2); | |
- Marshal.FreeHGlobal (native_arg2); | |
+ native_cb (arg1 == null ? IntPtr.Zero : arg1.Handle, ref arg2); | |
+ | |
} | |
} | |
internal class PropertyChangeHandlerWrapper { | |
- public void NativeCallback (IntPtr arg1, IntPtr arg2) | |
+ public void NativeCallback (IntPtr arg1, ref Atk.PropertyValues arg2) | |
{ | |
try { | |
- managed (GLib.Object.GetObject(arg1) as Atk.Object, Atk.PropertyValues.New (arg2)); | |
+ managed (GLib.Object.GetObject(arg1) as Atk.Object, arg2); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/atk/generated/NoOpObject.cs a/atk/generated/NoOpObject.cs | |
index 9670e60..69f0e49 100644 | |
--- b/atk/generated/NoOpObject.cs | |
+++ a/atk/generated/NoOpObject.cs | |
@@ -162,15 +162,15 @@ namespace Atk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void BoundsChangedVMDelegate (IntPtr component, IntPtr bounds); | |
+ delegate void BoundsChangedVMDelegate (IntPtr component, ref Atk.Rectangle bounds); | |
static BoundsChangedVMDelegate BoundsChangedVMCallback; | |
- static void boundschanged_cb (IntPtr component, IntPtr bounds) | |
+ static void boundschanged_cb (IntPtr component, ref Atk.Rectangle bounds) | |
{ | |
try { | |
NoOpObject component_managed = GLib.Object.GetObject (component, false) as NoOpObject; | |
- component_managed.OnBoundsChanged (Atk.Rectangle.New (bounds)); | |
+ component_managed.OnBoundsChanged (bounds); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -642,13 +642,12 @@ namespace Atk { | |
} | |
[DllImport("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr atk_text_get_bounded_ranges(IntPtr raw, IntPtr rect, int coord_type, int x_clip_type, int y_clip_type); | |
+ static extern IntPtr atk_text_get_bounded_ranges(IntPtr raw, ref Atk.TextRectangle rect, int coord_type, int x_clip_type, int y_clip_type); | |
public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coord_type, Atk.TextClipType x_clip_type, Atk.TextClipType y_clip_type) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- IntPtr raw_ret = atk_text_get_bounded_ranges(Handle, native_rect, (int) coord_type, (int) x_clip_type, (int) y_clip_type); | |
+ IntPtr raw_ret = atk_text_get_bounded_ranges(Handle, ref rect, (int) coord_type, (int) x_clip_type, (int) y_clip_type); | |
Atk.TextRange ret = Atk.TextRange.New (raw_ret); | |
- Marshal.FreeHGlobal (native_rect); | |
+ | |
return ret; | |
} | |
diff --git b/atk/generated/Object.cs a/atk/generated/Object.cs | |
index e380101..1a0db14 100644 | |
--- b/atk/generated/Object.cs | |
+++ a/atk/generated/Object.cs | |
@@ -389,18 +389,18 @@ namespace Atk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void PropertyChangeVMDelegate (IntPtr accessible, IntPtr values); | |
+ delegate void PropertyChangeVMDelegate (IntPtr accessible, ref Atk.PropertyValues values); | |
[DllImport ("atksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void atksharp_object_override_property_change (IntPtr gtype, PropertyChangeVMDelegate cb); | |
static PropertyChangeVMDelegate PropertyChangeVMCallback; | |
- static void propertychange_cb (IntPtr accessible, IntPtr values) | |
+ static void propertychange_cb (IntPtr accessible, ref Atk.PropertyValues values) | |
{ | |
try { | |
Object accessible_managed = GLib.Object.GetObject (accessible, false) as Object; | |
- accessible_managed.OnPropertyChange (Atk.PropertyValues.New (values)); | |
+ accessible_managed.OnPropertyChange (values); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -414,20 +414,19 @@ namespace Atk { | |
} | |
[DllImport ("atksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void atksharp_object_base_property_change (IntPtr accessible, IntPtr values); | |
+ static extern void atksharp_object_base_property_change (IntPtr accessible, ref Atk.PropertyValues values); | |
[GLib.DefaultSignalHandler(Type=typeof(Atk.Object), ConnectionMethod="OverridePropertyChange")] | |
protected virtual void OnPropertyChange (Atk.PropertyValues values) | |
{ | |
- IntPtr native_values = GLib.Marshaller.StructureToPtrAlloc (values); | |
- atksharp_object_base_property_change (Handle, native_values); | |
- Marshal.FreeHGlobal (native_values); | |
+ atksharp_object_base_property_change (Handle, ref values); | |
+ | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void PropertyChangeSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr gch); | |
+ delegate void PropertyChangeSignalDelegate (IntPtr arg0, ref Atk.PropertyValues arg1, IntPtr gch); | |
- static void PropertyChangeSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) | |
+ static void PropertyChangeSignalCallback (IntPtr arg0, ref Atk.PropertyValues arg1, IntPtr gch) | |
{ | |
Atk.PropertyChangeArgs args = new Atk.PropertyChangeArgs (); | |
try { | |
@@ -436,7 +435,7 @@ namespace Atk { | |
throw new Exception("Unknown signal GC handle received " + gch); | |
args.Args = new object[1]; | |
- args.Args[0] = Atk.PropertyValues.New (arg1); | |
+ args.Args[0] = arg1; | |
Atk.PropertyChangeEventHandler handler = (Atk.PropertyChangeEventHandler) sig.Handler; | |
handler (GLib.Object.GetObject (arg0), args); | |
} catch (Exception e) { | |
diff --git b/atk/generated/TextAdapter.cs a/atk/generated/TextAdapter.cs | |
index 1e429b3..32af5d1 100644 | |
--- b/atk/generated/TextAdapter.cs | |
+++ a/atk/generated/TextAdapter.cs | |
@@ -320,13 +320,13 @@ namespace Atk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate IntPtr GetBoundedRangesDelegate (IntPtr text, IntPtr rect, int coord_type, int x_clip_type, int y_clip_type); | |
+ delegate IntPtr GetBoundedRangesDelegate (IntPtr text, ref Atk.TextRectangle rect, int coord_type, int x_clip_type, int y_clip_type); | |
- static IntPtr GetBoundedRangesCallback (IntPtr text, IntPtr rect, int coord_type, int x_clip_type, int y_clip_type) | |
+ static IntPtr GetBoundedRangesCallback (IntPtr text, ref Atk.TextRectangle rect, int coord_type, int x_clip_type, int y_clip_type) | |
{ | |
try { | |
Atk.TextImplementor __obj = GLib.Object.GetObject (text, false) as Atk.TextImplementor; | |
- Atk.TextRange __result = __obj.GetBoundedRanges (Atk.TextRectangle.New (rect), (Atk.CoordType) coord_type, (Atk.TextClipType) x_clip_type, (Atk.TextClipType) y_clip_type); | |
+ Atk.TextRange __result = __obj.GetBoundedRanges (rect, (Atk.CoordType) coord_type, (Atk.TextClipType) x_clip_type, (Atk.TextClipType) y_clip_type); | |
return GLib.Marshaller.StructureToPtrAlloc (__result); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
@@ -573,12 +573,11 @@ namespace Atk { | |
} | |
[DllImport("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void atk_text_free_ranges(IntPtr ranges); | |
+ static extern void atk_text_free_ranges(ref Atk.TextRange ranges); | |
public static void FreeRanges(Atk.TextRange ranges) { | |
- IntPtr native_ranges = GLib.Marshaller.StructureToPtrAlloc (ranges); | |
- atk_text_free_ranges(native_ranges); | |
- Marshal.FreeHGlobal (native_ranges); | |
+ atk_text_free_ranges(ref ranges); | |
+ | |
} | |
[DllImport("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -673,13 +672,12 @@ namespace Atk { | |
} | |
[DllImport("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr atk_text_get_bounded_ranges(IntPtr raw, IntPtr rect, int coord_type, int x_clip_type, int y_clip_type); | |
+ static extern IntPtr atk_text_get_bounded_ranges(IntPtr raw, ref Atk.TextRectangle rect, int coord_type, int x_clip_type, int y_clip_type); | |
public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coord_type, Atk.TextClipType x_clip_type, Atk.TextClipType y_clip_type) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- IntPtr raw_ret = atk_text_get_bounded_ranges(Handle, native_rect, (int) coord_type, (int) x_clip_type, (int) y_clip_type); | |
+ IntPtr raw_ret = atk_text_get_bounded_ranges(Handle, ref rect, (int) coord_type, (int) x_clip_type, (int) y_clip_type); | |
Atk.TextRange ret = Atk.TextRange.New (raw_ret); | |
- Marshal.FreeHGlobal (native_rect); | |
+ | |
return ret; | |
} | |
diff --git b/atk/generated/Util.cs a/atk/generated/Util.cs | |
index 2b7365b..dd4367d 100644 | |
--- b/atk/generated/Util.cs | |
+++ a/atk/generated/Util.cs | |
@@ -134,10 +134,7 @@ namespace Atk { | |
int InvokeNative (KeyEventStruct evnt) | |
{ | |
- IntPtr native_evnt = GLib.Marshaller.StructureToPtrAlloc (evnt); | |
- int result = native_cb (native_evnt, data); | |
- evnt = KeyEventStruct.New (native_evnt); | |
- Marshal.FreeHGlobal (native_evnt); | |
+ int result = native_cb (ref evnt, data); | |
return result; | |
} | |
} | |
diff --git b/gdk/generated/CairoHelper.cs a/gdk/generated/CairoHelper.cs | |
index f69d361..f573199 100644 | |
--- b/gdk/generated/CairoHelper.cs | |
+++ a/gdk/generated/CairoHelper.cs | |
@@ -17,12 +17,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_cairo_set_source_color(IntPtr cr, IntPtr color); | |
+ static extern void gdk_cairo_set_source_color(IntPtr cr, ref Gdk.Color color); | |
public static void SetSourceColor(Cairo.Context cr, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gdk_cairo_set_source_color(cr == null ? IntPtr.Zero : cr.Handle, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gdk_cairo_set_source_color(cr == null ? IntPtr.Zero : cr.Handle, ref color); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -49,12 +48,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_cairo_rectangle(IntPtr cr, IntPtr rectangle); | |
+ static extern void gdk_cairo_rectangle(IntPtr cr, ref Gdk.Rectangle rectangle); | |
public static void Rectangle(Cairo.Context cr, Gdk.Rectangle rectangle) { | |
- IntPtr native_rectangle = GLib.Marshaller.StructureToPtrAlloc (rectangle); | |
- gdk_cairo_rectangle(cr == null ? IntPtr.Zero : cr.Handle, native_rectangle); | |
- Marshal.FreeHGlobal (native_rectangle); | |
+ gdk_cairo_rectangle(cr == null ? IntPtr.Zero : cr.Handle, ref rectangle); | |
+ | |
} | |
#endregion | |
diff --git b/gdk/generated/Char.cs a/gdk/generated/Char.cs | |
index 9b98e09..ada297a 100644 | |
--- b/gdk/generated/Char.cs | |
+++ a/gdk/generated/Char.cs | |
@@ -10,50 +10,46 @@ namespace Gdk { | |
public class Char { | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_char_height(IntPtr font, byte character); | |
+ static extern int gdk_char_height(ref Gdk.Font font, byte character); | |
[Obsolete] | |
public static int Height(Gdk.Font font, byte character) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
- int raw_ret = gdk_char_height(native_font, character); | |
+ int raw_ret = gdk_char_height(ref font, character); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_char_width(IntPtr font, byte character); | |
+ static extern int gdk_char_width(ref Gdk.Font font, byte character); | |
[Obsolete] | |
public static int Width(Gdk.Font font, byte character) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
- int raw_ret = gdk_char_width(native_font, character); | |
+ int raw_ret = gdk_char_width(ref font, character); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_char_measure(IntPtr font, byte character); | |
+ static extern int gdk_char_measure(ref Gdk.Font font, byte character); | |
[Obsolete] | |
public static int Measure(Gdk.Font font, byte character) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
- int raw_ret = gdk_char_measure(native_font, character); | |
+ int raw_ret = gdk_char_measure(ref font, character); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_char_width_wc(IntPtr font, uint character); | |
+ static extern int gdk_char_width_wc(ref Gdk.Font font, uint character); | |
[Obsolete] | |
public static int WidthWc(Gdk.Font font, uint character) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
- int raw_ret = gdk_char_width_wc(native_font, character); | |
+ int raw_ret = gdk_char_width_wc(ref font, character); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/Color.cs a/gdk/generated/Color.cs | |
index a44830e..3a661b5 100644 | |
--- b/gdk/generated/Color.cs | |
+++ a/gdk/generated/Color.cs | |
@@ -26,14 +26,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_color_black(IntPtr colormap, IntPtr color); | |
+ static extern int gdk_color_black(IntPtr colormap, ref Gdk.Color color); | |
[Obsolete] | |
public static int Black(Gdk.Colormap colormap, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- int raw_ret = gdk_color_black(colormap == null ? IntPtr.Zero : colormap.Handle, native_color); | |
+ int raw_ret = gdk_color_black(colormap == null ? IntPtr.Zero : colormap.Handle, ref color); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
return ret; | |
} | |
@@ -49,63 +48,58 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gdk_color_equal(ref Gdk.Color raw, IntPtr colorb); | |
+ static extern bool gdk_color_equal(ref Gdk.Color raw, ref Gdk.Color colorb); | |
public bool Equal(Gdk.Color colorb) { | |
- IntPtr native_colorb = GLib.Marshaller.StructureToPtrAlloc (colorb); | |
- bool raw_ret = gdk_color_equal(ref this, native_colorb); | |
+ bool raw_ret = gdk_color_equal(ref this, ref colorb); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_colorb); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_color_change(IntPtr colormap, IntPtr color); | |
+ static extern int gdk_color_change(IntPtr colormap, ref Gdk.Color color); | |
[Obsolete] | |
public static int Change(Gdk.Colormap colormap, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- int raw_ret = gdk_color_change(colormap == null ? IntPtr.Zero : colormap.Handle, native_color); | |
+ int raw_ret = gdk_color_change(colormap == null ? IntPtr.Zero : colormap.Handle, ref color); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_color_alloc(IntPtr colormap, IntPtr color); | |
+ static extern int gdk_color_alloc(IntPtr colormap, ref Gdk.Color color); | |
[Obsolete] | |
public static int Alloc(Gdk.Colormap colormap, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- int raw_ret = gdk_color_alloc(colormap == null ? IntPtr.Zero : colormap.Handle, native_color); | |
+ int raw_ret = gdk_color_alloc(colormap == null ? IntPtr.Zero : colormap.Handle, ref color); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gdk_color_parse(IntPtr spec, IntPtr color); | |
+ static extern bool gdk_color_parse(IntPtr spec, ref Gdk.Color color); | |
public static bool Parse(string spec, ref Gdk.Color color) { | |
IntPtr native_spec = GLib.Marshaller.StringToPtrGStrdup (spec); | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- bool raw_ret = gdk_color_parse(native_spec, native_color); | |
+ bool raw_ret = gdk_color_parse(native_spec, ref color); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_spec); | |
- color = Gdk.Color.New (native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_color_white(IntPtr colormap, IntPtr color); | |
+ static extern int gdk_color_white(IntPtr colormap, ref Gdk.Color color); | |
[Obsolete] | |
public static int White(Gdk.Colormap colormap, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- int raw_ret = gdk_color_white(colormap == null ? IntPtr.Zero : colormap.Handle, native_color); | |
+ int raw_ret = gdk_color_white(colormap == null ? IntPtr.Zero : colormap.Handle, ref color); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/Colormap.cs a/gdk/generated/Colormap.cs | |
index 35eb7a8..6795066 100644 | |
--- b/gdk/generated/Colormap.cs | |
+++ a/gdk/generated/Colormap.cs | |
@@ -108,13 +108,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_colormap_query_color(IntPtr raw, UIntPtr pixel, IntPtr result); | |
+ static extern void gdk_colormap_query_color(IntPtr raw, UIntPtr pixel, ref Gdk.Color result); | |
public void QueryColor(ulong pixel, ref Gdk.Color result) { | |
- IntPtr native_result = GLib.Marshaller.StructureToPtrAlloc (result); | |
- gdk_colormap_query_color(Handle, new UIntPtr (pixel), native_result); | |
- result = Gdk.Color.New (native_result); | |
- Marshal.FreeHGlobal (native_result); | |
+ gdk_colormap_query_color(Handle, new UIntPtr (pixel), ref result); | |
+ | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -128,14 +127,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gdk_colormap_alloc_color(IntPtr raw, IntPtr color, bool writeable, bool best_match); | |
+ static extern bool gdk_colormap_alloc_color(IntPtr raw, ref Gdk.Color color, bool writeable, bool best_match); | |
public bool AllocColor(ref Gdk.Color color, bool writeable, bool best_match) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- bool raw_ret = gdk_colormap_alloc_color(Handle, native_color, writeable, best_match); | |
+ bool raw_ret = gdk_colormap_alloc_color(Handle, ref color, writeable, best_match); | |
bool ret = raw_ret; | |
- color = Gdk.Color.New (native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/Cursor.cs a/gdk/generated/Cursor.cs | |
index 3e2c436..2e22099 100644 | |
--- b/gdk/generated/Cursor.cs | |
+++ a/gdk/generated/Cursor.cs | |
@@ -100,15 +100,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_cursor_new_from_pixmap(IntPtr source, IntPtr mask, IntPtr fg, IntPtr bg, int x, int y); | |
+ static extern IntPtr gdk_cursor_new_from_pixmap(IntPtr source, IntPtr mask, ref Gdk.Color fg, ref Gdk.Color bg, int x, int y); | |
public Cursor (Gdk.Pixmap source, Gdk.Pixmap mask, Gdk.Color fg, Gdk.Color bg, int x, int y) | |
{ | |
- IntPtr native_fg = GLib.Marshaller.StructureToPtrAlloc (fg); | |
- IntPtr native_bg = GLib.Marshaller.StructureToPtrAlloc (bg); | |
- Raw = gdk_cursor_new_from_pixmap(source == null ? IntPtr.Zero : source.Handle, mask == null ? IntPtr.Zero : mask.Handle, native_fg, native_bg, x, y); | |
- Marshal.FreeHGlobal (native_fg); | |
- Marshal.FreeHGlobal (native_bg); | |
+ Raw = gdk_cursor_new_from_pixmap(source == null ? IntPtr.Zero : source.Handle, mask == null ? IntPtr.Zero : mask.Handle, ref fg, ref bg, x, y); | |
+ | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/Display.cs a/gdk/generated/Display.cs | |
index 943d23b..c53bbb5 100644 | |
--- b/gdk/generated/Display.cs | |
+++ a/gdk/generated/Display.cs | |
@@ -280,13 +280,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_display_set_pointer_hooks(IntPtr raw, IntPtr new_hooks); | |
+ static extern IntPtr gdk_display_set_pointer_hooks(IntPtr raw, ref Gdk.DisplayPointerHooks new_hooks); | |
public Gdk.DisplayPointerHooks SetPointerHooks(Gdk.DisplayPointerHooks new_hooks) { | |
- IntPtr native_new_hooks = GLib.Marshaller.StructureToPtrAlloc (new_hooks); | |
- IntPtr raw_ret = gdk_display_set_pointer_hooks(Handle, native_new_hooks); | |
+ IntPtr raw_ret = gdk_display_set_pointer_hooks(Handle, ref new_hooks); | |
Gdk.DisplayPointerHooks ret = Gdk.DisplayPointerHooks.New (raw_ret); | |
- Marshal.FreeHGlobal (native_new_hooks); | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/Drawable.cs a/gdk/generated/Drawable.cs | |
index f99a54b..ec24b8e 100644 | |
--- b/gdk/generated/Drawable.cs | |
+++ a/gdk/generated/Drawable.cs | |
@@ -100,12 +100,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_trapezoids(IntPtr raw, IntPtr gc, IntPtr trapezoids, int n_trapezoids); | |
+ static extern void gdk_draw_trapezoids(IntPtr raw, IntPtr gc, ref Gdk.Trapezoid trapezoids, int n_trapezoids); | |
public void DrawTrapezoids(Gdk.GC gc, Gdk.Trapezoid trapezoids, int n_trapezoids) { | |
- IntPtr native_trapezoids = GLib.Marshaller.StructureToPtrAlloc (trapezoids); | |
- gdk_draw_trapezoids(Handle, gc == null ? IntPtr.Zero : gc.Handle, native_trapezoids, n_trapezoids); | |
- Marshal.FreeHGlobal (native_trapezoids); | |
+ gdk_draw_trapezoids(Handle, gc == null ? IntPtr.Zero : gc.Handle, ref trapezoids, n_trapezoids); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -138,12 +137,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_segments(IntPtr raw, IntPtr gc, IntPtr segs, int nsegs); | |
+ static extern void gdk_draw_segments(IntPtr raw, IntPtr gc, ref Gdk.Segment segs, int nsegs); | |
public void DrawSegments(Gdk.GC gc, Gdk.Segment segs, int nsegs) { | |
- IntPtr native_segs = GLib.Marshaller.StructureToPtrAlloc (segs); | |
- gdk_draw_segments(Handle, gc == null ? IntPtr.Zero : gc.Handle, native_segs, nsegs); | |
- Marshal.FreeHGlobal (native_segs); | |
+ gdk_draw_segments(Handle, gc == null ? IntPtr.Zero : gc.Handle, ref segs, nsegs); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -201,14 +199,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_layout_line_with_colors(IntPtr raw, IntPtr gc, int x, int y, IntPtr line, IntPtr foreground, IntPtr background); | |
+ static extern void gdk_draw_layout_line_with_colors(IntPtr raw, IntPtr gc, int x, int y, IntPtr line, ref Gdk.Color foreground, ref Gdk.Color background); | |
public void DrawLayoutLineWithColors(Gdk.GC gc, int x, int y, Pango.LayoutLine line, Gdk.Color foreground, Gdk.Color background) { | |
- IntPtr native_foreground = GLib.Marshaller.StructureToPtrAlloc (foreground); | |
- IntPtr native_background = GLib.Marshaller.StructureToPtrAlloc (background); | |
- gdk_draw_layout_line_with_colors(Handle, gc == null ? IntPtr.Zero : gc.Handle, x, y, line == null ? IntPtr.Zero : line.Handle, native_foreground, native_background); | |
- Marshal.FreeHGlobal (native_foreground); | |
- Marshal.FreeHGlobal (native_background); | |
+ gdk_draw_layout_line_with_colors(Handle, gc == null ? IntPtr.Zero : gc.Handle, x, y, line == null ? IntPtr.Zero : line.Handle, ref foreground, ref background); | |
+ | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -257,14 +253,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_text(IntPtr raw, IntPtr font, IntPtr gc, int x, int y, IntPtr text, int text_length); | |
+ static extern void gdk_draw_text(IntPtr raw, ref Gdk.Font font, IntPtr gc, int x, int y, IntPtr text, int text_length); | |
[Obsolete] | |
public void DrawText(Gdk.Font font, Gdk.GC gc, int x, int y, string text) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); | |
- gdk_draw_text(Handle, native_font, gc == null ? IntPtr.Zero : gc.Handle, x, y, native_text, System.Text.Encoding.UTF8.GetByteCount (text)); | |
- Marshal.FreeHGlobal (native_font); | |
+ gdk_draw_text(Handle, ref font, gc == null ? IntPtr.Zero : gc.Handle, x, y, native_text, System.Text.Encoding.UTF8.GetByteCount (text)); | |
+ | |
GLib.Marshaller.Free (native_text); | |
} | |
@@ -300,36 +295,33 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_string(IntPtr raw, IntPtr font, IntPtr gc, int x, int y, IntPtr str1ng); | |
+ static extern void gdk_draw_string(IntPtr raw, ref Gdk.Font font, IntPtr gc, int x, int y, IntPtr str1ng); | |
[Obsolete] | |
public void DrawString(Gdk.Font font, Gdk.GC gc, int x, int y, string str1ng) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- gdk_draw_string(Handle, native_font, gc == null ? IntPtr.Zero : gc.Handle, x, y, native_str1ng); | |
- Marshal.FreeHGlobal (native_font); | |
+ gdk_draw_string(Handle, ref font, gc == null ? IntPtr.Zero : gc.Handle, x, y, native_str1ng); | |
+ | |
GLib.Marshaller.Free (native_str1ng); | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_text_wc(IntPtr raw, IntPtr font, IntPtr gc, int x, int y, out uint text, int text_length); | |
+ static extern void gdk_draw_text_wc(IntPtr raw, ref Gdk.Font font, IntPtr gc, int x, int y, out uint text, int text_length); | |
[Obsolete] | |
public uint DrawTextWc(Gdk.Font font, Gdk.GC gc, int x, int y, int text_length) { | |
uint text; | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
- gdk_draw_text_wc(Handle, native_font, gc == null ? IntPtr.Zero : gc.Handle, x, y, out text, text_length); | |
- Marshal.FreeHGlobal (native_font); | |
+ gdk_draw_text_wc(Handle, ref font, gc == null ? IntPtr.Zero : gc.Handle, x, y, out text, text_length); | |
+ | |
return text; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_glyphs_transformed(IntPtr raw, IntPtr gc, IntPtr matrix, IntPtr font, int x, int y, IntPtr glyphs); | |
+ static extern void gdk_draw_glyphs_transformed(IntPtr raw, IntPtr gc, ref Pango.Matrix matrix, IntPtr font, int x, int y, IntPtr glyphs); | |
public void DrawGlyphsTransformed(Gdk.GC gc, Pango.Matrix matrix, Pango.Font font, int x, int y, Pango.GlyphString glyphs) { | |
- IntPtr native_matrix = GLib.Marshaller.StructureToPtrAlloc (matrix); | |
- gdk_draw_glyphs_transformed(Handle, gc == null ? IntPtr.Zero : gc.Handle, native_matrix, font == null ? IntPtr.Zero : font.Handle, x, y, glyphs == null ? IntPtr.Zero : glyphs.Handle); | |
- Marshal.FreeHGlobal (native_matrix); | |
+ gdk_draw_glyphs_transformed(Handle, gc == null ? IntPtr.Zero : gc.Handle, ref matrix, font == null ? IntPtr.Zero : font.Handle, x, y, glyphs == null ? IntPtr.Zero : glyphs.Handle); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -372,14 +364,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_draw_layout_with_colors(IntPtr raw, IntPtr gc, int x, int y, IntPtr layout, IntPtr foreground, IntPtr background); | |
+ static extern void gdk_draw_layout_with_colors(IntPtr raw, IntPtr gc, int x, int y, IntPtr layout, ref Gdk.Color foreground, ref Gdk.Color background); | |
public void DrawLayoutWithColors(Gdk.GC gc, int x, int y, Pango.Layout layout, Gdk.Color foreground, Gdk.Color background) { | |
- IntPtr native_foreground = GLib.Marshaller.StructureToPtrAlloc (foreground); | |
- IntPtr native_background = GLib.Marshaller.StructureToPtrAlloc (background); | |
- gdk_draw_layout_with_colors(Handle, gc == null ? IntPtr.Zero : gc.Handle, x, y, layout == null ? IntPtr.Zero : layout.Handle, native_foreground, native_background); | |
- Marshal.FreeHGlobal (native_foreground); | |
- Marshal.FreeHGlobal (native_background); | |
+ gdk_draw_layout_with_colors(Handle, gc == null ? IntPtr.Zero : gc.Handle, x, y, layout == null ? IntPtr.Zero : layout.Handle, ref foreground, ref background); | |
+ | |
+ | |
} | |
#endregion | |
diff --git b/gdk/generated/Font.cs a/gdk/generated/Font.cs | |
index 4a825bd..f12cc97 100644 | |
--- b/gdk/generated/Font.cs | |
+++ a/gdk/generated/Font.cs | |
@@ -53,13 +53,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gdk_font_equal(ref Gdk.Font raw, IntPtr fontb); | |
+ static extern bool gdk_font_equal(ref Gdk.Font raw, ref Gdk.Font fontb); | |
public bool Equal(Gdk.Font fontb) { | |
- IntPtr native_fontb = GLib.Marshaller.StructureToPtrAlloc (fontb); | |
- bool raw_ret = gdk_font_equal(ref this, native_fontb); | |
+ bool raw_ret = gdk_font_equal(ref this, ref fontb); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_fontb); | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/GC.cs a/gdk/generated/GC.cs | |
index 64db3e7..92b35f5 100644 | |
--- b/gdk/generated/GC.cs | |
+++ a/gdk/generated/GC.cs | |
@@ -27,16 +27,15 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_gc_new_with_values(IntPtr drawable, IntPtr values, int values_mask); | |
+ static extern IntPtr gdk_gc_new_with_values(IntPtr drawable, ref Gdk.GCValues values, int values_mask); | |
public GC (Gdk.Drawable drawable, Gdk.GCValues values, Gdk.GCValuesMask values_mask) : base (IntPtr.Zero) | |
{ | |
if (GetType () != typeof (GC)) { | |
throw new InvalidOperationException ("Can't override this constructor."); | |
} | |
- IntPtr native_values = GLib.Marshaller.StructureToPtrAlloc (values); | |
- Raw = gdk_gc_new_with_values(drawable == null ? IntPtr.Zero : drawable.Handle, native_values, (int) values_mask); | |
- Marshal.FreeHGlobal (native_values); | |
+ Raw = gdk_gc_new_with_values(drawable == null ? IntPtr.Zero : drawable.Handle, ref values, (int) values_mask); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -98,12 +97,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_values(IntPtr raw, IntPtr values, int values_mask); | |
+ static extern void gdk_gc_set_values(IntPtr raw, ref Gdk.GCValues values, int values_mask); | |
public void SetValues(Gdk.GCValues values, Gdk.GCValuesMask values_mask) { | |
- IntPtr native_values = GLib.Marshaller.StructureToPtrAlloc (values); | |
- gdk_gc_set_values(Handle, native_values, (int) values_mask); | |
- Marshal.FreeHGlobal (native_values); | |
+ gdk_gc_set_values(Handle, ref values, (int) values_mask); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -125,13 +123,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_get_values(IntPtr raw, IntPtr values); | |
+ static extern void gdk_gc_get_values(IntPtr raw, ref Gdk.GCValues values); | |
public void GetValues(ref Gdk.GCValues values) { | |
- IntPtr native_values = GLib.Marshaller.StructureToPtrAlloc (values); | |
- gdk_gc_get_values(Handle, native_values); | |
- values = Gdk.GCValues.New (native_values); | |
- Marshal.FreeHGlobal (native_values); | |
+ gdk_gc_get_values(Handle, ref values); | |
+ | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -197,36 +194,33 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_background(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_background(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color Background { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_background(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_background(Handle, ref value); | |
+ | |
} | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_font(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_font(IntPtr raw, ref Gdk.Font value); | |
[Obsolete] | |
public Gdk.Font Font { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_font(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_font(Handle, ref value); | |
+ | |
} | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_rgb_bg_color(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_rgb_bg_color(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color RgbBgColor { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_rgb_bg_color(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_rgb_bg_color(Handle, ref value); | |
+ | |
} | |
} | |
@@ -255,35 +249,32 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_foreground(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_foreground(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color Foreground { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_foreground(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_foreground(Handle, ref value); | |
+ | |
} | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_clip_rectangle(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_clip_rectangle(IntPtr raw, ref Gdk.Rectangle value); | |
public Gdk.Rectangle ClipRectangle { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_clip_rectangle(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_clip_rectangle(Handle, ref value); | |
+ | |
} | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_gc_set_rgb_fg_color(IntPtr raw, IntPtr value); | |
+ static extern void gdk_gc_set_rgb_fg_color(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color RgbFgColor { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_gc_set_rgb_fg_color(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_gc_set_rgb_fg_color(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gdk/generated/GdkSharp.SpanFuncNative.cs a/gdk/generated/GdkSharp.SpanFuncNative.cs | |
index ce10f23..9fd9f26 100644 | |
--- b/gdk/generated/GdkSharp.SpanFuncNative.cs | |
+++ a/gdk/generated/GdkSharp.SpanFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GdkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void SpanFuncNative(IntPtr span, IntPtr data); | |
+ internal delegate void SpanFuncNative(ref Gdk.Span span, IntPtr data); | |
internal class SpanFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GdkSharp { | |
void InvokeNative (Gdk.Span span) | |
{ | |
- IntPtr native_span = GLib.Marshaller.StructureToPtrAlloc (span); | |
- native_cb (native_span, __data); | |
- Marshal.FreeHGlobal (native_span); | |
+ native_cb (ref span, __data); | |
+ | |
} | |
} | |
internal class SpanFuncWrapper { | |
- public void NativeCallback (IntPtr span, IntPtr data) | |
+ public void NativeCallback (ref Gdk.Span span, IntPtr data) | |
{ | |
try { | |
- managed (Gdk.Span.New (span)); | |
+ managed (span); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gdk/generated/Global.cs a/gdk/generated/Global.cs | |
index ef24569..c7dc4e0 100644 | |
--- b/gdk/generated/Global.cs | |
+++ a/gdk/generated/Global.cs | |
@@ -74,53 +74,49 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_string_width(IntPtr font, IntPtr str1ng); | |
+ static extern int gdk_string_width(ref Gdk.Font font, IntPtr str1ng); | |
[Obsolete] | |
public static int StringWidth(Gdk.Font font, string str1ng) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- int raw_ret = gdk_string_width(native_font, native_str1ng); | |
+ int raw_ret = gdk_string_width(ref font, native_str1ng); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
GLib.Marshaller.Free (native_str1ng); | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_string_height(IntPtr font, IntPtr str1ng); | |
+ static extern int gdk_string_height(ref Gdk.Font font, IntPtr str1ng); | |
[Obsolete] | |
public static int StringHeight(Gdk.Font font, string str1ng) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- int raw_ret = gdk_string_height(native_font, native_str1ng); | |
+ int raw_ret = gdk_string_height(ref font, native_str1ng); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
GLib.Marshaller.Free (native_str1ng); | |
return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_string_extents(IntPtr font, IntPtr str1ng, out int lbearing, out int rbearing, out int width, out int ascent, out int descent); | |
+ static extern void gdk_string_extents(ref Gdk.Font font, IntPtr str1ng, out int lbearing, out int rbearing, out int width, out int ascent, out int descent); | |
[Obsolete] | |
public static void StringExtents(Gdk.Font font, string str1ng, out int lbearing, out int rbearing, out int width, out int ascent, out int descent) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- gdk_string_extents(native_font, native_str1ng, out lbearing, out rbearing, out width, out ascent, out descent); | |
- Marshal.FreeHGlobal (native_font); | |
+ gdk_string_extents(ref font, native_str1ng, out lbearing, out rbearing, out width, out ascent, out descent); | |
+ | |
GLib.Marshaller.Free (native_str1ng); | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_set_pointer_hooks(IntPtr new_hooks); | |
+ static extern IntPtr gdk_set_pointer_hooks(ref Gdk.PointerHooks new_hooks); | |
public static Gdk.PointerHooks SetPointerHooks(Gdk.PointerHooks new_hooks) { | |
- IntPtr native_new_hooks = GLib.Marshaller.StructureToPtrAlloc (new_hooks); | |
- IntPtr raw_ret = gdk_set_pointer_hooks(native_new_hooks); | |
+ IntPtr raw_ret = gdk_set_pointer_hooks(ref new_hooks); | |
Gdk.PointerHooks ret = Gdk.PointerHooks.New (raw_ret); | |
- Marshal.FreeHGlobal (native_new_hooks); | |
+ | |
return ret; | |
} | |
@@ -202,15 +198,14 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_string_measure(IntPtr font, IntPtr str1ng); | |
+ static extern int gdk_string_measure(ref Gdk.Font font, IntPtr str1ng); | |
[Obsolete] | |
public static int StringMeasure(Gdk.Font font, string str1ng) { | |
- IntPtr native_font = GLib.Marshaller.StructureToPtrAlloc (font); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- int raw_ret = gdk_string_measure(native_font, native_str1ng); | |
+ int raw_ret = gdk_string_measure(ref font, native_str1ng); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_font); | |
+ | |
GLib.Marshaller.Free (native_str1ng); | |
return ret; | |
} | |
diff --git b/gdk/generated/Keymap.cs a/gdk/generated/Keymap.cs | |
index 4a86bba..bddab67 100644 | |
--- b/gdk/generated/Keymap.cs | |
+++ a/gdk/generated/Keymap.cs | |
@@ -135,13 +135,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern uint gdk_keymap_lookup_key(IntPtr raw, IntPtr key); | |
+ static extern uint gdk_keymap_lookup_key(IntPtr raw, ref Gdk.KeymapKey key); | |
public uint LookupKey(Gdk.KeymapKey key) { | |
- IntPtr native_key = GLib.Marshaller.StructureToPtrAlloc (key); | |
- uint raw_ret = gdk_keymap_lookup_key(Handle, native_key); | |
+ uint raw_ret = gdk_keymap_lookup_key(Handle, ref key); | |
uint ret = raw_ret; | |
- Marshal.FreeHGlobal (native_key); | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/PangoAttrEmbossColor.cs a/gdk/generated/PangoAttrEmbossColor.cs | |
index bc23453..3577756 100644 | |
--- b/gdk/generated/PangoAttrEmbossColor.cs | |
+++ a/gdk/generated/PangoAttrEmbossColor.cs | |
@@ -33,13 +33,12 @@ namespace Gdk { | |
public PangoAttrEmbossColor(IntPtr raw) : base(raw) {} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pango_attr_emboss_color_new(IntPtr color); | |
+ static extern IntPtr gdk_pango_attr_emboss_color_new(ref Gdk.Color color); | |
public PangoAttrEmbossColor (Gdk.Color color) | |
{ | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- Raw = gdk_pango_attr_emboss_color_new(native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ Raw = gdk_pango_attr_emboss_color_new(ref color); | |
+ | |
} | |
#endregion | |
diff --git b/gdk/generated/PangoRenderer.cs a/gdk/generated/PangoRenderer.cs | |
index 4ce6ae7..432922f 100644 | |
--- b/gdk/generated/PangoRenderer.cs | |
+++ a/gdk/generated/PangoRenderer.cs | |
@@ -89,12 +89,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_pango_renderer_set_override_color(IntPtr raw, int part, IntPtr color); | |
+ static extern void gdk_pango_renderer_set_override_color(IntPtr raw, int part, ref Gdk.Color color); | |
public void SetOverrideColor(Pango.RenderPart part, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gdk_pango_renderer_set_override_color(Handle, (int) part, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gdk_pango_renderer_set_override_color(Handle, (int) part, ref color); | |
+ | |
} | |
#endregion | |
diff --git b/gdk/generated/Pixbuf.cs a/gdk/generated/Pixbuf.cs | |
index a23692f..69738bf 100644 | |
--- b/gdk/generated/Pixbuf.cs | |
+++ a/gdk/generated/Pixbuf.cs | |
@@ -231,14 +231,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern unsafe IntPtr gdk_pixbuf_from_pixdata(IntPtr pixdata, bool copy_pixels, out IntPtr error); | |
+ static extern unsafe IntPtr gdk_pixbuf_from_pixdata(ref Gdk.Pixdata pixdata, bool copy_pixels, out IntPtr error); | |
public static unsafe Gdk.Pixbuf FromPixdata(Gdk.Pixdata pixdata, bool copy_pixels) { | |
- IntPtr native_pixdata = GLib.Marshaller.StructureToPtrAlloc (pixdata); | |
IntPtr error = IntPtr.Zero; | |
- IntPtr raw_ret = gdk_pixbuf_from_pixdata(native_pixdata, copy_pixels, out error); | |
+ IntPtr raw_ret = gdk_pixbuf_from_pixdata(ref pixdata, copy_pixels, out error); | |
Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf; | |
- Marshal.FreeHGlobal (native_pixdata); | |
+ | |
if (error != IntPtr.Zero) throw new GLib.GException (error); | |
return ret; | |
} | |
diff --git b/gdk/generated/PixbufGifAnim.cs a/gdk/generated/PixbufGifAnim.cs | |
index 7a8f398..d5b94d3 100644 | |
--- b/gdk/generated/PixbufGifAnim.cs | |
+++ a/gdk/generated/PixbufGifAnim.cs | |
@@ -21,12 +21,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_pixbuf_gif_anim_frame_composite(IntPtr raw, IntPtr frame); | |
+ static extern void gdk_pixbuf_gif_anim_frame_composite(IntPtr raw, ref Gdk.PixbufFrame frame); | |
public void FrameComposite(Gdk.PixbufFrame frame) { | |
- IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc (frame); | |
- gdk_pixbuf_gif_anim_frame_composite(Handle, native_frame); | |
- Marshal.FreeHGlobal (native_frame); | |
+ gdk_pixbuf_gif_anim_frame_composite(Handle, ref frame); | |
+ | |
} | |
[DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/Pixmap.cs a/gdk/generated/Pixmap.cs | |
index c878f23..4e2a02e 100644 | |
--- b/gdk/generated/Pixmap.cs | |
+++ a/gdk/generated/Pixmap.cs | |
@@ -46,20 +46,19 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pixmap_create_from_xpm_d(IntPtr drawable, out IntPtr mask, IntPtr transparent_color, IntPtr[] data); | |
+ static extern IntPtr gdk_pixmap_create_from_xpm_d(IntPtr drawable, out IntPtr mask, ref Gdk.Color transparent_color, IntPtr[] data); | |
public static Gdk.Pixmap CreateFromXpmD(Gdk.Drawable drawable, out Gdk.Pixmap mask, Gdk.Color transparent_color, string[] data) { | |
IntPtr native_mask; | |
- 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++) { | |
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); | |
+ IntPtr raw_ret = gdk_pixmap_create_from_xpm_d(drawable == null ? IntPtr.Zero : drawable.Handle, out native_mask, ref 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]); | |
} | |
@@ -85,16 +84,15 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pixmap_colormap_create_from_xpm(IntPtr drawable, IntPtr colormap, out IntPtr mask, IntPtr transparent_color, IntPtr filename); | |
+ static extern IntPtr gdk_pixmap_colormap_create_from_xpm(IntPtr drawable, IntPtr colormap, out IntPtr mask, ref Gdk.Color transparent_color, IntPtr filename); | |
public static Gdk.Pixmap ColormapCreateFromXpm(Gdk.Drawable drawable, Gdk.Colormap colormap, out Gdk.Pixmap mask, Gdk.Color transparent_color, string filename) { | |
IntPtr native_mask; | |
- IntPtr native_transparent_color = GLib.Marshaller.StructureToPtrAlloc (transparent_color); | |
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename); | |
- IntPtr raw_ret = gdk_pixmap_colormap_create_from_xpm(drawable == null ? IntPtr.Zero : drawable.Handle, colormap == null ? IntPtr.Zero : colormap.Handle, out native_mask, native_transparent_color, native_filename); | |
+ IntPtr raw_ret = gdk_pixmap_colormap_create_from_xpm(drawable == null ? IntPtr.Zero : drawable.Handle, colormap == null ? IntPtr.Zero : colormap.Handle, out native_mask, ref transparent_color, native_filename); | |
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); | |
+ | |
GLib.Marshaller.Free (native_filename); | |
return ret; | |
} | |
@@ -111,16 +109,15 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pixmap_create_from_xpm(IntPtr drawable, out IntPtr mask, IntPtr transparent_color, IntPtr filename); | |
+ static extern IntPtr gdk_pixmap_create_from_xpm(IntPtr drawable, out IntPtr mask, ref Gdk.Color transparent_color, IntPtr filename); | |
public static Gdk.Pixmap CreateFromXpm(Gdk.Drawable drawable, out Gdk.Pixmap mask, Gdk.Color transparent_color, string filename) { | |
IntPtr native_mask; | |
- IntPtr native_transparent_color = GLib.Marshaller.StructureToPtrAlloc (transparent_color); | |
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename); | |
- IntPtr raw_ret = gdk_pixmap_create_from_xpm(drawable == null ? IntPtr.Zero : drawable.Handle, out native_mask, native_transparent_color, native_filename); | |
+ IntPtr raw_ret = gdk_pixmap_create_from_xpm(drawable == null ? IntPtr.Zero : drawable.Handle, out native_mask, ref transparent_color, native_filename); | |
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); | |
+ | |
GLib.Marshaller.Free (native_filename); | |
return ret; | |
} | |
@@ -135,20 +132,19 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pixmap_colormap_create_from_xpm_d(IntPtr drawable, IntPtr colormap, out IntPtr mask, IntPtr transparent_color, IntPtr[] data); | |
+ static extern IntPtr gdk_pixmap_colormap_create_from_xpm_d(IntPtr drawable, IntPtr colormap, out IntPtr mask, ref Gdk.Color transparent_color, IntPtr[] data); | |
public static Gdk.Pixmap ColormapCreateFromXpmD(Gdk.Drawable drawable, Gdk.Colormap colormap, out Gdk.Pixmap mask, Gdk.Color transparent_color, string[] data) { | |
IntPtr native_mask; | |
- 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++) { | |
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); | |
+ 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, ref 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]); | |
} | |
@@ -156,17 +152,15 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_pixmap_create_from_data(IntPtr drawable, IntPtr data, int width, int height, int depth, IntPtr fg, IntPtr bg); | |
+ static extern IntPtr gdk_pixmap_create_from_data(IntPtr drawable, IntPtr data, int width, int height, int depth, ref Gdk.Color fg, ref Gdk.Color bg); | |
public static Gdk.Pixmap CreateFromData(Gdk.Drawable drawable, string data, int width, int height, int depth, Gdk.Color fg, Gdk.Color bg) { | |
IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data); | |
- IntPtr native_fg = GLib.Marshaller.StructureToPtrAlloc (fg); | |
- IntPtr native_bg = GLib.Marshaller.StructureToPtrAlloc (bg); | |
- IntPtr raw_ret = gdk_pixmap_create_from_data(drawable == null ? IntPtr.Zero : drawable.Handle, native_data, width, height, depth, native_fg, native_bg); | |
+ IntPtr raw_ret = gdk_pixmap_create_from_data(drawable == null ? IntPtr.Zero : drawable.Handle, native_data, width, height, depth, ref fg, ref bg); | |
Gdk.Pixmap ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixmap; | |
GLib.Marshaller.Free (native_data); | |
- Marshal.FreeHGlobal (native_fg); | |
- Marshal.FreeHGlobal (native_bg); | |
+ | |
+ | |
return ret; | |
} | |
diff --git b/gdk/generated/Rectangle.cs a/gdk/generated/Rectangle.cs | |
index 3263815..897a568 100644 | |
--- b/gdk/generated/Rectangle.cs | |
+++ a/gdk/generated/Rectangle.cs | |
@@ -26,14 +26,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_rectangle_union(ref Gdk.Rectangle raw, IntPtr src2, IntPtr dest); | |
+ static extern void gdk_rectangle_union(ref Gdk.Rectangle raw, ref Gdk.Rectangle src2, IntPtr dest); | |
public Gdk.Rectangle Union(Gdk.Rectangle src2) { | |
Gdk.Rectangle dest; | |
- IntPtr native_src2 = GLib.Marshaller.StructureToPtrAlloc (src2); | |
IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gdk.Rectangle))); | |
- gdk_rectangle_union(ref this, native_src2, native_dest); | |
- Marshal.FreeHGlobal (native_src2); | |
+ gdk_rectangle_union(ref this, ref src2, native_dest); | |
+ | |
dest = Gdk.Rectangle.New (native_dest); | |
Marshal.FreeHGlobal (native_dest); | |
return dest; | |
@@ -51,14 +50,13 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gdk_rectangle_intersect(ref Gdk.Rectangle raw, IntPtr src2, IntPtr dest); | |
+ static extern bool gdk_rectangle_intersect(ref Gdk.Rectangle raw, ref Gdk.Rectangle src2, IntPtr dest); | |
public bool Intersect(Gdk.Rectangle src2, out Gdk.Rectangle dest) { | |
- IntPtr native_src2 = GLib.Marshaller.StructureToPtrAlloc (src2); | |
IntPtr native_dest = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gdk.Rectangle))); | |
- bool raw_ret = gdk_rectangle_intersect(ref this, native_src2, native_dest); | |
+ bool raw_ret = gdk_rectangle_intersect(ref this, ref src2, native_dest); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_src2); | |
+ | |
dest = Gdk.Rectangle.New (native_dest); | |
Marshal.FreeHGlobal (native_dest); | |
return ret; | |
diff --git b/gdk/generated/Region.cs a/gdk/generated/Region.cs | |
index f455bc3..d09ddfb 100644 | |
--- b/gdk/generated/Region.cs | |
+++ a/gdk/generated/Region.cs | |
@@ -19,13 +19,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_region_spans_intersect_foreach(IntPtr raw, IntPtr spans, int n_spans, bool sorted, GdkSharp.SpanFuncNative function, IntPtr data); | |
+ static extern void gdk_region_spans_intersect_foreach(IntPtr raw, ref Gdk.Span spans, int n_spans, bool sorted, GdkSharp.SpanFuncNative function, IntPtr data); | |
public void SpansIntersectForeach(Gdk.Span spans, int n_spans, bool sorted, Gdk.SpanFunc function) { | |
- IntPtr native_spans = GLib.Marshaller.StructureToPtrAlloc (spans); | |
GdkSharp.SpanFuncWrapper function_wrapper = new GdkSharp.SpanFuncWrapper (function); | |
- gdk_region_spans_intersect_foreach(Handle, native_spans, n_spans, sorted, function_wrapper.NativeDelegate, IntPtr.Zero); | |
- Marshal.FreeHGlobal (native_spans); | |
+ gdk_region_spans_intersect_foreach(Handle, ref spans, n_spans, sorted, function_wrapper.NativeDelegate, IntPtr.Zero); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -43,13 +42,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_region_rectangle(IntPtr rectangle); | |
+ static extern IntPtr gdk_region_rectangle(ref Gdk.Rectangle rectangle); | |
public static Gdk.Region Rectangle(Gdk.Rectangle rectangle) { | |
- IntPtr native_rectangle = GLib.Marshaller.StructureToPtrAlloc (rectangle); | |
- IntPtr raw_ret = gdk_region_rectangle(native_rectangle); | |
+ IntPtr raw_ret = gdk_region_rectangle(ref rectangle); | |
Gdk.Region ret = raw_ret == IntPtr.Zero ? null : (Gdk.Region) GLib.Opaque.GetOpaque (raw_ret, typeof (Gdk.Region), false); | |
- Marshal.FreeHGlobal (native_rectangle); | |
+ | |
return ret; | |
} | |
@@ -86,13 +84,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gdk_region_rect_in(IntPtr raw, IntPtr rectangle); | |
+ static extern int gdk_region_rect_in(IntPtr raw, ref Gdk.Rectangle rectangle); | |
public Gdk.OverlapType RectIn(Gdk.Rectangle rectangle) { | |
- IntPtr native_rectangle = GLib.Marshaller.StructureToPtrAlloc (rectangle); | |
- int raw_ret = gdk_region_rect_in(Handle, native_rectangle); | |
+ int raw_ret = gdk_region_rect_in(Handle, ref rectangle); | |
Gdk.OverlapType ret = (Gdk.OverlapType) raw_ret; | |
- Marshal.FreeHGlobal (native_rectangle); | |
+ | |
return ret; | |
} | |
@@ -129,12 +126,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_region_union_with_rect(IntPtr raw, IntPtr rect); | |
+ static extern void gdk_region_union_with_rect(IntPtr raw, ref Gdk.Rectangle rect); | |
public void UnionWithRect(Gdk.Rectangle rect) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- gdk_region_union_with_rect(Handle, native_rect); | |
- Marshal.FreeHGlobal (native_rect); | |
+ gdk_region_union_with_rect(Handle, ref rect); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/Rgb.cs a/gdk/generated/Rgb.cs | |
index d02bbe8..f1bcecb 100644 | |
--- b/gdk/generated/Rgb.cs | |
+++ a/gdk/generated/Rgb.cs | |
@@ -100,13 +100,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_rgb_find_color(IntPtr colormap, IntPtr color); | |
+ static extern void gdk_rgb_find_color(IntPtr colormap, ref Gdk.Color color); | |
public static void FindColor(Gdk.Colormap colormap, ref Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gdk_rgb_find_color(colormap == null ? IntPtr.Zero : colormap.Handle, native_color); | |
- color = Gdk.Color.New (native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gdk_rgb_find_color(colormap == null ? IntPtr.Zero : colormap.Handle, ref color); | |
+ | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/Window.cs a/gdk/generated/Window.cs | |
index 3bb70a8..19e67b1 100644 | |
--- b/gdk/generated/Window.cs | |
+++ a/gdk/generated/Window.cs | |
@@ -16,16 +16,15 @@ namespace Gdk { | |
public Window(IntPtr raw) : base(raw) {} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gdk_window_new(IntPtr parent, IntPtr attributes, int attributes_mask); | |
+ static extern IntPtr gdk_window_new(IntPtr parent, ref Gdk.WindowAttr attributes, int attributes_mask); | |
public Window (Gdk.Window parent, Gdk.WindowAttr attributes, int attributes_mask) : base (IntPtr.Zero) | |
{ | |
if (GetType () != typeof (Window)) { | |
throw new InvalidOperationException ("Can't override this constructor."); | |
} | |
- IntPtr native_attributes = GLib.Marshaller.StructureToPtrAlloc (attributes); | |
- Raw = gdk_window_new(parent == null ? IntPtr.Zero : parent.Handle, native_attributes, attributes_mask); | |
- Marshal.FreeHGlobal (native_attributes); | |
+ Raw = gdk_window_new(parent == null ? IntPtr.Zero : parent.Handle, ref attributes, attributes_mask); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -92,12 +91,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_window_constrain_size(IntPtr geometry, uint flags, int width, int height, out int new_width, out int new_height); | |
+ static extern void gdk_window_constrain_size(ref Gdk.Geometry geometry, uint flags, int width, int height, out int new_width, out int new_height); | |
public static void ConstrainSize(Gdk.Geometry geometry, uint flags, int width, int height, out int new_width, out int new_height) { | |
- IntPtr native_geometry = GLib.Marshaller.StructureToPtrAlloc (geometry); | |
- gdk_window_constrain_size(native_geometry, flags, width, height, out new_width, out new_height); | |
- Marshal.FreeHGlobal (native_geometry); | |
+ gdk_window_constrain_size(ref geometry, flags, width, height, out new_width, out new_height); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -370,12 +368,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_window_set_geometry_hints(IntPtr raw, IntPtr geometry, int geom_mask); | |
+ static extern void gdk_window_set_geometry_hints(IntPtr raw, ref Gdk.Geometry geometry, int geom_mask); | |
public void SetGeometryHints(Gdk.Geometry geometry, Gdk.WindowHints geom_mask) { | |
- IntPtr native_geometry = GLib.Marshaller.StructureToPtrAlloc (geometry); | |
- gdk_window_set_geometry_hints(Handle, native_geometry, (int) geom_mask); | |
- Marshal.FreeHGlobal (native_geometry); | |
+ gdk_window_set_geometry_hints(Handle, ref geometry, (int) geom_mask); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -646,13 +643,12 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_window_set_background(IntPtr raw, IntPtr value); | |
+ static extern void gdk_window_set_background(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color Background { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gdk_window_set_background(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gdk_window_set_background(Handle, ref value); | |
+ | |
} | |
} | |
@@ -678,12 +674,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_window_invalidate_rect(IntPtr raw, IntPtr rect, bool invalidate_children); | |
+ static extern void gdk_window_invalidate_rect(IntPtr raw, ref Gdk.Rectangle rect, bool invalidate_children); | |
public void InvalidateRect(Gdk.Rectangle rect, bool invalidate_children) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- gdk_window_invalidate_rect(Handle, native_rect, invalidate_children); | |
- Marshal.FreeHGlobal (native_rect); | |
+ gdk_window_invalidate_rect(Handle, ref rect, invalidate_children); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -806,12 +801,11 @@ namespace Gdk { | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gdk_window_begin_paint_rect(IntPtr raw, IntPtr rectangle); | |
+ static extern void gdk_window_begin_paint_rect(IntPtr raw, ref Gdk.Rectangle rectangle); | |
public void BeginPaintRect(Gdk.Rectangle rectangle) { | |
- IntPtr native_rectangle = GLib.Marshaller.StructureToPtrAlloc (rectangle); | |
- gdk_window_begin_paint_rect(Handle, native_rectangle); | |
- Marshal.FreeHGlobal (native_rectangle); | |
+ gdk_window_begin_paint_rect(Handle, ref rectangle); | |
+ | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/glade/generated/GladeSharp.BuildChildrenFuncNative.cs a/glade/generated/GladeSharp.BuildChildrenFuncNative.cs | |
index 8a5f047..06acce0 100644 | |
--- b/glade/generated/GladeSharp.BuildChildrenFuncNative.cs | |
+++ a/glade/generated/GladeSharp.BuildChildrenFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GladeSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void BuildChildrenFuncNative(IntPtr xml, IntPtr parent, IntPtr info); | |
+ internal delegate void BuildChildrenFuncNative(IntPtr xml, IntPtr parent, ref Glade.WidgetInfo info); | |
internal class BuildChildrenFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GladeSharp { | |
void InvokeNative (Glade.XML xml, Gtk.Widget parent, Glade.WidgetInfo info) | |
{ | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- native_cb (xml == null ? IntPtr.Zero : xml.Handle, parent == null ? IntPtr.Zero : parent.Handle, native_info); | |
- Marshal.FreeHGlobal (native_info); | |
+ native_cb (xml == null ? IntPtr.Zero : xml.Handle, parent == null ? IntPtr.Zero : parent.Handle, ref info); | |
+ | |
} | |
} | |
internal class BuildChildrenFuncWrapper { | |
- public void NativeCallback (IntPtr xml, IntPtr parent, IntPtr info) | |
+ public void NativeCallback (IntPtr xml, IntPtr parent, ref Glade.WidgetInfo info) | |
{ | |
try { | |
- managed (GLib.Object.GetObject(xml) as Glade.XML, GLib.Object.GetObject(parent) as Gtk.Widget, Glade.WidgetInfo.New (info)); | |
+ managed (GLib.Object.GetObject(xml) as Glade.XML, GLib.Object.GetObject(parent) as Gtk.Widget, info); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/glade/generated/GladeSharp.NewFuncNative.cs a/glade/generated/GladeSharp.NewFuncNative.cs | |
index f4435ee..86c9246 100644 | |
--- b/glade/generated/GladeSharp.NewFuncNative.cs | |
+++ a/glade/generated/GladeSharp.NewFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GladeSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate IntPtr NewFuncNative(IntPtr xml, IntPtr widget_type, IntPtr info); | |
+ internal delegate IntPtr NewFuncNative(IntPtr xml, IntPtr widget_type, ref Glade.WidgetInfo info); | |
internal class NewFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GladeSharp { | |
Gtk.Widget InvokeNative (Glade.XML xml, GLib.GType widget_type, Glade.WidgetInfo info) | |
{ | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- Gtk.Widget result = GLib.Object.GetObject(native_cb (xml == null ? IntPtr.Zero : xml.Handle, widget_type.Val, native_info)) as Gtk.Widget; | |
- Marshal.FreeHGlobal (native_info); | |
+ Gtk.Widget result = GLib.Object.GetObject(native_cb (xml == null ? IntPtr.Zero : xml.Handle, widget_type.Val, ref info)) as Gtk.Widget; | |
+ | |
return result; | |
} | |
} | |
internal class NewFuncWrapper { | |
- public IntPtr NativeCallback (IntPtr xml, IntPtr widget_type, IntPtr info) | |
+ public IntPtr NativeCallback (IntPtr xml, IntPtr widget_type, ref Glade.WidgetInfo info) | |
{ | |
try { | |
- Gtk.Widget __ret = managed (GLib.Object.GetObject(xml) as Glade.XML, new GLib.GType(widget_type), Glade.WidgetInfo.New (info)); | |
+ Gtk.Widget __ret = managed (GLib.Object.GetObject(xml) as Glade.XML, new GLib.GType(widget_type), info); | |
if (release_on_call) | |
gch.Free (); | |
return __ret == null ? IntPtr.Zero : __ret.Handle; | |
diff --git b/glade/generated/Standard.cs a/glade/generated/Standard.cs | |
index ac8ec9e..fe9ad06 100644 | |
--- b/glade/generated/Standard.cs | |
+++ a/glade/generated/Standard.cs | |
@@ -10,23 +10,21 @@ namespace Glade { | |
public class Standard { | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr glade_standard_build_widget(IntPtr xml, IntPtr widget_type, IntPtr info); | |
+ static extern IntPtr glade_standard_build_widget(IntPtr xml, IntPtr widget_type, ref Glade.WidgetInfo info); | |
public static Gtk.Widget BuildWidget(Glade.XML xml, GLib.GType widget_type, Glade.WidgetInfo info) { | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- IntPtr raw_ret = glade_standard_build_widget(xml == null ? IntPtr.Zero : xml.Handle, widget_type.Val, native_info); | |
+ IntPtr raw_ret = glade_standard_build_widget(xml == null ? IntPtr.Zero : xml.Handle, widget_type.Val, ref info); | |
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget; | |
- Marshal.FreeHGlobal (native_info); | |
+ | |
return ret; | |
} | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void glade_standard_build_children(IntPtr self, IntPtr parent, IntPtr info); | |
+ static extern void glade_standard_build_children(IntPtr self, IntPtr parent, ref Glade.WidgetInfo info); | |
public static void BuildChildren(Glade.XML self, Gtk.Widget parent, Glade.WidgetInfo info) { | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- glade_standard_build_children(self == null ? IntPtr.Zero : self.Handle, parent == null ? IntPtr.Zero : parent.Handle, native_info); | |
- Marshal.FreeHGlobal (native_info); | |
+ glade_standard_build_children(self == null ? IntPtr.Zero : self.Handle, parent == null ? IntPtr.Zero : parent.Handle, ref info); | |
+ | |
} | |
#endregion | |
diff --git b/glade/generated/XML.cs a/glade/generated/XML.cs | |
index dc862e6..479322b 100644 | |
--- b/glade/generated/XML.cs | |
+++ a/glade/generated/XML.cs | |
@@ -96,22 +96,20 @@ namespace Glade { | |
} | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void glade_xml_handle_internal_child(IntPtr raw, IntPtr parent, IntPtr child_info); | |
+ static extern void glade_xml_handle_internal_child(IntPtr raw, IntPtr parent, ref Glade.ChildInfo child_info); | |
public void HandleInternalChild(Gtk.Widget parent, Glade.ChildInfo child_info) { | |
- IntPtr native_child_info = GLib.Marshaller.StructureToPtrAlloc (child_info); | |
- glade_xml_handle_internal_child(Handle, parent == null ? IntPtr.Zero : parent.Handle, native_child_info); | |
- Marshal.FreeHGlobal (native_child_info); | |
+ glade_xml_handle_internal_child(Handle, parent == null ? IntPtr.Zero : parent.Handle, ref child_info); | |
+ | |
} | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr glade_xml_build_widget(IntPtr raw, IntPtr info); | |
+ static extern IntPtr glade_xml_build_widget(IntPtr raw, ref Glade.WidgetInfo info); | |
public Gtk.Widget BuildWidget(Glade.WidgetInfo info) { | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- IntPtr raw_ret = glade_xml_build_widget(Handle, native_info); | |
+ IntPtr raw_ret = glade_xml_build_widget(Handle, ref info); | |
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget; | |
- Marshal.FreeHGlobal (native_info); | |
+ | |
return ret; | |
} | |
@@ -174,12 +172,11 @@ namespace Glade { | |
} | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void glade_xml_set_common_params(IntPtr raw, IntPtr widget, IntPtr info); | |
+ static extern void glade_xml_set_common_params(IntPtr raw, IntPtr widget, ref Glade.WidgetInfo info); | |
public void SetCommonParams(Gtk.Widget widget, Glade.WidgetInfo info) { | |
- IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info); | |
- glade_xml_set_common_params(Handle, widget == null ? IntPtr.Zero : widget.Handle, native_info); | |
- Marshal.FreeHGlobal (native_info); | |
+ glade_xml_set_common_params(Handle, widget == null ? IntPtr.Zero : widget.Handle, ref info); | |
+ | |
} | |
[DllImport("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/AccelMap.cs a/gtk/generated/AccelMap.cs | |
index 05c9376..ec5dfa3 100644 | |
--- b/gtk/generated/AccelMap.cs | |
+++ a/gtk/generated/AccelMap.cs | |
@@ -180,15 +180,14 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_accel_map_lookup_entry(IntPtr accel_path, IntPtr key); | |
+ static extern bool gtk_accel_map_lookup_entry(IntPtr accel_path, ref Gtk.AccelKey key); | |
public static bool LookupEntry(string accel_path, Gtk.AccelKey key) { | |
IntPtr native_accel_path = GLib.Marshaller.StringToPtrGStrdup (accel_path); | |
- IntPtr native_key = GLib.Marshaller.StructureToPtrAlloc (key); | |
- bool raw_ret = gtk_accel_map_lookup_entry(native_accel_path, native_key); | |
+ bool raw_ret = gtk_accel_map_lookup_entry(native_accel_path, ref key); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_accel_path); | |
- Marshal.FreeHGlobal (native_key); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/CellRenderer.cs a/gtk/generated/CellRenderer.cs | |
index 3082e61..a9ead11 100644 | |
--- b/gtk/generated/CellRenderer.cs | |
+++ a/gtk/generated/CellRenderer.cs | |
@@ -326,31 +326,26 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_cell_renderer_activate(IntPtr raw, IntPtr evnt, IntPtr widget, IntPtr path, IntPtr background_area, IntPtr cell_area, int flags); | |
+ static extern bool gtk_cell_renderer_activate(IntPtr raw, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle background_area, ref Gdk.Rectangle cell_area, int flags); | |
public bool Activate(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) { | |
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path); | |
- IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area); | |
- IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area); | |
- bool raw_ret = gtk_cell_renderer_activate(Handle, evnt == null ? IntPtr.Zero : evnt.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_path, native_background_area, native_cell_area, (int) flags); | |
+ bool raw_ret = gtk_cell_renderer_activate(Handle, evnt == null ? IntPtr.Zero : evnt.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_path, ref background_area, ref cell_area, (int) flags); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_path); | |
- Marshal.FreeHGlobal (native_background_area); | |
- Marshal.FreeHGlobal (native_cell_area); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_cell_renderer_render(IntPtr raw, IntPtr window, IntPtr widget, IntPtr background_area, IntPtr cell_area, IntPtr expose_area, int flags); | |
+ static extern void gtk_cell_renderer_render(IntPtr raw, IntPtr window, IntPtr widget, ref Gdk.Rectangle background_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); | |
public void Render(Gdk.Window window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) { | |
- IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area); | |
- IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area); | |
- IntPtr native_expose_area = GLib.Marshaller.StructureToPtrAlloc (expose_area); | |
- gtk_cell_renderer_render(Handle, window == null ? IntPtr.Zero : window.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_background_area, native_cell_area, native_expose_area, (int) flags); | |
- Marshal.FreeHGlobal (native_background_area); | |
- Marshal.FreeHGlobal (native_cell_area); | |
- Marshal.FreeHGlobal (native_expose_area); | |
+ gtk_cell_renderer_render(Handle, window == null ? IntPtr.Zero : window.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags); | |
+ | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/CellView.cs a/gtk/generated/CellView.cs | |
index f61fd86..a55ffee 100644 | |
--- b/gtk/generated/CellView.cs | |
+++ a/gtk/generated/CellView.cs | |
@@ -113,13 +113,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_cell_view_get_size_of_row(IntPtr raw, IntPtr path, IntPtr requisition); | |
+ static extern bool gtk_cell_view_get_size_of_row(IntPtr raw, IntPtr path, ref Gtk.Requisition requisition); | |
public bool GetSizeOfRow(Gtk.TreePath path, Gtk.Requisition requisition) { | |
- IntPtr native_requisition = GLib.Marshaller.StructureToPtrAlloc (requisition); | |
- bool raw_ret = gtk_cell_view_get_size_of_row(Handle, path == null ? IntPtr.Zero : path.Handle, native_requisition); | |
+ bool raw_ret = gtk_cell_view_get_size_of_row(Handle, path == null ? IntPtr.Zero : path.Handle, ref requisition); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_requisition); | |
+ | |
return ret; | |
} | |
@@ -135,13 +134,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_cell_view_set_background_color(IntPtr raw, IntPtr value); | |
+ static extern void gtk_cell_view_set_background_color(IntPtr raw, ref Gdk.Color value); | |
public Gdk.Color BackgroundColor { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_cell_view_set_background_color(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_cell_view_set_background_color(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gtk/generated/Clipboard.cs a/gtk/generated/Clipboard.cs | |
index 0f898fa..ed46c9a 100644 | |
--- b/gtk/generated/Clipboard.cs | |
+++ a/gtk/generated/Clipboard.cs | |
@@ -192,12 +192,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_clipboard_set_can_store(IntPtr raw, IntPtr targets, int n_targets); | |
+ static extern void gtk_clipboard_set_can_store(IntPtr raw, ref Gtk.TargetEntry targets, int n_targets); | |
public void SetCanStore(Gtk.TargetEntry targets, int n_targets) { | |
- IntPtr native_targets = GLib.Marshaller.StructureToPtrAlloc (targets); | |
- gtk_clipboard_set_can_store(Handle, native_targets, n_targets); | |
- Marshal.FreeHGlobal (native_targets); | |
+ gtk_clipboard_set_can_store(Handle, ref targets, n_targets); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/ColorButton.cs a/gtk/generated/ColorButton.cs | |
index 05f6c70..9424b34 100644 | |
--- b/gtk/generated/ColorButton.cs | |
+++ a/gtk/generated/ColorButton.cs | |
@@ -28,7 +28,7 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_color_button_new_with_color(IntPtr color); | |
+ static extern IntPtr gtk_color_button_new_with_color(ref Gdk.Color color); | |
public ColorButton (Gdk.Color color) : base (IntPtr.Zero) | |
{ | |
@@ -40,16 +40,15 @@ namespace Gtk { | |
CreateNativeObject (names, vals, 1); | |
return; | |
} | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- Raw = gtk_color_button_new_with_color(native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ Raw = gtk_color_button_new_with_color(ref color); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtk_color_button_get_color(IntPtr raw, IntPtr color); | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_color_button_set_color(IntPtr raw, IntPtr value); | |
+ static extern void gtk_color_button_set_color(IntPtr raw, ref Gdk.Color value); | |
[GLib.Property ("color")] | |
public Gdk.Color Color { | |
@@ -62,9 +61,8 @@ namespace Gtk { | |
return color; | |
} | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_color_button_set_color(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_color_button_set_color(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gtk/generated/ColorSelection.cs a/gtk/generated/ColorSelection.cs | |
index d1b93a4..e3e0c2e 100644 | |
--- b/gtk/generated/ColorSelection.cs | |
+++ a/gtk/generated/ColorSelection.cs | |
@@ -31,7 +31,7 @@ namespace Gtk { | |
static extern void gtk_color_selection_get_current_color(IntPtr raw, IntPtr color); | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_color_selection_set_current_color(IntPtr raw, IntPtr value); | |
+ static extern void gtk_color_selection_set_current_color(IntPtr raw, ref Gdk.Color value); | |
[GLib.Property ("current-color")] | |
public Gdk.Color CurrentColor { | |
@@ -44,9 +44,8 @@ namespace Gtk { | |
return color; | |
} | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_color_selection_set_current_color(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_color_selection_set_current_color(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gtk/generated/ComboBox.cs a/gtk/generated/ComboBox.cs | |
index ec7caa1..3223e66 100644 | |
--- b/gtk/generated/ComboBox.cs | |
+++ a/gtk/generated/ComboBox.cs | |
@@ -273,12 +273,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_combo_box_set_active_iter(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_combo_box_set_active_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public void SetActiveIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_combo_box_set_active_iter(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_combo_box_set_active_iter(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/Draw.cs a/gtk/generated/Draw.cs | |
index 70b413a..7d1442b 100644 | |
--- b/gtk/generated/Draw.cs | |
+++ a/gtk/generated/Draw.cs | |
@@ -114,24 +114,21 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_draw_polygon(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr points, int npoints, bool fill); | |
+ static extern void gtk_draw_polygon(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Point points, int npoints, bool fill); | |
[Obsolete] | |
public static void Polygon(Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Point points, int npoints, bool fill) { | |
- IntPtr native_points = GLib.Marshaller.StructureToPtrAlloc (points); | |
- gtk_draw_polygon(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_points, npoints, fill); | |
- Marshal.FreeHGlobal (native_points); | |
+ gtk_draw_polygon(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref points, npoints, fill); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_draw_insertion_cursor(IntPtr widget, IntPtr drawable, IntPtr area, IntPtr location, bool is_primary, int direction, bool draw_arrow); | |
+ static extern void gtk_draw_insertion_cursor(IntPtr widget, IntPtr drawable, ref Gdk.Rectangle area, ref Gdk.Rectangle location, bool is_primary, int direction, bool draw_arrow); | |
public static void InsertionCursor(Gtk.Widget widget, Gdk.Drawable drawable, Gdk.Rectangle area, Gdk.Rectangle location, bool is_primary, Gtk.TextDirection direction, bool draw_arrow) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
- IntPtr native_location = GLib.Marshaller.StructureToPtrAlloc (location); | |
- gtk_draw_insertion_cursor(widget == null ? IntPtr.Zero : widget.Handle, drawable == null ? IntPtr.Zero : drawable.Handle, native_area, native_location, is_primary, (int) direction, draw_arrow); | |
- Marshal.FreeHGlobal (native_area); | |
- Marshal.FreeHGlobal (native_location); | |
+ gtk_draw_insertion_cursor(widget == null ? IntPtr.Zero : widget.Handle, drawable == null ? IntPtr.Zero : drawable.Handle, ref area, ref location, is_primary, (int) direction, draw_arrow); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/EntryCompletion.cs a/gtk/generated/EntryCompletion.cs | |
index 20f4655..532d32c 100644 | |
--- b/gtk/generated/EntryCompletion.cs | |
+++ a/gtk/generated/EntryCompletion.cs | |
@@ -172,18 +172,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool CursorOnMatchVMDelegate (IntPtr completion, IntPtr model, IntPtr iter); | |
+ delegate bool CursorOnMatchVMDelegate (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_entrycompletion_override_cursor_on_match (IntPtr gtype, CursorOnMatchVMDelegate cb); | |
static CursorOnMatchVMDelegate CursorOnMatchVMCallback; | |
- static bool cursoronmatch_cb (IntPtr completion, IntPtr model, IntPtr iter) | |
+ static bool cursoronmatch_cb (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
EntryCompletion completion_managed = GLib.Object.GetObject (completion, false) as EntryCompletion; | |
- return completion_managed.OnCursorOnMatch (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (iter)); | |
+ return completion_managed.OnCursorOnMatch (Gtk.TreeModelAdapter.GetObject (model, false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
// NOTREACHED: above call doesn't return | |
@@ -199,14 +199,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtksharp_entrycompletion_base_cursor_on_match (IntPtr completion, IntPtr model, IntPtr iter); | |
+ static extern bool gtksharp_entrycompletion_base_cursor_on_match (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.EntryCompletion), ConnectionMethod="OverrideCursorOnMatch")] | |
protected virtual bool OnCursorOnMatch (Gtk.TreeModel model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool __ret = gtksharp_entrycompletion_base_cursor_on_match (Handle, model == null ? IntPtr.Zero : model.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool __ret = gtksharp_entrycompletion_base_cursor_on_match (Handle, model == null ? IntPtr.Zero : model.Handle, ref iter); | |
+ | |
return __ret; | |
} | |
@@ -223,18 +222,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool MatchSelectedVMDelegate (IntPtr completion, IntPtr model, IntPtr iter); | |
+ delegate bool MatchSelectedVMDelegate (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_entrycompletion_override_match_selected (IntPtr gtype, MatchSelectedVMDelegate cb); | |
static MatchSelectedVMDelegate MatchSelectedVMCallback; | |
- static bool matchselected_cb (IntPtr completion, IntPtr model, IntPtr iter) | |
+ static bool matchselected_cb (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
EntryCompletion completion_managed = GLib.Object.GetObject (completion, false) as EntryCompletion; | |
- return completion_managed.OnMatchSelected (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (iter)); | |
+ return completion_managed.OnMatchSelected (Gtk.TreeModelAdapter.GetObject (model, false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
// NOTREACHED: above call doesn't return | |
@@ -250,14 +249,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtksharp_entrycompletion_base_match_selected (IntPtr completion, IntPtr model, IntPtr iter); | |
+ static extern bool gtksharp_entrycompletion_base_match_selected (IntPtr completion, IntPtr model, ref Gtk.TreeIter iter); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.EntryCompletion), ConnectionMethod="OverrideMatchSelected")] | |
protected virtual bool OnMatchSelected (Gtk.TreeModel model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool __ret = gtksharp_entrycompletion_base_match_selected (Handle, model == null ? IntPtr.Zero : model.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool __ret = gtksharp_entrycompletion_base_match_selected (Handle, model == null ? IntPtr.Zero : model.Handle, ref iter); | |
+ | |
return __ret; | |
} | |
diff --git b/gtk/generated/FileFilter.cs a/gtk/generated/FileFilter.cs | |
index 7d373d4..78b0c53 100644 | |
--- b/gtk/generated/FileFilter.cs | |
+++ a/gtk/generated/FileFilter.cs | |
@@ -28,13 +28,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_file_filter_filter(IntPtr raw, IntPtr filter_info); | |
+ static extern bool gtk_file_filter_filter(IntPtr raw, ref Gtk.FileFilterInfo filter_info); | |
public bool Filter(Gtk.FileFilterInfo filter_info) { | |
- IntPtr native_filter_info = GLib.Marshaller.StructureToPtrAlloc (filter_info); | |
- bool raw_ret = gtk_file_filter_filter(Handle, native_filter_info); | |
+ bool raw_ret = gtk_file_filter_filter(Handle, ref filter_info); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_filter_info); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/Gc.cs a/gtk/generated/Gc.cs | |
index 752fad0..8c86883 100644 | |
--- b/gtk/generated/Gc.cs | |
+++ a/gtk/generated/Gc.cs | |
@@ -10,13 +10,12 @@ namespace Gtk { | |
public class Gc { | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_gc_get(int depth, IntPtr colormap, IntPtr values, int values_mask); | |
+ static extern IntPtr gtk_gc_get(int depth, IntPtr colormap, ref Gdk.GCValues values, int values_mask); | |
public static Gdk.GC Get(int depth, Gdk.Colormap colormap, Gdk.GCValues values, Gdk.GCValuesMask values_mask) { | |
- IntPtr native_values = GLib.Marshaller.StructureToPtrAlloc (values); | |
- IntPtr raw_ret = gtk_gc_get(depth, colormap == null ? IntPtr.Zero : colormap.Handle, native_values, (int) values_mask); | |
+ IntPtr raw_ret = gtk_gc_get(depth, colormap == null ? IntPtr.Zero : colormap.Handle, ref values, (int) values_mask); | |
Gdk.GC ret = GLib.Object.GetObject(raw_ret) as Gdk.GC; | |
- Marshal.FreeHGlobal (native_values); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/Global.cs a/gtk/generated/Global.cs | |
index 9ba376f..6d0bd62 100644 | |
--- b/gtk/generated/Global.cs | |
+++ a/gtk/generated/Global.cs | |
@@ -93,15 +93,14 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_string(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, IntPtr str1ng); | |
+ static extern void gtk_paint_string(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, IntPtr str1ng); | |
[Obsolete] | |
public static void PaintString(Gtk.Style style, Gdk.Window window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, string str1ng) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng); | |
- gtk_paint_string(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, native_str1ng); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_string(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, native_str1ng); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
GLib.Marshaller.Free (native_str1ng); | |
} | |
diff --git b/gtk/generated/GtkSharp.AccelGroupFindFuncNative.cs a/gtk/generated/GtkSharp.AccelGroupFindFuncNative.cs | |
index 30b2328..629852e 100644 | |
--- b/gtk/generated/GtkSharp.AccelGroupFindFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.AccelGroupFindFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool AccelGroupFindFuncNative(IntPtr key, IntPtr closure, IntPtr data); | |
+ internal delegate bool AccelGroupFindFuncNative(ref Gtk.AccelKey key, IntPtr closure, IntPtr data); | |
internal class AccelGroupFindFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.AccelKey key, IntPtr closure) | |
{ | |
- IntPtr native_key = GLib.Marshaller.StructureToPtrAlloc (key); | |
- bool result = native_cb (native_key, closure, __data); | |
- Marshal.FreeHGlobal (native_key); | |
+ bool result = native_cb (ref key, closure, __data); | |
+ | |
return result; | |
} | |
} | |
internal class AccelGroupFindFuncWrapper { | |
- public bool NativeCallback (IntPtr key, IntPtr closure, IntPtr data) | |
+ public bool NativeCallback (ref Gtk.AccelKey key, IntPtr closure, IntPtr data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.AccelKey.New (key), closure); | |
+ bool __ret = managed (key, closure); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.CallbackMarshalNative.cs a/gtk/generated/GtkSharp.CallbackMarshalNative.cs | |
index 303275e..3f23cab 100644 | |
--- b/gtk/generated/GtkSharp.CallbackMarshalNative.cs | |
+++ a/gtk/generated/GtkSharp.CallbackMarshalNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void CallbackMarshalNative(IntPtr objekt, IntPtr data, uint n_args, IntPtr args); | |
+ internal delegate void CallbackMarshalNative(IntPtr objekt, IntPtr data, uint n_args, ref Gtk.Arg args); | |
internal class CallbackMarshalInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gtk.Object objekt, IntPtr data, uint n_args, Gtk.Arg args) | |
{ | |
- IntPtr native_args = GLib.Marshaller.StructureToPtrAlloc (args); | |
- native_cb (objekt == null ? IntPtr.Zero : objekt.Handle, __data, n_args, native_args); | |
- Marshal.FreeHGlobal (native_args); | |
+ native_cb (objekt == null ? IntPtr.Zero : objekt.Handle, __data, n_args, ref args); | |
+ | |
} | |
} | |
internal class CallbackMarshalWrapper { | |
- public void NativeCallback (IntPtr objekt, IntPtr data, uint n_args, IntPtr args) | |
+ public void NativeCallback (IntPtr objekt, IntPtr data, uint n_args, ref Gtk.Arg args) | |
{ | |
try { | |
- managed (GLib.Object.GetObject(objekt) as Gtk.Object, data, n_args, Gtk.Arg.New (args)); | |
+ managed (GLib.Object.GetObject(objekt) as Gtk.Object, data, n_args, args); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.CellLayoutDataFuncNative.cs a/gtk/generated/GtkSharp.CellLayoutDataFuncNative.cs | |
index dc8855f..07c8411 100644 | |
--- b/gtk/generated/GtkSharp.CellLayoutDataFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.CellLayoutDataFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void CellLayoutDataFuncNative(IntPtr cell_layout, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data); | |
+ internal delegate void CellLayoutDataFuncNative(IntPtr cell_layout, IntPtr cell, IntPtr tree_model, ref Gtk.TreeIter iter, IntPtr data); | |
internal class CellLayoutDataFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- native_cb (cell_layout == null ? IntPtr.Zero : cell_layout.Handle, cell == null ? IntPtr.Zero : cell.Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ native_cb (cell_layout == null ? IntPtr.Zero : cell_layout.Handle, cell == null ? IntPtr.Zero : cell.Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, ref iter, __data); | |
+ | |
} | |
} | |
internal class CellLayoutDataFuncWrapper { | |
- public void NativeCallback (IntPtr cell_layout, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) | |
+ public void NativeCallback (IntPtr cell_layout, IntPtr cell, IntPtr tree_model, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- managed (Gtk.CellLayoutAdapter.GetObject (cell_layout, false), GLib.Object.GetObject(cell) as Gtk.CellRenderer, Gtk.TreeModelAdapter.GetObject (tree_model, false), Gtk.TreeIter.New (iter)); | |
+ managed (Gtk.CellLayoutAdapter.GetObject (cell_layout, false), GLib.Object.GetObject(cell) as Gtk.CellRenderer, Gtk.TreeModelAdapter.GetObject (tree_model, false), iter); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.ColorSelectionChangePaletteFuncNative.cs a/gtk/generated/GtkSharp.ColorSelectionChangePaletteFuncNative.cs | |
index aecce50..0316da5 100644 | |
--- b/gtk/generated/GtkSharp.ColorSelectionChangePaletteFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.ColorSelectionChangePaletteFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void ColorSelectionChangePaletteFuncNative(IntPtr colors, int n_colors); | |
+ internal delegate void ColorSelectionChangePaletteFuncNative(ref Gdk.Color colors, int n_colors); | |
internal class ColorSelectionChangePaletteFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gdk.Color colors, int n_colors) | |
{ | |
- IntPtr native_colors = GLib.Marshaller.StructureToPtrAlloc (colors); | |
- native_cb (native_colors, n_colors); | |
- Marshal.FreeHGlobal (native_colors); | |
+ native_cb (ref colors, n_colors); | |
+ | |
} | |
} | |
internal class ColorSelectionChangePaletteFuncWrapper { | |
- public void NativeCallback (IntPtr colors, int n_colors) | |
+ public void NativeCallback (ref Gdk.Color colors, int n_colors) | |
{ | |
try { | |
- managed (Gdk.Color.New (colors), n_colors); | |
+ managed (colors, n_colors); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.ColorSelectionChangePaletteWithScreenFuncNative.cs a/gtk/generated/GtkSharp.ColorSelectionChangePaletteWithScreenFuncNative.cs | |
index 864bdad..2c81ce9 100644 | |
--- b/gtk/generated/GtkSharp.ColorSelectionChangePaletteWithScreenFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.ColorSelectionChangePaletteWithScreenFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void ColorSelectionChangePaletteWithScreenFuncNative(IntPtr screen, IntPtr colors, int n_colors); | |
+ internal delegate void ColorSelectionChangePaletteWithScreenFuncNative(IntPtr screen, ref Gdk.Color colors, int n_colors); | |
internal class ColorSelectionChangePaletteWithScreenFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gdk.Screen screen, Gdk.Color colors, int n_colors) | |
{ | |
- IntPtr native_colors = GLib.Marshaller.StructureToPtrAlloc (colors); | |
- native_cb (screen == null ? IntPtr.Zero : screen.Handle, native_colors, n_colors); | |
- Marshal.FreeHGlobal (native_colors); | |
+ native_cb (screen == null ? IntPtr.Zero : screen.Handle, ref colors, n_colors); | |
+ | |
} | |
} | |
internal class ColorSelectionChangePaletteWithScreenFuncWrapper { | |
- public void NativeCallback (IntPtr screen, IntPtr colors, int n_colors) | |
+ public void NativeCallback (IntPtr screen, ref Gdk.Color colors, int n_colors) | |
{ | |
try { | |
- managed (GLib.Object.GetObject(screen) as Gdk.Screen, Gdk.Color.New (colors), n_colors); | |
+ managed (GLib.Object.GetObject(screen) as Gdk.Screen, colors, n_colors); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.EntryCompletionMatchFuncNative.cs a/gtk/generated/GtkSharp.EntryCompletionMatchFuncNative.cs | |
index 97d5e72..63557ef 100644 | |
--- b/gtk/generated/GtkSharp.EntryCompletionMatchFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.EntryCompletionMatchFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool EntryCompletionMatchFuncNative(IntPtr completion, IntPtr key, IntPtr iter, IntPtr user_data); | |
+ internal delegate bool EntryCompletionMatchFuncNative(IntPtr completion, IntPtr key, ref Gtk.TreeIter iter, IntPtr user_data); | |
internal class EntryCompletionMatchFuncInvoker { | |
@@ -43,20 +43,19 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.EntryCompletion completion, string key, Gtk.TreeIter iter) | |
{ | |
IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool result = native_cb (completion == null ? IntPtr.Zero : completion.Handle, native_key, native_iter, __data); | |
+ bool result = native_cb (completion == null ? IntPtr.Zero : completion.Handle, native_key, ref iter, __data); | |
GLib.Marshaller.Free (native_key); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return result; | |
} | |
} | |
internal class EntryCompletionMatchFuncWrapper { | |
- public bool NativeCallback (IntPtr completion, IntPtr key, IntPtr iter, IntPtr user_data) | |
+ public bool NativeCallback (IntPtr completion, IntPtr key, ref Gtk.TreeIter iter, IntPtr user_data) | |
{ | |
try { | |
- bool __ret = managed (GLib.Object.GetObject(completion) as Gtk.EntryCompletion, GLib.Marshaller.Utf8PtrToString (key), Gtk.TreeIter.New (iter)); | |
+ bool __ret = managed (GLib.Object.GetObject(completion) as Gtk.EntryCompletion, GLib.Marshaller.Utf8PtrToString (key), iter); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.FileFilterFuncNative.cs a/gtk/generated/GtkSharp.FileFilterFuncNative.cs | |
index 3106214..40fa856 100644 | |
--- b/gtk/generated/GtkSharp.FileFilterFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.FileFilterFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool FileFilterFuncNative(IntPtr filter_info, IntPtr data); | |
+ internal delegate bool FileFilterFuncNative(ref Gtk.FileFilterInfo filter_info, IntPtr data); | |
internal class FileFilterFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.FileFilterInfo filter_info) | |
{ | |
- IntPtr native_filter_info = GLib.Marshaller.StructureToPtrAlloc (filter_info); | |
- bool result = native_cb (native_filter_info, __data); | |
- Marshal.FreeHGlobal (native_filter_info); | |
+ bool result = native_cb (ref filter_info, __data); | |
+ | |
return result; | |
} | |
} | |
internal class FileFilterFuncWrapper { | |
- public bool NativeCallback (IntPtr filter_info, IntPtr data) | |
+ public bool NativeCallback (ref Gtk.FileFilterInfo filter_info, IntPtr data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.FileFilterInfo.New (filter_info)); | |
+ bool __ret = managed (filter_info); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.RecentFilterFuncNative.cs a/gtk/generated/GtkSharp.RecentFilterFuncNative.cs | |
index 526c3e2..283541b 100644 | |
--- b/gtk/generated/GtkSharp.RecentFilterFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.RecentFilterFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool RecentFilterFuncNative(IntPtr filter_info, IntPtr user_data); | |
+ internal delegate bool RecentFilterFuncNative(ref Gtk.RecentFilterInfo filter_info, IntPtr user_data); | |
internal class RecentFilterFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.RecentFilterInfo filter_info) | |
{ | |
- IntPtr native_filter_info = GLib.Marshaller.StructureToPtrAlloc (filter_info); | |
- bool result = native_cb (native_filter_info, __data); | |
- Marshal.FreeHGlobal (native_filter_info); | |
+ bool result = native_cb (ref filter_info, __data); | |
+ | |
return result; | |
} | |
} | |
internal class RecentFilterFuncWrapper { | |
- public bool NativeCallback (IntPtr filter_info, IntPtr user_data) | |
+ public bool NativeCallback (ref Gtk.RecentFilterInfo filter_info, IntPtr user_data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.RecentFilterInfo.New (filter_info)); | |
+ bool __ret = managed (filter_info); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TextBufferDeserializeFuncNative.cs a/gtk/generated/GtkSharp.TextBufferDeserializeFuncNative.cs | |
index 38d9126..9433b96 100644 | |
--- b/gtk/generated/GtkSharp.TextBufferDeserializeFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TextBufferDeserializeFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool TextBufferDeserializeFuncNative(IntPtr register_buffer, IntPtr content_buffer, IntPtr iter, byte[] data, UIntPtr length, bool create_tags, IntPtr user_data, out IntPtr error); | |
+ internal delegate bool TextBufferDeserializeFuncNative(IntPtr register_buffer, IntPtr content_buffer, ref Gtk.TextIter iter, byte[] data, UIntPtr length, bool create_tags, IntPtr user_data, out IntPtr error); | |
internal class TextBufferDeserializeFuncInvoker { | |
@@ -42,22 +42,21 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.TextBuffer register_buffer, Gtk.TextBuffer content_buffer, Gtk.TextIter iter, byte[] data, ulong length, bool create_tags) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
IntPtr error = IntPtr.Zero; | |
- bool result = native_cb (register_buffer == null ? IntPtr.Zero : register_buffer.Handle, content_buffer == null ? IntPtr.Zero : content_buffer.Handle, native_iter, data, new UIntPtr (length), create_tags, __data, out error); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool result = native_cb (register_buffer == null ? IntPtr.Zero : register_buffer.Handle, content_buffer == null ? IntPtr.Zero : content_buffer.Handle, ref iter, data, new UIntPtr (length), create_tags, __data, out error); | |
+ | |
return result; | |
} | |
} | |
internal class TextBufferDeserializeFuncWrapper { | |
- public bool NativeCallback (IntPtr register_buffer, IntPtr content_buffer, IntPtr iter, byte[] data, UIntPtr length, bool create_tags, IntPtr user_data, out IntPtr error) | |
+ public bool NativeCallback (IntPtr register_buffer, IntPtr content_buffer, ref Gtk.TextIter iter, byte[] data, UIntPtr length, bool create_tags, IntPtr user_data, out IntPtr error) | |
{ | |
error = IntPtr.Zero; | |
try { | |
- bool __ret = managed (GLib.Object.GetObject(register_buffer) as Gtk.TextBuffer, GLib.Object.GetObject(content_buffer) as Gtk.TextBuffer, Gtk.TextIter.New (iter), data, (ulong) length, create_tags); | |
+ bool __ret = managed (GLib.Object.GetObject(register_buffer) as Gtk.TextBuffer, GLib.Object.GetObject(content_buffer) as Gtk.TextBuffer, iter, data, (ulong) length, create_tags); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs a/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs | |
index baab039..c8d9534 100644 | |
--- b/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void TreeCellDataFuncNative(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data); | |
+ internal delegate void TreeCellDataFuncNative(IntPtr tree_column, IntPtr cell, IntPtr tree_model, ref Gtk.TreeIter iter, IntPtr data); | |
internal class TreeCellDataFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- native_cb (tree_column == null ? IntPtr.Zero : tree_column.Handle, cell == null ? IntPtr.Zero : cell.Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ native_cb (tree_column == null ? IntPtr.Zero : tree_column.Handle, cell == null ? IntPtr.Zero : cell.Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, ref iter, __data); | |
+ | |
} | |
} | |
internal class TreeCellDataFuncWrapper { | |
- public void NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) | |
+ public void NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- managed (GLib.Object.GetObject(tree_column) as Gtk.TreeViewColumn, GLib.Object.GetObject(cell) as Gtk.CellRenderer, Gtk.TreeModelAdapter.GetObject (tree_model, false), Gtk.TreeIter.New (iter)); | |
+ managed (GLib.Object.GetObject(tree_column) as Gtk.TreeViewColumn, GLib.Object.GetObject(cell) as Gtk.CellRenderer, Gtk.TreeModelAdapter.GetObject (tree_model, false), iter); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.TreeIterCompareFuncNative.cs a/gtk/generated/GtkSharp.TreeIterCompareFuncNative.cs | |
index f77a20e..6b8c95f 100644 | |
--- b/gtk/generated/GtkSharp.TreeIterCompareFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeIterCompareFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate int TreeIterCompareFuncNative(IntPtr model, IntPtr a, IntPtr b, IntPtr user_data); | |
+ internal delegate int TreeIterCompareFuncNative(IntPtr model, ref Gtk.TreeIter a, ref Gtk.TreeIter b, IntPtr user_data); | |
internal class TreeIterCompareFuncInvoker { | |
@@ -42,21 +42,19 @@ namespace GtkSharp { | |
int InvokeNative (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b) | |
{ | |
- IntPtr native_a = GLib.Marshaller.StructureToPtrAlloc (a); | |
- IntPtr native_b = GLib.Marshaller.StructureToPtrAlloc (b); | |
- int result = native_cb (model == null ? IntPtr.Zero : model.Handle, native_a, native_b, __data); | |
- Marshal.FreeHGlobal (native_a); | |
- Marshal.FreeHGlobal (native_b); | |
+ int result = native_cb (model == null ? IntPtr.Zero : model.Handle, ref a, ref b, __data); | |
+ | |
+ | |
return result; | |
} | |
} | |
internal class TreeIterCompareFuncWrapper { | |
- public int NativeCallback (IntPtr model, IntPtr a, IntPtr b, IntPtr user_data) | |
+ public int NativeCallback (IntPtr model, ref Gtk.TreeIter a, ref Gtk.TreeIter b, IntPtr user_data) | |
{ | |
try { | |
- int __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (a), Gtk.TreeIter.New (b)); | |
+ int __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), a, b); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TreeModelFilterModifyFuncNative.cs a/gtk/generated/GtkSharp.TreeModelFilterModifyFuncNative.cs | |
index d9ddb9a..47b0566 100644 | |
--- b/gtk/generated/GtkSharp.TreeModelFilterModifyFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeModelFilterModifyFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void TreeModelFilterModifyFuncNative(IntPtr model, IntPtr iter, ref GLib.Value value, int column, IntPtr data); | |
+ internal delegate void TreeModelFilterModifyFuncNative(IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data); | |
internal class TreeModelFilterModifyFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gtk.TreeModel model, Gtk.TreeIter iter, ref GLib.Value value, int column) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- native_cb (model == null ? IntPtr.Zero : model.Handle, native_iter, ref value, column, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ native_cb (model == null ? IntPtr.Zero : model.Handle, ref iter, ref value, column, __data); | |
+ | |
} | |
} | |
internal class TreeModelFilterModifyFuncWrapper { | |
- public void NativeCallback (IntPtr model, IntPtr iter, ref GLib.Value value, int column, IntPtr data) | |
+ public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) | |
{ | |
try { | |
- managed (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (iter), ref value, column); | |
+ managed (Gtk.TreeModelAdapter.GetObject (model, false), iter, ref value, column); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.TreeModelFilterVisibleFuncNative.cs a/gtk/generated/GtkSharp.TreeModelFilterVisibleFuncNative.cs | |
index 24b3626..c57138b 100644 | |
--- b/gtk/generated/GtkSharp.TreeModelFilterVisibleFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeModelFilterVisibleFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool TreeModelFilterVisibleFuncNative(IntPtr model, IntPtr iter, IntPtr data); | |
+ internal delegate bool TreeModelFilterVisibleFuncNative(IntPtr model, ref Gtk.TreeIter iter, IntPtr data); | |
internal class TreeModelFilterVisibleFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.TreeModel model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, ref iter, __data); | |
+ | |
return result; | |
} | |
} | |
internal class TreeModelFilterVisibleFuncWrapper { | |
- public bool NativeCallback (IntPtr model, IntPtr iter, IntPtr data) | |
+ public bool NativeCallback (IntPtr model, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (iter)); | |
+ bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), iter); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TreeModelForeachFuncNative.cs a/gtk/generated/GtkSharp.TreeModelForeachFuncNative.cs | |
index 1271aae..818bbc9 100644 | |
--- b/gtk/generated/GtkSharp.TreeModelForeachFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeModelForeachFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool TreeModelForeachFuncNative(IntPtr model, IntPtr path, IntPtr iter, IntPtr data); | |
+ internal delegate bool TreeModelForeachFuncNative(IntPtr model, IntPtr path, ref Gtk.TreeIter iter, IntPtr data); | |
internal class TreeModelForeachFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, __data); | |
+ | |
return result; | |
} | |
} | |
internal class TreeModelForeachFuncWrapper { | |
- public bool NativeCallback (IntPtr model, IntPtr path, IntPtr iter, IntPtr data) | |
+ public bool NativeCallback (IntPtr model, IntPtr path, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TreeSelectionForeachFuncNative.cs a/gtk/generated/GtkSharp.TreeSelectionForeachFuncNative.cs | |
index 6df7698..f424bae 100644 | |
--- b/gtk/generated/GtkSharp.TreeSelectionForeachFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeSelectionForeachFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate void TreeSelectionForeachFuncNative(IntPtr model, IntPtr path, IntPtr iter, IntPtr data); | |
+ internal delegate void TreeSelectionForeachFuncNative(IntPtr model, IntPtr path, ref Gtk.TreeIter iter, IntPtr data); | |
internal class TreeSelectionForeachFuncInvoker { | |
@@ -42,18 +42,17 @@ namespace GtkSharp { | |
void InvokeNative (Gtk.TreeModel model, Gtk.TreePath path, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- native_cb (model == null ? IntPtr.Zero : model.Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ native_cb (model == null ? IntPtr.Zero : model.Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, __data); | |
+ | |
} | |
} | |
internal class TreeSelectionForeachFuncWrapper { | |
- public void NativeCallback (IntPtr model, IntPtr path, IntPtr iter, IntPtr data) | |
+ public void NativeCallback (IntPtr model, IntPtr path, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- managed (Gtk.TreeModelAdapter.GetObject (model, false), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ managed (Gtk.TreeModelAdapter.GetObject (model, false), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
if (release_on_call) | |
gch.Free (); | |
} catch (Exception e) { | |
diff --git b/gtk/generated/GtkSharp.TreeViewRowSeparatorFuncNative.cs a/gtk/generated/GtkSharp.TreeViewRowSeparatorFuncNative.cs | |
index 7ef78bd..e8f8c6b 100644 | |
--- b/gtk/generated/GtkSharp.TreeViewRowSeparatorFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeViewRowSeparatorFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool TreeViewRowSeparatorFuncNative(IntPtr model, IntPtr iter, IntPtr data); | |
+ internal delegate bool TreeViewRowSeparatorFuncNative(IntPtr model, ref Gtk.TreeIter iter, IntPtr data); | |
internal class TreeViewRowSeparatorFuncInvoker { | |
@@ -42,19 +42,18 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.TreeModel model, Gtk.TreeIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, native_iter, __data); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, ref iter, __data); | |
+ | |
return result; | |
} | |
} | |
internal class TreeViewRowSeparatorFuncWrapper { | |
- public bool NativeCallback (IntPtr model, IntPtr iter, IntPtr data) | |
+ public bool NativeCallback (IntPtr model, ref Gtk.TreeIter iter, IntPtr data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), Gtk.TreeIter.New (iter)); | |
+ bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), iter); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/GtkSharp.TreeViewSearchEqualFuncNative.cs a/gtk/generated/GtkSharp.TreeViewSearchEqualFuncNative.cs | |
index c23574c..9f93fd5 100644 | |
--- b/gtk/generated/GtkSharp.TreeViewSearchEqualFuncNative.cs | |
+++ a/gtk/generated/GtkSharp.TreeViewSearchEqualFuncNative.cs | |
@@ -8,7 +8,7 @@ namespace GtkSharp { | |
#region Autogenerated code | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- internal delegate bool TreeViewSearchEqualFuncNative(IntPtr model, int column, IntPtr key, IntPtr iter, IntPtr search_data); | |
+ internal delegate bool TreeViewSearchEqualFuncNative(IntPtr model, int column, IntPtr key, ref Gtk.TreeIter iter, IntPtr search_data); | |
internal class TreeViewSearchEqualFuncInvoker { | |
@@ -43,20 +43,19 @@ namespace GtkSharp { | |
bool InvokeNative (Gtk.TreeModel model, int column, string key, Gtk.TreeIter iter) | |
{ | |
IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, column, native_key, native_iter, __data); | |
+ bool result = native_cb (model == null ? IntPtr.Zero : model.Handle, column, native_key, ref iter, __data); | |
GLib.Marshaller.Free (native_key); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return result; | |
} | |
} | |
internal class TreeViewSearchEqualFuncWrapper { | |
- public bool NativeCallback (IntPtr model, int column, IntPtr key, IntPtr iter, IntPtr search_data) | |
+ public bool NativeCallback (IntPtr model, int column, IntPtr key, ref Gtk.TreeIter iter, IntPtr search_data) | |
{ | |
try { | |
- bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), column, GLib.Marshaller.Utf8PtrToString (key), Gtk.TreeIter.New (iter)); | |
+ bool __ret = managed (Gtk.TreeModelAdapter.GetObject (model, false), column, GLib.Marshaller.Utf8PtrToString (key), iter); | |
if (release_on_call) | |
gch.Free (); | |
return __ret; | |
diff --git b/gtk/generated/IMContext.cs a/gtk/generated/IMContext.cs | |
index fafc367..3964dcd 100644 | |
--- b/gtk/generated/IMContext.cs | |
+++ a/gtk/generated/IMContext.cs | |
@@ -344,13 +344,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_im_context_set_cursor_location(IntPtr raw, IntPtr value); | |
+ static extern void gtk_im_context_set_cursor_location(IntPtr raw, ref Gdk.Rectangle value); | |
public Gdk.Rectangle CursorLocation { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_im_context_set_cursor_location(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_im_context_set_cursor_location(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gtk/generated/IconInfo.cs a/gtk/generated/IconInfo.cs | |
index 586abf7..1f0610c 100644 | |
--- b/gtk/generated/IconInfo.cs | |
+++ a/gtk/generated/IconInfo.cs | |
@@ -42,13 +42,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_icon_info_get_embedded_rect(IntPtr raw, IntPtr rectangle); | |
+ static extern bool gtk_icon_info_get_embedded_rect(IntPtr raw, ref Gdk.Rectangle rectangle); | |
public bool GetEmbeddedRect(Gdk.Rectangle rectangle) { | |
- IntPtr native_rectangle = GLib.Marshaller.StructureToPtrAlloc (rectangle); | |
- bool raw_ret = gtk_icon_info_get_embedded_rect(Handle, native_rectangle); | |
+ bool raw_ret = gtk_icon_info_get_embedded_rect(Handle, ref rectangle); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_rectangle); | |
+ | |
return ret; | |
} | |
@@ -117,13 +116,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_icon_info_get_attach_points(IntPtr raw, IntPtr points, out int n_points); | |
+ static extern bool gtk_icon_info_get_attach_points(IntPtr raw, ref Gdk.Point points, out int n_points); | |
public bool GetAttachPoints(Gdk.Point points, out int n_points) { | |
- IntPtr native_points = GLib.Marshaller.StructureToPtrAlloc (points); | |
- bool raw_ret = gtk_icon_info_get_attach_points(Handle, native_points, out n_points); | |
+ bool raw_ret = gtk_icon_info_get_attach_points(Handle, ref points, out n_points); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_points); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/ItemFactory.cs a/gtk/generated/ItemFactory.cs | |
index 86dd1e7..39df9aa 100644 | |
--- b/gtk/generated/ItemFactory.cs | |
+++ a/gtk/generated/ItemFactory.cs | |
@@ -50,21 +50,19 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_create_items_ac(IntPtr raw, uint n_entries, IntPtr entries, IntPtr callback_data, uint callback_type); | |
+ static extern void gtk_item_factory_create_items_ac(IntPtr raw, uint n_entries, ref Gtk.ItemFactoryEntry entries, IntPtr callback_data, uint callback_type); | |
public void CreateItemsAc(uint n_entries, Gtk.ItemFactoryEntry entries, IntPtr callback_data, uint callback_type) { | |
- IntPtr native_entries = GLib.Marshaller.StructureToPtrAlloc (entries); | |
- gtk_item_factory_create_items_ac(Handle, n_entries, native_entries, callback_data, callback_type); | |
- Marshal.FreeHGlobal (native_entries); | |
+ gtk_item_factory_create_items_ac(Handle, n_entries, ref entries, callback_data, callback_type); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_delete_entry(IntPtr raw, IntPtr entry); | |
+ static extern void gtk_item_factory_delete_entry(IntPtr raw, ref Gtk.ItemFactoryEntry entry); | |
public void DeleteEntry(Gtk.ItemFactoryEntry entry) { | |
- IntPtr native_entry = GLib.Marshaller.StructureToPtrAlloc (entry); | |
- gtk_item_factory_delete_entry(Handle, native_entry); | |
- Marshal.FreeHGlobal (native_entry); | |
+ gtk_item_factory_delete_entry(Handle, ref entry); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -104,12 +102,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_create_menu_entries(uint n_entries, IntPtr entries); | |
+ static extern void gtk_item_factory_create_menu_entries(uint n_entries, ref Gtk.MenuEntry entries); | |
public static void CreateMenuEntries(uint n_entries, Gtk.MenuEntry entries) { | |
- IntPtr native_entries = GLib.Marshaller.StructureToPtrAlloc (entries); | |
- gtk_item_factory_create_menu_entries(n_entries, native_entries); | |
- Marshal.FreeHGlobal (native_entries); | |
+ gtk_item_factory_create_menu_entries(n_entries, ref entries); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -170,12 +167,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_create_items(IntPtr raw, uint n_entries, IntPtr entries, IntPtr callback_data); | |
+ static extern void gtk_item_factory_create_items(IntPtr raw, uint n_entries, ref Gtk.ItemFactoryEntry entries, IntPtr callback_data); | |
public void CreateItems(uint n_entries, Gtk.ItemFactoryEntry entries, IntPtr callback_data) { | |
- IntPtr native_entries = GLib.Marshaller.StructureToPtrAlloc (entries); | |
- gtk_item_factory_create_items(Handle, n_entries, native_entries, callback_data); | |
- Marshal.FreeHGlobal (native_entries); | |
+ gtk_item_factory_create_items(Handle, n_entries, ref entries, callback_data); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -207,21 +203,19 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_delete_entries(IntPtr raw, uint n_entries, IntPtr entries); | |
+ static extern void gtk_item_factory_delete_entries(IntPtr raw, uint n_entries, ref Gtk.ItemFactoryEntry entries); | |
public void DeleteEntries(uint n_entries, Gtk.ItemFactoryEntry entries) { | |
- IntPtr native_entries = GLib.Marshaller.StructureToPtrAlloc (entries); | |
- gtk_item_factory_delete_entries(Handle, n_entries, native_entries); | |
- Marshal.FreeHGlobal (native_entries); | |
+ gtk_item_factory_delete_entries(Handle, n_entries, ref entries); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_item_factory_create_item(IntPtr raw, IntPtr entry, IntPtr callback_data, uint callback_type); | |
+ static extern void gtk_item_factory_create_item(IntPtr raw, ref Gtk.ItemFactoryEntry entry, IntPtr callback_data, uint callback_type); | |
public void CreateItem(Gtk.ItemFactoryEntry entry, IntPtr callback_data, uint callback_type) { | |
- IntPtr native_entry = GLib.Marshaller.StructureToPtrAlloc (entry); | |
- gtk_item_factory_create_item(Handle, native_entry, callback_data, callback_type); | |
- Marshal.FreeHGlobal (native_entry); | |
+ gtk_item_factory_create_item(Handle, ref entry, callback_data, callback_type); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/ListStore.cs a/gtk/generated/ListStore.cs | |
index ba3a515..4c2c608 100644 | |
--- b/gtk/generated/ListStore.cs | |
+++ a/gtk/generated/ListStore.cs | |
@@ -33,23 +33,20 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_move_before(IntPtr raw, IntPtr iter, IntPtr position); | |
+ static extern void gtk_list_store_move_before(IntPtr raw, ref Gtk.TreeIter iter, ref Gtk.TreeIter position); | |
public void MoveBefore(Gtk.TreeIter iter, Gtk.TreeIter position) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_position = GLib.Marshaller.StructureToPtrAlloc (position); | |
- gtk_list_store_move_before(Handle, native_iter, native_position); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_position); | |
+ gtk_list_store_move_before(Handle, ref iter, ref position); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_set_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_list_store_set_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void SetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_list_store_set_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_list_store_set_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -60,60 +57,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_insert_before(IntPtr raw, IntPtr iter, IntPtr sibling); | |
+ static extern void gtk_list_store_insert_before(IntPtr raw, IntPtr iter, ref Gtk.TreeIter sibling); | |
public Gtk.TreeIter InsertBefore(Gtk.TreeIter sibling) { | |
Gtk.TreeIter iter; | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_sibling = GLib.Marshaller.StructureToPtrAlloc (sibling); | |
- gtk_list_store_insert_before(Handle, native_iter, native_sibling); | |
+ gtk_list_store_insert_before(Handle, native_iter, ref sibling); | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_sibling); | |
+ | |
return iter; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_insert_with_valuesv(IntPtr raw, IntPtr iter, int position, out int columns, ref GLib.Value values, int n_values); | |
+ static extern void gtk_list_store_insert_with_valuesv(IntPtr raw, ref Gtk.TreeIter iter, int position, out int columns, ref GLib.Value values, int n_values); | |
[Obsolete] | |
public int InsertWithValuesv(Gtk.TreeIter iter, int position, GLib.Value values, int n_values) { | |
int columns; | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_list_store_insert_with_valuesv(Handle, native_iter, position, out columns, ref values, n_values); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_list_store_insert_with_valuesv(Handle, ref iter, position, out columns, ref values, n_values); | |
+ | |
return columns; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_set_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_list_store_set_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void SetValue(Gtk.TreeIter iter, int column, GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_list_store_set_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_list_store_set_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_move_after(IntPtr raw, IntPtr iter, IntPtr position); | |
+ static extern void gtk_list_store_move_after(IntPtr raw, ref Gtk.TreeIter iter, ref Gtk.TreeIter position); | |
public void MoveAfter(Gtk.TreeIter iter, Gtk.TreeIter position) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_position = GLib.Marshaller.StructureToPtrAlloc (position); | |
- gtk_list_store_move_after(Handle, native_iter, native_position); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_position); | |
+ gtk_list_store_move_after(Handle, ref iter, ref position); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_list_store_remove(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_list_store_remove(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool Remove(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_list_store_remove(Handle, native_iter); | |
+ bool raw_ret = gtk_list_store_remove(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -137,16 +128,15 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_insert_after(IntPtr raw, IntPtr iter, IntPtr sibling); | |
+ static extern void gtk_list_store_insert_after(IntPtr raw, IntPtr iter, ref Gtk.TreeIter sibling); | |
public Gtk.TreeIter InsertAfter(Gtk.TreeIter sibling) { | |
Gtk.TreeIter iter; | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_sibling = GLib.Marshaller.StructureToPtrAlloc (sibling); | |
- gtk_list_store_insert_after(Handle, native_iter, native_sibling); | |
+ gtk_list_store_insert_after(Handle, native_iter, ref sibling); | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_sibling); | |
+ | |
return iter; | |
} | |
@@ -175,24 +165,21 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_list_store_swap(IntPtr raw, IntPtr a, IntPtr b); | |
+ static extern void gtk_list_store_swap(IntPtr raw, ref Gtk.TreeIter a, ref Gtk.TreeIter b); | |
public void Swap(Gtk.TreeIter a, Gtk.TreeIter b) { | |
- IntPtr native_a = GLib.Marshaller.StructureToPtrAlloc (a); | |
- IntPtr native_b = GLib.Marshaller.StructureToPtrAlloc (b); | |
- gtk_list_store_swap(Handle, native_a, native_b); | |
- Marshal.FreeHGlobal (native_a); | |
- Marshal.FreeHGlobal (native_b); | |
+ gtk_list_store_swap(Handle, ref a, ref b); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_list_store_iter_is_valid(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_list_store_iter_is_valid(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterIsValid(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_list_store_iter_is_valid(Handle, native_iter); | |
+ bool raw_ret = gtk_list_store_iter_is_valid(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -228,56 +215,51 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_path(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_path(IntPtr raw, ref Gtk.TreeIter iter); | |
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_path(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_path(Handle, ref iter); | |
Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), true); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, IntPtr child); | |
+ static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, ref Gtk.TreeIter child); | |
public bool IterParent(out Gtk.TreeIter iter, Gtk.TreeIter child) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child = GLib.Marshaller.StructureToPtrAlloc (child); | |
- bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, native_child); | |
+ bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, ref child); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_child); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_ref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_ref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void RefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_ref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_ref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_model_get_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void GetValue(Gtk.TreeIter iter, int column, ref GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_model_iter_n_children(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_model_iter_n_children(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterNChildren(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_model_iter_n_children(Handle, native_iter); | |
+ int raw_ret = gtk_tree_model_iter_n_children(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -294,59 +276,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowChanged(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public string GetStringFromIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, ref iter); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_next(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_next(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterNext(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_next(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_next(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_has_child(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_has_child(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterHasChild(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_has_child(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_has_child(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, IntPtr parent); | |
+ static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent); | |
public bool IterChildren(out Gtk.TreeIter iter, Gtk.TreeIter parent) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, native_parent); | |
+ bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, ref parent); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
@@ -383,62 +360,56 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowHasChildToggled(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_model_get_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void GetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, IntPtr iter, int[] new_order); | |
+ static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter, int[] new_order); | |
public void EmitRowsReordered(Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, new_order); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowInserted(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, IntPtr parent, int n); | |
+ static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
public bool IterNthChild(out Gtk.TreeIter iter, Gtk.TreeIter parent, int n) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, native_parent, n); | |
+ bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, ref parent, n); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_unref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_unref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnrefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_unref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_unref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -463,15 +434,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowChangedVMDelegate RowChangedVMCallback; | |
- static void rowchanged_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowchanged_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
ListStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as ListStore; | |
- tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -562,15 +533,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowInsertedVMDelegate RowInsertedVMCallback; | |
- static void rowinserted_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowinserted_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
ListStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as ListStore; | |
- tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -613,15 +584,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowHasChildToggledVMDelegate RowHasChildToggledVMCallback; | |
- static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
ListStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as ListStore; | |
- tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -866,9 +837,12 @@ namespace Gtk { | |
return ret; | |
} | |
+ [DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_model_iter_n_children", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern int gtk_tree_model_iter_n_children_ptr(IntPtr raw, IntPtr iter); | |
+ | |
public int IterNChildren () | |
{ | |
- int raw_ret = gtk_tree_model_iter_n_children (Handle, IntPtr.Zero); | |
+ int raw_ret = gtk_tree_model_iter_n_children_ptr (Handle, IntPtr.Zero); | |
int ret = raw_ret; | |
return ret; | |
} | |
diff --git b/gtk/generated/PrintSettings.cs a/gtk/generated/PrintSettings.cs | |
index 984874b..0730c9b 100644 | |
--- b/gtk/generated/PrintSettings.cs | |
+++ a/gtk/generated/PrintSettings.cs | |
@@ -306,12 +306,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_print_settings_set_page_ranges(IntPtr raw, IntPtr page_ranges, int num_ranges); | |
+ static extern void gtk_print_settings_set_page_ranges(IntPtr raw, ref Gtk.PageRange page_ranges, int num_ranges); | |
public void SetPageRanges(Gtk.PageRange page_ranges, int num_ranges) { | |
- IntPtr native_page_ranges = GLib.Marshaller.StructureToPtrAlloc (page_ranges); | |
- gtk_print_settings_set_page_ranges(Handle, native_page_ranges, num_ranges); | |
- Marshal.FreeHGlobal (native_page_ranges); | |
+ gtk_print_settings_set_page_ranges(Handle, ref page_ranges, num_ranges); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/RecentFilter.cs a/gtk/generated/RecentFilter.cs | |
index 6f477a0..7e96d3c 100644 | |
--- b/gtk/generated/RecentFilter.cs | |
+++ a/gtk/generated/RecentFilter.cs | |
@@ -28,13 +28,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_recent_filter_filter(IntPtr raw, IntPtr filter_info); | |
+ static extern bool gtk_recent_filter_filter(IntPtr raw, ref Gtk.RecentFilterInfo filter_info); | |
public bool Filter(Gtk.RecentFilterInfo filter_info) { | |
- IntPtr native_filter_info = GLib.Marshaller.StructureToPtrAlloc (filter_info); | |
- bool raw_ret = gtk_recent_filter_filter(Handle, native_filter_info); | |
+ bool raw_ret = gtk_recent_filter_filter(Handle, ref filter_info); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_filter_info); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/RecentManager.cs a/gtk/generated/RecentManager.cs | |
index 758e3df..689e978 100644 | |
--- b/gtk/generated/RecentManager.cs | |
+++ a/gtk/generated/RecentManager.cs | |
@@ -123,15 +123,14 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_recent_manager_add_full(IntPtr raw, IntPtr uri, IntPtr recent_data); | |
+ static extern bool gtk_recent_manager_add_full(IntPtr raw, IntPtr uri, ref Gtk.RecentData recent_data); | |
public bool AddFull(string uri, Gtk.RecentData recent_data) { | |
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); | |
- IntPtr native_recent_data = GLib.Marshaller.StructureToPtrAlloc (recent_data); | |
- bool raw_ret = gtk_recent_manager_add_full(Handle, native_uri, native_recent_data); | |
+ bool raw_ret = gtk_recent_manager_add_full(Handle, native_uri, ref recent_data); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_uri); | |
- Marshal.FreeHGlobal (native_recent_data); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/Selection.cs a/gtk/generated/Selection.cs | |
index 4004732..18b8fe4 100644 | |
--- b/gtk/generated/Selection.cs | |
+++ a/gtk/generated/Selection.cs | |
@@ -19,12 +19,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_selection_add_targets(IntPtr widget, IntPtr selection, IntPtr targets, uint ntargets); | |
+ static extern void gtk_selection_add_targets(IntPtr widget, IntPtr selection, ref Gtk.TargetEntry targets, uint ntargets); | |
public static void AddTargets(Gtk.Widget widget, Gdk.Atom selection, Gtk.TargetEntry targets, uint ntargets) { | |
- IntPtr native_targets = GLib.Marshaller.StructureToPtrAlloc (targets); | |
- gtk_selection_add_targets(widget == null ? IntPtr.Zero : widget.Handle, selection == null ? IntPtr.Zero : selection.Handle, native_targets, ntargets); | |
- Marshal.FreeHGlobal (native_targets); | |
+ gtk_selection_add_targets(widget == null ? IntPtr.Zero : widget.Handle, selection == null ? IntPtr.Zero : selection.Handle, ref targets, ntargets); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/Settings.cs a/gtk/generated/Settings.cs | |
index 1a00c0a..727045c 100644 | |
--- b/gtk/generated/Settings.cs | |
+++ a/gtk/generated/Settings.cs | |
@@ -32,14 +32,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_settings_set_property_value(IntPtr raw, IntPtr name, IntPtr svalue); | |
+ static extern void gtk_settings_set_property_value(IntPtr raw, IntPtr name, ref Gtk.SettingsValue svalue); | |
public void SetPropertyValue(string name, Gtk.SettingsValue svalue) { | |
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); | |
- IntPtr native_svalue = GLib.Marshaller.StructureToPtrAlloc (svalue); | |
- gtk_settings_set_property_value(Handle, native_name, native_svalue); | |
+ gtk_settings_set_property_value(Handle, native_name, ref svalue); | |
GLib.Marshaller.Free (native_name); | |
- Marshal.FreeHGlobal (native_svalue); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/Style.cs a/gtk/generated/Style.cs | |
index a38d339..6e4d13c 100644 | |
--- b/gtk/generated/Style.cs | |
+++ a/gtk/generated/Style.cs | |
@@ -195,13 +195,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_focus(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_focus(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintFocus(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_focus(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_focus(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
@@ -215,22 +214,20 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_style_apply_default_background(IntPtr raw, IntPtr window, bool set_bg, int state_type, IntPtr area, int x, int y, int width, int height); | |
+ static extern void gtk_style_apply_default_background(IntPtr raw, IntPtr window, bool set_bg, int state_type, ref Gdk.Rectangle area, int x, int y, int width, int height); | |
public void ApplyDefaultBackground(Gdk.Window window, bool set_bg, Gtk.StateType state_type, Gdk.Rectangle area, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
- gtk_style_apply_default_background(Handle, window == null ? IntPtr.Zero : window.Handle, set_bg, (int) state_type, native_area, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_style_apply_default_background(Handle, window == null ? IntPtr.Zero : window.Handle, set_bg, (int) state_type, ref area, x, y, width, height); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_hline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int x1, int x2, int y); | |
+ static extern void gtk_paint_hline(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x1, int x2, int y); | |
public static void PaintHline(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x1, int x2, int y) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_hline(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x1, x2, y); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_hline(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x1, x2, y); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
@@ -238,7 +235,7 @@ namespace Gtk { | |
static extern IntPtr gtk_style_get_font(IntPtr raw); | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_style_set_font(IntPtr raw, IntPtr value); | |
+ static extern void gtk_style_set_font(IntPtr raw, ref Gdk.Font value); | |
[Obsolete] | |
public Gdk.Font Font { | |
@@ -248,97 +245,88 @@ namespace Gtk { | |
return ret; | |
} | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_style_set_font(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_style_set_font(Handle, ref value); | |
+ | |
} | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_expander(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int expander_style); | |
+ static extern void gtk_paint_expander(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int expander_style); | |
public static void PaintExpander(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Gtk.ExpanderStyle expander_style) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_expander(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, (int) expander_style); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_expander(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, (int) expander_style); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_extension(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side); | |
+ static extern void gtk_paint_extension(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side); | |
public static void PaintExtension(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup(detail); | |
- gtk_paint_extension(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_extension(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_option(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_option(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintOption(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_option(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_option(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_resize_grip(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int edge, int x, int y, int width, int height); | |
+ static extern void gtk_paint_resize_grip(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int edge, int x, int y, int width, int height); | |
public static void PaintResizeGrip(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.WindowEdge edge, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_resize_grip(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, (int) edge, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_resize_grip(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, (int) edge, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_box_gap(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side, int gap_x, int gap_width); | |
+ static extern void gtk_paint_box_gap(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side, int gap_x, int gap_width); | |
public static void PaintBoxGap(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup(detail); | |
- gtk_paint_box_gap(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side, gap_x, gap_width); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_box_gap(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side, gap_x, gap_width); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_vline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, IntPtr detail, int y1_, int y2_, int x); | |
+ static extern void gtk_paint_vline(IntPtr style, IntPtr window, int state_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int y1_, int y2_, int x); | |
public static void PaintVline(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int y1_, int y2_, int x) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_vline(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, y1_, y2_, x); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_vline(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, y1_, y2_, x); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_flat_box(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_flat_box(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintFlatBox(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_flat_box(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_flat_box(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_shadow(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_shadow(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintShadow(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_shadow(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_shadow(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
@@ -350,46 +338,42 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_layout(IntPtr style, IntPtr window, int state_type, bool use_text, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, IntPtr layout); | |
+ static extern void gtk_paint_layout(IntPtr style, IntPtr window, int state_type, bool use_text, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, IntPtr layout); | |
public static void PaintLayout(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, bool use_text, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, Pango.Layout layout) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_layout(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, use_text, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, layout == null ? IntPtr.Zero : layout.Handle); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_layout(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, use_text, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, layout == null ? IntPtr.Zero : layout.Handle); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_diamond(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_diamond(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintDiamond(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_diamond(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_diamond(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_check(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_check(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintCheck(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_check(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_check(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_shadow_gap(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side, int gap_x, int gap_width); | |
+ static extern void gtk_paint_shadow_gap(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int gap_side, int gap_x, int gap_width); | |
public static void PaintShadowGap(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.PositionType gap_side, int gap_x, int gap_width) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup(detail); | |
- gtk_paint_shadow_gap(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side, gap_x, gap_width); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_shadow_gap(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) gap_side, gap_x, gap_width); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
@@ -445,24 +429,22 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_arrow(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int arrow_type, bool fill, int x, int y, int width, int height); | |
+ static extern void gtk_paint_arrow(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int arrow_type, bool fill, int x, int y, int width, int height); | |
public static void PaintArrow(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gtk.ArrowType arrow_type, bool fill, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_arrow(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, (int) arrow_type, fill, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_arrow(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, (int) arrow_type, fill, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_polygon(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, Gdk.Point[] points, int n_points, bool fill); | |
+ static extern void gtk_paint_polygon(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, Gdk.Point[] points, int n_points, bool fill); | |
public static void PaintPolygon(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, Gdk.Point[] points, bool fill) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_polygon(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, points, (points == null ? 0 : points.Length), fill); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_polygon(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, points, (points == null ? 0 : points.Length), fill); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
@@ -478,46 +460,42 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_tab(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_tab(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintTab(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_tab(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_tab(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_handle(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int orientation); | |
+ static extern void gtk_paint_handle(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int orientation); | |
public static void PaintHandle(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_handle(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) orientation); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_handle(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) orientation); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_slider(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int orientation); | |
+ static extern void gtk_paint_slider(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height, int orientation); | |
public static void PaintSlider(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height, Gtk.Orientation orientation) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_slider(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) orientation); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_slider(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height, (int) orientation); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_paint_box(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
+ static extern void gtk_paint_box(IntPtr style, IntPtr window, int state_type, int shadow_type, ref Gdk.Rectangle area, IntPtr widget, IntPtr detail, int x, int y, int width, int height); | |
public static void PaintBox(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle area, Gtk.Widget widget, string detail, int x, int y, int width, int height) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail); | |
- gtk_paint_box(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_paint_box(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, ref area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height); | |
+ | |
GLib.Marshaller.Free (native_detail); | |
} | |
diff --git b/gtk/generated/Target.cs a/gtk/generated/Target.cs | |
index 046b9d2..7ba3e74 100644 | |
--- b/gtk/generated/Target.cs | |
+++ a/gtk/generated/Target.cs | |
@@ -19,12 +19,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_target_table_free(IntPtr targets, int n_targets); | |
+ static extern void gtk_target_table_free(ref Gtk.TargetEntry targets, int n_targets); | |
public static void TableFree(Gtk.TargetEntry targets, int n_targets) { | |
- IntPtr native_targets = GLib.Marshaller.StructureToPtrAlloc (targets); | |
- gtk_target_table_free(native_targets, n_targets); | |
- Marshal.FreeHGlobal (native_targets); | |
+ gtk_target_table_free(ref targets, n_targets); | |
+ | |
} | |
#endregion | |
diff --git b/gtk/generated/TextBuffer.cs a/gtk/generated/TextBuffer.cs | |
index ae6850f..8f748c8 100644 | |
--- b/gtk/generated/TextBuffer.cs | |
+++ a/gtk/generated/TextBuffer.cs | |
@@ -125,18 +125,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void MarkSetVMDelegate (IntPtr buffer, IntPtr location, IntPtr mark); | |
+ delegate void MarkSetVMDelegate (IntPtr buffer, ref Gtk.TextIter location, IntPtr mark); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_mark_set (IntPtr gtype, MarkSetVMDelegate cb); | |
static MarkSetVMDelegate MarkSetVMCallback; | |
- static void markset_cb (IntPtr buffer, IntPtr location, IntPtr mark) | |
+ static void markset_cb (IntPtr buffer, ref Gtk.TextIter location, IntPtr mark) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnMarkSet (Gtk.TextIter.New (location), GLib.Object.GetObject(mark) as Gtk.TextMark); | |
+ buffer_managed.OnMarkSet (location, GLib.Object.GetObject(mark) as Gtk.TextMark); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -150,14 +150,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_mark_set (IntPtr buffer, IntPtr location, IntPtr mark); | |
+ static extern void gtksharp_textbuffer_base_mark_set (IntPtr buffer, ref Gtk.TextIter location, IntPtr mark); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideMarkSet")] | |
protected virtual void OnMarkSet (Gtk.TextIter location, Gtk.TextMark mark) | |
{ | |
- IntPtr native_location = GLib.Marshaller.StructureToPtrAlloc (location); | |
- gtksharp_textbuffer_base_mark_set (Handle, native_location, mark == null ? IntPtr.Zero : mark.Handle); | |
- Marshal.FreeHGlobal (native_location); | |
+ gtksharp_textbuffer_base_mark_set (Handle, ref location, mark == null ? IntPtr.Zero : mark.Handle); | |
+ | |
} | |
[GLib.Signal("mark_set")] | |
@@ -219,18 +218,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void DeleteRangeVMDelegate (IntPtr buffer, IntPtr start, IntPtr end); | |
+ delegate void DeleteRangeVMDelegate (IntPtr buffer, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_delete_range (IntPtr gtype, DeleteRangeVMDelegate cb); | |
static DeleteRangeVMDelegate DeleteRangeVMCallback; | |
- static void deleterange_cb (IntPtr buffer, IntPtr start, IntPtr end) | |
+ static void deleterange_cb (IntPtr buffer, ref Gtk.TextIter start, ref Gtk.TextIter end) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnDeleteRange (Gtk.TextIter.New (start), Gtk.TextIter.New (end)); | |
+ buffer_managed.OnDeleteRange (start, end); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -244,16 +243,14 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_delete_range (IntPtr buffer, IntPtr start, IntPtr end); | |
+ static extern void gtksharp_textbuffer_base_delete_range (IntPtr buffer, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideDeleteRange")] | |
protected virtual void OnDeleteRange (Gtk.TextIter start, Gtk.TextIter end) | |
{ | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtksharp_textbuffer_base_delete_range (Handle, native_start, native_end); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtksharp_textbuffer_base_delete_range (Handle, ref start, ref end); | |
+ | |
+ | |
} | |
[GLib.Signal("delete_range")] | |
@@ -269,18 +266,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void InsertTextVMDelegate (IntPtr buffer, IntPtr pos, IntPtr text, int length); | |
+ delegate void InsertTextVMDelegate (IntPtr buffer, ref Gtk.TextIter pos, IntPtr text, int length); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_insert_text (IntPtr gtype, InsertTextVMDelegate cb); | |
static InsertTextVMDelegate InsertTextVMCallback; | |
- static void inserttext_cb (IntPtr buffer, IntPtr pos, IntPtr text, int length) | |
+ static void inserttext_cb (IntPtr buffer, ref Gtk.TextIter pos, IntPtr text, int length) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnInsertText (Gtk.TextIter.New (pos), GLib.Marshaller.Utf8PtrToString (text)); | |
+ buffer_managed.OnInsertText (pos, GLib.Marshaller.Utf8PtrToString (text)); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -294,15 +291,14 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_insert_text (IntPtr buffer, IntPtr pos, IntPtr text, int length); | |
+ static extern void gtksharp_textbuffer_base_insert_text (IntPtr buffer, ref Gtk.TextIter pos, IntPtr text, int length); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideInsertText")] | |
protected virtual void OnInsertText (Gtk.TextIter pos, string text) | |
{ | |
- IntPtr native_pos = GLib.Marshaller.StructureToPtrAlloc (pos); | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); | |
- gtksharp_textbuffer_base_insert_text (Handle, native_pos, native_text, System.Text.Encoding.UTF8.GetByteCount (text)); | |
- Marshal.FreeHGlobal (native_pos); | |
+ gtksharp_textbuffer_base_insert_text (Handle, ref pos, native_text, System.Text.Encoding.UTF8.GetByteCount (text)); | |
+ | |
GLib.Marshaller.Free (native_text); | |
} | |
@@ -365,18 +361,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void PixbufInsertedVMDelegate (IntPtr buffer, IntPtr pos, IntPtr pixbuf); | |
+ delegate void PixbufInsertedVMDelegate (IntPtr buffer, ref Gtk.TextIter pos, IntPtr pixbuf); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_insert_pixbuf (IntPtr gtype, PixbufInsertedVMDelegate cb); | |
static PixbufInsertedVMDelegate PixbufInsertedVMCallback; | |
- static void pixbufinserted_cb (IntPtr buffer, IntPtr pos, IntPtr pixbuf) | |
+ static void pixbufinserted_cb (IntPtr buffer, ref Gtk.TextIter pos, IntPtr pixbuf) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnPixbufInserted (Gtk.TextIter.New (pos), GLib.Object.GetObject(pixbuf) as Gdk.Pixbuf); | |
+ buffer_managed.OnPixbufInserted (pos, GLib.Object.GetObject(pixbuf) as Gdk.Pixbuf); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -390,14 +386,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_insert_pixbuf (IntPtr buffer, IntPtr pos, IntPtr pixbuf); | |
+ static extern void gtksharp_textbuffer_base_insert_pixbuf (IntPtr buffer, ref Gtk.TextIter pos, IntPtr pixbuf); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverridePixbufInserted")] | |
protected virtual void OnPixbufInserted (Gtk.TextIter pos, Gdk.Pixbuf pixbuf) | |
{ | |
- IntPtr native_pos = GLib.Marshaller.StructureToPtrAlloc (pos); | |
- gtksharp_textbuffer_base_insert_pixbuf (Handle, native_pos, pixbuf == null ? IntPtr.Zero : pixbuf.Handle); | |
- Marshal.FreeHGlobal (native_pos); | |
+ gtksharp_textbuffer_base_insert_pixbuf (Handle, ref pos, pixbuf == null ? IntPtr.Zero : pixbuf.Handle); | |
+ | |
} | |
[GLib.Signal("insert_pixbuf")] | |
@@ -551,18 +546,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void TagAppliedVMDelegate (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char); | |
+ delegate void TagAppliedVMDelegate (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_apply_tag (IntPtr gtype, TagAppliedVMDelegate cb); | |
static TagAppliedVMDelegate TagAppliedVMCallback; | |
- static void tagapplied_cb (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char) | |
+ static void tagapplied_cb (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnTagApplied (GLib.Object.GetObject(tag) as Gtk.TextTag, Gtk.TextIter.New (start_char), Gtk.TextIter.New (end_char)); | |
+ buffer_managed.OnTagApplied (GLib.Object.GetObject(tag) as Gtk.TextTag, start_char, end_char); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -576,16 +571,14 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_apply_tag (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char); | |
+ static extern void gtksharp_textbuffer_base_apply_tag (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideTagApplied")] | |
protected virtual void OnTagApplied (Gtk.TextTag tag, Gtk.TextIter start_char, Gtk.TextIter end_char) | |
{ | |
- IntPtr native_start_char = GLib.Marshaller.StructureToPtrAlloc (start_char); | |
- IntPtr native_end_char = GLib.Marshaller.StructureToPtrAlloc (end_char); | |
- gtksharp_textbuffer_base_apply_tag (Handle, tag == null ? IntPtr.Zero : tag.Handle, native_start_char, native_end_char); | |
- Marshal.FreeHGlobal (native_start_char); | |
- Marshal.FreeHGlobal (native_end_char); | |
+ gtksharp_textbuffer_base_apply_tag (Handle, tag == null ? IntPtr.Zero : tag.Handle, ref start_char, ref end_char); | |
+ | |
+ | |
} | |
[GLib.Signal("apply_tag")] | |
@@ -601,18 +594,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void ChildAnchorInsertedVMDelegate (IntPtr buffer, IntPtr pos, IntPtr anchor); | |
+ delegate void ChildAnchorInsertedVMDelegate (IntPtr buffer, ref Gtk.TextIter pos, IntPtr anchor); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_insert_child_anchor (IntPtr gtype, ChildAnchorInsertedVMDelegate cb); | |
static ChildAnchorInsertedVMDelegate ChildAnchorInsertedVMCallback; | |
- static void childanchorinserted_cb (IntPtr buffer, IntPtr pos, IntPtr anchor) | |
+ static void childanchorinserted_cb (IntPtr buffer, ref Gtk.TextIter pos, IntPtr anchor) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnChildAnchorInserted (Gtk.TextIter.New (pos), GLib.Object.GetObject(anchor) as Gtk.TextChildAnchor); | |
+ buffer_managed.OnChildAnchorInserted (pos, GLib.Object.GetObject(anchor) as Gtk.TextChildAnchor); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -626,14 +619,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_insert_child_anchor (IntPtr buffer, IntPtr pos, IntPtr anchor); | |
+ static extern void gtksharp_textbuffer_base_insert_child_anchor (IntPtr buffer, ref Gtk.TextIter pos, IntPtr anchor); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideChildAnchorInserted")] | |
protected virtual void OnChildAnchorInserted (Gtk.TextIter pos, Gtk.TextChildAnchor anchor) | |
{ | |
- IntPtr native_pos = GLib.Marshaller.StructureToPtrAlloc (pos); | |
- gtksharp_textbuffer_base_insert_child_anchor (Handle, native_pos, anchor == null ? IntPtr.Zero : anchor.Handle); | |
- Marshal.FreeHGlobal (native_pos); | |
+ gtksharp_textbuffer_base_insert_child_anchor (Handle, ref pos, anchor == null ? IntPtr.Zero : anchor.Handle); | |
+ | |
} | |
[GLib.Signal("insert_child_anchor")] | |
@@ -649,18 +641,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void TagRemovedVMDelegate (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char); | |
+ delegate void TagRemovedVMDelegate (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_textbuffer_override_remove_tag (IntPtr gtype, TagRemovedVMDelegate cb); | |
static TagRemovedVMDelegate TagRemovedVMCallback; | |
- static void tagremoved_cb (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char) | |
+ static void tagremoved_cb (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char) | |
{ | |
try { | |
TextBuffer buffer_managed = GLib.Object.GetObject (buffer, false) as TextBuffer; | |
- buffer_managed.OnTagRemoved (GLib.Object.GetObject(tag) as Gtk.TextTag, Gtk.TextIter.New (start_char), Gtk.TextIter.New (end_char)); | |
+ buffer_managed.OnTagRemoved (GLib.Object.GetObject(tag) as Gtk.TextTag, start_char, end_char); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -674,16 +666,14 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_textbuffer_base_remove_tag (IntPtr buffer, IntPtr tag, IntPtr start_char, IntPtr end_char); | |
+ static extern void gtksharp_textbuffer_base_remove_tag (IntPtr buffer, IntPtr tag, ref Gtk.TextIter start_char, ref Gtk.TextIter end_char); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextBuffer), ConnectionMethod="OverrideTagRemoved")] | |
protected virtual void OnTagRemoved (Gtk.TextTag tag, Gtk.TextIter start_char, Gtk.TextIter end_char) | |
{ | |
- IntPtr native_start_char = GLib.Marshaller.StructureToPtrAlloc (start_char); | |
- IntPtr native_end_char = GLib.Marshaller.StructureToPtrAlloc (end_char); | |
- gtksharp_textbuffer_base_remove_tag (Handle, tag == null ? IntPtr.Zero : tag.Handle, native_start_char, native_end_char); | |
- Marshal.FreeHGlobal (native_start_char); | |
- Marshal.FreeHGlobal (native_end_char); | |
+ gtksharp_textbuffer_base_remove_tag (Handle, tag == null ? IntPtr.Zero : tag.Handle, ref start_char, ref end_char); | |
+ | |
+ | |
} | |
[GLib.Signal("remove_tag")] | |
@@ -721,18 +711,15 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_buffer_insert_range_interactive(IntPtr raw, IntPtr iter, IntPtr start, IntPtr end, bool default_editable); | |
+ static extern bool gtk_text_buffer_insert_range_interactive(IntPtr raw, ref Gtk.TextIter iter, ref Gtk.TextIter start, ref Gtk.TextIter end, bool default_editable); | |
public bool InsertRangeInteractive(ref Gtk.TextIter iter, Gtk.TextIter start, Gtk.TextIter end, bool default_editable) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- bool raw_ret = gtk_text_buffer_insert_range_interactive(Handle, native_iter, native_start, native_end, default_editable); | |
+ bool raw_ret = gtk_text_buffer_insert_range_interactive(Handle, ref iter, ref start, ref end, default_editable); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
+ | |
+ | |
return ret; | |
} | |
@@ -764,27 +751,25 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_buffer_backspace(IntPtr raw, IntPtr iter, bool interactive, bool default_editable); | |
+ static extern bool gtk_text_buffer_backspace(IntPtr raw, ref Gtk.TextIter iter, bool interactive, bool default_editable); | |
public bool Backspace(ref Gtk.TextIter iter, bool interactive, bool default_editable) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_buffer_backspace(Handle, native_iter, interactive, default_editable); | |
+ bool raw_ret = gtk_text_buffer_backspace(Handle, ref iter, interactive, default_editable); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern unsafe bool gtk_text_buffer_deserialize(IntPtr raw, IntPtr content_buffer, IntPtr format, IntPtr iter, byte[] data, UIntPtr length, out IntPtr error); | |
+ static extern unsafe bool gtk_text_buffer_deserialize(IntPtr raw, IntPtr content_buffer, IntPtr format, ref Gtk.TextIter iter, byte[] data, UIntPtr length, out IntPtr error); | |
public unsafe bool Deserialize(Gtk.TextBuffer content_buffer, Gdk.Atom format, ref Gtk.TextIter iter, byte[] data, ulong length) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
IntPtr error = IntPtr.Zero; | |
- bool raw_ret = gtk_text_buffer_deserialize(Handle, content_buffer == null ? IntPtr.Zero : content_buffer.Handle, format == null ? IntPtr.Zero : format.Handle, native_iter, data, new UIntPtr (length), out error); | |
+ bool raw_ret = gtk_text_buffer_deserialize(Handle, content_buffer == null ? IntPtr.Zero : content_buffer.Handle, format == null ? IntPtr.Zero : format.Handle, ref iter, data, new UIntPtr (length), out error); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
if (error != IntPtr.Zero) throw new GLib.GException (error); | |
return ret; | |
} | |
@@ -802,47 +787,41 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_select_range(IntPtr raw, IntPtr ins, IntPtr bound); | |
+ static extern void gtk_text_buffer_select_range(IntPtr raw, ref Gtk.TextIter ins, ref Gtk.TextIter bound); | |
public void SelectRange(Gtk.TextIter ins, Gtk.TextIter bound) { | |
- IntPtr native_ins = GLib.Marshaller.StructureToPtrAlloc (ins); | |
- IntPtr native_bound = GLib.Marshaller.StructureToPtrAlloc (bound); | |
- gtk_text_buffer_select_range(Handle, native_ins, native_bound); | |
- Marshal.FreeHGlobal (native_ins); | |
- Marshal.FreeHGlobal (native_bound); | |
+ gtk_text_buffer_select_range(Handle, ref ins, ref bound); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_apply_tag(IntPtr raw, IntPtr tag, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_apply_tag(IntPtr raw, IntPtr tag, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void ApplyTag(Gtk.TextTag tag, Gtk.TextIter start, Gtk.TextIter end) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_apply_tag(Handle, tag == null ? IntPtr.Zero : tag.Handle, native_start, native_end); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtk_text_buffer_apply_tag(Handle, tag == null ? IntPtr.Zero : tag.Handle, ref start, ref end); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_buffer_create_child_anchor(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_text_buffer_create_child_anchor(IntPtr raw, ref Gtk.TextIter iter); | |
public Gtk.TextChildAnchor CreateChildAnchor(ref Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_text_buffer_create_child_anchor(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_text_buffer_create_child_anchor(Handle, ref iter); | |
Gtk.TextChildAnchor ret = GLib.Object.GetObject(raw_ret) as Gtk.TextChildAnchor; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_insert_child_anchor(IntPtr raw, IntPtr iter, IntPtr anchor); | |
+ static extern void gtk_text_buffer_insert_child_anchor(IntPtr raw, ref Gtk.TextIter iter, IntPtr anchor); | |
public void InsertChildAnchor(ref Gtk.TextIter iter, Gtk.TextChildAnchor anchor) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_text_buffer_insert_child_anchor(Handle, native_iter, anchor == null ? IntPtr.Zero : anchor.Handle); | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_text_buffer_insert_child_anchor(Handle, ref iter, anchor == null ? IntPtr.Zero : anchor.Handle); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -872,12 +851,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_add_mark(IntPtr raw, IntPtr mark, IntPtr wh3r3); | |
+ static extern void gtk_text_buffer_add_mark(IntPtr raw, IntPtr mark, ref Gtk.TextIter wh3r3); | |
public void AddMark(Gtk.TextMark mark, Gtk.TextIter wh3r3) { | |
- IntPtr native_wh3r3 = GLib.Marshaller.StructureToPtrAlloc (wh3r3); | |
- gtk_text_buffer_add_mark(Handle, mark == null ? IntPtr.Zero : mark.Handle, native_wh3r3); | |
- Marshal.FreeHGlobal (native_wh3r3); | |
+ gtk_text_buffer_add_mark(Handle, mark == null ? IntPtr.Zero : mark.Handle, ref wh3r3); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -888,22 +866,20 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_paste_clipboard(IntPtr raw, IntPtr clipboard, IntPtr override_location, bool default_editable); | |
+ static extern void gtk_text_buffer_paste_clipboard(IntPtr raw, IntPtr clipboard, ref Gtk.TextIter override_location, bool default_editable); | |
public void PasteClipboard(Gtk.Clipboard clipboard, ref Gtk.TextIter override_location, bool default_editable) { | |
- IntPtr native_override_location = GLib.Marshaller.StructureToPtrAlloc (override_location); | |
- gtk_text_buffer_paste_clipboard(Handle, clipboard == null ? IntPtr.Zero : clipboard.Handle, native_override_location, default_editable); | |
- override_location = Gtk.TextIter.New (native_override_location); | |
- Marshal.FreeHGlobal (native_override_location); | |
+ gtk_text_buffer_paste_clipboard(Handle, clipboard == null ? IntPtr.Zero : clipboard.Handle, ref override_location, default_editable); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_place_cursor(IntPtr raw, IntPtr wh3r3); | |
+ static extern void gtk_text_buffer_place_cursor(IntPtr raw, ref Gtk.TextIter wh3r3); | |
public void PlaceCursor(Gtk.TextIter wh3r3) { | |
- IntPtr native_wh3r3 = GLib.Marshaller.StructureToPtrAlloc (wh3r3); | |
- gtk_text_buffer_place_cursor(Handle, native_wh3r3); | |
- Marshal.FreeHGlobal (native_wh3r3); | |
+ gtk_text_buffer_place_cursor(Handle, ref wh3r3); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -914,12 +890,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_move_mark(IntPtr raw, IntPtr mark, IntPtr wh3r3); | |
+ static extern void gtk_text_buffer_move_mark(IntPtr raw, IntPtr mark, ref Gtk.TextIter wh3r3); | |
public void MoveMark(Gtk.TextMark mark, Gtk.TextIter wh3r3) { | |
- IntPtr native_wh3r3 = GLib.Marshaller.StructureToPtrAlloc (wh3r3); | |
- gtk_text_buffer_move_mark(Handle, mark == null ? IntPtr.Zero : mark.Handle, native_wh3r3); | |
- Marshal.FreeHGlobal (native_wh3r3); | |
+ gtk_text_buffer_move_mark(Handle, mark == null ? IntPtr.Zero : mark.Handle, ref wh3r3); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -978,43 +953,36 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_insert_range(IntPtr raw, IntPtr iter, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_insert_range(IntPtr raw, ref Gtk.TextIter iter, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void InsertRange(ref Gtk.TextIter iter, Gtk.TextIter start, Gtk.TextIter end) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_insert_range(Handle, native_iter, native_start, native_end); | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtk_text_buffer_insert_range(Handle, ref iter, ref start, ref end); | |
+ | |
+ | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_apply_tag_by_name(IntPtr raw, IntPtr name, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_apply_tag_by_name(IntPtr raw, IntPtr name, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void ApplyTag(string name, Gtk.TextIter start, Gtk.TextIter end) { | |
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_apply_tag_by_name(Handle, native_name, native_start, native_end); | |
+ gtk_text_buffer_apply_tag_by_name(Handle, native_name, ref start, ref end); | |
GLib.Marshaller.Free (native_name); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_delete(IntPtr raw, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_delete(IntPtr raw, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void Delete(ref Gtk.TextIter start, ref Gtk.TextIter end) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_delete(Handle, native_start, native_end); | |
- start = Gtk.TextIter.New (native_start); | |
- Marshal.FreeHGlobal (native_start); | |
- end = Gtk.TextIter.New (native_end); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtk_text_buffer_delete(Handle, ref start, ref end); | |
+ | |
+ | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -1076,16 +1044,14 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_remove_tag_by_name(IntPtr raw, IntPtr name, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_remove_tag_by_name(IntPtr raw, IntPtr name, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void RemoveTag(string name, Gtk.TextIter start, Gtk.TextIter end) { | |
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_remove_tag_by_name(Handle, native_name, native_start, native_end); | |
+ gtk_text_buffer_remove_tag_by_name(Handle, native_name, ref start, ref end); | |
GLib.Marshaller.Free (native_name); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -1101,29 +1067,25 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_buffer_delete_interactive(IntPtr raw, IntPtr start_iter, IntPtr end_iter, bool default_editable); | |
+ static extern bool gtk_text_buffer_delete_interactive(IntPtr raw, ref Gtk.TextIter start_iter, ref Gtk.TextIter end_iter, bool default_editable); | |
public bool DeleteInteractive(ref Gtk.TextIter start_iter, ref Gtk.TextIter end_iter, bool default_editable) { | |
- IntPtr native_start_iter = GLib.Marshaller.StructureToPtrAlloc (start_iter); | |
- IntPtr native_end_iter = GLib.Marshaller.StructureToPtrAlloc (end_iter); | |
- bool raw_ret = gtk_text_buffer_delete_interactive(Handle, native_start_iter, native_end_iter, default_editable); | |
+ bool raw_ret = gtk_text_buffer_delete_interactive(Handle, ref start_iter, ref end_iter, default_editable); | |
bool ret = raw_ret; | |
- start_iter = Gtk.TextIter.New (native_start_iter); | |
- Marshal.FreeHGlobal (native_start_iter); | |
- end_iter = Gtk.TextIter.New (native_end_iter); | |
- Marshal.FreeHGlobal (native_end_iter); | |
+ | |
+ | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_remove_tag(IntPtr raw, IntPtr tag, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_remove_tag(IntPtr raw, IntPtr tag, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void RemoveTag(Gtk.TextTag tag, Gtk.TextIter start, Gtk.TextIter end) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_remove_tag(Handle, tag == null ? IntPtr.Zero : tag.Handle, native_start, native_end); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtk_text_buffer_remove_tag(Handle, tag == null ? IntPtr.Zero : tag.Handle, ref start, ref end); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -1149,14 +1111,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_remove_all_tags(IntPtr raw, IntPtr start, IntPtr end); | |
+ static extern void gtk_text_buffer_remove_all_tags(IntPtr raw, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public void RemoveAllTags(Gtk.TextIter start, Gtk.TextIter end) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- gtk_text_buffer_remove_all_tags(Handle, native_start, native_end); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ gtk_text_buffer_remove_all_tags(Handle, ref start, ref end); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -1172,15 +1132,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_buffer_get_slice(IntPtr raw, IntPtr start, IntPtr end, bool include_hidden_chars); | |
+ static extern IntPtr gtk_text_buffer_get_slice(IntPtr raw, ref Gtk.TextIter start, ref Gtk.TextIter end, bool include_hidden_chars); | |
public string GetSlice(Gtk.TextIter start, Gtk.TextIter end, bool include_hidden_chars) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_buffer_get_slice(Handle, native_start, native_end, include_hidden_chars); | |
+ IntPtr raw_ret = gtk_text_buffer_get_slice(Handle, ref start, ref end, include_hidden_chars); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
return ret; | |
} | |
@@ -1203,15 +1161,14 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_buffer_create_mark(IntPtr raw, IntPtr mark_name, IntPtr wh3r3, bool left_gravity); | |
+ static extern IntPtr gtk_text_buffer_create_mark(IntPtr raw, IntPtr mark_name, ref Gtk.TextIter wh3r3, bool left_gravity); | |
public Gtk.TextMark CreateMark(string mark_name, Gtk.TextIter wh3r3, bool left_gravity) { | |
IntPtr native_mark_name = GLib.Marshaller.StringToPtrGStrdup (mark_name); | |
- IntPtr native_wh3r3 = GLib.Marshaller.StructureToPtrAlloc (wh3r3); | |
- IntPtr raw_ret = gtk_text_buffer_create_mark(Handle, native_mark_name, native_wh3r3, left_gravity); | |
+ IntPtr raw_ret = gtk_text_buffer_create_mark(Handle, native_mark_name, ref wh3r3, left_gravity); | |
Gtk.TextMark ret = GLib.Object.GetObject(raw_ret) as Gtk.TextMark; | |
GLib.Marshaller.Free (native_mark_name); | |
- Marshal.FreeHGlobal (native_wh3r3); | |
+ | |
return ret; | |
} | |
@@ -1223,26 +1180,23 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_move_mark_by_name(IntPtr raw, IntPtr name, IntPtr wh3r3); | |
+ static extern void gtk_text_buffer_move_mark_by_name(IntPtr raw, IntPtr name, ref Gtk.TextIter wh3r3); | |
public void MoveMark(string name, Gtk.TextIter wh3r3) { | |
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); | |
- IntPtr native_wh3r3 = GLib.Marshaller.StructureToPtrAlloc (wh3r3); | |
- gtk_text_buffer_move_mark_by_name(Handle, native_name, native_wh3r3); | |
+ gtk_text_buffer_move_mark_by_name(Handle, native_name, ref wh3r3); | |
GLib.Marshaller.Free (native_name); | |
- Marshal.FreeHGlobal (native_wh3r3); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_buffer_get_text(IntPtr raw, IntPtr start, IntPtr end, bool include_hidden_chars); | |
+ static extern IntPtr gtk_text_buffer_get_text(IntPtr raw, ref Gtk.TextIter start, ref Gtk.TextIter end, bool include_hidden_chars); | |
public string GetText(Gtk.TextIter start, Gtk.TextIter end, bool include_hidden_chars) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_buffer_get_text(Handle, native_start, native_end, include_hidden_chars); | |
+ IntPtr raw_ret = gtk_text_buffer_get_text(Handle, ref start, ref end, include_hidden_chars); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
return ret; | |
} | |
@@ -1267,13 +1221,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_buffer_insert_pixbuf(IntPtr raw, IntPtr iter, IntPtr pixbuf); | |
+ static extern void gtk_text_buffer_insert_pixbuf(IntPtr raw, ref Gtk.TextIter iter, IntPtr pixbuf); | |
public void InsertPixbuf(ref Gtk.TextIter iter, Gdk.Pixbuf pixbuf) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_text_buffer_insert_pixbuf(Handle, native_iter, pixbuf == null ? IntPtr.Zero : pixbuf.Handle); | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_text_buffer_insert_pixbuf(Handle, ref iter, pixbuf == null ? IntPtr.Zero : pixbuf.Handle); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -1356,10 +1309,13 @@ public void Delete (TextIter start, TextIter end ) | |
Delete (ref start, ref end); | |
} | |
+[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_text_buffer_paste_clipboard", CallingConvention = CallingConvention.Cdecl)] | |
+static extern void gtk_text_buffer_paste_clipboard_ptr(IntPtr raw, IntPtr clipboard, IntPtr override_location, bool default_editable); | |
+ | |
// overload to paste clipboard contents at cursor editable by default. | |
public void PasteClipboard (Gtk.Clipboard clipboard) | |
{ | |
- gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); | |
+ gtk_text_buffer_paste_clipboard_ptr(Handle, clipboard.Handle, IntPtr.Zero, true); | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention=CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/TextIter.cs a/gtk/generated/TextIter.cs | |
index 72c1af4..7f2893e 100644 | |
--- b/gtk/generated/TextIter.cs | |
+++ a/gtk/generated/TextIter.cs | |
@@ -117,13 +117,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_iter_get_text(ref Gtk.TextIter raw, IntPtr end); | |
+ static extern IntPtr gtk_text_iter_get_text(ref Gtk.TextIter raw, ref Gtk.TextIter end); | |
public string GetText(Gtk.TextIter end) { | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_iter_get_text(ref this, native_end); | |
+ IntPtr raw_ret = gtk_text_iter_get_text(ref this, ref end); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
return ret; | |
} | |
@@ -192,13 +191,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_iter_get_visible_text(ref Gtk.TextIter raw, IntPtr end); | |
+ static extern IntPtr gtk_text_iter_get_visible_text(ref Gtk.TextIter raw, ref Gtk.TextIter end); | |
public string GetVisibleText(Gtk.TextIter end) { | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_iter_get_visible_text(ref this, native_end); | |
+ IntPtr raw_ret = gtk_text_iter_get_visible_text(ref this, ref end); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
return ret; | |
} | |
@@ -347,14 +345,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_forward_find_char(ref Gtk.TextIter raw, GtkSharp.TextCharPredicateNative pred, IntPtr user_data, IntPtr limit); | |
+ static extern bool gtk_text_iter_forward_find_char(ref Gtk.TextIter raw, GtkSharp.TextCharPredicateNative pred, IntPtr user_data, ref Gtk.TextIter limit); | |
public bool ForwardFindChar(Gtk.TextCharPredicate pred, Gtk.TextIter limit) { | |
GtkSharp.TextCharPredicateWrapper pred_wrapper = new GtkSharp.TextCharPredicateWrapper (pred); | |
- IntPtr native_limit = GLib.Marshaller.StructureToPtrAlloc (limit); | |
- bool raw_ret = gtk_text_iter_forward_find_char(ref this, pred_wrapper.NativeDelegate, IntPtr.Zero, native_limit); | |
+ bool raw_ret = gtk_text_iter_forward_find_char(ref this, pred_wrapper.NativeDelegate, IntPtr.Zero, ref limit); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_limit); | |
+ | |
return ret; | |
} | |
@@ -386,13 +383,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_iter_get_slice(ref Gtk.TextIter raw, IntPtr end); | |
+ static extern IntPtr gtk_text_iter_get_slice(ref Gtk.TextIter raw, ref Gtk.TextIter end); | |
public string GetSlice(Gtk.TextIter end) { | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_iter_get_slice(ref this, native_end); | |
+ IntPtr raw_ret = gtk_text_iter_get_slice(ref this, ref end); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
return ret; | |
} | |
@@ -417,14 +413,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_backward_find_char(ref Gtk.TextIter raw, GtkSharp.TextCharPredicateNative pred, IntPtr user_data, IntPtr limit); | |
+ static extern bool gtk_text_iter_backward_find_char(ref Gtk.TextIter raw, GtkSharp.TextCharPredicateNative pred, IntPtr user_data, ref Gtk.TextIter limit); | |
public bool BackwardFindChar(Gtk.TextCharPredicate pred, Gtk.TextIter limit) { | |
GtkSharp.TextCharPredicateWrapper pred_wrapper = new GtkSharp.TextCharPredicateWrapper (pred); | |
- IntPtr native_limit = GLib.Marshaller.StructureToPtrAlloc (limit); | |
- bool raw_ret = gtk_text_iter_backward_find_char(ref this, pred_wrapper.NativeDelegate, IntPtr.Zero, native_limit); | |
+ bool raw_ret = gtk_text_iter_backward_find_char(ref this, pred_wrapper.NativeDelegate, IntPtr.Zero, ref limit); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_limit); | |
+ | |
return ret; | |
} | |
@@ -460,12 +455,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_iter_order(ref Gtk.TextIter raw, IntPtr second); | |
+ static extern void gtk_text_iter_order(ref Gtk.TextIter raw, ref Gtk.TextIter second); | |
public void Order(Gtk.TextIter second) { | |
- IntPtr native_second = GLib.Marshaller.StructureToPtrAlloc (second); | |
- gtk_text_iter_order(ref this, native_second); | |
- Marshal.FreeHGlobal (native_second); | |
+ gtk_text_iter_order(ref this, ref second); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -576,13 +570,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_text_iter_get_visible_slice(ref Gtk.TextIter raw, IntPtr end); | |
+ static extern IntPtr gtk_text_iter_get_visible_slice(ref Gtk.TextIter raw, ref Gtk.TextIter end); | |
public string GetVisibleSlice(Gtk.TextIter end) { | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- IntPtr raw_ret = gtk_text_iter_get_visible_slice(ref this, native_end); | |
+ IntPtr raw_ret = gtk_text_iter_get_visible_slice(ref this, ref end); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
return ret; | |
} | |
@@ -596,15 +589,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_in_range(ref Gtk.TextIter raw, IntPtr start, IntPtr end); | |
+ static extern bool gtk_text_iter_in_range(ref Gtk.TextIter raw, ref Gtk.TextIter start, ref Gtk.TextIter end); | |
public bool InRange(Gtk.TextIter start, Gtk.TextIter end) { | |
- IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start); | |
- IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end); | |
- bool raw_ret = gtk_text_iter_in_range(ref this, native_start, native_end); | |
+ bool raw_ret = gtk_text_iter_in_range(ref this, ref start, ref end); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_start); | |
- Marshal.FreeHGlobal (native_end); | |
+ | |
+ | |
return ret; | |
} | |
@@ -627,32 +618,30 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_backward_search(ref Gtk.TextIter raw, IntPtr str, int flags, IntPtr match_start, IntPtr match_end, IntPtr limit); | |
+ static extern bool gtk_text_iter_backward_search(ref Gtk.TextIter raw, IntPtr str, int flags, IntPtr match_start, IntPtr match_end, ref Gtk.TextIter limit); | |
public bool BackwardSearch(string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, Gtk.TextIter limit) { | |
IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); | |
IntPtr native_match_start = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TextIter))); | |
IntPtr native_match_end = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TextIter))); | |
- IntPtr native_limit = GLib.Marshaller.StructureToPtrAlloc (limit); | |
- bool raw_ret = gtk_text_iter_backward_search(ref this, native_str, (int) flags, native_match_start, native_match_end, native_limit); | |
+ bool raw_ret = gtk_text_iter_backward_search(ref this, native_str, (int) flags, native_match_start, native_match_end, ref limit); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_str); | |
match_start = Gtk.TextIter.New (native_match_start); | |
Marshal.FreeHGlobal (native_match_start); | |
match_end = Gtk.TextIter.New (native_match_end); | |
Marshal.FreeHGlobal (native_match_end); | |
- Marshal.FreeHGlobal (native_limit); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_equal(ref Gtk.TextIter raw, IntPtr rhs); | |
+ static extern bool gtk_text_iter_equal(ref Gtk.TextIter raw, ref Gtk.TextIter rhs); | |
public bool Equal(Gtk.TextIter rhs) { | |
- IntPtr native_rhs = GLib.Marshaller.StructureToPtrAlloc (rhs); | |
- bool raw_ret = gtk_text_iter_equal(ref this, native_rhs); | |
+ bool raw_ret = gtk_text_iter_equal(ref this, ref rhs); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_rhs); | |
+ | |
return ret; | |
} | |
@@ -668,13 +657,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_text_iter_compare(ref Gtk.TextIter raw, IntPtr rhs); | |
+ static extern int gtk_text_iter_compare(ref Gtk.TextIter raw, ref Gtk.TextIter rhs); | |
public int Compare(Gtk.TextIter rhs) { | |
- IntPtr native_rhs = GLib.Marshaller.StructureToPtrAlloc (rhs); | |
- int raw_ret = gtk_text_iter_compare(ref this, native_rhs); | |
+ int raw_ret = gtk_text_iter_compare(ref this, ref rhs); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_rhs); | |
+ | |
return ret; | |
} | |
@@ -790,21 +778,20 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_iter_forward_search(ref Gtk.TextIter raw, IntPtr str, int flags, IntPtr match_start, IntPtr match_end, IntPtr limit); | |
+ static extern bool gtk_text_iter_forward_search(ref Gtk.TextIter raw, IntPtr str, int flags, IntPtr match_start, IntPtr match_end, ref Gtk.TextIter limit); | |
public bool ForwardSearch(string str, Gtk.TextSearchFlags flags, out Gtk.TextIter match_start, out Gtk.TextIter match_end, Gtk.TextIter limit) { | |
IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); | |
IntPtr native_match_start = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TextIter))); | |
IntPtr native_match_end = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TextIter))); | |
- IntPtr native_limit = GLib.Marshaller.StructureToPtrAlloc (limit); | |
- bool raw_ret = gtk_text_iter_forward_search(ref this, native_str, (int) flags, native_match_start, native_match_end, native_limit); | |
+ bool raw_ret = gtk_text_iter_forward_search(ref this, native_str, (int) flags, native_match_start, native_match_end, ref limit); | |
bool ret = raw_ret; | |
GLib.Marshaller.Free (native_str); | |
match_start = Gtk.TextIter.New (native_match_start); | |
Marshal.FreeHGlobal (native_match_start); | |
match_end = Gtk.TextIter.New (native_match_end); | |
Marshal.FreeHGlobal (native_match_end); | |
- Marshal.FreeHGlobal (native_limit); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/TextTag.cs a/gtk/generated/TextTag.cs | |
index f07402a..17ac2c8 100644 | |
--- b/gtk/generated/TextTag.cs | |
+++ a/gtk/generated/TextTag.cs | |
@@ -973,18 +973,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool TextEventVMDelegate (IntPtr tag, IntPtr event_object, IntPtr evnt, IntPtr iter); | |
+ delegate bool TextEventVMDelegate (IntPtr tag, IntPtr event_object, IntPtr evnt, ref Gtk.TextIter iter); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_texttag_override_event (IntPtr gtype, TextEventVMDelegate cb); | |
static TextEventVMDelegate TextEventVMCallback; | |
- static bool textevent_cb (IntPtr tag, IntPtr event_object, IntPtr evnt, IntPtr iter) | |
+ static bool textevent_cb (IntPtr tag, IntPtr event_object, IntPtr evnt, ref Gtk.TextIter iter) | |
{ | |
try { | |
TextTag tag_managed = GLib.Object.GetObject (tag, false) as TextTag; | |
- return tag_managed.OnTextEvent (GLib.Object.GetObject (event_object), Gdk.Event.GetEvent (evnt), Gtk.TextIter.New (iter)); | |
+ return tag_managed.OnTextEvent (GLib.Object.GetObject (event_object), Gdk.Event.GetEvent (evnt), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
// NOTREACHED: above call doesn't return | |
@@ -1000,14 +1000,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtksharp_texttag_base_event (IntPtr tag, IntPtr event_object, IntPtr evnt, IntPtr iter); | |
+ static extern bool gtksharp_texttag_base_event (IntPtr tag, IntPtr event_object, IntPtr evnt, ref Gtk.TextIter iter); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TextTag), ConnectionMethod="OverrideTextEvent")] | |
protected virtual bool OnTextEvent (GLib.Object event_object, Gdk.Event evnt, Gtk.TextIter iter) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool __ret = gtksharp_texttag_base_event (Handle, event_object == null ? IntPtr.Zero : event_object.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool __ret = gtksharp_texttag_base_event (Handle, event_object == null ? IntPtr.Zero : event_object.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, ref iter); | |
+ | |
return __ret; | |
} | |
@@ -1024,13 +1023,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_tag_event(IntPtr raw, IntPtr event_object, IntPtr evnt, IntPtr iter); | |
+ static extern bool gtk_text_tag_event(IntPtr raw, IntPtr event_object, IntPtr evnt, ref Gtk.TextIter iter); | |
public bool ProcessEvent(GLib.Object event_object, Gdk.Event evnt, Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_tag_event(Handle, event_object == null ? IntPtr.Zero : event_object.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, native_iter); | |
+ bool raw_ret = gtk_text_tag_event(Handle, event_object == null ? IntPtr.Zero : event_object.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
diff --git b/gtk/generated/TextView.cs a/gtk/generated/TextView.cs | |
index 3dbcc9b..82b08b1 100644 | |
--- b/gtk/generated/TextView.cs | |
+++ a/gtk/generated/TextView.cs | |
@@ -834,13 +834,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_scroll_to_iter(IntPtr raw, IntPtr iter, double within_margin, bool use_align, double xalign, double yalign); | |
+ static extern bool gtk_text_view_scroll_to_iter(IntPtr raw, ref Gtk.TextIter iter, double within_margin, bool use_align, double xalign, double yalign); | |
public bool ScrollToIter(Gtk.TextIter iter, double within_margin, bool use_align, double xalign, double yalign) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_scroll_to_iter(Handle, native_iter, within_margin, use_align, xalign, yalign); | |
+ bool raw_ret = gtk_text_view_scroll_to_iter(Handle, ref iter, within_margin, use_align, xalign, yalign); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -852,14 +851,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_backward_display_line(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_text_view_backward_display_line(IntPtr raw, ref Gtk.TextIter iter); | |
public bool BackwardDisplayLine(ref Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_backward_display_line(Handle, native_iter); | |
+ bool raw_ret = gtk_text_view_backward_display_line(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -873,13 +871,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_starts_display_line(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_text_view_starts_display_line(IntPtr raw, ref Gtk.TextIter iter); | |
public bool StartsDisplayLine(Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_starts_display_line(Handle, native_iter); | |
+ bool raw_ret = gtk_text_view_starts_display_line(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -898,12 +895,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_view_get_line_yrange(IntPtr raw, IntPtr iter, out int y, out int height); | |
+ static extern void gtk_text_view_get_line_yrange(IntPtr raw, ref Gtk.TextIter iter, out int y, out int height); | |
public void GetLineYrange(Gtk.TextIter iter, out int y, out int height) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_text_view_get_line_yrange(Handle, native_iter, out y, out height); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_text_view_get_line_yrange(Handle, ref iter, out y, out height); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -914,14 +910,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_view_get_iter_location(IntPtr raw, IntPtr iter, IntPtr location); | |
+ static extern void gtk_text_view_get_iter_location(IntPtr raw, ref Gtk.TextIter iter, IntPtr location); | |
public Gdk.Rectangle GetIterLocation(Gtk.TextIter iter) { | |
Gdk.Rectangle location; | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
IntPtr native_location = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gdk.Rectangle))); | |
- gtk_text_view_get_iter_location(Handle, native_iter, native_location); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_text_view_get_iter_location(Handle, ref iter, native_location); | |
+ | |
location = Gdk.Rectangle.New (native_location); | |
Marshal.FreeHGlobal (native_location); | |
return location; | |
@@ -946,14 +941,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_forward_display_line_end(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_text_view_forward_display_line_end(IntPtr raw, ref Gtk.TextIter iter); | |
public bool ForwardDisplayLineEnd(ref Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_forward_display_line_end(Handle, native_iter); | |
+ bool raw_ret = gtk_text_view_forward_display_line_end(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -984,14 +978,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_backward_display_line_start(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_text_view_backward_display_line_start(IntPtr raw, ref Gtk.TextIter iter); | |
public bool BackwardDisplayLineStart(ref Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_backward_display_line_start(Handle, native_iter); | |
+ bool raw_ret = gtk_text_view_backward_display_line_start(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -1049,14 +1042,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_move_visually(IntPtr raw, IntPtr iter, int count); | |
+ static extern bool gtk_text_view_move_visually(IntPtr raw, ref Gtk.TextIter iter, int count); | |
public bool MoveVisually(ref Gtk.TextIter iter, int count) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_move_visually(Handle, native_iter, count); | |
+ bool raw_ret = gtk_text_view_move_visually(Handle, ref iter, count); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -1071,25 +1063,23 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_text_view_forward_display_line(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_text_view_forward_display_line(IntPtr raw, ref Gtk.TextIter iter); | |
public bool ForwardDisplayLine(ref Gtk.TextIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_text_view_forward_display_line(Handle, native_iter); | |
+ bool raw_ret = gtk_text_view_forward_display_line(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TextIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_text_view_get_iter_at_position(IntPtr raw, IntPtr iter, out int trailing, int x, int y); | |
+ static extern void gtk_text_view_get_iter_at_position(IntPtr raw, ref Gtk.TextIter iter, out int trailing, int x, int y); | |
public int GetIterAtPosition(Gtk.TextIter iter, int x, int y) { | |
int trailing; | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_text_view_get_iter_at_position(Handle, native_iter, out trailing, x, y); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_text_view_get_iter_at_position(Handle, ref iter, out trailing, x, y); | |
+ | |
return trailing; | |
} | |
diff --git b/gtk/generated/Tooltip.cs a/gtk/generated/Tooltip.cs | |
index aaf2b8b..bdfeecb 100644 | |
--- b/gtk/generated/Tooltip.cs | |
+++ a/gtk/generated/Tooltip.cs | |
@@ -76,13 +76,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tooltip_set_tip_area(IntPtr raw, IntPtr value); | |
+ static extern void gtk_tooltip_set_tip_area(IntPtr raw, ref Gdk.Rectangle value); | |
public Gdk.Rectangle TipArea { | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- gtk_tooltip_set_tip_area(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ gtk_tooltip_set_tip_area(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/gtk/generated/TreeModelAdapter.cs a/gtk/generated/TreeModelAdapter.cs | |
index fa40fd8..08b7af3 100644 | |
--- b/gtk/generated/TreeModelAdapter.cs | |
+++ a/gtk/generated/TreeModelAdapter.cs | |
@@ -123,13 +123,13 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate IntPtr GetPathDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate IntPtr GetPathDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static IntPtr GetPathCallback (IntPtr tree_model, IntPtr iter) | |
+ static IntPtr GetPathCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- Gtk.TreePath __result = __obj.GetPath (Gtk.TreeIter.New (iter)); | |
+ Gtk.TreePath __result = __obj.GetPath (iter); | |
return __result == null ? IntPtr.Zero : __result.OwnedCopy; | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
@@ -139,28 +139,27 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void GetValueDelegate (IntPtr tree_model, IntPtr iter, int column, ref GLib.Value value); | |
+ delegate void GetValueDelegate (IntPtr tree_model, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
- static void GetValueCallback (IntPtr tree_model, IntPtr iter, int column, ref GLib.Value value) | |
+ static void GetValueCallback (IntPtr tree_model, ref Gtk.TreeIter iter, int column, ref GLib.Value value) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- __obj.GetValue (Gtk.TreeIter.New (iter), column, ref value); | |
+ __obj.GetValue (iter, column, ref value); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool IterNextDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate bool IterNextDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static bool IterNextCallback (IntPtr tree_model, IntPtr iter) | |
+ static bool IterNextCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- Gtk.TreeIter myiter = Gtk.TreeIter.New (iter); | |
+ Gtk.TreeIter myiter = iter; | |
bool __result = __obj.IterNext (ref myiter); | |
- if (iter != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (myiter, iter, false); | |
return __result; | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
@@ -170,14 +169,14 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool IterChildrenDelegate (IntPtr tree_model, IntPtr iter, IntPtr parent); | |
+ delegate bool IterChildrenDelegate (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter parent); | |
- static bool IterChildrenCallback (IntPtr tree_model, IntPtr iter, IntPtr parent) | |
+ static bool IterChildrenCallback (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter parent) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
Gtk.TreeIter myiter; | |
- bool __result = __obj.IterChildren (out myiter, Gtk.TreeIter.New (parent)); | |
+ bool __result = __obj.IterChildren (out myiter, parent); | |
if (iter != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (myiter, iter, false); | |
return __result; | |
} catch (Exception e) { | |
@@ -188,13 +187,13 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool IterHasChildDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate bool IterHasChildDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static bool IterHasChildCallback (IntPtr tree_model, IntPtr iter) | |
+ static bool IterHasChildCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- bool __result = __obj.IterHasChild (Gtk.TreeIter.New (iter)); | |
+ bool __result = __obj.IterHasChild (iter); | |
return __result; | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
@@ -204,13 +203,13 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate int IterNChildrenDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate int IterNChildrenDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static int IterNChildrenCallback (IntPtr tree_model, IntPtr iter) | |
+ static int IterNChildrenCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- int __result = __obj.IterNChildren (Gtk.TreeIter.New (iter)); | |
+ int __result = __obj.IterNChildren (iter); | |
return __result; | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
@@ -220,14 +219,14 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool IterNthChildDelegate (IntPtr tree_model, IntPtr iter, IntPtr parent, int n); | |
+ delegate bool IterNthChildDelegate (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
- static bool IterNthChildCallback (IntPtr tree_model, IntPtr iter, IntPtr parent, int n) | |
+ static bool IterNthChildCallback (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter parent, int n) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
Gtk.TreeIter myiter; | |
- bool __result = __obj.IterNthChild (out myiter, Gtk.TreeIter.New (parent), n); | |
+ bool __result = __obj.IterNthChild (out myiter, parent, n); | |
if (iter != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (myiter, iter, false); | |
return __result; | |
} catch (Exception e) { | |
@@ -238,14 +237,14 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool IterParentDelegate (IntPtr tree_model, IntPtr iter, IntPtr child); | |
+ delegate bool IterParentDelegate (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter child); | |
- static bool IterParentCallback (IntPtr tree_model, IntPtr iter, IntPtr child) | |
+ static bool IterParentCallback (IntPtr tree_model, IntPtr iter, ref Gtk.TreeIter child) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
Gtk.TreeIter myiter; | |
- bool __result = __obj.IterParent (out myiter, Gtk.TreeIter.New (child)); | |
+ bool __result = __obj.IterParent (out myiter, child); | |
if (iter != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (myiter, iter, false); | |
return __result; | |
} catch (Exception e) { | |
@@ -256,26 +255,26 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RefNodeDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate void RefNodeDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static void RefNodeCallback (IntPtr tree_model, IntPtr iter) | |
+ static void RefNodeCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- __obj.RefNode (Gtk.TreeIter.New (iter)); | |
+ __obj.RefNode (iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void UnrefNodeDelegate (IntPtr tree_model, IntPtr iter); | |
+ delegate void UnrefNodeDelegate (IntPtr tree_model, ref Gtk.TreeIter iter); | |
- static void UnrefNodeCallback (IntPtr tree_model, IntPtr iter) | |
+ static void UnrefNodeCallback (IntPtr tree_model, ref Gtk.TreeIter iter) | |
{ | |
try { | |
Gtk.TreeModelImplementor __obj = GLib.Object.GetObject (tree_model, false) as Gtk.TreeModelImplementor; | |
- __obj.UnrefNode (Gtk.TreeIter.New (iter)); | |
+ __obj.UnrefNode (iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -433,56 +432,51 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_path(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_path(IntPtr raw, ref Gtk.TreeIter iter); | |
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_path(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_path(Handle, ref iter); | |
Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), true); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, IntPtr child); | |
+ static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, ref Gtk.TreeIter child); | |
public bool IterParent(out Gtk.TreeIter iter, Gtk.TreeIter child) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child = GLib.Marshaller.StructureToPtrAlloc (child); | |
- bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, native_child); | |
+ bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, ref child); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_child); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_ref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_ref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void RefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_ref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_ref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_model_get_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void GetValue(Gtk.TreeIter iter, int column, ref GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_model_iter_n_children(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_model_iter_n_children(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterNChildren(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_model_iter_n_children(Handle, native_iter); | |
+ int raw_ret = gtk_tree_model_iter_n_children(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -499,59 +493,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowChanged(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public string GetStringFromIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, ref iter); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_next(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_next(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterNext(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_next(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_next(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_has_child(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_has_child(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterHasChild(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_has_child(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_has_child(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, IntPtr parent); | |
+ static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent); | |
public bool IterChildren(out Gtk.TreeIter iter, Gtk.TreeIter parent) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, native_parent); | |
+ bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, ref parent); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
@@ -588,62 +577,56 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowHasChildToggled(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_model_get_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void GetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, IntPtr iter, int[] new_order); | |
+ static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter, int[] new_order); | |
public void EmitRowsReordered(Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, new_order); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowInserted(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, IntPtr parent, int n); | |
+ static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
public bool IterNthChild(out Gtk.TreeIter iter, Gtk.TreeIter parent, int n) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, native_parent, n); | |
+ bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, ref parent, n); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_unref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_unref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnrefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_unref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_unref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -699,8 +682,12 @@ namespace Gtk { | |
return ret; | |
} | |
- public int IterNChildren () { | |
- int raw_ret = gtk_tree_model_iter_n_children (Handle, IntPtr.Zero); | |
+ [DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_model_iter_n_children", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern int gtk_tree_model_iter_n_children_ptr(IntPtr raw, IntPtr iter); | |
+ | |
+ public int IterNChildren () | |
+ { | |
+ int raw_ret = gtk_tree_model_iter_n_children_ptr (Handle, IntPtr.Zero); | |
int ret = raw_ret; | |
return ret; | |
} | |
diff --git b/gtk/generated/TreeModelFilter.cs a/gtk/generated/TreeModelFilter.cs | |
index a7b0039..578404a 100644 | |
--- b/gtk/generated/TreeModelFilter.cs | |
+++ a/gtk/generated/TreeModelFilter.cs | |
@@ -59,16 +59,15 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_filter_convert_iter_to_child_iter(IntPtr raw, IntPtr child_iter, IntPtr filter_iter); | |
+ static extern void gtk_tree_model_filter_convert_iter_to_child_iter(IntPtr raw, IntPtr child_iter, ref Gtk.TreeIter filter_iter); | |
public Gtk.TreeIter ConvertIterToChildIter(Gtk.TreeIter filter_iter) { | |
Gtk.TreeIter child_iter; | |
IntPtr native_child_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_filter_iter = GLib.Marshaller.StructureToPtrAlloc (filter_iter); | |
- gtk_tree_model_filter_convert_iter_to_child_iter(Handle, native_child_iter, native_filter_iter); | |
+ gtk_tree_model_filter_convert_iter_to_child_iter(Handle, native_child_iter, ref filter_iter); | |
child_iter = Gtk.TreeIter.New (native_child_iter); | |
Marshal.FreeHGlobal (native_child_iter); | |
- Marshal.FreeHGlobal (native_filter_iter); | |
+ | |
return child_iter; | |
} | |
@@ -173,56 +172,51 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_path(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_path(IntPtr raw, ref Gtk.TreeIter iter); | |
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_path(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_path(Handle, ref iter); | |
Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), true); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, IntPtr child); | |
+ static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, ref Gtk.TreeIter child); | |
public bool IterParent(out Gtk.TreeIter iter, Gtk.TreeIter child) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child = GLib.Marshaller.StructureToPtrAlloc (child); | |
- bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, native_child); | |
+ bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, ref child); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_child); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_ref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_ref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void RefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_ref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_ref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_model_get_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void GetValue(Gtk.TreeIter iter, int column, ref GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_model_iter_n_children(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_model_iter_n_children(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterNChildren(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_model_iter_n_children(Handle, native_iter); | |
+ int raw_ret = gtk_tree_model_iter_n_children(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -239,59 +233,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowChanged(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public string GetStringFromIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, ref iter); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_next(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_next(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterNext(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_next(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_next(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_has_child(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_has_child(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterHasChild(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_has_child(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_has_child(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, IntPtr parent); | |
+ static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent); | |
public bool IterChildren(out Gtk.TreeIter iter, Gtk.TreeIter parent) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, native_parent); | |
+ bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, ref parent); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
@@ -328,62 +317,56 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowHasChildToggled(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_model_get_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void GetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, IntPtr iter, int[] new_order); | |
+ static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter, int[] new_order); | |
public void EmitRowsReordered(Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, new_order); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowInserted(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, IntPtr parent, int n); | |
+ static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
public bool IterNthChild(out Gtk.TreeIter iter, Gtk.TreeIter parent, int n) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, native_parent, n); | |
+ bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, ref parent, n); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_unref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_unref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnrefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_unref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_unref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -408,15 +391,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowChangedVMDelegate RowChangedVMCallback; | |
- static void rowchanged_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowchanged_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelFilter tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelFilter; | |
- tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -507,15 +490,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowInsertedVMDelegate RowInsertedVMCallback; | |
- static void rowinserted_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowinserted_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelFilter tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelFilter; | |
- tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -558,15 +541,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowHasChildToggledVMDelegate RowHasChildToggledVMCallback; | |
- static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelFilter tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelFilter; | |
- tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -646,8 +629,12 @@ namespace Gtk { | |
return ret; | |
} | |
- public int IterNChildren () { | |
- int raw_ret = gtk_tree_model_iter_n_children (Handle, IntPtr.Zero); | |
+ [DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_model_iter_n_children", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern int gtk_tree_model_iter_n_children_ptr(IntPtr raw, IntPtr iter); | |
+ | |
+ public int IterNChildren () | |
+ { | |
+ int raw_ret = gtk_tree_model_iter_n_children_ptr (Handle, IntPtr.Zero); | |
int ret = raw_ret; | |
return ret; | |
} | |
diff --git b/gtk/generated/TreeModelSort.cs a/gtk/generated/TreeModelSort.cs | |
index 0fe4747..43428e2 100644 | |
--- b/gtk/generated/TreeModelSort.cs | |
+++ a/gtk/generated/TreeModelSort.cs | |
@@ -47,30 +47,28 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_sort_convert_child_iter_to_iter(IntPtr raw, IntPtr sort_iter, IntPtr child_iter); | |
+ static extern void gtk_tree_model_sort_convert_child_iter_to_iter(IntPtr raw, IntPtr sort_iter, ref Gtk.TreeIter child_iter); | |
public Gtk.TreeIter ConvertChildIterToIter(Gtk.TreeIter child_iter) { | |
Gtk.TreeIter sort_iter; | |
IntPtr native_sort_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child_iter = GLib.Marshaller.StructureToPtrAlloc (child_iter); | |
- gtk_tree_model_sort_convert_child_iter_to_iter(Handle, native_sort_iter, native_child_iter); | |
+ gtk_tree_model_sort_convert_child_iter_to_iter(Handle, native_sort_iter, ref child_iter); | |
sort_iter = Gtk.TreeIter.New (native_sort_iter); | |
Marshal.FreeHGlobal (native_sort_iter); | |
- Marshal.FreeHGlobal (native_child_iter); | |
+ | |
return sort_iter; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_sort_convert_iter_to_child_iter(IntPtr raw, IntPtr child_iter, IntPtr sorted_iter); | |
+ static extern void gtk_tree_model_sort_convert_iter_to_child_iter(IntPtr raw, IntPtr child_iter, ref Gtk.TreeIter sorted_iter); | |
public Gtk.TreeIter ConvertIterToChildIter(Gtk.TreeIter sorted_iter) { | |
Gtk.TreeIter child_iter; | |
IntPtr native_child_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_sorted_iter = GLib.Marshaller.StructureToPtrAlloc (sorted_iter); | |
- gtk_tree_model_sort_convert_iter_to_child_iter(Handle, native_child_iter, native_sorted_iter); | |
+ gtk_tree_model_sort_convert_iter_to_child_iter(Handle, native_child_iter, ref sorted_iter); | |
child_iter = Gtk.TreeIter.New (native_child_iter); | |
Marshal.FreeHGlobal (native_child_iter); | |
- Marshal.FreeHGlobal (native_sorted_iter); | |
+ | |
return child_iter; | |
} | |
@@ -101,13 +99,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_sort_iter_is_valid(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_sort_iter_is_valid(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterIsValid(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_sort_iter_is_valid(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_sort_iter_is_valid(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -147,56 +144,51 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_path(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_path(IntPtr raw, ref Gtk.TreeIter iter); | |
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_path(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_path(Handle, ref iter); | |
Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), true); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, IntPtr child); | |
+ static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, ref Gtk.TreeIter child); | |
public bool IterParent(out Gtk.TreeIter iter, Gtk.TreeIter child) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child = GLib.Marshaller.StructureToPtrAlloc (child); | |
- bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, native_child); | |
+ bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, ref child); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_child); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_ref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_ref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void RefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_ref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_ref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_model_get_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void GetValue(Gtk.TreeIter iter, int column, ref GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_model_iter_n_children(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_model_iter_n_children(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterNChildren(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_model_iter_n_children(Handle, native_iter); | |
+ int raw_ret = gtk_tree_model_iter_n_children(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -213,59 +205,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowChanged(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public string GetStringFromIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, ref iter); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_next(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_next(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterNext(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_next(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_next(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_has_child(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_has_child(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterHasChild(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_has_child(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_has_child(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, IntPtr parent); | |
+ static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent); | |
public bool IterChildren(out Gtk.TreeIter iter, Gtk.TreeIter parent) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, native_parent); | |
+ bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, ref parent); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
@@ -302,62 +289,56 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowHasChildToggled(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_model_get_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void GetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, IntPtr iter, int[] new_order); | |
+ static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter, int[] new_order); | |
public void EmitRowsReordered(Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, new_order); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowInserted(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, IntPtr parent, int n); | |
+ static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
public bool IterNthChild(out Gtk.TreeIter iter, Gtk.TreeIter parent, int n) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, native_parent, n); | |
+ bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, ref parent, n); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_unref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_unref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnrefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_unref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_unref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -382,15 +363,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowChangedVMDelegate RowChangedVMCallback; | |
- static void rowchanged_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowchanged_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelSort tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelSort; | |
- tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -481,15 +462,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowInsertedVMDelegate RowInsertedVMCallback; | |
- static void rowinserted_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowinserted_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelSort tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelSort; | |
- tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -532,15 +513,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowHasChildToggledVMDelegate RowHasChildToggledVMCallback; | |
- static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeModelSort tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeModelSort; | |
- tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -760,8 +741,12 @@ namespace Gtk { | |
return ret; | |
} | |
- public int IterNChildren () { | |
- int raw_ret = gtk_tree_model_iter_n_children (Handle, IntPtr.Zero); | |
+ [DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_model_iter_n_children", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern int gtk_tree_model_iter_n_children_ptr(IntPtr raw, IntPtr iter); | |
+ | |
+ public int IterNChildren () | |
+ { | |
+ int raw_ret = gtk_tree_model_iter_n_children_ptr (Handle, IntPtr.Zero); | |
int ret = raw_ret; | |
return ret; | |
} | |
diff --git b/gtk/generated/TreeRowReference.cs a/gtk/generated/TreeRowReference.cs | |
index 5c636e1..e3658e7 100644 | |
--- b/gtk/generated/TreeRowReference.cs | |
+++ a/gtk/generated/TreeRowReference.cs | |
@@ -40,13 +40,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_row_reference_reordered(IntPtr proxy, IntPtr path, IntPtr iter, out int new_order); | |
+ static extern void gtk_tree_row_reference_reordered(IntPtr proxy, IntPtr path, ref Gtk.TreeIter iter, out int new_order); | |
public static int Reordered(GLib.Object proxy, Gtk.TreePath path, Gtk.TreeIter iter) { | |
int new_order; | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_row_reference_reordered(proxy == null ? IntPtr.Zero : proxy.Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, out new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_row_reference_reordered(proxy == null ? IntPtr.Zero : proxy.Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, out new_order); | |
+ | |
return new_order; | |
} | |
diff --git b/gtk/generated/TreeSelection.cs a/gtk/generated/TreeSelection.cs | |
index fe4f8ac..10c3856 100644 | |
--- b/gtk/generated/TreeSelection.cs | |
+++ a/gtk/generated/TreeSelection.cs | |
@@ -111,13 +111,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_selection_iter_is_selected(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_selection_iter_is_selected(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterIsSelected(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_selection_iter_is_selected(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_selection_iter_is_selected(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -196,12 +195,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_selection_select_iter(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_selection_select_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public void SelectIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_selection_select_iter(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_selection_select_iter(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -229,12 +227,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_selection_unselect_iter(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_selection_unselect_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnselectIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_selection_unselect_iter(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_selection_unselect_iter(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/TreeStore.cs a/gtk/generated/TreeStore.cs | |
index e4f438e..3152d7c 100644 | |
--- b/gtk/generated/TreeStore.cs | |
+++ a/gtk/generated/TreeStore.cs | |
@@ -21,65 +21,57 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_set_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_store_set_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void SetValue(Gtk.TreeIter iter, int column, GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_store_set_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_store_set_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_move_before(IntPtr raw, IntPtr iter, IntPtr position); | |
+ static extern void gtk_tree_store_move_before(IntPtr raw, ref Gtk.TreeIter iter, ref Gtk.TreeIter position); | |
public void MoveBefore(Gtk.TreeIter iter, Gtk.TreeIter position) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_position = GLib.Marshaller.StructureToPtrAlloc (position); | |
- gtk_tree_store_move_before(Handle, native_iter, native_position); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_position); | |
+ gtk_tree_store_move_before(Handle, ref iter, ref position); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_set_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_store_set_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void SetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_store_set_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_store_set_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_reorder(IntPtr raw, IntPtr parent, out int new_order); | |
+ static extern void gtk_tree_store_reorder(IntPtr raw, ref Gtk.TreeIter parent, out int new_order); | |
public int Reorder(Gtk.TreeIter parent) { | |
int new_order; | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- gtk_tree_store_reorder(Handle, native_parent, out new_order); | |
- Marshal.FreeHGlobal (native_parent); | |
+ gtk_tree_store_reorder(Handle, ref parent, out new_order); | |
+ | |
return new_order; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_move_after(IntPtr raw, IntPtr iter, IntPtr position); | |
+ static extern void gtk_tree_store_move_after(IntPtr raw, ref Gtk.TreeIter iter, ref Gtk.TreeIter position); | |
public void MoveAfter(Gtk.TreeIter iter, Gtk.TreeIter position) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_position = GLib.Marshaller.StructureToPtrAlloc (position); | |
- gtk_tree_store_move_after(Handle, native_iter, native_position); | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_position); | |
+ gtk_tree_store_move_after(Handle, ref iter, ref position); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_store_remove(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_store_remove(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool Remove(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_store_remove(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_store_remove(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
@@ -105,13 +97,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_store_iter_depth(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_store_iter_depth(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterDepth(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_store_iter_depth(Handle, native_iter); | |
+ int raw_ret = gtk_tree_store_iter_depth(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -126,37 +117,32 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_store_swap(IntPtr raw, IntPtr a, IntPtr b); | |
+ static extern void gtk_tree_store_swap(IntPtr raw, ref Gtk.TreeIter a, ref Gtk.TreeIter b); | |
public void Swap(Gtk.TreeIter a, Gtk.TreeIter b) { | |
- IntPtr native_a = GLib.Marshaller.StructureToPtrAlloc (a); | |
- IntPtr native_b = GLib.Marshaller.StructureToPtrAlloc (b); | |
- gtk_tree_store_swap(Handle, native_a, native_b); | |
- Marshal.FreeHGlobal (native_a); | |
- Marshal.FreeHGlobal (native_b); | |
+ gtk_tree_store_swap(Handle, ref a, ref b); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_store_iter_is_valid(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_store_iter_is_valid(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterIsValid(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_store_iter_is_valid(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_store_iter_is_valid(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_store_is_ancestor(IntPtr raw, IntPtr iter, IntPtr descendant); | |
+ static extern bool gtk_tree_store_is_ancestor(IntPtr raw, ref Gtk.TreeIter iter, ref Gtk.TreeIter descendant); | |
public bool IsAncestor(Gtk.TreeIter iter, Gtk.TreeIter descendant) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr native_descendant = GLib.Marshaller.StructureToPtrAlloc (descendant); | |
- bool raw_ret = gtk_tree_store_is_ancestor(Handle, native_iter, native_descendant); | |
+ bool raw_ret = gtk_tree_store_is_ancestor(Handle, ref iter, ref descendant); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_descendant); | |
+ | |
+ | |
return ret; | |
} | |
@@ -180,56 +166,51 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_path(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_path(IntPtr raw, ref Gtk.TreeIter iter); | |
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_path(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_path(Handle, ref iter); | |
Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), true); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, IntPtr child); | |
+ static extern bool gtk_tree_model_iter_parent(IntPtr raw, IntPtr iter, ref Gtk.TreeIter child); | |
public bool IterParent(out Gtk.TreeIter iter, Gtk.TreeIter child) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_child = GLib.Marshaller.StructureToPtrAlloc (child); | |
- bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, native_child); | |
+ bool raw_ret = gtk_tree_model_iter_parent(Handle, native_iter, ref child); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_child); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_ref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_ref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void RefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_ref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_ref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_value(IntPtr raw, IntPtr iter, int column, ref GLib.Value value); | |
+ static extern void gtk_tree_model_get_value(IntPtr raw, ref Gtk.TreeIter iter, int column, ref GLib.Value value); | |
public void GetValue(Gtk.TreeIter iter, int column, ref GLib.Value value) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_value(Handle, native_iter, column, ref value); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_value(Handle, ref iter, column, ref value); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int gtk_tree_model_iter_n_children(IntPtr raw, IntPtr iter); | |
+ static extern int gtk_tree_model_iter_n_children(IntPtr raw, ref Gtk.TreeIter iter); | |
public int IterNChildren(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- int raw_ret = gtk_tree_model_iter_n_children(Handle, native_iter); | |
+ int raw_ret = gtk_tree_model_iter_n_children(Handle, ref iter); | |
int ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
@@ -246,59 +227,54 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_changed(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowChanged(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_changed(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, IntPtr iter); | |
+ static extern IntPtr gtk_tree_model_get_string_from_iter(IntPtr raw, ref Gtk.TreeIter iter); | |
public string GetStringFromIter(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, native_iter); | |
+ IntPtr raw_ret = gtk_tree_model_get_string_from_iter(Handle, ref iter); | |
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_next(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_next(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterNext(ref Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_next(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_next(Handle, ref iter); | |
bool ret = raw_ret; | |
- iter = Gtk.TreeIter.New (native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_has_child(IntPtr raw, IntPtr iter); | |
+ static extern bool gtk_tree_model_iter_has_child(IntPtr raw, ref Gtk.TreeIter iter); | |
public bool IterHasChild(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool raw_ret = gtk_tree_model_iter_has_child(Handle, native_iter); | |
+ bool raw_ret = gtk_tree_model_iter_has_child(Handle, ref iter); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_iter); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, IntPtr parent); | |
+ static extern bool gtk_tree_model_iter_children(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent); | |
public bool IterChildren(out Gtk.TreeIter iter, Gtk.TreeIter parent) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, native_parent); | |
+ bool raw_ret = gtk_tree_model_iter_children(Handle, native_iter, ref parent); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
@@ -335,62 +311,56 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_has_child_toggled(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowHasChildToggled(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_has_child_toggled(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_get_valist(IntPtr raw, IntPtr iter, IntPtr var_args); | |
+ static extern void gtk_tree_model_get_valist(IntPtr raw, ref Gtk.TreeIter iter, IntPtr var_args); | |
public void GetValist(Gtk.TreeIter iter, IntPtr var_args) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_get_valist(Handle, native_iter, var_args); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_get_valist(Handle, ref iter, var_args); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, IntPtr iter, int[] new_order); | |
+ static extern void gtk_tree_model_rows_reordered(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter, int[] new_order); | |
public void EmitRowsReordered(Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter, new_order); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_rows_reordered(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter, new_order); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, IntPtr iter); | |
+ static extern void gtk_tree_model_row_inserted(IntPtr raw, IntPtr path, ref Gtk.TreeIter iter); | |
public void EmitRowInserted(Gtk.TreePath path, Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_row_inserted(Handle, path == null ? IntPtr.Zero : path.Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, IntPtr parent, int n); | |
+ static extern bool gtk_tree_model_iter_nth_child(IntPtr raw, IntPtr iter, ref Gtk.TreeIter parent, int n); | |
public bool IterNthChild(out Gtk.TreeIter iter, Gtk.TreeIter parent, int n) { | |
IntPtr native_iter = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter))); | |
- IntPtr native_parent = GLib.Marshaller.StructureToPtrAlloc (parent); | |
- bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, native_parent, n); | |
+ bool raw_ret = gtk_tree_model_iter_nth_child(Handle, native_iter, ref parent, n); | |
bool ret = raw_ret; | |
iter = Gtk.TreeIter.New (native_iter); | |
Marshal.FreeHGlobal (native_iter); | |
- Marshal.FreeHGlobal (native_parent); | |
+ | |
return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_model_unref_node(IntPtr raw, IntPtr iter); | |
+ static extern void gtk_tree_model_unref_node(IntPtr raw, ref Gtk.TreeIter iter); | |
public void UnrefNode(Gtk.TreeIter iter) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_model_unref_node(Handle, native_iter); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_model_unref_node(Handle, ref iter); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -415,15 +385,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowChangedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowChangedVMDelegate RowChangedVMCallback; | |
- static void rowchanged_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowchanged_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeStore; | |
- tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowChanged (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -514,15 +484,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowInsertedVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowInsertedVMDelegate RowInsertedVMCallback; | |
- static void rowinserted_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowinserted_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeStore; | |
- tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowInserted (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -565,15 +535,15 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter); | |
+ delegate void RowHasChildToggledVMDelegate (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter); | |
static RowHasChildToggledVMDelegate RowHasChildToggledVMCallback; | |
- static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, IntPtr iter) | |
+ static void rowhaschildtoggled_cb (IntPtr tree_model, IntPtr path, ref Gtk.TreeIter iter) | |
{ | |
try { | |
TreeStore tree_model_managed = GLib.Object.GetObject (tree_model, false) as TreeStore; | |
- tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), Gtk.TreeIter.New (iter)); | |
+ tree_model_managed.OnRowHasChildToggled (path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false), iter); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -983,8 +953,12 @@ namespace Gtk { | |
return ret; | |
} | |
- public int IterNChildren () { | |
- int raw_ret = gtk_tree_model_iter_n_children (Handle, IntPtr.Zero); | |
+ [DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_model_iter_n_children", CallingConvention = CallingConvention.Cdecl)] | |
+ static extern int gtk_tree_model_iter_n_children_ptr(IntPtr raw, IntPtr iter); | |
+ | |
+ public int IterNChildren () | |
+ { | |
+ int raw_ret = gtk_tree_model_iter_n_children_ptr (Handle, IntPtr.Zero); | |
int ret = raw_ret; | |
return ret; | |
} | |
diff --git b/gtk/generated/TreeView.cs a/gtk/generated/TreeView.cs | |
index d18c51d..f3291fc 100644 | |
--- b/gtk/generated/TreeView.cs | |
+++ a/gtk/generated/TreeView.cs | |
@@ -802,18 +802,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool TestExpandRowVMDelegate (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ delegate bool TestExpandRowVMDelegate (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_treeview_override_test_expand_row (IntPtr gtype, TestExpandRowVMDelegate cb); | |
static TestExpandRowVMDelegate TestExpandRowVMCallback; | |
- static bool testexpandrow_cb (IntPtr tree_view, IntPtr iter, IntPtr path) | |
+ static bool testexpandrow_cb (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path) | |
{ | |
try { | |
TreeView tree_view_managed = GLib.Object.GetObject (tree_view, false) as TreeView; | |
- return tree_view_managed.OnTestExpandRow (Gtk.TreeIter.New (iter), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
+ return tree_view_managed.OnTestExpandRow (iter, path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
// NOTREACHED: above call doesn't return | |
@@ -829,14 +829,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtksharp_treeview_base_test_expand_row (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ static extern bool gtksharp_treeview_base_test_expand_row (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeView), ConnectionMethod="OverrideTestExpandRow")] | |
protected virtual bool OnTestExpandRow (Gtk.TreeIter iter, Gtk.TreePath path) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool __ret = gtksharp_treeview_base_test_expand_row (Handle, native_iter, path == null ? IntPtr.Zero : path.Handle); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool __ret = gtksharp_treeview_base_test_expand_row (Handle, ref iter, path == null ? IntPtr.Zero : path.Handle); | |
+ | |
return __ret; | |
} | |
@@ -853,18 +852,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowCollapsedVMDelegate (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ delegate void RowCollapsedVMDelegate (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_treeview_override_row_collapsed (IntPtr gtype, RowCollapsedVMDelegate cb); | |
static RowCollapsedVMDelegate RowCollapsedVMCallback; | |
- static void rowcollapsed_cb (IntPtr tree_view, IntPtr iter, IntPtr path) | |
+ static void rowcollapsed_cb (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path) | |
{ | |
try { | |
TreeView tree_view_managed = GLib.Object.GetObject (tree_view, false) as TreeView; | |
- tree_view_managed.OnRowCollapsed (Gtk.TreeIter.New (iter), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
+ tree_view_managed.OnRowCollapsed (iter, path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -878,14 +877,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_treeview_base_row_collapsed (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ static extern void gtksharp_treeview_base_row_collapsed (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeView), ConnectionMethod="OverrideRowCollapsed")] | |
protected virtual void OnRowCollapsed (Gtk.TreeIter iter, Gtk.TreePath path) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtksharp_treeview_base_row_collapsed (Handle, native_iter, path == null ? IntPtr.Zero : path.Handle); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtksharp_treeview_base_row_collapsed (Handle, ref iter, path == null ? IntPtr.Zero : path.Handle); | |
+ | |
} | |
[GLib.Signal("row-collapsed")] | |
@@ -1045,18 +1043,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate bool TestCollapseRowVMDelegate (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ delegate bool TestCollapseRowVMDelegate (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_treeview_override_test_collapse_row (IntPtr gtype, TestCollapseRowVMDelegate cb); | |
static TestCollapseRowVMDelegate TestCollapseRowVMCallback; | |
- static bool testcollapserow_cb (IntPtr tree_view, IntPtr iter, IntPtr path) | |
+ static bool testcollapserow_cb (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path) | |
{ | |
try { | |
TreeView tree_view_managed = GLib.Object.GetObject (tree_view, false) as TreeView; | |
- return tree_view_managed.OnTestCollapseRow (Gtk.TreeIter.New (iter), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
+ return tree_view_managed.OnTestCollapseRow (iter, path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, true); | |
// NOTREACHED: above call doesn't return | |
@@ -1072,14 +1070,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtksharp_treeview_base_test_collapse_row (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ static extern bool gtksharp_treeview_base_test_collapse_row (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeView), ConnectionMethod="OverrideTestCollapseRow")] | |
protected virtual bool OnTestCollapseRow (Gtk.TreeIter iter, Gtk.TreePath path) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- bool __ret = gtksharp_treeview_base_test_collapse_row (Handle, native_iter, path == null ? IntPtr.Zero : path.Handle); | |
- Marshal.FreeHGlobal (native_iter); | |
+ bool __ret = gtksharp_treeview_base_test_collapse_row (Handle, ref iter, path == null ? IntPtr.Zero : path.Handle); | |
+ | |
return __ret; | |
} | |
@@ -1096,18 +1093,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void RowExpandedVMDelegate (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ delegate void RowExpandedVMDelegate (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_treeview_override_row_expanded (IntPtr gtype, RowExpandedVMDelegate cb); | |
static RowExpandedVMDelegate RowExpandedVMCallback; | |
- static void rowexpanded_cb (IntPtr tree_view, IntPtr iter, IntPtr path) | |
+ static void rowexpanded_cb (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path) | |
{ | |
try { | |
TreeView tree_view_managed = GLib.Object.GetObject (tree_view, false) as TreeView; | |
- tree_view_managed.OnRowExpanded (Gtk.TreeIter.New (iter), path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
+ tree_view_managed.OnRowExpanded (iter, path == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (path, typeof (Gtk.TreePath), false)); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -1121,14 +1118,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_treeview_base_row_expanded (IntPtr tree_view, IntPtr iter, IntPtr path); | |
+ static extern void gtksharp_treeview_base_row_expanded (IntPtr tree_view, ref Gtk.TreeIter iter, IntPtr path); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeView), ConnectionMethod="OverrideRowExpanded")] | |
protected virtual void OnRowExpanded (Gtk.TreeIter iter, Gtk.TreePath path) | |
{ | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtksharp_treeview_base_row_expanded (Handle, native_iter, path == null ? IntPtr.Zero : path.Handle); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtksharp_treeview_base_row_expanded (Handle, ref iter, path == null ? IntPtr.Zero : path.Handle); | |
+ | |
} | |
[GLib.Signal("row-expanded")] | |
diff --git b/gtk/generated/TreeViewColumn.cs a/gtk/generated/TreeViewColumn.cs | |
index 2127014..597f896 100644 | |
--- b/gtk/generated/TreeViewColumn.cs | |
+++ a/gtk/generated/TreeViewColumn.cs | |
@@ -407,12 +407,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_view_column_cell_set_cell_data(IntPtr raw, IntPtr tree_model, IntPtr iter, bool is_expander, bool is_expanded); | |
+ static extern void gtk_tree_view_column_cell_set_cell_data(IntPtr raw, IntPtr tree_model, ref Gtk.TreeIter iter, bool is_expander, bool is_expanded); | |
public void CellSetCellData(Gtk.TreeModel tree_model, Gtk.TreeIter iter, bool is_expander, bool is_expanded) { | |
- IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter); | |
- gtk_tree_view_column_cell_set_cell_data(Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, native_iter, is_expander, is_expanded); | |
- Marshal.FreeHGlobal (native_iter); | |
+ gtk_tree_view_column_cell_set_cell_data(Handle, tree_model == null ? IntPtr.Zero : tree_model.Handle, ref iter, is_expander, is_expanded); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -434,12 +433,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_tree_view_column_cell_get_size(IntPtr raw, IntPtr cell_area, out int x_offset, out int y_offset, out int width, out int height); | |
+ static extern void gtk_tree_view_column_cell_get_size(IntPtr raw, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height); | |
public void CellGetSize(Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) { | |
- IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area); | |
- gtk_tree_view_column_cell_get_size(Handle, native_cell_area, out x_offset, out y_offset, out width, out height); | |
- Marshal.FreeHGlobal (native_cell_area); | |
+ gtk_tree_view_column_cell_get_size(Handle, ref cell_area, out x_offset, out y_offset, out width, out height); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/Widget.cs a/gtk/generated/Widget.cs | |
index 2b8a5a4..d5b1f54 100644 | |
--- b/gtk/generated/Widget.cs | |
+++ a/gtk/generated/Widget.cs | |
@@ -1587,18 +1587,18 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void SizeAllocatedVMDelegate (IntPtr widget, IntPtr allocation); | |
+ delegate void SizeAllocatedVMDelegate (IntPtr widget, ref Gdk.Rectangle allocation); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_widget_override_size_allocate (IntPtr gtype, SizeAllocatedVMDelegate cb); | |
static SizeAllocatedVMDelegate SizeAllocatedVMCallback; | |
- static void sizeallocated_cb (IntPtr widget, IntPtr allocation) | |
+ static void sizeallocated_cb (IntPtr widget, ref Gdk.Rectangle allocation) | |
{ | |
try { | |
Widget widget_managed = GLib.Object.GetObject (widget, false) as Widget; | |
- widget_managed.OnSizeAllocated (Gdk.Rectangle.New (allocation)); | |
+ widget_managed.OnSizeAllocated (allocation); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -1612,14 +1612,13 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_widget_base_size_allocate (IntPtr widget, IntPtr allocation); | |
+ static extern void gtksharp_widget_base_size_allocate (IntPtr widget, ref Gdk.Rectangle allocation); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.Widget), ConnectionMethod="OverrideSizeAllocated")] | |
protected virtual void OnSizeAllocated (Gdk.Rectangle allocation) | |
{ | |
- IntPtr native_allocation = GLib.Marshaller.StructureToPtrAlloc (allocation); | |
- gtksharp_widget_base_size_allocate (Handle, native_allocation); | |
- Marshal.FreeHGlobal (native_allocation); | |
+ gtksharp_widget_base_size_allocate (Handle, ref allocation); | |
+ | |
} | |
[GLib.Signal("size_allocate")] | |
@@ -2015,20 +2014,19 @@ namespace Gtk { | |
} | |
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] | |
- delegate void SizeRequestedVMDelegate (IntPtr widget, IntPtr requisition); | |
+ delegate void SizeRequestedVMDelegate (IntPtr widget, ref Gtk.Requisition requisition); | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
static extern void gtksharp_widget_override_size_request (IntPtr gtype, SizeRequestedVMDelegate cb); | |
static SizeRequestedVMDelegate SizeRequestedVMCallback; | |
- static void sizerequested_cb (IntPtr widget, IntPtr requisition) | |
+ static void sizerequested_cb (IntPtr widget, ref Gtk.Requisition requisition) | |
{ | |
try { | |
Widget widget_managed = GLib.Object.GetObject (widget, false) as Widget; | |
- Gtk.Requisition myrequisition = Gtk.Requisition.New (requisition); | |
+ Gtk.Requisition myrequisition = requisition; | |
widget_managed.OnSizeRequested (ref myrequisition); | |
- if (requisition != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (myrequisition, requisition, false); | |
} catch (Exception e) { | |
GLib.ExceptionManager.RaiseUnhandledException (e, false); | |
} | |
@@ -2042,15 +2040,14 @@ namespace Gtk { | |
} | |
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtksharp_widget_base_size_request (IntPtr widget, IntPtr requisition); | |
+ static extern void gtksharp_widget_base_size_request (IntPtr widget, ref Gtk.Requisition requisition); | |
[GLib.DefaultSignalHandler(Type=typeof(Gtk.Widget), ConnectionMethod="OverrideSizeRequested")] | |
protected virtual void OnSizeRequested (ref Gtk.Requisition requisition) | |
{ | |
- IntPtr native_requisition = GLib.Marshaller.StructureToPtrAlloc (requisition); | |
- gtksharp_widget_base_size_request (Handle, native_requisition); | |
- requisition = Gtk.Requisition.New (native_requisition); | |
- Marshal.FreeHGlobal (native_requisition); | |
+ gtksharp_widget_base_size_request (Handle, ref requisition); | |
+ | |
+ | |
} | |
[GLib.Signal("size_request")] | |
@@ -3561,12 +3558,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_modify_text(IntPtr raw, int state, IntPtr color); | |
+ static extern void gtk_widget_modify_text(IntPtr raw, int state, ref Gdk.Color color); | |
public void ModifyText(Gtk.StateType state, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gtk_widget_modify_text(Handle, (int) state, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gtk_widget_modify_text(Handle, (int) state, ref color); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -3577,13 +3573,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_draw(IntPtr raw, IntPtr area); | |
+ static extern void gtk_widget_draw(IntPtr raw, ref Gdk.Rectangle area); | |
[Obsolete] | |
public void Draw(Gdk.Rectangle area) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
- gtk_widget_draw(Handle, native_area); | |
- Marshal.FreeHGlobal (native_area); | |
+ gtk_widget_draw(Handle, ref area); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -3669,21 +3664,19 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_modify_base(IntPtr raw, int state, IntPtr color); | |
+ static extern void gtk_widget_modify_base(IntPtr raw, int state, ref Gdk.Color color); | |
public void ModifyBase(Gtk.StateType state, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gtk_widget_modify_base(Handle, (int) state, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gtk_widget_modify_base(Handle, (int) state, ref color); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_size_allocate(IntPtr raw, IntPtr allocation); | |
+ static extern void gtk_widget_size_allocate(IntPtr raw, ref Gdk.Rectangle allocation); | |
public void SizeAllocate(Gdk.Rectangle allocation) { | |
- IntPtr native_allocation = GLib.Marshaller.StructureToPtrAlloc (allocation); | |
- gtk_widget_size_allocate(Handle, native_allocation); | |
- Marshal.FreeHGlobal (native_allocation); | |
+ gtk_widget_size_allocate(Handle, ref allocation); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -3903,14 +3896,12 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_modify_cursor(IntPtr raw, IntPtr primary, IntPtr secondary); | |
+ static extern void gtk_widget_modify_cursor(IntPtr raw, ref Gdk.Color primary, ref Gdk.Color secondary); | |
public void ModifyCursor(Gdk.Color primary, Gdk.Color secondary) { | |
- IntPtr native_primary = GLib.Marshaller.StructureToPtrAlloc (primary); | |
- IntPtr native_secondary = GLib.Marshaller.StructureToPtrAlloc (secondary); | |
- gtk_widget_modify_cursor(Handle, native_primary, native_secondary); | |
- Marshal.FreeHGlobal (native_primary); | |
- Marshal.FreeHGlobal (native_secondary); | |
+ gtk_widget_modify_cursor(Handle, ref primary, ref secondary); | |
+ | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -4047,21 +4038,19 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_modify_fg(IntPtr raw, int state, IntPtr color); | |
+ static extern void gtk_widget_modify_fg(IntPtr raw, int state, ref Gdk.Color color); | |
public void ModifyFg(Gtk.StateType state, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gtk_widget_modify_fg(Handle, (int) state, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gtk_widget_modify_fg(Handle, (int) state, ref color); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_widget_modify_bg(IntPtr raw, int state, IntPtr color); | |
+ static extern void gtk_widget_modify_bg(IntPtr raw, int state, ref Gdk.Color color); | |
public void ModifyBg(Gtk.StateType state, Gdk.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- gtk_widget_modify_bg(Handle, (int) state, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ gtk_widget_modify_bg(Handle, (int) state, ref color); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -4086,14 +4075,13 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern bool gtk_widget_intersect(IntPtr raw, IntPtr area, IntPtr intersection); | |
+ static extern bool gtk_widget_intersect(IntPtr raw, ref Gdk.Rectangle area, IntPtr intersection); | |
public bool Intersect(Gdk.Rectangle area, out Gdk.Rectangle intersection) { | |
- IntPtr native_area = GLib.Marshaller.StructureToPtrAlloc (area); | |
IntPtr native_intersection = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gdk.Rectangle))); | |
- bool raw_ret = gtk_widget_intersect(Handle, native_area, native_intersection); | |
+ bool raw_ret = gtk_widget_intersect(Handle, ref area, native_intersection); | |
bool ret = raw_ret; | |
- Marshal.FreeHGlobal (native_area); | |
+ | |
intersection = Gdk.Rectangle.New (native_intersection); | |
Marshal.FreeHGlobal (native_intersection); | |
return ret; | |
@@ -4818,24 +4806,36 @@ public Widget[] ListMnemonicLabels () | |
return GLib.Marshaller.ListPtrToArray<Widget> (raw_ret, typeof (GLib.List), true, false); | |
} | |
+[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_widget_modify_base", CallingConvention = CallingConvention.Cdecl)] | |
+static extern void gtk_widget_modify_base_ptr(IntPtr raw, int state, IntPtr color); | |
+ | |
public void ModifyBase (Gtk.StateType state) | |
{ | |
- gtk_widget_modify_base (Handle, (int) state, IntPtr.Zero); | |
+ gtk_widget_modify_base_ptr (Handle, (int) state, IntPtr.Zero); | |
} | |
+[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_widget_modify_bg", CallingConvention = CallingConvention.Cdecl)] | |
+static extern void gtk_widget_modify_bg_ptr(IntPtr raw, int state, IntPtr color); | |
+ | |
public void ModifyBg (Gtk.StateType state) | |
{ | |
- gtk_widget_modify_bg (Handle, (int) state, IntPtr.Zero); | |
+ gtk_widget_modify_bg_ptr (Handle, (int) state, IntPtr.Zero); | |
} | |
+[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_widget_modify_fg", CallingConvention = CallingConvention.Cdecl)] | |
+static extern void gtk_widget_modify_fg_ptr(IntPtr raw, int state, IntPtr color); | |
+ | |
public void ModifyFg (Gtk.StateType state) | |
{ | |
- gtk_widget_modify_fg (Handle, (int) state, IntPtr.Zero); | |
+ gtk_widget_modify_fg_ptr (Handle, (int) state, IntPtr.Zero); | |
} | |
+[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_widget_modify_text", CallingConvention = CallingConvention.Cdecl)] | |
+static extern void gtk_widget_modify_text_ptr(IntPtr raw, int state, IntPtr color); | |
+ | |
public void ModifyText (Gtk.StateType state) | |
{ | |
- gtk_widget_modify_text (Handle, (int) state, IntPtr.Zero); | |
+ gtk_widget_modify_text_ptr (Handle, (int) state, IntPtr.Zero); | |
} | |
#endregion | |
diff --git b/gtk/generated/Window.cs a/gtk/generated/Window.cs | |
index bd81101..91f82b5 100644 | |
--- b/gtk/generated/Window.cs | |
+++ a/gtk/generated/Window.cs | |
@@ -947,12 +947,11 @@ namespace Gtk { | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void gtk_window_set_geometry_hints(IntPtr raw, IntPtr geometry_widget, IntPtr geometry, int geom_mask); | |
+ static extern void gtk_window_set_geometry_hints(IntPtr raw, IntPtr geometry_widget, ref Gdk.Geometry geometry, int geom_mask); | |
public void SetGeometryHints(Gtk.Widget geometry_widget, Gdk.Geometry geometry, Gdk.WindowHints geom_mask) { | |
- IntPtr native_geometry = GLib.Marshaller.StructureToPtrAlloc (geometry); | |
- gtk_window_set_geometry_hints(Handle, geometry_widget == null ? IntPtr.Zero : geometry_widget.Handle, native_geometry, (int) geom_mask); | |
- Marshal.FreeHGlobal (native_geometry); | |
+ gtk_window_set_geometry_hints(Handle, geometry_widget == null ? IntPtr.Zero : geometry_widget.Handle, ref geometry, (int) geom_mask); | |
+ | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Context.cs a/pango/generated/Context.cs | |
index 9f848c4..a15de64 100644 | |
--- b/pango/generated/Context.cs | |
+++ a/pango/generated/Context.cs | |
@@ -168,7 +168,7 @@ namespace Pango { | |
static extern IntPtr pango_context_get_matrix(IntPtr raw); | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_context_set_matrix(IntPtr raw, IntPtr value); | |
+ static extern void pango_context_set_matrix(IntPtr raw, ref Pango.Matrix value); | |
public Pango.Matrix Matrix { | |
get { | |
@@ -177,9 +177,8 @@ namespace Pango { | |
return ret; | |
} | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- pango_context_set_matrix(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ pango_context_set_matrix(Handle, ref value); | |
+ | |
} | |
} | |
diff --git b/pango/generated/Font.cs a/pango/generated/Font.cs | |
index f5d2654..430697c 100644 | |
--- b/pango/generated/Font.cs | |
+++ a/pango/generated/Font.cs | |
@@ -69,14 +69,12 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_font_get_glyph_extents(IntPtr raw, uint glyph, IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_font_get_glyph_extents(IntPtr raw, uint glyph, ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public void GetGlyphExtents(uint glyph, Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_font_get_glyph_extents(Handle, glyph, native_ink_rect, native_logical_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_font_get_glyph_extents(Handle, glyph, ref ink_rect, ref logical_rect); | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Global.cs a/pango/generated/Global.cs | |
index c45dd78..b030de2 100644 | |
--- b/pango/generated/Global.cs | |
+++ a/pango/generated/Global.cs | |
@@ -10,13 +10,12 @@ namespace Pango { | |
public class Global { | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern int pango_gravity_get_for_matrix(IntPtr matrix); | |
+ static extern int pango_gravity_get_for_matrix(ref Pango.Matrix matrix); | |
public static Pango.Gravity GravityGetForMatrix(Pango.Matrix matrix) { | |
- IntPtr native_matrix = GLib.Marshaller.StructureToPtrAlloc (matrix); | |
- int raw_ret = pango_gravity_get_for_matrix(native_matrix); | |
+ int raw_ret = pango_gravity_get_for_matrix(ref matrix); | |
Pango.Gravity ret = (Pango.Gravity) raw_ret; | |
- Marshal.FreeHGlobal (native_matrix); | |
+ | |
return ret; | |
} | |
@@ -61,14 +60,13 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_get_log_attrs(IntPtr text, int length, int level, IntPtr language, IntPtr log_attrs, int attrs_len); | |
+ static extern void pango_get_log_attrs(IntPtr text, int length, int level, IntPtr language, ref Pango.LogAttr log_attrs, int attrs_len); | |
public static void GetLogAttrs(string text, int level, Pango.Language language, Pango.LogAttr log_attrs, int attrs_len) { | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); | |
- IntPtr native_log_attrs = GLib.Marshaller.StructureToPtrAlloc (log_attrs); | |
- pango_get_log_attrs(native_text, System.Text.Encoding.UTF8.GetByteCount (text), level, language == null ? IntPtr.Zero : language.Handle, native_log_attrs, attrs_len); | |
+ pango_get_log_attrs(native_text, System.Text.Encoding.UTF8.GetByteCount (text), level, language == null ? IntPtr.Zero : language.Handle, ref log_attrs, attrs_len); | |
GLib.Marshaller.Free (native_text); | |
- Marshal.FreeHGlobal (native_log_attrs); | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -209,16 +207,14 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_extents_to_pixels(IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_extents_to_pixels(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public static void ExtentsToPixels(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_extents_to_pixels(native_ink_rect, native_logical_rect); | |
- ink_rect = Pango.Rectangle.New (native_ink_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- logical_rect = Pango.Rectangle.New (native_logical_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_extents_to_pixels(ref ink_rect, ref logical_rect); | |
+ | |
+ | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/GlyphItem.cs a/pango/generated/GlyphItem.cs | |
index 7349920..e1b078c 100644 | |
--- b/pango/generated/GlyphItem.cs | |
+++ a/pango/generated/GlyphItem.cs | |
@@ -58,14 +58,13 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_glyph_item_letter_space(ref Pango.GlyphItem raw, IntPtr text, IntPtr log_attrs, int letter_spacing); | |
+ static extern void pango_glyph_item_letter_space(ref Pango.GlyphItem raw, IntPtr text, ref Pango.LogAttr log_attrs, int letter_spacing); | |
public void LetterSpace(string text, Pango.LogAttr log_attrs, int letter_spacing) { | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); | |
- IntPtr native_log_attrs = GLib.Marshaller.StructureToPtrAlloc (log_attrs); | |
- pango_glyph_item_letter_space(ref this, native_text, native_log_attrs, letter_spacing); | |
+ pango_glyph_item_letter_space(ref this, native_text, ref log_attrs, letter_spacing); | |
GLib.Marshaller.Free (native_text); | |
- Marshal.FreeHGlobal (native_log_attrs); | |
+ | |
} | |
#endregion | |
diff --git b/pango/generated/GlyphString.cs a/pango/generated/GlyphString.cs | |
index 106bb77..93810b4 100644 | |
--- b/pango/generated/GlyphString.cs | |
+++ a/pango/generated/GlyphString.cs | |
@@ -31,15 +31,14 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_glyph_string_index_to_x(IntPtr raw, IntPtr text, int length, IntPtr analysis, int index_, bool trailing, out int x_pos); | |
+ static extern void pango_glyph_string_index_to_x(IntPtr raw, IntPtr text, int length, ref Pango.Analysis analysis, int index_, bool trailing, out int x_pos); | |
public int IndexToX(string text, Pango.Analysis analysis, int index_, bool trailing) { | |
int x_pos; | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); | |
- IntPtr native_analysis = GLib.Marshaller.StructureToPtrAlloc (analysis); | |
- pango_glyph_string_index_to_x(Handle, native_text, System.Text.Encoding.UTF8.GetByteCount (text), native_analysis, index_, trailing, out x_pos); | |
+ pango_glyph_string_index_to_x(Handle, native_text, System.Text.Encoding.UTF8.GetByteCount (text), ref analysis, index_, trailing, out x_pos); | |
GLib.Marshaller.Free (native_text); | |
- Marshal.FreeHGlobal (native_analysis); | |
+ | |
return x_pos; | |
} | |
@@ -65,14 +64,12 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_glyph_string_extents_range(IntPtr raw, int start, int end, IntPtr font, IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_glyph_string_extents_range(IntPtr raw, int start, int end, IntPtr font, ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public void ExtentsRange(int start, int end, Pango.Font font, Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_glyph_string_extents_range(Handle, start, end, font == null ? IntPtr.Zero : font.Handle, native_ink_rect, native_logical_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_glyph_string_extents_range(Handle, start, end, font == null ? IntPtr.Zero : font.Handle, ref ink_rect, ref logical_rect); | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -105,25 +102,22 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_glyph_string_extents(IntPtr raw, IntPtr font, IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_glyph_string_extents(IntPtr raw, IntPtr font, ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public void Extents(Pango.Font font, Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_glyph_string_extents(Handle, font == null ? IntPtr.Zero : font.Handle, native_ink_rect, native_logical_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_glyph_string_extents(Handle, font == null ? IntPtr.Zero : font.Handle, ref ink_rect, ref logical_rect); | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_glyph_string_x_to_index(IntPtr raw, IntPtr text, int length, IntPtr analysis, int x_pos, out int index_, out int trailing); | |
+ static extern void pango_glyph_string_x_to_index(IntPtr raw, IntPtr text, int length, ref Pango.Analysis analysis, int x_pos, out int index_, out int trailing); | |
public void XToIndex(string text, Pango.Analysis analysis, int x_pos, out int index_, out int trailing) { | |
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); | |
- IntPtr native_analysis = GLib.Marshaller.StructureToPtrAlloc (analysis); | |
- pango_glyph_string_x_to_index(Handle, native_text, System.Text.Encoding.UTF8.GetByteCount (text), native_analysis, x_pos, out index_, out trailing); | |
+ pango_glyph_string_x_to_index(Handle, native_text, System.Text.Encoding.UTF8.GetByteCount (text), ref analysis, x_pos, out index_, out trailing); | |
GLib.Marshaller.Free (native_text); | |
- Marshal.FreeHGlobal (native_analysis); | |
+ | |
} | |
public GlyphString(IntPtr raw) : base(raw) {} | |
diff --git b/pango/generated/LayoutLine.cs a/pango/generated/LayoutLine.cs | |
index cc18a76..5b06e10 100644 | |
--- b/pango/generated/LayoutLine.cs | |
+++ a/pango/generated/LayoutLine.cs | |
@@ -88,29 +88,25 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_layout_line_get_pixel_extents(IntPtr raw, IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_layout_line_get_pixel_extents(IntPtr raw, ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public void GetPixelExtents(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_layout_line_get_pixel_extents(Handle, native_ink_rect, native_logical_rect); | |
- ink_rect = Pango.Rectangle.New (native_ink_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- logical_rect = Pango.Rectangle.New (native_logical_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_layout_line_get_pixel_extents(Handle, ref ink_rect, ref logical_rect); | |
+ | |
+ | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_layout_line_get_extents(IntPtr raw, IntPtr ink_rect, IntPtr logical_rect); | |
+ static extern void pango_layout_line_get_extents(IntPtr raw, ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); | |
public void GetExtents(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect) { | |
- IntPtr native_ink_rect = GLib.Marshaller.StructureToPtrAlloc (ink_rect); | |
- IntPtr native_logical_rect = GLib.Marshaller.StructureToPtrAlloc (logical_rect); | |
- pango_layout_line_get_extents(Handle, native_ink_rect, native_logical_rect); | |
- ink_rect = Pango.Rectangle.New (native_ink_rect); | |
- Marshal.FreeHGlobal (native_ink_rect); | |
- logical_rect = Pango.Rectangle.New (native_logical_rect); | |
- Marshal.FreeHGlobal (native_logical_rect); | |
+ pango_layout_line_get_extents(Handle, ref ink_rect, ref logical_rect); | |
+ | |
+ | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Matrix.cs a/pango/generated/Matrix.cs | |
index b79d435..799602f 100644 | |
--- b/pango/generated/Matrix.cs | |
+++ a/pango/generated/Matrix.cs | |
@@ -28,12 +28,11 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_matrix_concat(ref Pango.Matrix raw, IntPtr new_matrix); | |
+ static extern void pango_matrix_concat(ref Pango.Matrix raw, ref Pango.Matrix new_matrix); | |
public void Concat(Pango.Matrix new_matrix) { | |
- IntPtr native_new_matrix = GLib.Marshaller.StructureToPtrAlloc (new_matrix); | |
- pango_matrix_concat(ref this, native_new_matrix); | |
- Marshal.FreeHGlobal (native_new_matrix); | |
+ pango_matrix_concat(ref this, ref new_matrix); | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -83,13 +82,12 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_matrix_transform_rectangle(ref Pango.Matrix raw, IntPtr rect); | |
+ static extern void pango_matrix_transform_rectangle(ref Pango.Matrix raw, ref Pango.Rectangle rect); | |
public void TransformRectangle(ref Pango.Rectangle rect) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- pango_matrix_transform_rectangle(ref this, native_rect); | |
- rect = Pango.Rectangle.New (native_rect); | |
- Marshal.FreeHGlobal (native_rect); | |
+ pango_matrix_transform_rectangle(ref this, ref rect); | |
+ | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
@@ -104,13 +102,12 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_matrix_transform_pixel_rectangle(ref Pango.Matrix raw, IntPtr rect); | |
+ static extern void pango_matrix_transform_pixel_rectangle(ref Pango.Matrix raw, ref Pango.Rectangle rect); | |
public void TransformPixelRectangle(ref Pango.Rectangle rect) { | |
- IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect); | |
- pango_matrix_transform_pixel_rectangle(ref this, native_rect); | |
- rect = Pango.Rectangle.New (native_rect); | |
- Marshal.FreeHGlobal (native_rect); | |
+ pango_matrix_transform_pixel_rectangle(ref this, ref rect); | |
+ | |
+ | |
} | |
[DllImport("glibsharpglue-2", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Renderer.cs a/pango/generated/Renderer.cs | |
index d829280..f11878f 100644 | |
--- b/pango/generated/Renderer.cs | |
+++ a/pango/generated/Renderer.cs | |
@@ -24,7 +24,7 @@ namespace Pango { | |
static extern IntPtr pango_renderer_get_matrix(IntPtr raw); | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_renderer_set_matrix(IntPtr raw, IntPtr value); | |
+ static extern void pango_renderer_set_matrix(IntPtr raw, ref Pango.Matrix value); | |
public Pango.Matrix Matrix { | |
get { | |
@@ -33,9 +33,8 @@ namespace Pango { | |
return ret; | |
} | |
set { | |
- IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); | |
- pango_renderer_set_matrix(Handle, native_value); | |
- Marshal.FreeHGlobal (native_value); | |
+ pango_renderer_set_matrix(Handle, ref value); | |
+ | |
} | |
} | |
@@ -75,12 +74,11 @@ namespace Pango { | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
- static extern void pango_renderer_set_color(IntPtr raw, int part, IntPtr color); | |
+ static extern void pango_renderer_set_color(IntPtr raw, int part, ref Pango.Color color); | |
public void SetColor(Pango.RenderPart part, Pango.Color color) { | |
- IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color); | |
- pango_renderer_set_color(Handle, (int) part, native_color); | |
- Marshal.FreeHGlobal (native_color); | |
+ pango_renderer_set_color(Handle, (int) part, ref color); | |
+ | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment