internal CTRunDelegateCallbacks GetCallbacks() { var callbacks = new CTRunDelegateCallbacks() { version = CTRunDelegateVersion.Version1, dealloc = Deallocate, }; var flags = BindingFlags.Public | BindingFlags.Instance; MethodInfo m; if ((m = this.GetType().GetMethod("GetAscent", flags)) != null && m.DeclaringType != typeof(CTRunDelegateOperations)) { callbacks.getAscent = GetAscent; } if ((m = this.GetType().GetMethod("GetDescent", flags)) != null && m.DeclaringType != typeof(CTRunDelegateOperations)) { callbacks.getDescent = GetDescent; } if ((m = this.GetType().GetMethod("GetWidth", flags)) != null && m.DeclaringType != typeof(CTRunDelegateOperations)) { callbacks.getWidth = GetWidth; } return(callbacks); }
internal CTRunDelegateCallbacks GetCallbacks () { var callbacks = new CTRunDelegateCallbacks () { version = CTRunDelegateVersion.Version1, dealloc = Deallocate, }; var flags = BindingFlags.Public | BindingFlags.Instance; MethodInfo m; if ((m = this.GetType ().GetMethod ("GetAscent", flags)) != null && m.DeclaringType != typeof (CTRunDelegateOperations)) { callbacks.getAscent = GetAscent; } if ((m = this.GetType ().GetMethod ("GetDescent", flags)) != null && m.DeclaringType != typeof (CTRunDelegateOperations)) { callbacks.getDescent = GetDescent; } if ((m = this.GetType ().GetMethod ("GetWidth", flags)) != null && m.DeclaringType != typeof (CTRunDelegateOperations)) { callbacks.getWidth = GetWidth; } return callbacks; }
static extern IntPtr CTRunDelegateCreate (CTRunDelegateCallbacks callbacks, IntPtr refCon);
static extern IntPtr CTRunDelegateCreate(CTRunDelegateCallbacks callbacks, IntPtr refCon);