/// <summary> /// sets callback GetSize in GtkCellRendererClass-Struct /// </summary> /// <param name="gtype"></param> /// <param name="callback"></param> static void OverrideGetSize(GLib.GType gtype, GetSizeNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size")); * raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
static GetSizeNativeDelegate InternalGetSizeNativeDelegate(GLib.GType gtype) { GetSizeNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size")); if (*raw_ptr == IntPtr.Zero) { return(default);
private ulong InternalGetSize() { GetSizeNativeDelegate unmanaged = class_abi.BaseOverride <GetSizeNativeDelegate>(this.LookupGType(), "get_size"); if (unmanaged == null) { return(0); } UIntPtr __result = unmanaged(this.Handle); return((ulong)__result); }
private ulong InternalGetSize() { GetSizeNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size")); unmanaged = (GetSizeNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSizeNativeDelegate)); } if (unmanaged == null) { return(0); } UIntPtr __result = unmanaged(this.Handle); return((ulong)__result); }
static void OverrideGetSize (Gst.GLib.GType gtype, GetSizeNativeDelegate callback) { GstBaseSrcClass class_iface = GetClassStruct (gtype, false); class_iface.GetSize = callback; OverrideClassStruct (gtype, class_iface); }