Esempio n. 1
0
 static void OverrideChildAttached(GLib.GType gtype, ChildAttachedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("child_attached"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private void InternalChildAttached(Gtk.Widget child)
        {
            ChildAttachedNativeDelegate unmanaged = class_abi.BaseOverride <ChildAttachedNativeDelegate>(this.LookupGType(), "child_attached");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle);
        }
Esempio n. 3
0
        private void InternalChildAttached(Gtk.Widget child)
        {
            ChildAttachedNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle);
        }
Esempio n. 4
0
		static void OverrideChildAttached (GLib.GType gtype, ChildAttachedNativeDelegate callback)
		{
			GtkHandleBoxClass class_iface = GetClassStruct (gtype, false);
			class_iface.ChildAttached = callback;
			OverrideClassStruct (gtype, class_iface);
		}