Created
October 14, 2016 16:13
-
-
Save Therzok/4017a9a6725f1be075e7911660aa6fa5 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/Attribute.cs a/atk/generated/Attribute.cs | |
index 31060ed..5130598 100644 | |
--- b/atk/generated/Attribute.cs | |
+++ a/atk/generated/Attribute.cs | |
@@ -17,7 +17,7 @@ namespace Atk { | |
public static Atk.Attribute Zero = new Atk.Attribute (); | |
- public static Atk.Attribute New(IntPtr raw) { | |
+ public static Atk.Attribute New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Atk.Attribute.Zero; | |
return (Atk.Attribute) Marshal.PtrToStructure (raw, typeof (Atk.Attribute)); | |
diff --git b/atk/generated/KeyEventStruct.cs a/atk/generated/KeyEventStruct.cs | |
index 92cf821..df43a97 100644 | |
--- b/atk/generated/KeyEventStruct.cs | |
+++ a/atk/generated/KeyEventStruct.cs | |
@@ -22,7 +22,7 @@ namespace Atk { | |
public static Atk.KeyEventStruct Zero = new Atk.KeyEventStruct (); | |
- public static Atk.KeyEventStruct New(IntPtr raw) { | |
+ public static Atk.KeyEventStruct New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Atk.KeyEventStruct.Zero; | |
return (Atk.KeyEventStruct) Marshal.PtrToStructure (raw, typeof (Atk.KeyEventStruct)); | |
diff --git b/atk/generated/PropertyValues.cs a/atk/generated/PropertyValues.cs | |
index cdd5b1b..d908c2a 100644 | |
--- b/atk/generated/PropertyValues.cs | |
+++ a/atk/generated/PropertyValues.cs | |
@@ -18,7 +18,7 @@ namespace Atk { | |
public static Atk.PropertyValues Zero = new Atk.PropertyValues (); | |
- public static Atk.PropertyValues New(IntPtr raw) { | |
+ public static Atk.PropertyValues New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Atk.PropertyValues.Zero; | |
return (Atk.PropertyValues) Marshal.PtrToStructure (raw, typeof (Atk.PropertyValues)); | |
diff --git b/atk/generated/Rectangle.cs a/atk/generated/Rectangle.cs | |
index adb811b..795ac6f 100644 | |
--- b/atk/generated/Rectangle.cs | |
+++ a/atk/generated/Rectangle.cs | |
@@ -19,10 +19,11 @@ namespace Atk { | |
public static Atk.Rectangle Zero = new Atk.Rectangle (); | |
- public static Atk.Rectangle New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Atk.Rectangle.Zero; | |
- return (Atk.Rectangle) Marshal.PtrToStructure (raw, typeof (Atk.Rectangle)); | |
+ public static Atk.Rectangle New (IntPtr raw) { | |
+ var ret = Atk.Rectangle.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Atk.Rectangle*)raw; } | |
+ return ret; | |
} | |
[DllImport("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/atk/generated/TextRange.cs a/atk/generated/TextRange.cs | |
index b303ba7..4d6cce4 100644 | |
--- b/atk/generated/TextRange.cs | |
+++ a/atk/generated/TextRange.cs | |
@@ -19,7 +19,7 @@ namespace Atk { | |
public static Atk.TextRange Zero = new Atk.TextRange (); | |
- public static Atk.TextRange New(IntPtr raw) { | |
+ public static Atk.TextRange New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Atk.TextRange.Zero; | |
return (Atk.TextRange) Marshal.PtrToStructure (raw, typeof (Atk.TextRange)); | |
diff --git b/atk/generated/TextRectangle.cs a/atk/generated/TextRectangle.cs | |
index 2ef88fb..36fef5c 100644 | |
--- b/atk/generated/TextRectangle.cs | |
+++ a/atk/generated/TextRectangle.cs | |
@@ -19,10 +19,11 @@ namespace Atk { | |
public static Atk.TextRectangle Zero = new Atk.TextRectangle (); | |
- public static Atk.TextRectangle New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Atk.TextRectangle.Zero; | |
- return (Atk.TextRectangle) Marshal.PtrToStructure (raw, typeof (Atk.TextRectangle)); | |
+ public static Atk.TextRectangle New (IntPtr raw) { | |
+ var ret = Atk.TextRectangle.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Atk.TextRectangle*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/BRESINFO.cs a/gdk/generated/BRESINFO.cs | |
index a2d6b18..48b70ed 100644 | |
--- b/gdk/generated/BRESINFO.cs | |
+++ a/gdk/generated/BRESINFO.cs | |
@@ -21,10 +21,11 @@ namespace Gdk { | |
public static Gdk.BRESINFO Zero = new Gdk.BRESINFO (); | |
- public static Gdk.BRESINFO New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.BRESINFO.Zero; | |
- return (Gdk.BRESINFO) Marshal.PtrToStructure (raw, typeof (Gdk.BRESINFO)); | |
+ public static Gdk.BRESINFO New (IntPtr raw) { | |
+ var ret = Gdk.BRESINFO.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.BRESINFO*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Color.cs a/gdk/generated/Color.cs | |
index 76bd65d..a4dfaed 100644 | |
--- b/gdk/generated/Color.cs | |
+++ a/gdk/generated/Color.cs | |
@@ -19,10 +19,11 @@ namespace Gdk { | |
public static Gdk.Color Zero = new Gdk.Color (); | |
- public static Gdk.Color New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Color.Zero; | |
- return (Gdk.Color) Marshal.PtrToStructure (raw, typeof (Gdk.Color)); | |
+ public static Gdk.Color New (IntPtr raw) { | |
+ var ret = Gdk.Color.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Color*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/DeviceAxis.cs a/gdk/generated/DeviceAxis.cs | |
index 81057e8..8a63c50 100644 | |
--- b/gdk/generated/DeviceAxis.cs | |
+++ a/gdk/generated/DeviceAxis.cs | |
@@ -18,10 +18,11 @@ namespace Gdk { | |
public static Gdk.DeviceAxis Zero = new Gdk.DeviceAxis (); | |
- public static Gdk.DeviceAxis New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.DeviceAxis.Zero; | |
- return (Gdk.DeviceAxis) Marshal.PtrToStructure (raw, typeof (Gdk.DeviceAxis)); | |
+ public static Gdk.DeviceAxis New (IntPtr raw) { | |
+ var ret = Gdk.DeviceAxis.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.DeviceAxis*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/DeviceKey.cs a/gdk/generated/DeviceKey.cs | |
index 0b0b1c7..f6d1977 100644 | |
--- b/gdk/generated/DeviceKey.cs | |
+++ a/gdk/generated/DeviceKey.cs | |
@@ -17,10 +17,11 @@ namespace Gdk { | |
public static Gdk.DeviceKey Zero = new Gdk.DeviceKey (); | |
- public static Gdk.DeviceKey New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.DeviceKey.Zero; | |
- return (Gdk.DeviceKey) Marshal.PtrToStructure (raw, typeof (Gdk.DeviceKey)); | |
+ public static Gdk.DeviceKey New (IntPtr raw) { | |
+ var ret = Gdk.DeviceKey.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.DeviceKey*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/DisplayPointerHooks.cs a/gdk/generated/DisplayPointerHooks.cs | |
index 0d3ae64..6b3639d 100644 | |
--- b/gdk/generated/DisplayPointerHooks.cs | |
+++ a/gdk/generated/DisplayPointerHooks.cs | |
@@ -15,10 +15,11 @@ namespace Gdk { | |
public static Gdk.DisplayPointerHooks Zero = new Gdk.DisplayPointerHooks (); | |
- public static Gdk.DisplayPointerHooks New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.DisplayPointerHooks.Zero; | |
- return (Gdk.DisplayPointerHooks) Marshal.PtrToStructure (raw, typeof (Gdk.DisplayPointerHooks)); | |
+ public static Gdk.DisplayPointerHooks New (IntPtr raw) { | |
+ var ret = Gdk.DisplayPointerHooks.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.DisplayPointerHooks*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/EdgeTable.cs a/gdk/generated/EdgeTable.cs | |
index d057428..0e3e253 100644 | |
--- b/gdk/generated/EdgeTable.cs | |
+++ a/gdk/generated/EdgeTable.cs | |
@@ -26,10 +26,11 @@ namespace Gdk { | |
public static Gdk.EdgeTable Zero = new Gdk.EdgeTable (); | |
- public static Gdk.EdgeTable New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.EdgeTable.Zero; | |
- return (Gdk.EdgeTable) Marshal.PtrToStructure (raw, typeof (Gdk.EdgeTable)); | |
+ public static Gdk.EdgeTable New (IntPtr raw) { | |
+ var ret = Gdk.EdgeTable.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.EdgeTable*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Font.cs a/gdk/generated/Font.cs | |
index 036f0be..7a0d4b3 100644 | |
--- b/gdk/generated/Font.cs | |
+++ a/gdk/generated/Font.cs | |
@@ -19,10 +19,11 @@ namespace Gdk { | |
public static Gdk.Font Zero = new Gdk.Font (); | |
- public static Gdk.Font New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Font.Zero; | |
- return (Gdk.Font) Marshal.PtrToStructure (raw, typeof (Gdk.Font)); | |
+ public static Gdk.Font New (IntPtr raw) { | |
+ var ret = Gdk.Font.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Font*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/GCValues.cs a/gdk/generated/GCValues.cs | |
index 61c722e..db333a6 100644 | |
--- b/gdk/generated/GCValues.cs | |
+++ a/gdk/generated/GCValues.cs | |
@@ -61,10 +61,11 @@ namespace Gdk { | |
public static Gdk.GCValues Zero = new Gdk.GCValues (); | |
- public static Gdk.GCValues New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.GCValues.Zero; | |
- return (Gdk.GCValues) Marshal.PtrToStructure (raw, typeof (Gdk.GCValues)); | |
+ public static Gdk.GCValues New (IntPtr raw) { | |
+ var ret = Gdk.GCValues.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.GCValues*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Geometry.cs a/gdk/generated/Geometry.cs | |
index 657f86e..5f01101 100644 | |
--- b/gdk/generated/Geometry.cs | |
+++ a/gdk/generated/Geometry.cs | |
@@ -26,10 +26,11 @@ namespace Gdk { | |
public static Gdk.Geometry Zero = new Gdk.Geometry (); | |
- public static Gdk.Geometry New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Geometry.Zero; | |
- return (Gdk.Geometry) Marshal.PtrToStructure (raw, typeof (Gdk.Geometry)); | |
+ public static Gdk.Geometry New (IntPtr raw) { | |
+ var ret = Gdk.Geometry.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Geometry*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/KeymapKey.cs a/gdk/generated/KeymapKey.cs | |
index 905f9df..e1657f3 100644 | |
--- b/gdk/generated/KeymapKey.cs | |
+++ a/gdk/generated/KeymapKey.cs | |
@@ -18,10 +18,11 @@ namespace Gdk { | |
public static Gdk.KeymapKey Zero = new Gdk.KeymapKey (); | |
- public static Gdk.KeymapKey New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.KeymapKey.Zero; | |
- return (Gdk.KeymapKey) Marshal.PtrToStructure (raw, typeof (Gdk.KeymapKey)); | |
+ public static Gdk.KeymapKey New (IntPtr raw) { | |
+ var ret = Gdk.KeymapKey.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.KeymapKey*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/PixbufFrame.cs a/gdk/generated/PixbufFrame.cs | |
index 77ff941..8dbf047 100644 | |
--- b/gdk/generated/PixbufFrame.cs | |
+++ a/gdk/generated/PixbufFrame.cs | |
@@ -49,10 +49,11 @@ namespace Gdk { | |
public static Gdk.PixbufFrame Zero = new Gdk.PixbufFrame (); | |
- public static Gdk.PixbufFrame New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.PixbufFrame.Zero; | |
- return (Gdk.PixbufFrame) Marshal.PtrToStructure (raw, typeof (Gdk.PixbufFrame)); | |
+ public static Gdk.PixbufFrame New (IntPtr raw) { | |
+ var ret = Gdk.PixbufFrame.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.PixbufFrame*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Pixdata.cs a/gdk/generated/Pixdata.cs | |
index 3e31a28..066cb6f 100644 | |
--- b/gdk/generated/Pixdata.cs | |
+++ a/gdk/generated/Pixdata.cs | |
@@ -22,10 +22,11 @@ namespace Gdk { | |
public static Gdk.Pixdata Zero = new Gdk.Pixdata (); | |
- public static Gdk.Pixdata New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Pixdata.Zero; | |
- return (Gdk.Pixdata) Marshal.PtrToStructure (raw, typeof (Gdk.Pixdata)); | |
+ public static Gdk.Pixdata New (IntPtr raw) { | |
+ var ret = Gdk.Pixdata.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Pixdata*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/Point.cs a/gdk/generated/Point.cs | |
index 2bf5e71..b25bb9f 100644 | |
--- b/gdk/generated/Point.cs | |
+++ a/gdk/generated/Point.cs | |
@@ -17,10 +17,11 @@ namespace Gdk { | |
public static Gdk.Point Zero = new Gdk.Point (); | |
- public static Gdk.Point New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Point.Zero; | |
- return (Gdk.Point) Marshal.PtrToStructure (raw, typeof (Gdk.Point)); | |
+ public static Gdk.Point New (IntPtr raw) { | |
+ var ret = Gdk.Point.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Point*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/PointerHooks.cs a/gdk/generated/PointerHooks.cs | |
index ca54ce6..ac94b40 100644 | |
--- b/gdk/generated/PointerHooks.cs | |
+++ a/gdk/generated/PointerHooks.cs | |
@@ -15,10 +15,11 @@ namespace Gdk { | |
public static Gdk.PointerHooks Zero = new Gdk.PointerHooks (); | |
- public static Gdk.PointerHooks New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.PointerHooks.Zero; | |
- return (Gdk.PointerHooks) Marshal.PtrToStructure (raw, typeof (Gdk.PointerHooks)); | |
+ public static Gdk.PointerHooks New (IntPtr raw) { | |
+ var ret = Gdk.PointerHooks.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.PointerHooks*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Rectangle.cs a/gdk/generated/Rectangle.cs | |
index c4cd32c..e8c7ba8 100644 | |
--- b/gdk/generated/Rectangle.cs | |
+++ a/gdk/generated/Rectangle.cs | |
@@ -19,10 +19,11 @@ namespace Gdk { | |
public static Gdk.Rectangle Zero = new Gdk.Rectangle (); | |
- public static Gdk.Rectangle New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Rectangle.Zero; | |
- return (Gdk.Rectangle) Marshal.PtrToStructure (raw, typeof (Gdk.Rectangle)); | |
+ public static Gdk.Rectangle New (IntPtr raw) { | |
+ var ret = Gdk.Rectangle.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Rectangle*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gdk/generated/RegionBox.cs a/gdk/generated/RegionBox.cs | |
index e6ad9ab..8c19bd3 100644 | |
--- b/gdk/generated/RegionBox.cs | |
+++ a/gdk/generated/RegionBox.cs | |
@@ -19,10 +19,11 @@ namespace Gdk { | |
public static Gdk.RegionBox Zero = new Gdk.RegionBox (); | |
- public static Gdk.RegionBox New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.RegionBox.Zero; | |
- return (Gdk.RegionBox) Marshal.PtrToStructure (raw, typeof (Gdk.RegionBox)); | |
+ public static Gdk.RegionBox New (IntPtr raw) { | |
+ var ret = Gdk.RegionBox.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.RegionBox*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Segment.cs a/gdk/generated/Segment.cs | |
index 555916c..da967f1 100644 | |
--- b/gdk/generated/Segment.cs | |
+++ a/gdk/generated/Segment.cs | |
@@ -19,10 +19,11 @@ namespace Gdk { | |
public static Gdk.Segment Zero = new Gdk.Segment (); | |
- public static Gdk.Segment New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Segment.Zero; | |
- return (Gdk.Segment) Marshal.PtrToStructure (raw, typeof (Gdk.Segment)); | |
+ public static Gdk.Segment New (IntPtr raw) { | |
+ var ret = Gdk.Segment.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Segment*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/Span.cs a/gdk/generated/Span.cs | |
index dea3d07..90b566e 100644 | |
--- b/gdk/generated/Span.cs | |
+++ a/gdk/generated/Span.cs | |
@@ -18,10 +18,11 @@ namespace Gdk { | |
public static Gdk.Span Zero = new Gdk.Span (); | |
- public static Gdk.Span New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Span.Zero; | |
- return (Gdk.Span) Marshal.PtrToStructure (raw, typeof (Gdk.Span)); | |
+ public static Gdk.Span New (IntPtr raw) { | |
+ var ret = Gdk.Span.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Span*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/TimeCoord.cs a/gdk/generated/TimeCoord.cs | |
index 63c39f8..0393a22 100644 | |
--- b/gdk/generated/TimeCoord.cs | |
+++ a/gdk/generated/TimeCoord.cs | |
@@ -18,7 +18,7 @@ namespace Gdk { | |
public static Gdk.TimeCoord Zero = new Gdk.TimeCoord (); | |
- public static Gdk.TimeCoord New(IntPtr raw) { | |
+ public static Gdk.TimeCoord New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gdk.TimeCoord.Zero; | |
return (Gdk.TimeCoord) Marshal.PtrToStructure (raw, typeof (Gdk.TimeCoord)); | |
diff --git b/gdk/generated/Trapezoid.cs a/gdk/generated/Trapezoid.cs | |
index 88e2fdc..6fd3045 100644 | |
--- b/gdk/generated/Trapezoid.cs | |
+++ a/gdk/generated/Trapezoid.cs | |
@@ -21,10 +21,11 @@ namespace Gdk { | |
public static Gdk.Trapezoid Zero = new Gdk.Trapezoid (); | |
- public static Gdk.Trapezoid New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gdk.Trapezoid.Zero; | |
- return (Gdk.Trapezoid) Marshal.PtrToStructure (raw, typeof (Gdk.Trapezoid)); | |
+ public static Gdk.Trapezoid New (IntPtr raw) { | |
+ var ret = Gdk.Trapezoid.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gdk.Trapezoid*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gdk/generated/WindowAttr.cs a/gdk/generated/WindowAttr.cs | |
index 36ebb60..3f1f806 100644 | |
--- b/gdk/generated/WindowAttr.cs | |
+++ a/gdk/generated/WindowAttr.cs | |
@@ -54,7 +54,7 @@ namespace Gdk { | |
public static Gdk.WindowAttr Zero = new Gdk.WindowAttr (); | |
- public static Gdk.WindowAttr New(IntPtr raw) { | |
+ public static Gdk.WindowAttr New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gdk.WindowAttr.Zero; | |
return (Gdk.WindowAttr) Marshal.PtrToStructure (raw, typeof (Gdk.WindowAttr)); | |
diff --git b/glade/generated/AccelInfo.cs a/glade/generated/AccelInfo.cs | |
index 0bfa8f3..f9a9e6b 100644 | |
--- b/glade/generated/AccelInfo.cs | |
+++ a/glade/generated/AccelInfo.cs | |
@@ -18,7 +18,7 @@ namespace Glade { | |
public static Glade.AccelInfo Zero = new Glade.AccelInfo (); | |
- public static Glade.AccelInfo New(IntPtr raw) { | |
+ public static Glade.AccelInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.AccelInfo.Zero; | |
return (Glade.AccelInfo) Marshal.PtrToStructure (raw, typeof (Glade.AccelInfo)); | |
diff --git b/glade/generated/AtkActionInfo.cs a/glade/generated/AtkActionInfo.cs | |
index e8e5c95..95ec030 100644 | |
--- b/glade/generated/AtkActionInfo.cs | |
+++ a/glade/generated/AtkActionInfo.cs | |
@@ -17,7 +17,7 @@ namespace Glade { | |
public static Glade.AtkActionInfo Zero = new Glade.AtkActionInfo (); | |
- public static Glade.AtkActionInfo New(IntPtr raw) { | |
+ public static Glade.AtkActionInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.AtkActionInfo.Zero; | |
return (Glade.AtkActionInfo) Marshal.PtrToStructure (raw, typeof (Glade.AtkActionInfo)); | |
diff --git b/glade/generated/AtkRelationInfo.cs a/glade/generated/AtkRelationInfo.cs | |
index 38c88e0..2d6c874 100644 | |
--- b/glade/generated/AtkRelationInfo.cs | |
+++ a/glade/generated/AtkRelationInfo.cs | |
@@ -17,7 +17,7 @@ namespace Glade { | |
public static Glade.AtkRelationInfo Zero = new Glade.AtkRelationInfo (); | |
- public static Glade.AtkRelationInfo New(IntPtr raw) { | |
+ public static Glade.AtkRelationInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.AtkRelationInfo.Zero; | |
return (Glade.AtkRelationInfo) Marshal.PtrToStructure (raw, typeof (Glade.AtkRelationInfo)); | |
diff --git b/glade/generated/ChildInfo.cs a/glade/generated/ChildInfo.cs | |
index 785e86d..d49e4d6 100644 | |
--- b/glade/generated/ChildInfo.cs | |
+++ a/glade/generated/ChildInfo.cs | |
@@ -27,7 +27,7 @@ namespace Glade { | |
public static Glade.ChildInfo Zero = new Glade.ChildInfo (); | |
- public static Glade.ChildInfo New(IntPtr raw) { | |
+ public static Glade.ChildInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.ChildInfo.Zero; | |
return (Glade.ChildInfo) Marshal.PtrToStructure (raw, typeof (Glade.ChildInfo)); | |
diff --git b/glade/generated/Interface.cs a/glade/generated/Interface.cs | |
index c0cfd1a..dd8b1e4 100644 | |
--- b/glade/generated/Interface.cs | |
+++ a/glade/generated/Interface.cs | |
@@ -22,7 +22,7 @@ namespace Glade { | |
public static Glade.Interface Zero = new Glade.Interface (); | |
- public static Glade.Interface New(IntPtr raw) { | |
+ public static Glade.Interface New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.Interface.Zero; | |
return (Glade.Interface) Marshal.PtrToStructure (raw, typeof (Glade.Interface)); | |
diff --git b/glade/generated/Property.cs a/glade/generated/Property.cs | |
index 0649040..34f3d16 100644 | |
--- b/glade/generated/Property.cs | |
+++ a/glade/generated/Property.cs | |
@@ -17,7 +17,7 @@ namespace Glade { | |
public static Glade.Property Zero = new Glade.Property (); | |
- public static Glade.Property New(IntPtr raw) { | |
+ public static Glade.Property New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.Property.Zero; | |
return (Glade.Property) Marshal.PtrToStructure (raw, typeof (Glade.Property)); | |
diff --git b/glade/generated/SignalInfo.cs a/glade/generated/SignalInfo.cs | |
index 045dc1b..59b0032 100644 | |
--- b/glade/generated/SignalInfo.cs | |
+++ a/glade/generated/SignalInfo.cs | |
@@ -34,7 +34,7 @@ namespace Glade { | |
public static Glade.SignalInfo Zero = new Glade.SignalInfo (); | |
- public static Glade.SignalInfo New(IntPtr raw) { | |
+ public static Glade.SignalInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.SignalInfo.Zero; | |
return (Glade.SignalInfo) Marshal.PtrToStructure (raw, typeof (Glade.SignalInfo)); | |
diff --git b/glade/generated/WidgetInfo.cs a/glade/generated/WidgetInfo.cs | |
index e026640..9c0c9e1 100644 | |
--- b/glade/generated/WidgetInfo.cs | |
+++ a/glade/generated/WidgetInfo.cs | |
@@ -64,7 +64,7 @@ namespace Glade { | |
public static Glade.WidgetInfo Zero = new Glade.WidgetInfo (); | |
- public static Glade.WidgetInfo New(IntPtr raw) { | |
+ public static Glade.WidgetInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Glade.WidgetInfo.Zero; | |
return (Glade.WidgetInfo) Marshal.PtrToStructure (raw, typeof (Glade.WidgetInfo)); | |
diff --git b/gtk/generated/AccelGroupEntry.cs a/gtk/generated/AccelGroupEntry.cs | |
index 7fde981..eeb8350 100644 | |
--- b/gtk/generated/AccelGroupEntry.cs | |
+++ a/gtk/generated/AccelGroupEntry.cs | |
@@ -18,10 +18,11 @@ namespace Gtk { | |
public static Gtk.AccelGroupEntry Zero = new Gtk.AccelGroupEntry (); | |
- public static Gtk.AccelGroupEntry New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.AccelGroupEntry.Zero; | |
- return (Gtk.AccelGroupEntry) Marshal.PtrToStructure (raw, typeof (Gtk.AccelGroupEntry)); | |
+ public static Gtk.AccelGroupEntry New (IntPtr raw) { | |
+ var ret = Gtk.AccelGroupEntry.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.AccelGroupEntry*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gtk/generated/AccelKey.cs a/gtk/generated/AccelKey.cs | |
index cdd6fe0..dc33602 100644 | |
--- b/gtk/generated/AccelKey.cs | |
+++ a/gtk/generated/AccelKey.cs | |
@@ -33,10 +33,11 @@ namespace Gtk { | |
public static Gtk.AccelKey Zero = new Gtk.AccelKey (); | |
- public static Gtk.AccelKey New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.AccelKey.Zero; | |
- return (Gtk.AccelKey) Marshal.PtrToStructure (raw, typeof (Gtk.AccelKey)); | |
+ public static Gtk.AccelKey New (IntPtr raw) { | |
+ var ret = Gtk.AccelKey.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.AccelKey*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gtk/generated/Arg.cs a/gtk/generated/Arg.cs | |
index 16d1177..cec673c 100644 | |
--- b/gtk/generated/Arg.cs | |
+++ a/gtk/generated/Arg.cs | |
@@ -19,7 +19,7 @@ namespace Gtk { | |
public static Gtk.Arg Zero = new Gtk.Arg (); | |
- public static Gtk.Arg New(IntPtr raw) { | |
+ public static Gtk.Arg New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.Arg.Zero; | |
return (Gtk.Arg) Marshal.PtrToStructure (raw, typeof (Gtk.Arg)); | |
diff --git b/gtk/generated/FileFilterInfo.cs a/gtk/generated/FileFilterInfo.cs | |
index d9f9777..66b6fcb 100644 | |
--- b/gtk/generated/FileFilterInfo.cs | |
+++ a/gtk/generated/FileFilterInfo.cs | |
@@ -20,7 +20,7 @@ namespace Gtk { | |
public static Gtk.FileFilterInfo Zero = new Gtk.FileFilterInfo (); | |
- public static Gtk.FileFilterInfo New(IntPtr raw) { | |
+ public static Gtk.FileFilterInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.FileFilterInfo.Zero; | |
return (Gtk.FileFilterInfo) Marshal.PtrToStructure (raw, typeof (Gtk.FileFilterInfo)); | |
diff --git b/gtk/generated/ImageIconNameData.cs a/gtk/generated/ImageIconNameData.cs | |
index 792af8d..95085e0 100644 | |
--- b/gtk/generated/ImageIconNameData.cs | |
+++ a/gtk/generated/ImageIconNameData.cs | |
@@ -26,7 +26,7 @@ namespace Gtk { | |
public static Gtk.ImageIconNameData Zero = new Gtk.ImageIconNameData (); | |
- public static Gtk.ImageIconNameData New(IntPtr raw) { | |
+ public static Gtk.ImageIconNameData New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.ImageIconNameData.Zero; | |
return (Gtk.ImageIconNameData) Marshal.PtrToStructure (raw, typeof (Gtk.ImageIconNameData)); | |
diff --git b/gtk/generated/ItemFactoryEntry.cs a/gtk/generated/ItemFactoryEntry.cs | |
index d1905f2..0b14aab 100644 | |
--- b/gtk/generated/ItemFactoryEntry.cs | |
+++ a/gtk/generated/ItemFactoryEntry.cs | |
@@ -27,7 +27,7 @@ namespace Gtk { | |
public static Gtk.ItemFactoryEntry Zero = new Gtk.ItemFactoryEntry (); | |
- public static Gtk.ItemFactoryEntry New(IntPtr raw) { | |
+ public static Gtk.ItemFactoryEntry New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.ItemFactoryEntry.Zero; | |
return (Gtk.ItemFactoryEntry) Marshal.PtrToStructure (raw, typeof (Gtk.ItemFactoryEntry)); | |
diff --git b/gtk/generated/MenuEntry.cs a/gtk/generated/MenuEntry.cs | |
index 43ac352..740c0e8 100644 | |
--- b/gtk/generated/MenuEntry.cs | |
+++ a/gtk/generated/MenuEntry.cs | |
@@ -33,7 +33,7 @@ namespace Gtk { | |
public static Gtk.MenuEntry Zero = new Gtk.MenuEntry (); | |
- public static Gtk.MenuEntry New(IntPtr raw) { | |
+ public static Gtk.MenuEntry New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.MenuEntry.Zero; | |
return (Gtk.MenuEntry) Marshal.PtrToStructure (raw, typeof (Gtk.MenuEntry)); | |
diff --git b/gtk/generated/PageRange.cs a/gtk/generated/PageRange.cs | |
index 7d99c81..35d019b 100644 | |
--- b/gtk/generated/PageRange.cs | |
+++ a/gtk/generated/PageRange.cs | |
@@ -17,10 +17,11 @@ namespace Gtk { | |
public static Gtk.PageRange Zero = new Gtk.PageRange (); | |
- public static Gtk.PageRange New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.PageRange.Zero; | |
- return (Gtk.PageRange) Marshal.PtrToStructure (raw, typeof (Gtk.PageRange)); | |
+ public static Gtk.PageRange New (IntPtr raw) { | |
+ var ret = Gtk.PageRange.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.PageRange*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gtk/generated/PrintWin32Devnames.cs a/gtk/generated/PrintWin32Devnames.cs | |
index 8057199..4f471b7 100644 | |
--- b/gtk/generated/PrintWin32Devnames.cs | |
+++ a/gtk/generated/PrintWin32Devnames.cs | |
@@ -20,7 +20,7 @@ namespace Gtk { | |
public static Gtk.PrintWin32Devnames Zero = new Gtk.PrintWin32Devnames (); | |
- public static Gtk.PrintWin32Devnames New(IntPtr raw) { | |
+ public static Gtk.PrintWin32Devnames New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.PrintWin32Devnames.Zero; | |
return (Gtk.PrintWin32Devnames) Marshal.PtrToStructure (raw, typeof (Gtk.PrintWin32Devnames)); | |
diff --git b/gtk/generated/RcProperty.cs a/gtk/generated/RcProperty.cs | |
index 2d47423..b4142f0 100644 | |
--- b/gtk/generated/RcProperty.cs | |
+++ a/gtk/generated/RcProperty.cs | |
@@ -19,7 +19,7 @@ namespace Gtk { | |
public static Gtk.RcProperty Zero = new Gtk.RcProperty (); | |
- public static Gtk.RcProperty New(IntPtr raw) { | |
+ public static Gtk.RcProperty New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.RcProperty.Zero; | |
return (Gtk.RcProperty) Marshal.PtrToStructure (raw, typeof (Gtk.RcProperty)); | |
diff --git b/gtk/generated/RecentData.cs a/gtk/generated/RecentData.cs | |
index 9728193..8fffcf2 100644 | |
--- b/gtk/generated/RecentData.cs | |
+++ a/gtk/generated/RecentData.cs | |
@@ -27,7 +27,7 @@ namespace Gtk { | |
public static Gtk.RecentData Zero = new Gtk.RecentData (); | |
- public static Gtk.RecentData New(IntPtr raw) { | |
+ public static Gtk.RecentData New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.RecentData.Zero; | |
return (Gtk.RecentData) Marshal.PtrToStructure (raw, typeof (Gtk.RecentData)); | |
diff --git b/gtk/generated/RecentFilterInfo.cs a/gtk/generated/RecentFilterInfo.cs | |
index 2172cfa..1002178 100644 | |
--- b/gtk/generated/RecentFilterInfo.cs | |
+++ a/gtk/generated/RecentFilterInfo.cs | |
@@ -32,7 +32,7 @@ namespace Gtk { | |
public static Gtk.RecentFilterInfo Zero = new Gtk.RecentFilterInfo (); | |
- public static Gtk.RecentFilterInfo New(IntPtr raw) { | |
+ public static Gtk.RecentFilterInfo New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.RecentFilterInfo.Zero; | |
return (Gtk.RecentFilterInfo) Marshal.PtrToStructure (raw, typeof (Gtk.RecentFilterInfo)); | |
diff --git b/gtk/generated/Requisition.cs a/gtk/generated/Requisition.cs | |
index 689cb32..68f08be 100644 | |
--- b/gtk/generated/Requisition.cs | |
+++ a/gtk/generated/Requisition.cs | |
@@ -17,10 +17,11 @@ namespace Gtk { | |
public static Gtk.Requisition Zero = new Gtk.Requisition (); | |
- public static Gtk.Requisition New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.Requisition.Zero; | |
- return (Gtk.Requisition) Marshal.PtrToStructure (raw, typeof (Gtk.Requisition)); | |
+ public static Gtk.Requisition New (IntPtr raw) { | |
+ var ret = Gtk.Requisition.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.Requisition*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/RulerMetric.cs a/gtk/generated/RulerMetric.cs | |
index 55937d1..53b3282 100644 | |
--- b/gtk/generated/RulerMetric.cs | |
+++ a/gtk/generated/RulerMetric.cs | |
@@ -22,7 +22,7 @@ namespace Gtk { | |
public static Gtk.RulerMetric Zero = new Gtk.RulerMetric (); | |
- public static Gtk.RulerMetric New(IntPtr raw) { | |
+ public static Gtk.RulerMetric New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.RulerMetric.Zero; | |
return (Gtk.RulerMetric) Marshal.PtrToStructure (raw, typeof (Gtk.RulerMetric)); | |
diff --git b/gtk/generated/SettingsValue.cs a/gtk/generated/SettingsValue.cs | |
index 02165c2..e553f4e 100644 | |
--- b/gtk/generated/SettingsValue.cs | |
+++ a/gtk/generated/SettingsValue.cs | |
@@ -17,7 +17,7 @@ namespace Gtk { | |
public static Gtk.SettingsValue Zero = new Gtk.SettingsValue (); | |
- public static Gtk.SettingsValue New(IntPtr raw) { | |
+ public static Gtk.SettingsValue New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.SettingsValue.Zero; | |
return (Gtk.SettingsValue) Marshal.PtrToStructure (raw, typeof (Gtk.SettingsValue)); | |
diff --git b/gtk/generated/StockItem.cs a/gtk/generated/StockItem.cs | |
index 9a8b47f..9358849 100644 | |
--- b/gtk/generated/StockItem.cs | |
+++ a/gtk/generated/StockItem.cs | |
@@ -20,7 +20,7 @@ namespace Gtk { | |
public static Gtk.StockItem Zero = new Gtk.StockItem (); | |
- public static Gtk.StockItem New(IntPtr raw) { | |
+ public static Gtk.StockItem New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.StockItem.Zero; | |
return (Gtk.StockItem) Marshal.PtrToStructure (raw, typeof (Gtk.StockItem)); | |
diff --git b/gtk/generated/TargetEntry.cs a/gtk/generated/TargetEntry.cs | |
index 7cf924f..7374bff 100644 | |
--- b/gtk/generated/TargetEntry.cs | |
+++ a/gtk/generated/TargetEntry.cs | |
@@ -18,7 +18,7 @@ namespace Gtk { | |
public static Gtk.TargetEntry Zero = new Gtk.TargetEntry (); | |
- public static Gtk.TargetEntry New(IntPtr raw) { | |
+ public static Gtk.TargetEntry New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.TargetEntry.Zero; | |
return (Gtk.TargetEntry) Marshal.PtrToStructure (raw, typeof (Gtk.TargetEntry)); | |
diff --git b/gtk/generated/TargetPair.cs a/gtk/generated/TargetPair.cs | |
index 769691b..7441e01 100644 | |
--- b/gtk/generated/TargetPair.cs | |
+++ a/gtk/generated/TargetPair.cs | |
@@ -26,10 +26,11 @@ namespace Gtk { | |
public static Gtk.TargetPair Zero = new Gtk.TargetPair (); | |
- public static Gtk.TargetPair New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.TargetPair.Zero; | |
- return (Gtk.TargetPair) Marshal.PtrToStructure (raw, typeof (Gtk.TargetPair)); | |
+ public static Gtk.TargetPair New (IntPtr raw) { | |
+ var ret = Gtk.TargetPair.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.TargetPair*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gtk/generated/TextAppearance.cs a/gtk/generated/TextAppearance.cs | |
index afb9a74..a0dc143 100644 | |
--- b/gtk/generated/TextAppearance.cs | |
+++ a/gtk/generated/TextAppearance.cs | |
@@ -67,10 +67,11 @@ namespace Gtk { | |
public static Gtk.TextAppearance Zero = new Gtk.TextAppearance (); | |
- public static Gtk.TextAppearance New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.TextAppearance.Zero; | |
- return (Gtk.TextAppearance) Marshal.PtrToStructure (raw, typeof (Gtk.TextAppearance)); | |
+ public static Gtk.TextAppearance New (IntPtr raw) { | |
+ var ret = Gtk.TextAppearance.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.TextAppearance*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/gtk/generated/TextIter.cs a/gtk/generated/TextIter.cs | |
index 47ab220..67d4a2b 100644 | |
--- b/gtk/generated/TextIter.cs | |
+++ a/gtk/generated/TextIter.cs | |
@@ -29,10 +29,11 @@ namespace Gtk { | |
public static Gtk.TextIter Zero = new Gtk.TextIter (); | |
- public static Gtk.TextIter New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.TextIter.Zero; | |
- return (Gtk.TextIter) Marshal.PtrToStructure (raw, typeof (Gtk.TextIter)); | |
+ public static Gtk.TextIter New (IntPtr raw) { | |
+ var ret = Gtk.TextIter.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.TextIter*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/gtk/generated/TooltipsData.cs a/gtk/generated/TooltipsData.cs | |
index 2055c50..f44b390 100644 | |
--- b/gtk/generated/TooltipsData.cs | |
+++ a/gtk/generated/TooltipsData.cs | |
@@ -36,7 +36,7 @@ namespace Gtk { | |
public static Gtk.TooltipsData Zero = new Gtk.TooltipsData (); | |
- public static Gtk.TooltipsData New(IntPtr raw) { | |
+ public static Gtk.TooltipsData New (IntPtr raw) { | |
if (raw == IntPtr.Zero) | |
return Gtk.TooltipsData.Zero; | |
return (Gtk.TooltipsData) Marshal.PtrToStructure (raw, typeof (Gtk.TooltipsData)); | |
diff --git b/gtk/generated/TreeIter.cs a/gtk/generated/TreeIter.cs | |
index abc0c64..456b2a9 100644 | |
--- b/gtk/generated/TreeIter.cs | |
+++ a/gtk/generated/TreeIter.cs | |
@@ -19,10 +19,11 @@ namespace Gtk { | |
public static Gtk.TreeIter Zero = new Gtk.TreeIter (); | |
- public static Gtk.TreeIter New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Gtk.TreeIter.Zero; | |
- return (Gtk.TreeIter) Marshal.PtrToStructure (raw, typeof (Gtk.TreeIter)); | |
+ public static Gtk.TreeIter New (IntPtr raw) { | |
+ var ret = Gtk.TreeIter.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Gtk.TreeIter*)raw; } | |
+ return ret; | |
} | |
[DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Analysis.cs a/pango/generated/Analysis.cs | |
index cad6288..0e70aca 100644 | |
--- b/pango/generated/Analysis.cs | |
+++ a/pango/generated/Analysis.cs | |
@@ -56,10 +56,11 @@ namespace Pango { | |
public static Pango.Analysis Zero = new Pango.Analysis (); | |
- public static Pango.Analysis New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.Analysis.Zero; | |
- return (Pango.Analysis) Marshal.PtrToStructure (raw, typeof (Pango.Analysis)); | |
+ public static Pango.Analysis New (IntPtr raw) { | |
+ var ret = Pango.Analysis.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.Analysis*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/Color.cs a/pango/generated/Color.cs | |
index 2932393..5b85434 100644 | |
--- b/pango/generated/Color.cs | |
+++ a/pango/generated/Color.cs | |
@@ -18,10 +18,11 @@ namespace Pango { | |
public static Pango.Color Zero = new Pango.Color (); | |
- public static Pango.Color New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.Color.Zero; | |
- return (Pango.Color) Marshal.PtrToStructure (raw, typeof (Pango.Color)); | |
+ public static Pango.Color New (IntPtr raw) { | |
+ var ret = Pango.Color.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.Color*)raw; } | |
+ return ret; | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/GlyphGeometry.cs a/pango/generated/GlyphGeometry.cs | |
index e812042..6b9b80b 100644 | |
--- b/pango/generated/GlyphGeometry.cs | |
+++ a/pango/generated/GlyphGeometry.cs | |
@@ -18,10 +18,11 @@ namespace Pango { | |
public static Pango.GlyphGeometry Zero = new Pango.GlyphGeometry (); | |
- public static Pango.GlyphGeometry New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.GlyphGeometry.Zero; | |
- return (Pango.GlyphGeometry) Marshal.PtrToStructure (raw, typeof (Pango.GlyphGeometry)); | |
+ public static Pango.GlyphGeometry New (IntPtr raw) { | |
+ var ret = Pango.GlyphGeometry.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.GlyphGeometry*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/GlyphInfo.cs a/pango/generated/GlyphInfo.cs | |
index 7c44c91..f6c3ae1 100644 | |
--- b/pango/generated/GlyphInfo.cs | |
+++ a/pango/generated/GlyphInfo.cs | |
@@ -18,10 +18,11 @@ namespace Pango { | |
public static Pango.GlyphInfo Zero = new Pango.GlyphInfo (); | |
- public static Pango.GlyphInfo New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.GlyphInfo.Zero; | |
- return (Pango.GlyphInfo) Marshal.PtrToStructure (raw, typeof (Pango.GlyphInfo)); | |
+ public static Pango.GlyphInfo New (IntPtr raw) { | |
+ var ret = Pango.GlyphInfo.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.GlyphInfo*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/GlyphItem.cs a/pango/generated/GlyphItem.cs | |
index 7bf7b83..aaaeee7 100644 | |
--- b/pango/generated/GlyphItem.cs | |
+++ a/pango/generated/GlyphItem.cs | |
@@ -33,10 +33,11 @@ namespace Pango { | |
public static Pango.GlyphItem Zero = new Pango.GlyphItem (); | |
- public static Pango.GlyphItem New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.GlyphItem.Zero; | |
- return (Pango.GlyphItem) Marshal.PtrToStructure (raw, typeof (Pango.GlyphItem)); | |
+ public static Pango.GlyphItem New (IntPtr raw) { | |
+ var ret = Pango.GlyphItem.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.GlyphItem*)raw; } | |
+ return ret; | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/GlyphVisAttr.cs a/pango/generated/GlyphVisAttr.cs | |
index d493bde..b619299 100644 | |
--- b/pango/generated/GlyphVisAttr.cs | |
+++ a/pango/generated/GlyphVisAttr.cs | |
@@ -31,10 +31,11 @@ namespace Pango { | |
public static Pango.GlyphVisAttr Zero = new Pango.GlyphVisAttr (); | |
- public static Pango.GlyphVisAttr New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.GlyphVisAttr.Zero; | |
- return (Pango.GlyphVisAttr) Marshal.PtrToStructure (raw, typeof (Pango.GlyphVisAttr)); | |
+ public static Pango.GlyphVisAttr New (IntPtr raw) { | |
+ var ret = Pango.GlyphVisAttr.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.GlyphVisAttr*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/LayoutRun.cs a/pango/generated/LayoutRun.cs | |
index f384e1e..2a3371b 100644 | |
--- b/pango/generated/LayoutRun.cs | |
+++ a/pango/generated/LayoutRun.cs | |
@@ -33,10 +33,11 @@ namespace Pango { | |
public static Pango.LayoutRun Zero = new Pango.LayoutRun (); | |
- public static Pango.LayoutRun New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.LayoutRun.Zero; | |
- return (Pango.LayoutRun) Marshal.PtrToStructure (raw, typeof (Pango.LayoutRun)); | |
+ public static Pango.LayoutRun New (IntPtr raw) { | |
+ var ret = Pango.LayoutRun.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.LayoutRun*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/LogAttr.cs a/pango/generated/LogAttr.cs | |
index 1ed8f42..c852732 100644 | |
--- b/pango/generated/LogAttr.cs | |
+++ a/pango/generated/LogAttr.cs | |
@@ -185,10 +185,11 @@ namespace Pango { | |
public static Pango.LogAttr Zero = new Pango.LogAttr (); | |
- public static Pango.LogAttr New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.LogAttr.Zero; | |
- return (Pango.LogAttr) Marshal.PtrToStructure (raw, typeof (Pango.LogAttr)); | |
+ public static Pango.LogAttr New (IntPtr raw) { | |
+ var ret = Pango.LogAttr.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.LogAttr*)raw; } | |
+ return ret; | |
} | |
#endregion | |
diff --git b/pango/generated/Matrix.cs a/pango/generated/Matrix.cs | |
index bd826e6..9883680 100644 | |
--- b/pango/generated/Matrix.cs | |
+++ a/pango/generated/Matrix.cs | |
@@ -21,10 +21,11 @@ namespace Pango { | |
public static Pango.Matrix Zero = new Pango.Matrix (); | |
- public static Pango.Matrix New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.Matrix.Zero; | |
- return (Pango.Matrix) Marshal.PtrToStructure (raw, typeof (Pango.Matrix)); | |
+ public static Pango.Matrix New (IntPtr raw) { | |
+ var ret = Pango.Matrix.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.Matrix*)raw; } | |
+ return ret; | |
} | |
[DllImport("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] | |
diff --git b/pango/generated/Rectangle.cs a/pango/generated/Rectangle.cs | |
index 8727fb7..af796f6 100644 | |
--- b/pango/generated/Rectangle.cs | |
+++ a/pango/generated/Rectangle.cs | |
@@ -19,10 +19,11 @@ namespace Pango { | |
public static Pango.Rectangle Zero = new Pango.Rectangle (); | |
- public static Pango.Rectangle New(IntPtr raw) { | |
- if (raw == IntPtr.Zero) | |
- return Pango.Rectangle.Zero; | |
- return (Pango.Rectangle) Marshal.PtrToStructure (raw, typeof (Pango.Rectangle)); | |
+ public static Pango.Rectangle New (IntPtr raw) { | |
+ var ret = Pango.Rectangle.Zero; | |
+ if (raw != IntPtr.Zero) | |
+ unsafe { *(&ret) = *(Pango.Rectangle*)raw; } | |
+ return ret; | |
} | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment