Esempio n. 1
0
 static void OverrideDragBegin(GLib.GType gtype, DragBeginNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("drag_begin"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private void InternalDragBegin(double start_x, double start_y)
        {
            DragBeginNativeDelegate unmanaged = class_abi.BaseOverride <DragBeginNativeDelegate>(this.LookupGType(), "drag_begin");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, start_x, start_y);
        }
Esempio n. 3
0
        private void InternalDragBegin(double start_x, double start_y)
        {
            DragBeginNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, start_x, start_y);
        }
Esempio n. 4
0
		static void OverrideDragBegin (GLib.GType gtype, DragBeginNativeDelegate callback)
		{
			GtkWidgetClass class_iface = GetClassStruct (gtype, false);
			class_iface.DragBegin = callback;
			OverrideClassStruct (gtype, class_iface);
		}