mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-18 20:29:46 +02:00
2004-05-29 Mike Kestner <mkestner@ximian.com>
* gnome/CanvasItem.custom : for OnUpdate, Art.SVP can be NULL so treat it as an IntPtr with Zero checks and manual marshaling. svn path=/trunk/gtk-sharp/; revision=28442
This commit is contained in:
parent
2969801044
commit
14168176c2
@ -1,3 +1,8 @@
|
|||||||
|
2004-05-29 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* gnome/CanvasItem.custom : for OnUpdate, Art.SVP can be NULL
|
||||||
|
so treat it as an IntPtr with Zero checks and manual marshaling.
|
||||||
|
|
||||||
2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
|
2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
|
||||||
|
|
||||||
* gtk/CellRenderer.custom: fix GetSize_cb, cell_area can be NULL
|
* gtk/CellRenderer.custom: fix GetSize_cb, cell_area can be NULL
|
||||||
|
@ -182,15 +182,20 @@
|
|||||||
[DllImport("gnomesharpglue")]
|
[DllImport("gnomesharpglue")]
|
||||||
static extern void gnomesharp_canvas_item_override_update (GLib.GType gtype, UpdateDelegate cb);
|
static extern void gnomesharp_canvas_item_override_update (GLib.GType gtype, UpdateDelegate cb);
|
||||||
|
|
||||||
delegate void UpdateDelegate (IntPtr item, IntPtr affine_ptr, ref Art.SVP clip_path, int flags);
|
delegate void UpdateDelegate (IntPtr item, IntPtr affine_ptr, IntPtr clip_path, int flags);
|
||||||
|
|
||||||
static UpdateDelegate UpdateCallback;
|
static UpdateDelegate UpdateCallback;
|
||||||
|
|
||||||
static void Update_cb (IntPtr item, IntPtr affine_ptr, ref Art.SVP clip_path, int flags)
|
static void Update_cb (IntPtr item, IntPtr affine_ptr, IntPtr clip_path_handle, int flags)
|
||||||
{
|
{
|
||||||
CanvasItem obj = GLib.Object.GetObject (item, false) as CanvasItem;
|
CanvasItem obj = GLib.Object.GetObject (item, false) as CanvasItem;
|
||||||
double[] affine = new double [6];
|
double[] affine = new double [6];
|
||||||
Marshal.Copy (affine_ptr, affine, 0, 6);
|
Marshal.Copy (affine_ptr, affine, 0, 6);
|
||||||
|
Art.SVP clip_path;
|
||||||
|
if (clip_path_handle == IntPtr.Zero)
|
||||||
|
clip_path = Art.SVP.Zero;
|
||||||
|
else
|
||||||
|
clip_path = (Art.SVP) Marshal.PtrToStructure (clip_path_handle, typeof(Art.SVP));
|
||||||
obj.OnUpdate (affine, ref clip_path, flags);
|
obj.OnUpdate (affine, ref clip_path, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user