示例#1
0
 static void OverrideGetObject(GLib.GType gtype, GetObjectNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_object"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private Atk.Object InternalGetObject(int i)
        {
            GetObjectNativeDelegate unmanaged = class_abi.BaseOverride <GetObjectNativeDelegate>(this.LookupGType(), "get_object");

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

            IntPtr __result = unmanaged(this.Handle, i);

            return(GLib.Object.GetObject(__result) as Atk.Object);
        }
示例#3
0
        private Atk.Object InternalGetObject(int i)
        {
            GetObjectNativeDelegate unmanaged = null;

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

            IntPtr __result = unmanaged(this.Handle, i);

            return(GLib.Object.GetObject(__result) as Atk.Object);
        }
示例#4
0
		static void OverrideGetObject (GLib.GType gtype, GetObjectNativeDelegate callback)
		{
			AtkHyperlinkClass class_iface = GetClassStruct (gtype, false);
			class_iface.GetObject = callback;
			OverrideClassStruct (gtype, class_iface);
		}