-
-
Save Therzok/f3582e15eb75379077af0bba6edcc3dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git b/atk/generated/NoOpObject.cs a/atk/generated/NoOpObject.cs | |
index 9670e60..6717e8b 100644 | |
--- b/atk/generated/NoOpObject.cs | |
+++ a/atk/generated/NoOpObject.cs | |
@@ -642,13 +642,11 @@ 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/TextAdapter.cs a/atk/generated/TextAdapter.cs | |
index 1e429b3..4c723b5 100644 | |
--- b/atk/generated/TextAdapter.cs | |
+++ a/atk/generated/TextAdapter.cs | |
@@ -573,12 +573,10 @@ 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 +671,11 @@ 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..77d2775 100644 | |
--- b/atk/generated/Util.cs | |
+++ a/atk/generated/Util.cs | |
@@ -132,11 +132,10 @@ namespace Atk { | |
} | |
} | |
- int InvokeNative (KeyEventStruct evnt) | |
+ int InvokeNative (Atk.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); | |
return result; | |
} | |
diff --git b/gdk/generated/CairoHelper.cs a/gdk/generated/CairoHelper.cs | |
index f69d361..ae04b9a 100644 | |
--- b/gdk/generated/CairoHelper.cs | |
+++ a/gdk/generated/CairoHelper.cs | |
@@ -17,12 +17,10 @@ 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 +47,10 @@ 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..ea4ec27 100644 | |
--- b/gdk/generated/Char.cs | |
+++ a/gdk/generated/Char.cs | |
@@ -10,50 +10,42 @@ 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..76bd65d 100644 | |
--- b/gdk/generated/Color.cs | |
+++ a/gdk/generated/Color.cs | |
@@ -26,14 +26,12 @@ 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 +47,52 @@ 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..a6a0ba7 100644 | |
--- b/gdk/generated/Colormap.cs | |
+++ a/gdk/generated/Colormap.cs | |
@@ -108,13 +108,10 @@ 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 +125,11 @@ 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..dca0a59 100644 | |
--- b/gdk/generated/Cursor.cs | |
+++ a/gdk/generated/Cursor.cs | |
@@ -100,15 +100,11 @@ 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..aa2761a 100644 | |
--- b/gdk/generated/Display.cs | |
+++ a/gdk/generated/Display.cs | |
@@ -280,13 +280,11 @@ 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..d00fa6a 100644 | |
--- b/gdk/generated/Drawable.cs | |
+++ a/gdk/generated/Drawable.cs | |
@@ -100,12 +100,10 @@ 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 +136,10 @@ 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 +197,10 @@ 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 +249,12 @@ 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 +290,30 @@ 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 +356,10 @@ 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..036f0be 100644 | |
--- b/gdk/generated/Font.cs | |
+++ a/gdk/generated/Font.cs | |
@@ -53,13 +53,11 @@ 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..bdc5a25 100644 | |
--- b/gdk/generated/GC.cs | |
+++ a/gdk/generated/GC.cs | |
@@ -27,16 +27,14 @@ 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 +96,10 @@ 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 +121,10 @@ 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 +190,30 @@ 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 +242,29 @@ 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/Global.cs a/gdk/generated/Global.cs | |
index ef24569..85ff999 100644 | |
--- b/gdk/generated/Global.cs | |
+++ a/gdk/generated/Global.cs | |
@@ -74,53 +74,45 @@ 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 +194,13 @@ 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..55b1987 100644 | |
--- b/gdk/generated/Keymap.cs | |
+++ a/gdk/generated/Keymap.cs | |
@@ -135,13 +135,11 @@ 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..b16b438 100644 | |
--- b/gdk/generated/PangoAttrEmbossColor.cs | |
+++ a/gdk/generated/PangoAttrEmbossColor.cs | |
@@ -33,13 +33,11 @@ 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..3b8cb24 100644 | |
--- b/gdk/generated/PangoRenderer.cs | |
+++ a/gdk/generated/PangoRenderer.cs | |
@@ -89,12 +89,10 @@ 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..887dcfe 100644 | |
--- b/gdk/generated/Pixbuf.cs | |
+++ a/gdk/generated/Pixbuf.cs | |
@@ -231,14 +231,12 @@ 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..45d15a9 100644 | |
--- b/gdk/generated/PixbufGifAnim.cs | |
+++ a/gdk/generated/PixbufGifAnim.cs | |
@@ -21,12 +21,10 @@ 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..622b1f6 100644 | |
--- b/gdk/generated/Pixmap.cs | |
+++ a/gdk/generated/Pixmap.cs | |
@@ -46,20 +46,18 @@ 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 +83,14 @@ 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 +107,14 @@ 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 +129,18 @@ 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 +148,13 @@ 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..da4f83c 100644 | |
--- b/gdk/generated/Rectangle.cs | |
+++ a/gdk/generated/Rectangle.cs | |
@@ -26,14 +26,12 @@ 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 +49,12 @@ 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..c7976c8 100644 | |
--- b/gdk/generated/Region.cs | |
+++ a/gdk/generated/Region.cs | |
@@ -19,13 +19,11 @@ 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 +41,11 @@ 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 +82,11 @@ 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 +123,10 @@ 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..5f95c7f 100644 | |
--- b/gdk/generated/Rgb.cs | |
+++ a/gdk/generated/Rgb.cs | |
@@ -100,13 +100,10 @@ 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..acd2fb6 100644 | |
--- b/gdk/generated/Window.cs | |
+++ a/gdk/generated/Window.cs | |
@@ -16,16 +16,14 @@ 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 +90,10 @@ 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 +366,10 @@ 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 +640,11 @@ 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 +670,10 @@ 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 +796,10 @@ 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/Standard.cs a/glade/generated/Standard.cs | |
index ac8ec9e..4402cbb 100644 | |
--- b/glade/generated/Standard.cs | |
+++ a/glade/generated/Standard.cs | |
@@ -10,23 +10,19 @@ 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..38844ee 100644 | |
--- b/glade/generated/XML.cs | |
+++ a/glade/generated/XML.cs | |
@@ -96,22 +96,18 @@ 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 +170,10 @@ 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..9b0b382 100644 | |
--- b/gtk/generated/AccelMap.cs | |
+++ a/gtk/generated/AccelMap.cs | |
@@ -180,15 +180,13 @@ 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..0765133 100644 | |
--- b/gtk/generated/CellRenderer.cs | |
+++ a/gtk/generated/CellRenderer.cs | |
@@ -326,31 +326,21 @@ 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..7e7e5b5 100644 | |
--- b/gtk/generated/CellView.cs | |
+++ a/gtk/generated/CellView.cs | |
@@ -113,13 +113,11 @@ 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 +133,11 @@ 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..3e5bc35 100644 | |
--- b/gtk/generated/Clipboard.cs | |
+++ a/gtk/generated/Clipboard.cs | |
@@ -192,12 +192,10 @@ 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..c8644b5 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,14 @@ 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 +60,7 @@ 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..5c5a6a2 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,7 @@ 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..7b8d07b 100644 | |
--- b/gtk/generated/ComboBox.cs | |
+++ a/gtk/generated/ComboBox.cs | |
@@ -273,12 +273,10 @@ 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..7d7d527 100644 | |
--- b/gtk/generated/Draw.cs | |
+++ a/gtk/generated/Draw.cs | |
@@ -114,24 +114,18 @@ 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/FileFilter.cs a/gtk/generated/FileFilter.cs | |
index 7d373d4..998e9ec 100644 | |
--- b/gtk/generated/FileFilter.cs | |
+++ a/gtk/generated/FileFilter.cs | |
@@ -28,13 +28,11 @@ 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..93bc59b 100644 | |
--- b/gtk/generated/Gc.cs | |
+++ a/gtk/generated/Gc.cs | |
@@ -10,13 +10,11 @@ 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..fc24610 100644 | |
--- b/gtk/generated/Global.cs | |
+++ a/gtk/generated/Global.cs | |
@@ -93,15 +93,13 @@ 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/IMContext.cs a/gtk/generated/IMContext.cs | |
index fafc367..0dadb90 100644 | |
--- b/gtk/generated/IMContext.cs | |
+++ a/gtk/generated/IMContext.cs | |
@@ -344,13 +344,11 @@ 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..5224ae8 100644 | |
--- b/gtk/generated/IconInfo.cs | |
+++ a/gtk/generated/IconInfo.cs | |
@@ -42,13 +42,11 @@ 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 +115,11 @@ 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..ded924b 100644 | |
--- b/gtk/generated/ItemFactory.cs | |
+++ a/gtk/generated/ItemFactory.cs | |
@@ -50,21 +50,17 @@ 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 +100,10 @@ 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 +164,10 @@ 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 +199,17 @@ 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..bb15594 100644 | |
--- b/gtk/generated/ListStore.cs | |
+++ a/gtk/generated/ListStore.cs | |
@@ -33,23 +33,17 @@ 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 +54,47 @@ 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 +118,14 @@ 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 +154,18 @@ 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 +201,46 @@ 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 +257,48 @@ 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 +335,50 @@ 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)] | |
@@ -866,9 +806,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..d8d4ba0 100644 | |
--- b/gtk/generated/PrintSettings.cs | |
+++ a/gtk/generated/PrintSettings.cs | |
@@ -306,12 +306,10 @@ 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..e3c53b6 100644 | |
--- b/gtk/generated/RecentFilter.cs | |
+++ a/gtk/generated/RecentFilter.cs | |
@@ -28,13 +28,11 @@ 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..2785905 100644 | |
--- b/gtk/generated/RecentManager.cs | |
+++ a/gtk/generated/RecentManager.cs | |
@@ -123,15 +123,13 @@ 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..3a2cf2d 100644 | |
--- b/gtk/generated/Selection.cs | |
+++ a/gtk/generated/Selection.cs | |
@@ -19,12 +19,10 @@ 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..5eeedb2 100644 | |
--- b/gtk/generated/Settings.cs | |
+++ a/gtk/generated/Settings.cs | |
@@ -32,14 +32,12 @@ 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..9301ddf 100644 | |
--- b/gtk/generated/Style.cs | |
+++ a/gtk/generated/Style.cs | |
@@ -195,13 +195,11 @@ 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 +213,18 @@ 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 +232,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 +242,79 @@ 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 +326,38 @@ 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 +413,20 @@ 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 +442,38 @@ 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..f6fd9eb 100644 | |
--- b/gtk/generated/Target.cs | |
+++ a/gtk/generated/Target.cs | |
@@ -19,12 +19,10 @@ 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..1139e3f 100644 | |
--- b/gtk/generated/TextBuffer.cs | |
+++ a/gtk/generated/TextBuffer.cs | |
@@ -721,18 +721,11 @@ 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 +757,21 @@ 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 +789,33 @@ 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 +845,10 @@ 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 +859,17 @@ 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 +880,10 @@ 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 +942,26 @@ 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 +1023,12 @@ 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 +1044,19 @@ 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 +1082,10 @@ 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 +1101,11 @@ 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 +1128,13 @@ 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 +1146,20 @@ 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 +1184,10 @@ 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 +1270,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..52666ad 100644 | |
--- b/gtk/generated/TextIter.cs | |
+++ a/gtk/generated/TextIter.cs | |
@@ -117,13 +117,11 @@ 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 +190,11 @@ 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 +343,12 @@ 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 +380,11 @@ 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 +409,12 @@ 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 +450,10 @@ 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 +564,11 @@ 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 +582,11 @@ 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 +609,28 @@ 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 +646,11 @@ 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 +766,19 @@ 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..f1907b0 100644 | |
--- b/gtk/generated/TextTag.cs | |
+++ a/gtk/generated/TextTag.cs | |
@@ -1024,13 +1024,11 @@ 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..d165e81 100644 | |
--- b/gtk/generated/TextView.cs | |
+++ a/gtk/generated/TextView.cs | |
@@ -834,13 +834,11 @@ 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 +850,11 @@ 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 +868,11 @@ 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 +891,10 @@ 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 +905,12 @@ 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 +935,11 @@ 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 +970,11 @@ 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 +1032,11 @@ 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 +1051,20 @@ 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..cd8fd7d 100644 | |
--- b/gtk/generated/Tooltip.cs | |
+++ a/gtk/generated/Tooltip.cs | |
@@ -76,13 +76,11 @@ 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..43bd58d 100644 | |
--- b/gtk/generated/TreeModelAdapter.cs | |
+++ a/gtk/generated/TreeModelAdapter.cs | |
@@ -433,56 +433,46 @@ 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 +489,48 @@ 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 +567,50 @@ 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 +666,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..dc26bf7 100644 | |
--- b/gtk/generated/TreeModelFilter.cs | |
+++ a/gtk/generated/TreeModelFilter.cs | |
@@ -59,16 +59,14 @@ 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 +171,46 @@ 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 +227,48 @@ 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 +305,50 @@ 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)] | |
@@ -646,8 +611,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..29bd072 100644 | |
--- b/gtk/generated/TreeModelSort.cs | |
+++ a/gtk/generated/TreeModelSort.cs | |
@@ -47,30 +47,26 @@ 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 +97,11 @@ 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 +141,46 @@ 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 +197,48 @@ 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 +275,50 @@ 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)] | |
@@ -760,8 +721,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..b9a40bb 100644 | |
--- b/gtk/generated/TreeRowReference.cs | |
+++ a/gtk/generated/TreeRowReference.cs | |
@@ -40,13 +40,11 @@ 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..c3e4792 100644 | |
--- b/gtk/generated/TreeSelection.cs | |
+++ a/gtk/generated/TreeSelection.cs | |
@@ -111,13 +111,11 @@ 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 +194,10 @@ 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 +225,10 @@ 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..d86f583 100644 | |
--- b/gtk/generated/TreeStore.cs | |
+++ a/gtk/generated/TreeStore.cs | |
@@ -21,65 +21,48 @@ 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 +88,11 @@ 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 +107,27 @@ 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 +151,46 @@ 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 +207,48 @@ 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 +285,50 @@ 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)] | |
@@ -983,8 +921,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/TreeViewColumn.cs a/gtk/generated/TreeViewColumn.cs | |
index 2127014..c3d8453 100644 | |
--- b/gtk/generated/TreeViewColumn.cs | |
+++ a/gtk/generated/TreeViewColumn.cs | |
@@ -407,12 +407,10 @@ 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 +432,10 @@ 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..554fe9e 100644 | |
--- b/gtk/generated/Widget.cs | |
+++ a/gtk/generated/Widget.cs | |
@@ -3561,12 +3561,10 @@ 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 +3575,11 @@ 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 +3665,17 @@ 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 +3895,10 @@ 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 +4035,17 @@ 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 +4070,12 @@ 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 +4800,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..6135282 100644 | |
--- b/gtk/generated/Window.cs | |
+++ a/gtk/generated/Window.cs | |
@@ -947,12 +947,10 @@ 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..541c761 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,7 @@ 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..66f91ca 100644 | |
--- b/pango/generated/Font.cs | |
+++ a/pango/generated/Font.cs | |
@@ -69,14 +69,10 @@ 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..b34f6c1 100644 | |
--- b/pango/generated/Global.cs | |
+++ a/pango/generated/Global.cs | |
@@ -10,13 +10,11 @@ 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 +59,12 @@ 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 +205,10 @@ 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..7bf7b83 100644 | |
--- b/pango/generated/GlyphItem.cs | |
+++ a/pango/generated/GlyphItem.cs | |
@@ -58,14 +58,12 @@ 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..f913c07 100644 | |
--- b/pango/generated/GlyphString.cs | |
+++ a/pango/generated/GlyphString.cs | |
@@ -31,15 +31,13 @@ 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 +63,10 @@ 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 +99,19 @@ 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..5d2ce85 100644 | |
--- b/pango/generated/LayoutLine.cs | |
+++ a/pango/generated/LayoutLine.cs | |
@@ -88,29 +88,17 @@ 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..bd826e6 100644 | |
--- b/pango/generated/Matrix.cs | |
+++ a/pango/generated/Matrix.cs | |
@@ -28,12 +28,10 @@ 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 +81,10 @@ 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 +99,10 @@ 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..4a20398 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,7 @@ 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 +73,10 @@ 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