Exemplo n.º 1
0
 static void OverrideRealize(GLib.GType gtype, RealizeNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("realize"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemplo n.º 2
0
        private bool InternalRealize()
        {
            RealizeNativeDelegate unmanaged = class_abi.BaseOverride <RealizeNativeDelegate>(this.LookupGType(), "realize");

            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            bool   __result = unmanaged(this.Handle, out error);

            return(__result);
        }
Exemplo n.º 3
0
        private bool InternalRealize()
        {
            RealizeNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("realize"));
                unmanaged = (RealizeNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RealizeNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            IntPtr error    = IntPtr.Zero;
            bool   __result = unmanaged(this.Handle, out error);

            return(__result);
        }
Exemplo n.º 4
0
		static void OverrideRealize (GLib.GType gtype, RealizeNativeDelegate callback)
		{
			GtkStyleClass class_iface = GetClassStruct (gtype, false);
			class_iface.Realize = callback;
			OverrideClassStruct (gtype, class_iface);
		}