예제 #1
0
 static void OverrideDragEnd(GLib.GType gtype, DragEndNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("drag_end"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
예제 #2
0
        private void InternalDragEnd(double offset_x, double offset_y)
        {
            DragEndNativeDelegate unmanaged = class_abi.BaseOverride <DragEndNativeDelegate>(this.LookupGType(), "drag_end");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, offset_x, offset_y);
        }
예제 #3
0
        private void InternalDragEnd(double offset_x, double offset_y)
        {
            DragEndNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("drag_end"));
                unmanaged = (DragEndNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragEndNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, offset_x, offset_y);
        }
예제 #4
0
		static void OverrideDragEnd (GLib.GType gtype, DragEndNativeDelegate callback)
		{
			GtkWidgetClass class_iface = GetClassStruct (gtype, false);
			class_iface.DragEnd = callback;
			OverrideClassStruct (gtype, class_iface);
		}