unsafe void Invoke(NSDictionary arg1, NSArray <global::CleverTapSDK.CTValidationResult> arg2) { var arg1__handle__ = arg1.GetHandle(); var arg2__handle__ = arg2.GetHandle(); invoker(BlockPointer, arg1__handle__, arg2__handle__); }
public CVPixelBufferPool(NSDictionary poolAttributes, NSDictionary pixelBufferAttributes) { CVReturn ret = CVPixelBufferPoolCreate(IntPtr.Zero, poolAttributes.GetHandle(), pixelBufferAttributes.GetHandle(), out handle); if (ret != CVReturn.Success) { throw new Exception("CVPixelBufferPoolCreate returned " + ret.ToString()); } }
public virtual void SetDefaults(NSDictionary <NSString, NSObject>?defaults) { var defaults__handle__ = defaults.GetHandle(); if (IsDirectBinding) { global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("setDefaults:"), defaults__handle__); } else { global::ApiDefinition.Messaging.void_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("setDefaults:"), defaults__handle__); } }
public CGColorConversionInfo(NSDictionary options, params GColorConversionInfoTriple [] triples) { // the API won't return a valid instance if no triple is given, i.e. at least one is needed. // `null` is accepted to mark the end of the list, not to make it optional if ((triples == null) || (triples.Length == 0)) { throw new ArgumentNullException("triples"); } if (triples.Length > 3) { throw new ArgumentException("A maximum of 3 triples are supported"); } IntPtr o = options.GetHandle(); var first = triples [0]; // there's always one var second = triples.Length > 1 ? triples [1] : empty; var third = triples.Length > 2 ? triples [2] : empty; #if !MONOMAC if (Runtime.IsARM64CallingConvention) { Handle = CGColorConversionInfoCreateFromList_arm64(o, first.Space.GetHandle(), (uint)first.Transform, (int)first.Intent, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, second.Space.GetHandle(), (uint)second.Transform, (int)second.Intent, third.Space.GetHandle(), (uint)third.Transform, (int)third.Intent, IntPtr.Zero); } else { #endif Handle = CGColorConversionInfoCreateFromList(o, first.Space.GetHandle(), first.Transform, first.Intent, second.Space.GetHandle(), second.Transform, second.Intent, third.Space.GetHandle(), third.Transform, third.Intent, IntPtr.Zero); #if !MONOMAC } #endif if (Handle == IntPtr.Zero) { throw new Exception("Failed to create CGColorConverter"); } }
public CGColorConversionInfo(CGColorSpace source, CGColorSpace destination, NSDictionary options) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (destination == null) { throw new ArgumentNullException(nameof(destination)); } Handle = CGColorConversionInfoCreateWithOptions(source.Handle, destination.Handle, options.GetHandle()); if (Handle == IntPtr.Zero) { throw new Exception("Failed to create CGColorConversionInfo"); } }
public CVPixelBufferPool (NSDictionary poolAttributes, NSDictionary pixelBufferAttributes) { CVReturn ret = CVPixelBufferPoolCreate (IntPtr.Zero, poolAttributes.GetHandle (), pixelBufferAttributes.GetHandle (), out handle); if (ret != CVReturn.Success) throw new Exception ("CVPixelBufferPoolCreate returned " + ret.ToString ()); }
public static CMVideoFormatDescription FromHevcParameterSets(List <byte[]> parameterSets, int nalUnitHeaderLength, NSDictionary extensions, out CMFormatDescriptionError error) { if (parameterSets == null) { throw new ArgumentNullException(nameof(parameterSets)); } if (parameterSets.Count < 3) { throw new ArgumentException($"{nameof (parameterSets)} must contain at least three elements"); } if (nalUnitHeaderLength != 1 && nalUnitHeaderLength != 2 && nalUnitHeaderLength != 4) { throw new ArgumentOutOfRangeException(nameof(nalUnitHeaderLength), "must be 1, 2 or 4"); } var handles = new GCHandle [parameterSets.Count]; try { var parameterSetSizes = new nuint [parameterSets.Count]; var parameterSetPtrs = new IntPtr [parameterSets.Count]; for (int i = 0; i < parameterSets.Count; i++) { handles [i] = GCHandle.Alloc(parameterSets [i], GCHandleType.Pinned); // This can't use unsafe code because we need to get the pointer for an unbound number of objects. parameterSetPtrs [i] = handles [i].AddrOfPinnedObject(); parameterSetSizes [i] = (nuint)parameterSets [i].Length; } IntPtr desc; error = CMVideoFormatDescriptionCreateFromHEVCParameterSets(IntPtr.Zero, (nuint)parameterSets.Count, parameterSetPtrs, parameterSetSizes, nalUnitHeaderLength, extensions.GetHandle(), out desc); if (error != CMFormatDescriptionError.None || desc == IntPtr.Zero) { return(null); } return(new CMVideoFormatDescription(desc, true)); } finally { for (int i = 0; i < handles.Length; i++) { if (handles [i].IsAllocated) { handles [i].Free(); } } } }
public void BeginTag(CGPdfTagType tagType, NSDictionary tagProperties) { CGPDFContextBeginTag(Handle, tagType, tagProperties.GetHandle()); }
public static void SetDefaults(this ICleverTapProductConfig This, NSDictionary <NSString, NSObject>?defaults) { var defaults__handle__ = defaults.GetHandle(); global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("setDefaults:"), defaults__handle__); }
static public CGColor?CreateByMatchingToColorSpace(CGColorSpace space, CGColorRenderingIntent intent, CGColor color, NSDictionary options) { var h = CGColorCreateCopyByMatchingToColorSpace(space.GetHandle(), intent, color.GetHandle(), options.GetHandle()); return(h == IntPtr.Zero ? null : new CGColor(h, owns: true)); }