示例#1
0
 static void OverrideSetChildProperty(GLib.GType gtype, SetChildPropertyNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("set_child_property"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private void InternalSetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec)
        {
            SetChildPropertyNativeDelegate unmanaged = class_abi.BaseOverride <SetChildPropertyNativeDelegate>(this.LookupGType(), "set_child_property");

            if (unmanaged == null)
            {
                return;
            }

            IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc(value);

            unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle, property_id, native_value, pspec);
            Marshal.FreeHGlobal(native_value);
        }
示例#3
0
        private void InternalSetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec)
        {
            SetChildPropertyNativeDelegate unmanaged = null;

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

            IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc(value);

            unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle, property_id, native_value, pspec);
            Marshal.FreeHGlobal(native_value);
        }
示例#4
0
		static void OverrideSetChildProperty (GLib.GType gtype, SetChildPropertyNativeDelegate callback)
		{
			gtksharp_container_override_set_child_property (gtype.GetClassPtr (), callback);
		}
示例#5
0
		static extern void gtksharp_container_override_set_child_property (IntPtr class_struct, SetChildPropertyNativeDelegate cb);