static void OverrideGetAccessibleType(GLib.GType gtype, GetAccessibleTypeNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_accessible_type")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
static void OverrideGetAccessibleType (GLib.GType gtype, GetAccessibleTypeNativeDelegate callback) { AtkObjectFactoryClass class_iface = GetClassStruct (gtype, false); class_iface.GetAccessibleType = callback; OverrideClassStruct (gtype, class_iface); }