Пример #1
0
 static void OverrideGetItemLinks(GLib.GType gtype, GetItemLinksNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_item_links"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Пример #2
0
        private void InternalGetItemLinks(int item_index, System.IntPtr links)
        {
            GetItemLinksNativeDelegate unmanaged = class_abi.BaseOverride <GetItemLinksNativeDelegate>(this.LookupGType(), "get_item_links");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, item_index, links);
        }
Пример #3
0
        private void InternalGetItemLinks(int item_index, System.IntPtr links)
        {
            GetItemLinksNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, item_index, links);
        }