Beispiel #1
0
 static void OverrideGetType(GLib.GType gtype, GetTypeNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_type"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Beispiel #2
0
        private int InternalGetType()
        {
            GetTypeNativeDelegate unmanaged = class_abi.BaseOverride <GetTypeNativeDelegate>(this.LookupGType(), "get_type");

            if (unmanaged == null)
            {
                return(0);
            }

            int __result = unmanaged(this.Handle);

            return(__result);
        }
Beispiel #3
0
        private int InternalGetType()
        {
            GetTypeNativeDelegate unmanaged = null;

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

            int __result = unmanaged(this.Handle);

            return(__result);
        }