예제 #1
0
        static double Point_cb(IntPtr item, double x, double y, int cx, int cy, out IntPtr actual_item_handle)
        {
            CanvasItem obj = GLib.Object.GetObject(item, false) as CanvasItem;
            CanvasItem actual_item;
            double     result = obj.Point(x, y, cx, cy, out actual_item);

            actual_item_handle = actual_item != null ? actual_item.Handle : IntPtr.Zero;
            return(result);
        }
예제 #2
0
 static bool canvasevent_cb(IntPtr item, IntPtr evnt)
 {
     try {
         CanvasItem item_managed = GLib.Object.GetObject(item, false) as CanvasItem;
         return(item_managed.OnCanvasEvent(Gdk.Event.GetEvent(evnt)));
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call doesn't return
         throw e;
     }
 }
예제 #3
0
        static void Update_cb(IntPtr item, IntPtr affine_ptr, IntPtr clip_path_handle, int flags)
        {
            CanvasItem obj = GLib.Object.GetObject(item, false) as CanvasItem;

            double[] affine = new double [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.Update(affine, ref clip_path, flags);
        }
예제 #4
0
        static void Render_cb(IntPtr handle, ref CanvasBuf buf)
        {
            CanvasItem obj = GLib.Object.GetObject(handle, false) as CanvasItem;

            obj.Render(ref buf);
        }
예제 #5
0
        static void Realize_cb(IntPtr item)
        {
            CanvasItem obj = GLib.Object.GetObject(item, false) as CanvasItem;

            obj.Realize();
        }