diff --git a/binding/Binding.Shared/DelegateProxies.shared.cs b/binding/Binding.Shared/DelegateProxies.shared.cs index 5d8101a94e..c09b1f0f19 100644 --- a/binding/Binding.Shared/DelegateProxies.shared.cs +++ b/binding/Binding.Shared/DelegateProxies.shared.cs @@ -25,20 +25,6 @@ internal static partial class DelegateProxies { // normal delegates - [MethodImpl (MethodImplOptions.AggressiveInlining)] - public static T Create (object managedDel, T nativeDel, out GCHandle gch, out IntPtr contextPtr) - { - if (managedDel == null) { - gch = default (GCHandle); - contextPtr = IntPtr.Zero; - return default (T); - } - - gch = GCHandle.Alloc (managedDel); - contextPtr = GCHandle.ToIntPtr (gch); - return nativeDel; - } - [MethodImpl (MethodImplOptions.AggressiveInlining)] public static void Create (object managedDel, out GCHandle gch, out IntPtr contextPtr) { diff --git a/binding/HarfBuzzSharp/Blob.cs b/binding/HarfBuzzSharp/Blob.cs index e982e9d919..12888988c0 100644 --- a/binding/HarfBuzzSharp/Blob.cs +++ b/binding/HarfBuzzSharp/Blob.cs @@ -1,7 +1,6 @@ #nullable disable using System; -using System.ComponentModel; using System.IO; namespace HarfBuzzSharp @@ -84,7 +83,8 @@ public static unsafe Blob FromStream (Stream stream) private static IntPtr Create (IntPtr data, int length, MemoryMode mode, ReleaseDelegate releaseProc) { - var proxy = DelegateProxies.Create (releaseProc, DelegateProxies.ReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (releaseProc, out _, out var ctx); + var proxy = releaseProc != null ? DelegateProxies.DestroyProxy : null; return HarfBuzzApi.hb_blob_create ((void*)data, (uint)length, mode, (void*)ctx, proxy); } diff --git a/binding/HarfBuzzSharp/DelegateProxies.cs b/binding/HarfBuzzSharp/DelegateProxies.cs index 0892a61c9f..3ce0e71303 100644 --- a/binding/HarfBuzzSharp/DelegateProxies.cs +++ b/binding/HarfBuzzSharp/DelegateProxies.cs @@ -1,7 +1,9 @@ #nullable disable using System; -using System.ComponentModel; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +// ReSharper disable PartialMethodParameterNameMismatch namespace HarfBuzzSharp { @@ -11,15 +13,7 @@ namespace HarfBuzzSharp internal static unsafe partial class DelegateProxies { - // references to the proxy implementations - public static readonly DestroyProxyDelegate ReleaseDelegateProxy = ReleaseDelegateProxyImplementation; - public static readonly DestroyProxyDelegate ReleaseDelegateProxyForMulti = ReleaseDelegateProxyImplementationForMulti; - public static readonly ReferenceTableProxyDelegate GetTableDelegateProxy = GetTableDelegateProxyImplementation; - - // internal proxy implementations - - [MonoPInvokeCallback (typeof (DestroyProxyDelegate))] - private static void ReleaseDelegateProxyImplementation (void* context) + private static partial void DestroyProxyImplementation (void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -29,16 +23,7 @@ private static void ReleaseDelegateProxyImplementation (void* context) } } - [MonoPInvokeCallback (typeof (ReferenceTableProxyDelegate))] - private static IntPtr GetTableDelegateProxyImplementation (IntPtr face, uint tag, void* context) - { - GetMultiUserData ((IntPtr)context, out var getTable, out var userData, out _); - var blob = getTable.Invoke (userData, tag); - return blob?.Handle ?? IntPtr.Zero; - } - - [MonoPInvokeCallback (typeof (DestroyProxyDelegate))] - private static void ReleaseDelegateProxyImplementationForMulti (void* context) + private static partial void DestroyProxyImplementationForMulti (void* context) { var del = GetMulti ((IntPtr)context, out var gch); try { @@ -47,5 +32,12 @@ private static void ReleaseDelegateProxyImplementationForMulti (void* context) gch.Free (); } } + + private static partial IntPtr ReferenceTableProxyImplementation (IntPtr face, uint tag, void* context) + { + GetMultiUserData ((IntPtr)context, out var getTable, out var userData, out _); + var blob = getTable.Invoke (userData, tag); + return blob?.Handle ?? IntPtr.Zero; + } } } diff --git a/binding/HarfBuzzSharp/DelegateProxies.font.cs b/binding/HarfBuzzSharp/DelegateProxies.font.cs index 85deb16747..e349e85a45 100644 --- a/binding/HarfBuzzSharp/DelegateProxies.font.cs +++ b/binding/HarfBuzzSharp/DelegateProxies.font.cs @@ -1,4 +1,5 @@ #nullable disable +// ReSharper disable PartialMethodParameterNameMismatch using System; @@ -30,24 +31,9 @@ namespace HarfBuzzSharp internal static unsafe partial class DelegateProxies { - // references to the proxy implementations - public static readonly FontGetFontExtentsProxyDelegate FontExtentsProxy = FontExtentsProxyImplementation; - public static readonly FontGetNominalGlyphProxyDelegate NominalGlyphProxy = NominalGlyphProxyImplementation; - public static readonly FontGetVariationGlyphProxyDelegate VariationGlyphProxy = VariationGlyphProxyImplementation; - public static readonly FontGetNominalGlyphsProxyDelegate NominalGlyphsProxy = NominalGlyphsProxyImplementation; - public static readonly FontGetGlyphAdvanceProxyDelegate GlyphAdvanceProxy = GlyphAdvanceProxyImplementation; - public static readonly FontGetGlyphAdvancesProxyDelegate GlyphAdvancesProxy = GlyphAdvancesProxyImplementation; - public static readonly FontGetGlyphOriginProxyDelegate GlyphOriginProxy = GlyphOriginProxyImplementation; - public static readonly FontGetGlyphKerningProxyDelegate GlyphKerningProxy = GlyphKerningProxyImplementation; - public static readonly FontGetGlyphExtentsProxyDelegate GlyphExtentsProxy = GlyphExtentsProxyImplementation; - public static readonly FontGetGlyphContourPointProxyDelegate GlyphContourPointProxy = GlyphContourPointProxyImplementation; - public static readonly FontGetGlyphNameProxyDelegate GlyphNameProxy = GlyphNameProxyImplementation; - public static readonly FontGetGlyphFromNameProxyDelegate GlyphFromNameProxy = GlyphFromNameProxyImplementation; - // internal proxy implementations - [MonoPInvokeCallback (typeof (FontGetFontExtentsProxyDelegate))] - private static bool FontExtentsProxyImplementation (IntPtr font, void* fontData, FontExtents* extents, void* context) + private static partial bool FontGetFontExtentsProxyImplementation (IntPtr font, void* fontData, FontExtents* extents, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -57,8 +43,7 @@ private static bool FontExtentsProxyImplementation (IntPtr font, void* fontData, return result; } - [MonoPInvokeCallback (typeof (FontGetNominalGlyphProxyDelegate))] - private static bool NominalGlyphProxyImplementation (IntPtr font, void* fontData, uint unicode, uint* glyph, void* context) + private static partial bool FontGetNominalGlyphProxyImplementation (IntPtr font, void* fontData, uint unicode, uint* glyph, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -68,8 +53,7 @@ private static bool NominalGlyphProxyImplementation (IntPtr font, void* fontData return result; } - [MonoPInvokeCallback (typeof (FontGetNominalGlyphsProxyDelegate))] - private static uint NominalGlyphsProxyImplementation (IntPtr font, void* fontData, uint count, uint* firstUnicode, uint unicodeStride, uint* firstGlyph, uint glyphStride, void* context) + private static partial uint FontGetNominalGlyphsProxyImplementation (IntPtr font, void* fontData, uint count, uint* firstUnicode, uint unicodeStride, uint* firstGlyph, uint glyphStride, void* context) { var del = GetMulti ((IntPtr)context, out _); var unicodes = new ReadOnlySpan (firstUnicode, (int)count); @@ -78,8 +62,7 @@ private static uint NominalGlyphsProxyImplementation (IntPtr font, void* fontDat return del.Invoke (userData.Font, userData.FontData, count, unicodes, glyphs); } - [MonoPInvokeCallback (typeof (FontGetVariationGlyphProxyDelegate))] - private static bool VariationGlyphProxyImplementation (IntPtr font, void* fontData, uint unicode, uint variationSelector, uint* glyph, void* context) + private static partial bool FontGetVariationGlyphProxyImplementation (IntPtr font, void* fontData, uint unicode, uint variationSelector, uint* glyph, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -89,16 +72,14 @@ private static bool VariationGlyphProxyImplementation (IntPtr font, void* fontDa return result; } - [MonoPInvokeCallback (typeof (FontGetGlyphAdvanceProxyDelegate))] - private static int GlyphAdvanceProxyImplementation (IntPtr font, void* fontData, uint glyph, void* context) + private static partial int FontGetGlyphAdvanceProxyImplementation (IntPtr font, void* fontData, uint glyph, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); return del.Invoke (userData.Font, userData.FontData, glyph); } - [MonoPInvokeCallback (typeof (FontGetGlyphAdvancesProxyDelegate))] - private static void GlyphAdvancesProxyImplementation (IntPtr font, void* fontData, uint count, uint* firstGlyph, uint glyphStride, int* firstAdvance, uint advanceStride, void* context) + private static partial void FontGetGlyphAdvancesProxyImplementation (IntPtr font, void* fontData, uint count, uint* firstGlyph, uint glyphStride, int* firstAdvance, uint advanceStride, void* context) { var del = GetMulti ((IntPtr)context, out _); var glyphs = new ReadOnlySpan (firstGlyph, (int)count); @@ -107,8 +88,7 @@ private static void GlyphAdvancesProxyImplementation (IntPtr font, void* fontDat del.Invoke (userData.Font, userData.FontData, count, glyphs, advances); } - [MonoPInvokeCallback (typeof (FontGetGlyphOriginProxyDelegate))] - private static bool GlyphOriginProxyImplementation (IntPtr font, void* fontData, uint glyph, int* x, int* y, void* context) + private static partial bool FontGetGlyphOriginProxyImplementation (IntPtr font, void* fontData, uint glyph, int* x, int* y, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -120,16 +100,14 @@ private static bool GlyphOriginProxyImplementation (IntPtr font, void* fontData, return result; } - [MonoPInvokeCallback (typeof (FontGetGlyphKerningProxyDelegate))] - private static int GlyphKerningProxyImplementation (IntPtr font, void* fontData, uint firstGlyph, uint secondGlyph, void* context) + private static partial int FontGetGlyphKerningProxyImplementation (IntPtr font, void* fontData, uint firstGlyph, uint secondGlyph, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); return del.Invoke (userData.Font, userData.FontData, firstGlyph, secondGlyph); } - [MonoPInvokeCallback (typeof (FontGetGlyphExtentsProxyDelegate))] - private static bool GlyphExtentsProxyImplementation (IntPtr font, void* fontData, uint glyph, GlyphExtents* extents, void* context) + private static partial bool FontGetGlyphExtentsProxyImplementation (IntPtr font, void* fontData, uint glyph, GlyphExtents* extents, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -139,8 +117,7 @@ private static bool GlyphExtentsProxyImplementation (IntPtr font, void* fontData return result; } - [MonoPInvokeCallback (typeof (FontGetGlyphContourPointProxyDelegate))] - private static bool GlyphContourPointProxyImplementation (IntPtr font, void* fontData, uint glyph, uint pointIndex, int* x, int* y, void* context) + private static partial bool FontGetGlyphContourPointProxyImplementation (IntPtr font, void* fontData, uint glyph, uint pointIndex, int* x, int* y, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -152,8 +129,7 @@ private static bool GlyphContourPointProxyImplementation (IntPtr font, void* fon return result; } - [MonoPInvokeCallback (typeof (FontGetGlyphNameProxyDelegate))] - private static bool GlyphNameProxyImplementation (IntPtr font, void* fontData, uint glyph, void* nameBuffer, uint size, void* context) + private static partial bool FontGetGlyphNameProxyImplementation (IntPtr font, void* fontData, uint glyph, void* nameBuffer, uint size, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); @@ -166,8 +142,7 @@ private static bool GlyphNameProxyImplementation (IntPtr font, void* fontData, u return result; } - [MonoPInvokeCallback (typeof (FontGetGlyphFromNameProxyDelegate))] - private static bool GlyphFromNameProxyImplementation (IntPtr font, void* fontData, void* name, int len, uint* glyph, void* context) + private static partial bool FontGetGlyphFromNameProxyImplementation (IntPtr font, void* fontData, void* name, int len, uint* glyph, void* context) { var del = GetMulti ((IntPtr)context, out _); var userData = GetMultiUserData ((IntPtr)fontData, out _); diff --git a/binding/HarfBuzzSharp/DelegateProxies.unicode.cs b/binding/HarfBuzzSharp/DelegateProxies.unicode.cs index 926692288a..a1272f8a70 100644 --- a/binding/HarfBuzzSharp/DelegateProxies.unicode.cs +++ b/binding/HarfBuzzSharp/DelegateProxies.unicode.cs @@ -1,6 +1,9 @@ #nullable disable +// ReSharper disable PartialMethodParameterNameMismatch using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace HarfBuzzSharp { @@ -18,43 +21,31 @@ namespace HarfBuzzSharp internal static unsafe partial class DelegateProxies { - public static readonly UnicodeCombiningClassProxyDelegate CombiningClassProxy = CombiningClassProxyImplementation; - public static readonly UnicodeGeneralCategoryProxyDelegate GeneralCategoryProxy = GeneralCategoryProxyImplementation; - public static readonly UnicodeMirroringProxyDelegate MirroringProxy = MirroringProxyImplementation; - public static readonly UnicodeScriptProxyDelegate ScriptProxy = ScriptProxyImplementation; - public static readonly UnicodeComposeProxyDelegate ComposeProxy = ComposeProxyImplementation; - public static readonly UnicodeDecomposeProxyDelegate DecomposeProxy = DecomposeProxyImplementation; - - [MonoPInvokeCallback (typeof (UnicodeCombiningClassProxyDelegate))] - private static int CombiningClassProxyImplementation (IntPtr ufuncs, uint unicode, void* context) + private static partial int UnicodeCombiningClassProxyImplementation (IntPtr ufuncs, uint unicode, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); return (int)del.Invoke (functions, unicode); } - [MonoPInvokeCallback (typeof (UnicodeGeneralCategoryProxyDelegate))] - private static int GeneralCategoryProxyImplementation (IntPtr ufuncs, uint unicode, void* context) + private static partial int UnicodeGeneralCategoryProxyImplementation (IntPtr ufuncs, uint unicode, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); return (int)del.Invoke (functions, unicode); } - [MonoPInvokeCallback (typeof (UnicodeMirroringProxyDelegate))] - private static uint MirroringProxyImplementation (IntPtr ufuncs, uint unicode, void* context) + private static partial uint UnicodeMirroringProxyImplementation (IntPtr ufuncs, uint unicode, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); return del.Invoke (functions, unicode); } - [MonoPInvokeCallback (typeof (UnicodeScriptProxyDelegate))] - private static uint ScriptProxyImplementation (IntPtr ufuncs, uint unicode, void* context) + private static partial uint UnicodeScriptProxyImplementation (IntPtr ufuncs, uint unicode, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); return del.Invoke (functions, unicode); } - [MonoPInvokeCallback (typeof (UnicodeComposeProxyDelegate))] - private static bool ComposeProxyImplementation (IntPtr ufuncs, uint a, uint b, uint* ab, void* context) + private static partial bool UnicodeComposeProxyImplementation (IntPtr ufuncs, uint a, uint b, uint* ab, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); var result = del.Invoke (functions, a, b, out var abManaged); @@ -63,8 +54,7 @@ private static bool ComposeProxyImplementation (IntPtr ufuncs, uint a, uint b, u return result; } - [MonoPInvokeCallback (typeof (UnicodeDecomposeProxyDelegate))] - private static bool DecomposeProxyImplementation (IntPtr ufuncs, uint ab, uint* a, uint* b, void* context) + private static partial bool UnicodeDecomposeProxyImplementation (IntPtr ufuncs, uint ab, uint* a, uint* b, void* context) { GetMultiUserData ((IntPtr)context, out var del, out var functions, out _); var result = del.Invoke (functions, ab, out var aManaged, out var bManaged); diff --git a/binding/HarfBuzzSharp/Face.cs b/binding/HarfBuzzSharp/Face.cs index aae4f36852..d91e1fc9ba 100644 --- a/binding/HarfBuzzSharp/Face.cs +++ b/binding/HarfBuzzSharp/Face.cs @@ -41,9 +41,9 @@ public Face (GetTableDelegate getTable, ReleaseDelegate destroy) throw new ArgumentNullException (nameof (getTable)); Handle = HarfBuzzApi.hb_face_create_for_tables ( - DelegateProxies.GetTableDelegateProxy, + DelegateProxies.ReferenceTableProxy, (void*)DelegateProxies.CreateMultiUserData (getTable, destroy, this), - DelegateProxies.ReleaseDelegateProxyForMulti); + DelegateProxies.DestroyProxyForMulti); } internal Face (IntPtr handle) diff --git a/binding/HarfBuzzSharp/Font.cs b/binding/HarfBuzzSharp/Font.cs index a66930d780..13b6676aa3 100644 --- a/binding/HarfBuzzSharp/Font.cs +++ b/binding/HarfBuzzSharp/Font.cs @@ -54,7 +54,7 @@ public void SetFontFunctions (FontFunctions fontFunctions, object fontData, Rele var container = new FontUserData (this, fontData); var ctx = DelegateProxies.CreateMultiUserData (destroy, container); - HarfBuzzApi.hb_font_set_funcs (Handle, fontFunctions.Handle, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + HarfBuzzApi.hb_font_set_funcs (Handle, fontFunctions.Handle, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void GetScale (out int xScale, out int yScale) diff --git a/binding/HarfBuzzSharp/FontFunctions.cs b/binding/HarfBuzzSharp/FontFunctions.cs index ea05808ed7..7b48aa9935 100644 --- a/binding/HarfBuzzSharp/FontFunctions.cs +++ b/binding/HarfBuzzSharp/FontFunctions.cs @@ -32,7 +32,7 @@ public void SetHorizontalFontExtentsDelegate (FontExtentsDelegate del, ReleaseDe var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_font_h_extents_func ( - Handle, DelegateProxies.FontExtentsProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetFontExtentsProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetVerticalFontExtentsDelegate (FontExtentsDelegate del, ReleaseDelegate destroy = null) @@ -42,7 +42,7 @@ public void SetVerticalFontExtentsDelegate (FontExtentsDelegate del, ReleaseDele var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_font_v_extents_func ( - Handle, DelegateProxies.FontExtentsProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetFontExtentsProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetNominalGlyphDelegate (NominalGlyphDelegate del, ReleaseDelegate destroy = null) @@ -52,7 +52,7 @@ public void SetNominalGlyphDelegate (NominalGlyphDelegate del, ReleaseDelegate d var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_nominal_glyph_func ( - Handle, DelegateProxies.NominalGlyphProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetNominalGlyphProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetNominalGlyphsDelegate (NominalGlyphsDelegate del, ReleaseDelegate destroy = null) @@ -62,7 +62,7 @@ public void SetNominalGlyphsDelegate (NominalGlyphsDelegate del, ReleaseDelegate var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_nominal_glyphs_func ( - Handle, DelegateProxies.NominalGlyphsProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetNominalGlyphsProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetVariationGlyphDelegate (VariationGlyphDelegate del, ReleaseDelegate destroy = null) @@ -72,7 +72,7 @@ public void SetVariationGlyphDelegate (VariationGlyphDelegate del, ReleaseDelega var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_variation_glyph_func ( - Handle, DelegateProxies.VariationGlyphProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetVariationGlyphProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetHorizontalGlyphAdvanceDelegate (GlyphAdvanceDelegate del, ReleaseDelegate destroy = null) @@ -82,7 +82,7 @@ public void SetHorizontalGlyphAdvanceDelegate (GlyphAdvanceDelegate del, Release var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_advance_func ( - Handle, DelegateProxies.GlyphAdvanceProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphAdvanceProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetVerticalGlyphAdvanceDelegate (GlyphAdvanceDelegate del, ReleaseDelegate destroy = null) @@ -92,7 +92,7 @@ public void SetVerticalGlyphAdvanceDelegate (GlyphAdvanceDelegate del, ReleaseDe var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_v_advance_func ( - Handle, DelegateProxies.GlyphAdvanceProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphAdvanceProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetHorizontalGlyphAdvancesDelegate (GlyphAdvancesDelegate del, ReleaseDelegate destroy = null) @@ -102,7 +102,7 @@ public void SetHorizontalGlyphAdvancesDelegate (GlyphAdvancesDelegate del, Relea var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_advances_func ( - Handle, DelegateProxies.GlyphAdvancesProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphAdvancesProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetVerticalGlyphAdvancesDelegate (GlyphAdvancesDelegate del, ReleaseDelegate destroy = null) @@ -112,7 +112,7 @@ public void SetVerticalGlyphAdvancesDelegate (GlyphAdvancesDelegate del, Release var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_v_advances_func ( - Handle, DelegateProxies.GlyphAdvancesProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphAdvancesProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetHorizontalGlyphOriginDelegate (GlyphOriginDelegate del, ReleaseDelegate destroy = null) @@ -122,7 +122,7 @@ public void SetHorizontalGlyphOriginDelegate (GlyphOriginDelegate del, ReleaseDe var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_origin_func ( - Handle, DelegateProxies.GlyphOriginProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphOriginProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetVerticalGlyphOriginDelegate (GlyphOriginDelegate del, ReleaseDelegate destroy = null) @@ -132,7 +132,7 @@ public void SetVerticalGlyphOriginDelegate (GlyphOriginDelegate del, ReleaseDele var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_v_origin_func ( - Handle, DelegateProxies.GlyphOriginProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphOriginProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetHorizontalGlyphKerningDelegate (GlyphKerningDelegate del, ReleaseDelegate destroy = null) @@ -142,7 +142,7 @@ public void SetHorizontalGlyphKerningDelegate (GlyphKerningDelegate del, Release var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_kerning_func ( - Handle, DelegateProxies.GlyphKerningProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphKerningProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetGlyphExtentsDelegate (GlyphExtentsDelegate del, ReleaseDelegate destroy = null) @@ -152,7 +152,7 @@ public void SetGlyphExtentsDelegate (GlyphExtentsDelegate del, ReleaseDelegate d var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_extents_func ( - Handle, DelegateProxies.GlyphExtentsProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphExtentsProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetGlyphContourPointDelegate (GlyphContourPointDelegate del, ReleaseDelegate destroy = null) { @@ -161,7 +161,7 @@ public void SetGlyphContourPointDelegate (GlyphContourPointDelegate del, Release var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_contour_point_func ( - Handle, DelegateProxies.GlyphContourPointProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphContourPointProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetGlyphNameDelegate (GlyphNameDelegate del, ReleaseDelegate destroy = null) @@ -171,7 +171,7 @@ public void SetGlyphNameDelegate (GlyphNameDelegate del, ReleaseDelegate destroy var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_name_func ( - Handle, DelegateProxies.GlyphNameProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphNameProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetGlyphFromNameDelegate (GlyphFromNameDelegate del, ReleaseDelegate destroy = null) @@ -181,7 +181,7 @@ public void SetGlyphFromNameDelegate (GlyphFromNameDelegate del, ReleaseDelegate var ctx = DelegateProxies.CreateMulti (del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_from_name_func ( - Handle, DelegateProxies.GlyphFromNameProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.FontGetGlyphFromNameProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } protected override void Dispose (bool disposing) => diff --git a/binding/HarfBuzzSharp/HarfBuzzApi.generated.cs b/binding/HarfBuzzSharp/HarfBuzzApi.generated.cs index b03c62f603..871ebbf231 100644 --- a/binding/HarfBuzzSharp/HarfBuzzApi.generated.cs +++ b/binding/HarfBuzzSharp/HarfBuzzApi.generated.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; #region Namespaces @@ -31,8 +32,13 @@ internal unsafe partial class HarfBuzzApi // extern hb_blob_t* hb_blob_copy_writable_or_fail(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_copy_writable_or_fail (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_copy_writable_or_fail (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -45,8 +51,13 @@ internal static hb_blob_t hb_blob_copy_writable_or_fail (hb_blob_t blob) => // extern hb_blob_t* hb_blob_create(const char* data, unsigned int length, hb_memory_mode_t mode, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_create (/* char */ void* data, UInt32 length, MemoryMode mode, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_create (/* char */ void* data, UInt32 length, MemoryMode mode, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -59,8 +70,13 @@ internal static hb_blob_t hb_blob_create (/* char */ void* data, UInt32 length, // extern hb_blob_t* hb_blob_create_from_file(const char* file_name) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_create_from_file ([MarshalAs (UnmanagedType.LPStr)] String file_name); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_create_from_file ([MarshalAs (UnmanagedType.LPStr)] String file_name); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -73,8 +89,13 @@ internal static hb_blob_t hb_blob_create_from_file ([MarshalAs (UnmanagedType.LP // extern hb_blob_t* hb_blob_create_from_file_or_fail(const char* file_name) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_create_from_file_or_fail (/* char */ void* file_name); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_create_from_file_or_fail (/* char */ void* file_name); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -87,8 +108,13 @@ internal static hb_blob_t hb_blob_create_from_file_or_fail (/* char */ void* fil // extern hb_blob_t* hb_blob_create_or_fail(const char* data, unsigned int length, hb_memory_mode_t mode, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_create_or_fail (/* char */ void* data, UInt32 length, MemoryMode mode, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_create_or_fail (/* char */ void* data, UInt32 length, MemoryMode mode, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -101,8 +127,13 @@ internal static hb_blob_t hb_blob_create_or_fail (/* char */ void* data, UInt32 // extern hb_blob_t* hb_blob_create_sub_blob(hb_blob_t* parent, unsigned int offset, unsigned int length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_create_sub_blob (hb_blob_t parent, UInt32 offset, UInt32 length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_create_sub_blob (hb_blob_t parent, UInt32 offset, UInt32 length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -115,8 +146,13 @@ internal static hb_blob_t hb_blob_create_sub_blob (hb_blob_t parent, UInt32 offs // extern void hb_blob_destroy(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_blob_destroy (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_blob_destroy (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -129,8 +165,13 @@ internal static void hb_blob_destroy (hb_blob_t blob) => // extern const char* hb_blob_get_data(hb_blob_t* blob, unsigned int* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_blob_get_data (hb_blob_t blob, UInt32* length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_blob_get_data (hb_blob_t blob, UInt32* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -143,8 +184,13 @@ private partial class Delegates { // extern char* hb_blob_get_data_writable(hb_blob_t* blob, unsigned int* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_blob_get_data_writable (hb_blob_t blob, UInt32* length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_blob_get_data_writable (hb_blob_t blob, UInt32* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -157,8 +203,13 @@ private partial class Delegates { // extern hb_blob_t* hb_blob_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -171,8 +222,13 @@ internal static hb_blob_t hb_blob_get_empty () => // extern unsigned int hb_blob_get_length(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_blob_get_length (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_blob_get_length (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -185,9 +241,15 @@ internal static UInt32 hb_blob_get_length (hb_blob_t blob) => // extern hb_bool_t hb_blob_is_immutable(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_blob_is_immutable (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_blob_is_immutable (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -201,8 +263,13 @@ internal static bool hb_blob_is_immutable (hb_blob_t blob) => // extern void hb_blob_make_immutable(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_blob_make_immutable (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_blob_make_immutable (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -215,8 +282,13 @@ internal static void hb_blob_make_immutable (hb_blob_t blob) => // extern hb_blob_t* hb_blob_reference(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_blob_reference (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_blob_reference (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -233,8 +305,13 @@ internal static hb_blob_t hb_blob_reference (hb_blob_t blob) => // extern void hb_buffer_add(hb_buffer_t* buffer, hb_codepoint_t codepoint, unsigned int cluster) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add (hb_buffer_t buffer, UInt32 codepoint, UInt32 cluster); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add (hb_buffer_t buffer, UInt32 codepoint, UInt32 cluster); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -247,8 +324,13 @@ internal static void hb_buffer_add (hb_buffer_t buffer, UInt32 codepoint, UInt32 // extern void hb_buffer_add_codepoints(hb_buffer_t* buffer, const hb_codepoint_t* text, int text_length, unsigned int item_offset, int item_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add_codepoints (hb_buffer_t buffer, UInt32* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add_codepoints (hb_buffer_t buffer, UInt32* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -261,8 +343,13 @@ internal static void hb_buffer_add_codepoints (hb_buffer_t buffer, UInt32* text, // extern void hb_buffer_add_latin1(hb_buffer_t* buffer, const uint8_t* text, int text_length, unsigned int item_offset, int item_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add_latin1 (hb_buffer_t buffer, Byte* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add_latin1 (hb_buffer_t buffer, Byte* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -275,8 +362,13 @@ internal static void hb_buffer_add_latin1 (hb_buffer_t buffer, Byte* text, Int32 // extern void hb_buffer_add_utf16(hb_buffer_t* buffer, const uint16_t* text, int text_length, unsigned int item_offset, int item_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add_utf16 (hb_buffer_t buffer, UInt16* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add_utf16 (hb_buffer_t buffer, UInt16* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -289,8 +381,13 @@ internal static void hb_buffer_add_utf16 (hb_buffer_t buffer, UInt16* text, Int3 // extern void hb_buffer_add_utf32(hb_buffer_t* buffer, const uint32_t* text, int text_length, unsigned int item_offset, int item_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add_utf32 (hb_buffer_t buffer, UInt32* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add_utf32 (hb_buffer_t buffer, UInt32* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -303,8 +400,13 @@ internal static void hb_buffer_add_utf32 (hb_buffer_t buffer, UInt32* text, Int3 // extern void hb_buffer_add_utf8(hb_buffer_t* buffer, const char* text, int text_length, unsigned int item_offset, int item_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_add_utf8 (hb_buffer_t buffer, /* char */ void* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_add_utf8 (hb_buffer_t buffer, /* char */ void* text, Int32 text_length, UInt32 item_offset, Int32 item_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -317,9 +419,15 @@ internal static void hb_buffer_add_utf8 (hb_buffer_t buffer, /* char */ void* te // extern hb_bool_t hb_buffer_allocation_successful(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_allocation_successful (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_allocation_successful (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -333,8 +441,13 @@ internal static bool hb_buffer_allocation_successful (hb_buffer_t buffer) => // extern void hb_buffer_append(hb_buffer_t* buffer, hb_buffer_t* source, unsigned int start, unsigned int end) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_append (hb_buffer_t buffer, hb_buffer_t source, UInt32 start, UInt32 end); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_append (hb_buffer_t buffer, hb_buffer_t source, UInt32 start, UInt32 end); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -347,8 +460,13 @@ internal static void hb_buffer_append (hb_buffer_t buffer, hb_buffer_t source, U // extern void hb_buffer_clear_contents(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_clear_contents (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_clear_contents (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -361,8 +479,13 @@ internal static void hb_buffer_clear_contents (hb_buffer_t buffer) => // extern hb_buffer_t* hb_buffer_create() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_buffer_t hb_buffer_create (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_buffer_t hb_buffer_create (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -375,9 +498,15 @@ internal static hb_buffer_t hb_buffer_create () => // extern hb_bool_t hb_buffer_deserialize_glyphs(hb_buffer_t* buffer, const char* buf, int buf_len, const char** end_ptr, hb_font_t* font, hb_buffer_serialize_format_t format) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_deserialize_glyphs (hb_buffer_t buffer, [MarshalAs (UnmanagedType.LPStr)] String buf, Int32 buf_len, /* char */ void** end_ptr, hb_font_t font, SerializeFormat format); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_deserialize_glyphs (hb_buffer_t buffer, [MarshalAs (UnmanagedType.LPStr)] String buf, Int32 buf_len, /* char */ void** end_ptr, hb_font_t font, SerializeFormat format); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -391,9 +520,15 @@ internal static bool hb_buffer_deserialize_glyphs (hb_buffer_t buffer, [MarshalA // extern hb_bool_t hb_buffer_deserialize_unicode(hb_buffer_t* buffer, const char* buf, int buf_len, const char** end_ptr, hb_buffer_serialize_format_t format) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_deserialize_unicode (hb_buffer_t buffer, /* char */ void* buf, Int32 buf_len, /* char */ void** end_ptr, SerializeFormat format); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_deserialize_unicode (hb_buffer_t buffer, /* char */ void* buf, Int32 buf_len, /* char */ void** end_ptr, SerializeFormat format); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -407,8 +542,13 @@ internal static bool hb_buffer_deserialize_unicode (hb_buffer_t buffer, /* char // extern void hb_buffer_destroy(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_destroy (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_destroy (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -421,8 +561,13 @@ internal static void hb_buffer_destroy (hb_buffer_t buffer) => // extern hb_buffer_diff_flags_t hb_buffer_diff(hb_buffer_t* buffer, hb_buffer_t* reference, hb_codepoint_t dottedcircle_glyph, unsigned int position_fuzz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial BufferDiffFlags hb_buffer_diff (hb_buffer_t buffer, hb_buffer_t reference, UInt32 dottedcircle_glyph, UInt32 position_fuzz); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern BufferDiffFlags hb_buffer_diff (hb_buffer_t buffer, hb_buffer_t reference, UInt32 dottedcircle_glyph, UInt32 position_fuzz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -435,8 +580,13 @@ internal static BufferDiffFlags hb_buffer_diff (hb_buffer_t buffer, hb_buffer_t // extern hb_buffer_cluster_level_t hb_buffer_get_cluster_level(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial ClusterLevel hb_buffer_get_cluster_level (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern ClusterLevel hb_buffer_get_cluster_level (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -449,8 +599,13 @@ internal static ClusterLevel hb_buffer_get_cluster_level (hb_buffer_t buffer) => // extern hb_buffer_content_type_t hb_buffer_get_content_type(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial ContentType hb_buffer_get_content_type (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern ContentType hb_buffer_get_content_type (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -463,8 +618,13 @@ internal static ContentType hb_buffer_get_content_type (hb_buffer_t buffer) => // extern hb_direction_t hb_buffer_get_direction(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Direction hb_buffer_get_direction (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Direction hb_buffer_get_direction (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -477,8 +637,13 @@ internal static Direction hb_buffer_get_direction (hb_buffer_t buffer) => // extern hb_buffer_t* hb_buffer_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_buffer_t hb_buffer_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_buffer_t hb_buffer_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -491,8 +656,13 @@ internal static hb_buffer_t hb_buffer_get_empty () => // extern hb_buffer_flags_t hb_buffer_get_flags(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial BufferFlags hb_buffer_get_flags (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern BufferFlags hb_buffer_get_flags (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -505,8 +675,13 @@ internal static BufferFlags hb_buffer_get_flags (hb_buffer_t buffer) => // extern hb_glyph_info_t* hb_buffer_get_glyph_infos(hb_buffer_t* buffer, unsigned int* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial GlyphInfo* hb_buffer_get_glyph_infos (hb_buffer_t buffer, UInt32* length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern GlyphInfo* hb_buffer_get_glyph_infos (hb_buffer_t buffer, UInt32* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -519,8 +694,13 @@ private partial class Delegates { // extern hb_glyph_position_t* hb_buffer_get_glyph_positions(hb_buffer_t* buffer, unsigned int* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial GlyphPosition* hb_buffer_get_glyph_positions (hb_buffer_t buffer, UInt32* length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern GlyphPosition* hb_buffer_get_glyph_positions (hb_buffer_t buffer, UInt32* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -533,8 +713,13 @@ private partial class Delegates { // extern hb_codepoint_t hb_buffer_get_invisible_glyph(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_get_invisible_glyph (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_get_invisible_glyph (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -547,8 +732,13 @@ internal static UInt32 hb_buffer_get_invisible_glyph (hb_buffer_t buffer) => // extern hb_language_t hb_buffer_get_language(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial IntPtr hb_buffer_get_language (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr hb_buffer_get_language (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -561,8 +751,13 @@ internal static IntPtr hb_buffer_get_language (hb_buffer_t buffer) => // extern unsigned int hb_buffer_get_length(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_get_length (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_get_length (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -575,8 +770,13 @@ internal static UInt32 hb_buffer_get_length (hb_buffer_t buffer) => // extern hb_codepoint_t hb_buffer_get_replacement_codepoint(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_get_replacement_codepoint (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_get_replacement_codepoint (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -589,8 +789,13 @@ internal static UInt32 hb_buffer_get_replacement_codepoint (hb_buffer_t buffer) // extern hb_script_t hb_buffer_get_script(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_get_script (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_get_script (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -603,8 +808,13 @@ internal static UInt32 hb_buffer_get_script (hb_buffer_t buffer) => // extern hb_unicode_funcs_t* hb_buffer_get_unicode_funcs(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_buffer_get_unicode_funcs (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_buffer_get_unicode_funcs (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -617,8 +827,13 @@ internal static hb_unicode_funcs_t hb_buffer_get_unicode_funcs (hb_buffer_t buff // extern void hb_buffer_guess_segment_properties(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_guess_segment_properties (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_guess_segment_properties (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -631,9 +846,15 @@ internal static void hb_buffer_guess_segment_properties (hb_buffer_t buffer) => // extern hb_bool_t hb_buffer_has_positions(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_has_positions (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_has_positions (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -647,8 +868,13 @@ internal static bool hb_buffer_has_positions (hb_buffer_t buffer) => // extern void hb_buffer_normalize_glyphs(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_normalize_glyphs (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_normalize_glyphs (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -661,9 +887,15 @@ internal static void hb_buffer_normalize_glyphs (hb_buffer_t buffer) => // extern hb_bool_t hb_buffer_pre_allocate(hb_buffer_t* buffer, unsigned int size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_pre_allocate (hb_buffer_t buffer, UInt32 size); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_pre_allocate (hb_buffer_t buffer, UInt32 size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -677,8 +909,13 @@ internal static bool hb_buffer_pre_allocate (hb_buffer_t buffer, UInt32 size) => // extern hb_buffer_t* hb_buffer_reference(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_buffer_t hb_buffer_reference (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_buffer_t hb_buffer_reference (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -691,8 +928,13 @@ internal static hb_buffer_t hb_buffer_reference (hb_buffer_t buffer) => // extern void hb_buffer_reset(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_reset (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_reset (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -705,8 +947,13 @@ internal static void hb_buffer_reset (hb_buffer_t buffer) => // extern void hb_buffer_reverse(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_reverse (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_reverse (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -719,8 +966,13 @@ internal static void hb_buffer_reverse (hb_buffer_t buffer) => // extern void hb_buffer_reverse_clusters(hb_buffer_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_reverse_clusters (hb_buffer_t buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_reverse_clusters (hb_buffer_t buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -733,8 +985,13 @@ internal static void hb_buffer_reverse_clusters (hb_buffer_t buffer) => // extern void hb_buffer_reverse_range(hb_buffer_t* buffer, unsigned int start, unsigned int end) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_reverse_range (hb_buffer_t buffer, UInt32 start, UInt32 end); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_reverse_range (hb_buffer_t buffer, UInt32 start, UInt32 end); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -747,8 +1004,13 @@ internal static void hb_buffer_reverse_range (hb_buffer_t buffer, UInt32 start, // extern unsigned int hb_buffer_serialize(hb_buffer_t* buffer, unsigned int start, unsigned int end, char* buf, unsigned int buf_size, unsigned int* buf_consumed, hb_font_t* font, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_serialize (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, hb_font_t font, SerializeFormat format, SerializeFlag flags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_serialize (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, hb_font_t font, SerializeFormat format, SerializeFlag flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -761,8 +1023,13 @@ internal static UInt32 hb_buffer_serialize (hb_buffer_t buffer, UInt32 start, UI // extern hb_buffer_serialize_format_t hb_buffer_serialize_format_from_string(const char* str, int len) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial SerializeFormat hb_buffer_serialize_format_from_string (/* char */ void* str, Int32 len); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern SerializeFormat hb_buffer_serialize_format_from_string (/* char */ void* str, Int32 len); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -775,8 +1042,13 @@ internal static SerializeFormat hb_buffer_serialize_format_from_string (/* char // extern const char* hb_buffer_serialize_format_to_string(hb_buffer_serialize_format_t format) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_buffer_serialize_format_to_string (SerializeFormat format); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_buffer_serialize_format_to_string (SerializeFormat format); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -789,8 +1061,13 @@ private partial class Delegates { // extern unsigned int hb_buffer_serialize_glyphs(hb_buffer_t* buffer, unsigned int start, unsigned int end, char* buf, unsigned int buf_size, unsigned int* buf_consumed, hb_font_t* font, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_serialize_glyphs (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, hb_font_t font, SerializeFormat format, SerializeFlag flags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_serialize_glyphs (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, hb_font_t font, SerializeFormat format, SerializeFlag flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -803,8 +1080,13 @@ internal static UInt32 hb_buffer_serialize_glyphs (hb_buffer_t buffer, UInt32 st // extern const char** hb_buffer_serialize_list_formats() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void** hb_buffer_serialize_list_formats (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void** hb_buffer_serialize_list_formats (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -817,8 +1099,13 @@ private partial class Delegates { // extern unsigned int hb_buffer_serialize_unicode(hb_buffer_t* buffer, unsigned int start, unsigned int end, char* buf, unsigned int buf_size, unsigned int* buf_consumed, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_buffer_serialize_unicode (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, SerializeFormat format, SerializeFlag flags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_buffer_serialize_unicode (hb_buffer_t buffer, UInt32 start, UInt32 end, /* char */ void* buf, UInt32 buf_size, UInt32* buf_consumed, SerializeFormat format, SerializeFlag flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -831,8 +1118,13 @@ internal static UInt32 hb_buffer_serialize_unicode (hb_buffer_t buffer, UInt32 s // extern void hb_buffer_set_cluster_level(hb_buffer_t* buffer, hb_buffer_cluster_level_t cluster_level) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_cluster_level (hb_buffer_t buffer, ClusterLevel cluster_level); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_cluster_level (hb_buffer_t buffer, ClusterLevel cluster_level); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -845,8 +1137,13 @@ internal static void hb_buffer_set_cluster_level (hb_buffer_t buffer, ClusterLev // extern void hb_buffer_set_content_type(hb_buffer_t* buffer, hb_buffer_content_type_t content_type) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_content_type (hb_buffer_t buffer, ContentType content_type); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_content_type (hb_buffer_t buffer, ContentType content_type); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -859,8 +1156,13 @@ internal static void hb_buffer_set_content_type (hb_buffer_t buffer, ContentType // extern void hb_buffer_set_direction(hb_buffer_t* buffer, hb_direction_t direction) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_direction (hb_buffer_t buffer, Direction direction); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_direction (hb_buffer_t buffer, Direction direction); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -873,8 +1175,13 @@ internal static void hb_buffer_set_direction (hb_buffer_t buffer, Direction dire // extern void hb_buffer_set_flags(hb_buffer_t* buffer, hb_buffer_flags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_flags (hb_buffer_t buffer, BufferFlags flags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_flags (hb_buffer_t buffer, BufferFlags flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -887,8 +1194,13 @@ internal static void hb_buffer_set_flags (hb_buffer_t buffer, BufferFlags flags) // extern void hb_buffer_set_invisible_glyph(hb_buffer_t* buffer, hb_codepoint_t invisible) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_invisible_glyph (hb_buffer_t buffer, UInt32 invisible); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_invisible_glyph (hb_buffer_t buffer, UInt32 invisible); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -901,8 +1213,13 @@ internal static void hb_buffer_set_invisible_glyph (hb_buffer_t buffer, UInt32 i // extern void hb_buffer_set_language(hb_buffer_t* buffer, hb_language_t language) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_language (hb_buffer_t buffer, IntPtr language); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_language (hb_buffer_t buffer, IntPtr language); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -915,9 +1232,15 @@ internal static void hb_buffer_set_language (hb_buffer_t buffer, IntPtr language // extern hb_bool_t hb_buffer_set_length(hb_buffer_t* buffer, unsigned int length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_buffer_set_length (hb_buffer_t buffer, UInt32 length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_buffer_set_length (hb_buffer_t buffer, UInt32 length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -931,8 +1254,13 @@ internal static bool hb_buffer_set_length (hb_buffer_t buffer, UInt32 length) => // extern void hb_buffer_set_message_func(hb_buffer_t* buffer, hb_buffer_message_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_message_func (hb_buffer_t buffer, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_message_func (hb_buffer_t buffer, BufferMessageProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -945,8 +1273,13 @@ internal static void hb_buffer_set_message_func (hb_buffer_t buffer, BufferMessa // extern void hb_buffer_set_replacement_codepoint(hb_buffer_t* buffer, hb_codepoint_t replacement) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_replacement_codepoint (hb_buffer_t buffer, UInt32 replacement); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_replacement_codepoint (hb_buffer_t buffer, UInt32 replacement); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -959,8 +1292,13 @@ internal static void hb_buffer_set_replacement_codepoint (hb_buffer_t buffer, UI // extern void hb_buffer_set_script(hb_buffer_t* buffer, hb_script_t script) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_script (hb_buffer_t buffer, UInt32 script); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_script (hb_buffer_t buffer, UInt32 script); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -973,8 +1311,13 @@ internal static void hb_buffer_set_script (hb_buffer_t buffer, UInt32 script) => // extern void hb_buffer_set_unicode_funcs(hb_buffer_t* buffer, hb_unicode_funcs_t* unicode_funcs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_buffer_set_unicode_funcs (hb_buffer_t buffer, hb_unicode_funcs_t unicode_funcs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_buffer_set_unicode_funcs (hb_buffer_t buffer, hb_unicode_funcs_t unicode_funcs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -987,8 +1330,13 @@ internal static void hb_buffer_set_unicode_funcs (hb_buffer_t buffer, hb_unicode // extern hb_glyph_flags_t hb_glyph_info_get_glyph_flags(const hb_glyph_info_t* info) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial GlyphFlags hb_glyph_info_get_glyph_flags (GlyphInfo* info); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern GlyphFlags hb_glyph_info_get_glyph_flags (GlyphInfo* info); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1005,8 +1353,13 @@ internal static GlyphFlags hb_glyph_info_get_glyph_flags (GlyphInfo* info) => // extern uint8_t hb_color_get_alpha(hb_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Byte hb_color_get_alpha (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte hb_color_get_alpha (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1019,8 +1372,13 @@ internal static Byte hb_color_get_alpha (UInt32 color) => // extern uint8_t hb_color_get_blue(hb_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Byte hb_color_get_blue (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte hb_color_get_blue (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1033,8 +1391,13 @@ internal static Byte hb_color_get_blue (UInt32 color) => // extern uint8_t hb_color_get_green(hb_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Byte hb_color_get_green (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte hb_color_get_green (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1047,8 +1410,13 @@ internal static Byte hb_color_get_green (UInt32 color) => // extern uint8_t hb_color_get_red(hb_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Byte hb_color_get_red (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte hb_color_get_red (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1061,8 +1429,13 @@ internal static Byte hb_color_get_red (UInt32 color) => // extern hb_direction_t hb_direction_from_string(const char* str, int len) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Direction hb_direction_from_string (/* char */ void* str, Int32 len); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Direction hb_direction_from_string (/* char */ void* str, Int32 len); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1075,8 +1448,13 @@ internal static Direction hb_direction_from_string (/* char */ void* str, Int32 // extern const char* hb_direction_to_string(hb_direction_t direction) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_direction_to_string (Direction direction); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_direction_to_string (Direction direction); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1089,9 +1467,15 @@ private partial class Delegates { // extern hb_bool_t hb_feature_from_string(const char* str, int len, hb_feature_t* feature) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_feature_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len, Feature* feature); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_feature_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len, Feature* feature); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1105,8 +1489,13 @@ internal static bool hb_feature_from_string ([MarshalAs (UnmanagedType.LPStr)] S // extern void hb_feature_to_string(hb_feature_t* feature, char* buf, unsigned int size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_feature_to_string (Feature* feature, /* char */ void* buf, UInt32 size); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_feature_to_string (Feature* feature, /* char */ void* buf, UInt32 size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1119,8 +1508,13 @@ internal static void hb_feature_to_string (Feature* feature, /* char */ void* bu // extern hb_language_t hb_language_from_string(const char* str, int len) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial IntPtr hb_language_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr hb_language_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1133,8 +1527,13 @@ internal static IntPtr hb_language_from_string ([MarshalAs (UnmanagedType.LPStr) // extern hb_language_t hb_language_get_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial IntPtr hb_language_get_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr hb_language_get_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1147,8 +1546,13 @@ internal static IntPtr hb_language_get_default () => // extern const char* hb_language_to_string(hb_language_t language) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_language_to_string (IntPtr language); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_language_to_string (IntPtr language); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1161,8 +1565,13 @@ private partial class Delegates { // extern hb_script_t hb_script_from_iso15924_tag(hb_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_script_from_iso15924_tag (UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_script_from_iso15924_tag (UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1175,8 +1584,13 @@ internal static UInt32 hb_script_from_iso15924_tag (UInt32 tag) => // extern hb_script_t hb_script_from_string(const char* str, int len) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_script_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_script_from_string ([MarshalAs (UnmanagedType.LPStr)] String str, Int32 len); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1189,8 +1603,13 @@ internal static UInt32 hb_script_from_string ([MarshalAs (UnmanagedType.LPStr)] // extern hb_direction_t hb_script_get_horizontal_direction(hb_script_t script) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Direction hb_script_get_horizontal_direction (UInt32 script); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Direction hb_script_get_horizontal_direction (UInt32 script); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1203,8 +1622,13 @@ internal static Direction hb_script_get_horizontal_direction (UInt32 script) => // extern hb_tag_t hb_script_to_iso15924_tag(hb_script_t script) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_script_to_iso15924_tag (UInt32 script); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_script_to_iso15924_tag (UInt32 script); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1217,8 +1641,13 @@ internal static UInt32 hb_script_to_iso15924_tag (UInt32 script) => // extern hb_tag_t hb_tag_from_string(const char* str, int len) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_tag_from_string (/* char */ void* str, Int32 len); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_tag_from_string (/* char */ void* str, Int32 len); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1231,8 +1660,13 @@ internal static UInt32 hb_tag_from_string (/* char */ void* str, Int32 len) => // extern void hb_tag_to_string(hb_tag_t tag, char* buf) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_tag_to_string (UInt32 tag, /* char */ void* buf); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_tag_to_string (UInt32 tag, /* char */ void* buf); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1245,9 +1679,15 @@ internal static void hb_tag_to_string (UInt32 tag, /* char */ void* buf) => // extern hb_bool_t hb_variation_from_string(const char* str, int len, hb_variation_t* variation) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_variation_from_string (/* char */ void* str, Int32 len, Variation* variation); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_variation_from_string (/* char */ void* str, Int32 len, Variation* variation); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1261,8 +1701,13 @@ internal static bool hb_variation_from_string (/* char */ void* str, Int32 len, // extern void hb_variation_to_string(hb_variation_t* variation, char* buf, unsigned int size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_variation_to_string (Variation* variation, /* char */ void* buf, UInt32 size); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_variation_to_string (Variation* variation, /* char */ void* buf, UInt32 size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1279,9 +1724,15 @@ internal static void hb_variation_to_string (Variation* variation, /* char */ vo // extern hb_bool_t hb_face_builder_add_table(hb_face_t* face, hb_tag_t tag, hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_face_builder_add_table (hb_face_t face, UInt32 tag, hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_face_builder_add_table (hb_face_t face, UInt32 tag, hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1295,8 +1746,13 @@ internal static bool hb_face_builder_add_table (hb_face_t face, UInt32 tag, hb_b // extern hb_face_t* hb_face_builder_create() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_face_builder_create (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_face_builder_create (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1309,8 +1765,13 @@ internal static hb_face_t hb_face_builder_create () => // extern void hb_face_collect_unicodes(hb_face_t* face, hb_set_t* out) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_collect_unicodes (hb_face_t face, hb_set_t @out); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_collect_unicodes (hb_face_t face, hb_set_t @out); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1323,8 +1784,13 @@ internal static void hb_face_collect_unicodes (hb_face_t face, hb_set_t @out) => // extern void hb_face_collect_variation_selectors(hb_face_t* face, hb_set_t* out) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_collect_variation_selectors (hb_face_t face, hb_set_t @out); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_collect_variation_selectors (hb_face_t face, hb_set_t @out); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1337,8 +1803,13 @@ internal static void hb_face_collect_variation_selectors (hb_face_t face, hb_set // extern void hb_face_collect_variation_unicodes(hb_face_t* face, hb_codepoint_t variation_selector, hb_set_t* out) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_collect_variation_unicodes (hb_face_t face, UInt32 variation_selector, hb_set_t @out); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_collect_variation_unicodes (hb_face_t face, UInt32 variation_selector, hb_set_t @out); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1351,8 +1822,13 @@ internal static void hb_face_collect_variation_unicodes (hb_face_t face, UInt32 // extern unsigned int hb_face_count(hb_blob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_face_count (hb_blob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_face_count (hb_blob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1365,8 +1841,13 @@ internal static UInt32 hb_face_count (hb_blob_t blob) => // extern hb_face_t* hb_face_create(hb_blob_t* blob, unsigned int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_face_create (hb_blob_t blob, UInt32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_face_create (hb_blob_t blob, UInt32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1379,8 +1860,13 @@ internal static hb_face_t hb_face_create (hb_blob_t blob, UInt32 index) => // extern hb_face_t* hb_face_create_for_tables(hb_reference_table_func_t reference_table_func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_face_create_for_tables (void* reference_table_func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_face_create_for_tables (ReferenceTableProxyDelegate reference_table_func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1393,8 +1879,13 @@ internal static hb_face_t hb_face_create_for_tables (ReferenceTableProxyDelegate // extern void hb_face_destroy(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_destroy (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_destroy (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1407,8 +1898,13 @@ internal static void hb_face_destroy (hb_face_t face) => // extern hb_face_t* hb_face_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_face_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_face_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1421,8 +1917,13 @@ internal static hb_face_t hb_face_get_empty () => // extern unsigned int hb_face_get_glyph_count(const hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_face_get_glyph_count (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_face_get_glyph_count (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1435,8 +1936,13 @@ internal static UInt32 hb_face_get_glyph_count (hb_face_t face) => // extern unsigned int hb_face_get_index(const hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_face_get_index (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_face_get_index (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1449,8 +1955,13 @@ internal static UInt32 hb_face_get_index (hb_face_t face) => // extern unsigned int hb_face_get_table_tags(const hb_face_t* face, unsigned int start_offset, unsigned int* table_count, hb_tag_t* table_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_face_get_table_tags (hb_face_t face, UInt32 start_offset, UInt32* table_count, UInt32* table_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_face_get_table_tags (hb_face_t face, UInt32 start_offset, UInt32* table_count, UInt32* table_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1463,8 +1974,13 @@ internal static UInt32 hb_face_get_table_tags (hb_face_t face, UInt32 start_offs // extern unsigned int hb_face_get_upem(const hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_face_get_upem (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_face_get_upem (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1477,9 +1993,15 @@ internal static UInt32 hb_face_get_upem (hb_face_t face) => // extern hb_bool_t hb_face_is_immutable(const hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_face_is_immutable (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_face_is_immutable (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1493,8 +2015,13 @@ internal static bool hb_face_is_immutable (hb_face_t face) => // extern void hb_face_make_immutable(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_make_immutable (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_make_immutable (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1507,8 +2034,13 @@ internal static void hb_face_make_immutable (hb_face_t face) => // extern hb_face_t* hb_face_reference(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_face_reference (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_face_reference (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1521,8 +2053,13 @@ internal static hb_face_t hb_face_reference (hb_face_t face) => // extern hb_blob_t* hb_face_reference_blob(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_face_reference_blob (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_face_reference_blob (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1535,8 +2072,13 @@ internal static hb_blob_t hb_face_reference_blob (hb_face_t face) => // extern hb_blob_t* hb_face_reference_table(const hb_face_t* face, hb_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_face_reference_table (hb_face_t face, UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_face_reference_table (hb_face_t face, UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1549,8 +2091,13 @@ internal static hb_blob_t hb_face_reference_table (hb_face_t face, UInt32 tag) = // extern void hb_face_set_glyph_count(hb_face_t* face, unsigned int glyph_count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_set_glyph_count (hb_face_t face, UInt32 glyph_count); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_set_glyph_count (hb_face_t face, UInt32 glyph_count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1563,8 +2110,13 @@ internal static void hb_face_set_glyph_count (hb_face_t face, UInt32 glyph_count // extern void hb_face_set_index(hb_face_t* face, unsigned int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_set_index (hb_face_t face, UInt32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_set_index (hb_face_t face, UInt32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1577,8 +2129,13 @@ internal static void hb_face_set_index (hb_face_t face, UInt32 index) => // extern void hb_face_set_upem(hb_face_t* face, unsigned int upem) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_face_set_upem (hb_face_t face, UInt32 upem); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_face_set_upem (hb_face_t face, UInt32 upem); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1595,8 +2152,13 @@ internal static void hb_face_set_upem (hb_face_t face, UInt32 upem) => // extern void hb_font_add_glyph_origin_for_direction(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_add_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_add_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1609,8 +2171,13 @@ internal static void hb_font_add_glyph_origin_for_direction (hb_font_t font, UIn // extern hb_font_t* hb_font_create(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_t hb_font_create (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_t hb_font_create (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1623,8 +2190,13 @@ internal static hb_font_t hb_font_create (hb_face_t face) => // extern hb_font_t* hb_font_create_sub_font(hb_font_t* parent) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_t hb_font_create_sub_font (hb_font_t parent); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_t hb_font_create_sub_font (hb_font_t parent); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1637,8 +2209,13 @@ internal static hb_font_t hb_font_create_sub_font (hb_font_t parent) => // extern void hb_font_destroy(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_destroy (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_destroy (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1651,8 +2228,13 @@ internal static void hb_font_destroy (hb_font_t font) => // extern hb_font_funcs_t* hb_font_funcs_create() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_funcs_t hb_font_funcs_create (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_funcs_t hb_font_funcs_create (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1665,8 +2247,13 @@ internal static hb_font_funcs_t hb_font_funcs_create () => // extern void hb_font_funcs_destroy(hb_font_funcs_t* ffuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_destroy (hb_font_funcs_t ffuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_destroy (hb_font_funcs_t ffuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1679,8 +2266,13 @@ internal static void hb_font_funcs_destroy (hb_font_funcs_t ffuncs) => // extern hb_font_funcs_t* hb_font_funcs_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_funcs_t hb_font_funcs_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_funcs_t hb_font_funcs_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1693,9 +2285,15 @@ internal static hb_font_funcs_t hb_font_funcs_get_empty () => // extern hb_bool_t hb_font_funcs_is_immutable(hb_font_funcs_t* ffuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_funcs_is_immutable (hb_font_funcs_t ffuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_funcs_is_immutable (hb_font_funcs_t ffuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1709,8 +2307,13 @@ internal static bool hb_font_funcs_is_immutable (hb_font_funcs_t ffuncs) => // extern void hb_font_funcs_make_immutable(hb_font_funcs_t* ffuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_make_immutable (hb_font_funcs_t ffuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_make_immutable (hb_font_funcs_t ffuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1723,8 +2326,13 @@ internal static void hb_font_funcs_make_immutable (hb_font_funcs_t ffuncs) => // extern hb_font_funcs_t* hb_font_funcs_reference(hb_font_funcs_t* ffuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_funcs_t hb_font_funcs_reference (hb_font_funcs_t ffuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_funcs_t hb_font_funcs_reference (hb_font_funcs_t ffuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1737,8 +2345,13 @@ internal static hb_font_funcs_t hb_font_funcs_reference (hb_font_funcs_t ffuncs) // extern void hb_font_funcs_set_font_h_extents_func(hb_font_funcs_t* ffuncs, hb_font_get_font_h_extents_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t ffuncs, FontGetFontExtentsProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1751,8 +2364,13 @@ internal static void hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t ffun // extern void hb_font_funcs_set_font_v_extents_func(hb_font_funcs_t* ffuncs, hb_font_get_font_v_extents_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t ffuncs, FontGetFontExtentsProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1765,8 +2383,13 @@ internal static void hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t ffun // extern void hb_font_funcs_set_glyph_contour_point_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_contour_point_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t ffuncs, FontGetGlyphContourPointProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1779,8 +2402,13 @@ internal static void hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t // extern void hb_font_funcs_set_glyph_extents_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_extents_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t ffuncs, FontGetGlyphExtentsProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1793,8 +2421,13 @@ internal static void hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t ffunc // extern void hb_font_funcs_set_glyph_from_name_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_from_name_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t ffuncs, FontGetGlyphFromNameProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1807,8 +2440,13 @@ internal static void hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t ffu // extern void hb_font_funcs_set_glyph_h_advance_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_h_advance_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t ffuncs, FontGetGlyphAdvanceProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1821,8 +2459,13 @@ internal static void hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t ffu // extern void hb_font_funcs_set_glyph_h_advances_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_h_advances_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t ffuncs, FontGetGlyphAdvancesProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1835,8 +2478,13 @@ internal static void hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t ff // extern void hb_font_funcs_set_glyph_h_kerning_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_h_kerning_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t ffuncs, FontGetGlyphKerningProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1849,8 +2497,13 @@ internal static void hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t ffu // extern void hb_font_funcs_set_glyph_h_origin_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_h_origin_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t ffuncs, FontGetGlyphOriginProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1863,8 +2516,13 @@ internal static void hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t ffun // extern void hb_font_funcs_set_glyph_name_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_name_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_name_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_name_func (hb_font_funcs_t ffuncs, FontGetGlyphNameProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1877,8 +2535,13 @@ internal static void hb_font_funcs_set_glyph_name_func (hb_font_funcs_t ffuncs, // extern void hb_font_funcs_set_glyph_v_advance_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_v_advance_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t ffuncs, FontGetGlyphAdvanceProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1891,8 +2554,13 @@ internal static void hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t ffu // extern void hb_font_funcs_set_glyph_v_advances_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_v_advances_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t ffuncs, FontGetGlyphAdvancesProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1905,8 +2573,13 @@ internal static void hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t ff // extern void hb_font_funcs_set_glyph_v_origin_func(hb_font_funcs_t* ffuncs, hb_font_get_glyph_v_origin_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t ffuncs, FontGetGlyphOriginProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1919,8 +2592,13 @@ internal static void hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t ffun // extern void hb_font_funcs_set_nominal_glyph_func(hb_font_funcs_t* ffuncs, hb_font_get_nominal_glyph_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t ffuncs, FontGetNominalGlyphProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1933,8 +2611,13 @@ internal static void hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t ffunc // extern void hb_font_funcs_set_nominal_glyphs_func(hb_font_funcs_t* ffuncs, hb_font_get_nominal_glyphs_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t ffuncs, FontGetNominalGlyphsProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1947,8 +2630,13 @@ internal static void hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t ffun // extern void hb_font_funcs_set_variation_glyph_func(hb_font_funcs_t* ffuncs, hb_font_get_variation_glyph_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t ffuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t ffuncs, FontGetVariationGlyphProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1961,8 +2649,13 @@ internal static void hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t ffu // extern hb_font_t* hb_font_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_t hb_font_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_t hb_font_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1975,8 +2668,13 @@ internal static hb_font_t hb_font_get_empty () => // extern void hb_font_get_extents_for_direction(hb_font_t* font, hb_direction_t direction, hb_font_extents_t* extents) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_extents_for_direction (hb_font_t font, Direction direction, FontExtents* extents); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_extents_for_direction (hb_font_t font, Direction direction, FontExtents* extents); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1989,8 +2687,13 @@ internal static void hb_font_get_extents_for_direction (hb_font_t font, Directio // extern hb_face_t* hb_font_get_face(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_face_t hb_font_get_face (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_face_t hb_font_get_face (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2003,9 +2706,15 @@ internal static hb_face_t hb_font_get_face (hb_font_t font) => // extern hb_bool_t hb_font_get_glyph(hb_font_t* font, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t* glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph (hb_font_t font, UInt32 unicode, UInt32 variation_selector, UInt32* glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph (hb_font_t font, UInt32 unicode, UInt32 variation_selector, UInt32* glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2019,8 +2728,13 @@ internal static bool hb_font_get_glyph (hb_font_t font, UInt32 unicode, UInt32 v // extern void hb_font_get_glyph_advance_for_direction(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_advance_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_advance_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2033,8 +2747,13 @@ internal static void hb_font_get_glyph_advance_for_direction (hb_font_t font, UI // extern void hb_font_get_glyph_advances_for_direction(hb_font_t* font, hb_direction_t direction, unsigned int count, const hb_codepoint_t* first_glyph, unsigned int glyph_stride, hb_position_t* first_advance, unsigned int advance_stride) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_advances_for_direction (hb_font_t font, Direction direction, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_advances_for_direction (hb_font_t font, Direction direction, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2047,9 +2766,15 @@ internal static void hb_font_get_glyph_advances_for_direction (hb_font_t font, D // extern hb_bool_t hb_font_get_glyph_contour_point(hb_font_t* font, hb_codepoint_t glyph, unsigned int point_index, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_contour_point (hb_font_t font, UInt32 glyph, UInt32 point_index, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_contour_point (hb_font_t font, UInt32 glyph, UInt32 point_index, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2063,9 +2788,15 @@ internal static bool hb_font_get_glyph_contour_point (hb_font_t font, UInt32 gly // extern hb_bool_t hb_font_get_glyph_contour_point_for_origin(hb_font_t* font, hb_codepoint_t glyph, unsigned int point_index, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_contour_point_for_origin (hb_font_t font, UInt32 glyph, UInt32 point_index, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_contour_point_for_origin (hb_font_t font, UInt32 glyph, UInt32 point_index, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2079,9 +2810,15 @@ internal static bool hb_font_get_glyph_contour_point_for_origin (hb_font_t font, // extern hb_bool_t hb_font_get_glyph_extents(hb_font_t* font, hb_codepoint_t glyph, hb_glyph_extents_t* extents) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_extents (hb_font_t font, UInt32 glyph, GlyphExtents* extents); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_extents (hb_font_t font, UInt32 glyph, GlyphExtents* extents); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2095,9 +2832,15 @@ internal static bool hb_font_get_glyph_extents (hb_font_t font, UInt32 glyph, Gl // extern hb_bool_t hb_font_get_glyph_extents_for_origin(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, hb_glyph_extents_t* extents) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_extents_for_origin (hb_font_t font, UInt32 glyph, Direction direction, GlyphExtents* extents); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_extents_for_origin (hb_font_t font, UInt32 glyph, Direction direction, GlyphExtents* extents); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2111,9 +2854,15 @@ internal static bool hb_font_get_glyph_extents_for_origin (hb_font_t font, UInt3 // extern hb_bool_t hb_font_get_glyph_from_name(hb_font_t* font, const char* name, int len, hb_codepoint_t* glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_from_name (hb_font_t font, [MarshalAs (UnmanagedType.LPStr)] String name, Int32 len, UInt32* glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_from_name (hb_font_t font, [MarshalAs (UnmanagedType.LPStr)] String name, Int32 len, UInt32* glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2127,8 +2876,13 @@ internal static bool hb_font_get_glyph_from_name (hb_font_t font, [MarshalAs (Un // extern hb_position_t hb_font_get_glyph_h_advance(hb_font_t* font, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_font_get_glyph_h_advance (hb_font_t font, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_font_get_glyph_h_advance (hb_font_t font, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2141,8 +2895,13 @@ internal static Int32 hb_font_get_glyph_h_advance (hb_font_t font, UInt32 glyph) // extern void hb_font_get_glyph_h_advances(hb_font_t* font, unsigned int count, const hb_codepoint_t* first_glyph, unsigned int glyph_stride, hb_position_t* first_advance, unsigned int advance_stride) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_h_advances (hb_font_t font, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_h_advances (hb_font_t font, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2155,8 +2914,13 @@ internal static void hb_font_get_glyph_h_advances (hb_font_t font, UInt32 count, // extern hb_position_t hb_font_get_glyph_h_kerning(hb_font_t* font, hb_codepoint_t left_glyph, hb_codepoint_t right_glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_font_get_glyph_h_kerning (hb_font_t font, UInt32 left_glyph, UInt32 right_glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_font_get_glyph_h_kerning (hb_font_t font, UInt32 left_glyph, UInt32 right_glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2169,9 +2933,15 @@ internal static Int32 hb_font_get_glyph_h_kerning (hb_font_t font, UInt32 left_g // extern hb_bool_t hb_font_get_glyph_h_origin(hb_font_t* font, hb_codepoint_t glyph, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_h_origin (hb_font_t font, UInt32 glyph, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_h_origin (hb_font_t font, UInt32 glyph, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2185,8 +2955,13 @@ internal static bool hb_font_get_glyph_h_origin (hb_font_t font, UInt32 glyph, I // extern void hb_font_get_glyph_kerning_for_direction(hb_font_t* font, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_kerning_for_direction (hb_font_t font, UInt32 first_glyph, UInt32 second_glyph, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_kerning_for_direction (hb_font_t font, UInt32 first_glyph, UInt32 second_glyph, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2199,9 +2974,15 @@ internal static void hb_font_get_glyph_kerning_for_direction (hb_font_t font, UI // extern hb_bool_t hb_font_get_glyph_name(hb_font_t* font, hb_codepoint_t glyph, char* name, unsigned int size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_name (hb_font_t font, UInt32 glyph, /* char */ void* name, UInt32 size); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_name (hb_font_t font, UInt32 glyph, /* char */ void* name, UInt32 size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2215,8 +2996,13 @@ internal static bool hb_font_get_glyph_name (hb_font_t font, UInt32 glyph, /* ch // extern void hb_font_get_glyph_origin_for_direction(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2229,8 +3015,13 @@ internal static void hb_font_get_glyph_origin_for_direction (hb_font_t font, UIn // extern hb_position_t hb_font_get_glyph_v_advance(hb_font_t* font, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_font_get_glyph_v_advance (hb_font_t font, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_font_get_glyph_v_advance (hb_font_t font, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2243,8 +3034,13 @@ internal static Int32 hb_font_get_glyph_v_advance (hb_font_t font, UInt32 glyph) // extern void hb_font_get_glyph_v_advances(hb_font_t* font, unsigned int count, const hb_codepoint_t* first_glyph, unsigned int glyph_stride, hb_position_t* first_advance, unsigned int advance_stride) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_glyph_v_advances (hb_font_t font, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_glyph_v_advances (hb_font_t font, UInt32 count, UInt32* first_glyph, UInt32 glyph_stride, Int32* first_advance, UInt32 advance_stride); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2257,9 +3053,15 @@ internal static void hb_font_get_glyph_v_advances (hb_font_t font, UInt32 count, // extern hb_bool_t hb_font_get_glyph_v_origin(hb_font_t* font, hb_codepoint_t glyph, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_glyph_v_origin (hb_font_t font, UInt32 glyph, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_glyph_v_origin (hb_font_t font, UInt32 glyph, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2273,9 +3075,15 @@ internal static bool hb_font_get_glyph_v_origin (hb_font_t font, UInt32 glyph, I // extern hb_bool_t hb_font_get_h_extents(hb_font_t* font, hb_font_extents_t* extents) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_h_extents (hb_font_t font, FontExtents* extents); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_h_extents (hb_font_t font, FontExtents* extents); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2289,9 +3097,15 @@ internal static bool hb_font_get_h_extents (hb_font_t font, FontExtents* extents // extern hb_bool_t hb_font_get_nominal_glyph(hb_font_t* font, hb_codepoint_t unicode, hb_codepoint_t* glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_nominal_glyph (hb_font_t font, UInt32 unicode, UInt32* glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_nominal_glyph (hb_font_t font, UInt32 unicode, UInt32* glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2305,8 +3119,13 @@ internal static bool hb_font_get_nominal_glyph (hb_font_t font, UInt32 unicode, // extern unsigned int hb_font_get_nominal_glyphs(hb_font_t* font, unsigned int count, const hb_codepoint_t* first_unicode, unsigned int unicode_stride, hb_codepoint_t* first_glyph, unsigned int glyph_stride) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_font_get_nominal_glyphs (hb_font_t font, UInt32 count, UInt32* first_unicode, UInt32 unicode_stride, UInt32* first_glyph, UInt32 glyph_stride); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_font_get_nominal_glyphs (hb_font_t font, UInt32 count, UInt32* first_unicode, UInt32 unicode_stride, UInt32* first_glyph, UInt32 glyph_stride); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2319,8 +3138,13 @@ internal static UInt32 hb_font_get_nominal_glyphs (hb_font_t font, UInt32 count, // extern hb_font_t* hb_font_get_parent(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_t hb_font_get_parent (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_t hb_font_get_parent (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2333,8 +3157,13 @@ internal static hb_font_t hb_font_get_parent (hb_font_t font) => // extern void hb_font_get_ppem(hb_font_t* font, unsigned int* x_ppem, unsigned int* y_ppem) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_ppem (hb_font_t font, UInt32* x_ppem, UInt32* y_ppem); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_ppem (hb_font_t font, UInt32* x_ppem, UInt32* y_ppem); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2347,8 +3176,13 @@ internal static void hb_font_get_ppem (hb_font_t font, UInt32* x_ppem, UInt32* y // extern float hb_font_get_ptem(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Single hb_font_get_ptem (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Single hb_font_get_ptem (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2361,8 +3195,13 @@ internal static Single hb_font_get_ptem (hb_font_t font) => // extern void hb_font_get_scale(hb_font_t* font, int* x_scale, int* y_scale) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_get_scale (hb_font_t font, Int32* x_scale, Int32* y_scale); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_get_scale (hb_font_t font, Int32* x_scale, Int32* y_scale); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2375,9 +3214,15 @@ internal static void hb_font_get_scale (hb_font_t font, Int32* x_scale, Int32* y // extern hb_bool_t hb_font_get_v_extents(hb_font_t* font, hb_font_extents_t* extents) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_v_extents (hb_font_t font, FontExtents* extents); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_v_extents (hb_font_t font, FontExtents* extents); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2391,8 +3236,13 @@ internal static bool hb_font_get_v_extents (hb_font_t font, FontExtents* extents // extern const int* hb_font_get_var_coords_normalized(hb_font_t* font, unsigned int* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32* hb_font_get_var_coords_normalized (hb_font_t font, UInt32* length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32* hb_font_get_var_coords_normalized (hb_font_t font, UInt32* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2405,9 +3255,15 @@ private partial class Delegates { // extern hb_bool_t hb_font_get_variation_glyph(hb_font_t* font, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t* glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_get_variation_glyph (hb_font_t font, UInt32 unicode, UInt32 variation_selector, UInt32* glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_get_variation_glyph (hb_font_t font, UInt32 unicode, UInt32 variation_selector, UInt32* glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2421,9 +3277,15 @@ internal static bool hb_font_get_variation_glyph (hb_font_t font, UInt32 unicode // extern hb_bool_t hb_font_glyph_from_string(hb_font_t* font, const char* s, int len, hb_codepoint_t* glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_glyph_from_string (hb_font_t font, [MarshalAs (UnmanagedType.LPStr)] String s, Int32 len, UInt32* glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_glyph_from_string (hb_font_t font, [MarshalAs (UnmanagedType.LPStr)] String s, Int32 len, UInt32* glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2437,8 +3299,13 @@ internal static bool hb_font_glyph_from_string (hb_font_t font, [MarshalAs (Unma // extern void hb_font_glyph_to_string(hb_font_t* font, hb_codepoint_t glyph, char* s, unsigned int size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_glyph_to_string (hb_font_t font, UInt32 glyph, /* char */ void* s, UInt32 size); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_glyph_to_string (hb_font_t font, UInt32 glyph, /* char */ void* s, UInt32 size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2451,9 +3318,15 @@ internal static void hb_font_glyph_to_string (hb_font_t font, UInt32 glyph, /* c // extern hb_bool_t hb_font_is_immutable(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_font_is_immutable (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_font_is_immutable (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2467,8 +3340,13 @@ internal static bool hb_font_is_immutable (hb_font_t font) => // extern void hb_font_make_immutable(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_make_immutable (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_make_immutable (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2481,8 +3359,13 @@ internal static void hb_font_make_immutable (hb_font_t font) => // extern hb_font_t* hb_font_reference(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_font_t hb_font_reference (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_font_t hb_font_reference (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2495,8 +3378,13 @@ internal static hb_font_t hb_font_reference (hb_font_t font) => // extern void hb_font_set_face(hb_font_t* font, hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_face (hb_font_t font, hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_face (hb_font_t font, hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2509,8 +3397,13 @@ internal static void hb_font_set_face (hb_font_t font, hb_face_t face) => // extern void hb_font_set_funcs(hb_font_t* font, hb_font_funcs_t* klass, void* font_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_funcs (hb_font_t font, hb_font_funcs_t klass, void* font_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_funcs (hb_font_t font, hb_font_funcs_t klass, void* font_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2523,8 +3416,13 @@ internal static void hb_font_set_funcs (hb_font_t font, hb_font_funcs_t klass, v // extern void hb_font_set_funcs_data(hb_font_t* font, void* font_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_funcs_data (hb_font_t font, void* font_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_funcs_data (hb_font_t font, void* font_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2537,8 +3435,13 @@ internal static void hb_font_set_funcs_data (hb_font_t font, void* font_data, De // extern void hb_font_set_parent(hb_font_t* font, hb_font_t* parent) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_parent (hb_font_t font, hb_font_t parent); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_parent (hb_font_t font, hb_font_t parent); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2551,8 +3454,13 @@ internal static void hb_font_set_parent (hb_font_t font, hb_font_t parent) => // extern void hb_font_set_ppem(hb_font_t* font, unsigned int x_ppem, unsigned int y_ppem) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_ppem (hb_font_t font, UInt32 x_ppem, UInt32 y_ppem); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_ppem (hb_font_t font, UInt32 x_ppem, UInt32 y_ppem); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2565,8 +3473,13 @@ internal static void hb_font_set_ppem (hb_font_t font, UInt32 x_ppem, UInt32 y_p // extern void hb_font_set_ptem(hb_font_t* font, float ptem) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_ptem (hb_font_t font, Single ptem); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_ptem (hb_font_t font, Single ptem); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2579,8 +3492,13 @@ internal static void hb_font_set_ptem (hb_font_t font, Single ptem) => // extern void hb_font_set_scale(hb_font_t* font, int x_scale, int y_scale) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_scale (hb_font_t font, Int32 x_scale, Int32 y_scale); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_scale (hb_font_t font, Int32 x_scale, Int32 y_scale); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2593,8 +3511,13 @@ internal static void hb_font_set_scale (hb_font_t font, Int32 x_scale, Int32 y_s // extern void hb_font_set_var_coords_design(hb_font_t* font, const float* coords, unsigned int coords_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_var_coords_design (hb_font_t font, Single* coords, UInt32 coords_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_var_coords_design (hb_font_t font, Single* coords, UInt32 coords_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2607,8 +3530,13 @@ internal static void hb_font_set_var_coords_design (hb_font_t font, Single* coor // extern void hb_font_set_var_coords_normalized(hb_font_t* font, const int* coords, unsigned int coords_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_var_coords_normalized (hb_font_t font, Int32* coords, UInt32 coords_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_var_coords_normalized (hb_font_t font, Int32* coords, UInt32 coords_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2621,8 +3549,13 @@ internal static void hb_font_set_var_coords_normalized (hb_font_t font, Int32* c // extern void hb_font_set_var_named_instance(hb_font_t* font, unsigned int instance_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_var_named_instance (hb_font_t font, UInt32 instance_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_var_named_instance (hb_font_t font, UInt32 instance_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2635,8 +3568,13 @@ internal static void hb_font_set_var_named_instance (hb_font_t font, UInt32 inst // extern void hb_font_set_variations(hb_font_t* font, const hb_variation_t* variations, unsigned int variations_length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_set_variations (hb_font_t font, Variation* variations, UInt32 variations_length); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_set_variations (hb_font_t font, Variation* variations, UInt32 variations_length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2649,8 +3587,13 @@ internal static void hb_font_set_variations (hb_font_t font, Variation* variatio // extern void hb_font_subtract_glyph_origin_for_direction(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t* x, hb_position_t* y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_font_subtract_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_font_subtract_glyph_origin_for_direction (hb_font_t font, UInt32 glyph, Direction direction, Int32* x, Int32* y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2667,9 +3610,15 @@ internal static void hb_font_subtract_glyph_origin_for_direction (hb_font_t font // extern hb_bool_t hb_map_allocation_successful(const hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_map_allocation_successful (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_map_allocation_successful (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2683,8 +3632,13 @@ internal static bool hb_map_allocation_successful (hb_map_t map) => // extern void hb_map_clear(hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_map_clear (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_map_clear (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2697,8 +3651,13 @@ internal static void hb_map_clear (hb_map_t map) => // extern hb_map_t* hb_map_create() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_map_t hb_map_create (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_map_t hb_map_create (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2711,8 +3670,13 @@ internal static hb_map_t hb_map_create () => // extern void hb_map_del(hb_map_t* map, hb_codepoint_t key) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_map_del (hb_map_t map, UInt32 key); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_map_del (hb_map_t map, UInt32 key); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2725,8 +3689,13 @@ internal static void hb_map_del (hb_map_t map, UInt32 key) => // extern void hb_map_destroy(hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_map_destroy (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_map_destroy (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2739,8 +3708,13 @@ internal static void hb_map_destroy (hb_map_t map) => // extern hb_codepoint_t hb_map_get(const hb_map_t* map, hb_codepoint_t key) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_map_get (hb_map_t map, UInt32 key); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_map_get (hb_map_t map, UInt32 key); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2753,8 +3727,13 @@ internal static UInt32 hb_map_get (hb_map_t map, UInt32 key) => // extern hb_map_t* hb_map_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_map_t hb_map_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_map_t hb_map_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2767,8 +3746,13 @@ internal static hb_map_t hb_map_get_empty () => // extern unsigned int hb_map_get_population(const hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_map_get_population (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_map_get_population (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2781,9 +3765,15 @@ internal static UInt32 hb_map_get_population (hb_map_t map) => // extern hb_bool_t hb_map_has(const hb_map_t* map, hb_codepoint_t key) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_map_has (hb_map_t map, UInt32 key); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_map_has (hb_map_t map, UInt32 key); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2797,9 +3787,15 @@ internal static bool hb_map_has (hb_map_t map, UInt32 key) => // extern hb_bool_t hb_map_is_empty(const hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_map_is_empty (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_map_is_empty (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2813,8 +3809,13 @@ internal static bool hb_map_is_empty (hb_map_t map) => // extern hb_map_t* hb_map_reference(hb_map_t* map) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_map_t hb_map_reference (hb_map_t map); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_map_t hb_map_reference (hb_map_t map); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2827,8 +3828,13 @@ internal static hb_map_t hb_map_reference (hb_map_t map) => // extern void hb_map_set(hb_map_t* map, hb_codepoint_t key, hb_codepoint_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_map_set (hb_map_t map, UInt32 key, UInt32 value); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_map_set (hb_map_t map, UInt32 key, UInt32 value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2845,8 +3851,13 @@ internal static void hb_map_set (hb_map_t map, UInt32 key, UInt32 value) => // extern unsigned int hb_ot_color_glyph_get_layers(hb_face_t* face, hb_codepoint_t glyph, unsigned int start_offset, unsigned int* layer_count, hb_ot_color_layer_t* layers) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_color_glyph_get_layers (hb_face_t face, UInt32 glyph, UInt32 start_offset, UInt32* layer_count, OpenTypeColorLayer* layers); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_color_glyph_get_layers (hb_face_t face, UInt32 glyph, UInt32 start_offset, UInt32* layer_count, OpenTypeColorLayer* layers); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2859,8 +3870,13 @@ internal static UInt32 hb_ot_color_glyph_get_layers (hb_face_t face, UInt32 glyp // extern hb_blob_t* hb_ot_color_glyph_reference_png(hb_font_t* font, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_ot_color_glyph_reference_png (hb_font_t font, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_ot_color_glyph_reference_png (hb_font_t font, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2873,8 +3889,13 @@ internal static hb_blob_t hb_ot_color_glyph_reference_png (hb_font_t font, UInt3 // extern hb_blob_t* hb_ot_color_glyph_reference_svg(hb_face_t* face, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_ot_color_glyph_reference_svg (hb_face_t face, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_ot_color_glyph_reference_svg (hb_face_t face, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2887,9 +3908,15 @@ internal static hb_blob_t hb_ot_color_glyph_reference_svg (hb_face_t face, UInt3 // extern hb_bool_t hb_ot_color_has_layers(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_color_has_layers (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_color_has_layers (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2903,9 +3930,15 @@ internal static bool hb_ot_color_has_layers (hb_face_t face) => // extern hb_bool_t hb_ot_color_has_palettes(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_color_has_palettes (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_color_has_palettes (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2919,9 +3952,15 @@ internal static bool hb_ot_color_has_palettes (hb_face_t face) => // extern hb_bool_t hb_ot_color_has_png(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_color_has_png (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_color_has_png (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2935,9 +3974,15 @@ internal static bool hb_ot_color_has_png (hb_face_t face) => // extern hb_bool_t hb_ot_color_has_svg(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_color_has_svg (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_color_has_svg (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2951,8 +3996,13 @@ internal static bool hb_ot_color_has_svg (hb_face_t face) => // extern hb_ot_name_id_t hb_ot_color_palette_color_get_name_id(hb_face_t* face, unsigned int color_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial OpenTypeNameId hb_ot_color_palette_color_get_name_id (hb_face_t face, UInt32 color_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern OpenTypeNameId hb_ot_color_palette_color_get_name_id (hb_face_t face, UInt32 color_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2965,8 +4015,13 @@ internal static OpenTypeNameId hb_ot_color_palette_color_get_name_id (hb_face_t // extern unsigned int hb_ot_color_palette_get_colors(hb_face_t* face, unsigned int palette_index, unsigned int start_offset, unsigned int* color_count, hb_color_t* colors) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_color_palette_get_colors (hb_face_t face, UInt32 palette_index, UInt32 start_offset, UInt32* color_count, UInt32* colors); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_color_palette_get_colors (hb_face_t face, UInt32 palette_index, UInt32 start_offset, UInt32* color_count, UInt32* colors); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2979,8 +4034,13 @@ internal static UInt32 hb_ot_color_palette_get_colors (hb_face_t face, UInt32 pa // extern unsigned int hb_ot_color_palette_get_count(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_color_palette_get_count (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_color_palette_get_count (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2993,8 +4053,13 @@ internal static UInt32 hb_ot_color_palette_get_count (hb_face_t face) => // extern hb_ot_color_palette_flags_t hb_ot_color_palette_get_flags(hb_face_t* face, unsigned int palette_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial OpenTypeColorPaletteFlags hb_ot_color_palette_get_flags (hb_face_t face, UInt32 palette_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern OpenTypeColorPaletteFlags hb_ot_color_palette_get_flags (hb_face_t face, UInt32 palette_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3007,8 +4072,13 @@ internal static OpenTypeColorPaletteFlags hb_ot_color_palette_get_flags (hb_face // extern hb_ot_name_id_t hb_ot_color_palette_get_name_id(hb_face_t* face, unsigned int palette_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial OpenTypeNameId hb_ot_color_palette_get_name_id (hb_face_t face, UInt32 palette_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern OpenTypeNameId hb_ot_color_palette_get_name_id (hb_face_t face, UInt32 palette_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3025,8 +4095,13 @@ internal static OpenTypeNameId hb_ot_color_palette_get_name_id (hb_face_t face, // extern void hb_ot_font_set_funcs(hb_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_font_set_funcs (hb_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_font_set_funcs (hb_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3043,8 +4118,13 @@ internal static void hb_ot_font_set_funcs (hb_font_t font) => // extern void hb_ot_layout_collect_features(hb_face_t* face, hb_tag_t table_tag, const hb_tag_t* scripts, const hb_tag_t* languages, const hb_tag_t* features, hb_set_t* feature_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_collect_features (hb_face_t face, UInt32 table_tag, UInt32* scripts, UInt32* languages, UInt32* features, hb_set_t feature_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_collect_features (hb_face_t face, UInt32 table_tag, UInt32* scripts, UInt32* languages, UInt32* features, hb_set_t feature_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3057,8 +4137,13 @@ internal static void hb_ot_layout_collect_features (hb_face_t face, UInt32 table // extern void hb_ot_layout_collect_lookups(hb_face_t* face, hb_tag_t table_tag, const hb_tag_t* scripts, const hb_tag_t* languages, const hb_tag_t* features, hb_set_t* lookup_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_collect_lookups (hb_face_t face, UInt32 table_tag, UInt32* scripts, UInt32* languages, UInt32* features, hb_set_t lookup_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_collect_lookups (hb_face_t face, UInt32 table_tag, UInt32* scripts, UInt32* languages, UInt32* features, hb_set_t lookup_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3071,8 +4156,13 @@ internal static void hb_ot_layout_collect_lookups (hb_face_t face, UInt32 table_ // extern unsigned int hb_ot_layout_feature_get_characters(hb_face_t* face, hb_tag_t table_tag, unsigned int feature_index, unsigned int start_offset, unsigned int* char_count, hb_codepoint_t* characters) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_feature_get_characters (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 start_offset, UInt32* char_count, UInt32* characters); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_feature_get_characters (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 start_offset, UInt32* char_count, UInt32* characters); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3085,8 +4175,13 @@ internal static UInt32 hb_ot_layout_feature_get_characters (hb_face_t face, UInt // extern unsigned int hb_ot_layout_feature_get_lookups(hb_face_t* face, hb_tag_t table_tag, unsigned int feature_index, unsigned int start_offset, unsigned int* lookup_count, unsigned int* lookup_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_feature_get_lookups (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 start_offset, UInt32* lookup_count, UInt32* lookup_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_feature_get_lookups (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 start_offset, UInt32* lookup_count, UInt32* lookup_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3099,9 +4194,15 @@ internal static UInt32 hb_ot_layout_feature_get_lookups (hb_face_t face, UInt32 // extern hb_bool_t hb_ot_layout_feature_get_name_ids(hb_face_t* face, hb_tag_t table_tag, unsigned int feature_index, hb_ot_name_id_t* label_id, hb_ot_name_id_t* tooltip_id, hb_ot_name_id_t* sample_id, unsigned int* num_named_parameters, hb_ot_name_id_t* first_param_id) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_feature_get_name_ids (hb_face_t face, UInt32 table_tag, UInt32 feature_index, OpenTypeNameId* label_id, OpenTypeNameId* tooltip_id, OpenTypeNameId* sample_id, UInt32* num_named_parameters, OpenTypeNameId* first_param_id); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_feature_get_name_ids (hb_face_t face, UInt32 table_tag, UInt32 feature_index, OpenTypeNameId* label_id, OpenTypeNameId* tooltip_id, OpenTypeNameId* sample_id, UInt32* num_named_parameters, OpenTypeNameId* first_param_id); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3115,8 +4216,13 @@ internal static bool hb_ot_layout_feature_get_name_ids (hb_face_t face, UInt32 t // extern unsigned int hb_ot_layout_feature_with_variations_get_lookups(hb_face_t* face, hb_tag_t table_tag, unsigned int feature_index, unsigned int variations_index, unsigned int start_offset, unsigned int* lookup_count, unsigned int* lookup_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_feature_with_variations_get_lookups (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 variations_index, UInt32 start_offset, UInt32* lookup_count, UInt32* lookup_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_feature_with_variations_get_lookups (hb_face_t face, UInt32 table_tag, UInt32 feature_index, UInt32 variations_index, UInt32 start_offset, UInt32* lookup_count, UInt32* lookup_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3129,8 +4235,13 @@ internal static UInt32 hb_ot_layout_feature_with_variations_get_lookups (hb_face // extern unsigned int hb_ot_layout_get_attach_points(hb_face_t* face, hb_codepoint_t glyph, unsigned int start_offset, unsigned int* point_count, unsigned int* point_array) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_get_attach_points (hb_face_t face, UInt32 glyph, UInt32 start_offset, UInt32* point_count, UInt32* point_array); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_get_attach_points (hb_face_t face, UInt32 glyph, UInt32 start_offset, UInt32* point_count, UInt32* point_array); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3143,9 +4254,15 @@ internal static UInt32 hb_ot_layout_get_attach_points (hb_face_t face, UInt32 gl // extern hb_bool_t hb_ot_layout_get_baseline(hb_font_t* font, hb_ot_layout_baseline_tag_t baseline_tag, hb_direction_t direction, hb_tag_t script_tag, hb_tag_t language_tag, hb_position_t* coord) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_get_baseline (hb_font_t font, OpenTypeLayoutBaselineTag baseline_tag, Direction direction, UInt32 script_tag, UInt32 language_tag, Int32* coord); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_get_baseline (hb_font_t font, OpenTypeLayoutBaselineTag baseline_tag, Direction direction, UInt32 script_tag, UInt32 language_tag, Int32* coord); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3159,8 +4276,13 @@ internal static bool hb_ot_layout_get_baseline (hb_font_t font, OpenTypeLayoutBa // extern hb_ot_layout_glyph_class_t hb_ot_layout_get_glyph_class(hb_face_t* face, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial OpenTypeLayoutGlyphClass hb_ot_layout_get_glyph_class (hb_face_t face, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern OpenTypeLayoutGlyphClass hb_ot_layout_get_glyph_class (hb_face_t face, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3173,8 +4295,13 @@ internal static OpenTypeLayoutGlyphClass hb_ot_layout_get_glyph_class (hb_face_t // extern void hb_ot_layout_get_glyphs_in_class(hb_face_t* face, hb_ot_layout_glyph_class_t klass, hb_set_t* glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_get_glyphs_in_class (hb_face_t face, OpenTypeLayoutGlyphClass klass, hb_set_t glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_get_glyphs_in_class (hb_face_t face, OpenTypeLayoutGlyphClass klass, hb_set_t glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3187,8 +4314,13 @@ internal static void hb_ot_layout_get_glyphs_in_class (hb_face_t face, OpenTypeL // extern unsigned int hb_ot_layout_get_ligature_carets(hb_font_t* font, hb_direction_t direction, hb_codepoint_t glyph, unsigned int start_offset, unsigned int* caret_count, hb_position_t* caret_array) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_get_ligature_carets (hb_font_t font, Direction direction, UInt32 glyph, UInt32 start_offset, UInt32* caret_count, Int32* caret_array); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_get_ligature_carets (hb_font_t font, Direction direction, UInt32 glyph, UInt32 start_offset, UInt32* caret_count, Int32* caret_array); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3201,9 +4333,15 @@ internal static UInt32 hb_ot_layout_get_ligature_carets (hb_font_t font, Directi // extern hb_bool_t hb_ot_layout_get_size_params(hb_face_t* face, unsigned int* design_size, unsigned int* subfamily_id, hb_ot_name_id_t* subfamily_name_id, unsigned int* range_start, unsigned int* range_end) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_get_size_params (hb_face_t face, UInt32* design_size, UInt32* subfamily_id, OpenTypeNameId* subfamily_name_id, UInt32* range_start, UInt32* range_end); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_get_size_params (hb_face_t face, UInt32* design_size, UInt32* subfamily_id, OpenTypeNameId* subfamily_name_id, UInt32* range_start, UInt32* range_end); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3217,9 +4355,15 @@ internal static bool hb_ot_layout_get_size_params (hb_face_t face, UInt32* desig // extern hb_bool_t hb_ot_layout_has_glyph_classes(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_has_glyph_classes (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_has_glyph_classes (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3233,9 +4377,15 @@ internal static bool hb_ot_layout_has_glyph_classes (hb_face_t face) => // extern hb_bool_t hb_ot_layout_has_positioning(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_has_positioning (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_has_positioning (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3249,9 +4399,15 @@ internal static bool hb_ot_layout_has_positioning (hb_face_t face) => // extern hb_bool_t hb_ot_layout_has_substitution(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_has_substitution (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_has_substitution (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3265,9 +4421,15 @@ internal static bool hb_ot_layout_has_substitution (hb_face_t face) => // extern hb_bool_t hb_ot_layout_language_find_feature(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, hb_tag_t feature_tag, unsigned int* feature_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_language_find_feature (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 feature_tag, UInt32* feature_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_language_find_feature (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 feature_tag, UInt32* feature_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3281,8 +4443,13 @@ internal static bool hb_ot_layout_language_find_feature (hb_face_t face, UInt32 // extern unsigned int hb_ot_layout_language_get_feature_indexes(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, unsigned int start_offset, unsigned int* feature_count, unsigned int* feature_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_language_get_feature_indexes (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 start_offset, UInt32* feature_count, UInt32* feature_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_language_get_feature_indexes (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 start_offset, UInt32* feature_count, UInt32* feature_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3295,8 +4462,13 @@ internal static UInt32 hb_ot_layout_language_get_feature_indexes (hb_face_t face // extern unsigned int hb_ot_layout_language_get_feature_tags(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, unsigned int start_offset, unsigned int* feature_count, hb_tag_t* feature_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_language_get_feature_tags (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 start_offset, UInt32* feature_count, UInt32* feature_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_language_get_feature_tags (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32 start_offset, UInt32* feature_count, UInt32* feature_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3309,9 +4481,15 @@ internal static UInt32 hb_ot_layout_language_get_feature_tags (hb_face_t face, U // extern hb_bool_t hb_ot_layout_language_get_required_feature(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, unsigned int* feature_index, hb_tag_t* feature_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_language_get_required_feature (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32* feature_index, UInt32* feature_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_language_get_required_feature (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32* feature_index, UInt32* feature_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3325,9 +4503,15 @@ internal static bool hb_ot_layout_language_get_required_feature (hb_face_t face, // extern hb_bool_t hb_ot_layout_language_get_required_feature_index(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, unsigned int* feature_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_language_get_required_feature_index (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32* feature_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_language_get_required_feature_index (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_index, UInt32* feature_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3341,8 +4525,13 @@ internal static bool hb_ot_layout_language_get_required_feature_index (hb_face_t // extern void hb_ot_layout_lookup_collect_glyphs(hb_face_t* face, hb_tag_t table_tag, unsigned int lookup_index, hb_set_t* glyphs_before, hb_set_t* glyphs_input, hb_set_t* glyphs_after, hb_set_t* glyphs_output) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_lookup_collect_glyphs (hb_face_t face, UInt32 table_tag, UInt32 lookup_index, hb_set_t glyphs_before, hb_set_t glyphs_input, hb_set_t glyphs_after, hb_set_t glyphs_output); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_lookup_collect_glyphs (hb_face_t face, UInt32 table_tag, UInt32 lookup_index, hb_set_t glyphs_before, hb_set_t glyphs_input, hb_set_t glyphs_after, hb_set_t glyphs_output); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3355,8 +4544,13 @@ internal static void hb_ot_layout_lookup_collect_glyphs (hb_face_t face, UInt32 // extern unsigned int hb_ot_layout_lookup_get_glyph_alternates(hb_face_t* face, unsigned int lookup_index, hb_codepoint_t glyph, unsigned int start_offset, unsigned int* alternate_count, hb_codepoint_t* alternate_glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_lookup_get_glyph_alternates (hb_face_t face, UInt32 lookup_index, UInt32 glyph, UInt32 start_offset, UInt32* alternate_count, UInt32* alternate_glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_lookup_get_glyph_alternates (hb_face_t face, UInt32 lookup_index, UInt32 glyph, UInt32 start_offset, UInt32* alternate_count, UInt32* alternate_glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3369,8 +4563,13 @@ internal static UInt32 hb_ot_layout_lookup_get_glyph_alternates (hb_face_t face, // extern void hb_ot_layout_lookup_substitute_closure(hb_face_t* face, unsigned int lookup_index, hb_set_t* glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_lookup_substitute_closure (hb_face_t face, UInt32 lookup_index, hb_set_t glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_lookup_substitute_closure (hb_face_t face, UInt32 lookup_index, hb_set_t glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3383,9 +4582,15 @@ internal static void hb_ot_layout_lookup_substitute_closure (hb_face_t face, UIn // extern hb_bool_t hb_ot_layout_lookup_would_substitute(hb_face_t* face, unsigned int lookup_index, const hb_codepoint_t* glyphs, unsigned int glyphs_length, hb_bool_t zero_context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_lookup_would_substitute (hb_face_t face, UInt32 lookup_index, UInt32* glyphs, UInt32 glyphs_length, [MarshalAs (UnmanagedType.I1)] bool zero_context); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_lookup_would_substitute (hb_face_t face, UInt32 lookup_index, UInt32* glyphs, UInt32 glyphs_length, [MarshalAs (UnmanagedType.I1)] bool zero_context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3399,8 +4604,13 @@ internal static bool hb_ot_layout_lookup_would_substitute (hb_face_t face, UInt3 // extern void hb_ot_layout_lookups_substitute_closure(hb_face_t* face, const hb_set_t* lookups, hb_set_t* glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_layout_lookups_substitute_closure (hb_face_t face, hb_set_t lookups, hb_set_t glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_layout_lookups_substitute_closure (hb_face_t face, hb_set_t lookups, hb_set_t glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3413,8 +4623,13 @@ internal static void hb_ot_layout_lookups_substitute_closure (hb_face_t face, hb // extern unsigned int hb_ot_layout_script_get_language_tags(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int start_offset, unsigned int* language_count, hb_tag_t* language_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_script_get_language_tags (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 start_offset, UInt32* language_count, UInt32* language_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_script_get_language_tags (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 start_offset, UInt32* language_count, UInt32* language_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3427,9 +4642,15 @@ internal static UInt32 hb_ot_layout_script_get_language_tags (hb_face_t face, UI // extern hb_bool_t hb_ot_layout_script_select_language(hb_face_t* face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_count, const hb_tag_t* language_tags, unsigned int* language_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_script_select_language (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_count, UInt32* language_tags, UInt32* language_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_script_select_language (hb_face_t face, UInt32 table_tag, UInt32 script_index, UInt32 language_count, UInt32* language_tags, UInt32* language_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3443,9 +4664,15 @@ internal static bool hb_ot_layout_script_select_language (hb_face_t face, UInt32 // extern hb_bool_t hb_ot_layout_table_find_feature_variations(hb_face_t* face, hb_tag_t table_tag, const int* coords, unsigned int num_coords, unsigned int* variations_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_table_find_feature_variations (hb_face_t face, UInt32 table_tag, Int32* coords, UInt32 num_coords, UInt32* variations_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_table_find_feature_variations (hb_face_t face, UInt32 table_tag, Int32* coords, UInt32 num_coords, UInt32* variations_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3459,9 +4686,15 @@ internal static bool hb_ot_layout_table_find_feature_variations (hb_face_t face, // extern hb_bool_t hb_ot_layout_table_find_script(hb_face_t* face, hb_tag_t table_tag, hb_tag_t script_tag, unsigned int* script_index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_table_find_script (hb_face_t face, UInt32 table_tag, UInt32 script_tag, UInt32* script_index); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_table_find_script (hb_face_t face, UInt32 table_tag, UInt32 script_tag, UInt32* script_index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3475,8 +4708,13 @@ internal static bool hb_ot_layout_table_find_script (hb_face_t face, UInt32 tabl // extern unsigned int hb_ot_layout_table_get_feature_tags(hb_face_t* face, hb_tag_t table_tag, unsigned int start_offset, unsigned int* feature_count, hb_tag_t* feature_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_table_get_feature_tags (hb_face_t face, UInt32 table_tag, UInt32 start_offset, UInt32* feature_count, UInt32* feature_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_table_get_feature_tags (hb_face_t face, UInt32 table_tag, UInt32 start_offset, UInt32* feature_count, UInt32* feature_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3489,8 +4727,13 @@ internal static UInt32 hb_ot_layout_table_get_feature_tags (hb_face_t face, UInt // extern unsigned int hb_ot_layout_table_get_lookup_count(hb_face_t* face, hb_tag_t table_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_table_get_lookup_count (hb_face_t face, UInt32 table_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_table_get_lookup_count (hb_face_t face, UInt32 table_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3503,8 +4746,13 @@ internal static UInt32 hb_ot_layout_table_get_lookup_count (hb_face_t face, UInt // extern unsigned int hb_ot_layout_table_get_script_tags(hb_face_t* face, hb_tag_t table_tag, unsigned int start_offset, unsigned int* script_count, hb_tag_t* script_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_layout_table_get_script_tags (hb_face_t face, UInt32 table_tag, UInt32 start_offset, UInt32* script_count, UInt32* script_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_layout_table_get_script_tags (hb_face_t face, UInt32 table_tag, UInt32 start_offset, UInt32* script_count, UInt32* script_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3517,9 +4765,15 @@ internal static UInt32 hb_ot_layout_table_get_script_tags (hb_face_t face, UInt3 // extern hb_bool_t hb_ot_layout_table_select_script(hb_face_t* face, hb_tag_t table_tag, unsigned int script_count, const hb_tag_t* script_tags, unsigned int* script_index, hb_tag_t* chosen_script) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_layout_table_select_script (hb_face_t face, UInt32 table_tag, UInt32 script_count, UInt32* script_tags, UInt32* script_index, UInt32* chosen_script); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_layout_table_select_script (hb_face_t face, UInt32 table_tag, UInt32 script_count, UInt32* script_tags, UInt32* script_index, UInt32* chosen_script); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3533,8 +4787,13 @@ internal static bool hb_ot_layout_table_select_script (hb_face_t face, UInt32 ta // extern hb_language_t hb_ot_tag_to_language(hb_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial IntPtr hb_ot_tag_to_language (UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr hb_ot_tag_to_language (UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3547,8 +4806,13 @@ internal static IntPtr hb_ot_tag_to_language (UInt32 tag) => // extern hb_script_t hb_ot_tag_to_script(hb_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_tag_to_script (UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_tag_to_script (UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3561,8 +4825,13 @@ internal static UInt32 hb_ot_tag_to_script (UInt32 tag) => // extern void hb_ot_tags_from_script_and_language(hb_script_t script, hb_language_t language, unsigned int* script_count, hb_tag_t* script_tags, unsigned int* language_count, hb_tag_t* language_tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_tags_from_script_and_language (UInt32 script, IntPtr language, UInt32* script_count, UInt32* script_tags, UInt32* language_count, UInt32* language_tags); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_tags_from_script_and_language (UInt32 script, IntPtr language, UInt32* script_count, UInt32* script_tags, UInt32* language_count, UInt32* language_tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3575,8 +4844,13 @@ internal static void hb_ot_tags_from_script_and_language (UInt32 script, IntPtr // extern void hb_ot_tags_to_script_and_language(hb_tag_t script_tag, hb_tag_t language_tag, hb_script_t* script, hb_language_t* language) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_tags_to_script_and_language (UInt32 script_tag, UInt32 language_tag, UInt32* script, IntPtr* language); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_tags_to_script_and_language (UInt32 script_tag, UInt32 language_tag, UInt32* script, IntPtr* language); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3593,8 +4867,13 @@ internal static void hb_ot_tags_to_script_and_language (UInt32 script_tag, UInt3 // extern hb_position_t hb_ot_math_get_constant(hb_font_t* font, hb_ot_math_constant_t constant) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_math_get_constant (hb_font_t font, OpenTypeMathConstant constant); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_math_get_constant (hb_font_t font, OpenTypeMathConstant constant); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3607,8 +4886,13 @@ internal static Int32 hb_ot_math_get_constant (hb_font_t font, OpenTypeMathConst // extern unsigned int hb_ot_math_get_glyph_assembly(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, unsigned int start_offset, unsigned int* parts_count, hb_ot_math_glyph_part_t* parts, hb_position_t* italics_correction) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_math_get_glyph_assembly (hb_font_t font, UInt32 glyph, Direction direction, UInt32 start_offset, UInt32* parts_count, OpenTypeMathGlyphPart* parts, Int32* italics_correction); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_math_get_glyph_assembly (hb_font_t font, UInt32 glyph, Direction direction, UInt32 start_offset, UInt32* parts_count, OpenTypeMathGlyphPart* parts, Int32* italics_correction); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3621,8 +4905,13 @@ internal static UInt32 hb_ot_math_get_glyph_assembly (hb_font_t font, UInt32 gly // extern hb_position_t hb_ot_math_get_glyph_italics_correction(hb_font_t* font, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_math_get_glyph_italics_correction (hb_font_t font, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_math_get_glyph_italics_correction (hb_font_t font, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3635,8 +4924,13 @@ internal static Int32 hb_ot_math_get_glyph_italics_correction (hb_font_t font, U // extern hb_position_t hb_ot_math_get_glyph_kerning(hb_font_t* font, hb_codepoint_t glyph, hb_ot_math_kern_t kern, hb_position_t correction_height) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_math_get_glyph_kerning (hb_font_t font, UInt32 glyph, OpenTypeMathKern kern, Int32 correction_height); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_math_get_glyph_kerning (hb_font_t font, UInt32 glyph, OpenTypeMathKern kern, Int32 correction_height); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3649,8 +4943,13 @@ internal static Int32 hb_ot_math_get_glyph_kerning (hb_font_t font, UInt32 glyph // extern hb_position_t hb_ot_math_get_glyph_top_accent_attachment(hb_font_t* font, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_math_get_glyph_top_accent_attachment (hb_font_t font, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_math_get_glyph_top_accent_attachment (hb_font_t font, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3663,8 +4962,13 @@ internal static Int32 hb_ot_math_get_glyph_top_accent_attachment (hb_font_t font // extern unsigned int hb_ot_math_get_glyph_variants(hb_font_t* font, hb_codepoint_t glyph, hb_direction_t direction, unsigned int start_offset, unsigned int* variants_count, hb_ot_math_glyph_variant_t* variants) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_math_get_glyph_variants (hb_font_t font, UInt32 glyph, Direction direction, UInt32 start_offset, UInt32* variants_count, OpenTypeMathGlyphVariant* variants); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_math_get_glyph_variants (hb_font_t font, UInt32 glyph, Direction direction, UInt32 start_offset, UInt32* variants_count, OpenTypeMathGlyphVariant* variants); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3677,8 +4981,13 @@ internal static UInt32 hb_ot_math_get_glyph_variants (hb_font_t font, UInt32 gly // extern hb_position_t hb_ot_math_get_min_connector_overlap(hb_font_t* font, hb_direction_t direction) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_math_get_min_connector_overlap (hb_font_t font, Direction direction); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_math_get_min_connector_overlap (hb_font_t font, Direction direction); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3691,9 +5000,15 @@ internal static Int32 hb_ot_math_get_min_connector_overlap (hb_font_t font, Dire // extern hb_bool_t hb_ot_math_has_data(hb_face_t* face) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_math_has_data (hb_face_t face); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_math_has_data (hb_face_t face); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3707,9 +5022,15 @@ internal static bool hb_ot_math_has_data (hb_face_t face) => // extern hb_bool_t hb_ot_math_is_glyph_extended_shape(hb_face_t* face, hb_codepoint_t glyph) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_math_is_glyph_extended_shape (hb_face_t face, UInt32 glyph); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_math_is_glyph_extended_shape (hb_face_t face, UInt32 glyph); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3727,8 +5048,13 @@ internal static bool hb_ot_math_is_glyph_extended_shape (hb_face_t face, UInt32 // extern unsigned int hb_ot_meta_get_entry_tags(hb_face_t* face, unsigned int start_offset, unsigned int* entries_count, hb_ot_meta_tag_t* entries) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_meta_get_entry_tags (hb_face_t face, UInt32 start_offset, UInt32* entries_count, OpenTypeMetaTag* entries); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_meta_get_entry_tags (hb_face_t face, UInt32 start_offset, UInt32* entries_count, OpenTypeMetaTag* entries); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3741,8 +5067,13 @@ internal static UInt32 hb_ot_meta_get_entry_tags (hb_face_t face, UInt32 start_o // extern hb_blob_t* hb_ot_meta_reference_entry(hb_face_t* face, hb_ot_meta_tag_t meta_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_blob_t hb_ot_meta_reference_entry (hb_face_t face, OpenTypeMetaTag meta_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_blob_t hb_ot_meta_reference_entry (hb_face_t face, OpenTypeMetaTag meta_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3759,9 +5090,15 @@ internal static hb_blob_t hb_ot_meta_reference_entry (hb_face_t face, OpenTypeMe // extern hb_bool_t hb_ot_metrics_get_position(hb_font_t* font, hb_ot_metrics_tag_t metrics_tag, hb_position_t* position) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_ot_metrics_get_position (hb_font_t font, OpenTypeMetricsTag metrics_tag, Int32* position); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_ot_metrics_get_position (hb_font_t font, OpenTypeMetricsTag metrics_tag, Int32* position); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3775,8 +5112,13 @@ internal static bool hb_ot_metrics_get_position (hb_font_t font, OpenTypeMetrics // extern float hb_ot_metrics_get_variation(hb_font_t* font, hb_ot_metrics_tag_t metrics_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Single hb_ot_metrics_get_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Single hb_ot_metrics_get_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3789,8 +5131,13 @@ internal static Single hb_ot_metrics_get_variation (hb_font_t font, OpenTypeMetr // extern hb_position_t hb_ot_metrics_get_x_variation(hb_font_t* font, hb_ot_metrics_tag_t metrics_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_metrics_get_x_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_metrics_get_x_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3803,8 +5150,13 @@ internal static Int32 hb_ot_metrics_get_x_variation (hb_font_t font, OpenTypeMet // extern hb_position_t hb_ot_metrics_get_y_variation(hb_font_t* font, hb_ot_metrics_tag_t metrics_tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial Int32 hb_ot_metrics_get_y_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 hb_ot_metrics_get_y_variation (hb_font_t font, OpenTypeMetricsTag metrics_tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3821,8 +5173,13 @@ internal static Int32 hb_ot_metrics_get_y_variation (hb_font_t font, OpenTypeMet // extern unsigned int hb_ot_name_get_utf16(hb_face_t* face, hb_ot_name_id_t name_id, hb_language_t language, unsigned int* text_size, uint16_t* text) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_name_get_utf16 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, UInt16* text); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_name_get_utf16 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, UInt16* text); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3835,8 +5192,13 @@ internal static UInt32 hb_ot_name_get_utf16 (hb_face_t face, OpenTypeNameId name // extern unsigned int hb_ot_name_get_utf32(hb_face_t* face, hb_ot_name_id_t name_id, hb_language_t language, unsigned int* text_size, uint32_t* text) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_name_get_utf32 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, UInt32* text); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_name_get_utf32 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, UInt32* text); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3849,8 +5211,13 @@ internal static UInt32 hb_ot_name_get_utf32 (hb_face_t face, OpenTypeNameId name // extern unsigned int hb_ot_name_get_utf8(hb_face_t* face, hb_ot_name_id_t name_id, hb_language_t language, unsigned int* text_size, char* text) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_ot_name_get_utf8 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, /* char */ void* text); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_ot_name_get_utf8 (hb_face_t face, OpenTypeNameId name_id, IntPtr language, UInt32* text_size, /* char */ void* text); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3863,8 +5230,13 @@ internal static UInt32 hb_ot_name_get_utf8 (hb_face_t face, OpenTypeNameId name_ // extern const hb_ot_name_entry_t* hb_ot_name_list_names(hb_face_t* face, unsigned int* num_entries) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial OpenTypeNameEntry* hb_ot_name_list_names (hb_face_t face, UInt32* num_entries); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern OpenTypeNameEntry* hb_ot_name_list_names (hb_face_t face, UInt32* num_entries); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3881,8 +5253,13 @@ private partial class Delegates { // extern void hb_ot_shape_glyphs_closure(hb_font_t* font, hb_buffer_t* buffer, const hb_feature_t* features, unsigned int num_features, hb_set_t* glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_shape_glyphs_closure (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features, hb_set_t glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_shape_glyphs_closure (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features, hb_set_t glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3895,8 +5272,13 @@ internal static void hb_ot_shape_glyphs_closure (hb_font_t font, hb_buffer_t buf // extern void hb_ot_shape_plan_collect_lookups(hb_shape_plan_t* shape_plan, hb_tag_t table_tag, hb_set_t* lookup_indexes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_ot_shape_plan_collect_lookups (hb_shape_plan_t shape_plan, UInt32 table_tag, hb_set_t lookup_indexes); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_ot_shape_plan_collect_lookups (hb_shape_plan_t shape_plan, UInt32 table_tag, hb_set_t lookup_indexes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3913,8 +5295,13 @@ internal static void hb_ot_shape_plan_collect_lookups (hb_shape_plan_t shape_pla // extern void hb_set_add(hb_set_t* set, hb_codepoint_t codepoint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_add (hb_set_t set, UInt32 codepoint); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_add (hb_set_t set, UInt32 codepoint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3927,8 +5314,13 @@ internal static void hb_set_add (hb_set_t set, UInt32 codepoint) => // extern void hb_set_add_range(hb_set_t* set, hb_codepoint_t first, hb_codepoint_t last) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_add_range (hb_set_t set, UInt32 first, UInt32 last); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_add_range (hb_set_t set, UInt32 first, UInt32 last); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3941,9 +5333,15 @@ internal static void hb_set_add_range (hb_set_t set, UInt32 first, UInt32 last) // extern hb_bool_t hb_set_allocation_successful(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_allocation_successful (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_allocation_successful (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3957,8 +5355,13 @@ internal static bool hb_set_allocation_successful (hb_set_t set) => // extern void hb_set_clear(hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_clear (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_clear (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3971,8 +5374,13 @@ internal static void hb_set_clear (hb_set_t set) => // extern hb_set_t* hb_set_copy(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_set_t hb_set_copy (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_set_t hb_set_copy (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3985,8 +5393,13 @@ internal static hb_set_t hb_set_copy (hb_set_t set) => // extern hb_set_t* hb_set_create() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_set_t hb_set_create (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_set_t hb_set_create (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3999,8 +5412,13 @@ internal static hb_set_t hb_set_create () => // extern void hb_set_del(hb_set_t* set, hb_codepoint_t codepoint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_del (hb_set_t set, UInt32 codepoint); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_del (hb_set_t set, UInt32 codepoint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4013,8 +5431,13 @@ internal static void hb_set_del (hb_set_t set, UInt32 codepoint) => // extern void hb_set_del_range(hb_set_t* set, hb_codepoint_t first, hb_codepoint_t last) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_del_range (hb_set_t set, UInt32 first, UInt32 last); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_del_range (hb_set_t set, UInt32 first, UInt32 last); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4027,8 +5450,13 @@ internal static void hb_set_del_range (hb_set_t set, UInt32 first, UInt32 last) // extern void hb_set_destroy(hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_destroy (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_destroy (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4041,8 +5469,13 @@ internal static void hb_set_destroy (hb_set_t set) => // extern hb_set_t* hb_set_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_set_t hb_set_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_set_t hb_set_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4055,8 +5488,13 @@ internal static hb_set_t hb_set_get_empty () => // extern hb_codepoint_t hb_set_get_max(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_set_get_max (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_set_get_max (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4069,8 +5507,13 @@ internal static UInt32 hb_set_get_max (hb_set_t set) => // extern hb_codepoint_t hb_set_get_min(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_set_get_min (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_set_get_min (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4083,8 +5526,13 @@ internal static UInt32 hb_set_get_min (hb_set_t set) => // extern unsigned int hb_set_get_population(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_set_get_population (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_set_get_population (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4097,9 +5545,15 @@ internal static UInt32 hb_set_get_population (hb_set_t set) => // extern hb_bool_t hb_set_has(const hb_set_t* set, hb_codepoint_t codepoint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_has (hb_set_t set, UInt32 codepoint); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_has (hb_set_t set, UInt32 codepoint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4113,8 +5567,13 @@ internal static bool hb_set_has (hb_set_t set, UInt32 codepoint) => // extern void hb_set_intersect(hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_intersect (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_intersect (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4127,9 +5586,15 @@ internal static void hb_set_intersect (hb_set_t set, hb_set_t other) => // extern hb_bool_t hb_set_is_empty(const hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_is_empty (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_is_empty (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4143,9 +5608,15 @@ internal static bool hb_set_is_empty (hb_set_t set) => // extern hb_bool_t hb_set_is_equal(const hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_is_equal (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_is_equal (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4159,9 +5630,15 @@ internal static bool hb_set_is_equal (hb_set_t set, hb_set_t other) => // extern hb_bool_t hb_set_is_subset(const hb_set_t* set, const hb_set_t* larger_set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_is_subset (hb_set_t set, hb_set_t larger_set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_is_subset (hb_set_t set, hb_set_t larger_set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4175,9 +5652,15 @@ internal static bool hb_set_is_subset (hb_set_t set, hb_set_t larger_set) => // extern hb_bool_t hb_set_next(const hb_set_t* set, hb_codepoint_t* codepoint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_next (hb_set_t set, UInt32* codepoint); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_next (hb_set_t set, UInt32* codepoint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4191,9 +5674,15 @@ internal static bool hb_set_next (hb_set_t set, UInt32* codepoint) => // extern hb_bool_t hb_set_next_range(const hb_set_t* set, hb_codepoint_t* first, hb_codepoint_t* last) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_next_range (hb_set_t set, UInt32* first, UInt32* last); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_next_range (hb_set_t set, UInt32* first, UInt32* last); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4207,9 +5696,15 @@ internal static bool hb_set_next_range (hb_set_t set, UInt32* first, UInt32* las // extern hb_bool_t hb_set_previous(const hb_set_t* set, hb_codepoint_t* codepoint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_previous (hb_set_t set, UInt32* codepoint); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_previous (hb_set_t set, UInt32* codepoint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4223,9 +5718,15 @@ internal static bool hb_set_previous (hb_set_t set, UInt32* codepoint) => // extern hb_bool_t hb_set_previous_range(const hb_set_t* set, hb_codepoint_t* first, hb_codepoint_t* last) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_set_previous_range (hb_set_t set, UInt32* first, UInt32* last); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_set_previous_range (hb_set_t set, UInt32* first, UInt32* last); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4239,8 +5740,13 @@ internal static bool hb_set_previous_range (hb_set_t set, UInt32* first, UInt32* // extern hb_set_t* hb_set_reference(hb_set_t* set) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_set_t hb_set_reference (hb_set_t set); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_set_t hb_set_reference (hb_set_t set); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4253,8 +5759,13 @@ internal static hb_set_t hb_set_reference (hb_set_t set) => // extern void hb_set_set(hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_set (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_set (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4267,8 +5778,13 @@ internal static void hb_set_set (hb_set_t set, hb_set_t other) => // extern void hb_set_subtract(hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_subtract (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_subtract (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4281,8 +5797,13 @@ internal static void hb_set_subtract (hb_set_t set, hb_set_t other) => // extern void hb_set_symmetric_difference(hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_symmetric_difference (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_symmetric_difference (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4295,8 +5816,13 @@ internal static void hb_set_symmetric_difference (hb_set_t set, hb_set_t other) // extern void hb_set_union(hb_set_t* set, const hb_set_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_set_union (hb_set_t set, hb_set_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_set_union (hb_set_t set, hb_set_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4313,8 +5839,13 @@ internal static void hb_set_union (hb_set_t set, hb_set_t other) => // extern void hb_shape(hb_font_t* font, hb_buffer_t* buffer, const hb_feature_t* features, unsigned int num_features) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_shape (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_shape (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4327,9 +5858,15 @@ internal static void hb_shape (hb_font_t font, hb_buffer_t buffer, Feature* feat // extern hb_bool_t hb_shape_full(hb_font_t* font, hb_buffer_t* buffer, const hb_feature_t* features, unsigned int num_features, const const char** shaper_list) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_shape_full (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features, /* char */ void** shaper_list); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_shape_full (hb_font_t font, hb_buffer_t buffer, Feature* features, UInt32 num_features, /* char */ void** shaper_list); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4343,8 +5880,13 @@ internal static bool hb_shape_full (hb_font_t font, hb_buffer_t buffer, Feature* // extern const char** hb_shape_list_shapers() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void** hb_shape_list_shapers (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void** hb_shape_list_shapers (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4361,8 +5903,13 @@ private partial class Delegates { // extern hb_unicode_combining_class_t hb_unicode_combining_class(hb_unicode_funcs_t* ufuncs, hb_codepoint_t unicode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UnicodeCombiningClass hb_unicode_combining_class (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UnicodeCombiningClass hb_unicode_combining_class (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4375,9 +5922,15 @@ internal static UnicodeCombiningClass hb_unicode_combining_class (hb_unicode_fun // extern hb_bool_t hb_unicode_compose(hb_unicode_funcs_t* ufuncs, hb_codepoint_t a, hb_codepoint_t b, hb_codepoint_t* ab) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_unicode_compose (hb_unicode_funcs_t ufuncs, UInt32 a, UInt32 b, UInt32* ab); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_unicode_compose (hb_unicode_funcs_t ufuncs, UInt32 a, UInt32 b, UInt32* ab); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4391,9 +5944,15 @@ internal static bool hb_unicode_compose (hb_unicode_funcs_t ufuncs, UInt32 a, UI // extern hb_bool_t hb_unicode_decompose(hb_unicode_funcs_t* ufuncs, hb_codepoint_t ab, hb_codepoint_t* a, hb_codepoint_t* b) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_unicode_decompose (hb_unicode_funcs_t ufuncs, UInt32 ab, UInt32* a, UInt32* b); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_unicode_decompose (hb_unicode_funcs_t ufuncs, UInt32 ab, UInt32* a, UInt32* b); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4407,8 +5966,13 @@ internal static bool hb_unicode_decompose (hb_unicode_funcs_t ufuncs, UInt32 ab, // extern hb_unicode_funcs_t* hb_unicode_funcs_create(hb_unicode_funcs_t* parent) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_unicode_funcs_create (hb_unicode_funcs_t parent); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_unicode_funcs_create (hb_unicode_funcs_t parent); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4421,8 +5985,13 @@ internal static hb_unicode_funcs_t hb_unicode_funcs_create (hb_unicode_funcs_t p // extern void hb_unicode_funcs_destroy(hb_unicode_funcs_t* ufuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_destroy (hb_unicode_funcs_t ufuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_destroy (hb_unicode_funcs_t ufuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4435,8 +6004,13 @@ internal static void hb_unicode_funcs_destroy (hb_unicode_funcs_t ufuncs) => // extern hb_unicode_funcs_t* hb_unicode_funcs_get_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_unicode_funcs_get_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_unicode_funcs_get_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4449,8 +6023,13 @@ internal static hb_unicode_funcs_t hb_unicode_funcs_get_default () => // extern hb_unicode_funcs_t* hb_unicode_funcs_get_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_unicode_funcs_get_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_unicode_funcs_get_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4463,8 +6042,13 @@ internal static hb_unicode_funcs_t hb_unicode_funcs_get_empty () => // extern hb_unicode_funcs_t* hb_unicode_funcs_get_parent(hb_unicode_funcs_t* ufuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_unicode_funcs_get_parent (hb_unicode_funcs_t ufuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_unicode_funcs_get_parent (hb_unicode_funcs_t ufuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4477,9 +6061,15 @@ internal static hb_unicode_funcs_t hb_unicode_funcs_get_parent (hb_unicode_funcs // extern hb_bool_t hb_unicode_funcs_is_immutable(hb_unicode_funcs_t* ufuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_unicode_funcs_is_immutable (hb_unicode_funcs_t ufuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_unicode_funcs_is_immutable (hb_unicode_funcs_t ufuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4493,8 +6083,13 @@ internal static bool hb_unicode_funcs_is_immutable (hb_unicode_funcs_t ufuncs) = // extern void hb_unicode_funcs_make_immutable(hb_unicode_funcs_t* ufuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_make_immutable (hb_unicode_funcs_t ufuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_make_immutable (hb_unicode_funcs_t ufuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4507,8 +6102,13 @@ internal static void hb_unicode_funcs_make_immutable (hb_unicode_funcs_t ufuncs) // extern hb_unicode_funcs_t* hb_unicode_funcs_reference(hb_unicode_funcs_t* ufuncs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial hb_unicode_funcs_t hb_unicode_funcs_reference (hb_unicode_funcs_t ufuncs); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern hb_unicode_funcs_t hb_unicode_funcs_reference (hb_unicode_funcs_t ufuncs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4521,8 +6121,13 @@ internal static hb_unicode_funcs_t hb_unicode_funcs_reference (hb_unicode_funcs_ // extern void hb_unicode_funcs_set_combining_class_func(hb_unicode_funcs_t* ufuncs, hb_unicode_combining_class_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t ufuncs, UnicodeCombiningClassProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4535,8 +6140,13 @@ internal static void hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs // extern void hb_unicode_funcs_set_compose_func(hb_unicode_funcs_t* ufuncs, hb_unicode_compose_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t ufuncs, UnicodeComposeProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4549,8 +6159,13 @@ internal static void hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t ufunc // extern void hb_unicode_funcs_set_decompose_func(hb_unicode_funcs_t* ufuncs, hb_unicode_decompose_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t ufuncs, UnicodeDecomposeProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4563,8 +6178,13 @@ internal static void hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t ufu // extern void hb_unicode_funcs_set_general_category_func(hb_unicode_funcs_t* ufuncs, hb_unicode_general_category_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t ufuncs, UnicodeGeneralCategoryProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4577,8 +6197,13 @@ internal static void hb_unicode_funcs_set_general_category_func (hb_unicode_func // extern void hb_unicode_funcs_set_mirroring_func(hb_unicode_funcs_t* ufuncs, hb_unicode_mirroring_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t ufuncs, UnicodeMirroringProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4591,8 +6216,13 @@ internal static void hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t ufu // extern void hb_unicode_funcs_set_script_func(hb_unicode_funcs_t* ufuncs, hb_unicode_script_func_t func, void* user_data, hb_destroy_func_t destroy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_unicode_funcs_set_script_func (hb_unicode_funcs_t ufuncs, void* func, void* user_data, void* destroy); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_unicode_funcs_set_script_func (hb_unicode_funcs_t ufuncs, UnicodeScriptProxyDelegate func, void* user_data, DestroyProxyDelegate destroy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4605,8 +6235,13 @@ internal static void hb_unicode_funcs_set_script_func (hb_unicode_funcs_t ufuncs // extern hb_unicode_general_category_t hb_unicode_general_category(hb_unicode_funcs_t* ufuncs, hb_codepoint_t unicode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UnicodeGeneralCategory hb_unicode_general_category (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UnicodeGeneralCategory hb_unicode_general_category (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4619,8 +6254,13 @@ internal static UnicodeGeneralCategory hb_unicode_general_category (hb_unicode_f // extern hb_codepoint_t hb_unicode_mirroring(hb_unicode_funcs_t* ufuncs, hb_codepoint_t unicode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_unicode_mirroring (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_unicode_mirroring (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4633,8 +6273,13 @@ internal static UInt32 hb_unicode_mirroring (hb_unicode_funcs_t ufuncs, UInt32 u // extern hb_script_t hb_unicode_script(hb_unicode_funcs_t* ufuncs, hb_codepoint_t unicode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial UInt32 hb_unicode_script (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 hb_unicode_script (hb_unicode_funcs_t ufuncs, UInt32 unicode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4651,8 +6296,13 @@ internal static UInt32 hb_unicode_script (hb_unicode_funcs_t ufuncs, UInt32 unic // extern void hb_version(unsigned int* major, unsigned int* minor, unsigned int* micro) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial void hb_version (UInt32* major, UInt32* minor, UInt32* micro); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern void hb_version (UInt32* major, UInt32* minor, UInt32* micro); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4665,9 +6315,15 @@ internal static void hb_version (UInt32* major, UInt32* minor, UInt32* micro) => // extern hb_bool_t hb_version_atleast(unsigned int major, unsigned int minor, unsigned int micro) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool hb_version_atleast (UInt32 major, UInt32 minor, UInt32 micro); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool hb_version_atleast (UInt32 major, UInt32 minor, UInt32 micro); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4681,8 +6337,13 @@ internal static bool hb_version_atleast (UInt32 major, UInt32 minor, UInt32 micr // extern const char* hb_version_string() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (HARFBUZZ)] + internal static partial /* char */ void* hb_version_string (); + #else // !USE_LIBRARY_IMPORT [DllImport (HARFBUZZ, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* hb_version_string (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4701,6 +6362,7 @@ private partial class Delegates { #endregion Functions #region Delegates +#if !USE_LIBRARY_IMPORT namespace HarfBuzzSharp { // typedef hb_bool_t (*)(hb_buffer_t* buffer, hb_font_t* font, const char* message, void* user_data)* hb_buffer_message_func_t @@ -4814,6 +6476,7 @@ namespace HarfBuzzSharp { } +#endif // !USE_LIBRARY_IMPORT #endregion #region Structs @@ -4836,7 +6499,9 @@ public unsafe partial struct Feature : IEquatable { private UInt32 end; public readonly bool Equals (Feature obj) => +#pragma warning disable CS8909 tag == obj.tag && value == obj.value && start == obj.start && end == obj.end; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is Feature f && Equals (f); @@ -4911,7 +6576,9 @@ public Int32 LineGap { private Int32 reserved1; public readonly bool Equals (FontExtents obj) => +#pragma warning disable CS8909 ascender == obj.ascender && descender == obj.descender && line_gap == obj.line_gap && reserved9 == obj.reserved9 && reserved8 == obj.reserved8 && reserved7 == obj.reserved7 && reserved6 == obj.reserved6 && reserved5 == obj.reserved5 && reserved4 == obj.reserved4 && reserved3 == obj.reserved3 && reserved2 == obj.reserved2 && reserved1 == obj.reserved1; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is FontExtents f && Equals (f); @@ -4974,7 +6641,9 @@ public Int32 Height { } public readonly bool Equals (GlyphExtents obj) => +#pragma warning disable CS8909 x_bearing == obj.x_bearing && y_bearing == obj.y_bearing && width == obj.width && height == obj.height; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GlyphExtents f && Equals (f); @@ -5028,7 +6697,9 @@ public UInt32 Cluster { private Int32 var2; public readonly bool Equals (GlyphInfo obj) => +#pragma warning disable CS8909 codepoint == obj.codepoint && mask == obj.mask && cluster == obj.cluster && var1 == obj.var1 && var2 == obj.var2; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GlyphInfo f && Equals (f); @@ -5087,7 +6758,9 @@ public Int32 YOffset { private Int32 var; public readonly bool Equals (GlyphPosition obj) => +#pragma warning disable CS8909 x_advance == obj.x_advance && y_advance == obj.y_advance && x_offset == obj.x_offset && y_offset == obj.y_offset && var == obj.var; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GlyphPosition f && Equals (f); @@ -5129,7 +6802,9 @@ public UInt32 ColorIndex { } public readonly bool Equals (OpenTypeColorLayer obj) => +#pragma warning disable CS8909 glyph == obj.glyph && color_index == obj.color_index; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeColorLayer f && Equals (f); @@ -5189,7 +6864,9 @@ public OpenTypeMathGlyphPartFlags Flags { } public readonly bool Equals (OpenTypeMathGlyphPart obj) => +#pragma warning disable CS8909 glyph == obj.glyph && start_connector_length == obj.start_connector_length && end_connector_length == obj.end_connector_length && full_advance == obj.full_advance && flags == obj.flags; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeMathGlyphPart f && Equals (f); @@ -5231,7 +6908,9 @@ public Int32 Advance { } public readonly bool Equals (OpenTypeMathGlyphVariant obj) => +#pragma warning disable CS8909 glyph == obj.glyph && advance == obj.advance; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeMathGlyphVariant f && Equals (f); @@ -5277,7 +6956,9 @@ public IntPtr Language { } public readonly bool Equals (OpenTypeNameEntry obj) => +#pragma warning disable CS8909 name_id == obj.name_id && var == obj.var && language == obj.language; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeNameEntry f && Equals (f); @@ -5355,7 +7036,9 @@ public Single MaxValue { private UInt32 reserved; public readonly bool Equals (OpenTypeVarAxisInfo obj) => +#pragma warning disable CS8909 axis_index == obj.axis_index && tag == obj.tag && name_id == obj.name_id && flags == obj.flags && min_value == obj.min_value && default_value == obj.default_value && max_value == obj.max_value && reserved == obj.reserved; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeVarAxisInfo f && Equals (f); @@ -5421,7 +7104,9 @@ public Single MaxValue { } public readonly bool Equals (OpenTypeVarAxis obj) => +#pragma warning disable CS8909 tag == obj.tag && name_id == obj.name_id && min_value == obj.min_value && default_value == obj.default_value && max_value == obj.max_value; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is OpenTypeVarAxis f && Equals (f); @@ -5463,7 +7148,9 @@ public Single Value { } public readonly bool Equals (Variation obj) => +#pragma warning disable CS8909 tag == obj.tag && value == obj.value; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is Variation f && Equals (f); @@ -6050,3 +7737,233 @@ public enum UnicodeGeneralCategory { } #endregion + +#region DelegateProxies + +namespace HarfBuzzSharp { +internal static unsafe partial class DelegateProxies { + /// Proxy for hb_destroy_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] DestroyProxy = &DestroyProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly DestroyProxyDelegate DestroyProxy = DestroyProxyImplementation; + [MonoPInvokeCallback (typeof (DestroyProxyDelegate))] +#endif + private static partial void DestroyProxyImplementation(void* user_data); + + /// Proxy for hb_destroy_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] DestroyProxyForMulti = &DestroyProxyImplementationForMulti; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly DestroyProxyDelegate DestroyProxyForMulti = DestroyProxyImplementationForMulti; + [MonoPInvokeCallback (typeof (DestroyProxyDelegate))] +#endif + private static partial void DestroyProxyImplementationForMulti(void* user_data); + + /// Proxy for hb_font_get_font_extents_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetFontExtentsProxy = &FontGetFontExtentsProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetFontExtentsProxyDelegate FontGetFontExtentsProxy = FontGetFontExtentsProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetFontExtentsProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetFontExtentsProxyImplementation(hb_font_t font,void* font_data,FontExtents* extents,void* user_data); + + /// Proxy for hb_font_get_glyph_advance_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphAdvanceProxy = &FontGetGlyphAdvanceProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphAdvanceProxyDelegate FontGetGlyphAdvanceProxy = FontGetGlyphAdvanceProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphAdvanceProxyDelegate))] +#endif + private static partial Int32 FontGetGlyphAdvanceProxyImplementation(hb_font_t font,void* font_data,UInt32 glyph,void* user_data); + + /// Proxy for hb_font_get_glyph_advances_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphAdvancesProxy = &FontGetGlyphAdvancesProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphAdvancesProxyDelegate FontGetGlyphAdvancesProxy = FontGetGlyphAdvancesProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphAdvancesProxyDelegate))] +#endif + private static partial void FontGetGlyphAdvancesProxyImplementation(hb_font_t font,void* font_data,UInt32 count,UInt32* first_glyph,UInt32 glyph_stride,Int32* first_advance,UInt32 advance_stride,void* user_data); + + /// Proxy for hb_font_get_glyph_contour_point_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphContourPointProxy = &FontGetGlyphContourPointProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphContourPointProxyDelegate FontGetGlyphContourPointProxy = FontGetGlyphContourPointProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphContourPointProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetGlyphContourPointProxyImplementation(hb_font_t font,void* font_data,UInt32 glyph,UInt32 point_index,Int32* x,Int32* y,void* user_data); + + /// Proxy for hb_font_get_glyph_extents_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphExtentsProxy = &FontGetGlyphExtentsProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphExtentsProxyDelegate FontGetGlyphExtentsProxy = FontGetGlyphExtentsProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphExtentsProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetGlyphExtentsProxyImplementation(hb_font_t font,void* font_data,UInt32 glyph,GlyphExtents* extents,void* user_data); + + /// Proxy for hb_font_get_glyph_from_name_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphFromNameProxy = &FontGetGlyphFromNameProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphFromNameProxyDelegate FontGetGlyphFromNameProxy = FontGetGlyphFromNameProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphFromNameProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetGlyphFromNameProxyImplementation(hb_font_t font,void* font_data,/* char */ void* name,Int32 len,UInt32* glyph,void* user_data); + + /// Proxy for hb_font_get_glyph_kerning_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphKerningProxy = &FontGetGlyphKerningProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphKerningProxyDelegate FontGetGlyphKerningProxy = FontGetGlyphKerningProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphKerningProxyDelegate))] +#endif + private static partial Int32 FontGetGlyphKerningProxyImplementation(hb_font_t font,void* font_data,UInt32 first_glyph,UInt32 second_glyph,void* user_data); + + /// Proxy for hb_font_get_glyph_name_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphNameProxy = &FontGetGlyphNameProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphNameProxyDelegate FontGetGlyphNameProxy = FontGetGlyphNameProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphNameProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetGlyphNameProxyImplementation(hb_font_t font,void* font_data,UInt32 glyph,/* char */ void* name,UInt32 size,void* user_data); + + /// Proxy for hb_font_get_glyph_origin_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetGlyphOriginProxy = &FontGetGlyphOriginProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetGlyphOriginProxyDelegate FontGetGlyphOriginProxy = FontGetGlyphOriginProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetGlyphOriginProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetGlyphOriginProxyImplementation(hb_font_t font,void* font_data,UInt32 glyph,Int32* x,Int32* y,void* user_data); + + /// Proxy for hb_font_get_nominal_glyph_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetNominalGlyphProxy = &FontGetNominalGlyphProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetNominalGlyphProxyDelegate FontGetNominalGlyphProxy = FontGetNominalGlyphProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetNominalGlyphProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetNominalGlyphProxyImplementation(hb_font_t font,void* font_data,UInt32 unicode,UInt32* glyph,void* user_data); + + /// Proxy for hb_font_get_nominal_glyphs_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetNominalGlyphsProxy = &FontGetNominalGlyphsProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetNominalGlyphsProxyDelegate FontGetNominalGlyphsProxy = FontGetNominalGlyphsProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetNominalGlyphsProxyDelegate))] +#endif + private static partial UInt32 FontGetNominalGlyphsProxyImplementation(hb_font_t font,void* font_data,UInt32 count,UInt32* first_unicode,UInt32 unicode_stride,UInt32* first_glyph,UInt32 glyph_stride,void* user_data); + + /// Proxy for hb_font_get_variation_glyph_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] FontGetVariationGlyphProxy = &FontGetVariationGlyphProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly FontGetVariationGlyphProxyDelegate FontGetVariationGlyphProxy = FontGetVariationGlyphProxyImplementation; + [MonoPInvokeCallback (typeof (FontGetVariationGlyphProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool FontGetVariationGlyphProxyImplementation(hb_font_t font,void* font_data,UInt32 unicode,UInt32 variation_selector,UInt32* glyph,void* user_data); + +// TODO: typedef const hb_language_impl_t* hb_language_t + /// Proxy for hb_reference_table_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] ReferenceTableProxy = &ReferenceTableProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly ReferenceTableProxyDelegate ReferenceTableProxy = ReferenceTableProxyImplementation; + [MonoPInvokeCallback (typeof (ReferenceTableProxyDelegate))] +#endif + private static partial hb_blob_t ReferenceTableProxyImplementation(hb_face_t face,UInt32 tag,void* user_data); + + /// Proxy for hb_unicode_combining_class_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeCombiningClassProxy = &UnicodeCombiningClassProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeCombiningClassProxyDelegate UnicodeCombiningClassProxy = UnicodeCombiningClassProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeCombiningClassProxyDelegate))] +#endif + private static partial int UnicodeCombiningClassProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 unicode,void* user_data); + + /// Proxy for hb_unicode_compose_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeComposeProxy = &UnicodeComposeProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeComposeProxyDelegate UnicodeComposeProxy = UnicodeComposeProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeComposeProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool UnicodeComposeProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 a,UInt32 b,UInt32* ab,void* user_data); + + /// Proxy for hb_unicode_decompose_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeDecomposeProxy = &UnicodeDecomposeProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeDecomposeProxyDelegate UnicodeDecomposeProxy = UnicodeDecomposeProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeDecomposeProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool UnicodeDecomposeProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 ab,UInt32* a,UInt32* b,void* user_data); + + /// Proxy for hb_unicode_general_category_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeGeneralCategoryProxy = &UnicodeGeneralCategoryProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeGeneralCategoryProxyDelegate UnicodeGeneralCategoryProxy = UnicodeGeneralCategoryProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeGeneralCategoryProxyDelegate))] +#endif + private static partial int UnicodeGeneralCategoryProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 unicode,void* user_data); + + /// Proxy for hb_unicode_mirroring_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeMirroringProxy = &UnicodeMirroringProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeMirroringProxyDelegate UnicodeMirroringProxy = UnicodeMirroringProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeMirroringProxyDelegate))] +#endif + private static partial UInt32 UnicodeMirroringProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 unicode,void* user_data); + + /// Proxy for hb_unicode_script_func_t native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] UnicodeScriptProxy = &UnicodeScriptProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly UnicodeScriptProxyDelegate UnicodeScriptProxy = UnicodeScriptProxyImplementation; + [MonoPInvokeCallback (typeof (UnicodeScriptProxyDelegate))] +#endif + private static partial UInt32 UnicodeScriptProxyImplementation(hb_unicode_funcs_t ufuncs,UInt32 unicode,void* user_data); + +} +} + +#endregion diff --git a/binding/HarfBuzzSharp/HarfBuzzSharp.csproj b/binding/HarfBuzzSharp/HarfBuzzSharp.csproj index 41b140eafb..df03f6573d 100644 --- a/binding/HarfBuzzSharp/HarfBuzzSharp.csproj +++ b/binding/HarfBuzzSharp/HarfBuzzSharp.csproj @@ -6,10 +6,15 @@ HarfBuzzSharp $(DefineConstants);HARFBUZZ enable + $(WarningsAsErrors);CA1420;CA1421; + $(NoWarn);CS8826 $(DefineConstants);USE_DELEGATES + + $(DefineConstants);USE_LIBRARY_IMPORT + diff --git a/binding/HarfBuzzSharp/NativeObject.cs b/binding/HarfBuzzSharp/NativeObject.cs index da34bc3b43..8ffb1b44a9 100644 --- a/binding/HarfBuzzSharp/NativeObject.cs +++ b/binding/HarfBuzzSharp/NativeObject.cs @@ -62,17 +62,6 @@ public void Dispose () GC.SuppressFinalize (this); } - internal static IntPtr StructureArrayToPtr (IReadOnlyList items) - { - var size = Marshal.SizeOf (); - var memory = Marshal.AllocCoTaskMem (size * items.Count); - for (var i = 0; i < items.Count; i++) { - var ptr = new IntPtr (memory.ToInt64 () + (i * size)); - Marshal.StructureToPtr (items[i], ptr, true); - } - return memory; - } - internal static IEnumerable PtrToStringArray (IntPtr intPtr) { if (intPtr != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp/Properties/HarfBuzzSharpAssemblyInfo.cs b/binding/HarfBuzzSharp/Properties/HarfBuzzSharpAssemblyInfo.cs index 2b1d8ad751..f1a18008ec 100644 --- a/binding/HarfBuzzSharp/Properties/HarfBuzzSharpAssemblyInfo.cs +++ b/binding/HarfBuzzSharp/Properties/HarfBuzzSharpAssemblyInfo.cs @@ -27,3 +27,7 @@ [assembly: Foundation.LinkerSafe] #pragma warning restore CS0618 // Type or member is obsolete #endif + +#if NET7_0_OR_GREATER +[assembly: DisableRuntimeMarshalling] +#endif diff --git a/binding/HarfBuzzSharp/UnicodeFunctions.cs b/binding/HarfBuzzSharp/UnicodeFunctions.cs index 99e5a4690c..459f86cfc8 100644 --- a/binding/HarfBuzzSharp/UnicodeFunctions.cs +++ b/binding/HarfBuzzSharp/UnicodeFunctions.cs @@ -97,7 +97,7 @@ public void SetCombiningClassDelegate (CombiningClassDelegate del, ReleaseDelega var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_combining_class_func ( - Handle, DelegateProxies.CombiningClassProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeCombiningClassProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetGeneralCategoryDelegate (GeneralCategoryDelegate del, ReleaseDelegate destroy = null) @@ -106,7 +106,7 @@ public void SetGeneralCategoryDelegate (GeneralCategoryDelegate del, ReleaseDele var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_general_category_func ( - Handle, DelegateProxies.GeneralCategoryProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeGeneralCategoryProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetMirroringDelegate (MirroringDelegate del, ReleaseDelegate destroy = null) @@ -115,7 +115,7 @@ public void SetMirroringDelegate (MirroringDelegate del, ReleaseDelegate destroy var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_mirroring_func ( - Handle, DelegateProxies.MirroringProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeMirroringProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetScriptDelegate (ScriptDelegate del, ReleaseDelegate destroy = null) @@ -124,7 +124,7 @@ public void SetScriptDelegate (ScriptDelegate del, ReleaseDelegate destroy = nul var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_script_func ( - Handle, DelegateProxies.ScriptProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeScriptProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetComposeDelegate (ComposeDelegate del, ReleaseDelegate destroy = null) @@ -133,7 +133,7 @@ public void SetComposeDelegate (ComposeDelegate del, ReleaseDelegate destroy = n var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_compose_func ( - Handle, DelegateProxies.ComposeProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeComposeProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } public void SetDecomposeDelegate (DecomposeDelegate del, ReleaseDelegate destroy = null) @@ -142,7 +142,7 @@ public void SetDecomposeDelegate (DecomposeDelegate del, ReleaseDelegate destroy var ctx = DelegateProxies.CreateMultiUserData (del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_decompose_func ( - Handle, DelegateProxies.DecomposeProxy, (void*)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); + Handle, DelegateProxies.UnicodeDecomposeProxy, (void*)ctx, DelegateProxies.DestroyProxyForMulti); } private void VerifyParameters (Delegate del) diff --git a/binding/SkiaSharp.Resources/Properties/SkiaSharpResourcesAssemblyInfo.cs b/binding/SkiaSharp.Resources/Properties/SkiaSharpResourcesAssemblyInfo.cs index 32dd31681e..8de2ca031f 100644 --- a/binding/SkiaSharp.Resources/Properties/SkiaSharpResourcesAssemblyInfo.cs +++ b/binding/SkiaSharp.Resources/Properties/SkiaSharpResourcesAssemblyInfo.cs @@ -34,3 +34,7 @@ [assembly: Foundation.LinkerSafe] #pragma warning restore CS0618 // Type or member is obsolete #endif + +#if NET7_0_OR_GREATER +[assembly: DisableRuntimeMarshalling] +#endif diff --git a/binding/SkiaSharp.Resources/ResourcesApi.generated.cs b/binding/SkiaSharp.Resources/ResourcesApi.generated.cs index 71eb442fcc..7a98213520 100644 --- a/binding/SkiaSharp.Resources/ResourcesApi.generated.cs +++ b/binding/SkiaSharp.Resources/ResourcesApi.generated.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; #region Namespaces @@ -17,6 +18,7 @@ using gr_vk_extensions_t = System.IntPtr; using gr_vk_memory_allocator_t = System.IntPtr; using gr_vkinterface_t = System.IntPtr; +using sk_bbh_factory_t = System.IntPtr; using sk_bitmap_t = System.IntPtr; using sk_blender_t = System.IntPtr; using sk_canvas_t = System.IntPtr; @@ -59,6 +61,7 @@ using sk_region_spanerator_t = System.IntPtr; using sk_region_t = System.IntPtr; using sk_rrect_t = System.IntPtr; +using sk_rtree_factory_t = System.IntPtr; using sk_runtimeeffect_t = System.IntPtr; using sk_shader_t = System.IntPtr; using sk_stream_asset_t = System.IntPtr; @@ -110,8 +113,13 @@ internal unsafe partial class ResourcesApi // skresources_resource_provider_t* skresources_caching_resource_provider_proxy_make(skresources_resource_provider_t* rp) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skresources_resource_provider_t skresources_caching_resource_provider_proxy_make (skresources_resource_provider_t rp); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skresources_resource_provider_t skresources_caching_resource_provider_proxy_make (skresources_resource_provider_t rp); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -124,8 +132,13 @@ internal static skresources_resource_provider_t skresources_caching_resource_pro // skresources_resource_provider_t* skresources_data_uri_resource_provider_proxy_make(skresources_resource_provider_t* rp, bool predecode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skresources_resource_provider_t skresources_data_uri_resource_provider_proxy_make (skresources_resource_provider_t rp, [MarshalAs (UnmanagedType.I1)] bool predecode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skresources_resource_provider_t skresources_data_uri_resource_provider_proxy_make (skresources_resource_provider_t rp, [MarshalAs (UnmanagedType.I1)] bool predecode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -138,8 +151,13 @@ internal static skresources_resource_provider_t skresources_data_uri_resource_pr // skresources_resource_provider_t* skresources_file_resource_provider_make(sk_string_t* base_dir, bool predecode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skresources_resource_provider_t skresources_file_resource_provider_make (sk_string_t base_dir, [MarshalAs (UnmanagedType.I1)] bool predecode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skresources_resource_provider_t skresources_file_resource_provider_make (sk_string_t base_dir, [MarshalAs (UnmanagedType.I1)] bool predecode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -152,8 +170,13 @@ internal static skresources_resource_provider_t skresources_file_resource_provid // void skresources_resource_provider_delete(skresources_resource_provider_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skresources_resource_provider_delete (skresources_resource_provider_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skresources_resource_provider_delete (skresources_resource_provider_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -166,8 +189,13 @@ internal static void skresources_resource_provider_delete (skresources_resource_ // sk_data_t* skresources_resource_provider_load(skresources_resource_provider_t* instance, const char* path, const char* name) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t skresources_resource_provider_load (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t skresources_resource_provider_load (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -180,8 +208,13 @@ internal static sk_data_t skresources_resource_provider_load (skresources_resour // skresources_external_track_asset_t* skresources_resource_provider_load_audio_asset(skresources_resource_provider_t* instance, const char* path, const char* name, const char* id) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skresources_external_track_asset_t skresources_resource_provider_load_audio_asset (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String id); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skresources_external_track_asset_t skresources_resource_provider_load_audio_asset (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String id); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -194,8 +227,13 @@ internal static skresources_external_track_asset_t skresources_resource_provider // skresources_image_asset_t* skresources_resource_provider_load_image_asset(skresources_resource_provider_t* instance, const char* path, const char* name, const char* id) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skresources_image_asset_t skresources_resource_provider_load_image_asset (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String id); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skresources_image_asset_t skresources_resource_provider_load_image_asset (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String path, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String id); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -208,8 +246,13 @@ internal static skresources_image_asset_t skresources_resource_provider_load_ima // sk_typeface_t* skresources_resource_provider_load_typeface(skresources_resource_provider_t* instance, const char* name, const char* url) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t skresources_resource_provider_load_typeface (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String url); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t skresources_resource_provider_load_typeface (skresources_resource_provider_t instance, [MarshalAs (UnmanagedType.LPStr)] String name, [MarshalAs (UnmanagedType.LPStr)] String url); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -222,8 +265,13 @@ internal static sk_typeface_t skresources_resource_provider_load_typeface (skres // void skresources_resource_provider_ref(skresources_resource_provider_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skresources_resource_provider_ref (skresources_resource_provider_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skresources_resource_provider_ref (skresources_resource_provider_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -236,8 +284,13 @@ internal static void skresources_resource_provider_ref (skresources_resource_pro // void skresources_resource_provider_unref(skresources_resource_provider_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skresources_resource_provider_unref (skresources_resource_provider_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skresources_resource_provider_unref (skresources_resource_provider_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -256,7 +309,9 @@ internal static void skresources_resource_provider_unref (skresources_resource_p #endregion Functions #region Delegates +#if !USE_LIBRARY_IMPORT +#endif // !USE_LIBRARY_IMPORT #endregion #region Structs @@ -266,3 +321,7 @@ internal static void skresources_resource_provider_unref (skresources_resource_p #region Enums #endregion + +#region DelegateProxies + +#endregion diff --git a/binding/SkiaSharp.Resources/SkiaSharp.Resources.csproj b/binding/SkiaSharp.Resources/SkiaSharp.Resources.csproj index 87ee248726..8ab6cda355 100644 --- a/binding/SkiaSharp.Resources/SkiaSharp.Resources.csproj +++ b/binding/SkiaSharp.Resources/SkiaSharp.Resources.csproj @@ -8,10 +8,14 @@ SkiaSharp Skottie provides a Lottie implementation using the SkiaSharp library. skottie;lottie enable + $(WarningsAsErrors);CA1420;CA1421; $(DefineConstants);USE_DELEGATES + + $(DefineConstants);USE_LIBRARY_IMPORT + diff --git a/binding/SkiaSharp.SceneGraph/Properties/SkiaSharpSceneGraphAssemblyInfo.cs b/binding/SkiaSharp.SceneGraph/Properties/SkiaSharpSceneGraphAssemblyInfo.cs index 1a86efa969..dabd5dade1 100644 --- a/binding/SkiaSharp.SceneGraph/Properties/SkiaSharpSceneGraphAssemblyInfo.cs +++ b/binding/SkiaSharp.SceneGraph/Properties/SkiaSharpSceneGraphAssemblyInfo.cs @@ -33,3 +33,7 @@ [assembly: Foundation.LinkerSafe] #pragma warning restore CS0618 // Type or member is obsolete #endif + +#if NET7_0_OR_GREATER +[assembly: DisableRuntimeMarshalling] +#endif diff --git a/binding/SkiaSharp.SceneGraph/SceneGraphApi.generated.cs b/binding/SkiaSharp.SceneGraph/SceneGraphApi.generated.cs index 36d57c6fbc..6ddb553ba7 100644 --- a/binding/SkiaSharp.SceneGraph/SceneGraphApi.generated.cs +++ b/binding/SkiaSharp.SceneGraph/SceneGraphApi.generated.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; #region Namespaces @@ -17,6 +18,7 @@ using gr_vk_extensions_t = System.IntPtr; using gr_vk_memory_allocator_t = System.IntPtr; using gr_vkinterface_t = System.IntPtr; +using sk_bbh_factory_t = System.IntPtr; using sk_bitmap_t = System.IntPtr; using sk_blender_t = System.IntPtr; using sk_canvas_t = System.IntPtr; @@ -59,6 +61,7 @@ using sk_region_spanerator_t = System.IntPtr; using sk_region_t = System.IntPtr; using sk_rrect_t = System.IntPtr; +using sk_rtree_factory_t = System.IntPtr; using sk_runtimeeffect_t = System.IntPtr; using sk_shader_t = System.IntPtr; using sk_stream_asset_t = System.IntPtr; @@ -110,8 +113,13 @@ internal unsafe partial class SceneGraphApi // void sksg_invalidation_controller_begin(sksg_invalidation_controller_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_begin (sksg_invalidation_controller_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_begin (sksg_invalidation_controller_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -124,8 +132,13 @@ internal static void sksg_invalidation_controller_begin (sksg_invalidation_contr // void sksg_invalidation_controller_delete(sksg_invalidation_controller_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_delete (sksg_invalidation_controller_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_delete (sksg_invalidation_controller_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -138,8 +151,13 @@ internal static void sksg_invalidation_controller_delete (sksg_invalidation_cont // void sksg_invalidation_controller_end(sksg_invalidation_controller_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_end (sksg_invalidation_controller_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_end (sksg_invalidation_controller_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -152,8 +170,13 @@ internal static void sksg_invalidation_controller_end (sksg_invalidation_control // void sksg_invalidation_controller_get_bounds(sksg_invalidation_controller_t* instance, sk_rect_t* bounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_get_bounds (sksg_invalidation_controller_t instance, SKRect* bounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_get_bounds (sksg_invalidation_controller_t instance, SKRect* bounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -166,8 +189,13 @@ internal static void sksg_invalidation_controller_get_bounds (sksg_invalidation_ // void sksg_invalidation_controller_inval(sksg_invalidation_controller_t* instance, sk_rect_t* rect, sk_matrix_t* matrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_inval (sksg_invalidation_controller_t instance, SKRect* rect, SKMatrix* matrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_inval (sksg_invalidation_controller_t instance, SKRect* rect, SKMatrix* matrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -180,8 +208,13 @@ internal static void sksg_invalidation_controller_inval (sksg_invalidation_contr // sksg_invalidation_controller_t* sksg_invalidation_controller_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sksg_invalidation_controller_t sksg_invalidation_controller_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sksg_invalidation_controller_t sksg_invalidation_controller_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -194,8 +227,13 @@ internal static sksg_invalidation_controller_t sksg_invalidation_controller_new // void sksg_invalidation_controller_reset(sksg_invalidation_controller_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sksg_invalidation_controller_reset (sksg_invalidation_controller_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sksg_invalidation_controller_reset (sksg_invalidation_controller_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -214,7 +252,9 @@ internal static void sksg_invalidation_controller_reset (sksg_invalidation_contr #endregion Functions #region Delegates +#if !USE_LIBRARY_IMPORT +#endif // !USE_LIBRARY_IMPORT #endregion #region Structs @@ -224,3 +264,7 @@ internal static void sksg_invalidation_controller_reset (sksg_invalidation_contr #region Enums #endregion + +#region DelegateProxies + +#endregion diff --git a/binding/SkiaSharp.SceneGraph/SkiaSharp.SceneGraph.csproj b/binding/SkiaSharp.SceneGraph/SkiaSharp.SceneGraph.csproj index f0c9156eae..04dfe09eb7 100644 --- a/binding/SkiaSharp.SceneGraph/SkiaSharp.SceneGraph.csproj +++ b/binding/SkiaSharp.SceneGraph/SkiaSharp.SceneGraph.csproj @@ -8,10 +8,14 @@ SkiaSharp Skottie provides a Lottie implementation using the SkiaSharp library. skottie;lottie enable + $(WarningsAsErrors);CA1420;CA1421; $(DefineConstants);USE_DELEGATES + + $(DefineConstants);USE_LIBRARY_IMPORT + diff --git a/binding/SkiaSharp.Skottie/Properties/SkiaSharpSkottieAssemblyInfo.cs b/binding/SkiaSharp.Skottie/Properties/SkiaSharpSkottieAssemblyInfo.cs index 3e67a1bc14..160ffc8871 100644 --- a/binding/SkiaSharp.Skottie/Properties/SkiaSharpSkottieAssemblyInfo.cs +++ b/binding/SkiaSharp.Skottie/Properties/SkiaSharpSkottieAssemblyInfo.cs @@ -34,3 +34,7 @@ [assembly: Foundation.LinkerSafe] #pragma warning restore CS0618 // Type or member is obsolete #endif + +#if NET7_0_OR_GREATER +[assembly: DisableRuntimeMarshalling] +#endif diff --git a/binding/SkiaSharp.Skottie/SkiaSharp.Skottie.csproj b/binding/SkiaSharp.Skottie/SkiaSharp.Skottie.csproj index 4fd4ef3112..3077d108a5 100644 --- a/binding/SkiaSharp.Skottie/SkiaSharp.Skottie.csproj +++ b/binding/SkiaSharp.Skottie/SkiaSharp.Skottie.csproj @@ -8,10 +8,14 @@ SkiaSharp Skottie provides a Lottie implementation using the SkiaSharp library. skottie;lottie enable + $(WarningsAsErrors);CA1420;CA1421; $(DefineConstants);USE_DELEGATES + + $(DefineConstants);USE_LIBRARY_IMPORT + diff --git a/binding/SkiaSharp.Skottie/SkottieApi.generated.cs b/binding/SkiaSharp.Skottie/SkottieApi.generated.cs index 38f281ace3..548ed1a044 100644 --- a/binding/SkiaSharp.Skottie/SkottieApi.generated.cs +++ b/binding/SkiaSharp.Skottie/SkottieApi.generated.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; #region Namespaces @@ -17,6 +18,7 @@ using gr_vk_extensions_t = System.IntPtr; using gr_vk_memory_allocator_t = System.IntPtr; using gr_vkinterface_t = System.IntPtr; +using sk_bbh_factory_t = System.IntPtr; using sk_bitmap_t = System.IntPtr; using sk_blender_t = System.IntPtr; using sk_canvas_t = System.IntPtr; @@ -59,6 +61,7 @@ using sk_region_spanerator_t = System.IntPtr; using sk_region_t = System.IntPtr; using sk_rrect_t = System.IntPtr; +using sk_rtree_factory_t = System.IntPtr; using sk_runtimeeffect_t = System.IntPtr; using sk_shader_t = System.IntPtr; using sk_stream_asset_t = System.IntPtr; @@ -110,8 +113,13 @@ internal unsafe partial class SkottieApi // void skottie_animation_builder_delete(skottie_animation_builder_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_builder_delete (skottie_animation_builder_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_builder_delete (skottie_animation_builder_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -124,8 +132,13 @@ internal static void skottie_animation_builder_delete (skottie_animation_builder // void skottie_animation_builder_get_stats(skottie_animation_builder_t* instance, skottie_animation_builder_stats_t* stats) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_builder_get_stats (skottie_animation_builder_t instance, AnimationBuilderStats* stats); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_builder_get_stats (skottie_animation_builder_t instance, AnimationBuilderStats* stats); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -138,8 +151,13 @@ internal static void skottie_animation_builder_get_stats (skottie_animation_buil // skottie_animation_t* skottie_animation_builder_make_from_data(skottie_animation_builder_t* instance, const char* data, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_builder_make_from_data (skottie_animation_builder_t instance, /* char */ void* data, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_builder_make_from_data (skottie_animation_builder_t instance, /* char */ void* data, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -152,8 +170,13 @@ internal static skottie_animation_t skottie_animation_builder_make_from_data (sk // skottie_animation_t* skottie_animation_builder_make_from_file(skottie_animation_builder_t* instance, const char* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_builder_make_from_file (skottie_animation_builder_t instance, /* char */ void* path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_builder_make_from_file (skottie_animation_builder_t instance, /* char */ void* path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -166,8 +189,13 @@ internal static skottie_animation_t skottie_animation_builder_make_from_file (sk // skottie_animation_t* skottie_animation_builder_make_from_stream(skottie_animation_builder_t* instance, sk_stream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_builder_make_from_stream (skottie_animation_builder_t instance, sk_stream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_builder_make_from_stream (skottie_animation_builder_t instance, sk_stream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -180,8 +208,13 @@ internal static skottie_animation_t skottie_animation_builder_make_from_stream ( // skottie_animation_t* skottie_animation_builder_make_from_string(skottie_animation_builder_t* instance, const char* data, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_builder_make_from_string (skottie_animation_builder_t instance, /* char */ void* data, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_builder_make_from_string (skottie_animation_builder_t instance, /* char */ void* data, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -194,8 +227,13 @@ internal static skottie_animation_t skottie_animation_builder_make_from_string ( // skottie_animation_builder_t* skottie_animation_builder_new(skottie_animation_builder_flags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_builder_t skottie_animation_builder_new (AnimationBuilderFlags flags); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_builder_t skottie_animation_builder_new (AnimationBuilderFlags flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -208,8 +246,13 @@ internal static skottie_animation_builder_t skottie_animation_builder_new (Anima // void skottie_animation_builder_set_font_manager(skottie_animation_builder_t* instance, sk_fontmgr_t* fontManager) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_builder_set_font_manager (skottie_animation_builder_t instance, sk_fontmgr_t fontManager); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_builder_set_font_manager (skottie_animation_builder_t instance, sk_fontmgr_t fontManager); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -222,8 +265,13 @@ internal static void skottie_animation_builder_set_font_manager (skottie_animati // void skottie_animation_builder_set_resource_provider(skottie_animation_builder_t* instance, skottie_resource_provider_t* resourceProvider) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_builder_set_resource_provider (skottie_animation_builder_t instance, skottie_resource_provider_t resourceProvider); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_builder_set_resource_provider (skottie_animation_builder_t instance, skottie_resource_provider_t resourceProvider); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -236,8 +284,13 @@ internal static void skottie_animation_builder_set_resource_provider (skottie_an // void skottie_animation_delete(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_delete (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_delete (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -250,8 +303,13 @@ internal static void skottie_animation_delete (skottie_animation_t instance) => // double skottie_animation_get_duration(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Double skottie_animation_get_duration (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Double skottie_animation_get_duration (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -264,8 +322,13 @@ internal static Double skottie_animation_get_duration (skottie_animation_t insta // double skottie_animation_get_fps(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Double skottie_animation_get_fps (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Double skottie_animation_get_fps (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -278,8 +341,13 @@ internal static Double skottie_animation_get_fps (skottie_animation_t instance) // double skottie_animation_get_in_point(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Double skottie_animation_get_in_point (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Double skottie_animation_get_in_point (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -292,8 +360,13 @@ internal static Double skottie_animation_get_in_point (skottie_animation_t insta // double skottie_animation_get_out_point(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Double skottie_animation_get_out_point (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Double skottie_animation_get_out_point (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -306,8 +379,13 @@ internal static Double skottie_animation_get_out_point (skottie_animation_t inst // void skottie_animation_get_size(skottie_animation_t* instance, sk_size_t* size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_get_size (skottie_animation_t instance, SKSize* size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_get_size (skottie_animation_t instance, SKSize* size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -320,8 +398,13 @@ internal static void skottie_animation_get_size (skottie_animation_t instance, S // void skottie_animation_get_version(skottie_animation_t* instance, sk_string_t* version) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_get_version (skottie_animation_t instance, sk_string_t version); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_get_version (skottie_animation_t instance, sk_string_t version); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -334,8 +417,13 @@ internal static void skottie_animation_get_version (skottie_animation_t instance // skottie_animation_t* skottie_animation_make_from_data(const char* data, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_make_from_data (/* char */ void* data, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_make_from_data (/* char */ void* data, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -348,8 +436,13 @@ internal static skottie_animation_t skottie_animation_make_from_data (/* char */ // skottie_animation_t* skottie_animation_make_from_file(const char* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_make_from_file ([MarshalAs (UnmanagedType.LPStr)] String path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_make_from_file ([MarshalAs (UnmanagedType.LPStr)] String path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -362,8 +455,13 @@ internal static skottie_animation_t skottie_animation_make_from_file ([MarshalAs // skottie_animation_t* skottie_animation_make_from_stream(sk_stream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_make_from_stream (sk_stream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_make_from_stream (sk_stream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -376,8 +474,13 @@ internal static skottie_animation_t skottie_animation_make_from_stream (sk_strea // skottie_animation_t* skottie_animation_make_from_string(const char* data, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial skottie_animation_t skottie_animation_make_from_string ([MarshalAs (UnmanagedType.LPStr)] String data, int length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern skottie_animation_t skottie_animation_make_from_string ([MarshalAs (UnmanagedType.LPStr)] String data, int length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -390,8 +493,13 @@ internal static skottie_animation_t skottie_animation_make_from_string ([Marshal // void skottie_animation_ref(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_ref (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_ref (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -404,8 +512,13 @@ internal static void skottie_animation_ref (skottie_animation_t instance) => // void skottie_animation_render(skottie_animation_t* instance, sk_canvas_t* canvas, sk_rect_t* dst) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_render (skottie_animation_t instance, sk_canvas_t canvas, SKRect* dst); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_render (skottie_animation_t instance, sk_canvas_t canvas, SKRect* dst); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -418,8 +531,13 @@ internal static void skottie_animation_render (skottie_animation_t instance, sk_ // void skottie_animation_render_with_flags(skottie_animation_t* instance, sk_canvas_t* canvas, sk_rect_t* dst, skottie_animation_renderflags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_render_with_flags (skottie_animation_t instance, sk_canvas_t canvas, SKRect* dst, AnimationRenderFlags flags); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_render_with_flags (skottie_animation_t instance, sk_canvas_t canvas, SKRect* dst, AnimationRenderFlags flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -432,8 +550,13 @@ internal static void skottie_animation_render_with_flags (skottie_animation_t in // void skottie_animation_seek(skottie_animation_t* instance, float t, sksg_invalidation_controller_t* ic) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_seek (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_seek (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -446,8 +569,13 @@ internal static void skottie_animation_seek (skottie_animation_t instance, Singl // void skottie_animation_seek_frame(skottie_animation_t* instance, float t, sksg_invalidation_controller_t* ic) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_seek_frame (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_seek_frame (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -460,8 +588,13 @@ internal static void skottie_animation_seek_frame (skottie_animation_t instance, // void skottie_animation_seek_frame_time(skottie_animation_t* instance, float t, sksg_invalidation_controller_t* ic) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_seek_frame_time (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_seek_frame_time (skottie_animation_t instance, Single t, sksg_invalidation_controller_t ic); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -474,8 +607,13 @@ internal static void skottie_animation_seek_frame_time (skottie_animation_t inst // void skottie_animation_unref(skottie_animation_t* instance) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void skottie_animation_unref (skottie_animation_t instance); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void skottie_animation_unref (skottie_animation_t instance); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -494,7 +632,9 @@ internal static void skottie_animation_unref (skottie_animation_t instance) => #endregion Functions #region Delegates +#if !USE_LIBRARY_IMPORT +#endif // !USE_LIBRARY_IMPORT #endregion #region Structs @@ -520,7 +660,9 @@ namespace SkiaSharp.Skottie { private readonly /* size_t */ IntPtr fAnimatorCount; public readonly bool Equals (AnimationBuilderStats obj) => +#pragma warning disable CS8909 fTotalLoadTimeMS == obj.fTotalLoadTimeMS && fJsonParseTimeMS == obj.fJsonParseTimeMS && fSceneParseTimeMS == obj.fSceneParseTimeMS && fJsonSize == obj.fJsonSize && fAnimatorCount == obj.fAnimatorCount; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is AnimationBuilderStats f && Equals (f); @@ -572,3 +714,7 @@ public enum AnimationRenderFlags { } #endregion + +#region DelegateProxies + +#endregion diff --git a/binding/SkiaSharp/DelegateProxies.cs b/binding/SkiaSharp/DelegateProxies.cs index a7103c8d1b..793e0adde3 100644 --- a/binding/SkiaSharp/DelegateProxies.cs +++ b/binding/SkiaSharp/DelegateProxies.cs @@ -1,7 +1,10 @@ #nullable disable +// ReSharper disable InconsistentNaming +// ReSharper disable PartialMethodParameterNameMismatch using System; using System.ComponentModel; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace SkiaSharp @@ -24,23 +27,11 @@ namespace SkiaSharp public delegate void SKGlyphPathDelegate (SKPath path, SKMatrix matrix); - internal unsafe static partial class DelegateProxies + internal static unsafe partial class DelegateProxies { - // references to the proxy implementations - public static readonly SKBitmapReleaseProxyDelegate SKBitmapReleaseDelegateProxy = SKBitmapReleaseDelegateProxyImplementation; - public static readonly SKDataReleaseProxyDelegate SKDataReleaseDelegateProxy = SKDataReleaseDelegateProxyImplementation; - public static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseDelegateProxy = SKImageRasterReleaseDelegateProxyImplementation; - public static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseDelegateProxyForCoTaskMem = SKImageRasterReleaseDelegateProxyImplementationForCoTaskMem; - public static readonly SKImageTextureReleaseProxyDelegate SKImageTextureReleaseDelegateProxy = SKImageTextureReleaseDelegateProxyImplementation; - public static readonly SKSurfaceRasterReleaseProxyDelegate SKSurfaceReleaseDelegateProxy = SKSurfaceReleaseDelegateProxyImplementation; - public static readonly GRGlGetProcProxyDelegate GRGlGetProcDelegateProxy = GRGlGetProcDelegateProxyImplementation; - public static readonly GRVkGetProcProxyDelegate GRVkGetProcDelegateProxy = GRVkGetProcDelegateProxyImplementation; - public static readonly SKGlyphPathProxyDelegate SKGlyphPathDelegateProxy = SKGlyphPathDelegateProxyImplementation; - // internal proxy implementations - [MonoPInvokeCallback (typeof (SKBitmapReleaseProxyDelegate))] - private static void SKBitmapReleaseDelegateProxyImplementation (void* address, void* context) + private static partial void SKBitmapReleaseProxyImplementation (void* address, void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -50,8 +41,7 @@ private static void SKBitmapReleaseDelegateProxyImplementation (void* address, v } } - [MonoPInvokeCallback (typeof (SKDataReleaseProxyDelegate))] - private static void SKDataReleaseDelegateProxyImplementation (void* address, void* context) + private static partial void SKDataReleaseProxyImplementation (void* address, void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -61,14 +51,7 @@ private static void SKDataReleaseDelegateProxyImplementation (void* address, voi } } - [MonoPInvokeCallback (typeof (SKImageRasterReleaseProxyDelegate))] - private static void SKImageRasterReleaseDelegateProxyImplementationForCoTaskMem (void* pixels, void* context) - { - Marshal.FreeCoTaskMem ((IntPtr)pixels); - } - - [MonoPInvokeCallback (typeof (SKImageRasterReleaseProxyDelegate))] - private static void SKImageRasterReleaseDelegateProxyImplementation (void* pixels, void* context) + private static partial void SKImageRasterReleaseProxyImplementation (void* pixels, void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -78,8 +61,7 @@ private static void SKImageRasterReleaseDelegateProxyImplementation (void* pixel } } - [MonoPInvokeCallback (typeof (SKImageTextureReleaseProxyDelegate))] - private static void SKImageTextureReleaseDelegateProxyImplementation (void* context) + private static partial void SKImageTextureReleaseProxyImplementation (void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -89,8 +71,7 @@ private static void SKImageTextureReleaseDelegateProxyImplementation (void* cont } } - [MonoPInvokeCallback (typeof (SKSurfaceRasterReleaseProxyDelegate))] - private static void SKSurfaceReleaseDelegateProxyImplementation (void* address, void* context) + private static partial void SKSurfaceRasterReleaseProxyImplementation (void* address, void* context) { var del = Get ((IntPtr)context, out var gch); try { @@ -100,23 +81,25 @@ private static void SKSurfaceReleaseDelegateProxyImplementation (void* address, } } - [MonoPInvokeCallback (typeof (GRGlGetProcProxyDelegate))] - private static IntPtr GRGlGetProcDelegateProxyImplementation (void* context, void* name) + private static partial void SKImageRasterReleaseProxyImplementationForCoTaskMem (void* pixels, void* context) + { + Marshal.FreeCoTaskMem ((IntPtr)pixels); + } + + private static partial IntPtr GRGlGetProcProxyImplementation (void* context, void* name) { var del = Get ((IntPtr)context, out _); return del.Invoke (Marshal.PtrToStringAnsi ((IntPtr)name)); } - [MonoPInvokeCallback (typeof (GRVkGetProcProxyDelegate))] - private static IntPtr GRVkGetProcDelegateProxyImplementation (void* context, void* name, IntPtr instance, IntPtr device) + private static partial IntPtr GRVkGetProcProxyImplementation (void* context, void* name, IntPtr instance, IntPtr device) { var del = Get ((IntPtr)context, out _); return del.Invoke (Marshal.PtrToStringAnsi ((IntPtr)name), instance, device); } - [MonoPInvokeCallback (typeof (SKGlyphPathProxyDelegate))] - private static void SKGlyphPathDelegateProxyImplementation (IntPtr pathOrNull, SKMatrix* matrix, void* context) + private static partial void SKGlyphPathProxyImplementation (IntPtr pathOrNull, SKMatrix* matrix, void* context) { var del = Get ((IntPtr)context, out _); var path = SKPath.GetObject (pathOrNull, false); diff --git a/binding/SkiaSharp/DelegateProxies.drawable.cs b/binding/SkiaSharp/DelegateProxies.drawable.cs new file mode 100644 index 0000000000..19709cc197 --- /dev/null +++ b/binding/SkiaSharp/DelegateProxies.drawable.cs @@ -0,0 +1,43 @@ +using System; +using System.Threading; +// ReSharper disable InconsistentNaming + +namespace SkiaSharp; + +internal static unsafe partial class DelegateProxies +{ + private static partial /* size_t */ IntPtr SKManagedDrawableApproximateBytesUsedProxyImplementation (IntPtr d, void* context) + { + var drawable = GetUserData ((IntPtr)context, out _); + return (IntPtr)drawable.OnGetApproximateBytesUsed (); + } + + private static partial void SKManagedDrawableDestroyProxyImplementation (IntPtr d, void* context) + { + var drawable = GetUserData ((IntPtr)context, out var gch); + if (drawable != null) { + Interlocked.Exchange (ref drawable.fromNative, 1); + drawable.Dispose (); + } + gch.Free (); + } + + private static partial void SKManagedDrawableDrawProxyImplementation (IntPtr d, void* context, IntPtr ccanvas) + { + var drawable = GetUserData ((IntPtr)context, out _); + drawable.OnDraw (SKCanvas.GetObject (ccanvas, false)); + } + + private static partial void SKManagedDrawableGetBoundsProxyImplementation (IntPtr d, void* context, SKRect* rect) + { + var drawable = GetUserData ((IntPtr)context, out _); + var bounds = drawable.OnGetBounds (); + *rect = bounds; + } + + private static partial IntPtr SKManagedDrawableMakePictureSnapshotProxyImplementation (IntPtr d, void* context) + { + var drawable = GetUserData ((IntPtr)context, out _); + return drawable.OnSnapshot ()?.Handle ?? IntPtr.Zero; + } +} diff --git a/binding/SkiaSharp/DelegateProxies.stream.cs b/binding/SkiaSharp/DelegateProxies.stream.cs new file mode 100644 index 0000000000..7de51dc066 --- /dev/null +++ b/binding/SkiaSharp/DelegateProxies.stream.cs @@ -0,0 +1,94 @@ +using System; +using System.Threading; +// ReSharper disable InconsistentNaming + +namespace SkiaSharp; + +internal static unsafe partial class DelegateProxies +{ + private static partial IntPtr SKManagedStreamDuplicateProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnDuplicate (); + } + + private static partial IntPtr SKManagedStreamForkProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnFork (); + } + + private static partial /* size_t */ IntPtr SKManagedStreamGetLengthProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnGetLength (); + } + + private static partial /* size_t */ IntPtr SKManagedStreamGetPositionProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnGetPosition (); + } + + private static partial bool SKManagedStreamHasLengthProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnHasLength (); + } + + private static partial void SKManagedStreamDestroyProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out var gch); + if (stream != null) { + Interlocked.Exchange (ref stream.fromNative, 1); + stream.Dispose (); + } + gch.Free (); + } + + private static partial bool SKManagedStreamHasPositionProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnHasPosition (); + } + + private static partial bool SKManagedStreamIsAtEndProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnIsAtEnd (); + } + + private static partial bool SKManagedStreamMoveProxyImplementation (IntPtr s, void* context, int offset) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnMove (offset); + } + + private static partial /* size_t */ + IntPtr SKManagedStreamPeekProxyImplementation (IntPtr s, void* context, void* buffer, /* size_t */ IntPtr size) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnPeek ((IntPtr)buffer, size); + } + + private static partial /* size_t */ + IntPtr SKManagedStreamReadProxyImplementation (IntPtr s, void* context, void* buffer, /* size_t */ IntPtr size) + { + + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnRead ((IntPtr)buffer, size); + } + + private static partial bool SKManagedStreamRewindProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnRewind (); + } + + private static partial bool SKManagedStreamSeekProxyImplementation (IntPtr s, void* context, /* size_t */ + IntPtr position) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnSeek (position); + } +} diff --git a/binding/SkiaSharp/DelegateProxies.trace.cs b/binding/SkiaSharp/DelegateProxies.trace.cs new file mode 100644 index 0000000000..4c17e97d21 --- /dev/null +++ b/binding/SkiaSharp/DelegateProxies.trace.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.InteropServices; +// ReSharper disable InconsistentNaming + +namespace SkiaSharp; + +internal static unsafe partial class DelegateProxies +{ + private static partial void SKManagedTraceMemoryDumpDumpNumericValueProxyImplementation (IntPtr d, + void* context, /* char */ void* dumpName, /* char */ void* valueName, /* char */ void* units, ulong value) + { + var dump = GetUserData ((IntPtr)context, out _); + dump.OnDumpNumericValue ( + Marshal.PtrToStringAnsi ((IntPtr)dumpName), + Marshal.PtrToStringAnsi ((IntPtr)valueName), + Marshal.PtrToStringAnsi ((IntPtr)units), + value); + } + + private static partial void SKManagedTraceMemoryDumpDumpStringValueProxyImplementation (IntPtr d, + void* context, /* char */ void* dumpName, /* char */ void* valueName, /* char */ void* value) + { + var dump = GetUserData ((IntPtr)context, out _); + dump.OnDumpStringValue ( + Marshal.PtrToStringAnsi ((IntPtr)dumpName), + Marshal.PtrToStringAnsi ((IntPtr)valueName), + Marshal.PtrToStringAnsi ((IntPtr)value)); + } +} diff --git a/binding/SkiaSharp/DelegateProxies.wstream.cs b/binding/SkiaSharp/DelegateProxies.wstream.cs new file mode 100644 index 0000000000..fcf3a340c5 --- /dev/null +++ b/binding/SkiaSharp/DelegateProxies.wstream.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading; +// ReSharper disable InconsistentNaming + +namespace SkiaSharp; + +internal static unsafe partial class DelegateProxies +{ + private static partial /* size_t */ IntPtr SKManagedWStreamBytesWrittenProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnBytesWritten (); + } + + private static partial void SKManagedWStreamDestroyProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out var gch); + if (stream != null) { + Interlocked.Exchange (ref stream.fromNative, 1); + stream.Dispose (); + } + gch.Free (); + } + + private static partial void SKManagedWStreamFlushProxyImplementation (IntPtr s, void* context) + { + var stream = GetUserData ((IntPtr)context, out _); + stream.OnFlush (); + } + + private static partial bool SKManagedWStreamWriteProxyImplementation (IntPtr s, void* context, + void* buffer, /* size_t */ IntPtr size) + { + var stream = GetUserData ((IntPtr)context, out _); + return stream.OnWrite ((IntPtr)buffer, size); + } +} diff --git a/binding/SkiaSharp/GRGlInterface.cs b/binding/SkiaSharp/GRGlInterface.cs index f49ae6ab0e..7518a69673 100644 --- a/binding/SkiaSharp/GRGlInterface.cs +++ b/binding/SkiaSharp/GRGlInterface.cs @@ -7,11 +7,12 @@ #if __TIZEN__ using System.Reflection; +using System.Runtime.CompilerServices; #endif namespace SkiaSharp { - public unsafe class GRGlInterface : SKObject, ISKReferenceCounted, ISKSkipObjectRegistration + public unsafe partial class GRGlInterface : SKObject, ISKReferenceCounted, ISKSkipObjectRegistration { internal GRGlInterface (IntPtr h, bool owns) : base (h, owns) @@ -50,7 +51,8 @@ public static GRGlInterface CreateAngle () public static GRGlInterface Create (GRGlGetProcedureAddressDelegate get) { - var proxy = DelegateProxies.Create (get, DelegateProxies.GRGlGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (get, out var gch, out var ctx); + var proxy = get != null ? DelegateProxies.GRGlGetProcProxy : null; try { return GetObject (SkiaApi.gr_glinterface_assemble_interface ((void*)ctx, proxy)); } finally { @@ -63,7 +65,8 @@ public static GRGlInterface CreateAngle (GRGlGetProcedureAddressDelegate get) => public static GRGlInterface CreateOpenGl (GRGlGetProcedureAddressDelegate get) { - var proxy = DelegateProxies.Create (get, DelegateProxies.GRGlGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (get, out var gch, out var ctx); + var proxy = get != null ? DelegateProxies.GRGlGetProcProxy : null; try { return GetObject (SkiaApi.gr_glinterface_assemble_gl_interface ((void*)ctx, proxy)); } finally { @@ -73,7 +76,8 @@ public static GRGlInterface CreateOpenGl (GRGlGetProcedureAddressDelegate get) public static GRGlInterface CreateGles (GRGlGetProcedureAddressDelegate get) { - var proxy = DelegateProxies.Create (get, DelegateProxies.GRGlGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (get, out var gch, out var ctx); + var proxy = get != null ? DelegateProxies.GRGlGetProcProxy : null; try { return GetObject (SkiaApi.gr_glinterface_assemble_gles_interface ((void*)ctx, proxy)); } finally { @@ -83,7 +87,8 @@ public static GRGlInterface CreateGles (GRGlGetProcedureAddressDelegate get) public static GRGlInterface CreateWebGl (GRGlGetProcedureAddressDelegate get) { - var proxy = DelegateProxies.Create (get, DelegateProxies.GRGlGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (get, out var gch, out var ctx); + var proxy = get != null ? DelegateProxies.GRGlGetProcProxy : null; try { return GetObject (SkiaApi.gr_glinterface_assemble_webgl_interface ((void*)ctx, proxy)); } finally { @@ -117,7 +122,7 @@ internal static GRGlInterface GetObject (IntPtr handle) => // #if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS) - private static class AngleLoader + private static partial class AngleLoader { private static readonly IntPtr libEGL; private static readonly IntPtr libGLESv2; @@ -132,6 +137,12 @@ private static class AngleLoader private static extern IntPtr GetProcAddress (IntPtr hModule, [MarshalAs (UnmanagedType.LPStr)] string lpProcName); private static IntPtr LoadLibrary (string lpFileName) => LoadPackagedLibrary(lpFileName, 0); +#elif USE_LIBRARY_IMPORT + [LibraryImport ("Kernel32.dll", SetLastError = true, EntryPoint = "LoadLibraryW", StringMarshalling = StringMarshalling.Utf16)] + private static partial IntPtr LoadLibrary (string lpFileName); + + [LibraryImport ("Kernel32.dll", SetLastError = true)] + private static partial IntPtr GetProcAddress (IntPtr hModule, [MarshalAs (UnmanagedType.LPStr)] string lpProcName); #else [DllImport ("Kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi)] private static extern IntPtr LoadLibrary ([MarshalAs (UnmanagedType.LPStr)] string lpFileName); @@ -140,8 +151,13 @@ private static class AngleLoader private static extern IntPtr GetProcAddress (IntPtr hModule, [MarshalAs (UnmanagedType.LPStr)] string lpProcName); #endif +#if USE_LIBRARY_IMPORT + [LibraryImport ("libEGL.dll")] + private static partial IntPtr eglGetProcAddress ([MarshalAs (UnmanagedType.LPStr)] string procname); +#else [DllImport ("libEGL.dll")] private static extern IntPtr eglGetProcAddress ([MarshalAs (UnmanagedType.LPStr)] string procname); +#endif static AngleLoader() { @@ -183,7 +199,7 @@ public static IntPtr GetProc (string name) #endif #if __TIZEN__ - private class EvasGlLoader + private partial class EvasGlLoader { private const string libevas = "libevas.so.1"; @@ -194,17 +210,17 @@ private class EvasGlLoader private readonly IntPtr glEvas; private readonly EvasGlApi api; - [DllImport (libevas)] - internal static extern IntPtr evas_gl_api_get (IntPtr evas_gl); + [LibraryImport (libevas)] + internal static partial IntPtr evas_gl_api_get (IntPtr evas_gl); - [DllImport (libevas)] - internal static extern IntPtr evas_gl_context_api_get (IntPtr evas_gl, IntPtr ctx); + [LibraryImport (libevas)] + internal static partial IntPtr evas_gl_context_api_get (IntPtr evas_gl, IntPtr ctx); - [DllImport (libevas)] - internal static extern IntPtr evas_gl_current_context_get (IntPtr evas_gl); + [LibraryImport (libevas)] + internal static partial IntPtr evas_gl_current_context_get (IntPtr evas_gl); - [DllImport (libevas)] - internal static extern IntPtr evas_gl_proc_address_get (IntPtr evas_gl, string name); + [LibraryImport(libevas)] + internal static partial IntPtr evas_gl_proc_address_get (IntPtr evas_gl, [MarshalAs (UnmanagedType.LPStr)] string name); static EvasGlLoader () { @@ -213,7 +229,7 @@ static EvasGlLoader () apiFields = EvasGlApiType.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); } - public EvasGlLoader (IntPtr evas) + public unsafe EvasGlLoader (IntPtr evas) { glEvas = evas; var glContext = evas_gl_current_context_get (glEvas); @@ -222,7 +238,7 @@ public EvasGlLoader (IntPtr evas) ? evas_gl_context_api_get (glEvas, glContext) : evas_gl_api_get (glEvas); - api = Marshal.PtrToStructure (apiPtr); + api = *(EvasGlApi*)apiPtr; } public IntPtr GetFunctionPointer (string name) diff --git a/binding/SkiaSharp/GRVkBackendContext.cs b/binding/SkiaSharp/GRVkBackendContext.cs index 32fb6134ba..41a502fcbc 100644 --- a/binding/SkiaSharp/GRVkBackendContext.cs +++ b/binding/SkiaSharp/GRVkBackendContext.cs @@ -12,7 +12,6 @@ namespace SkiaSharp public unsafe class GRVkBackendContext : IDisposable { private GRVkGetProcedureAddressDelegate getProc; - private GRVkGetProcProxyDelegate getProcProxy; private GCHandle getProcHandle; private void* getProcContext; @@ -58,12 +57,11 @@ public GRVkGetProcedureAddressDelegate GetProcedureAddress { if (getProcHandle.IsAllocated) getProcHandle.Free (); - getProcProxy = null; getProcHandle = default; getProcContext = null; if (value != null) { - getProcProxy = DelegateProxies.Create (value, DelegateProxies.GRVkGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (value, out var gch, out var ctx); getProcHandle = gch; getProcContext = (void*)ctx; } @@ -84,7 +82,7 @@ internal GRVkBackendContextNative ToNative () => fDeviceFeatures = VkPhysicalDeviceFeatures, fDeviceFeatures2 = VkPhysicalDeviceFeatures2, fGetProcUserData = getProcContext, - fGetProc = getProcProxy, + fGetProc = getProcContext is not null ? DelegateProxies.GRVkGetProcProxy : null, fProtectedContext = ProtectedContext ? (byte)1 : (byte)0 }; } diff --git a/binding/SkiaSharp/GRVkExtensions.cs b/binding/SkiaSharp/GRVkExtensions.cs index d679003f0d..c0d9b375dc 100644 --- a/binding/SkiaSharp/GRVkExtensions.cs +++ b/binding/SkiaSharp/GRVkExtensions.cs @@ -27,10 +27,11 @@ public void Initialize (GRVkGetProcedureAddressDelegate getProc, IntPtr vkInstan public void Initialize (GRVkGetProcedureAddressDelegate getProc, IntPtr vkInstance, IntPtr vkPhysicalDevice, string[] instanceExtensions, string[] deviceExtensions) { - var proxy = DelegateProxies.Create (getProc, DelegateProxies.GRVkGetProcDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (getProc, out var gch, out var ctx); try { var ie = instanceExtensions; var de = deviceExtensions; + var proxy = getProc != null ? DelegateProxies.GRVkGetProcProxy : null; SkiaApi.gr_vk_extensions_init (Handle, proxy, (void*)ctx, vkInstance, vkPhysicalDevice, (uint)(ie?.Length ?? 0), ie, (uint)(de?.Length ?? 0), de); } finally { gch.Free (); diff --git a/binding/SkiaSharp/PlatformLock.cs b/binding/SkiaSharp/PlatformLock.cs index 1587996669..626172bc6f 100644 --- a/binding/SkiaSharp/PlatformLock.cs +++ b/binding/SkiaSharp/PlatformLock.cs @@ -1,6 +1,7 @@ #nullable disable using System; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; @@ -38,7 +39,7 @@ public interface IPlatformLock /// Helper class to create a IPlatformLock instance, by default according to the current platform /// but also client toolkits can plugin their own implementation. /// - public static class PlatformLock + public static partial class PlatformLock { /// /// Creates a platform lock @@ -92,11 +93,11 @@ class ReadWriteLock : IPlatformLock /// /// Windows platform lock uses Win32 CRITICAL_SECTION /// - class NonAlertableWin32Lock : IPlatformLock + partial class NonAlertableWin32Lock : IPlatformLock { public NonAlertableWin32Lock () { - _cs = Marshal.AllocHGlobal (Marshal.SizeOf ()); + _cs = Marshal.AllocHGlobal (Unsafe.SizeOf()); if (_cs == IntPtr.Zero) throw new OutOfMemoryException ("Failed to allocate memory for critical section"); @@ -146,6 +147,17 @@ public struct CRITICAL_SECTION public UIntPtr SpinCount; } +#if USE_LIBRARY_IMPORT + [LibraryImport ("Kernel32.dll", SetLastError = true)] + [return: MarshalAs (UnmanagedType.Bool)] + private static partial bool InitializeCriticalSectionEx (IntPtr lpCriticalSection, uint dwSpinCount, uint Flags); + [LibraryImport ("Kernel32.dll")] + private static partial void DeleteCriticalSection (IntPtr lpCriticalSection); + [LibraryImport ("Kernel32.dll")] + private static partial void EnterCriticalSection (IntPtr lpCriticalSection); + [LibraryImport ("Kernel32.dll")] + private static partial void LeaveCriticalSection (IntPtr lpCriticalSection); +#else [DllImport ("Kernel32.dll", SetLastError = true)] [return: MarshalAs (UnmanagedType.Bool)] static extern bool InitializeCriticalSectionEx (IntPtr lpCriticalSection, uint dwSpinCount, uint Flags); @@ -155,6 +167,7 @@ public struct CRITICAL_SECTION static extern void EnterCriticalSection (IntPtr lpCriticalSection); [DllImport ("Kernel32.dll")] static extern void LeaveCriticalSection (IntPtr lpCriticalSection); +#endif } } diff --git a/binding/SkiaSharp/Properties/SkiaSharpAssemblyInfo.cs b/binding/SkiaSharp/Properties/SkiaSharpAssemblyInfo.cs index 8d994ffb6c..b42bc07bc6 100644 --- a/binding/SkiaSharp/Properties/SkiaSharpAssemblyInfo.cs +++ b/binding/SkiaSharp/Properties/SkiaSharpAssemblyInfo.cs @@ -62,3 +62,7 @@ [assembly: Foundation.LinkerSafe] #pragma warning restore CS0618 // Type or member is obsolete #endif + +#if NET7_0_OR_GREATER +[assembly: DisableRuntimeMarshalling] +#endif diff --git a/binding/SkiaSharp/SKAbstractManagedStream.cs b/binding/SkiaSharp/SKAbstractManagedStream.cs index ed59f461c1..7adb4eaa30 100644 --- a/binding/SkiaSharp/SKAbstractManagedStream.cs +++ b/binding/SkiaSharp/SKAbstractManagedStream.cs @@ -1,7 +1,6 @@ #nullable disable using System; -using System.Runtime.InteropServices; using System.Threading; namespace SkiaSharp @@ -10,24 +9,24 @@ public unsafe abstract class SKAbstractManagedStream : SKStreamAsset { private static readonly SKManagedStreamDelegates delegates; - private int fromNative; + internal int fromNative; static SKAbstractManagedStream () { delegates = new SKManagedStreamDelegates { - fRead = ReadInternal, - fPeek = PeekInternal, - fIsAtEnd = IsAtEndInternal, - fHasPosition = HasPositionInternal, - fHasLength = HasLengthInternal, - fRewind = RewindInternal, - fGetPosition = GetPositionInternal, - fSeek = SeekInternal, - fMove = MoveInternal, - fGetLength = GetLengthInternal, - fDuplicate = DuplicateInternal, - fFork = ForkInternal, - fDestroy = DestroyInternal, + fRead = DelegateProxies.SKManagedStreamReadProxy, + fPeek = DelegateProxies.SKManagedStreamPeekProxy, + fIsAtEnd = DelegateProxies.SKManagedStreamIsAtEndProxy, + fHasPosition = DelegateProxies.SKManagedStreamHasPositionProxy, + fHasLength = DelegateProxies.SKManagedStreamHasLengthProxy, + fRewind = DelegateProxies.SKManagedStreamRewindProxy, + fGetPosition = DelegateProxies.SKManagedStreamGetPositionProxy, + fSeek = DelegateProxies.SKManagedStreamSeekProxy, + fMove = DelegateProxies.SKManagedStreamMoveProxy, + fGetLength = DelegateProxies.SKManagedStreamGetLengthProxy, + fDuplicate = DelegateProxies.SKManagedStreamDuplicateProxy, + fFork = DelegateProxies.SKManagedStreamForkProxy, + fDestroy = DelegateProxies.SKManagedStreamDestroyProxy, }; SkiaApi.sk_managedstream_set_procs (delegates); } @@ -53,130 +52,35 @@ protected override void DisposeNative () SkiaApi.sk_managedstream_destroy (Handle); } - protected abstract IntPtr OnRead (IntPtr buffer, IntPtr size); + protected internal abstract IntPtr OnRead (IntPtr buffer, IntPtr size); - protected abstract IntPtr OnPeek (IntPtr buffer, IntPtr size); + protected internal abstract IntPtr OnPeek (IntPtr buffer, IntPtr size); - protected abstract bool OnIsAtEnd (); + protected internal abstract bool OnIsAtEnd (); - protected abstract bool OnHasPosition (); + protected internal abstract bool OnHasPosition (); - protected abstract bool OnHasLength (); + protected internal abstract bool OnHasLength (); - protected abstract bool OnRewind (); + protected internal abstract bool OnRewind (); - protected abstract IntPtr OnGetPosition (); + protected internal abstract IntPtr OnGetPosition (); - protected abstract IntPtr OnGetLength (); + protected internal abstract IntPtr OnGetLength (); - protected abstract bool OnSeek (IntPtr position); + protected internal abstract bool OnSeek (IntPtr position); - protected abstract bool OnMove (int offset); + protected internal abstract bool OnMove (int offset); - protected abstract IntPtr OnCreateNew (); + protected internal abstract IntPtr OnCreateNew (); - protected virtual IntPtr OnFork () + protected internal virtual IntPtr OnFork () { var stream = OnCreateNew (); SkiaApi.sk_stream_seek (stream, SkiaApi.sk_stream_get_position (Handle)); return stream; } - protected virtual IntPtr OnDuplicate () => OnCreateNew (); - - [MonoPInvokeCallback (typeof (SKManagedStreamReadProxyDelegate))] - private static IntPtr ReadInternal (IntPtr s, void* context, void* buffer, IntPtr size) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnRead ((IntPtr)buffer, size); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamPeekProxyDelegate))] - private static IntPtr PeekInternal (IntPtr s, void* context, void* buffer, IntPtr size) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnPeek ((IntPtr)buffer, size); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamIsAtEndProxyDelegate))] - private static bool IsAtEndInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnIsAtEnd (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamHasPositionProxyDelegate))] - private static bool HasPositionInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnHasPosition (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamHasLengthProxyDelegate))] - private static bool HasLengthInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnHasLength (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamRewindProxyDelegate))] - private static bool RewindInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnRewind (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamGetPositionProxyDelegate))] - private static IntPtr GetPositionInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnGetPosition (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamSeekProxyDelegate))] - private static bool SeekInternal (IntPtr s, void* context, IntPtr position) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnSeek (position); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamMoveProxyDelegate))] - private static bool MoveInternal (IntPtr s, void* context, int offset) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnMove (offset); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamGetLengthProxyDelegate))] - private static IntPtr GetLengthInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnGetLength (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamDuplicateProxyDelegate))] - private static IntPtr DuplicateInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnDuplicate (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamForkProxyDelegate))] - private static IntPtr ForkInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnFork (); - } - - [MonoPInvokeCallback (typeof (SKManagedStreamDestroyProxyDelegate))] - private static void DestroyInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out var gch); - if (stream != null) { - Interlocked.Exchange (ref stream.fromNative, 1); - stream.Dispose (); - } - gch.Free (); - } + protected internal virtual IntPtr OnDuplicate () => OnCreateNew (); } } diff --git a/binding/SkiaSharp/SKAbstractManagedWStream.cs b/binding/SkiaSharp/SKAbstractManagedWStream.cs index 2f4521bf9b..d8a2729c5d 100644 --- a/binding/SkiaSharp/SKAbstractManagedWStream.cs +++ b/binding/SkiaSharp/SKAbstractManagedWStream.cs @@ -1,6 +1,7 @@ #nullable disable using System; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; @@ -10,15 +11,15 @@ public unsafe abstract class SKAbstractManagedWStream : SKWStream { private static readonly SKManagedWStreamDelegates delegates; - private int fromNative; + internal int fromNative; static SKAbstractManagedWStream () { delegates = new SKManagedWStreamDelegates { - fWrite = WriteInternal, - fFlush = FlushInternal, - fBytesWritten = BytesWrittenInternal, - fDestroy = DestroyInternal, + fWrite = DelegateProxies.SKManagedWStreamWriteProxy, + fFlush = DelegateProxies.SKManagedWStreamFlushProxy, + fBytesWritten = DelegateProxies.SKManagedWStreamBytesWrittenProxy, + fDestroy = DelegateProxies.SKManagedWStreamDestroyProxy }; SkiaApi.sk_managedwstream_set_procs (delegates); @@ -45,42 +46,10 @@ protected override void DisposeNative () SkiaApi.sk_managedwstream_destroy (Handle); } - protected abstract bool OnWrite (IntPtr buffer, IntPtr size); + protected internal abstract bool OnWrite (IntPtr buffer, IntPtr size); - protected abstract void OnFlush (); + protected internal abstract void OnFlush (); - protected abstract IntPtr OnBytesWritten (); - - [MonoPInvokeCallback (typeof (SKManagedWStreamWriteProxyDelegate))] - private static bool WriteInternal (IntPtr s, void* context, void* buffer, IntPtr size) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnWrite ((IntPtr)buffer, size); - } - - [MonoPInvokeCallback (typeof (SKManagedWStreamFlushProxyDelegate))] - private static void FlushInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - stream.OnFlush (); - } - - [MonoPInvokeCallback (typeof (SKManagedWStreamBytesWrittenProxyDelegate))] - private static IntPtr BytesWrittenInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out _); - return stream.OnBytesWritten (); - } - - [MonoPInvokeCallback (typeof (SKManagedWStreamDestroyProxyDelegate))] - private static void DestroyInternal (IntPtr s, void* context) - { - var stream = DelegateProxies.GetUserData ((IntPtr)context, out var gch); - if (stream != null) { - Interlocked.Exchange (ref stream.fromNative, 1); - stream.Dispose (); - } - gch.Free (); - } + protected internal abstract IntPtr OnBytesWritten (); } } diff --git a/binding/SkiaSharp/SKAutoCoInitialize.cs b/binding/SkiaSharp/SKAutoCoInitialize.cs index f8be51dc78..bcd278d54b 100644 --- a/binding/SkiaSharp/SKAutoCoInitialize.cs +++ b/binding/SkiaSharp/SKAutoCoInitialize.cs @@ -6,7 +6,7 @@ namespace SkiaSharp { - public class SKAutoCoInitialize : IDisposable + public partial class SKAutoCoInitialize : IDisposable { private long hResult; @@ -41,10 +41,16 @@ public void Uninitialize() private const uint COINIT_DISABLE_OLE1DDE = 0x4; private const uint COINIT_SPEED_OVER_MEMORY = 0x8; +#if USE_LIBRARY_IMPORT + [LibraryImport("ole32.dll", SetLastError = true)] + private static partial long CoInitializeEx(IntPtr pvReserved, uint dwCoInit); + [LibraryImport("ole32.dll", SetLastError = true)] + private static partial void CoUninitialize(); +#else [DllImport("ole32.dll", CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.StdCall)] private static extern long CoInitializeEx([In, Optional] IntPtr pvReserved, [In] uint dwCoInit); - [DllImport("ole32.dll", CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.StdCall)] private static extern void CoUninitialize(); +#endif } } diff --git a/binding/SkiaSharp/SKBitmap.cs b/binding/SkiaSharp/SKBitmap.cs index 504efd2d6d..93219f0b90 100644 --- a/binding/SkiaSharp/SKBitmap.cs +++ b/binding/SkiaSharp/SKBitmap.cs @@ -609,7 +609,8 @@ public bool InstallPixels (SKImageInfo info, IntPtr pixels, int rowBytes, SKBitm var del = releaseProc != null && context != null ? new SKBitmapReleaseDelegate ((addr, _) => releaseProc (addr, context)) : releaseProc; - var proxy = DelegateProxies.Create (del, DelegateProxies.SKBitmapReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (del, out _, out var ctx); + var proxy = del is not null ? DelegateProxies.SKBitmapReleaseProxy : null; return SkiaApi.sk_bitmap_install_pixels (Handle, &cinfo, (void*)pixels, (IntPtr)rowBytes, proxy, (void*)ctx); } diff --git a/binding/SkiaSharp/SKData.cs b/binding/SkiaSharp/SKData.cs index af8f1f857f..6be1ee9846 100644 --- a/binding/SkiaSharp/SKData.cs +++ b/binding/SkiaSharp/SKData.cs @@ -186,7 +186,7 @@ public static SKData Create (SKStream stream, long length) throw new ArgumentNullException (nameof (stream)); try { - return GetObject (SkiaApi.sk_data_new_from_stream (stream.Handle, (IntPtr)length)); + return GetObject (SkiaApi.sk_data_new_from_stream (stream.Handle, (IntPtr)length)); } finally { GC.KeepAlive(stream); } @@ -207,7 +207,8 @@ public static SKData Create (IntPtr address, int length, SKDataReleaseDelegate r var del = releaseProc != null && context != null ? new SKDataReleaseDelegate ((addr, _) => releaseProc (addr, context)) : releaseProc; - var proxy = DelegateProxies.Create (del, DelegateProxies.SKDataReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (del, out _, out var ctx); + var proxy = del is not null ? DelegateProxies.SKDataReleaseProxy : null; return GetObject (SkiaApi.sk_data_new_with_proc ((void*)address, (IntPtr)length, proxy, (void*)ctx)); } diff --git a/binding/SkiaSharp/SKDrawable.cs b/binding/SkiaSharp/SKDrawable.cs index 000c88926a..c23cf0a04f 100644 --- a/binding/SkiaSharp/SKDrawable.cs +++ b/binding/SkiaSharp/SKDrawable.cs @@ -1,7 +1,6 @@ #nullable disable using System; -using System.Runtime.InteropServices; using System.Threading; namespace SkiaSharp @@ -10,16 +9,16 @@ public unsafe class SKDrawable : SKObject, ISKReferenceCounted { private static readonly SKManagedDrawableDelegates delegates; - private int fromNative; + internal int fromNative; static SKDrawable () { delegates = new SKManagedDrawableDelegates { - fDraw = DrawInternal, - fGetBounds = GetBoundsInternal, - fApproximateBytesUsed = ApproximateBytesUsedInternal, - fMakePictureSnapshot = MakePictureSnapshotInternal, - fDestroy = DestroyInternal, + fDraw = DelegateProxies.SKManagedDrawableDrawProxy, + fGetBounds = DelegateProxies.SKManagedDrawableGetBoundsProxy, + fApproximateBytesUsed = DelegateProxies.SKManagedDrawableApproximateBytesUsedProxy, + fMakePictureSnapshot = DelegateProxies.SKManagedDrawableMakePictureSnapshotProxy, + fDestroy = DelegateProxies.SKManagedDrawableDestroyProxy }; SkiaApi.sk_manageddrawable_set_procs (delegates); @@ -87,15 +86,15 @@ public SKPicture Snapshot () => public void NotifyDrawingChanged () => SkiaApi.sk_drawable_notify_drawing_changed (Handle); - protected virtual void OnDraw (SKCanvas canvas) + protected internal virtual void OnDraw (SKCanvas canvas) { } - protected virtual int OnGetApproximateBytesUsed () => 0; + protected internal virtual int OnGetApproximateBytesUsed () => 0; - protected virtual SKRect OnGetBounds () => SKRect.Empty; + protected internal virtual SKRect OnGetBounds () => SKRect.Empty; - protected virtual SKPicture OnSnapshot () + protected internal virtual SKPicture OnSnapshot () { using var recorder = new SKPictureRecorder (); var canvas = recorder.BeginRecording (Bounds); @@ -103,46 +102,6 @@ protected virtual SKPicture OnSnapshot () return recorder.EndRecording (); } - [MonoPInvokeCallback (typeof (SKManagedDrawableDrawProxyDelegate))] - private static void DrawInternal (IntPtr d, void* context, IntPtr canvas) - { - var drawable = DelegateProxies.GetUserData ((IntPtr)context, out _); - drawable.OnDraw (SKCanvas.GetObject (canvas, false)); - } - - [MonoPInvokeCallback (typeof (SKManagedDrawableGetBoundsProxyDelegate))] - private static void GetBoundsInternal (IntPtr d, void* context, SKRect* rect) - { - var drawable = DelegateProxies.GetUserData ((IntPtr)context, out _); - var bounds = drawable.OnGetBounds (); - *rect = bounds; - } - - [MonoPInvokeCallback (typeof (SKManagedDrawableApproximateBytesUsedProxyDelegate))] - private static IntPtr ApproximateBytesUsedInternal (IntPtr d, void* context) - { - var drawable = DelegateProxies.GetUserData ((IntPtr)context, out _); - return (IntPtr)drawable.OnGetApproximateBytesUsed (); - } - - [MonoPInvokeCallback (typeof (SKManagedDrawableMakePictureSnapshotProxyDelegate))] - private static IntPtr MakePictureSnapshotInternal (IntPtr d, void* context) - { - var drawable = DelegateProxies.GetUserData ((IntPtr)context, out _); - return drawable.OnSnapshot ()?.Handle ?? IntPtr.Zero; - } - - [MonoPInvokeCallback (typeof (SKManagedDrawableDestroyProxyDelegate))] - private static void DestroyInternal (IntPtr d, void* context) - { - var drawable = DelegateProxies.GetUserData ((IntPtr)context, out var gch); - if (drawable != null) { - Interlocked.Exchange (ref drawable.fromNative, 1); - drawable.Dispose (); - } - gch.Free (); - } - internal static SKDrawable GetObject (IntPtr handle) => GetOrAddObject (handle, (h, o) => new SKDrawable (h, o)); } diff --git a/binding/SkiaSharp/SKFont.cs b/binding/SkiaSharp/SKFont.cs index 3c3148d693..fb49e85f4e 100644 --- a/binding/SkiaSharp/SKFont.cs +++ b/binding/SkiaSharp/SKFont.cs @@ -793,7 +793,8 @@ internal SKPath GetTextPath (void* text, int length, SKTextEncoding encoding, Re public void GetGlyphPaths (ReadOnlySpan glyphs, SKGlyphPathDelegate glyphPathDelegate) { - var proxy = DelegateProxies.Create (glyphPathDelegate, DelegateProxies.SKGlyphPathDelegateProxy, out var gch, out var ctx); + DelegateProxies.Create (glyphPathDelegate, out var gch, out var ctx); + var proxy = glyphPathDelegate is not null ? DelegateProxies.SKGlyphPathProxy : null; try { fixed (ushort* g = glyphs) { SkiaApi.sk_font_get_paths (Handle, g, glyphs.Length, proxy, (void*)ctx); diff --git a/binding/SkiaSharp/SKFrontBufferedManagedStream.cs b/binding/SkiaSharp/SKFrontBufferedManagedStream.cs index c6c4488a7d..ef909645f8 100644 --- a/binding/SkiaSharp/SKFrontBufferedManagedStream.cs +++ b/binding/SkiaSharp/SKFrontBufferedManagedStream.cs @@ -61,7 +61,7 @@ protected override void DisposeManaged () base.DisposeManaged (); } - protected override IntPtr OnRead (IntPtr buffer, IntPtr size) + protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size) { var start = offset; @@ -123,7 +123,7 @@ protected override IntPtr OnRead (IntPtr buffer, IntPtr size) return (IntPtr)(offset - start); } - protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) + protected internal override IntPtr OnPeek (IntPtr buffer, IntPtr size) { if (offset >= bufferLength) { @@ -143,7 +143,7 @@ protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) return (IntPtr)bytesRead; } - protected override bool OnIsAtEnd () + protected internal override bool OnIsAtEnd () { if (offset < bufferedSoFar) { @@ -155,7 +155,7 @@ protected override bool OnIsAtEnd () return stream.IsAtEnd; } - protected override bool OnRewind () + protected internal override bool OnRewind () { // only allow a rewind if we have not exceeded the buffer. if (offset <= bufferLength) @@ -167,23 +167,23 @@ protected override bool OnRewind () return false; } - protected override bool OnHasLength () => hasLength; + protected internal override bool OnHasLength () => hasLength; - protected override IntPtr OnGetLength () => (IntPtr)streamLength; + protected internal override IntPtr OnGetLength () => (IntPtr)streamLength; // seeking is not supported - protected override bool OnHasPosition () => false; + protected internal override bool OnHasPosition () => false; // seeking is not supported - protected override IntPtr OnGetPosition () => (IntPtr)0; + protected internal override IntPtr OnGetPosition () => (IntPtr)0; // seeking is not supported - protected override bool OnSeek (IntPtr position) => false; + protected internal override bool OnSeek (IntPtr position) => false; // seeking is not supported - protected override bool OnMove (int offset) => false; + protected internal override bool OnMove (int offset) => false; // duplicating or forking is not supported - protected override IntPtr OnCreateNew () => IntPtr.Zero; + protected internal override IntPtr OnCreateNew () => IntPtr.Zero; } } diff --git a/binding/SkiaSharp/SKImage.cs b/binding/SkiaSharp/SKImage.cs index e0d2df9a9a..3e3cfef8e6 100644 --- a/binding/SkiaSharp/SKImage.cs +++ b/binding/SkiaSharp/SKImage.cs @@ -30,7 +30,7 @@ public static SKImage Create (SKImageInfo info) var pixels = Marshal.AllocCoTaskMem (info.BytesSize); using (var pixmap = new SKPixmap (info, pixels)) { // don't use the managed version as that is just extra overhead which isn't necessary - return GetObject (SkiaApi.sk_image_new_raster (pixmap.Handle, DelegateProxies.SKImageRasterReleaseDelegateProxyForCoTaskMem, null)); + return GetObject (SkiaApi.sk_image_new_raster (pixmap.Handle, DelegateProxies.SKImageRasterReleaseProxyForCoTaskMem, null)); } } @@ -148,7 +148,8 @@ public static SKImage FromPixels (SKPixmap pixmap, SKImageRasterReleaseDelegate var del = releaseProc != null && releaseContext != null ? new SKImageRasterReleaseDelegate ((addr, _) => releaseProc (addr, releaseContext)) : releaseProc; - var proxy = DelegateProxies.Create (del, DelegateProxies.SKImageRasterReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (del, out _, out var ctx); + var proxy = del is not null ? DelegateProxies.SKImageRasterReleaseProxy : null; return GetObject (SkiaApi.sk_image_new_raster (pixmap.Handle, proxy, (void*)ctx)); } @@ -289,7 +290,8 @@ public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture var del = releaseProc != null && releaseContext != null ? new SKImageTextureReleaseDelegate ((_) => releaseProc (releaseContext)) : releaseProc; - var proxy = DelegateProxies.Create (del, DelegateProxies.SKImageTextureReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (del, out _, out var ctx); + var proxy = del is not null ? DelegateProxies.SKImageTextureReleaseProxy : null; return GetObject (SkiaApi.sk_image_new_from_texture (context.Handle, texture.Handle, origin, colorType.ToNative (), alpha, cs, proxy, (void*)ctx)); } diff --git a/binding/SkiaSharp/SKManagedStream.cs b/binding/SkiaSharp/SKManagedStream.cs index 32a48f4584..fcaa5f70ba 100644 --- a/binding/SkiaSharp/SKManagedStream.cs +++ b/binding/SkiaSharp/SKManagedStream.cs @@ -111,14 +111,14 @@ private IntPtr OnReadManagedStream (IntPtr buffer, IntPtr size) return (IntPtr)len; } - protected override IntPtr OnRead (IntPtr buffer, IntPtr size) + protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size) { VerifyOriginal (); return OnReadManagedStream (buffer, size); } - protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) + protected internal override IntPtr OnPeek (IntPtr buffer, IntPtr size) { VerifyOriginal (); @@ -131,7 +131,7 @@ protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) return result; } - protected override bool OnIsAtEnd () + protected internal override bool OnIsAtEnd () { VerifyOriginal (); @@ -141,21 +141,21 @@ protected override bool OnIsAtEnd () return stream.Position >= stream.Length; } - protected override bool OnHasPosition () + protected internal override bool OnHasPosition () { VerifyOriginal (); return stream.CanSeek; } - protected override bool OnHasLength () + protected internal override bool OnHasLength () { VerifyOriginal (); return stream.CanSeek; } - protected override bool OnRewind () + protected internal override bool OnRewind () { VerifyOriginal (); @@ -166,7 +166,7 @@ protected override bool OnRewind () return true; } - protected override IntPtr OnGetPosition () + protected internal override IntPtr OnGetPosition () { VerifyOriginal (); @@ -176,7 +176,7 @@ protected override IntPtr OnGetPosition () return (IntPtr)stream.Position; } - protected override IntPtr OnGetLength () + protected internal override IntPtr OnGetLength () { VerifyOriginal (); @@ -186,7 +186,7 @@ protected override IntPtr OnGetLength () return (IntPtr)stream.Length; } - protected override bool OnSeek (IntPtr position) + protected internal override bool OnSeek (IntPtr position) { VerifyOriginal (); @@ -197,7 +197,7 @@ protected override bool OnSeek (IntPtr position) return true; } - protected override bool OnMove (int offset) + protected internal override bool OnMove (int offset) { VerifyOriginal (); @@ -208,14 +208,14 @@ protected override bool OnMove (int offset) return true; } - protected override IntPtr OnCreateNew () + protected internal override IntPtr OnCreateNew () { VerifyOriginal (); return IntPtr.Zero; } - protected override IntPtr OnDuplicate () + protected internal override IntPtr OnDuplicate () { VerifyOriginal (); @@ -234,7 +234,7 @@ protected override IntPtr OnDuplicate () return newStream.Handle; } - protected override IntPtr OnFork () + protected internal override IntPtr OnFork () { VerifyOriginal (); diff --git a/binding/SkiaSharp/SKManagedWStream.cs b/binding/SkiaSharp/SKManagedWStream.cs index 1cd056b17d..75e0b688bd 100644 --- a/binding/SkiaSharp/SKManagedWStream.cs +++ b/binding/SkiaSharp/SKManagedWStream.cs @@ -42,7 +42,7 @@ protected override void DisposeManaged () base.DisposeManaged (); } - protected override bool OnWrite (IntPtr buffer, IntPtr size) + protected internal override bool OnWrite (IntPtr buffer, IntPtr size) { var count = (int)size; using var managedBuffer = Utils.RentArray (count); @@ -53,12 +53,12 @@ protected override bool OnWrite (IntPtr buffer, IntPtr size) return true; } - protected override void OnFlush () + protected internal override void OnFlush () { stream.Flush (); } - protected override IntPtr OnBytesWritten () + protected internal override IntPtr OnBytesWritten () { return (IntPtr)stream.Position; } diff --git a/binding/SkiaSharp/SKObject.cs b/binding/SkiaSharp/SKObject.cs index ddaae8b879..74f471c4f3 100644 --- a/binding/SkiaSharp/SKObject.cs +++ b/binding/SkiaSharp/SKObject.cs @@ -206,24 +206,6 @@ internal static T Referenced (T owner, SKObject child) return owner; } - - internal static T[] PtrToStructureArray (IntPtr intPtr, int count) - { - var items = new T[count]; - var size = Marshal.SizeOf (); - for (var i = 0; i < count; i++) { - var newPtr = new IntPtr (intPtr.ToInt64 () + (i * size)); - items[i] = Marshal.PtrToStructure (newPtr); - } - return items; - } - - internal static T PtrToStructure (IntPtr intPtr, int index) - { - var size = Marshal.SizeOf (); - var newPtr = new IntPtr (intPtr.ToInt64 () + (index * size)); - return Marshal.PtrToStructure (newPtr); - } } public abstract class SKNativeObject : IDisposable diff --git a/binding/SkiaSharp/SKSurface.cs b/binding/SkiaSharp/SKSurface.cs index 9b9d79b56a..c76938bbf4 100644 --- a/binding/SkiaSharp/SKSurface.cs +++ b/binding/SkiaSharp/SKSurface.cs @@ -68,7 +68,8 @@ public static SKSurface Create (SKImageInfo info, IntPtr pixels, int rowBytes, S var del = releaseProc != null && context != null ? new SKSurfaceReleaseDelegate ((addr, _) => releaseProc (addr, context)) : releaseProc; - var proxy = DelegateProxies.Create (del, DelegateProxies.SKSurfaceReleaseDelegateProxy, out _, out var ctx); + DelegateProxies.Create (del, out _, out var ctx); + var proxy = del != null ? DelegateProxies.SKSurfaceRasterReleaseProxy : null; return GetObject (SkiaApi.sk_surface_new_raster_direct (&cinfo, (void*)pixels, (IntPtr)rowBytes, proxy, (void*)ctx, props?.Handle ?? IntPtr.Zero)); } diff --git a/binding/SkiaSharp/SKTraceMemoryDump.cs b/binding/SkiaSharp/SKTraceMemoryDump.cs index 6003bd6ee9..463455020f 100644 --- a/binding/SkiaSharp/SKTraceMemoryDump.cs +++ b/binding/SkiaSharp/SKTraceMemoryDump.cs @@ -1,7 +1,6 @@ #nullable disable using System; -using System.Runtime.InteropServices; namespace SkiaSharp { @@ -13,8 +12,8 @@ public unsafe class SKTraceMemoryDump : SKObject, ISKSkipObjectRegistration static SKTraceMemoryDump () { delegates = new SKManagedTraceMemoryDumpDelegates { - fDumpNumericValue = DumpNumericValueInternal, - fDumpStringValue = DumpStringValueInternal, + fDumpNumericValue = DelegateProxies.SKManagedTraceMemoryDumpDumpNumericValueProxy, + fDumpStringValue = DelegateProxies.SKManagedTraceMemoryDumpDumpStringValueProxy, }; SkiaApi.sk_managedtracememorydump_set_procs (delegates); @@ -39,35 +38,12 @@ protected override void DisposeNative () gch.Free (); } - protected virtual void OnDumpNumericValue (string dumpName, string valueName, string units, ulong value) + protected internal virtual void OnDumpNumericValue (string dumpName, string valueName, string units, ulong value) { } - protected virtual void OnDumpStringValue (string dumpName, string valueName, string value) + protected internal virtual void OnDumpStringValue (string dumpName, string valueName, string value) { } - - // impl - - [MonoPInvokeCallback (typeof (SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate))] - private static void DumpNumericValueInternal (IntPtr d, void* context, void* dumpName, void* valueName, void* units, ulong value) - { - var dump = DelegateProxies.GetUserData ((IntPtr)context, out _); - dump.OnDumpNumericValue ( - Marshal.PtrToStringAnsi ((IntPtr)dumpName), - Marshal.PtrToStringAnsi ((IntPtr)valueName), - Marshal.PtrToStringAnsi ((IntPtr)units), - value); - } - - [MonoPInvokeCallback (typeof (SKManagedTraceMemoryDumpDumpStringValueProxyDelegate))] - private static void DumpStringValueInternal (IntPtr d, void* context, void* dumpName, void* valueName, void* value) - { - var dump = DelegateProxies.GetUserData ((IntPtr)context, out _); - dump.OnDumpStringValue ( - Marshal.PtrToStringAnsi ((IntPtr)dumpName), - Marshal.PtrToStringAnsi ((IntPtr)valueName), - Marshal.PtrToStringAnsi ((IntPtr)value)); - } } } diff --git a/binding/SkiaSharp/SkiaApi.generated.cs b/binding/SkiaSharp/SkiaApi.generated.cs index 8a204712aa..a8062dc7f8 100644 --- a/binding/SkiaSharp/SkiaApi.generated.cs +++ b/binding/SkiaSharp/SkiaApi.generated.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; #region Namespaces @@ -111,8 +112,13 @@ internal unsafe partial class SkiaApi // void gr_backendrendertarget_delete(gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_backendrendertarget_delete (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_backendrendertarget_delete (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -125,8 +131,13 @@ internal static void gr_backendrendertarget_delete (gr_backendrendertarget_t ren // gr_backend_t gr_backendrendertarget_get_backend(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial GRBackendNative gr_backendrendertarget_get_backend (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern GRBackendNative gr_backendrendertarget_get_backend (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -139,9 +150,15 @@ internal static GRBackendNative gr_backendrendertarget_get_backend (gr_backendre // bool gr_backendrendertarget_get_gl_framebufferinfo(const gr_backendrendertarget_t* rendertarget, gr_gl_framebufferinfo_t* glInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_backendrendertarget_get_gl_framebufferinfo (gr_backendrendertarget_t rendertarget, GRGlFramebufferInfo* glInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_backendrendertarget_get_gl_framebufferinfo (gr_backendrendertarget_t rendertarget, GRGlFramebufferInfo* glInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -155,8 +172,13 @@ internal static bool gr_backendrendertarget_get_gl_framebufferinfo (gr_backendre // int gr_backendrendertarget_get_height(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendrendertarget_get_height (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendrendertarget_get_height (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -169,8 +191,13 @@ internal static Int32 gr_backendrendertarget_get_height (gr_backendrendertarget_ // int gr_backendrendertarget_get_samples(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendrendertarget_get_samples (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendrendertarget_get_samples (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -183,8 +210,13 @@ internal static Int32 gr_backendrendertarget_get_samples (gr_backendrendertarget // int gr_backendrendertarget_get_stencils(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendrendertarget_get_stencils (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendrendertarget_get_stencils (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -197,8 +229,13 @@ internal static Int32 gr_backendrendertarget_get_stencils (gr_backendrendertarge // int gr_backendrendertarget_get_width(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendrendertarget_get_width (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendrendertarget_get_width (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -211,9 +248,15 @@ internal static Int32 gr_backendrendertarget_get_width (gr_backendrendertarget_t // bool gr_backendrendertarget_is_valid(const gr_backendrendertarget_t* rendertarget) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_backendrendertarget_is_valid (gr_backendrendertarget_t rendertarget); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_backendrendertarget_is_valid (gr_backendrendertarget_t rendertarget); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -227,8 +270,13 @@ internal static bool gr_backendrendertarget_is_valid (gr_backendrendertarget_t r // gr_backendrendertarget_t* gr_backendrendertarget_new_gl(int width, int height, int samples, int stencils, const gr_gl_framebufferinfo_t* glInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendrendertarget_t gr_backendrendertarget_new_gl (Int32 width, Int32 height, Int32 samples, Int32 stencils, GRGlFramebufferInfo* glInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendrendertarget_t gr_backendrendertarget_new_gl (Int32 width, Int32 height, Int32 samples, Int32 stencils, GRGlFramebufferInfo* glInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -241,8 +289,13 @@ internal static gr_backendrendertarget_t gr_backendrendertarget_new_gl (Int32 wi // gr_backendrendertarget_t* gr_backendrendertarget_new_metal(int width, int height, int samples, const gr_mtl_textureinfo_t* mtlInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendrendertarget_t gr_backendrendertarget_new_metal (Int32 width, Int32 height, Int32 samples, GRMtlTextureInfoNative* mtlInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendrendertarget_t gr_backendrendertarget_new_metal (Int32 width, Int32 height, Int32 samples, GRMtlTextureInfoNative* mtlInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -255,8 +308,13 @@ internal static gr_backendrendertarget_t gr_backendrendertarget_new_metal (Int32 // gr_backendrendertarget_t* gr_backendrendertarget_new_vulkan(int width, int height, int samples, const gr_vk_imageinfo_t* vkImageInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendrendertarget_t gr_backendrendertarget_new_vulkan (Int32 width, Int32 height, Int32 samples, GRVkImageInfo* vkImageInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendrendertarget_t gr_backendrendertarget_new_vulkan (Int32 width, Int32 height, Int32 samples, GRVkImageInfo* vkImageInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -269,8 +327,13 @@ internal static gr_backendrendertarget_t gr_backendrendertarget_new_vulkan (Int3 // void gr_backendtexture_delete(gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_backendtexture_delete (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_backendtexture_delete (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -283,8 +346,13 @@ internal static void gr_backendtexture_delete (gr_backendtexture_t texture) => // gr_backend_t gr_backendtexture_get_backend(const gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial GRBackendNative gr_backendtexture_get_backend (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern GRBackendNative gr_backendtexture_get_backend (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -297,9 +365,15 @@ internal static GRBackendNative gr_backendtexture_get_backend (gr_backendtexture // bool gr_backendtexture_get_gl_textureinfo(const gr_backendtexture_t* texture, gr_gl_textureinfo_t* glInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_backendtexture_get_gl_textureinfo (gr_backendtexture_t texture, GRGlTextureInfo* glInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_backendtexture_get_gl_textureinfo (gr_backendtexture_t texture, GRGlTextureInfo* glInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -313,8 +387,13 @@ internal static bool gr_backendtexture_get_gl_textureinfo (gr_backendtexture_t t // int gr_backendtexture_get_height(const gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendtexture_get_height (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendtexture_get_height (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -327,8 +406,13 @@ internal static Int32 gr_backendtexture_get_height (gr_backendtexture_t texture) // int gr_backendtexture_get_width(const gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_backendtexture_get_width (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_backendtexture_get_width (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -341,9 +425,15 @@ internal static Int32 gr_backendtexture_get_width (gr_backendtexture_t texture) // bool gr_backendtexture_has_mipmaps(const gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_backendtexture_has_mipmaps (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_backendtexture_has_mipmaps (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -357,9 +447,15 @@ internal static bool gr_backendtexture_has_mipmaps (gr_backendtexture_t texture) // bool gr_backendtexture_is_valid(const gr_backendtexture_t* texture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_backendtexture_is_valid (gr_backendtexture_t texture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_backendtexture_is_valid (gr_backendtexture_t texture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -373,8 +469,13 @@ internal static bool gr_backendtexture_is_valid (gr_backendtexture_t texture) => // gr_backendtexture_t* gr_backendtexture_new_gl(int width, int height, bool mipmapped, const gr_gl_textureinfo_t* glInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendtexture_t gr_backendtexture_new_gl (Int32 width, Int32 height, [MarshalAs (UnmanagedType.I1)] bool mipmapped, GRGlTextureInfo* glInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendtexture_t gr_backendtexture_new_gl (Int32 width, Int32 height, [MarshalAs (UnmanagedType.I1)] bool mipmapped, GRGlTextureInfo* glInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -387,8 +488,13 @@ internal static gr_backendtexture_t gr_backendtexture_new_gl (Int32 width, Int32 // gr_backendtexture_t* gr_backendtexture_new_metal(int width, int height, bool mipmapped, const gr_mtl_textureinfo_t* mtlInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendtexture_t gr_backendtexture_new_metal (Int32 width, Int32 height, [MarshalAs (UnmanagedType.I1)] bool mipmapped, GRMtlTextureInfoNative* mtlInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendtexture_t gr_backendtexture_new_metal (Int32 width, Int32 height, [MarshalAs (UnmanagedType.I1)] bool mipmapped, GRMtlTextureInfoNative* mtlInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -401,8 +507,13 @@ internal static gr_backendtexture_t gr_backendtexture_new_metal (Int32 width, In // gr_backendtexture_t* gr_backendtexture_new_vulkan(int width, int height, const gr_vk_imageinfo_t* vkInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_backendtexture_t gr_backendtexture_new_vulkan (Int32 width, Int32 height, GRVkImageInfo* vkInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_backendtexture_t gr_backendtexture_new_vulkan (Int32 width, Int32 height, GRVkImageInfo* vkInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -415,8 +526,13 @@ internal static gr_backendtexture_t gr_backendtexture_new_vulkan (Int32 width, I // void gr_direct_context_abandon_context(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_abandon_context (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_abandon_context (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -429,8 +545,13 @@ internal static void gr_direct_context_abandon_context (gr_direct_context_t cont // void gr_direct_context_dump_memory_statistics(const gr_direct_context_t* context, sk_tracememorydump_t* dump) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_dump_memory_statistics (gr_direct_context_t context, sk_tracememorydump_t dump); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_dump_memory_statistics (gr_direct_context_t context, sk_tracememorydump_t dump); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -443,8 +564,13 @@ internal static void gr_direct_context_dump_memory_statistics (gr_direct_context // void gr_direct_context_flush(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_flush (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_flush (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -457,8 +583,13 @@ internal static void gr_direct_context_flush (gr_direct_context_t context) => // void gr_direct_context_flush_and_submit(gr_direct_context_t* context, bool syncCpu) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_flush_and_submit (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_flush_and_submit (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -471,8 +602,13 @@ internal static void gr_direct_context_flush_and_submit (gr_direct_context_t con // void gr_direct_context_flush_image(gr_direct_context_t* context, const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_flush_image (gr_direct_context_t context, sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_flush_image (gr_direct_context_t context, sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -485,8 +621,13 @@ internal static void gr_direct_context_flush_image (gr_direct_context_t context, // void gr_direct_context_flush_surface(gr_direct_context_t* context, sk_surface_t* surface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_flush_surface (gr_direct_context_t context, sk_surface_t surface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_flush_surface (gr_direct_context_t context, sk_surface_t surface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -499,8 +640,13 @@ internal static void gr_direct_context_flush_surface (gr_direct_context_t contex // void gr_direct_context_free_gpu_resources(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_free_gpu_resources (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_free_gpu_resources (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -513,8 +659,13 @@ internal static void gr_direct_context_free_gpu_resources (gr_direct_context_t c // size_t gr_direct_context_get_resource_cache_limit(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr gr_direct_context_get_resource_cache_limit (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr gr_direct_context_get_resource_cache_limit (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -527,8 +678,13 @@ private partial class Delegates { // void gr_direct_context_get_resource_cache_usage(gr_direct_context_t* context, int* maxResources, size_t* maxResourceBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_get_resource_cache_usage (gr_direct_context_t context, Int32* maxResources, /* size_t */ IntPtr* maxResourceBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_get_resource_cache_usage (gr_direct_context_t context, Int32* maxResources, /* size_t */ IntPtr* maxResourceBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -541,9 +697,15 @@ internal static void gr_direct_context_get_resource_cache_usage (gr_direct_conte // bool gr_direct_context_is_abandoned(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_direct_context_is_abandoned (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_direct_context_is_abandoned (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -557,8 +719,13 @@ internal static bool gr_direct_context_is_abandoned (gr_direct_context_t context // gr_direct_context_t* gr_direct_context_make_gl(const gr_glinterface_t* glInterface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_gl (gr_glinterface_t glInterface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_gl (gr_glinterface_t glInterface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -571,8 +738,13 @@ internal static gr_direct_context_t gr_direct_context_make_gl (gr_glinterface_t // gr_direct_context_t* gr_direct_context_make_gl_with_options(const gr_glinterface_t* glInterface, const gr_context_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_gl_with_options (gr_glinterface_t glInterface, GRContextOptionsNative* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_gl_with_options (gr_glinterface_t glInterface, GRContextOptionsNative* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -585,8 +757,13 @@ internal static gr_direct_context_t gr_direct_context_make_gl_with_options (gr_g // gr_direct_context_t* gr_direct_context_make_metal(void* device, void* queue) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_metal (void* device, void* queue); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_metal (void* device, void* queue); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -599,8 +776,13 @@ internal static gr_direct_context_t gr_direct_context_make_metal (void* device, // gr_direct_context_t* gr_direct_context_make_metal_with_options(void* device, void* queue, const gr_context_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_metal_with_options (void* device, void* queue, GRContextOptionsNative* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_metal_with_options (void* device, void* queue, GRContextOptionsNative* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -613,8 +795,13 @@ internal static gr_direct_context_t gr_direct_context_make_metal_with_options (v // gr_direct_context_t* gr_direct_context_make_vulkan(const gr_vk_backendcontext_t vkBackendContext) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_vulkan (GRVkBackendContextNative vkBackendContext); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_vulkan (GRVkBackendContextNative vkBackendContext); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -627,8 +814,13 @@ internal static gr_direct_context_t gr_direct_context_make_vulkan (GRVkBackendCo // gr_direct_context_t* gr_direct_context_make_vulkan_with_options(const gr_vk_backendcontext_t vkBackendContext, const gr_context_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_direct_context_t gr_direct_context_make_vulkan_with_options (GRVkBackendContextNative vkBackendContext, GRContextOptionsNative* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_direct_context_t gr_direct_context_make_vulkan_with_options (GRVkBackendContextNative vkBackendContext, GRContextOptionsNative* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -641,8 +833,13 @@ internal static gr_direct_context_t gr_direct_context_make_vulkan_with_options ( // void gr_direct_context_perform_deferred_cleanup(gr_direct_context_t* context, long long ms) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_perform_deferred_cleanup (gr_direct_context_t context, Int64 ms); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_perform_deferred_cleanup (gr_direct_context_t context, Int64 ms); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -655,8 +852,13 @@ internal static void gr_direct_context_perform_deferred_cleanup (gr_direct_conte // void gr_direct_context_purge_unlocked_resources(gr_direct_context_t* context, bool scratchResourcesOnly) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_purge_unlocked_resources (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool scratchResourcesOnly); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_purge_unlocked_resources (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool scratchResourcesOnly); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -669,8 +871,13 @@ internal static void gr_direct_context_purge_unlocked_resources (gr_direct_conte // void gr_direct_context_purge_unlocked_resources_bytes(gr_direct_context_t* context, size_t bytesToPurge, bool preferScratchResources) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_purge_unlocked_resources_bytes (gr_direct_context_t context, /* size_t */ IntPtr bytesToPurge, [MarshalAs (UnmanagedType.I1)] bool preferScratchResources); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_purge_unlocked_resources_bytes (gr_direct_context_t context, /* size_t */ IntPtr bytesToPurge, [MarshalAs (UnmanagedType.I1)] bool preferScratchResources); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -683,8 +890,13 @@ internal static void gr_direct_context_purge_unlocked_resources_bytes (gr_direct // void gr_direct_context_release_resources_and_abandon_context(gr_direct_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_release_resources_and_abandon_context (gr_direct_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_release_resources_and_abandon_context (gr_direct_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -697,8 +909,13 @@ internal static void gr_direct_context_release_resources_and_abandon_context (gr // void gr_direct_context_reset_context(gr_direct_context_t* context, uint32_t state) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_reset_context (gr_direct_context_t context, UInt32 state); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_reset_context (gr_direct_context_t context, UInt32 state); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -711,8 +928,13 @@ internal static void gr_direct_context_reset_context (gr_direct_context_t contex // void gr_direct_context_set_resource_cache_limit(gr_direct_context_t* context, size_t maxResourceBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_direct_context_set_resource_cache_limit (gr_direct_context_t context, /* size_t */ IntPtr maxResourceBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_direct_context_set_resource_cache_limit (gr_direct_context_t context, /* size_t */ IntPtr maxResourceBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -725,9 +947,15 @@ internal static void gr_direct_context_set_resource_cache_limit (gr_direct_conte // bool gr_direct_context_submit(gr_direct_context_t* context, bool syncCpu) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_direct_context_submit (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_direct_context_submit (gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -741,8 +969,13 @@ internal static bool gr_direct_context_submit (gr_direct_context_t context, [Mar // const gr_glinterface_t* gr_glinterface_assemble_gl_interface(void* ctx, gr_gl_get_proc get) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_glinterface_t gr_glinterface_assemble_gl_interface (void* ctx, void* get); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_glinterface_t gr_glinterface_assemble_gl_interface (void* ctx, GRGlGetProcProxyDelegate get); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -755,8 +988,13 @@ internal static gr_glinterface_t gr_glinterface_assemble_gl_interface (void* ctx // const gr_glinterface_t* gr_glinterface_assemble_gles_interface(void* ctx, gr_gl_get_proc get) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_glinterface_t gr_glinterface_assemble_gles_interface (void* ctx, void* get); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_glinterface_t gr_glinterface_assemble_gles_interface (void* ctx, GRGlGetProcProxyDelegate get); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -769,8 +1007,13 @@ internal static gr_glinterface_t gr_glinterface_assemble_gles_interface (void* c // const gr_glinterface_t* gr_glinterface_assemble_interface(void* ctx, gr_gl_get_proc get) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_glinterface_t gr_glinterface_assemble_interface (void* ctx, void* get); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_glinterface_t gr_glinterface_assemble_interface (void* ctx, GRGlGetProcProxyDelegate get); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -783,8 +1026,13 @@ internal static gr_glinterface_t gr_glinterface_assemble_interface (void* ctx, G // const gr_glinterface_t* gr_glinterface_assemble_webgl_interface(void* ctx, gr_gl_get_proc get) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_glinterface_t gr_glinterface_assemble_webgl_interface (void* ctx, void* get); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_glinterface_t gr_glinterface_assemble_webgl_interface (void* ctx, GRGlGetProcProxyDelegate get); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -797,8 +1045,13 @@ internal static gr_glinterface_t gr_glinterface_assemble_webgl_interface (void* // const gr_glinterface_t* gr_glinterface_create_native_interface() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_glinterface_t gr_glinterface_create_native_interface (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_glinterface_t gr_glinterface_create_native_interface (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -811,9 +1064,15 @@ internal static gr_glinterface_t gr_glinterface_create_native_interface () => // bool gr_glinterface_has_extension(const gr_glinterface_t* glInterface, const char* extension) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_glinterface_has_extension (gr_glinterface_t glInterface, [MarshalAs (UnmanagedType.LPStr)] String extension); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_glinterface_has_extension (gr_glinterface_t glInterface, [MarshalAs (UnmanagedType.LPStr)] String extension); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -827,8 +1086,13 @@ internal static bool gr_glinterface_has_extension (gr_glinterface_t glInterface, // void gr_glinterface_unref(const gr_glinterface_t* glInterface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_glinterface_unref (gr_glinterface_t glInterface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_glinterface_unref (gr_glinterface_t glInterface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -841,9 +1105,15 @@ internal static void gr_glinterface_unref (gr_glinterface_t glInterface) => // bool gr_glinterface_validate(const gr_glinterface_t* glInterface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_glinterface_validate (gr_glinterface_t glInterface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_glinterface_validate (gr_glinterface_t glInterface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -857,8 +1127,13 @@ internal static bool gr_glinterface_validate (gr_glinterface_t glInterface) => // gr_backend_t gr_recording_context_get_backend(gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial GRBackendNative gr_recording_context_get_backend (gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern GRBackendNative gr_recording_context_get_backend (gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -871,8 +1146,13 @@ internal static GRBackendNative gr_recording_context_get_backend (gr_recording_c // int gr_recording_context_get_max_surface_sample_count_for_color_type(gr_recording_context_t* context, sk_colortype_t colorType) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_recording_context_get_max_surface_sample_count_for_color_type (gr_recording_context_t context, SKColorTypeNative colorType); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_recording_context_get_max_surface_sample_count_for_color_type (gr_recording_context_t context, SKColorTypeNative colorType); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -885,9 +1165,15 @@ internal static Int32 gr_recording_context_get_max_surface_sample_count_for_colo // bool gr_recording_context_is_abandoned(gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_recording_context_is_abandoned (gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_recording_context_is_abandoned (gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -901,8 +1187,13 @@ internal static bool gr_recording_context_is_abandoned (gr_recording_context_t c // int gr_recording_context_max_render_target_size(gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_recording_context_max_render_target_size (gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_recording_context_max_render_target_size (gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -915,8 +1206,13 @@ internal static Int32 gr_recording_context_max_render_target_size (gr_recording_ // int gr_recording_context_max_texture_size(gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 gr_recording_context_max_texture_size (gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 gr_recording_context_max_texture_size (gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -929,8 +1225,13 @@ internal static Int32 gr_recording_context_max_texture_size (gr_recording_contex // void gr_recording_context_unref(gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_recording_context_unref (gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_recording_context_unref (gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -943,8 +1244,13 @@ internal static void gr_recording_context_unref (gr_recording_context_t context) // void gr_vk_extensions_delete(gr_vk_extensions_t* extensions) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_vk_extensions_delete (gr_vk_extensions_t extensions); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_vk_extensions_delete (gr_vk_extensions_t extensions); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -957,9 +1263,15 @@ internal static void gr_vk_extensions_delete (gr_vk_extensions_t extensions) => // bool gr_vk_extensions_has_extension(gr_vk_extensions_t* extensions, const char* ext, uint32_t minVersion) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool gr_vk_extensions_has_extension (gr_vk_extensions_t extensions, [MarshalAs (UnmanagedType.LPStr)] String ext, UInt32 minVersion); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool gr_vk_extensions_has_extension (gr_vk_extensions_t extensions, [MarshalAs (UnmanagedType.LPStr)] String ext, UInt32 minVersion); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -973,8 +1285,13 @@ internal static bool gr_vk_extensions_has_extension (gr_vk_extensions_t extensio // void gr_vk_extensions_init(gr_vk_extensions_t* extensions, gr_vk_get_proc getProc, void* userData, vk_instance_t* instance, vk_physical_device_t* physDev, uint32_t instanceExtensionCount, const char** instanceExtensions, uint32_t deviceExtensionCount, const char** deviceExtensions) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void gr_vk_extensions_init (gr_vk_extensions_t extensions, void* getProc, void* userData, vk_instance_t instance, vk_physical_device_t physDev, UInt32 instanceExtensionCount, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] instanceExtensions, UInt32 deviceExtensionCount, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] deviceExtensions); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void gr_vk_extensions_init (gr_vk_extensions_t extensions, GRVkGetProcProxyDelegate getProc, void* userData, vk_instance_t instance, vk_physical_device_t physDev, UInt32 instanceExtensionCount, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] instanceExtensions, UInt32 deviceExtensionCount, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] deviceExtensions); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -987,8 +1304,13 @@ internal static void gr_vk_extensions_init (gr_vk_extensions_t extensions, GRVkG // gr_vk_extensions_t* gr_vk_extensions_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_vk_extensions_t gr_vk_extensions_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_vk_extensions_t gr_vk_extensions_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1005,8 +1327,13 @@ internal static gr_vk_extensions_t gr_vk_extensions_new () => // void sk_bitmap_destructor(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_destructor (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_destructor (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1019,8 +1346,13 @@ internal static void sk_bitmap_destructor (sk_bitmap_t cbitmap) => // void sk_bitmap_erase(sk_bitmap_t* cbitmap, sk_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_erase (sk_bitmap_t cbitmap, UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_erase (sk_bitmap_t cbitmap, UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1033,8 +1365,13 @@ internal static void sk_bitmap_erase (sk_bitmap_t cbitmap, UInt32 color) => // void sk_bitmap_erase_rect(sk_bitmap_t* cbitmap, sk_color_t color, sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_erase_rect (sk_bitmap_t cbitmap, UInt32 color, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_erase_rect (sk_bitmap_t cbitmap, UInt32 color, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1047,9 +1384,15 @@ internal static void sk_bitmap_erase_rect (sk_bitmap_t cbitmap, UInt32 color, SK // bool sk_bitmap_extract_alpha(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, const sk_paint_t* paint, sk_ipoint_t* offset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_extract_alpha (sk_bitmap_t cbitmap, sk_bitmap_t dst, sk_paint_t paint, SKPointI* offset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_extract_alpha (sk_bitmap_t cbitmap, sk_bitmap_t dst, sk_paint_t paint, SKPointI* offset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1063,9 +1406,15 @@ internal static bool sk_bitmap_extract_alpha (sk_bitmap_t cbitmap, sk_bitmap_t d // bool sk_bitmap_extract_subset(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_extract_subset (sk_bitmap_t cbitmap, sk_bitmap_t dst, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_extract_subset (sk_bitmap_t cbitmap, sk_bitmap_t dst, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1079,8 +1428,13 @@ internal static bool sk_bitmap_extract_subset (sk_bitmap_t cbitmap, sk_bitmap_t // void* sk_bitmap_get_addr(sk_bitmap_t* cbitmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_bitmap_get_addr (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_bitmap_get_addr (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1093,8 +1447,13 @@ private partial class Delegates { // uint16_t* sk_bitmap_get_addr_16(sk_bitmap_t* cbitmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt16* sk_bitmap_get_addr_16 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt16* sk_bitmap_get_addr_16 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1107,8 +1466,13 @@ private partial class Delegates { // uint32_t* sk_bitmap_get_addr_32(sk_bitmap_t* cbitmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32* sk_bitmap_get_addr_32 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32* sk_bitmap_get_addr_32 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1121,8 +1485,13 @@ private partial class Delegates { // uint8_t* sk_bitmap_get_addr_8(sk_bitmap_t* cbitmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Byte* sk_bitmap_get_addr_8 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte* sk_bitmap_get_addr_8 (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1135,8 +1504,13 @@ private partial class Delegates { // size_t sk_bitmap_get_byte_count(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_bitmap_get_byte_count (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_bitmap_get_byte_count (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1149,8 +1523,13 @@ private partial class Delegates { // void sk_bitmap_get_info(sk_bitmap_t* cbitmap, sk_imageinfo_t* info) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_get_info (sk_bitmap_t cbitmap, SKImageInfoNative* info); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_get_info (sk_bitmap_t cbitmap, SKImageInfoNative* info); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1163,8 +1542,13 @@ internal static void sk_bitmap_get_info (sk_bitmap_t cbitmap, SKImageInfoNative* // sk_color_t sk_bitmap_get_pixel_color(sk_bitmap_t* cbitmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_bitmap_get_pixel_color (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_bitmap_get_pixel_color (sk_bitmap_t cbitmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1177,8 +1561,13 @@ internal static UInt32 sk_bitmap_get_pixel_color (sk_bitmap_t cbitmap, Int32 x, // void sk_bitmap_get_pixel_colors(sk_bitmap_t* cbitmap, sk_color_t* colors) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_get_pixel_colors (sk_bitmap_t cbitmap, UInt32* colors); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_get_pixel_colors (sk_bitmap_t cbitmap, UInt32* colors); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1191,8 +1580,13 @@ internal static void sk_bitmap_get_pixel_colors (sk_bitmap_t cbitmap, UInt32* co // void* sk_bitmap_get_pixels(sk_bitmap_t* cbitmap, size_t* length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_bitmap_get_pixels (sk_bitmap_t cbitmap, /* size_t */ IntPtr* length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_bitmap_get_pixels (sk_bitmap_t cbitmap, /* size_t */ IntPtr* length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1205,8 +1599,13 @@ private partial class Delegates { // size_t sk_bitmap_get_row_bytes(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_bitmap_get_row_bytes (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_bitmap_get_row_bytes (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1219,9 +1618,15 @@ private partial class Delegates { // bool sk_bitmap_install_pixels(sk_bitmap_t* cbitmap, const sk_imageinfo_t* cinfo, void* pixels, size_t rowBytes, const sk_bitmap_release_proc releaseProc, void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_install_pixels (sk_bitmap_t cbitmap, SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes, void* releaseProc, void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_install_pixels (sk_bitmap_t cbitmap, SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes, SKBitmapReleaseProxyDelegate releaseProc, void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1235,9 +1640,15 @@ internal static bool sk_bitmap_install_pixels (sk_bitmap_t cbitmap, SKImageInfoN // bool sk_bitmap_install_pixels_with_pixmap(sk_bitmap_t* cbitmap, const sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_install_pixels_with_pixmap (sk_bitmap_t cbitmap, sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_install_pixels_with_pixmap (sk_bitmap_t cbitmap, sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1251,9 +1662,15 @@ internal static bool sk_bitmap_install_pixels_with_pixmap (sk_bitmap_t cbitmap, // bool sk_bitmap_is_immutable(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_is_immutable (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_is_immutable (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1267,9 +1684,15 @@ internal static bool sk_bitmap_is_immutable (sk_bitmap_t cbitmap) => // bool sk_bitmap_is_null(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_is_null (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_is_null (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1283,8 +1706,13 @@ internal static bool sk_bitmap_is_null (sk_bitmap_t cbitmap) => // sk_shader_t* sk_bitmap_make_shader(sk_bitmap_t* cbitmap, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, sk_sampling_options_t* sampling, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_bitmap_make_shader (sk_bitmap_t cbitmap, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_bitmap_make_shader (sk_bitmap_t cbitmap, SKShaderTileMode tmx, SKShaderTileMode tmy, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1297,8 +1725,13 @@ internal static sk_shader_t sk_bitmap_make_shader (sk_bitmap_t cbitmap, SKShader // sk_bitmap_t* sk_bitmap_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_bitmap_t sk_bitmap_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_bitmap_t sk_bitmap_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1311,8 +1744,13 @@ internal static sk_bitmap_t sk_bitmap_new () => // void sk_bitmap_notify_pixels_changed(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_notify_pixels_changed (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_notify_pixels_changed (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1325,9 +1763,15 @@ internal static void sk_bitmap_notify_pixels_changed (sk_bitmap_t cbitmap) => // bool sk_bitmap_peek_pixels(sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_peek_pixels (sk_bitmap_t cbitmap, sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_peek_pixels (sk_bitmap_t cbitmap, sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1341,9 +1785,15 @@ internal static bool sk_bitmap_peek_pixels (sk_bitmap_t cbitmap, sk_pixmap_t cpi // bool sk_bitmap_ready_to_draw(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_ready_to_draw (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_ready_to_draw (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1357,8 +1807,13 @@ internal static bool sk_bitmap_ready_to_draw (sk_bitmap_t cbitmap) => // void sk_bitmap_reset(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_reset (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_reset (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1371,8 +1826,13 @@ internal static void sk_bitmap_reset (sk_bitmap_t cbitmap) => // void sk_bitmap_set_immutable(sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_set_immutable (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_set_immutable (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1385,8 +1845,13 @@ internal static void sk_bitmap_set_immutable (sk_bitmap_t cbitmap) => // void sk_bitmap_set_pixels(sk_bitmap_t* cbitmap, void* pixels) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_set_pixels (sk_bitmap_t cbitmap, void* pixels); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_set_pixels (sk_bitmap_t cbitmap, void* pixels); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1399,8 +1864,13 @@ internal static void sk_bitmap_set_pixels (sk_bitmap_t cbitmap, void* pixels) => // void sk_bitmap_swap(sk_bitmap_t* cbitmap, sk_bitmap_t* cother) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_bitmap_swap (sk_bitmap_t cbitmap, sk_bitmap_t cother); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_bitmap_swap (sk_bitmap_t cbitmap, sk_bitmap_t cother); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1413,9 +1883,15 @@ internal static void sk_bitmap_swap (sk_bitmap_t cbitmap, sk_bitmap_t cother) => // bool sk_bitmap_try_alloc_pixels(sk_bitmap_t* cbitmap, const sk_imageinfo_t* requestedInfo, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_try_alloc_pixels (sk_bitmap_t cbitmap, SKImageInfoNative* requestedInfo, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_try_alloc_pixels (sk_bitmap_t cbitmap, SKImageInfoNative* requestedInfo, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1429,9 +1905,15 @@ internal static bool sk_bitmap_try_alloc_pixels (sk_bitmap_t cbitmap, SKImageInf // bool sk_bitmap_try_alloc_pixels_with_flags(sk_bitmap_t* cbitmap, const sk_imageinfo_t* requestedInfo, uint32_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_bitmap_try_alloc_pixels_with_flags (sk_bitmap_t cbitmap, SKImageInfoNative* requestedInfo, UInt32 flags); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_bitmap_try_alloc_pixels_with_flags (sk_bitmap_t cbitmap, SKImageInfoNative* requestedInfo, UInt32 flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1449,8 +1931,13 @@ internal static bool sk_bitmap_try_alloc_pixels_with_flags (sk_bitmap_t cbitmap, // sk_blender_t* sk_blender_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePremul) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_blender_t sk_blender_new_arithmetic (Single k1, Single k2, Single k3, Single k4, [MarshalAs (UnmanagedType.I1)] bool enforcePremul); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_blender_t sk_blender_new_arithmetic (Single k1, Single k2, Single k3, Single k4, [MarshalAs (UnmanagedType.I1)] bool enforcePremul); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1463,8 +1950,13 @@ internal static sk_blender_t sk_blender_new_arithmetic (Single k1, Single k2, Si // sk_blender_t* sk_blender_new_mode(sk_blendmode_t mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_blender_t sk_blender_new_mode (SKBlendMode mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_blender_t sk_blender_new_mode (SKBlendMode mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1477,8 +1969,13 @@ internal static sk_blender_t sk_blender_new_mode (SKBlendMode mode) => // void sk_blender_ref(sk_blender_t* blender) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_blender_ref (sk_blender_t blender); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_blender_ref (sk_blender_t blender); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1491,8 +1988,13 @@ internal static void sk_blender_ref (sk_blender_t blender) => // void sk_blender_unref(sk_blender_t* blender) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_blender_unref (sk_blender_t blender); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_blender_unref (sk_blender_t blender); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1509,8 +2011,13 @@ internal static void sk_blender_unref (sk_blender_t blender) => // void sk_canvas_clear(sk_canvas_t* ccanvas, sk_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clear (sk_canvas_t ccanvas, UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clear (sk_canvas_t ccanvas, UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1523,8 +2030,13 @@ internal static void sk_canvas_clear (sk_canvas_t ccanvas, UInt32 color) => // void sk_canvas_clear_color4f(sk_canvas_t* ccanvas, sk_color4f_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clear_color4f (sk_canvas_t ccanvas, SKColorF color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clear_color4f (sk_canvas_t ccanvas, SKColorF color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1537,8 +2049,13 @@ internal static void sk_canvas_clear_color4f (sk_canvas_t ccanvas, SKColorF colo // void sk_canvas_clip_path_with_operation(sk_canvas_t* ccanvas, const sk_path_t* cpath, sk_clipop_t op, bool doAA) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clip_path_with_operation (sk_canvas_t ccanvas, sk_path_t cpath, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clip_path_with_operation (sk_canvas_t ccanvas, sk_path_t cpath, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1551,8 +2068,13 @@ internal static void sk_canvas_clip_path_with_operation (sk_canvas_t ccanvas, sk // void sk_canvas_clip_rect_with_operation(sk_canvas_t* ccanvas, const sk_rect_t* crect, sk_clipop_t op, bool doAA) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clip_rect_with_operation (sk_canvas_t ccanvas, SKRect* crect, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clip_rect_with_operation (sk_canvas_t ccanvas, SKRect* crect, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1565,8 +2087,13 @@ internal static void sk_canvas_clip_rect_with_operation (sk_canvas_t ccanvas, SK // void sk_canvas_clip_region(sk_canvas_t* ccanvas, const sk_region_t* region, sk_clipop_t op) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clip_region (sk_canvas_t ccanvas, sk_region_t region, SKClipOperation op); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clip_region (sk_canvas_t ccanvas, sk_region_t region, SKClipOperation op); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1579,8 +2106,13 @@ internal static void sk_canvas_clip_region (sk_canvas_t ccanvas, sk_region_t reg // void sk_canvas_clip_rrect_with_operation(sk_canvas_t* ccanvas, const sk_rrect_t* crect, sk_clipop_t op, bool doAA) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_clip_rrect_with_operation (sk_canvas_t ccanvas, sk_rrect_t crect, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_clip_rrect_with_operation (sk_canvas_t ccanvas, sk_rrect_t crect, SKClipOperation op, [MarshalAs (UnmanagedType.I1)] bool doAA); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1593,8 +2125,13 @@ internal static void sk_canvas_clip_rrect_with_operation (sk_canvas_t ccanvas, s // void sk_canvas_concat(sk_canvas_t* ccanvas, const sk_matrix44_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_concat (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_concat (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1607,8 +2144,13 @@ internal static void sk_canvas_concat (sk_canvas_t ccanvas, SKMatrix44* cmatrix) // void sk_canvas_destroy(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_destroy (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_destroy (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1621,8 +2163,13 @@ internal static void sk_canvas_destroy (sk_canvas_t ccanvas) => // void sk_canvas_discard(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_discard (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_discard (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1635,8 +2182,13 @@ internal static void sk_canvas_discard (sk_canvas_t ccanvas) => // void sk_canvas_draw_annotation(sk_canvas_t* t, const sk_rect_t* rect, const char* key, sk_data_t* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_annotation (sk_canvas_t t, SKRect* rect, /* char */ void* key, sk_data_t value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_annotation (sk_canvas_t t, SKRect* rect, /* char */ void* key, sk_data_t value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1649,8 +2201,13 @@ internal static void sk_canvas_draw_annotation (sk_canvas_t t, SKRect* rect, /* // void sk_canvas_draw_arc(sk_canvas_t* ccanvas, const sk_rect_t* oval, float startAngle, float sweepAngle, bool useCenter, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_arc (sk_canvas_t ccanvas, SKRect* oval, Single startAngle, Single sweepAngle, [MarshalAs (UnmanagedType.I1)] bool useCenter, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_arc (sk_canvas_t ccanvas, SKRect* oval, Single startAngle, Single sweepAngle, [MarshalAs (UnmanagedType.I1)] bool useCenter, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1663,8 +2220,13 @@ internal static void sk_canvas_draw_arc (sk_canvas_t ccanvas, SKRect* oval, Sing // void sk_canvas_draw_atlas(sk_canvas_t* ccanvas, const sk_image_t* atlas, const sk_rsxform_t* xform, const sk_rect_t* tex, const sk_color_t* colors, int count, sk_blendmode_t mode, const sk_sampling_options_t* sampling, const sk_rect_t* cullRect, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_atlas (sk_canvas_t ccanvas, sk_image_t atlas, SKRotationScaleMatrix* xform, SKRect* tex, UInt32* colors, Int32 count, SKBlendMode mode, SKSamplingOptions* sampling, SKRect* cullRect, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_atlas (sk_canvas_t ccanvas, sk_image_t atlas, SKRotationScaleMatrix* xform, SKRect* tex, UInt32* colors, Int32 count, SKBlendMode mode, SKSamplingOptions* sampling, SKRect* cullRect, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1677,8 +2239,13 @@ internal static void sk_canvas_draw_atlas (sk_canvas_t ccanvas, sk_image_t atlas // void sk_canvas_draw_circle(sk_canvas_t* ccanvas, float cx, float cy, float rad, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_circle (sk_canvas_t ccanvas, Single cx, Single cy, Single rad, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_circle (sk_canvas_t ccanvas, Single cx, Single cy, Single rad, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1691,8 +2258,13 @@ internal static void sk_canvas_draw_circle (sk_canvas_t ccanvas, Single cx, Sing // void sk_canvas_draw_color(sk_canvas_t* ccanvas, sk_color_t color, sk_blendmode_t cmode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_color (sk_canvas_t ccanvas, UInt32 color, SKBlendMode cmode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_color (sk_canvas_t ccanvas, UInt32 color, SKBlendMode cmode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1705,8 +2277,13 @@ internal static void sk_canvas_draw_color (sk_canvas_t ccanvas, UInt32 color, SK // void sk_canvas_draw_color4f(sk_canvas_t* ccanvas, sk_color4f_t color, sk_blendmode_t cmode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_color4f (sk_canvas_t ccanvas, SKColorF color, SKBlendMode cmode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_color4f (sk_canvas_t ccanvas, SKColorF color, SKBlendMode cmode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1719,8 +2296,13 @@ internal static void sk_canvas_draw_color4f (sk_canvas_t ccanvas, SKColorF color // void sk_canvas_draw_drawable(sk_canvas_t* ccanvas, sk_drawable_t* cdrawable, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_drawable (sk_canvas_t ccanvas, sk_drawable_t cdrawable, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_drawable (sk_canvas_t ccanvas, sk_drawable_t cdrawable, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1733,8 +2315,13 @@ internal static void sk_canvas_draw_drawable (sk_canvas_t ccanvas, sk_drawable_t // void sk_canvas_draw_drrect(sk_canvas_t* ccanvas, const sk_rrect_t* outer, const sk_rrect_t* inner, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_drrect (sk_canvas_t ccanvas, sk_rrect_t outer, sk_rrect_t inner, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_drrect (sk_canvas_t ccanvas, sk_rrect_t outer, sk_rrect_t inner, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1747,8 +2334,13 @@ internal static void sk_canvas_draw_drrect (sk_canvas_t ccanvas, sk_rrect_t oute // void sk_canvas_draw_image(sk_canvas_t* ccanvas, const sk_image_t* cimage, float x, float y, const sk_sampling_options_t* sampling, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_image (sk_canvas_t ccanvas, sk_image_t cimage, Single x, Single y, SKSamplingOptions* sampling, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_image (sk_canvas_t ccanvas, sk_image_t cimage, Single x, Single y, SKSamplingOptions* sampling, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1761,8 +2353,13 @@ internal static void sk_canvas_draw_image (sk_canvas_t ccanvas, sk_image_t cimag // void sk_canvas_draw_image_lattice(sk_canvas_t* ccanvas, const sk_image_t* image, const sk_lattice_t* lattice, const sk_rect_t* dst, sk_filter_mode_t mode, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_image_lattice (sk_canvas_t ccanvas, sk_image_t image, SKLatticeInternal* lattice, SKRect* dst, SKFilterMode mode, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_image_lattice (sk_canvas_t ccanvas, sk_image_t image, SKLatticeInternal* lattice, SKRect* dst, SKFilterMode mode, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1775,8 +2372,13 @@ internal static void sk_canvas_draw_image_lattice (sk_canvas_t ccanvas, sk_image // void sk_canvas_draw_image_nine(sk_canvas_t* ccanvas, const sk_image_t* image, const sk_irect_t* center, const sk_rect_t* dst, sk_filter_mode_t mode, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_image_nine (sk_canvas_t ccanvas, sk_image_t image, SKRectI* center, SKRect* dst, SKFilterMode mode, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_image_nine (sk_canvas_t ccanvas, sk_image_t image, SKRectI* center, SKRect* dst, SKFilterMode mode, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1789,8 +2391,13 @@ internal static void sk_canvas_draw_image_nine (sk_canvas_t ccanvas, sk_image_t // void sk_canvas_draw_image_rect(sk_canvas_t* ccanvas, const sk_image_t* cimage, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_sampling_options_t* sampling, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_image_rect (sk_canvas_t ccanvas, sk_image_t cimage, SKRect* csrcR, SKRect* cdstR, SKSamplingOptions* sampling, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_image_rect (sk_canvas_t ccanvas, sk_image_t cimage, SKRect* csrcR, SKRect* cdstR, SKSamplingOptions* sampling, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1803,8 +2410,13 @@ internal static void sk_canvas_draw_image_rect (sk_canvas_t ccanvas, sk_image_t // void sk_canvas_draw_line(sk_canvas_t* ccanvas, float x0, float y0, float x1, float y1, sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_line (sk_canvas_t ccanvas, Single x0, Single y0, Single x1, Single y1, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_line (sk_canvas_t ccanvas, Single x0, Single y0, Single x1, Single y1, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1817,8 +2429,13 @@ internal static void sk_canvas_draw_line (sk_canvas_t ccanvas, Single x0, Single // void sk_canvas_draw_link_destination_annotation(sk_canvas_t* t, const sk_rect_t* rect, sk_data_t* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_link_destination_annotation (sk_canvas_t t, SKRect* rect, sk_data_t value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_link_destination_annotation (sk_canvas_t t, SKRect* rect, sk_data_t value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1831,8 +2448,13 @@ internal static void sk_canvas_draw_link_destination_annotation (sk_canvas_t t, // void sk_canvas_draw_named_destination_annotation(sk_canvas_t* t, const sk_point_t* point, sk_data_t* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_named_destination_annotation (sk_canvas_t t, SKPoint* point, sk_data_t value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_named_destination_annotation (sk_canvas_t t, SKPoint* point, sk_data_t value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1845,8 +2467,13 @@ internal static void sk_canvas_draw_named_destination_annotation (sk_canvas_t t, // void sk_canvas_draw_oval(sk_canvas_t* ccanvas, const sk_rect_t* crect, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_oval (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_oval (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1859,8 +2486,13 @@ internal static void sk_canvas_draw_oval (sk_canvas_t ccanvas, SKRect* crect, sk // void sk_canvas_draw_paint(sk_canvas_t* ccanvas, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_paint (sk_canvas_t ccanvas, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_paint (sk_canvas_t ccanvas, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1873,8 +2505,13 @@ internal static void sk_canvas_draw_paint (sk_canvas_t ccanvas, sk_paint_t cpain // void sk_canvas_draw_patch(sk_canvas_t* ccanvas, const sk_point_t* cubics, const sk_color_t* colors, const sk_point_t* texCoords, sk_blendmode_t mode, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_patch (sk_canvas_t ccanvas, SKPoint* cubics, UInt32* colors, SKPoint* texCoords, SKBlendMode mode, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_patch (sk_canvas_t ccanvas, SKPoint* cubics, UInt32* colors, SKPoint* texCoords, SKBlendMode mode, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1887,8 +2524,13 @@ internal static void sk_canvas_draw_patch (sk_canvas_t ccanvas, SKPoint* cubics, // void sk_canvas_draw_path(sk_canvas_t* ccanvas, const sk_path_t* cpath, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_path (sk_canvas_t ccanvas, sk_path_t cpath, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_path (sk_canvas_t ccanvas, sk_path_t cpath, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1901,8 +2543,13 @@ internal static void sk_canvas_draw_path (sk_canvas_t ccanvas, sk_path_t cpath, // void sk_canvas_draw_picture(sk_canvas_t* ccanvas, const sk_picture_t* cpicture, const sk_matrix_t* cmatrix, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_picture (sk_canvas_t ccanvas, sk_picture_t cpicture, SKMatrix* cmatrix, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_picture (sk_canvas_t ccanvas, sk_picture_t cpicture, SKMatrix* cmatrix, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1915,8 +2562,13 @@ internal static void sk_canvas_draw_picture (sk_canvas_t ccanvas, sk_picture_t c // void sk_canvas_draw_point(sk_canvas_t* ccanvas, float x, float y, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_point (sk_canvas_t ccanvas, Single x, Single y, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_point (sk_canvas_t ccanvas, Single x, Single y, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1929,8 +2581,13 @@ internal static void sk_canvas_draw_point (sk_canvas_t ccanvas, Single x, Single // void sk_canvas_draw_points(sk_canvas_t* ccanvas, sk_point_mode_t pointMode, size_t count, const sk_point_t[-1] points, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_points (sk_canvas_t ccanvas, SKPointMode pointMode, /* size_t */ IntPtr count, SKPoint* points, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_points (sk_canvas_t ccanvas, SKPointMode pointMode, /* size_t */ IntPtr count, SKPoint* points, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1943,8 +2600,13 @@ internal static void sk_canvas_draw_points (sk_canvas_t ccanvas, SKPointMode poi // void sk_canvas_draw_rect(sk_canvas_t* ccanvas, const sk_rect_t* crect, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_rect (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_rect (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1957,8 +2619,13 @@ internal static void sk_canvas_draw_rect (sk_canvas_t ccanvas, SKRect* crect, sk // void sk_canvas_draw_region(sk_canvas_t* ccanvas, const sk_region_t* cregion, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_region (sk_canvas_t ccanvas, sk_region_t cregion, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_region (sk_canvas_t ccanvas, sk_region_t cregion, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1971,8 +2638,13 @@ internal static void sk_canvas_draw_region (sk_canvas_t ccanvas, sk_region_t cre // void sk_canvas_draw_round_rect(sk_canvas_t* ccanvas, const sk_rect_t* crect, float rx, float ry, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_round_rect (sk_canvas_t ccanvas, SKRect* crect, Single rx, Single ry, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_round_rect (sk_canvas_t ccanvas, SKRect* crect, Single rx, Single ry, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1985,8 +2657,13 @@ internal static void sk_canvas_draw_round_rect (sk_canvas_t ccanvas, SKRect* cre // void sk_canvas_draw_rrect(sk_canvas_t* ccanvas, const sk_rrect_t* crect, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_rrect (sk_canvas_t ccanvas, sk_rrect_t crect, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_rrect (sk_canvas_t ccanvas, sk_rrect_t crect, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -1999,8 +2676,13 @@ internal static void sk_canvas_draw_rrect (sk_canvas_t ccanvas, sk_rrect_t crect // void sk_canvas_draw_simple_text(sk_canvas_t* ccanvas, const void* text, size_t byte_length, sk_text_encoding_t encoding, float x, float y, const sk_font_t* cfont, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_simple_text (sk_canvas_t ccanvas, void* text, /* size_t */ IntPtr byte_length, SKTextEncoding encoding, Single x, Single y, sk_font_t cfont, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_simple_text (sk_canvas_t ccanvas, void* text, /* size_t */ IntPtr byte_length, SKTextEncoding encoding, Single x, Single y, sk_font_t cfont, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2013,8 +2695,13 @@ internal static void sk_canvas_draw_simple_text (sk_canvas_t ccanvas, void* text // void sk_canvas_draw_text_blob(sk_canvas_t* ccanvas, sk_textblob_t* text, float x, float y, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_text_blob (sk_canvas_t ccanvas, sk_textblob_t text, Single x, Single y, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_text_blob (sk_canvas_t ccanvas, sk_textblob_t text, Single x, Single y, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2027,8 +2714,13 @@ internal static void sk_canvas_draw_text_blob (sk_canvas_t ccanvas, sk_textblob_ // void sk_canvas_draw_url_annotation(sk_canvas_t* t, const sk_rect_t* rect, sk_data_t* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_url_annotation (sk_canvas_t t, SKRect* rect, sk_data_t value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_url_annotation (sk_canvas_t t, SKRect* rect, sk_data_t value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2041,8 +2733,13 @@ internal static void sk_canvas_draw_url_annotation (sk_canvas_t t, SKRect* rect, // void sk_canvas_draw_vertices(sk_canvas_t* ccanvas, const sk_vertices_t* vertices, sk_blendmode_t mode, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_draw_vertices (sk_canvas_t ccanvas, sk_vertices_t vertices, SKBlendMode mode, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_draw_vertices (sk_canvas_t ccanvas, sk_vertices_t vertices, SKBlendMode mode, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2055,8 +2752,13 @@ internal static void sk_canvas_draw_vertices (sk_canvas_t ccanvas, sk_vertices_t // void sk_canvas_flush(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_flush (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_flush (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2069,9 +2771,15 @@ internal static void sk_canvas_flush (sk_canvas_t ccanvas) => // bool sk_canvas_get_device_clip_bounds(sk_canvas_t* ccanvas, sk_irect_t* cbounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_canvas_get_device_clip_bounds (sk_canvas_t ccanvas, SKRectI* cbounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_canvas_get_device_clip_bounds (sk_canvas_t ccanvas, SKRectI* cbounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2085,9 +2793,15 @@ internal static bool sk_canvas_get_device_clip_bounds (sk_canvas_t ccanvas, SKRe // bool sk_canvas_get_local_clip_bounds(sk_canvas_t* ccanvas, sk_rect_t* cbounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_canvas_get_local_clip_bounds (sk_canvas_t ccanvas, SKRect* cbounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_canvas_get_local_clip_bounds (sk_canvas_t ccanvas, SKRect* cbounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2101,8 +2815,13 @@ internal static bool sk_canvas_get_local_clip_bounds (sk_canvas_t ccanvas, SKRec // void sk_canvas_get_matrix(sk_canvas_t* ccanvas, sk_matrix44_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_get_matrix (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_get_matrix (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2115,8 +2834,13 @@ internal static void sk_canvas_get_matrix (sk_canvas_t ccanvas, SKMatrix44* cmat // int sk_canvas_get_save_count(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_canvas_get_save_count (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_canvas_get_save_count (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2129,9 +2853,15 @@ internal static Int32 sk_canvas_get_save_count (sk_canvas_t ccanvas) => // bool sk_canvas_is_clip_empty(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_canvas_is_clip_empty (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_canvas_is_clip_empty (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2145,9 +2875,15 @@ internal static bool sk_canvas_is_clip_empty (sk_canvas_t ccanvas) => // bool sk_canvas_is_clip_rect(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_canvas_is_clip_rect (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_canvas_is_clip_rect (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2161,8 +2897,13 @@ internal static bool sk_canvas_is_clip_rect (sk_canvas_t ccanvas) => // sk_canvas_t* sk_canvas_new_from_bitmap(const sk_bitmap_t* bitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_canvas_new_from_bitmap (sk_bitmap_t bitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_canvas_new_from_bitmap (sk_bitmap_t bitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2175,8 +2916,13 @@ internal static sk_canvas_t sk_canvas_new_from_bitmap (sk_bitmap_t bitmap) => // sk_canvas_t* sk_canvas_new_from_raster(const sk_imageinfo_t* cinfo, void* pixels, size_t rowBytes, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_canvas_new_from_raster (SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_canvas_new_from_raster (SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2189,9 +2935,15 @@ internal static sk_canvas_t sk_canvas_new_from_raster (SKImageInfoNative* cinfo, // bool sk_canvas_quick_reject(sk_canvas_t* ccanvas, const sk_rect_t* crect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_canvas_quick_reject (sk_canvas_t ccanvas, SKRect* crect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_canvas_quick_reject (sk_canvas_t ccanvas, SKRect* crect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2205,8 +2957,13 @@ internal static bool sk_canvas_quick_reject (sk_canvas_t ccanvas, SKRect* crect) // void sk_canvas_reset_matrix(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_reset_matrix (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_reset_matrix (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2219,8 +2976,13 @@ internal static void sk_canvas_reset_matrix (sk_canvas_t ccanvas) => // void sk_canvas_restore(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_restore (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_restore (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2233,8 +2995,13 @@ internal static void sk_canvas_restore (sk_canvas_t ccanvas) => // void sk_canvas_restore_to_count(sk_canvas_t* ccanvas, int saveCount) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_restore_to_count (sk_canvas_t ccanvas, Int32 saveCount); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_restore_to_count (sk_canvas_t ccanvas, Int32 saveCount); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2247,8 +3014,13 @@ internal static void sk_canvas_restore_to_count (sk_canvas_t ccanvas, Int32 save // void sk_canvas_rotate_degrees(sk_canvas_t* ccanvas, float degrees) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_rotate_degrees (sk_canvas_t ccanvas, Single degrees); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_rotate_degrees (sk_canvas_t ccanvas, Single degrees); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2261,8 +3033,13 @@ internal static void sk_canvas_rotate_degrees (sk_canvas_t ccanvas, Single degre // void sk_canvas_rotate_radians(sk_canvas_t* ccanvas, float radians) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_rotate_radians (sk_canvas_t ccanvas, Single radians); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_rotate_radians (sk_canvas_t ccanvas, Single radians); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2275,8 +3052,13 @@ internal static void sk_canvas_rotate_radians (sk_canvas_t ccanvas, Single radia // int sk_canvas_save(sk_canvas_t* ccanvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_canvas_save (sk_canvas_t ccanvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_canvas_save (sk_canvas_t ccanvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2289,8 +3071,13 @@ internal static Int32 sk_canvas_save (sk_canvas_t ccanvas) => // int sk_canvas_save_layer(sk_canvas_t* ccanvas, const sk_rect_t* crect, const sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_canvas_save_layer (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_canvas_save_layer (sk_canvas_t ccanvas, SKRect* crect, sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2303,8 +3090,13 @@ internal static Int32 sk_canvas_save_layer (sk_canvas_t ccanvas, SKRect* crect, // void sk_canvas_scale(sk_canvas_t* ccanvas, float sx, float sy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_scale (sk_canvas_t ccanvas, Single sx, Single sy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_scale (sk_canvas_t ccanvas, Single sx, Single sy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2317,8 +3109,13 @@ internal static void sk_canvas_scale (sk_canvas_t ccanvas, Single sx, Single sy) // void sk_canvas_set_matrix(sk_canvas_t* ccanvas, const sk_matrix44_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_set_matrix (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_set_matrix (sk_canvas_t ccanvas, SKMatrix44* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2331,8 +3128,13 @@ internal static void sk_canvas_set_matrix (sk_canvas_t ccanvas, SKMatrix44* cmat // void sk_canvas_skew(sk_canvas_t* ccanvas, float sx, float sy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_skew (sk_canvas_t ccanvas, Single sx, Single sy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_skew (sk_canvas_t ccanvas, Single sx, Single sy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2345,8 +3147,13 @@ internal static void sk_canvas_skew (sk_canvas_t ccanvas, Single sx, Single sy) // void sk_canvas_translate(sk_canvas_t* ccanvas, float dx, float dy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_canvas_translate (sk_canvas_t ccanvas, Single dx, Single dy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_canvas_translate (sk_canvas_t ccanvas, Single dx, Single dy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2359,8 +3166,13 @@ internal static void sk_canvas_translate (sk_canvas_t ccanvas, Single dx, Single // void sk_nodraw_canvas_destroy(sk_nodraw_canvas_t* t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nodraw_canvas_destroy (sk_nodraw_canvas_t t); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nodraw_canvas_destroy (sk_nodraw_canvas_t t); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2373,8 +3185,13 @@ internal static void sk_nodraw_canvas_destroy (sk_nodraw_canvas_t t) => // sk_nodraw_canvas_t* sk_nodraw_canvas_new(int width, int height) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_nodraw_canvas_t sk_nodraw_canvas_new (Int32 width, Int32 height); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_nodraw_canvas_t sk_nodraw_canvas_new (Int32 width, Int32 height); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2387,8 +3204,13 @@ internal static sk_nodraw_canvas_t sk_nodraw_canvas_new (Int32 width, Int32 heig // void sk_nway_canvas_add_canvas(sk_nway_canvas_t* t, sk_canvas_t* canvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nway_canvas_add_canvas (sk_nway_canvas_t t, sk_canvas_t canvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nway_canvas_add_canvas (sk_nway_canvas_t t, sk_canvas_t canvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2401,8 +3223,13 @@ internal static void sk_nway_canvas_add_canvas (sk_nway_canvas_t t, sk_canvas_t // void sk_nway_canvas_destroy(sk_nway_canvas_t* t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nway_canvas_destroy (sk_nway_canvas_t t); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nway_canvas_destroy (sk_nway_canvas_t t); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2415,8 +3242,13 @@ internal static void sk_nway_canvas_destroy (sk_nway_canvas_t t) => // sk_nway_canvas_t* sk_nway_canvas_new(int width, int height) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_nway_canvas_t sk_nway_canvas_new (Int32 width, Int32 height); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_nway_canvas_t sk_nway_canvas_new (Int32 width, Int32 height); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2429,8 +3261,13 @@ internal static sk_nway_canvas_t sk_nway_canvas_new (Int32 width, Int32 height) // void sk_nway_canvas_remove_all(sk_nway_canvas_t* t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nway_canvas_remove_all (sk_nway_canvas_t t); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nway_canvas_remove_all (sk_nway_canvas_t t); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2443,8 +3280,13 @@ internal static void sk_nway_canvas_remove_all (sk_nway_canvas_t t) => // void sk_nway_canvas_remove_canvas(sk_nway_canvas_t* t, sk_canvas_t* canvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nway_canvas_remove_canvas (sk_nway_canvas_t t, sk_canvas_t canvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nway_canvas_remove_canvas (sk_nway_canvas_t t, sk_canvas_t canvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2457,8 +3299,13 @@ internal static void sk_nway_canvas_remove_canvas (sk_nway_canvas_t t, sk_canvas // void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_overdraw_canvas_destroy (sk_overdraw_canvas_t canvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_overdraw_canvas_destroy (sk_overdraw_canvas_t canvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2471,8 +3318,13 @@ internal static void sk_overdraw_canvas_destroy (sk_overdraw_canvas_t canvas) => // sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_overdraw_canvas_t sk_overdraw_canvas_new (sk_canvas_t canvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_overdraw_canvas_t sk_overdraw_canvas_new (sk_canvas_t canvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2489,8 +3341,13 @@ internal static sk_overdraw_canvas_t sk_overdraw_canvas_new (sk_canvas_t canvas) // void sk_codec_destroy(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_codec_destroy (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_codec_destroy (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2503,8 +3360,13 @@ internal static void sk_codec_destroy (sk_codec_t codec) => // sk_encoded_image_format_t sk_codec_get_encoded_format(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKEncodedImageFormat sk_codec_get_encoded_format (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKEncodedImageFormat sk_codec_get_encoded_format (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2517,8 +3379,13 @@ internal static SKEncodedImageFormat sk_codec_get_encoded_format (sk_codec_t cod // int sk_codec_get_frame_count(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_codec_get_frame_count (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_codec_get_frame_count (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2531,8 +3398,13 @@ internal static Int32 sk_codec_get_frame_count (sk_codec_t codec) => // void sk_codec_get_frame_info(sk_codec_t* codec, sk_codec_frameinfo_t* frameInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_codec_get_frame_info (sk_codec_t codec, SKCodecFrameInfo* frameInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_codec_get_frame_info (sk_codec_t codec, SKCodecFrameInfo* frameInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2545,9 +3417,15 @@ internal static void sk_codec_get_frame_info (sk_codec_t codec, SKCodecFrameInfo // bool sk_codec_get_frame_info_for_index(sk_codec_t* codec, int index, sk_codec_frameinfo_t* frameInfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_codec_get_frame_info_for_index (sk_codec_t codec, Int32 index, SKCodecFrameInfo* frameInfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_codec_get_frame_info_for_index (sk_codec_t codec, Int32 index, SKCodecFrameInfo* frameInfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2561,8 +3439,13 @@ internal static bool sk_codec_get_frame_info_for_index (sk_codec_t codec, Int32 // void sk_codec_get_info(sk_codec_t* codec, sk_imageinfo_t* info) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_codec_get_info (sk_codec_t codec, SKImageInfoNative* info); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_codec_get_info (sk_codec_t codec, SKImageInfoNative* info); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2575,8 +3458,13 @@ internal static void sk_codec_get_info (sk_codec_t codec, SKImageInfoNative* inf // sk_encodedorigin_t sk_codec_get_origin(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKEncodedOrigin sk_codec_get_origin (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKEncodedOrigin sk_codec_get_origin (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2589,8 +3477,13 @@ internal static SKEncodedOrigin sk_codec_get_origin (sk_codec_t codec) => // sk_codec_result_t sk_codec_get_pixels(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes, const sk_codec_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKCodecResult sk_codec_get_pixels (sk_codec_t codec, SKImageInfoNative* info, void* pixels, /* size_t */ IntPtr rowBytes, SKCodecOptionsInternal* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKCodecResult sk_codec_get_pixels (sk_codec_t codec, SKImageInfoNative* info, void* pixels, /* size_t */ IntPtr rowBytes, SKCodecOptionsInternal* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2603,8 +3496,13 @@ internal static SKCodecResult sk_codec_get_pixels (sk_codec_t codec, SKImageInfo // int sk_codec_get_repetition_count(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_codec_get_repetition_count (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_codec_get_repetition_count (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2617,8 +3515,13 @@ internal static Int32 sk_codec_get_repetition_count (sk_codec_t codec) => // void sk_codec_get_scaled_dimensions(sk_codec_t* codec, float desiredScale, sk_isize_t* dimensions) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_codec_get_scaled_dimensions (sk_codec_t codec, Single desiredScale, SKSizeI* dimensions); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_codec_get_scaled_dimensions (sk_codec_t codec, Single desiredScale, SKSizeI* dimensions); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2631,8 +3534,13 @@ internal static void sk_codec_get_scaled_dimensions (sk_codec_t codec, Single de // sk_codec_scanline_order_t sk_codec_get_scanline_order(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKCodecScanlineOrder sk_codec_get_scanline_order (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKCodecScanlineOrder sk_codec_get_scanline_order (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2645,8 +3553,13 @@ internal static SKCodecScanlineOrder sk_codec_get_scanline_order (sk_codec_t cod // int sk_codec_get_scanlines(sk_codec_t* codec, void* dst, int countLines, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_codec_get_scanlines (sk_codec_t codec, void* dst, Int32 countLines, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_codec_get_scanlines (sk_codec_t codec, void* dst, Int32 countLines, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2659,9 +3572,15 @@ internal static Int32 sk_codec_get_scanlines (sk_codec_t codec, void* dst, Int32 // bool sk_codec_get_valid_subset(sk_codec_t* codec, sk_irect_t* desiredSubset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_codec_get_valid_subset (sk_codec_t codec, SKRectI* desiredSubset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_codec_get_valid_subset (sk_codec_t codec, SKRectI* desiredSubset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2675,8 +3594,13 @@ internal static bool sk_codec_get_valid_subset (sk_codec_t codec, SKRectI* desir // sk_codec_result_t sk_codec_incremental_decode(sk_codec_t* codec, int* rowsDecoded) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKCodecResult sk_codec_incremental_decode (sk_codec_t codec, Int32* rowsDecoded); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKCodecResult sk_codec_incremental_decode (sk_codec_t codec, Int32* rowsDecoded); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2689,8 +3613,13 @@ internal static SKCodecResult sk_codec_incremental_decode (sk_codec_t codec, Int // size_t sk_codec_min_buffered_bytes_needed() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_codec_min_buffered_bytes_needed (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_codec_min_buffered_bytes_needed (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2703,8 +3632,13 @@ private partial class Delegates { // sk_codec_t* sk_codec_new_from_data(sk_data_t* data) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_codec_t sk_codec_new_from_data (sk_data_t data); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_codec_t sk_codec_new_from_data (sk_data_t data); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2717,8 +3651,13 @@ internal static sk_codec_t sk_codec_new_from_data (sk_data_t data) => // sk_codec_t* sk_codec_new_from_stream(sk_stream_t* stream, sk_codec_result_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_codec_t sk_codec_new_from_stream (sk_stream_t stream, SKCodecResult* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_codec_t sk_codec_new_from_stream (sk_stream_t stream, SKCodecResult* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2731,8 +3670,13 @@ internal static sk_codec_t sk_codec_new_from_stream (sk_stream_t stream, SKCodec // int sk_codec_next_scanline(sk_codec_t* codec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_codec_next_scanline (sk_codec_t codec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_codec_next_scanline (sk_codec_t codec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2745,8 +3689,13 @@ internal static Int32 sk_codec_next_scanline (sk_codec_t codec) => // int sk_codec_output_scanline(sk_codec_t* codec, int inputScanline) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_codec_output_scanline (sk_codec_t codec, Int32 inputScanline); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_codec_output_scanline (sk_codec_t codec, Int32 inputScanline); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2759,9 +3708,15 @@ internal static Int32 sk_codec_output_scanline (sk_codec_t codec, Int32 inputSca // bool sk_codec_skip_scanlines(sk_codec_t* codec, int countLines) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_codec_skip_scanlines (sk_codec_t codec, Int32 countLines); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_codec_skip_scanlines (sk_codec_t codec, Int32 countLines); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2775,8 +3730,13 @@ internal static bool sk_codec_skip_scanlines (sk_codec_t codec, Int32 countLines // sk_codec_result_t sk_codec_start_incremental_decode(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes, const sk_codec_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKCodecResult sk_codec_start_incremental_decode (sk_codec_t codec, SKImageInfoNative* info, void* pixels, /* size_t */ IntPtr rowBytes, SKCodecOptionsInternal* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKCodecResult sk_codec_start_incremental_decode (sk_codec_t codec, SKImageInfoNative* info, void* pixels, /* size_t */ IntPtr rowBytes, SKCodecOptionsInternal* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2789,8 +3749,13 @@ internal static SKCodecResult sk_codec_start_incremental_decode (sk_codec_t code // sk_codec_result_t sk_codec_start_scanline_decode(sk_codec_t* codec, const sk_imageinfo_t* info, const sk_codec_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKCodecResult sk_codec_start_scanline_decode (sk_codec_t codec, SKImageInfoNative* info, SKCodecOptionsInternal* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKCodecResult sk_codec_start_scanline_decode (sk_codec_t codec, SKImageInfoNative* info, SKCodecOptionsInternal* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2807,8 +3772,13 @@ internal static SKCodecResult sk_codec_start_scanline_decode (sk_codec_t codec, // sk_colorfilter_t* sk_colorfilter_new_color_matrix(const float[20] array = 20) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_color_matrix (Single* array); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_color_matrix (Single* array); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2821,8 +3791,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_color_matrix (Single* array) // sk_colorfilter_t* sk_colorfilter_new_compose(sk_colorfilter_t* outer, sk_colorfilter_t* inner) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_compose (sk_colorfilter_t outer, sk_colorfilter_t inner); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_compose (sk_colorfilter_t outer, sk_colorfilter_t inner); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2835,8 +3810,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_compose (sk_colorfilter_t ou // sk_colorfilter_t* sk_colorfilter_new_high_contrast(const sk_highcontrastconfig_t* config) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_high_contrast (SKHighContrastConfig* config); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_high_contrast (SKHighContrastConfig* config); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2849,8 +3829,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_high_contrast (SKHighContras // sk_colorfilter_t* sk_colorfilter_new_lighting(sk_color_t mul, sk_color_t add) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_lighting (UInt32 mul, UInt32 add); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_lighting (UInt32 mul, UInt32 add); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2863,8 +3848,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_lighting (UInt32 mul, UInt32 // sk_colorfilter_t* sk_colorfilter_new_luma_color() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_luma_color (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_luma_color (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2877,8 +3867,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_luma_color () => // sk_colorfilter_t* sk_colorfilter_new_mode(sk_color_t c, sk_blendmode_t mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_mode (UInt32 c, SKBlendMode mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_mode (UInt32 c, SKBlendMode mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2891,8 +3886,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_mode (UInt32 c, SKBlendMode // sk_colorfilter_t* sk_colorfilter_new_table(const uint8_t[256] table = 256) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_table (Byte* table); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_table (Byte* table); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2905,8 +3905,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_table (Byte* table) => // sk_colorfilter_t* sk_colorfilter_new_table_argb(const uint8_t[256] tableA = 256, const uint8_t[256] tableR = 256, const uint8_t[256] tableG = 256, const uint8_t[256] tableB = 256) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_colorfilter_new_table_argb (Byte* tableA, Byte* tableR, Byte* tableG, Byte* tableB); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_colorfilter_new_table_argb (Byte* tableA, Byte* tableR, Byte* tableG, Byte* tableB); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2919,8 +3924,13 @@ internal static sk_colorfilter_t sk_colorfilter_new_table_argb (Byte* tableA, By // void sk_colorfilter_unref(sk_colorfilter_t* filter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorfilter_unref (sk_colorfilter_t filter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorfilter_unref (sk_colorfilter_t filter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2937,8 +3947,13 @@ internal static void sk_colorfilter_unref (sk_colorfilter_t filter) => // void sk_color4f_from_color(sk_color_t color, sk_color4f_t* color4f) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_color4f_from_color (UInt32 color, SKColorF* color4f); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_color4f_from_color (UInt32 color, SKColorF* color4f); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2951,8 +3966,13 @@ internal static void sk_color4f_from_color (UInt32 color, SKColorF* color4f) => // sk_color_t sk_color4f_to_color(const sk_color4f_t* color4f) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_color4f_to_color (SKColorF* color4f); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_color4f_to_color (SKColorF* color4f); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2965,9 +3985,15 @@ internal static UInt32 sk_color4f_to_color (SKColorF* color4f) => // bool sk_colorspace_equals(const sk_colorspace_t* src, const sk_colorspace_t* dst) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_equals (sk_colorspace_t src, sk_colorspace_t dst); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_equals (sk_colorspace_t src, sk_colorspace_t dst); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2981,9 +4007,15 @@ internal static bool sk_colorspace_equals (sk_colorspace_t src, sk_colorspace_t // bool sk_colorspace_gamma_close_to_srgb(const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_gamma_close_to_srgb (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_gamma_close_to_srgb (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -2997,9 +4029,15 @@ internal static bool sk_colorspace_gamma_close_to_srgb (sk_colorspace_t colorspa // bool sk_colorspace_gamma_is_linear(const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_gamma_is_linear (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_gamma_is_linear (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3013,8 +4051,13 @@ internal static bool sk_colorspace_gamma_is_linear (sk_colorspace_t colorspace) // void sk_colorspace_icc_profile_delete(sk_colorspace_icc_profile_t* profile) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_icc_profile_delete (sk_colorspace_icc_profile_t profile); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_icc_profile_delete (sk_colorspace_icc_profile_t profile); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3027,8 +4070,13 @@ internal static void sk_colorspace_icc_profile_delete (sk_colorspace_icc_profile // const uint8_t* sk_colorspace_icc_profile_get_buffer(const sk_colorspace_icc_profile_t* profile, uint32_t* size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Byte* sk_colorspace_icc_profile_get_buffer (sk_colorspace_icc_profile_t profile, UInt32* size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte* sk_colorspace_icc_profile_get_buffer (sk_colorspace_icc_profile_t profile, UInt32* size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3041,9 +4089,15 @@ private partial class Delegates { // bool sk_colorspace_icc_profile_get_to_xyzd50(const sk_colorspace_icc_profile_t* profile, sk_colorspace_xyz_t* toXYZD50) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_icc_profile_get_to_xyzd50 (sk_colorspace_icc_profile_t profile, SKColorSpaceXyz* toXYZD50); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_icc_profile_get_to_xyzd50 (sk_colorspace_icc_profile_t profile, SKColorSpaceXyz* toXYZD50); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3057,8 +4111,13 @@ internal static bool sk_colorspace_icc_profile_get_to_xyzd50 (sk_colorspace_icc_ // sk_colorspace_icc_profile_t* sk_colorspace_icc_profile_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_icc_profile_t sk_colorspace_icc_profile_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_icc_profile_t sk_colorspace_icc_profile_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3071,9 +4130,15 @@ internal static sk_colorspace_icc_profile_t sk_colorspace_icc_profile_new () => // bool sk_colorspace_icc_profile_parse(const void* buffer, size_t length, sk_colorspace_icc_profile_t* profile) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_icc_profile_parse (void* buffer, /* size_t */ IntPtr length, sk_colorspace_icc_profile_t profile); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_icc_profile_parse (void* buffer, /* size_t */ IntPtr length, sk_colorspace_icc_profile_t profile); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3087,9 +4152,15 @@ internal static bool sk_colorspace_icc_profile_parse (void* buffer, /* size_t */ // bool sk_colorspace_is_numerical_transfer_fn(const sk_colorspace_t* colorspace, sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_is_numerical_transfer_fn (sk_colorspace_t colorspace, SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_is_numerical_transfer_fn (sk_colorspace_t colorspace, SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3103,9 +4174,15 @@ internal static bool sk_colorspace_is_numerical_transfer_fn (sk_colorspace_t col // bool sk_colorspace_is_srgb(const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_is_srgb (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_is_srgb (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3119,8 +4196,13 @@ internal static bool sk_colorspace_is_srgb (sk_colorspace_t colorspace) => // sk_colorspace_t* sk_colorspace_make_linear_gamma(const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_make_linear_gamma (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_make_linear_gamma (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3133,8 +4215,13 @@ internal static sk_colorspace_t sk_colorspace_make_linear_gamma (sk_colorspace_t // sk_colorspace_t* sk_colorspace_make_srgb_gamma(const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_make_srgb_gamma (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_make_srgb_gamma (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3147,8 +4234,13 @@ internal static sk_colorspace_t sk_colorspace_make_srgb_gamma (sk_colorspace_t c // sk_colorspace_t* sk_colorspace_new_icc(const sk_colorspace_icc_profile_t* profile) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_new_icc (sk_colorspace_icc_profile_t profile); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_new_icc (sk_colorspace_icc_profile_t profile); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3161,8 +4253,13 @@ internal static sk_colorspace_t sk_colorspace_new_icc (sk_colorspace_icc_profile // sk_colorspace_t* sk_colorspace_new_rgb(const sk_colorspace_transfer_fn_t* transferFn, const sk_colorspace_xyz_t* toXYZD50) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_new_rgb (SKColorSpaceTransferFn* transferFn, SKColorSpaceXyz* toXYZD50); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_new_rgb (SKColorSpaceTransferFn* transferFn, SKColorSpaceXyz* toXYZD50); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3175,8 +4272,13 @@ internal static sk_colorspace_t sk_colorspace_new_rgb (SKColorSpaceTransferFn* t // sk_colorspace_t* sk_colorspace_new_srgb() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_new_srgb (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_new_srgb (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3189,8 +4291,13 @@ internal static sk_colorspace_t sk_colorspace_new_srgb () => // sk_colorspace_t* sk_colorspace_new_srgb_linear() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_colorspace_new_srgb_linear (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_colorspace_new_srgb_linear (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3203,9 +4310,15 @@ internal static sk_colorspace_t sk_colorspace_new_srgb_linear () => // bool sk_colorspace_primaries_to_xyzd50(const sk_colorspace_primaries_t* primaries, sk_colorspace_xyz_t* toXYZD50) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_primaries_to_xyzd50 (SKColorSpacePrimaries* primaries, SKColorSpaceXyz* toXYZD50); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_primaries_to_xyzd50 (SKColorSpacePrimaries* primaries, SKColorSpaceXyz* toXYZD50); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3219,8 +4332,13 @@ internal static bool sk_colorspace_primaries_to_xyzd50 (SKColorSpacePrimaries* p // void sk_colorspace_ref(sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_ref (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_ref (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3233,8 +4351,13 @@ internal static void sk_colorspace_ref (sk_colorspace_t colorspace) => // void sk_colorspace_to_profile(const sk_colorspace_t* colorspace, sk_colorspace_icc_profile_t* profile) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_to_profile (sk_colorspace_t colorspace, sk_colorspace_icc_profile_t profile); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_to_profile (sk_colorspace_t colorspace, sk_colorspace_icc_profile_t profile); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3247,9 +4370,15 @@ internal static void sk_colorspace_to_profile (sk_colorspace_t colorspace, sk_co // bool sk_colorspace_to_xyzd50(const sk_colorspace_t* colorspace, sk_colorspace_xyz_t* toXYZD50) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_to_xyzd50 (sk_colorspace_t colorspace, SKColorSpaceXyz* toXYZD50); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_to_xyzd50 (sk_colorspace_t colorspace, SKColorSpaceXyz* toXYZD50); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3263,8 +4392,13 @@ internal static bool sk_colorspace_to_xyzd50 (sk_colorspace_t colorspace, SKColo // float sk_colorspace_transfer_fn_eval(const sk_colorspace_transfer_fn_t* transferFn, float x) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_colorspace_transfer_fn_eval (SKColorSpaceTransferFn* transferFn, Single x); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_colorspace_transfer_fn_eval (SKColorSpaceTransferFn* transferFn, Single x); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3277,9 +4411,15 @@ internal static Single sk_colorspace_transfer_fn_eval (SKColorSpaceTransferFn* t // bool sk_colorspace_transfer_fn_invert(const sk_colorspace_transfer_fn_t* src, sk_colorspace_transfer_fn_t* dst) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_transfer_fn_invert (SKColorSpaceTransferFn* src, SKColorSpaceTransferFn* dst); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_transfer_fn_invert (SKColorSpaceTransferFn* src, SKColorSpaceTransferFn* dst); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3293,8 +4433,13 @@ internal static bool sk_colorspace_transfer_fn_invert (SKColorSpaceTransferFn* s // void sk_colorspace_transfer_fn_named_2dot2(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_2dot2 (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_2dot2 (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3307,8 +4452,13 @@ internal static void sk_colorspace_transfer_fn_named_2dot2 (SKColorSpaceTransfer // void sk_colorspace_transfer_fn_named_hlg(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_hlg (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_hlg (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3321,8 +4471,13 @@ internal static void sk_colorspace_transfer_fn_named_hlg (SKColorSpaceTransferFn // void sk_colorspace_transfer_fn_named_linear(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_linear (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_linear (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3335,8 +4490,13 @@ internal static void sk_colorspace_transfer_fn_named_linear (SKColorSpaceTransfe // void sk_colorspace_transfer_fn_named_pq(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_pq (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_pq (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3349,8 +4509,13 @@ internal static void sk_colorspace_transfer_fn_named_pq (SKColorSpaceTransferFn* // void sk_colorspace_transfer_fn_named_rec2020(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_rec2020 (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_rec2020 (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3363,8 +4528,13 @@ internal static void sk_colorspace_transfer_fn_named_rec2020 (SKColorSpaceTransf // void sk_colorspace_transfer_fn_named_srgb(sk_colorspace_transfer_fn_t* transferFn) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_transfer_fn_named_srgb (SKColorSpaceTransferFn* transferFn); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_transfer_fn_named_srgb (SKColorSpaceTransferFn* transferFn); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3377,8 +4547,13 @@ internal static void sk_colorspace_transfer_fn_named_srgb (SKColorSpaceTransferF // void sk_colorspace_unref(sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_unref (sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_unref (sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3391,8 +4566,13 @@ internal static void sk_colorspace_unref (sk_colorspace_t colorspace) => // void sk_colorspace_xyz_concat(const sk_colorspace_xyz_t* a, const sk_colorspace_xyz_t* b, sk_colorspace_xyz_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_concat (SKColorSpaceXyz* a, SKColorSpaceXyz* b, SKColorSpaceXyz* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_concat (SKColorSpaceXyz* a, SKColorSpaceXyz* b, SKColorSpaceXyz* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3405,9 +4585,15 @@ internal static void sk_colorspace_xyz_concat (SKColorSpaceXyz* a, SKColorSpaceX // bool sk_colorspace_xyz_invert(const sk_colorspace_xyz_t* src, sk_colorspace_xyz_t* dst) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_colorspace_xyz_invert (SKColorSpaceXyz* src, SKColorSpaceXyz* dst); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_colorspace_xyz_invert (SKColorSpaceXyz* src, SKColorSpaceXyz* dst); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3421,8 +4607,13 @@ internal static bool sk_colorspace_xyz_invert (SKColorSpaceXyz* src, SKColorSpac // void sk_colorspace_xyz_named_adobe_rgb(sk_colorspace_xyz_t* xyz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_named_adobe_rgb (SKColorSpaceXyz* xyz); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_named_adobe_rgb (SKColorSpaceXyz* xyz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3435,8 +4626,13 @@ internal static void sk_colorspace_xyz_named_adobe_rgb (SKColorSpaceXyz* xyz) => // void sk_colorspace_xyz_named_display_p3(sk_colorspace_xyz_t* xyz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_named_display_p3 (SKColorSpaceXyz* xyz); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_named_display_p3 (SKColorSpaceXyz* xyz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3449,8 +4645,13 @@ internal static void sk_colorspace_xyz_named_display_p3 (SKColorSpaceXyz* xyz) = // void sk_colorspace_xyz_named_rec2020(sk_colorspace_xyz_t* xyz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_named_rec2020 (SKColorSpaceXyz* xyz); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_named_rec2020 (SKColorSpaceXyz* xyz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3463,8 +4664,13 @@ internal static void sk_colorspace_xyz_named_rec2020 (SKColorSpaceXyz* xyz) => // void sk_colorspace_xyz_named_srgb(sk_colorspace_xyz_t* xyz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_named_srgb (SKColorSpaceXyz* xyz); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_named_srgb (SKColorSpaceXyz* xyz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3477,8 +4683,13 @@ internal static void sk_colorspace_xyz_named_srgb (SKColorSpaceXyz* xyz) => // void sk_colorspace_xyz_named_xyz(sk_colorspace_xyz_t* xyz) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_colorspace_xyz_named_xyz (SKColorSpaceXyz* xyz); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_colorspace_xyz_named_xyz (SKColorSpaceXyz* xyz); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3495,8 +4706,13 @@ internal static void sk_colorspace_xyz_named_xyz (SKColorSpaceXyz* xyz) => // const uint8_t* sk_data_get_bytes(const sk_data_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Byte* sk_data_get_bytes (sk_data_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Byte* sk_data_get_bytes (sk_data_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3509,8 +4725,13 @@ private partial class Delegates { // const void* sk_data_get_data(const sk_data_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_data_get_data (sk_data_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_data_get_data (sk_data_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3523,8 +4744,13 @@ private partial class Delegates { // size_t sk_data_get_size(const sk_data_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_data_get_size (sk_data_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_data_get_size (sk_data_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3537,8 +4763,13 @@ private partial class Delegates { // sk_data_t* sk_data_new_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3551,8 +4782,13 @@ internal static sk_data_t sk_data_new_empty () => // sk_data_t* sk_data_new_from_file(const char* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_from_file (/* char */ void* path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_from_file (/* char */ void* path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3565,8 +4801,13 @@ internal static sk_data_t sk_data_new_from_file (/* char */ void* path) => // sk_data_t* sk_data_new_from_stream(sk_stream_t* stream, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_from_stream (sk_stream_t stream, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_from_stream (sk_stream_t stream, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3579,8 +4820,13 @@ internal static sk_data_t sk_data_new_from_stream (sk_stream_t stream, /* size_t // sk_data_t* sk_data_new_subset(const sk_data_t* src, size_t offset, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_subset (sk_data_t src, /* size_t */ IntPtr offset, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_subset (sk_data_t src, /* size_t */ IntPtr offset, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3593,8 +4839,13 @@ internal static sk_data_t sk_data_new_subset (sk_data_t src, /* size_t */ IntPtr // sk_data_t* sk_data_new_uninitialized(size_t size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_uninitialized (/* size_t */ IntPtr size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_uninitialized (/* size_t */ IntPtr size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3607,8 +4858,13 @@ internal static sk_data_t sk_data_new_uninitialized (/* size_t */ IntPtr size) = // sk_data_t* sk_data_new_with_copy(const void* src, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_with_copy (void* src, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_with_copy (void* src, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3621,8 +4877,13 @@ internal static sk_data_t sk_data_new_with_copy (void* src, /* size_t */ IntPtr // sk_data_t* sk_data_new_with_proc(const void* ptr, size_t length, sk_data_release_proc proc, void* ctx) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_data_new_with_proc (void* ptr, /* size_t */ IntPtr length, void* proc, void* ctx); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_data_new_with_proc (void* ptr, /* size_t */ IntPtr length, SKDataReleaseProxyDelegate proc, void* ctx); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3635,8 +4896,13 @@ internal static sk_data_t sk_data_new_with_proc (void* ptr, /* size_t */ IntPtr // void sk_data_ref(const sk_data_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_data_ref (sk_data_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_data_ref (sk_data_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3649,8 +4915,13 @@ internal static void sk_data_ref (sk_data_t param0) => // void sk_data_unref(const sk_data_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_data_unref (sk_data_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_data_unref (sk_data_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3667,8 +4938,13 @@ internal static void sk_data_unref (sk_data_t param0) => // void sk_document_abort(sk_document_t* document) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_document_abort (sk_document_t document); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_document_abort (sk_document_t document); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3681,8 +4957,13 @@ internal static void sk_document_abort (sk_document_t document) => // sk_canvas_t* sk_document_begin_page(sk_document_t* document, float width, float height, const sk_rect_t* content) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_document_begin_page (sk_document_t document, Single width, Single height, SKRect* content); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_document_begin_page (sk_document_t document, Single width, Single height, SKRect* content); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3695,8 +4976,13 @@ internal static sk_canvas_t sk_document_begin_page (sk_document_t document, Sing // void sk_document_close(sk_document_t* document) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_document_close (sk_document_t document); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_document_close (sk_document_t document); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3709,8 +4995,13 @@ internal static void sk_document_close (sk_document_t document) => // sk_document_t* sk_document_create_pdf_from_stream(sk_wstream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_document_t sk_document_create_pdf_from_stream (sk_wstream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_document_t sk_document_create_pdf_from_stream (sk_wstream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3723,8 +5014,13 @@ internal static sk_document_t sk_document_create_pdf_from_stream (sk_wstream_t s // sk_document_t* sk_document_create_pdf_from_stream_with_metadata(sk_wstream_t* stream, const sk_document_pdf_metadata_t* metadata) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_document_t sk_document_create_pdf_from_stream_with_metadata (sk_wstream_t stream, SKDocumentPdfMetadataInternal* metadata); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_document_t sk_document_create_pdf_from_stream_with_metadata (sk_wstream_t stream, SKDocumentPdfMetadataInternal* metadata); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3737,8 +5033,13 @@ internal static sk_document_t sk_document_create_pdf_from_stream_with_metadata ( // sk_document_t* sk_document_create_xps_from_stream(sk_wstream_t* stream, float dpi) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_document_t sk_document_create_xps_from_stream (sk_wstream_t stream, Single dpi); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_document_t sk_document_create_xps_from_stream (sk_wstream_t stream, Single dpi); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3751,8 +5052,13 @@ internal static sk_document_t sk_document_create_xps_from_stream (sk_wstream_t s // void sk_document_end_page(sk_document_t* document) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_document_end_page (sk_document_t document); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_document_end_page (sk_document_t document); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3765,8 +5071,13 @@ internal static void sk_document_end_page (sk_document_t document) => // void sk_document_unref(sk_document_t* document) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_document_unref (sk_document_t document); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_document_unref (sk_document_t document); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3783,8 +5094,13 @@ internal static void sk_document_unref (sk_document_t document) => // size_t sk_drawable_approximate_bytes_used(sk_drawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_drawable_approximate_bytes_used (sk_drawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_drawable_approximate_bytes_used (sk_drawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3797,8 +5113,13 @@ private partial class Delegates { // void sk_drawable_draw(sk_drawable_t*, sk_canvas_t*, const sk_matrix_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_drawable_draw (sk_drawable_t param0, sk_canvas_t param1, SKMatrix* param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_drawable_draw (sk_drawable_t param0, sk_canvas_t param1, SKMatrix* param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3811,8 +5132,13 @@ internal static void sk_drawable_draw (sk_drawable_t param0, sk_canvas_t param1, // void sk_drawable_get_bounds(sk_drawable_t*, sk_rect_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_drawable_get_bounds (sk_drawable_t param0, SKRect* param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_drawable_get_bounds (sk_drawable_t param0, SKRect* param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3825,8 +5151,13 @@ internal static void sk_drawable_get_bounds (sk_drawable_t param0, SKRect* param // uint32_t sk_drawable_get_generation_id(sk_drawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_drawable_get_generation_id (sk_drawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_drawable_get_generation_id (sk_drawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3839,8 +5170,13 @@ internal static UInt32 sk_drawable_get_generation_id (sk_drawable_t param0) => // sk_picture_t* sk_drawable_new_picture_snapshot(sk_drawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_t sk_drawable_new_picture_snapshot (sk_drawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_t sk_drawable_new_picture_snapshot (sk_drawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3853,8 +5189,13 @@ internal static sk_picture_t sk_drawable_new_picture_snapshot (sk_drawable_t par // void sk_drawable_notify_drawing_changed(sk_drawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_drawable_notify_drawing_changed (sk_drawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_drawable_notify_drawing_changed (sk_drawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3867,8 +5208,13 @@ internal static void sk_drawable_notify_drawing_changed (sk_drawable_t param0) = // void sk_drawable_unref(sk_drawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_drawable_unref (sk_drawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_drawable_unref (sk_drawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3885,8 +5231,13 @@ internal static void sk_drawable_unref (sk_drawable_t param0) => // size_t sk_font_break_text(const sk_font_t* font, const void* text, size_t byteLength, sk_text_encoding_t encoding, float maxWidth, float* measuredWidth, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_font_break_text (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, Single maxWidth, Single* measuredWidth, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_font_break_text (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, Single maxWidth, Single* measuredWidth, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3899,8 +5250,13 @@ private partial class Delegates { // void sk_font_delete(sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_delete (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_delete (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3913,8 +5269,13 @@ internal static void sk_font_delete (sk_font_t font) => // sk_font_edging_t sk_font_get_edging(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKFontEdging sk_font_get_edging (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKFontEdging sk_font_get_edging (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3927,8 +5288,13 @@ internal static SKFontEdging sk_font_get_edging (sk_font_t font) => // sk_font_hinting_t sk_font_get_hinting(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKFontHinting sk_font_get_hinting (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKFontHinting sk_font_get_hinting (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3941,8 +5307,13 @@ internal static SKFontHinting sk_font_get_hinting (sk_font_t font) => // float sk_font_get_metrics(const sk_font_t* font, sk_fontmetrics_t* metrics) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_font_get_metrics (sk_font_t font, SKFontMetrics* metrics); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_font_get_metrics (sk_font_t font, SKFontMetrics* metrics); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3955,9 +5326,15 @@ internal static Single sk_font_get_metrics (sk_font_t font, SKFontMetrics* metri // bool sk_font_get_path(const sk_font_t* font, uint16_t glyph, sk_path_t* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_get_path (sk_font_t font, UInt16 glyph, sk_path_t path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_get_path (sk_font_t font, UInt16 glyph, sk_path_t path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3971,8 +5348,13 @@ internal static bool sk_font_get_path (sk_font_t font, UInt16 glyph, sk_path_t p // void sk_font_get_paths(const sk_font_t* font, uint16_t[-1] glyphs, int count, const sk_glyph_path_proc glyphPathProc, void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_get_paths (sk_font_t font, UInt16* glyphs, Int32 count, void* glyphPathProc, void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_get_paths (sk_font_t font, UInt16* glyphs, Int32 count, SKGlyphPathProxyDelegate glyphPathProc, void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3985,8 +5367,13 @@ internal static void sk_font_get_paths (sk_font_t font, UInt16* glyphs, Int32 co // void sk_font_get_pos(const sk_font_t* font, const uint16_t[-1] glyphs, int count, sk_point_t[-1] pos, sk_point_t* origin) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_get_pos (sk_font_t font, UInt16* glyphs, Int32 count, SKPoint* pos, SKPoint* origin); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_get_pos (sk_font_t font, UInt16* glyphs, Int32 count, SKPoint* pos, SKPoint* origin); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -3999,8 +5386,13 @@ internal static void sk_font_get_pos (sk_font_t font, UInt16* glyphs, Int32 coun // float sk_font_get_scale_x(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_font_get_scale_x (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_font_get_scale_x (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4013,8 +5405,13 @@ internal static Single sk_font_get_scale_x (sk_font_t font) => // float sk_font_get_size(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_font_get_size (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_font_get_size (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4027,8 +5424,13 @@ internal static Single sk_font_get_size (sk_font_t font) => // float sk_font_get_skew_x(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_font_get_skew_x (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_font_get_skew_x (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4041,8 +5443,13 @@ internal static Single sk_font_get_skew_x (sk_font_t font) => // sk_typeface_t* sk_font_get_typeface(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_font_get_typeface (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_font_get_typeface (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4055,8 +5462,13 @@ internal static sk_typeface_t sk_font_get_typeface (sk_font_t font) => // void sk_font_get_widths_bounds(const sk_font_t* font, const uint16_t[-1] glyphs, int count, float[-1] widths, sk_rect_t[-1] bounds, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_get_widths_bounds (sk_font_t font, UInt16* glyphs, Int32 count, Single* widths, SKRect* bounds, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_get_widths_bounds (sk_font_t font, UInt16* glyphs, Int32 count, Single* widths, SKRect* bounds, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4069,8 +5481,13 @@ internal static void sk_font_get_widths_bounds (sk_font_t font, UInt16* glyphs, // void sk_font_get_xpos(const sk_font_t* font, const uint16_t[-1] glyphs, int count, float[-1] xpos, float origin) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_get_xpos (sk_font_t font, UInt16* glyphs, Int32 count, Single* xpos, Single origin); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_get_xpos (sk_font_t font, UInt16* glyphs, Int32 count, Single* xpos, Single origin); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4083,9 +5500,15 @@ internal static void sk_font_get_xpos (sk_font_t font, UInt16* glyphs, Int32 cou // bool sk_font_is_baseline_snap(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_baseline_snap (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_baseline_snap (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4099,9 +5522,15 @@ internal static bool sk_font_is_baseline_snap (sk_font_t font) => // bool sk_font_is_embedded_bitmaps(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_embedded_bitmaps (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_embedded_bitmaps (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4115,9 +5544,15 @@ internal static bool sk_font_is_embedded_bitmaps (sk_font_t font) => // bool sk_font_is_embolden(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_embolden (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_embolden (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4131,9 +5566,15 @@ internal static bool sk_font_is_embolden (sk_font_t font) => // bool sk_font_is_force_auto_hinting(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_force_auto_hinting (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_force_auto_hinting (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4147,9 +5588,15 @@ internal static bool sk_font_is_force_auto_hinting (sk_font_t font) => // bool sk_font_is_linear_metrics(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_linear_metrics (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_linear_metrics (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4163,9 +5610,15 @@ internal static bool sk_font_is_linear_metrics (sk_font_t font) => // bool sk_font_is_subpixel(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_font_is_subpixel (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_font_is_subpixel (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4179,8 +5632,13 @@ internal static bool sk_font_is_subpixel (sk_font_t font) => // float sk_font_measure_text(const sk_font_t* font, const void* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_font_measure_text (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_font_measure_text (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4193,8 +5651,13 @@ internal static Single sk_font_measure_text (sk_font_t font, void* text, /* size // void sk_font_measure_text_no_return(const sk_font_t* font, const void* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const sk_paint_t* paint, float* measuredWidth) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_measure_text_no_return (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint, Single* measuredWidth); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_measure_text_no_return (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t paint, Single* measuredWidth); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4207,8 +5670,13 @@ internal static void sk_font_measure_text_no_return (sk_font_t font, void* text, // sk_font_t* sk_font_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_font_t sk_font_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_font_t sk_font_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4221,8 +5689,13 @@ internal static sk_font_t sk_font_new () => // sk_font_t* sk_font_new_with_values(sk_typeface_t* typeface, float size, float scaleX, float skewX) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_font_t sk_font_new_with_values (sk_typeface_t typeface, Single size, Single scaleX, Single skewX); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_font_t sk_font_new_with_values (sk_typeface_t typeface, Single size, Single scaleX, Single skewX); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4235,8 +5708,13 @@ internal static sk_font_t sk_font_new_with_values (sk_typeface_t typeface, Singl // void sk_font_set_baseline_snap(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_baseline_snap (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_baseline_snap (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4249,8 +5727,13 @@ internal static void sk_font_set_baseline_snap (sk_font_t font, [MarshalAs (Unma // void sk_font_set_edging(sk_font_t* font, sk_font_edging_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_edging (sk_font_t font, SKFontEdging value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_edging (sk_font_t font, SKFontEdging value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4263,8 +5746,13 @@ internal static void sk_font_set_edging (sk_font_t font, SKFontEdging value) => // void sk_font_set_embedded_bitmaps(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_embedded_bitmaps (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_embedded_bitmaps (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4277,8 +5765,13 @@ internal static void sk_font_set_embedded_bitmaps (sk_font_t font, [MarshalAs (U // void sk_font_set_embolden(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_embolden (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_embolden (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4291,8 +5784,13 @@ internal static void sk_font_set_embolden (sk_font_t font, [MarshalAs (Unmanaged // void sk_font_set_force_auto_hinting(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_force_auto_hinting (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_force_auto_hinting (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4305,8 +5803,13 @@ internal static void sk_font_set_force_auto_hinting (sk_font_t font, [MarshalAs // void sk_font_set_hinting(sk_font_t* font, sk_font_hinting_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_hinting (sk_font_t font, SKFontHinting value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_hinting (sk_font_t font, SKFontHinting value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4319,8 +5822,13 @@ internal static void sk_font_set_hinting (sk_font_t font, SKFontHinting value) = // void sk_font_set_linear_metrics(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_linear_metrics (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_linear_metrics (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4333,8 +5841,13 @@ internal static void sk_font_set_linear_metrics (sk_font_t font, [MarshalAs (Unm // void sk_font_set_scale_x(sk_font_t* font, float value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_scale_x (sk_font_t font, Single value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_scale_x (sk_font_t font, Single value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4347,8 +5860,13 @@ internal static void sk_font_set_scale_x (sk_font_t font, Single value) => // void sk_font_set_size(sk_font_t* font, float value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_size (sk_font_t font, Single value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_size (sk_font_t font, Single value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4361,8 +5879,13 @@ internal static void sk_font_set_size (sk_font_t font, Single value) => // void sk_font_set_skew_x(sk_font_t* font, float value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_skew_x (sk_font_t font, Single value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_skew_x (sk_font_t font, Single value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4375,8 +5898,13 @@ internal static void sk_font_set_skew_x (sk_font_t font, Single value) => // void sk_font_set_subpixel(sk_font_t* font, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_subpixel (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_subpixel (sk_font_t font, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4389,8 +5917,13 @@ internal static void sk_font_set_subpixel (sk_font_t font, [MarshalAs (Unmanaged // void sk_font_set_typeface(sk_font_t* font, sk_typeface_t* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_set_typeface (sk_font_t font, sk_typeface_t value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_set_typeface (sk_font_t font, sk_typeface_t value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4403,8 +5936,13 @@ internal static void sk_font_set_typeface (sk_font_t font, sk_typeface_t value) // int sk_font_text_to_glyphs(const sk_font_t* font, const void* text, size_t byteLength, sk_text_encoding_t encoding, uint16_t[-1] glyphs, int maxGlyphCount) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_font_text_to_glyphs (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, UInt16* glyphs, Int32 maxGlyphCount); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_font_text_to_glyphs (sk_font_t font, void* text, /* size_t */ IntPtr byteLength, SKTextEncoding encoding, UInt16* glyphs, Int32 maxGlyphCount); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4417,8 +5955,13 @@ internal static Int32 sk_font_text_to_glyphs (sk_font_t font, void* text, /* siz // uint16_t sk_font_unichar_to_glyph(const sk_font_t* font, int32_t uni) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt16 sk_font_unichar_to_glyph (sk_font_t font, Int32 uni); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt16 sk_font_unichar_to_glyph (sk_font_t font, Int32 uni); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4431,8 +5974,13 @@ internal static UInt16 sk_font_unichar_to_glyph (sk_font_t font, Int32 uni) => // void sk_font_unichars_to_glyphs(const sk_font_t* font, const int32_t[-1] uni, int count, uint16_t[-1] glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_font_unichars_to_glyphs (sk_font_t font, Int32* uni, Int32 count, UInt16* glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_font_unichars_to_glyphs (sk_font_t font, Int32* uni, Int32 count, UInt16* glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4445,8 +5993,13 @@ internal static void sk_font_unichars_to_glyphs (sk_font_t font, Int32* uni, Int // void sk_text_utils_get_path(const void* text, size_t length, sk_text_encoding_t encoding, float x, float y, const sk_font_t* font, sk_path_t* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_text_utils_get_path (void* text, /* size_t */ IntPtr length, SKTextEncoding encoding, Single x, Single y, sk_font_t font, sk_path_t path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_text_utils_get_path (void* text, /* size_t */ IntPtr length, SKTextEncoding encoding, Single x, Single y, sk_font_t font, sk_path_t path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4459,8 +6012,13 @@ internal static void sk_text_utils_get_path (void* text, /* size_t */ IntPtr len // void sk_text_utils_get_pos_path(const void* text, size_t length, sk_text_encoding_t encoding, const sk_point_t[-1] pos, const sk_font_t* font, sk_path_t* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_text_utils_get_pos_path (void* text, /* size_t */ IntPtr length, SKTextEncoding encoding, SKPoint* pos, sk_font_t font, sk_path_t path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_text_utils_get_pos_path (void* text, /* size_t */ IntPtr length, SKTextEncoding encoding, SKPoint* pos, sk_font_t font, sk_path_t path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4477,8 +6035,13 @@ internal static void sk_text_utils_get_pos_path (void* text, /* size_t */ IntPtr // sk_colortype_t sk_colortype_get_default_8888() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKColorTypeNative sk_colortype_get_default_8888 (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKColorTypeNative sk_colortype_get_default_8888 (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4491,8 +6054,13 @@ internal static SKColorTypeNative sk_colortype_get_default_8888 () => // int sk_nvrefcnt_get_ref_count(const sk_nvrefcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_nvrefcnt_get_ref_count (sk_nvrefcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_nvrefcnt_get_ref_count (sk_nvrefcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4505,8 +6073,13 @@ internal static Int32 sk_nvrefcnt_get_ref_count (sk_nvrefcnt_t refcnt) => // void sk_nvrefcnt_safe_ref(sk_nvrefcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nvrefcnt_safe_ref (sk_nvrefcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nvrefcnt_safe_ref (sk_nvrefcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4519,8 +6092,13 @@ internal static void sk_nvrefcnt_safe_ref (sk_nvrefcnt_t refcnt) => // void sk_nvrefcnt_safe_unref(sk_nvrefcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_nvrefcnt_safe_unref (sk_nvrefcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_nvrefcnt_safe_unref (sk_nvrefcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4533,9 +6111,15 @@ internal static void sk_nvrefcnt_safe_unref (sk_nvrefcnt_t refcnt) => // bool sk_nvrefcnt_unique(const sk_nvrefcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_nvrefcnt_unique (sk_nvrefcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_nvrefcnt_unique (sk_nvrefcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4549,8 +6133,13 @@ internal static bool sk_nvrefcnt_unique (sk_nvrefcnt_t refcnt) => // int sk_refcnt_get_ref_count(const sk_refcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_refcnt_get_ref_count (sk_refcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_refcnt_get_ref_count (sk_refcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4563,8 +6152,13 @@ internal static Int32 sk_refcnt_get_ref_count (sk_refcnt_t refcnt) => // void sk_refcnt_safe_ref(sk_refcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_refcnt_safe_ref (sk_refcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_refcnt_safe_ref (sk_refcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4577,8 +6171,13 @@ internal static void sk_refcnt_safe_ref (sk_refcnt_t refcnt) => // void sk_refcnt_safe_unref(sk_refcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_refcnt_safe_unref (sk_refcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_refcnt_safe_unref (sk_refcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4591,9 +6190,15 @@ internal static void sk_refcnt_safe_unref (sk_refcnt_t refcnt) => // bool sk_refcnt_unique(const sk_refcnt_t* refcnt) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_refcnt_unique (sk_refcnt_t refcnt); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_refcnt_unique (sk_refcnt_t refcnt); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4607,8 +6212,13 @@ internal static bool sk_refcnt_unique (sk_refcnt_t refcnt) => // int sk_version_get_increment() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_version_get_increment (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_version_get_increment (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4621,8 +6231,13 @@ internal static Int32 sk_version_get_increment () => // int sk_version_get_milestone() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_version_get_milestone (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_version_get_milestone (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4635,8 +6250,13 @@ internal static Int32 sk_version_get_milestone () => // const char* sk_version_get_string() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* char */ void* sk_version_get_string (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* sk_version_get_string (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4653,8 +6273,13 @@ private partial class Delegates { // void sk_graphics_dump_memory_statistics(sk_tracememorydump_t* dump) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_graphics_dump_memory_statistics (sk_tracememorydump_t dump); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_graphics_dump_memory_statistics (sk_tracememorydump_t dump); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4667,8 +6292,13 @@ internal static void sk_graphics_dump_memory_statistics (sk_tracememorydump_t du // int sk_graphics_get_font_cache_count_limit() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_graphics_get_font_cache_count_limit (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_graphics_get_font_cache_count_limit (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4681,8 +6311,13 @@ internal static Int32 sk_graphics_get_font_cache_count_limit () => // int sk_graphics_get_font_cache_count_used() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_graphics_get_font_cache_count_used (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_graphics_get_font_cache_count_used (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4695,8 +6330,13 @@ internal static Int32 sk_graphics_get_font_cache_count_used () => // size_t sk_graphics_get_font_cache_limit() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_get_font_cache_limit (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_get_font_cache_limit (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4709,8 +6349,13 @@ private partial class Delegates { // size_t sk_graphics_get_font_cache_used() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_get_font_cache_used (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_get_font_cache_used (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4723,8 +6368,13 @@ private partial class Delegates { // size_t sk_graphics_get_resource_cache_single_allocation_byte_limit() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_get_resource_cache_single_allocation_byte_limit (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_get_resource_cache_single_allocation_byte_limit (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4737,8 +6387,13 @@ private partial class Delegates { // size_t sk_graphics_get_resource_cache_total_byte_limit() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_get_resource_cache_total_byte_limit (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_get_resource_cache_total_byte_limit (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4751,8 +6406,13 @@ private partial class Delegates { // size_t sk_graphics_get_resource_cache_total_bytes_used() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_get_resource_cache_total_bytes_used (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_get_resource_cache_total_bytes_used (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4765,8 +6425,13 @@ private partial class Delegates { // void sk_graphics_init() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_graphics_init (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_graphics_init (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4779,8 +6444,13 @@ internal static void sk_graphics_init () => // void sk_graphics_purge_all_caches() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_graphics_purge_all_caches (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_graphics_purge_all_caches (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4793,8 +6463,13 @@ internal static void sk_graphics_purge_all_caches () => // void sk_graphics_purge_font_cache() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_graphics_purge_font_cache (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_graphics_purge_font_cache (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4807,8 +6482,13 @@ internal static void sk_graphics_purge_font_cache () => // void sk_graphics_purge_resource_cache() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_graphics_purge_resource_cache (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_graphics_purge_resource_cache (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4821,8 +6501,13 @@ internal static void sk_graphics_purge_resource_cache () => // int sk_graphics_set_font_cache_count_limit(int count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_graphics_set_font_cache_count_limit (Int32 count); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_graphics_set_font_cache_count_limit (Int32 count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4835,8 +6520,13 @@ internal static Int32 sk_graphics_set_font_cache_count_limit (Int32 count) => // size_t sk_graphics_set_font_cache_limit(size_t bytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_set_font_cache_limit (/* size_t */ IntPtr bytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_set_font_cache_limit (/* size_t */ IntPtr bytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4849,8 +6539,13 @@ private partial class Delegates { // size_t sk_graphics_set_resource_cache_single_allocation_byte_limit(size_t newLimit) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_set_resource_cache_single_allocation_byte_limit (/* size_t */ IntPtr newLimit); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_set_resource_cache_single_allocation_byte_limit (/* size_t */ IntPtr newLimit); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4863,8 +6558,13 @@ private partial class Delegates { // size_t sk_graphics_set_resource_cache_total_byte_limit(size_t newLimit) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_graphics_set_resource_cache_total_byte_limit (/* size_t */ IntPtr newLimit); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_graphics_set_resource_cache_total_byte_limit (/* size_t */ IntPtr newLimit); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4881,8 +6581,13 @@ private partial class Delegates { // sk_alphatype_t sk_image_get_alpha_type(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKAlphaType sk_image_get_alpha_type (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKAlphaType sk_image_get_alpha_type (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4895,8 +6600,13 @@ internal static SKAlphaType sk_image_get_alpha_type (sk_image_t image) => // sk_colortype_t sk_image_get_color_type(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKColorTypeNative sk_image_get_color_type (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKColorTypeNative sk_image_get_color_type (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4909,8 +6619,13 @@ internal static SKColorTypeNative sk_image_get_color_type (sk_image_t image) => // sk_colorspace_t* sk_image_get_colorspace(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_image_get_colorspace (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_image_get_colorspace (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4923,8 +6638,13 @@ internal static sk_colorspace_t sk_image_get_colorspace (sk_image_t image) => // int sk_image_get_height(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_image_get_height (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_image_get_height (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4937,8 +6657,13 @@ internal static Int32 sk_image_get_height (sk_image_t cimage) => // uint32_t sk_image_get_unique_id(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_image_get_unique_id (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_image_get_unique_id (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4951,8 +6676,13 @@ internal static UInt32 sk_image_get_unique_id (sk_image_t cimage) => // int sk_image_get_width(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_image_get_width (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_image_get_width (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4965,9 +6695,15 @@ internal static Int32 sk_image_get_width (sk_image_t cimage) => // bool sk_image_is_alpha_only(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_is_alpha_only (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_is_alpha_only (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4981,9 +6717,15 @@ internal static bool sk_image_is_alpha_only (sk_image_t image) => // bool sk_image_is_lazy_generated(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_is_lazy_generated (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_is_lazy_generated (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -4997,9 +6739,15 @@ internal static bool sk_image_is_lazy_generated (sk_image_t image) => // bool sk_image_is_texture_backed(const sk_image_t* image) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_is_texture_backed (sk_image_t image); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_is_texture_backed (sk_image_t image); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5013,9 +6761,15 @@ internal static bool sk_image_is_texture_backed (sk_image_t image) => // bool sk_image_is_valid(const sk_image_t* image, gr_recording_context_t* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_is_valid (sk_image_t image, gr_recording_context_t context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_is_valid (sk_image_t image, gr_recording_context_t context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5029,8 +6783,13 @@ internal static bool sk_image_is_valid (sk_image_t image, gr_recording_context_t // sk_image_t* sk_image_make_non_texture_image(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_non_texture_image (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_non_texture_image (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5043,8 +6802,13 @@ internal static sk_image_t sk_image_make_non_texture_image (sk_image_t cimage) = // sk_image_t* sk_image_make_raster_image(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_raster_image (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_raster_image (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5057,8 +6821,13 @@ internal static sk_image_t sk_image_make_raster_image (sk_image_t cimage) => // sk_shader_t* sk_image_make_raw_shader(const sk_image_t* image, sk_shader_tilemode_t tileX, sk_shader_tilemode_t tileY, const sk_sampling_options_t* sampling, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_image_make_raw_shader (sk_image_t image, SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_image_make_raw_shader (sk_image_t image, SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5071,8 +6840,13 @@ internal static sk_shader_t sk_image_make_raw_shader (sk_image_t image, SKShader // sk_shader_t* sk_image_make_shader(const sk_image_t* image, sk_shader_tilemode_t tileX, sk_shader_tilemode_t tileY, const sk_sampling_options_t* sampling, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_image_make_shader (sk_image_t image, SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_image_make_shader (sk_image_t image, SKShaderTileMode tileX, SKShaderTileMode tileY, SKSamplingOptions* sampling, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5085,8 +6859,13 @@ internal static sk_shader_t sk_image_make_shader (sk_image_t image, SKShaderTile // sk_image_t* sk_image_make_subset(const sk_image_t* cimage, gr_direct_context_t* context, const sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_subset (sk_image_t cimage, gr_direct_context_t context, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_subset (sk_image_t cimage, gr_direct_context_t context, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5099,8 +6878,13 @@ internal static sk_image_t sk_image_make_subset (sk_image_t cimage, gr_direct_co // sk_image_t* sk_image_make_subset_raster(const sk_image_t* cimage, const sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_subset_raster (sk_image_t cimage, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_subset_raster (sk_image_t cimage, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5113,8 +6897,13 @@ internal static sk_image_t sk_image_make_subset_raster (sk_image_t cimage, SKRec // sk_image_t* sk_image_make_texture_image(const sk_image_t* cimage, gr_direct_context_t* context, bool mipmapped, bool budgeted) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_texture_image (sk_image_t cimage, gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool mipmapped, [MarshalAs (UnmanagedType.I1)] bool budgeted); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_texture_image (sk_image_t cimage, gr_direct_context_t context, [MarshalAs (UnmanagedType.I1)] bool mipmapped, [MarshalAs (UnmanagedType.I1)] bool budgeted); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5127,8 +6916,13 @@ internal static sk_image_t sk_image_make_texture_image (sk_image_t cimage, gr_di // sk_image_t* sk_image_make_with_filter(const sk_image_t* cimage, gr_recording_context_t* context, const sk_imagefilter_t* filter, const sk_irect_t* subset, const sk_irect_t* clipBounds, sk_irect_t* outSubset, sk_ipoint_t* outOffset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_with_filter (sk_image_t cimage, gr_recording_context_t context, sk_imagefilter_t filter, SKRectI* subset, SKRectI* clipBounds, SKRectI* outSubset, SKPointI* outOffset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_with_filter (sk_image_t cimage, gr_recording_context_t context, sk_imagefilter_t filter, SKRectI* subset, SKRectI* clipBounds, SKRectI* outSubset, SKPointI* outOffset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5141,8 +6935,13 @@ internal static sk_image_t sk_image_make_with_filter (sk_image_t cimage, gr_reco // sk_image_t* sk_image_make_with_filter_raster(const sk_image_t* cimage, const sk_imagefilter_t* filter, const sk_irect_t* subset, const sk_irect_t* clipBounds, sk_irect_t* outSubset, sk_ipoint_t* outOffset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_make_with_filter_raster (sk_image_t cimage, sk_imagefilter_t filter, SKRectI* subset, SKRectI* clipBounds, SKRectI* outSubset, SKPointI* outOffset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_make_with_filter_raster (sk_image_t cimage, sk_imagefilter_t filter, SKRectI* subset, SKRectI* clipBounds, SKRectI* outSubset, SKPointI* outOffset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5155,8 +6954,13 @@ internal static sk_image_t sk_image_make_with_filter_raster (sk_image_t cimage, // sk_image_t* sk_image_new_from_adopted_texture(gr_recording_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, const sk_colorspace_t* colorSpace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_from_adopted_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t colorSpace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_from_adopted_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t colorSpace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5169,8 +6973,13 @@ internal static sk_image_t sk_image_new_from_adopted_texture (gr_recording_conte // sk_image_t* sk_image_new_from_bitmap(const sk_bitmap_t* cbitmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_from_bitmap (sk_bitmap_t cbitmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_from_bitmap (sk_bitmap_t cbitmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5183,8 +6992,13 @@ internal static sk_image_t sk_image_new_from_bitmap (sk_bitmap_t cbitmap) => // sk_image_t* sk_image_new_from_encoded(const sk_data_t* cdata) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_from_encoded (sk_data_t cdata); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_from_encoded (sk_data_t cdata); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5197,8 +7011,13 @@ internal static sk_image_t sk_image_new_from_encoded (sk_data_t cdata) => // sk_image_t* sk_image_new_from_picture(sk_picture_t* picture, const sk_isize_t* dimensions, const sk_matrix_t* cmatrix, const sk_paint_t* paint, bool useFloatingPointBitDepth, const sk_colorspace_t* colorSpace, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_from_picture (sk_picture_t picture, SKSizeI* dimensions, SKMatrix* cmatrix, sk_paint_t paint, [MarshalAs (UnmanagedType.I1)] bool useFloatingPointBitDepth, sk_colorspace_t colorSpace, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_from_picture (sk_picture_t picture, SKSizeI* dimensions, SKMatrix* cmatrix, sk_paint_t paint, [MarshalAs (UnmanagedType.I1)] bool useFloatingPointBitDepth, sk_colorspace_t colorSpace, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5211,8 +7030,13 @@ internal static sk_image_t sk_image_new_from_picture (sk_picture_t picture, SKSi // sk_image_t* sk_image_new_from_texture(gr_recording_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, const sk_colorspace_t* colorSpace, const sk_image_texture_release_proc releaseProc, void* releaseContext) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_from_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t colorSpace, void* releaseProc, void* releaseContext); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_from_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t colorSpace, SKImageTextureReleaseProxyDelegate releaseProc, void* releaseContext); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5225,8 +7049,13 @@ internal static sk_image_t sk_image_new_from_texture (gr_recording_context_t con // sk_image_t* sk_image_new_raster(const sk_pixmap_t* pixmap, sk_image_raster_release_proc releaseProc, void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_raster (sk_pixmap_t pixmap, void* releaseProc, void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_raster (sk_pixmap_t pixmap, SKImageRasterReleaseProxyDelegate releaseProc, void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5239,8 +7068,13 @@ internal static sk_image_t sk_image_new_raster (sk_pixmap_t pixmap, SKImageRaste // sk_image_t* sk_image_new_raster_copy(const sk_imageinfo_t* cinfo, const void* pixels, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_raster_copy (SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_raster_copy (SKImageInfoNative* cinfo, void* pixels, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5253,8 +7087,13 @@ internal static sk_image_t sk_image_new_raster_copy (SKImageInfoNative* cinfo, v // sk_image_t* sk_image_new_raster_copy_with_pixmap(const sk_pixmap_t* pixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_raster_copy_with_pixmap (sk_pixmap_t pixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_raster_copy_with_pixmap (sk_pixmap_t pixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5267,8 +7106,13 @@ internal static sk_image_t sk_image_new_raster_copy_with_pixmap (sk_pixmap_t pix // sk_image_t* sk_image_new_raster_data(const sk_imageinfo_t* cinfo, sk_data_t* pixels, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_image_new_raster_data (SKImageInfoNative* cinfo, sk_data_t pixels, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_image_new_raster_data (SKImageInfoNative* cinfo, sk_data_t pixels, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5281,9 +7125,15 @@ internal static sk_image_t sk_image_new_raster_data (SKImageInfoNative* cinfo, s // bool sk_image_peek_pixels(const sk_image_t* image, sk_pixmap_t* pixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_peek_pixels (sk_image_t image, sk_pixmap_t pixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_peek_pixels (sk_image_t image, sk_pixmap_t pixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5297,9 +7147,15 @@ internal static bool sk_image_peek_pixels (sk_image_t image, sk_pixmap_t pixmap) // bool sk_image_read_pixels(const sk_image_t* image, const sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY, sk_image_caching_hint_t cachingHint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_read_pixels (sk_image_t image, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY, SKImageCachingHint cachingHint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_read_pixels (sk_image_t image, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY, SKImageCachingHint cachingHint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5313,9 +7169,15 @@ internal static bool sk_image_read_pixels (sk_image_t image, SKImageInfoNative* // bool sk_image_read_pixels_into_pixmap(const sk_image_t* image, const sk_pixmap_t* dst, int srcX, int srcY, sk_image_caching_hint_t cachingHint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_read_pixels_into_pixmap (sk_image_t image, sk_pixmap_t dst, Int32 srcX, Int32 srcY, SKImageCachingHint cachingHint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_read_pixels_into_pixmap (sk_image_t image, sk_pixmap_t dst, Int32 srcX, Int32 srcY, SKImageCachingHint cachingHint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5329,8 +7191,13 @@ internal static bool sk_image_read_pixels_into_pixmap (sk_image_t image, sk_pixm // void sk_image_ref(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_image_ref (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_image_ref (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5343,8 +7210,13 @@ internal static void sk_image_ref (sk_image_t cimage) => // sk_data_t* sk_image_ref_encoded(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_image_ref_encoded (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_image_ref_encoded (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5357,9 +7229,15 @@ internal static sk_data_t sk_image_ref_encoded (sk_image_t cimage) => // bool sk_image_scale_pixels(const sk_image_t* image, const sk_pixmap_t* dst, const sk_sampling_options_t* sampling, sk_image_caching_hint_t cachingHint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_image_scale_pixels (sk_image_t image, sk_pixmap_t dst, SKSamplingOptions* sampling, SKImageCachingHint cachingHint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_image_scale_pixels (sk_image_t image, sk_pixmap_t dst, SKSamplingOptions* sampling, SKImageCachingHint cachingHint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5373,8 +7251,13 @@ internal static bool sk_image_scale_pixels (sk_image_t image, sk_pixmap_t dst, S // void sk_image_unref(const sk_image_t* cimage) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_image_unref (sk_image_t cimage); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_image_unref (sk_image_t cimage); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5391,8 +7274,13 @@ internal static void sk_image_unref (sk_image_t cimage) => // sk_imagefilter_t* sk_imagefilter_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePMColor, const sk_imagefilter_t* background, const sk_imagefilter_t* foreground, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_arithmetic (Single k1, Single k2, Single k3, Single k4, [MarshalAs (UnmanagedType.I1)] bool enforcePMColor, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_arithmetic (Single k1, Single k2, Single k3, Single k4, [MarshalAs (UnmanagedType.I1)] bool enforcePMColor, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5405,8 +7293,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_arithmetic (Single k1, Singl // sk_imagefilter_t* sk_imagefilter_new_blend(sk_blendmode_t mode, const sk_imagefilter_t* background, const sk_imagefilter_t* foreground, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_blend (SKBlendMode mode, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_blend (SKBlendMode mode, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5419,8 +7312,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_blend (SKBlendMode mode, sk_ // sk_imagefilter_t* sk_imagefilter_new_blender(sk_blender_t* blender, const sk_imagefilter_t* background, const sk_imagefilter_t* foreground, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_blender (sk_blender_t blender, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_blender (sk_blender_t blender, sk_imagefilter_t background, sk_imagefilter_t foreground, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5433,8 +7331,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_blender (sk_blender_t blende // sk_imagefilter_t* sk_imagefilter_new_blur(float sigmaX, float sigmaY, sk_shader_tilemode_t tileMode, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_blur (Single sigmaX, Single sigmaY, SKShaderTileMode tileMode, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_blur (Single sigmaX, Single sigmaY, SKShaderTileMode tileMode, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5447,8 +7350,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_blur (Single sigmaX, Single // sk_imagefilter_t* sk_imagefilter_new_color_filter(sk_colorfilter_t* cf, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_color_filter (sk_colorfilter_t cf, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_color_filter (sk_colorfilter_t cf, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5461,8 +7369,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_color_filter (sk_colorfilter // sk_imagefilter_t* sk_imagefilter_new_compose(const sk_imagefilter_t* outer, const sk_imagefilter_t* inner) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_compose (sk_imagefilter_t outer, sk_imagefilter_t inner); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_compose (sk_imagefilter_t outer, sk_imagefilter_t inner); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5475,8 +7388,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_compose (sk_imagefilter_t ou // sk_imagefilter_t* sk_imagefilter_new_dilate(float radiusX, float radiusY, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_dilate (Single radiusX, Single radiusY, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_dilate (Single radiusX, Single radiusY, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5489,8 +7407,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_dilate (Single radiusX, Sing // sk_imagefilter_t* sk_imagefilter_new_displacement_map_effect(sk_color_channel_t xChannelSelector, sk_color_channel_t yChannelSelector, float scale, const sk_imagefilter_t* displacement, const sk_imagefilter_t* color, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_displacement_map_effect (SKColorChannel xChannelSelector, SKColorChannel yChannelSelector, Single scale, sk_imagefilter_t displacement, sk_imagefilter_t color, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_displacement_map_effect (SKColorChannel xChannelSelector, SKColorChannel yChannelSelector, Single scale, sk_imagefilter_t displacement, sk_imagefilter_t color, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5503,8 +7426,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_displacement_map_effect (SKC // sk_imagefilter_t* sk_imagefilter_new_distant_lit_diffuse(const sk_point3_t* direction, sk_color_t lightColor, float surfaceScale, float kd, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_distant_lit_diffuse (SKPoint3* direction, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_distant_lit_diffuse (SKPoint3* direction, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5517,8 +7445,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_distant_lit_diffuse (SKPoint // sk_imagefilter_t* sk_imagefilter_new_distant_lit_specular(const sk_point3_t* direction, sk_color_t lightColor, float surfaceScale, float ks, float shininess, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_distant_lit_specular (SKPoint3* direction, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_distant_lit_specular (SKPoint3* direction, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5531,8 +7464,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_distant_lit_specular (SKPoin // sk_imagefilter_t* sk_imagefilter_new_drop_shadow(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_drop_shadow (Single dx, Single dy, Single sigmaX, Single sigmaY, UInt32 color, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_drop_shadow (Single dx, Single dy, Single sigmaX, Single sigmaY, UInt32 color, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5545,8 +7483,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_drop_shadow (Single dx, Sing // sk_imagefilter_t* sk_imagefilter_new_drop_shadow_only(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_drop_shadow_only (Single dx, Single dy, Single sigmaX, Single sigmaY, UInt32 color, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_drop_shadow_only (Single dx, Single dy, Single sigmaX, Single sigmaY, UInt32 color, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5559,8 +7502,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_drop_shadow_only (Single dx, // sk_imagefilter_t* sk_imagefilter_new_erode(float radiusX, float radiusY, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_erode (Single radiusX, Single radiusY, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_erode (Single radiusX, Single radiusY, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5573,8 +7521,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_erode (Single radiusX, Singl // sk_imagefilter_t* sk_imagefilter_new_image(sk_image_t* image, const sk_rect_t* srcRect, const sk_rect_t* dstRect, const sk_sampling_options_t* sampling) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_image (sk_image_t image, SKRect* srcRect, SKRect* dstRect, SKSamplingOptions* sampling); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_image (sk_image_t image, SKRect* srcRect, SKRect* dstRect, SKSamplingOptions* sampling); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5587,8 +7540,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_image (sk_image_t image, SKR // sk_imagefilter_t* sk_imagefilter_new_image_simple(sk_image_t* image, const sk_sampling_options_t* sampling) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_image_simple (sk_image_t image, SKSamplingOptions* sampling); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_image_simple (sk_image_t image, SKSamplingOptions* sampling); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5601,8 +7559,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_image_simple (sk_image_t ima // sk_imagefilter_t* sk_imagefilter_new_magnifier(const sk_rect_t* lensBounds, float zoomAmount, float inset, const sk_sampling_options_t* sampling, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_magnifier (SKRect* lensBounds, Single zoomAmount, Single inset, SKSamplingOptions* sampling, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_magnifier (SKRect* lensBounds, Single zoomAmount, Single inset, SKSamplingOptions* sampling, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5615,8 +7578,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_magnifier (SKRect* lensBound // sk_imagefilter_t* sk_imagefilter_new_matrix_convolution(const sk_isize_t* kernelSize, const float[-1] kernel, float gain, float bias, const sk_ipoint_t* kernelOffset, sk_shader_tilemode_t ctileMode, bool convolveAlpha, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_matrix_convolution (SKSizeI* kernelSize, Single* kernel, Single gain, Single bias, SKPointI* kernelOffset, SKShaderTileMode ctileMode, [MarshalAs (UnmanagedType.I1)] bool convolveAlpha, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_matrix_convolution (SKSizeI* kernelSize, Single* kernel, Single gain, Single bias, SKPointI* kernelOffset, SKShaderTileMode ctileMode, [MarshalAs (UnmanagedType.I1)] bool convolveAlpha, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5629,8 +7597,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_matrix_convolution (SKSizeI* // sk_imagefilter_t* sk_imagefilter_new_matrix_transform(const sk_matrix_t* cmatrix, const sk_sampling_options_t* sampling, const sk_imagefilter_t* input) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_matrix_transform (SKMatrix* cmatrix, SKSamplingOptions* sampling, sk_imagefilter_t input); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_matrix_transform (SKMatrix* cmatrix, SKSamplingOptions* sampling, sk_imagefilter_t input); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5643,8 +7616,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_matrix_transform (SKMatrix* // sk_imagefilter_t* sk_imagefilter_new_merge(const sk_imagefilter_t*[-1] cfilters, int count, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_merge (sk_imagefilter_t* cfilters, Int32 count, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_merge (sk_imagefilter_t* cfilters, Int32 count, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5657,8 +7635,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_merge (sk_imagefilter_t* cfi // sk_imagefilter_t* sk_imagefilter_new_merge_simple(const sk_imagefilter_t* first, const sk_imagefilter_t* second, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_merge_simple (sk_imagefilter_t first, sk_imagefilter_t second, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_merge_simple (sk_imagefilter_t first, sk_imagefilter_t second, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5671,8 +7654,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_merge_simple (sk_imagefilter // sk_imagefilter_t* sk_imagefilter_new_offset(float dx, float dy, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_offset (Single dx, Single dy, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_offset (Single dx, Single dy, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5685,8 +7673,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_offset (Single dx, Single dy // sk_imagefilter_t* sk_imagefilter_new_picture(const sk_picture_t* picture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_picture (sk_picture_t picture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_picture (sk_picture_t picture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5699,8 +7692,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_picture (sk_picture_t pictur // sk_imagefilter_t* sk_imagefilter_new_picture_with_rect(const sk_picture_t* picture, const sk_rect_t* targetRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_picture_with_rect (sk_picture_t picture, SKRect* targetRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_picture_with_rect (sk_picture_t picture, SKRect* targetRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5713,8 +7711,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_picture_with_rect (sk_pictur // sk_imagefilter_t* sk_imagefilter_new_point_lit_diffuse(const sk_point3_t* location, sk_color_t lightColor, float surfaceScale, float kd, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_point_lit_diffuse (SKPoint3* location, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_point_lit_diffuse (SKPoint3* location, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5727,8 +7730,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_point_lit_diffuse (SKPoint3* // sk_imagefilter_t* sk_imagefilter_new_point_lit_specular(const sk_point3_t* location, sk_color_t lightColor, float surfaceScale, float ks, float shininess, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_point_lit_specular (SKPoint3* location, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_point_lit_specular (SKPoint3* location, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5741,8 +7749,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_point_lit_specular (SKPoint3 // sk_imagefilter_t* sk_imagefilter_new_shader(const sk_shader_t* shader, bool dither, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_shader (sk_shader_t shader, [MarshalAs (UnmanagedType.I1)] bool dither, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_shader (sk_shader_t shader, [MarshalAs (UnmanagedType.I1)] bool dither, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5755,8 +7768,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_shader (sk_shader_t shader, // sk_imagefilter_t* sk_imagefilter_new_spot_lit_diffuse(const sk_point3_t* location, const sk_point3_t* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float kd, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_spot_lit_diffuse (SKPoint3* location, SKPoint3* target, Single specularExponent, Single cutoffAngle, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_spot_lit_diffuse (SKPoint3* location, SKPoint3* target, Single specularExponent, Single cutoffAngle, UInt32 lightColor, Single surfaceScale, Single kd, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5769,8 +7787,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_spot_lit_diffuse (SKPoint3* // sk_imagefilter_t* sk_imagefilter_new_spot_lit_specular(const sk_point3_t* location, const sk_point3_t* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float ks, float shininess, const sk_imagefilter_t* input, const sk_rect_t* cropRect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_spot_lit_specular (SKPoint3* location, SKPoint3* target, Single specularExponent, Single cutoffAngle, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_spot_lit_specular (SKPoint3* location, SKPoint3* target, Single specularExponent, Single cutoffAngle, UInt32 lightColor, Single surfaceScale, Single ks, Single shininess, sk_imagefilter_t input, SKRect* cropRect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5783,8 +7806,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_spot_lit_specular (SKPoint3* // sk_imagefilter_t* sk_imagefilter_new_tile(const sk_rect_t* src, const sk_rect_t* dst, const sk_imagefilter_t* input) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_imagefilter_new_tile (SKRect* src, SKRect* dst, sk_imagefilter_t input); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_imagefilter_new_tile (SKRect* src, SKRect* dst, sk_imagefilter_t input); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5797,8 +7825,13 @@ internal static sk_imagefilter_t sk_imagefilter_new_tile (SKRect* src, SKRect* d // void sk_imagefilter_unref(sk_imagefilter_t* cfilter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_imagefilter_unref (sk_imagefilter_t cfilter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_imagefilter_unref (sk_imagefilter_t cfilter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5815,8 +7848,13 @@ internal static void sk_imagefilter_unref (sk_imagefilter_t cfilter) => // void sk_linker_keep_alive() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_linker_keep_alive (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_linker_keep_alive (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5833,8 +7871,13 @@ internal static void sk_linker_keep_alive () => // sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_blur (SKBlurStyle param0, Single sigma); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_blur (SKBlurStyle param0, Single sigma); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5847,8 +7890,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_blur (SKBlurStyle param0, Sing // sk_maskfilter_t* sk_maskfilter_new_blur_with_flags(sk_blurstyle_t, float sigma, bool respectCTM) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_blur_with_flags (SKBlurStyle param0, Single sigma, [MarshalAs (UnmanagedType.I1)] bool respectCTM); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_blur_with_flags (SKBlurStyle param0, Single sigma, [MarshalAs (UnmanagedType.I1)] bool respectCTM); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5861,8 +7909,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_blur_with_flags (SKBlurStyle p // sk_maskfilter_t* sk_maskfilter_new_clip(uint8_t min, uint8_t max) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_clip (Byte min, Byte max); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_clip (Byte min, Byte max); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5875,8 +7928,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_clip (Byte min, Byte max) => // sk_maskfilter_t* sk_maskfilter_new_gamma(float gamma) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_gamma (Single gamma); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_gamma (Single gamma); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5889,8 +7947,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_gamma (Single gamma) => // sk_maskfilter_t* sk_maskfilter_new_shader(sk_shader_t* cshader) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_shader (sk_shader_t cshader); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_shader (sk_shader_t cshader); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5903,8 +7966,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_shader (sk_shader_t cshader) = // sk_maskfilter_t* sk_maskfilter_new_table(const uint8_t[256] table = 256) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_maskfilter_new_table (Byte* table); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_maskfilter_new_table (Byte* table); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5917,8 +7985,13 @@ internal static sk_maskfilter_t sk_maskfilter_new_table (Byte* table) => // void sk_maskfilter_ref(sk_maskfilter_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_maskfilter_ref (sk_maskfilter_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_maskfilter_ref (sk_maskfilter_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5931,8 +8004,13 @@ internal static void sk_maskfilter_ref (sk_maskfilter_t param0) => // void sk_maskfilter_unref(sk_maskfilter_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_maskfilter_unref (sk_maskfilter_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_maskfilter_unref (sk_maskfilter_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5949,8 +8027,13 @@ internal static void sk_maskfilter_unref (sk_maskfilter_t param0) => // void sk_matrix_concat(sk_matrix_t* result, sk_matrix_t* first, sk_matrix_t* second) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_concat (SKMatrix* result, SKMatrix* first, SKMatrix* second); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_concat (SKMatrix* result, SKMatrix* first, SKMatrix* second); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5963,8 +8046,13 @@ internal static void sk_matrix_concat (SKMatrix* result, SKMatrix* first, SKMatr // void sk_matrix_map_points(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_map_points (SKMatrix* matrix, SKPoint* dst, SKPoint* src, Int32 count); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_map_points (SKMatrix* matrix, SKPoint* dst, SKPoint* src, Int32 count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5977,8 +8065,13 @@ internal static void sk_matrix_map_points (SKMatrix* matrix, SKPoint* dst, SKPoi // float sk_matrix_map_radius(sk_matrix_t* matrix, float radius) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_matrix_map_radius (SKMatrix* matrix, Single radius); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_matrix_map_radius (SKMatrix* matrix, Single radius); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -5991,8 +8084,13 @@ internal static Single sk_matrix_map_radius (SKMatrix* matrix, Single radius) => // void sk_matrix_map_rect(sk_matrix_t* matrix, sk_rect_t* dest, sk_rect_t* source) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_map_rect (SKMatrix* matrix, SKRect* dest, SKRect* source); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_map_rect (SKMatrix* matrix, SKRect* dest, SKRect* source); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6005,8 +8103,13 @@ internal static void sk_matrix_map_rect (SKMatrix* matrix, SKRect* dest, SKRect* // void sk_matrix_map_vector(sk_matrix_t* matrix, float x, float y, sk_point_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_map_vector (SKMatrix* matrix, Single x, Single y, SKPoint* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_map_vector (SKMatrix* matrix, Single x, Single y, SKPoint* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6019,8 +8122,13 @@ internal static void sk_matrix_map_vector (SKMatrix* matrix, Single x, Single y, // void sk_matrix_map_vectors(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_map_vectors (SKMatrix* matrix, SKPoint* dst, SKPoint* src, Int32 count); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_map_vectors (SKMatrix* matrix, SKPoint* dst, SKPoint* src, Int32 count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6033,8 +8141,13 @@ internal static void sk_matrix_map_vectors (SKMatrix* matrix, SKPoint* dst, SKPo // void sk_matrix_map_xy(sk_matrix_t* matrix, float x, float y, sk_point_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_map_xy (SKMatrix* matrix, Single x, Single y, SKPoint* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_map_xy (SKMatrix* matrix, Single x, Single y, SKPoint* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6047,8 +8160,13 @@ internal static void sk_matrix_map_xy (SKMatrix* matrix, Single x, Single y, SKP // void sk_matrix_post_concat(sk_matrix_t* result, sk_matrix_t* matrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_post_concat (SKMatrix* result, SKMatrix* matrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_post_concat (SKMatrix* result, SKMatrix* matrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6061,8 +8179,13 @@ internal static void sk_matrix_post_concat (SKMatrix* result, SKMatrix* matrix) // void sk_matrix_pre_concat(sk_matrix_t* result, sk_matrix_t* matrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_matrix_pre_concat (SKMatrix* result, SKMatrix* matrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_matrix_pre_concat (SKMatrix* result, SKMatrix* matrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6075,9 +8198,15 @@ internal static void sk_matrix_pre_concat (SKMatrix* result, SKMatrix* matrix) = // bool sk_matrix_try_invert(sk_matrix_t* matrix, sk_matrix_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_matrix_try_invert (SKMatrix* matrix, SKMatrix* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_matrix_try_invert (SKMatrix* matrix, SKMatrix* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6095,8 +8224,13 @@ internal static bool sk_matrix_try_invert (SKMatrix* matrix, SKMatrix* result) = // sk_paint_t* sk_paint_clone(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_paint_t sk_paint_clone (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_paint_t sk_paint_clone (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6109,8 +8243,13 @@ internal static sk_paint_t sk_paint_clone (sk_paint_t param0) => // void sk_paint_delete(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_delete (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_delete (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6123,8 +8262,13 @@ internal static void sk_paint_delete (sk_paint_t param0) => // sk_blender_t* sk_paint_get_blender(sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_blender_t sk_paint_get_blender (sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_blender_t sk_paint_get_blender (sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6137,8 +8281,13 @@ internal static sk_blender_t sk_paint_get_blender (sk_paint_t cpaint) => // sk_blendmode_t sk_paint_get_blendmode(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKBlendMode sk_paint_get_blendmode (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKBlendMode sk_paint_get_blendmode (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6151,8 +8300,13 @@ internal static SKBlendMode sk_paint_get_blendmode (sk_paint_t param0) => // sk_color_t sk_paint_get_color(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_paint_get_color (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_paint_get_color (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6165,8 +8319,13 @@ internal static UInt32 sk_paint_get_color (sk_paint_t param0) => // void sk_paint_get_color4f(const sk_paint_t* paint, sk_color4f_t* color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_get_color4f (sk_paint_t paint, SKColorF* color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_get_color4f (sk_paint_t paint, SKColorF* color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6179,8 +8338,13 @@ internal static void sk_paint_get_color4f (sk_paint_t paint, SKColorF* color) => // sk_colorfilter_t* sk_paint_get_colorfilter(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_paint_get_colorfilter (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_paint_get_colorfilter (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6193,9 +8357,15 @@ internal static sk_colorfilter_t sk_paint_get_colorfilter (sk_paint_t param0) => // bool sk_paint_get_fill_path(const sk_paint_t* cpaint, const sk_path_t* src, sk_path_t* dst, const sk_rect_t* cullRect, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_paint_get_fill_path (sk_paint_t cpaint, sk_path_t src, sk_path_t dst, SKRect* cullRect, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_paint_get_fill_path (sk_paint_t cpaint, sk_path_t src, sk_path_t dst, SKRect* cullRect, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6209,8 +8379,13 @@ internal static bool sk_paint_get_fill_path (sk_paint_t cpaint, sk_path_t src, s // sk_imagefilter_t* sk_paint_get_imagefilter(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_imagefilter_t sk_paint_get_imagefilter (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_imagefilter_t sk_paint_get_imagefilter (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6223,8 +8398,13 @@ internal static sk_imagefilter_t sk_paint_get_imagefilter (sk_paint_t param0) => // sk_maskfilter_t* sk_paint_get_maskfilter(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_maskfilter_t sk_paint_get_maskfilter (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_maskfilter_t sk_paint_get_maskfilter (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6237,8 +8417,13 @@ internal static sk_maskfilter_t sk_paint_get_maskfilter (sk_paint_t param0) => // sk_path_effect_t* sk_paint_get_path_effect(sk_paint_t* cpaint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_paint_get_path_effect (sk_paint_t cpaint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_paint_get_path_effect (sk_paint_t cpaint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6251,8 +8436,13 @@ internal static sk_path_effect_t sk_paint_get_path_effect (sk_paint_t cpaint) => // sk_shader_t* sk_paint_get_shader(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_paint_get_shader (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_paint_get_shader (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6265,8 +8455,13 @@ internal static sk_shader_t sk_paint_get_shader (sk_paint_t param0) => // sk_stroke_cap_t sk_paint_get_stroke_cap(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKStrokeCap sk_paint_get_stroke_cap (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKStrokeCap sk_paint_get_stroke_cap (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6279,8 +8474,13 @@ internal static SKStrokeCap sk_paint_get_stroke_cap (sk_paint_t param0) => // sk_stroke_join_t sk_paint_get_stroke_join(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKStrokeJoin sk_paint_get_stroke_join (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKStrokeJoin sk_paint_get_stroke_join (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6293,8 +8493,13 @@ internal static SKStrokeJoin sk_paint_get_stroke_join (sk_paint_t param0) => // float sk_paint_get_stroke_miter(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_paint_get_stroke_miter (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_paint_get_stroke_miter (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6307,8 +8512,13 @@ internal static Single sk_paint_get_stroke_miter (sk_paint_t param0) => // float sk_paint_get_stroke_width(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_paint_get_stroke_width (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_paint_get_stroke_width (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6321,8 +8531,13 @@ internal static Single sk_paint_get_stroke_width (sk_paint_t param0) => // sk_paint_style_t sk_paint_get_style(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPaintStyle sk_paint_get_style (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPaintStyle sk_paint_get_style (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6335,9 +8550,15 @@ internal static SKPaintStyle sk_paint_get_style (sk_paint_t param0) => // bool sk_paint_is_antialias(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_paint_is_antialias (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_paint_is_antialias (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6351,9 +8572,15 @@ internal static bool sk_paint_is_antialias (sk_paint_t param0) => // bool sk_paint_is_dither(const sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_paint_is_dither (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_paint_is_dither (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6367,8 +8594,13 @@ internal static bool sk_paint_is_dither (sk_paint_t param0) => // sk_paint_t* sk_paint_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_paint_t sk_paint_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_paint_t sk_paint_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6381,8 +8613,13 @@ internal static sk_paint_t sk_paint_new () => // void sk_paint_reset(sk_paint_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_reset (sk_paint_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_reset (sk_paint_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6395,8 +8632,13 @@ internal static void sk_paint_reset (sk_paint_t param0) => // void sk_paint_set_antialias(sk_paint_t*, bool) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_antialias (sk_paint_t param0, [MarshalAs (UnmanagedType.I1)] bool param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_antialias (sk_paint_t param0, [MarshalAs (UnmanagedType.I1)] bool param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6409,8 +8651,13 @@ internal static void sk_paint_set_antialias (sk_paint_t param0, [MarshalAs (Unma // void sk_paint_set_blender(sk_paint_t* paint, sk_blender_t* blender) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_blender (sk_paint_t paint, sk_blender_t blender); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_blender (sk_paint_t paint, sk_blender_t blender); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6423,8 +8670,13 @@ internal static void sk_paint_set_blender (sk_paint_t paint, sk_blender_t blende // void sk_paint_set_blendmode(sk_paint_t*, sk_blendmode_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_blendmode (sk_paint_t param0, SKBlendMode param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_blendmode (sk_paint_t param0, SKBlendMode param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6437,8 +8689,13 @@ internal static void sk_paint_set_blendmode (sk_paint_t param0, SKBlendMode para // void sk_paint_set_color(sk_paint_t*, sk_color_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_color (sk_paint_t param0, UInt32 param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_color (sk_paint_t param0, UInt32 param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6451,8 +8708,13 @@ internal static void sk_paint_set_color (sk_paint_t param0, UInt32 param1) => // void sk_paint_set_color4f(sk_paint_t* paint, sk_color4f_t* color, sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_color4f (sk_paint_t paint, SKColorF* color, sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_color4f (sk_paint_t paint, SKColorF* color, sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6465,8 +8727,13 @@ internal static void sk_paint_set_color4f (sk_paint_t paint, SKColorF* color, sk // void sk_paint_set_colorfilter(sk_paint_t*, sk_colorfilter_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_colorfilter (sk_paint_t param0, sk_colorfilter_t param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_colorfilter (sk_paint_t param0, sk_colorfilter_t param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6479,8 +8746,13 @@ internal static void sk_paint_set_colorfilter (sk_paint_t param0, sk_colorfilter // void sk_paint_set_dither(sk_paint_t*, bool) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_dither (sk_paint_t param0, [MarshalAs (UnmanagedType.I1)] bool param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_dither (sk_paint_t param0, [MarshalAs (UnmanagedType.I1)] bool param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6493,8 +8765,13 @@ internal static void sk_paint_set_dither (sk_paint_t param0, [MarshalAs (Unmanag // void sk_paint_set_imagefilter(sk_paint_t*, sk_imagefilter_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_imagefilter (sk_paint_t param0, sk_imagefilter_t param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_imagefilter (sk_paint_t param0, sk_imagefilter_t param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6507,8 +8784,13 @@ internal static void sk_paint_set_imagefilter (sk_paint_t param0, sk_imagefilter // void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_maskfilter (sk_paint_t param0, sk_maskfilter_t param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_maskfilter (sk_paint_t param0, sk_maskfilter_t param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6521,8 +8803,13 @@ internal static void sk_paint_set_maskfilter (sk_paint_t param0, sk_maskfilter_t // void sk_paint_set_path_effect(sk_paint_t* cpaint, sk_path_effect_t* effect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_path_effect (sk_paint_t cpaint, sk_path_effect_t effect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_path_effect (sk_paint_t cpaint, sk_path_effect_t effect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6535,8 +8822,13 @@ internal static void sk_paint_set_path_effect (sk_paint_t cpaint, sk_path_effect // void sk_paint_set_shader(sk_paint_t*, sk_shader_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_shader (sk_paint_t param0, sk_shader_t param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_shader (sk_paint_t param0, sk_shader_t param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6549,8 +8841,13 @@ internal static void sk_paint_set_shader (sk_paint_t param0, sk_shader_t param1) // void sk_paint_set_stroke_cap(sk_paint_t*, sk_stroke_cap_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_stroke_cap (sk_paint_t param0, SKStrokeCap param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_stroke_cap (sk_paint_t param0, SKStrokeCap param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6563,8 +8860,13 @@ internal static void sk_paint_set_stroke_cap (sk_paint_t param0, SKStrokeCap par // void sk_paint_set_stroke_join(sk_paint_t*, sk_stroke_join_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_stroke_join (sk_paint_t param0, SKStrokeJoin param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_stroke_join (sk_paint_t param0, SKStrokeJoin param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6577,8 +8879,13 @@ internal static void sk_paint_set_stroke_join (sk_paint_t param0, SKStrokeJoin p // void sk_paint_set_stroke_miter(sk_paint_t*, float miter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_stroke_miter (sk_paint_t param0, Single miter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_stroke_miter (sk_paint_t param0, Single miter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6591,8 +8898,13 @@ internal static void sk_paint_set_stroke_miter (sk_paint_t param0, Single miter) // void sk_paint_set_stroke_width(sk_paint_t*, float width) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_stroke_width (sk_paint_t param0, Single width); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_stroke_width (sk_paint_t param0, Single width); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6605,8 +8917,13 @@ internal static void sk_paint_set_stroke_width (sk_paint_t param0, Single width) // void sk_paint_set_style(sk_paint_t*, sk_paint_style_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_paint_set_style (sk_paint_t param0, SKPaintStyle param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_paint_set_style (sk_paint_t param0, SKPaintStyle param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6623,8 +8940,13 @@ internal static void sk_paint_set_style (sk_paint_t param0, SKPaintStyle param1) // void sk_opbuilder_add(sk_opbuilder_t* builder, const sk_path_t* path, sk_pathop_t op) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_opbuilder_add (sk_opbuilder_t builder, sk_path_t path, SKPathOp op); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_opbuilder_add (sk_opbuilder_t builder, sk_path_t path, SKPathOp op); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6637,8 +8959,13 @@ internal static void sk_opbuilder_add (sk_opbuilder_t builder, sk_path_t path, S // void sk_opbuilder_destroy(sk_opbuilder_t* builder) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_opbuilder_destroy (sk_opbuilder_t builder); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_opbuilder_destroy (sk_opbuilder_t builder); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6651,8 +8978,13 @@ internal static void sk_opbuilder_destroy (sk_opbuilder_t builder) => // sk_opbuilder_t* sk_opbuilder_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_opbuilder_t sk_opbuilder_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_opbuilder_t sk_opbuilder_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6665,9 +8997,15 @@ internal static sk_opbuilder_t sk_opbuilder_new () => // bool sk_opbuilder_resolve(sk_opbuilder_t* builder, sk_path_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_opbuilder_resolve (sk_opbuilder_t builder, sk_path_t result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_opbuilder_resolve (sk_opbuilder_t builder, sk_path_t result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6681,8 +9019,13 @@ internal static bool sk_opbuilder_resolve (sk_opbuilder_t builder, sk_path_t res // void sk_path_add_arc(sk_path_t* cpath, const sk_rect_t* crect, float startAngle, float sweepAngle) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_arc (sk_path_t cpath, SKRect* crect, Single startAngle, Single sweepAngle); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_arc (sk_path_t cpath, SKRect* crect, Single startAngle, Single sweepAngle); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6695,8 +9038,13 @@ internal static void sk_path_add_arc (sk_path_t cpath, SKRect* crect, Single sta // void sk_path_add_circle(sk_path_t*, float x, float y, float radius, sk_path_direction_t dir) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_circle (sk_path_t param0, Single x, Single y, Single radius, SKPathDirection dir); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_circle (sk_path_t param0, Single x, Single y, Single radius, SKPathDirection dir); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6709,8 +9057,13 @@ internal static void sk_path_add_circle (sk_path_t param0, Single x, Single y, S // void sk_path_add_oval(sk_path_t*, const sk_rect_t*, sk_path_direction_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_oval (sk_path_t param0, SKRect* param1, SKPathDirection param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_oval (sk_path_t param0, SKRect* param1, SKPathDirection param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6723,8 +9076,13 @@ internal static void sk_path_add_oval (sk_path_t param0, SKRect* param1, SKPathD // void sk_path_add_path(sk_path_t* cpath, sk_path_t* other, sk_path_add_mode_t add_mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_path (sk_path_t cpath, sk_path_t other, SKPathAddMode add_mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_path (sk_path_t cpath, sk_path_t other, SKPathAddMode add_mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6737,8 +9095,13 @@ internal static void sk_path_add_path (sk_path_t cpath, sk_path_t other, SKPathA // void sk_path_add_path_matrix(sk_path_t* cpath, sk_path_t* other, sk_matrix_t* matrix, sk_path_add_mode_t add_mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_path_matrix (sk_path_t cpath, sk_path_t other, SKMatrix* matrix, SKPathAddMode add_mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_path_matrix (sk_path_t cpath, sk_path_t other, SKMatrix* matrix, SKPathAddMode add_mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6751,8 +9114,13 @@ internal static void sk_path_add_path_matrix (sk_path_t cpath, sk_path_t other, // void sk_path_add_path_offset(sk_path_t* cpath, sk_path_t* other, float dx, float dy, sk_path_add_mode_t add_mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_path_offset (sk_path_t cpath, sk_path_t other, Single dx, Single dy, SKPathAddMode add_mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_path_offset (sk_path_t cpath, sk_path_t other, Single dx, Single dy, SKPathAddMode add_mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6765,8 +9133,13 @@ internal static void sk_path_add_path_offset (sk_path_t cpath, sk_path_t other, // void sk_path_add_path_reverse(sk_path_t* cpath, sk_path_t* other) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_path_reverse (sk_path_t cpath, sk_path_t other); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_path_reverse (sk_path_t cpath, sk_path_t other); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6779,8 +9152,13 @@ internal static void sk_path_add_path_reverse (sk_path_t cpath, sk_path_t other) // void sk_path_add_poly(sk_path_t* cpath, const sk_point_t* points, int count, bool close) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_poly (sk_path_t cpath, SKPoint* points, Int32 count, [MarshalAs (UnmanagedType.I1)] bool close); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_poly (sk_path_t cpath, SKPoint* points, Int32 count, [MarshalAs (UnmanagedType.I1)] bool close); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6793,8 +9171,13 @@ internal static void sk_path_add_poly (sk_path_t cpath, SKPoint* points, Int32 c // void sk_path_add_rect(sk_path_t*, const sk_rect_t*, sk_path_direction_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_rect (sk_path_t param0, SKRect* param1, SKPathDirection param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_rect (sk_path_t param0, SKRect* param1, SKPathDirection param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6807,8 +9190,13 @@ internal static void sk_path_add_rect (sk_path_t param0, SKRect* param1, SKPathD // void sk_path_add_rect_start(sk_path_t* cpath, const sk_rect_t* crect, sk_path_direction_t cdir, uint32_t startIndex) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_rect_start (sk_path_t cpath, SKRect* crect, SKPathDirection cdir, UInt32 startIndex); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_rect_start (sk_path_t cpath, SKRect* crect, SKPathDirection cdir, UInt32 startIndex); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6821,8 +9209,13 @@ internal static void sk_path_add_rect_start (sk_path_t cpath, SKRect* crect, SKP // void sk_path_add_rounded_rect(sk_path_t*, const sk_rect_t*, float, float, sk_path_direction_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_rounded_rect (sk_path_t param0, SKRect* param1, Single param2, Single param3, SKPathDirection param4); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_rounded_rect (sk_path_t param0, SKRect* param1, Single param2, Single param3, SKPathDirection param4); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6835,8 +9228,13 @@ internal static void sk_path_add_rounded_rect (sk_path_t param0, SKRect* param1, // void sk_path_add_rrect(sk_path_t*, const sk_rrect_t*, sk_path_direction_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_rrect (sk_path_t param0, sk_rrect_t param1, SKPathDirection param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_rrect (sk_path_t param0, sk_rrect_t param1, SKPathDirection param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6849,8 +9247,13 @@ internal static void sk_path_add_rrect (sk_path_t param0, sk_rrect_t param1, SKP // void sk_path_add_rrect_start(sk_path_t*, const sk_rrect_t*, sk_path_direction_t, uint32_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_add_rrect_start (sk_path_t param0, sk_rrect_t param1, SKPathDirection param2, UInt32 param3); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_add_rrect_start (sk_path_t param0, sk_rrect_t param1, SKPathDirection param2, UInt32 param3); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6863,8 +9266,13 @@ internal static void sk_path_add_rrect_start (sk_path_t param0, sk_rrect_t param // void sk_path_arc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_arc_to (sk_path_t param0, Single rx, Single ry, Single xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, Single x, Single y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_arc_to (sk_path_t param0, Single rx, Single ry, Single xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, Single x, Single y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6877,8 +9285,13 @@ internal static void sk_path_arc_to (sk_path_t param0, Single rx, Single ry, Sin // void sk_path_arc_to_with_oval(sk_path_t*, const sk_rect_t* oval, float startAngle, float sweepAngle, bool forceMoveTo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_arc_to_with_oval (sk_path_t param0, SKRect* oval, Single startAngle, Single sweepAngle, [MarshalAs (UnmanagedType.I1)] bool forceMoveTo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_arc_to_with_oval (sk_path_t param0, SKRect* oval, Single startAngle, Single sweepAngle, [MarshalAs (UnmanagedType.I1)] bool forceMoveTo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6891,8 +9304,13 @@ internal static void sk_path_arc_to_with_oval (sk_path_t param0, SKRect* oval, S // void sk_path_arc_to_with_points(sk_path_t*, float x1, float y1, float x2, float y2, float radius) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_arc_to_with_points (sk_path_t param0, Single x1, Single y1, Single x2, Single y2, Single radius); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_arc_to_with_points (sk_path_t param0, Single x1, Single y1, Single x2, Single y2, Single radius); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6905,8 +9323,13 @@ internal static void sk_path_arc_to_with_points (sk_path_t param0, Single x1, Si // sk_path_t* sk_path_clone(const sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_t sk_path_clone (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_t sk_path_clone (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6919,8 +9342,13 @@ internal static sk_path_t sk_path_clone (sk_path_t cpath) => // void sk_path_close(sk_path_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_close (sk_path_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_close (sk_path_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6933,8 +9361,13 @@ internal static void sk_path_close (sk_path_t param0) => // void sk_path_compute_tight_bounds(const sk_path_t*, sk_rect_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_compute_tight_bounds (sk_path_t param0, SKRect* param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_compute_tight_bounds (sk_path_t param0, SKRect* param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6947,8 +9380,13 @@ internal static void sk_path_compute_tight_bounds (sk_path_t param0, SKRect* par // void sk_path_conic_to(sk_path_t*, float x0, float y0, float x1, float y1, float w) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_conic_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1, Single w); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_conic_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1, Single w); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6961,9 +9399,15 @@ internal static void sk_path_conic_to (sk_path_t param0, Single x0, Single y0, S // bool sk_path_contains(const sk_path_t* cpath, float x, float y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_contains (sk_path_t cpath, Single x, Single y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_contains (sk_path_t cpath, Single x, Single y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6977,8 +9421,13 @@ internal static bool sk_path_contains (sk_path_t cpath, Single x, Single y) => // int sk_path_convert_conic_to_quads(const sk_point_t* p0, const sk_point_t* p1, const sk_point_t* p2, float w, sk_point_t* pts, int pow2) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_convert_conic_to_quads (SKPoint* p0, SKPoint* p1, SKPoint* p2, Single w, SKPoint* pts, Int32 pow2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_convert_conic_to_quads (SKPoint* p0, SKPoint* p1, SKPoint* p2, Single w, SKPoint* pts, Int32 pow2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -6991,8 +9440,13 @@ internal static Int32 sk_path_convert_conic_to_quads (SKPoint* p0, SKPoint* p1, // int sk_path_count_points(const sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_count_points (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_count_points (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7005,8 +9459,13 @@ internal static Int32 sk_path_count_points (sk_path_t cpath) => // int sk_path_count_verbs(const sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_count_verbs (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_count_verbs (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7019,8 +9478,13 @@ internal static Int32 sk_path_count_verbs (sk_path_t cpath) => // sk_path_iterator_t* sk_path_create_iter(sk_path_t* cpath, int forceClose) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_iterator_t sk_path_create_iter (sk_path_t cpath, Int32 forceClose); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_iterator_t sk_path_create_iter (sk_path_t cpath, Int32 forceClose); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7033,8 +9497,13 @@ internal static sk_path_iterator_t sk_path_create_iter (sk_path_t cpath, Int32 f // sk_path_rawiterator_t* sk_path_create_rawiter(sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_rawiterator_t sk_path_create_rawiter (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_rawiterator_t sk_path_create_rawiter (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7047,8 +9516,13 @@ internal static sk_path_rawiterator_t sk_path_create_rawiter (sk_path_t cpath) = // void sk_path_cubic_to(sk_path_t*, float x0, float y0, float x1, float y1, float x2, float y2) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_cubic_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1, Single x2, Single y2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_cubic_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1, Single x2, Single y2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7061,8 +9535,13 @@ internal static void sk_path_cubic_to (sk_path_t param0, Single x0, Single y0, S // void sk_path_delete(sk_path_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_delete (sk_path_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_delete (sk_path_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7075,8 +9554,13 @@ internal static void sk_path_delete (sk_path_t param0) => // void sk_path_get_bounds(const sk_path_t*, sk_rect_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_get_bounds (sk_path_t param0, SKRect* param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_get_bounds (sk_path_t param0, SKRect* param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7089,8 +9573,13 @@ internal static void sk_path_get_bounds (sk_path_t param0, SKRect* param1) => // sk_path_filltype_t sk_path_get_filltype(sk_path_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPathFillType sk_path_get_filltype (sk_path_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPathFillType sk_path_get_filltype (sk_path_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7103,9 +9592,15 @@ internal static SKPathFillType sk_path_get_filltype (sk_path_t param0) => // bool sk_path_get_last_point(const sk_path_t* cpath, sk_point_t* point) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_get_last_point (sk_path_t cpath, SKPoint* point); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_get_last_point (sk_path_t cpath, SKPoint* point); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7119,8 +9614,13 @@ internal static bool sk_path_get_last_point (sk_path_t cpath, SKPoint* point) => // void sk_path_get_point(const sk_path_t* cpath, int index, sk_point_t* point) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_get_point (sk_path_t cpath, Int32 index, SKPoint* point); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_get_point (sk_path_t cpath, Int32 index, SKPoint* point); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7133,8 +9633,13 @@ internal static void sk_path_get_point (sk_path_t cpath, Int32 index, SKPoint* p // int sk_path_get_points(const sk_path_t* cpath, sk_point_t* points, int max) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_get_points (sk_path_t cpath, SKPoint* points, Int32 max); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_get_points (sk_path_t cpath, SKPoint* points, Int32 max); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7147,8 +9652,13 @@ internal static Int32 sk_path_get_points (sk_path_t cpath, SKPoint* points, Int3 // uint32_t sk_path_get_segment_masks(sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_path_get_segment_masks (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_path_get_segment_masks (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7161,9 +9671,15 @@ internal static UInt32 sk_path_get_segment_masks (sk_path_t cpath) => // bool sk_path_is_convex(const sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_is_convex (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_is_convex (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7177,9 +9693,15 @@ internal static bool sk_path_is_convex (sk_path_t cpath) => // bool sk_path_is_line(sk_path_t* cpath, sk_point_t[2] line = 2) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_is_line (sk_path_t cpath, SKPoint* line); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_is_line (sk_path_t cpath, SKPoint* line); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7193,9 +9715,15 @@ internal static bool sk_path_is_line (sk_path_t cpath, SKPoint* line) => // bool sk_path_is_oval(sk_path_t* cpath, sk_rect_t* bounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_is_oval (sk_path_t cpath, SKRect* bounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_is_oval (sk_path_t cpath, SKRect* bounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7209,9 +9737,15 @@ internal static bool sk_path_is_oval (sk_path_t cpath, SKRect* bounds) => // bool sk_path_is_rect(sk_path_t* cpath, sk_rect_t* rect, bool* isClosed, sk_path_direction_t* direction) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_is_rect (sk_path_t cpath, SKRect* rect, Byte* isClosed, SKPathDirection* direction); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_is_rect (sk_path_t cpath, SKRect* rect, Byte* isClosed, SKPathDirection* direction); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7225,9 +9759,15 @@ internal static bool sk_path_is_rect (sk_path_t cpath, SKRect* rect, Byte* isClo // bool sk_path_is_rrect(sk_path_t* cpath, sk_rrect_t* bounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_is_rrect (sk_path_t cpath, sk_rrect_t bounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_is_rrect (sk_path_t cpath, sk_rrect_t bounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7241,8 +9781,13 @@ internal static bool sk_path_is_rrect (sk_path_t cpath, sk_rrect_t bounds) => // float sk_path_iter_conic_weight(sk_path_iterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_path_iter_conic_weight (sk_path_iterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_path_iter_conic_weight (sk_path_iterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7255,8 +9800,13 @@ internal static Single sk_path_iter_conic_weight (sk_path_iterator_t iterator) = // void sk_path_iter_destroy(sk_path_iterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_iter_destroy (sk_path_iterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_iter_destroy (sk_path_iterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7269,8 +9819,13 @@ internal static void sk_path_iter_destroy (sk_path_iterator_t iterator) => // int sk_path_iter_is_close_line(sk_path_iterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_iter_is_close_line (sk_path_iterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_iter_is_close_line (sk_path_iterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7283,8 +9838,13 @@ internal static Int32 sk_path_iter_is_close_line (sk_path_iterator_t iterator) = // int sk_path_iter_is_closed_contour(sk_path_iterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_path_iter_is_closed_contour (sk_path_iterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_path_iter_is_closed_contour (sk_path_iterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7297,8 +9857,13 @@ internal static Int32 sk_path_iter_is_closed_contour (sk_path_iterator_t iterato // sk_path_verb_t sk_path_iter_next(sk_path_iterator_t* iterator, sk_point_t[4] points = 4) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPathVerb sk_path_iter_next (sk_path_iterator_t iterator, SKPoint* points); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPathVerb sk_path_iter_next (sk_path_iterator_t iterator, SKPoint* points); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7311,8 +9876,13 @@ internal static SKPathVerb sk_path_iter_next (sk_path_iterator_t iterator, SKPoi // void sk_path_line_to(sk_path_t*, float x, float y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_line_to (sk_path_t param0, Single x, Single y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_line_to (sk_path_t param0, Single x, Single y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7325,8 +9895,13 @@ internal static void sk_path_line_to (sk_path_t param0, Single x, Single y) => // void sk_path_move_to(sk_path_t*, float x, float y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_move_to (sk_path_t param0, Single x, Single y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_move_to (sk_path_t param0, Single x, Single y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7339,8 +9914,13 @@ internal static void sk_path_move_to (sk_path_t param0, Single x, Single y) => // sk_path_t* sk_path_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_t sk_path_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_t sk_path_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7353,9 +9933,15 @@ internal static sk_path_t sk_path_new () => // bool sk_path_parse_svg_string(sk_path_t* cpath, const char* str) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_path_parse_svg_string (sk_path_t cpath, [MarshalAs (UnmanagedType.LPStr)] String str); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_path_parse_svg_string (sk_path_t cpath, [MarshalAs (UnmanagedType.LPStr)] String str); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7369,8 +9955,13 @@ internal static bool sk_path_parse_svg_string (sk_path_t cpath, [MarshalAs (Unma // void sk_path_quad_to(sk_path_t*, float x0, float y0, float x1, float y1) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_quad_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_quad_to (sk_path_t param0, Single x0, Single y0, Single x1, Single y1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7383,8 +9974,13 @@ internal static void sk_path_quad_to (sk_path_t param0, Single x0, Single y0, Si // void sk_path_rarc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rarc_to (sk_path_t param0, Single rx, Single ry, Single xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, Single x, Single y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rarc_to (sk_path_t param0, Single rx, Single ry, Single xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, Single x, Single y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7397,8 +9993,13 @@ internal static void sk_path_rarc_to (sk_path_t param0, Single rx, Single ry, Si // float sk_path_rawiter_conic_weight(sk_path_rawiterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_path_rawiter_conic_weight (sk_path_rawiterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_path_rawiter_conic_weight (sk_path_rawiterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7411,8 +10012,13 @@ internal static Single sk_path_rawiter_conic_weight (sk_path_rawiterator_t itera // void sk_path_rawiter_destroy(sk_path_rawiterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rawiter_destroy (sk_path_rawiterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rawiter_destroy (sk_path_rawiterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7425,8 +10031,13 @@ internal static void sk_path_rawiter_destroy (sk_path_rawiterator_t iterator) => // sk_path_verb_t sk_path_rawiter_next(sk_path_rawiterator_t* iterator, sk_point_t[4] points = 4) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPathVerb sk_path_rawiter_next (sk_path_rawiterator_t iterator, SKPoint* points); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPathVerb sk_path_rawiter_next (sk_path_rawiterator_t iterator, SKPoint* points); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7439,8 +10050,13 @@ internal static SKPathVerb sk_path_rawiter_next (sk_path_rawiterator_t iterator, // sk_path_verb_t sk_path_rawiter_peek(sk_path_rawiterator_t* iterator) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPathVerb sk_path_rawiter_peek (sk_path_rawiterator_t iterator); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPathVerb sk_path_rawiter_peek (sk_path_rawiterator_t iterator); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7453,8 +10069,13 @@ internal static SKPathVerb sk_path_rawiter_peek (sk_path_rawiterator_t iterator) // void sk_path_rconic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float w) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rconic_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1, Single w); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rconic_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1, Single w); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7467,8 +10088,13 @@ internal static void sk_path_rconic_to (sk_path_t param0, Single dx0, Single dy0 // void sk_path_rcubic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float dx2, float dy2) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rcubic_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1, Single dx2, Single dy2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rcubic_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1, Single dx2, Single dy2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7481,8 +10107,13 @@ internal static void sk_path_rcubic_to (sk_path_t param0, Single dx0, Single dy0 // void sk_path_reset(sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_reset (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_reset (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7495,8 +10126,13 @@ internal static void sk_path_reset (sk_path_t cpath) => // void sk_path_rewind(sk_path_t* cpath) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rewind (sk_path_t cpath); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rewind (sk_path_t cpath); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7509,8 +10145,13 @@ internal static void sk_path_rewind (sk_path_t cpath) => // void sk_path_rline_to(sk_path_t*, float dx, float yd) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rline_to (sk_path_t param0, Single dx, Single yd); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rline_to (sk_path_t param0, Single dx, Single yd); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7523,8 +10164,13 @@ internal static void sk_path_rline_to (sk_path_t param0, Single dx, Single yd) = // void sk_path_rmove_to(sk_path_t*, float dx, float dy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rmove_to (sk_path_t param0, Single dx, Single dy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rmove_to (sk_path_t param0, Single dx, Single dy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7537,8 +10183,13 @@ internal static void sk_path_rmove_to (sk_path_t param0, Single dx, Single dy) = // void sk_path_rquad_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_rquad_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_rquad_to (sk_path_t param0, Single dx0, Single dy0, Single dx1, Single dy1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7551,8 +10202,13 @@ internal static void sk_path_rquad_to (sk_path_t param0, Single dx0, Single dy0, // void sk_path_set_filltype(sk_path_t*, sk_path_filltype_t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_set_filltype (sk_path_t param0, SKPathFillType param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_set_filltype (sk_path_t param0, SKPathFillType param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7565,8 +10221,13 @@ internal static void sk_path_set_filltype (sk_path_t param0, SKPathFillType para // void sk_path_to_svg_string(const sk_path_t* cpath, sk_string_t* str) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_to_svg_string (sk_path_t cpath, sk_string_t str); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_to_svg_string (sk_path_t cpath, sk_string_t str); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7579,8 +10240,13 @@ internal static void sk_path_to_svg_string (sk_path_t cpath, sk_string_t str) => // void sk_path_transform(sk_path_t* cpath, const sk_matrix_t* cmatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_transform (sk_path_t cpath, SKMatrix* cmatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_transform (sk_path_t cpath, SKMatrix* cmatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7593,8 +10259,13 @@ internal static void sk_path_transform (sk_path_t cpath, SKMatrix* cmatrix) => // void sk_path_transform_to_dest(const sk_path_t* cpath, const sk_matrix_t* cmatrix, sk_path_t* destination) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_transform_to_dest (sk_path_t cpath, SKMatrix* cmatrix, sk_path_t destination); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_transform_to_dest (sk_path_t cpath, SKMatrix* cmatrix, sk_path_t destination); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7607,8 +10278,13 @@ internal static void sk_path_transform_to_dest (sk_path_t cpath, SKMatrix* cmatr // void sk_pathmeasure_destroy(sk_pathmeasure_t* pathMeasure) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pathmeasure_destroy (sk_pathmeasure_t pathMeasure); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pathmeasure_destroy (sk_pathmeasure_t pathMeasure); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7621,8 +10297,13 @@ internal static void sk_pathmeasure_destroy (sk_pathmeasure_t pathMeasure) => // float sk_pathmeasure_get_length(sk_pathmeasure_t* pathMeasure) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_pathmeasure_get_length (sk_pathmeasure_t pathMeasure); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_pathmeasure_get_length (sk_pathmeasure_t pathMeasure); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7635,9 +10316,15 @@ internal static Single sk_pathmeasure_get_length (sk_pathmeasure_t pathMeasure) // bool sk_pathmeasure_get_matrix(sk_pathmeasure_t* pathMeasure, float distance, sk_matrix_t* matrix, sk_pathmeasure_matrixflags_t flags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathmeasure_get_matrix (sk_pathmeasure_t pathMeasure, Single distance, SKMatrix* matrix, SKPathMeasureMatrixFlags flags); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathmeasure_get_matrix (sk_pathmeasure_t pathMeasure, Single distance, SKMatrix* matrix, SKPathMeasureMatrixFlags flags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7651,9 +10338,15 @@ internal static bool sk_pathmeasure_get_matrix (sk_pathmeasure_t pathMeasure, Si // bool sk_pathmeasure_get_pos_tan(sk_pathmeasure_t* pathMeasure, float distance, sk_point_t* position, sk_vector_t* tangent) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathmeasure_get_pos_tan (sk_pathmeasure_t pathMeasure, Single distance, SKPoint* position, SKPoint* tangent); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathmeasure_get_pos_tan (sk_pathmeasure_t pathMeasure, Single distance, SKPoint* position, SKPoint* tangent); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7667,9 +10360,15 @@ internal static bool sk_pathmeasure_get_pos_tan (sk_pathmeasure_t pathMeasure, S // bool sk_pathmeasure_get_segment(sk_pathmeasure_t* pathMeasure, float start, float stop, sk_path_t* dst, bool startWithMoveTo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathmeasure_get_segment (sk_pathmeasure_t pathMeasure, Single start, Single stop, sk_path_t dst, [MarshalAs (UnmanagedType.I1)] bool startWithMoveTo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathmeasure_get_segment (sk_pathmeasure_t pathMeasure, Single start, Single stop, sk_path_t dst, [MarshalAs (UnmanagedType.I1)] bool startWithMoveTo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7683,9 +10382,15 @@ internal static bool sk_pathmeasure_get_segment (sk_pathmeasure_t pathMeasure, S // bool sk_pathmeasure_is_closed(sk_pathmeasure_t* pathMeasure) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathmeasure_is_closed (sk_pathmeasure_t pathMeasure); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathmeasure_is_closed (sk_pathmeasure_t pathMeasure); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7699,8 +10404,13 @@ internal static bool sk_pathmeasure_is_closed (sk_pathmeasure_t pathMeasure) => // sk_pathmeasure_t* sk_pathmeasure_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_pathmeasure_t sk_pathmeasure_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_pathmeasure_t sk_pathmeasure_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7713,8 +10423,13 @@ internal static sk_pathmeasure_t sk_pathmeasure_new () => // sk_pathmeasure_t* sk_pathmeasure_new_with_path(const sk_path_t* path, bool forceClosed, float resScale) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_pathmeasure_t sk_pathmeasure_new_with_path (sk_path_t path, [MarshalAs (UnmanagedType.I1)] bool forceClosed, Single resScale); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_pathmeasure_t sk_pathmeasure_new_with_path (sk_path_t path, [MarshalAs (UnmanagedType.I1)] bool forceClosed, Single resScale); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7727,9 +10442,15 @@ internal static sk_pathmeasure_t sk_pathmeasure_new_with_path (sk_path_t path, [ // bool sk_pathmeasure_next_contour(sk_pathmeasure_t* pathMeasure) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathmeasure_next_contour (sk_pathmeasure_t pathMeasure); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathmeasure_next_contour (sk_pathmeasure_t pathMeasure); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7743,8 +10464,13 @@ internal static bool sk_pathmeasure_next_contour (sk_pathmeasure_t pathMeasure) // void sk_pathmeasure_set_path(sk_pathmeasure_t* pathMeasure, const sk_path_t* path, bool forceClosed) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pathmeasure_set_path (sk_pathmeasure_t pathMeasure, sk_path_t path, [MarshalAs (UnmanagedType.I1)] bool forceClosed); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pathmeasure_set_path (sk_pathmeasure_t pathMeasure, sk_path_t path, [MarshalAs (UnmanagedType.I1)] bool forceClosed); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7757,9 +10483,15 @@ internal static void sk_pathmeasure_set_path (sk_pathmeasure_t pathMeasure, sk_p // bool sk_pathop_as_winding(const sk_path_t* path, sk_path_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathop_as_winding (sk_path_t path, sk_path_t result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathop_as_winding (sk_path_t path, sk_path_t result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7773,9 +10505,15 @@ internal static bool sk_pathop_as_winding (sk_path_t path, sk_path_t result) => // bool sk_pathop_op(const sk_path_t* one, const sk_path_t* two, sk_pathop_t op, sk_path_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathop_op (sk_path_t one, sk_path_t two, SKPathOp op, sk_path_t result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathop_op (sk_path_t one, sk_path_t two, SKPathOp op, sk_path_t result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7789,9 +10527,15 @@ internal static bool sk_pathop_op (sk_path_t one, sk_path_t two, SKPathOp op, sk // bool sk_pathop_simplify(const sk_path_t* path, sk_path_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathop_simplify (sk_path_t path, sk_path_t result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathop_simplify (sk_path_t path, sk_path_t result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7805,9 +10549,15 @@ internal static bool sk_pathop_simplify (sk_path_t path, sk_path_t result) => // bool sk_pathop_tight_bounds(const sk_path_t* path, sk_rect_t* result) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pathop_tight_bounds (sk_path_t path, SKRect* result); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pathop_tight_bounds (sk_path_t path, SKRect* result); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7825,8 +10575,13 @@ internal static bool sk_pathop_tight_bounds (sk_path_t path, SKRect* result) => // sk_path_effect_t* sk_path_effect_create_1d_path(const sk_path_t* path, float advance, float phase, sk_path_effect_1d_style_t style) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_1d_path (sk_path_t path, Single advance, Single phase, SKPath1DPathEffectStyle style); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_1d_path (sk_path_t path, Single advance, Single phase, SKPath1DPathEffectStyle style); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7839,8 +10594,13 @@ internal static sk_path_effect_t sk_path_effect_create_1d_path (sk_path_t path, // sk_path_effect_t* sk_path_effect_create_2d_line(float width, const sk_matrix_t* matrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_2d_line (Single width, SKMatrix* matrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_2d_line (Single width, SKMatrix* matrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7853,8 +10613,13 @@ internal static sk_path_effect_t sk_path_effect_create_2d_line (Single width, SK // sk_path_effect_t* sk_path_effect_create_2d_path(const sk_matrix_t* matrix, const sk_path_t* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_2d_path (SKMatrix* matrix, sk_path_t path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_2d_path (SKMatrix* matrix, sk_path_t path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7867,8 +10632,13 @@ internal static sk_path_effect_t sk_path_effect_create_2d_path (SKMatrix* matrix // sk_path_effect_t* sk_path_effect_create_compose(sk_path_effect_t* outer, sk_path_effect_t* inner) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_compose (sk_path_effect_t outer, sk_path_effect_t inner); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_compose (sk_path_effect_t outer, sk_path_effect_t inner); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7881,8 +10651,13 @@ internal static sk_path_effect_t sk_path_effect_create_compose (sk_path_effect_t // sk_path_effect_t* sk_path_effect_create_corner(float radius) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_corner (Single radius); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_corner (Single radius); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7895,8 +10670,13 @@ internal static sk_path_effect_t sk_path_effect_create_corner (Single radius) => // sk_path_effect_t* sk_path_effect_create_dash(const float[-1] intervals, int count, float phase) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_dash (Single* intervals, Int32 count, Single phase); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_dash (Single* intervals, Int32 count, Single phase); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7909,8 +10689,13 @@ internal static sk_path_effect_t sk_path_effect_create_dash (Single* intervals, // sk_path_effect_t* sk_path_effect_create_discrete(float segLength, float deviation, uint32_t seedAssist) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_discrete (Single segLength, Single deviation, UInt32 seedAssist); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_discrete (Single segLength, Single deviation, UInt32 seedAssist); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7923,8 +10708,13 @@ internal static sk_path_effect_t sk_path_effect_create_discrete (Single segLengt // sk_path_effect_t* sk_path_effect_create_sum(sk_path_effect_t* first, sk_path_effect_t* second) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_sum (sk_path_effect_t first, sk_path_effect_t second); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_sum (sk_path_effect_t first, sk_path_effect_t second); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7937,8 +10727,13 @@ internal static sk_path_effect_t sk_path_effect_create_sum (sk_path_effect_t fir // sk_path_effect_t* sk_path_effect_create_trim(float start, float stop, sk_path_effect_trim_mode_t mode) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_path_effect_t sk_path_effect_create_trim (Single start, Single stop, SKTrimPathEffectMode mode); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_path_effect_t sk_path_effect_create_trim (Single start, Single stop, SKTrimPathEffectMode mode); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7951,8 +10746,13 @@ internal static sk_path_effect_t sk_path_effect_create_trim (Single start, Singl // void sk_path_effect_unref(sk_path_effect_t* t) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_path_effect_unref (sk_path_effect_t t); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_path_effect_unref (sk_path_effect_t t); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7969,8 +10769,13 @@ internal static void sk_path_effect_unref (sk_path_effect_t t) => // size_t sk_picture_approximate_bytes_used(const sk_picture_t* picture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_picture_approximate_bytes_used (sk_picture_t picture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_picture_approximate_bytes_used (sk_picture_t picture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7983,8 +10788,13 @@ private partial class Delegates { // int sk_picture_approximate_op_count(const sk_picture_t* picture, bool nested) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_picture_approximate_op_count (sk_picture_t picture, [MarshalAs (UnmanagedType.I1)] bool nested); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_picture_approximate_op_count (sk_picture_t picture, [MarshalAs (UnmanagedType.I1)] bool nested); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -7997,8 +10807,13 @@ internal static Int32 sk_picture_approximate_op_count (sk_picture_t picture, [Ma // sk_picture_t* sk_picture_deserialize_from_data(sk_data_t* data) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_t sk_picture_deserialize_from_data (sk_data_t data); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_t sk_picture_deserialize_from_data (sk_data_t data); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8011,8 +10826,13 @@ internal static sk_picture_t sk_picture_deserialize_from_data (sk_data_t data) = // sk_picture_t* sk_picture_deserialize_from_memory(void* buffer, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_t sk_picture_deserialize_from_memory (void* buffer, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_t sk_picture_deserialize_from_memory (void* buffer, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8025,8 +10845,13 @@ internal static sk_picture_t sk_picture_deserialize_from_memory (void* buffer, / // sk_picture_t* sk_picture_deserialize_from_stream(sk_stream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_t sk_picture_deserialize_from_stream (sk_stream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_t sk_picture_deserialize_from_stream (sk_stream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8039,8 +10864,13 @@ internal static sk_picture_t sk_picture_deserialize_from_stream (sk_stream_t str // void sk_picture_get_cull_rect(sk_picture_t*, sk_rect_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_get_cull_rect (sk_picture_t param0, SKRect* param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_get_cull_rect (sk_picture_t param0, SKRect* param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8053,8 +10883,13 @@ internal static void sk_picture_get_cull_rect (sk_picture_t param0, SKRect* para // sk_canvas_t* sk_picture_get_recording_canvas(sk_picture_recorder_t* crec) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_picture_get_recording_canvas (sk_picture_recorder_t crec); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_picture_get_recording_canvas (sk_picture_recorder_t crec); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8067,8 +10902,13 @@ internal static sk_canvas_t sk_picture_get_recording_canvas (sk_picture_recorder // uint32_t sk_picture_get_unique_id(sk_picture_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_picture_get_unique_id (sk_picture_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_picture_get_unique_id (sk_picture_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8081,8 +10921,13 @@ internal static UInt32 sk_picture_get_unique_id (sk_picture_t param0) => // sk_shader_t* sk_picture_make_shader(sk_picture_t* src, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, sk_filter_mode_t mode, const sk_matrix_t* localMatrix, const sk_rect_t* tile) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_picture_make_shader (sk_picture_t src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterMode mode, SKMatrix* localMatrix, SKRect* tile); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_picture_make_shader (sk_picture_t src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKFilterMode mode, SKMatrix* localMatrix, SKRect* tile); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8095,8 +10940,13 @@ internal static sk_shader_t sk_picture_make_shader (sk_picture_t src, SKShaderTi // void sk_picture_playback(const sk_picture_t* picture, sk_canvas_t* canvas) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_playback (sk_picture_t picture, sk_canvas_t canvas); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_playback (sk_picture_t picture, sk_canvas_t canvas); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8109,8 +10959,13 @@ internal static void sk_picture_playback (sk_picture_t picture, sk_canvas_t canv // sk_canvas_t* sk_picture_recorder_begin_recording(sk_picture_recorder_t*, const sk_rect_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_picture_recorder_begin_recording (sk_picture_recorder_t param0, SKRect* param1); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_picture_recorder_begin_recording (sk_picture_recorder_t param0, SKRect* param1); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8123,8 +10978,13 @@ internal static sk_canvas_t sk_picture_recorder_begin_recording (sk_picture_reco // sk_canvas_t* sk_picture_recorder_begin_recording_with_bbh_factory(sk_picture_recorder_t*, const sk_rect_t*, sk_bbh_factory_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_picture_recorder_begin_recording_with_bbh_factory (sk_picture_recorder_t param0, SKRect* param1, sk_bbh_factory_t param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_picture_recorder_begin_recording_with_bbh_factory (sk_picture_recorder_t param0, SKRect* param1, sk_bbh_factory_t param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8137,8 +10997,13 @@ internal static sk_canvas_t sk_picture_recorder_begin_recording_with_bbh_factory // void sk_picture_recorder_delete(sk_picture_recorder_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_recorder_delete (sk_picture_recorder_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_recorder_delete (sk_picture_recorder_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8151,8 +11016,13 @@ internal static void sk_picture_recorder_delete (sk_picture_recorder_t param0) = // sk_picture_t* sk_picture_recorder_end_recording(sk_picture_recorder_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_t sk_picture_recorder_end_recording (sk_picture_recorder_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_t sk_picture_recorder_end_recording (sk_picture_recorder_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8165,8 +11035,13 @@ internal static sk_picture_t sk_picture_recorder_end_recording (sk_picture_recor // sk_drawable_t* sk_picture_recorder_end_recording_as_drawable(sk_picture_recorder_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_drawable_t sk_picture_recorder_end_recording_as_drawable (sk_picture_recorder_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_drawable_t sk_picture_recorder_end_recording_as_drawable (sk_picture_recorder_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8179,8 +11054,13 @@ internal static sk_drawable_t sk_picture_recorder_end_recording_as_drawable (sk_ // sk_picture_recorder_t* sk_picture_recorder_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_picture_recorder_t sk_picture_recorder_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_picture_recorder_t sk_picture_recorder_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8193,8 +11073,13 @@ internal static sk_picture_recorder_t sk_picture_recorder_new () => // void sk_picture_ref(sk_picture_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_ref (sk_picture_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_ref (sk_picture_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8207,8 +11092,13 @@ internal static void sk_picture_ref (sk_picture_t param0) => // sk_data_t* sk_picture_serialize_to_data(const sk_picture_t* picture) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_picture_serialize_to_data (sk_picture_t picture); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_picture_serialize_to_data (sk_picture_t picture); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8221,8 +11111,13 @@ internal static sk_data_t sk_picture_serialize_to_data (sk_picture_t picture) => // void sk_picture_serialize_to_stream(const sk_picture_t* picture, sk_wstream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_serialize_to_stream (sk_picture_t picture, sk_wstream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_serialize_to_stream (sk_picture_t picture, sk_wstream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8235,8 +11130,13 @@ internal static void sk_picture_serialize_to_stream (sk_picture_t picture, sk_ws // void sk_picture_unref(sk_picture_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_picture_unref (sk_picture_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_picture_unref (sk_picture_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8249,8 +11149,13 @@ internal static void sk_picture_unref (sk_picture_t param0) => // void sk_rtree_factory_delete(sk_rtree_factory_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rtree_factory_delete (sk_rtree_factory_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rtree_factory_delete (sk_rtree_factory_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8263,8 +11168,13 @@ internal static void sk_rtree_factory_delete (sk_rtree_factory_t param0) => // sk_rtree_factory_t* sk_rtree_factory_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_rtree_factory_t sk_rtree_factory_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_rtree_factory_t sk_rtree_factory_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8281,8 +11191,13 @@ internal static sk_rtree_factory_t sk_rtree_factory_new () => // void sk_color_get_bit_shift(int* a, int* r, int* g, int* b) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_color_get_bit_shift (Int32* a, Int32* r, Int32* g, Int32* b); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_color_get_bit_shift (Int32* a, Int32* r, Int32* g, Int32* b); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8295,8 +11210,13 @@ internal static void sk_color_get_bit_shift (Int32* a, Int32* r, Int32* g, Int32 // sk_pmcolor_t sk_color_premultiply(const sk_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_color_premultiply (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_color_premultiply (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8309,8 +11229,13 @@ internal static UInt32 sk_color_premultiply (UInt32 color) => // void sk_color_premultiply_array(const sk_color_t* colors, int size, sk_pmcolor_t* pmcolors) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_color_premultiply_array (UInt32* colors, Int32 size, UInt32* pmcolors); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_color_premultiply_array (UInt32* colors, Int32 size, UInt32* pmcolors); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8323,8 +11248,13 @@ internal static void sk_color_premultiply_array (UInt32* colors, Int32 size, UIn // sk_color_t sk_color_unpremultiply(const sk_pmcolor_t pmcolor) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_color_unpremultiply (UInt32 pmcolor); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_color_unpremultiply (UInt32 pmcolor); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8337,8 +11267,13 @@ internal static UInt32 sk_color_unpremultiply (UInt32 pmcolor) => // void sk_color_unpremultiply_array(const sk_pmcolor_t* pmcolors, int size, sk_color_t* colors) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_color_unpremultiply_array (UInt32* pmcolors, Int32 size, UInt32* colors); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_color_unpremultiply_array (UInt32* pmcolors, Int32 size, UInt32* colors); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8351,9 +11286,15 @@ internal static void sk_color_unpremultiply_array (UInt32* pmcolors, Int32 size, // bool sk_jpegencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_jpegencoder_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_jpegencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKJpegEncoderOptions* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_jpegencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKJpegEncoderOptions* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8367,9 +11308,15 @@ internal static bool sk_jpegencoder_encode (sk_wstream_t dst, sk_pixmap_t src, S // bool sk_pixmap_compute_is_opaque(const sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_compute_is_opaque (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_compute_is_opaque (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8383,8 +11330,13 @@ internal static bool sk_pixmap_compute_is_opaque (sk_pixmap_t cpixmap) => // void sk_pixmap_destructor(sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_destructor (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_destructor (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8397,9 +11349,15 @@ internal static void sk_pixmap_destructor (sk_pixmap_t cpixmap) => // bool sk_pixmap_erase_color(const sk_pixmap_t* cpixmap, sk_color_t color, const sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_erase_color (sk_pixmap_t cpixmap, UInt32 color, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_erase_color (sk_pixmap_t cpixmap, UInt32 color, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8413,9 +11371,15 @@ internal static bool sk_pixmap_erase_color (sk_pixmap_t cpixmap, UInt32 color, S // bool sk_pixmap_erase_color4f(const sk_pixmap_t* cpixmap, const sk_color4f_t* color, const sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_erase_color4f (sk_pixmap_t cpixmap, SKColorF* color, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_erase_color4f (sk_pixmap_t cpixmap, SKColorF* color, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8429,9 +11393,15 @@ internal static bool sk_pixmap_erase_color4f (sk_pixmap_t cpixmap, SKColorF* col // bool sk_pixmap_extract_subset(const sk_pixmap_t* cpixmap, sk_pixmap_t* result, const sk_irect_t* subset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_extract_subset (sk_pixmap_t cpixmap, sk_pixmap_t result, SKRectI* subset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_extract_subset (sk_pixmap_t cpixmap, sk_pixmap_t result, SKRectI* subset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8445,8 +11415,13 @@ internal static bool sk_pixmap_extract_subset (sk_pixmap_t cpixmap, sk_pixmap_t // sk_colorspace_t* sk_pixmap_get_colorspace(const sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorspace_t sk_pixmap_get_colorspace (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorspace_t sk_pixmap_get_colorspace (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8459,8 +11434,13 @@ internal static sk_colorspace_t sk_pixmap_get_colorspace (sk_pixmap_t cpixmap) = // void sk_pixmap_get_info(const sk_pixmap_t* cpixmap, sk_imageinfo_t* cinfo) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_get_info (sk_pixmap_t cpixmap, SKImageInfoNative* cinfo); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_get_info (sk_pixmap_t cpixmap, SKImageInfoNative* cinfo); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8473,8 +11453,13 @@ internal static void sk_pixmap_get_info (sk_pixmap_t cpixmap, SKImageInfoNative* // float sk_pixmap_get_pixel_alphaf(const sk_pixmap_t* cpixmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_pixmap_get_pixel_alphaf (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_pixmap_get_pixel_alphaf (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8487,8 +11472,13 @@ internal static Single sk_pixmap_get_pixel_alphaf (sk_pixmap_t cpixmap, Int32 x, // sk_color_t sk_pixmap_get_pixel_color(const sk_pixmap_t* cpixmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_pixmap_get_pixel_color (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_pixmap_get_pixel_color (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8501,8 +11491,13 @@ internal static UInt32 sk_pixmap_get_pixel_color (sk_pixmap_t cpixmap, Int32 x, // void sk_pixmap_get_pixel_color4f(const sk_pixmap_t* cpixmap, int x, int y, sk_color4f_t* color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_get_pixel_color4f (sk_pixmap_t cpixmap, Int32 x, Int32 y, SKColorF* color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_get_pixel_color4f (sk_pixmap_t cpixmap, Int32 x, Int32 y, SKColorF* color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8515,8 +11510,13 @@ internal static void sk_pixmap_get_pixel_color4f (sk_pixmap_t cpixmap, Int32 x, // size_t sk_pixmap_get_row_bytes(const sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_pixmap_get_row_bytes (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_pixmap_get_row_bytes (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8529,8 +11529,13 @@ private partial class Delegates { // void* sk_pixmap_get_writable_addr(const sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_pixmap_get_writable_addr (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_pixmap_get_writable_addr (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8543,8 +11548,13 @@ private partial class Delegates { // void* sk_pixmap_get_writeable_addr_with_xy(const sk_pixmap_t* cpixmap, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_pixmap_get_writeable_addr_with_xy (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_pixmap_get_writeable_addr_with_xy (sk_pixmap_t cpixmap, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8557,8 +11567,13 @@ private partial class Delegates { // sk_pixmap_t* sk_pixmap_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_pixmap_t sk_pixmap_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_pixmap_t sk_pixmap_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8571,8 +11586,13 @@ internal static sk_pixmap_t sk_pixmap_new () => // sk_pixmap_t* sk_pixmap_new_with_params(const sk_imageinfo_t* cinfo, const void* addr, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_pixmap_t sk_pixmap_new_with_params (SKImageInfoNative* cinfo, void* addr, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_pixmap_t sk_pixmap_new_with_params (SKImageInfoNative* cinfo, void* addr, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8585,9 +11605,15 @@ internal static sk_pixmap_t sk_pixmap_new_with_params (SKImageInfoNative* cinfo, // bool sk_pixmap_read_pixels(const sk_pixmap_t* cpixmap, const sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_read_pixels (sk_pixmap_t cpixmap, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_read_pixels (sk_pixmap_t cpixmap, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8601,8 +11627,13 @@ internal static bool sk_pixmap_read_pixels (sk_pixmap_t cpixmap, SKImageInfoNati // void sk_pixmap_reset(sk_pixmap_t* cpixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_reset (sk_pixmap_t cpixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_reset (sk_pixmap_t cpixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8615,8 +11646,13 @@ internal static void sk_pixmap_reset (sk_pixmap_t cpixmap) => // void sk_pixmap_reset_with_params(sk_pixmap_t* cpixmap, const sk_imageinfo_t* cinfo, const void* addr, size_t rowBytes) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_reset_with_params (sk_pixmap_t cpixmap, SKImageInfoNative* cinfo, void* addr, /* size_t */ IntPtr rowBytes); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_reset_with_params (sk_pixmap_t cpixmap, SKImageInfoNative* cinfo, void* addr, /* size_t */ IntPtr rowBytes); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8629,9 +11665,15 @@ internal static void sk_pixmap_reset_with_params (sk_pixmap_t cpixmap, SKImageIn // bool sk_pixmap_scale_pixels(const sk_pixmap_t* cpixmap, const sk_pixmap_t* dst, const sk_sampling_options_t* sampling) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pixmap_scale_pixels (sk_pixmap_t cpixmap, sk_pixmap_t dst, SKSamplingOptions* sampling); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pixmap_scale_pixels (sk_pixmap_t cpixmap, sk_pixmap_t dst, SKSamplingOptions* sampling); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8645,8 +11687,13 @@ internal static bool sk_pixmap_scale_pixels (sk_pixmap_t cpixmap, sk_pixmap_t ds // void sk_pixmap_set_colorspace(sk_pixmap_t* cpixmap, sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_pixmap_set_colorspace (sk_pixmap_t cpixmap, sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_pixmap_set_colorspace (sk_pixmap_t cpixmap, sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8659,9 +11706,15 @@ internal static void sk_pixmap_set_colorspace (sk_pixmap_t cpixmap, sk_colorspac // bool sk_pngencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_pngencoder_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_pngencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKPngEncoderOptions* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_pngencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKPngEncoderOptions* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8675,8 +11728,13 @@ internal static bool sk_pngencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SK // void sk_swizzle_swap_rb(uint32_t* dest, const uint32_t* src, int count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_swizzle_swap_rb (UInt32* dest, UInt32* src, Int32 count); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_swizzle_swap_rb (UInt32* dest, UInt32* src, Int32 count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8689,9 +11747,15 @@ internal static void sk_swizzle_swap_rb (UInt32* dest, UInt32* src, Int32 count) // bool sk_webpencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_webpencoder_options_t* options) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_webpencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKWebpEncoderOptions* options); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_webpencoder_encode (sk_wstream_t dst, sk_pixmap_t src, SKWebpEncoderOptions* options); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8709,8 +11773,13 @@ internal static bool sk_webpencoder_encode (sk_wstream_t dst, sk_pixmap_t src, S // void sk_region_cliperator_delete(sk_region_cliperator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_cliperator_delete (sk_region_cliperator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_cliperator_delete (sk_region_cliperator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8723,9 +11792,15 @@ internal static void sk_region_cliperator_delete (sk_region_cliperator_t iter) = // bool sk_region_cliperator_done(sk_region_cliperator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_cliperator_done (sk_region_cliperator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_cliperator_done (sk_region_cliperator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8739,8 +11814,13 @@ internal static bool sk_region_cliperator_done (sk_region_cliperator_t iter) => // sk_region_cliperator_t* sk_region_cliperator_new(const sk_region_t* region, const sk_irect_t* clip) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_region_cliperator_t sk_region_cliperator_new (sk_region_t region, SKRectI* clip); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_region_cliperator_t sk_region_cliperator_new (sk_region_t region, SKRectI* clip); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8753,8 +11833,13 @@ internal static sk_region_cliperator_t sk_region_cliperator_new (sk_region_t reg // void sk_region_cliperator_next(sk_region_cliperator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_cliperator_next (sk_region_cliperator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_cliperator_next (sk_region_cliperator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8767,8 +11852,13 @@ internal static void sk_region_cliperator_next (sk_region_cliperator_t iter) => // void sk_region_cliperator_rect(const sk_region_cliperator_t* iter, sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_cliperator_rect (sk_region_cliperator_t iter, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_cliperator_rect (sk_region_cliperator_t iter, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8781,9 +11871,15 @@ internal static void sk_region_cliperator_rect (sk_region_cliperator_t iter, SKR // bool sk_region_contains(const sk_region_t* r, const sk_region_t* region) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_contains (sk_region_t r, sk_region_t region); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_contains (sk_region_t r, sk_region_t region); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8797,9 +11893,15 @@ internal static bool sk_region_contains (sk_region_t r, sk_region_t region) => // bool sk_region_contains_point(const sk_region_t* r, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_contains_point (sk_region_t r, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_contains_point (sk_region_t r, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8813,9 +11915,15 @@ internal static bool sk_region_contains_point (sk_region_t r, Int32 x, Int32 y) // bool sk_region_contains_rect(const sk_region_t* r, const sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_contains_rect (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_contains_rect (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8829,8 +11937,13 @@ internal static bool sk_region_contains_rect (sk_region_t r, SKRectI* rect) => // void sk_region_delete(sk_region_t* r) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_delete (sk_region_t r); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_delete (sk_region_t r); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8843,9 +11956,15 @@ internal static void sk_region_delete (sk_region_t r) => // bool sk_region_get_boundary_path(const sk_region_t* r, sk_path_t* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_get_boundary_path (sk_region_t r, sk_path_t path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_get_boundary_path (sk_region_t r, sk_path_t path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8859,8 +11978,13 @@ internal static bool sk_region_get_boundary_path (sk_region_t r, sk_path_t path) // void sk_region_get_bounds(const sk_region_t* r, sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_get_bounds (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_get_bounds (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8873,9 +11997,15 @@ internal static void sk_region_get_bounds (sk_region_t r, SKRectI* rect) => // bool sk_region_intersects(const sk_region_t* r, const sk_region_t* src) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_intersects (sk_region_t r, sk_region_t src); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_intersects (sk_region_t r, sk_region_t src); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8889,9 +12019,15 @@ internal static bool sk_region_intersects (sk_region_t r, sk_region_t src) => // bool sk_region_intersects_rect(const sk_region_t* r, const sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_intersects_rect (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_intersects_rect (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8905,9 +12041,15 @@ internal static bool sk_region_intersects_rect (sk_region_t r, SKRectI* rect) => // bool sk_region_is_complex(const sk_region_t* r) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_is_complex (sk_region_t r); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_is_complex (sk_region_t r); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8921,9 +12063,15 @@ internal static bool sk_region_is_complex (sk_region_t r) => // bool sk_region_is_empty(const sk_region_t* r) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_is_empty (sk_region_t r); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_is_empty (sk_region_t r); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8937,9 +12085,15 @@ internal static bool sk_region_is_empty (sk_region_t r) => // bool sk_region_is_rect(const sk_region_t* r) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_is_rect (sk_region_t r); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_is_rect (sk_region_t r); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8953,8 +12107,13 @@ internal static bool sk_region_is_rect (sk_region_t r) => // void sk_region_iterator_delete(sk_region_iterator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_iterator_delete (sk_region_iterator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_iterator_delete (sk_region_iterator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8967,9 +12126,15 @@ internal static void sk_region_iterator_delete (sk_region_iterator_t iter) => // bool sk_region_iterator_done(const sk_region_iterator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_iterator_done (sk_region_iterator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_iterator_done (sk_region_iterator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8983,8 +12148,13 @@ internal static bool sk_region_iterator_done (sk_region_iterator_t iter) => // sk_region_iterator_t* sk_region_iterator_new(const sk_region_t* region) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_region_iterator_t sk_region_iterator_new (sk_region_t region); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_region_iterator_t sk_region_iterator_new (sk_region_t region); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -8997,8 +12167,13 @@ internal static sk_region_iterator_t sk_region_iterator_new (sk_region_t region) // void sk_region_iterator_next(sk_region_iterator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_iterator_next (sk_region_iterator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_iterator_next (sk_region_iterator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9011,8 +12186,13 @@ internal static void sk_region_iterator_next (sk_region_iterator_t iter) => // void sk_region_iterator_rect(const sk_region_iterator_t* iter, sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_iterator_rect (sk_region_iterator_t iter, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_iterator_rect (sk_region_iterator_t iter, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9025,9 +12205,15 @@ internal static void sk_region_iterator_rect (sk_region_iterator_t iter, SKRectI // bool sk_region_iterator_rewind(sk_region_iterator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_iterator_rewind (sk_region_iterator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_iterator_rewind (sk_region_iterator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9041,8 +12227,13 @@ internal static bool sk_region_iterator_rewind (sk_region_iterator_t iter) => // sk_region_t* sk_region_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_region_t sk_region_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_region_t sk_region_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9055,9 +12246,15 @@ internal static sk_region_t sk_region_new () => // bool sk_region_op(sk_region_t* r, const sk_region_t* region, sk_region_op_t op) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_op (sk_region_t r, sk_region_t region, SKRegionOperation op); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_op (sk_region_t r, sk_region_t region, SKRegionOperation op); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9071,9 +12268,15 @@ internal static bool sk_region_op (sk_region_t r, sk_region_t region, SKRegionOp // bool sk_region_op_rect(sk_region_t* r, const sk_irect_t* rect, sk_region_op_t op) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_op_rect (sk_region_t r, SKRectI* rect, SKRegionOperation op); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_op_rect (sk_region_t r, SKRectI* rect, SKRegionOperation op); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9087,9 +12290,15 @@ internal static bool sk_region_op_rect (sk_region_t r, SKRectI* rect, SKRegionOp // bool sk_region_quick_contains(const sk_region_t* r, const sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_quick_contains (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_quick_contains (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9103,9 +12312,15 @@ internal static bool sk_region_quick_contains (sk_region_t r, SKRectI* rect) => // bool sk_region_quick_reject(const sk_region_t* r, const sk_region_t* region) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_quick_reject (sk_region_t r, sk_region_t region); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_quick_reject (sk_region_t r, sk_region_t region); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9119,9 +12334,15 @@ internal static bool sk_region_quick_reject (sk_region_t r, sk_region_t region) // bool sk_region_quick_reject_rect(const sk_region_t* r, const sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_quick_reject_rect (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_quick_reject_rect (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9135,9 +12356,15 @@ internal static bool sk_region_quick_reject_rect (sk_region_t r, SKRectI* rect) // bool sk_region_set_empty(sk_region_t* r) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_set_empty (sk_region_t r); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_set_empty (sk_region_t r); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9151,9 +12378,15 @@ internal static bool sk_region_set_empty (sk_region_t r) => // bool sk_region_set_path(sk_region_t* r, const sk_path_t* t, const sk_region_t* clip) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_set_path (sk_region_t r, sk_path_t t, sk_region_t clip); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_set_path (sk_region_t r, sk_path_t t, sk_region_t clip); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9167,9 +12400,15 @@ internal static bool sk_region_set_path (sk_region_t r, sk_path_t t, sk_region_t // bool sk_region_set_rect(sk_region_t* r, const sk_irect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_set_rect (sk_region_t r, SKRectI* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_set_rect (sk_region_t r, SKRectI* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9183,9 +12422,15 @@ internal static bool sk_region_set_rect (sk_region_t r, SKRectI* rect) => // bool sk_region_set_rects(sk_region_t* r, const sk_irect_t* rects, int count) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_set_rects (sk_region_t r, SKRectI* rects, Int32 count); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_set_rects (sk_region_t r, SKRectI* rects, Int32 count); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9199,9 +12444,15 @@ internal static bool sk_region_set_rects (sk_region_t r, SKRectI* rects, Int32 c // bool sk_region_set_region(sk_region_t* r, const sk_region_t* region) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_set_region (sk_region_t r, sk_region_t region); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_set_region (sk_region_t r, sk_region_t region); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9215,8 +12466,13 @@ internal static bool sk_region_set_region (sk_region_t r, sk_region_t region) => // void sk_region_spanerator_delete(sk_region_spanerator_t* iter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_spanerator_delete (sk_region_spanerator_t iter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_spanerator_delete (sk_region_spanerator_t iter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9229,8 +12485,13 @@ internal static void sk_region_spanerator_delete (sk_region_spanerator_t iter) = // sk_region_spanerator_t* sk_region_spanerator_new(const sk_region_t* region, int y, int left, int right) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_region_spanerator_t sk_region_spanerator_new (sk_region_t region, Int32 y, Int32 left, Int32 right); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_region_spanerator_t sk_region_spanerator_new (sk_region_t region, Int32 y, Int32 left, Int32 right); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9243,9 +12504,15 @@ internal static sk_region_spanerator_t sk_region_spanerator_new (sk_region_t reg // bool sk_region_spanerator_next(sk_region_spanerator_t* iter, int* left, int* right) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_region_spanerator_next (sk_region_spanerator_t iter, Int32* left, Int32* right); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_region_spanerator_next (sk_region_spanerator_t iter, Int32* left, Int32* right); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9259,8 +12526,13 @@ internal static bool sk_region_spanerator_next (sk_region_spanerator_t iter, Int // void sk_region_translate(sk_region_t* r, int x, int y) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_region_translate (sk_region_t r, Int32 x, Int32 y); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_region_translate (sk_region_t r, Int32 x, Int32 y); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9277,9 +12549,15 @@ internal static void sk_region_translate (sk_region_t r, Int32 x, Int32 y) => // bool sk_rrect_contains(const sk_rrect_t* rrect, const sk_rect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_rrect_contains (sk_rrect_t rrect, SKRect* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_rrect_contains (sk_rrect_t rrect, SKRect* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9293,8 +12571,13 @@ internal static bool sk_rrect_contains (sk_rrect_t rrect, SKRect* rect) => // void sk_rrect_delete(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_delete (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_delete (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9307,8 +12590,13 @@ internal static void sk_rrect_delete (sk_rrect_t rrect) => // float sk_rrect_get_height(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_rrect_get_height (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_rrect_get_height (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9321,8 +12609,13 @@ internal static Single sk_rrect_get_height (sk_rrect_t rrect) => // void sk_rrect_get_radii(const sk_rrect_t* rrect, sk_rrect_corner_t corner, sk_vector_t* radii) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_get_radii (sk_rrect_t rrect, SKRoundRectCorner corner, SKPoint* radii); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_get_radii (sk_rrect_t rrect, SKRoundRectCorner corner, SKPoint* radii); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9335,8 +12628,13 @@ internal static void sk_rrect_get_radii (sk_rrect_t rrect, SKRoundRectCorner cor // void sk_rrect_get_rect(const sk_rrect_t* rrect, sk_rect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_get_rect (sk_rrect_t rrect, SKRect* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_get_rect (sk_rrect_t rrect, SKRect* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9349,8 +12647,13 @@ internal static void sk_rrect_get_rect (sk_rrect_t rrect, SKRect* rect) => // sk_rrect_type_t sk_rrect_get_type(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKRoundRectType sk_rrect_get_type (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKRoundRectType sk_rrect_get_type (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9363,8 +12666,13 @@ internal static SKRoundRectType sk_rrect_get_type (sk_rrect_t rrect) => // float sk_rrect_get_width(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Single sk_rrect_get_width (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Single sk_rrect_get_width (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9377,8 +12685,13 @@ internal static Single sk_rrect_get_width (sk_rrect_t rrect) => // void sk_rrect_inset(sk_rrect_t* rrect, float dx, float dy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_inset (sk_rrect_t rrect, Single dx, Single dy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_inset (sk_rrect_t rrect, Single dx, Single dy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9391,9 +12704,15 @@ internal static void sk_rrect_inset (sk_rrect_t rrect, Single dx, Single dy) => // bool sk_rrect_is_valid(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_rrect_is_valid (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_rrect_is_valid (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9407,8 +12726,13 @@ internal static bool sk_rrect_is_valid (sk_rrect_t rrect) => // sk_rrect_t* sk_rrect_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_rrect_t sk_rrect_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_rrect_t sk_rrect_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9421,8 +12745,13 @@ internal static sk_rrect_t sk_rrect_new () => // sk_rrect_t* sk_rrect_new_copy(const sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_rrect_t sk_rrect_new_copy (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_rrect_t sk_rrect_new_copy (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9435,8 +12764,13 @@ internal static sk_rrect_t sk_rrect_new_copy (sk_rrect_t rrect) => // void sk_rrect_offset(sk_rrect_t* rrect, float dx, float dy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_offset (sk_rrect_t rrect, Single dx, Single dy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_offset (sk_rrect_t rrect, Single dx, Single dy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9449,8 +12783,13 @@ internal static void sk_rrect_offset (sk_rrect_t rrect, Single dx, Single dy) => // void sk_rrect_outset(sk_rrect_t* rrect, float dx, float dy) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_outset (sk_rrect_t rrect, Single dx, Single dy); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_outset (sk_rrect_t rrect, Single dx, Single dy); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9463,8 +12802,13 @@ internal static void sk_rrect_outset (sk_rrect_t rrect, Single dx, Single dy) => // void sk_rrect_set_empty(sk_rrect_t* rrect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_empty (sk_rrect_t rrect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_empty (sk_rrect_t rrect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9477,8 +12821,13 @@ internal static void sk_rrect_set_empty (sk_rrect_t rrect) => // void sk_rrect_set_nine_patch(sk_rrect_t* rrect, const sk_rect_t* rect, float leftRad, float topRad, float rightRad, float bottomRad) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_nine_patch (sk_rrect_t rrect, SKRect* rect, Single leftRad, Single topRad, Single rightRad, Single bottomRad); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_nine_patch (sk_rrect_t rrect, SKRect* rect, Single leftRad, Single topRad, Single rightRad, Single bottomRad); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9491,8 +12840,13 @@ internal static void sk_rrect_set_nine_patch (sk_rrect_t rrect, SKRect* rect, Si // void sk_rrect_set_oval(sk_rrect_t* rrect, const sk_rect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_oval (sk_rrect_t rrect, SKRect* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_oval (sk_rrect_t rrect, SKRect* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9505,8 +12859,13 @@ internal static void sk_rrect_set_oval (sk_rrect_t rrect, SKRect* rect) => // void sk_rrect_set_rect(sk_rrect_t* rrect, const sk_rect_t* rect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_rect (sk_rrect_t rrect, SKRect* rect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_rect (sk_rrect_t rrect, SKRect* rect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9519,8 +12878,13 @@ internal static void sk_rrect_set_rect (sk_rrect_t rrect, SKRect* rect) => // void sk_rrect_set_rect_radii(sk_rrect_t* rrect, const sk_rect_t* rect, const sk_vector_t* radii) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_rect_radii (sk_rrect_t rrect, SKRect* rect, SKPoint* radii); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_rect_radii (sk_rrect_t rrect, SKRect* rect, SKPoint* radii); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9533,8 +12897,13 @@ internal static void sk_rrect_set_rect_radii (sk_rrect_t rrect, SKRect* rect, SK // void sk_rrect_set_rect_xy(sk_rrect_t* rrect, const sk_rect_t* rect, float xRad, float yRad) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_rrect_set_rect_xy (sk_rrect_t rrect, SKRect* rect, Single xRad, Single yRad); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_rrect_set_rect_xy (sk_rrect_t rrect, SKRect* rect, Single xRad, Single yRad); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9547,9 +12916,15 @@ internal static void sk_rrect_set_rect_xy (sk_rrect_t rrect, SKRect* rect, Singl // bool sk_rrect_transform(sk_rrect_t* rrect, const sk_matrix_t* matrix, sk_rrect_t* dest) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_rrect_transform (sk_rrect_t rrect, SKMatrix* matrix, sk_rrect_t dest); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_rrect_transform (sk_rrect_t rrect, SKMatrix* matrix, sk_rrect_t dest); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9567,8 +12942,13 @@ internal static bool sk_rrect_transform (sk_rrect_t rrect, SKMatrix* matrix, sk_ // void sk_runtimeeffect_get_child_from_index(const sk_runtimeeffect_t* effect, int index, sk_runtimeeffect_child_t* cchild) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_child_from_index (sk_runtimeeffect_t effect, Int32 index, SKRuntimeEffectChildNative* cchild); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_child_from_index (sk_runtimeeffect_t effect, Int32 index, SKRuntimeEffectChildNative* cchild); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9581,8 +12961,13 @@ internal static void sk_runtimeeffect_get_child_from_index (sk_runtimeeffect_t e // void sk_runtimeeffect_get_child_from_name(const sk_runtimeeffect_t* effect, const char* name, size_t len, sk_runtimeeffect_child_t* cchild) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_child_from_name (sk_runtimeeffect_t effect, /* char */ void* name, /* size_t */ IntPtr len, SKRuntimeEffectChildNative* cchild); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_child_from_name (sk_runtimeeffect_t effect, /* char */ void* name, /* size_t */ IntPtr len, SKRuntimeEffectChildNative* cchild); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9595,8 +12980,13 @@ internal static void sk_runtimeeffect_get_child_from_name (sk_runtimeeffect_t ef // void sk_runtimeeffect_get_child_name(const sk_runtimeeffect_t* effect, int index, sk_string_t* name) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_child_name (sk_runtimeeffect_t effect, Int32 index, sk_string_t name); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_child_name (sk_runtimeeffect_t effect, Int32 index, sk_string_t name); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9609,8 +12999,13 @@ internal static void sk_runtimeeffect_get_child_name (sk_runtimeeffect_t effect, // size_t sk_runtimeeffect_get_children_size(const sk_runtimeeffect_t* effect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_runtimeeffect_get_children_size (sk_runtimeeffect_t effect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_runtimeeffect_get_children_size (sk_runtimeeffect_t effect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9623,8 +13018,13 @@ private partial class Delegates { // size_t sk_runtimeeffect_get_uniform_byte_size(const sk_runtimeeffect_t* effect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_runtimeeffect_get_uniform_byte_size (sk_runtimeeffect_t effect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_runtimeeffect_get_uniform_byte_size (sk_runtimeeffect_t effect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9637,8 +13037,13 @@ private partial class Delegates { // void sk_runtimeeffect_get_uniform_from_index(const sk_runtimeeffect_t* effect, int index, sk_runtimeeffect_uniform_t* cuniform) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_uniform_from_index (sk_runtimeeffect_t effect, Int32 index, SKRuntimeEffectUniformNative* cuniform); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_uniform_from_index (sk_runtimeeffect_t effect, Int32 index, SKRuntimeEffectUniformNative* cuniform); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9651,8 +13056,13 @@ internal static void sk_runtimeeffect_get_uniform_from_index (sk_runtimeeffect_t // void sk_runtimeeffect_get_uniform_from_name(const sk_runtimeeffect_t* effect, const char* name, size_t len, sk_runtimeeffect_uniform_t* cuniform) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_uniform_from_name (sk_runtimeeffect_t effect, /* char */ void* name, /* size_t */ IntPtr len, SKRuntimeEffectUniformNative* cuniform); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_uniform_from_name (sk_runtimeeffect_t effect, /* char */ void* name, /* size_t */ IntPtr len, SKRuntimeEffectUniformNative* cuniform); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9665,8 +13075,13 @@ internal static void sk_runtimeeffect_get_uniform_from_name (sk_runtimeeffect_t // void sk_runtimeeffect_get_uniform_name(const sk_runtimeeffect_t* effect, int index, sk_string_t* name) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_get_uniform_name (sk_runtimeeffect_t effect, Int32 index, sk_string_t name); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_get_uniform_name (sk_runtimeeffect_t effect, Int32 index, sk_string_t name); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9679,8 +13094,13 @@ internal static void sk_runtimeeffect_get_uniform_name (sk_runtimeeffect_t effec // size_t sk_runtimeeffect_get_uniforms_size(const sk_runtimeeffect_t* effect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_runtimeeffect_get_uniforms_size (sk_runtimeeffect_t effect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_runtimeeffect_get_uniforms_size (sk_runtimeeffect_t effect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9693,8 +13113,13 @@ private partial class Delegates { // sk_blender_t* sk_runtimeeffect_make_blender(sk_runtimeeffect_t* effect, sk_data_t* uniforms, sk_flattenable_t** children, size_t childCount) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_blender_t sk_runtimeeffect_make_blender (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_blender_t sk_runtimeeffect_make_blender (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9707,8 +13132,13 @@ internal static sk_blender_t sk_runtimeeffect_make_blender (sk_runtimeeffect_t e // sk_colorfilter_t* sk_runtimeeffect_make_color_filter(sk_runtimeeffect_t* effect, sk_data_t* uniforms, sk_flattenable_t** children, size_t childCount) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_colorfilter_t sk_runtimeeffect_make_color_filter (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_colorfilter_t sk_runtimeeffect_make_color_filter (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9721,8 +13151,13 @@ internal static sk_colorfilter_t sk_runtimeeffect_make_color_filter (sk_runtimee // sk_runtimeeffect_t* sk_runtimeeffect_make_for_blender(sk_string_t* sksl, sk_string_t* error) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_runtimeeffect_t sk_runtimeeffect_make_for_blender (sk_string_t sksl, sk_string_t error); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_runtimeeffect_t sk_runtimeeffect_make_for_blender (sk_string_t sksl, sk_string_t error); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9735,8 +13170,13 @@ internal static sk_runtimeeffect_t sk_runtimeeffect_make_for_blender (sk_string_ // sk_runtimeeffect_t* sk_runtimeeffect_make_for_color_filter(sk_string_t* sksl, sk_string_t* error) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_runtimeeffect_t sk_runtimeeffect_make_for_color_filter (sk_string_t sksl, sk_string_t error); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_runtimeeffect_t sk_runtimeeffect_make_for_color_filter (sk_string_t sksl, sk_string_t error); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9749,8 +13189,13 @@ internal static sk_runtimeeffect_t sk_runtimeeffect_make_for_color_filter (sk_st // sk_runtimeeffect_t* sk_runtimeeffect_make_for_shader(sk_string_t* sksl, sk_string_t* error) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_runtimeeffect_t sk_runtimeeffect_make_for_shader (sk_string_t sksl, sk_string_t error); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_runtimeeffect_t sk_runtimeeffect_make_for_shader (sk_string_t sksl, sk_string_t error); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9763,8 +13208,13 @@ internal static sk_runtimeeffect_t sk_runtimeeffect_make_for_shader (sk_string_t // sk_shader_t* sk_runtimeeffect_make_shader(sk_runtimeeffect_t* effect, sk_data_t* uniforms, sk_flattenable_t** children, size_t childCount, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_runtimeeffect_make_shader (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_runtimeeffect_make_shader (sk_runtimeeffect_t effect, sk_data_t uniforms, sk_flattenable_t* children, /* size_t */ IntPtr childCount, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9777,8 +13227,13 @@ internal static sk_shader_t sk_runtimeeffect_make_shader (sk_runtimeeffect_t eff // void sk_runtimeeffect_unref(sk_runtimeeffect_t* effect) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_runtimeeffect_unref (sk_runtimeeffect_t effect); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_runtimeeffect_unref (sk_runtimeeffect_t effect); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9795,8 +13250,13 @@ internal static void sk_runtimeeffect_unref (sk_runtimeeffect_t effect) => // sk_shader_t* sk_shader_new_blend(sk_blendmode_t mode, const sk_shader_t* dst, const sk_shader_t* src) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_blend (SKBlendMode mode, sk_shader_t dst, sk_shader_t src); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_blend (SKBlendMode mode, sk_shader_t dst, sk_shader_t src); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9809,8 +13269,13 @@ internal static sk_shader_t sk_shader_new_blend (SKBlendMode mode, sk_shader_t d // sk_shader_t* sk_shader_new_blender(sk_blender_t* blender, const sk_shader_t* dst, const sk_shader_t* src) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_blender (sk_blender_t blender, sk_shader_t dst, sk_shader_t src); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_blender (sk_blender_t blender, sk_shader_t dst, sk_shader_t src); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9823,8 +13288,13 @@ internal static sk_shader_t sk_shader_new_blender (sk_blender_t blender, sk_shad // sk_shader_t* sk_shader_new_color(sk_color_t color) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_color (UInt32 color); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_color (UInt32 color); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9837,8 +13307,13 @@ internal static sk_shader_t sk_shader_new_color (UInt32 color) => // sk_shader_t* sk_shader_new_color4f(const sk_color4f_t* color, const sk_colorspace_t* colorspace) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_color4f (SKColorF* color, sk_colorspace_t colorspace); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_color4f (SKColorF* color, sk_colorspace_t colorspace); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9851,8 +13326,13 @@ internal static sk_shader_t sk_shader_new_color4f (SKColorF* color, sk_colorspac // sk_shader_t* sk_shader_new_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9865,8 +13345,13 @@ internal static sk_shader_t sk_shader_new_empty () => // sk_shader_t* sk_shader_new_linear_gradient(const sk_point_t[2] points = 2, const sk_color_t[-1] colors, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_linear_gradient (SKPoint* points, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_linear_gradient (SKPoint* points, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9879,8 +13364,13 @@ internal static sk_shader_t sk_shader_new_linear_gradient (SKPoint* points, UInt // sk_shader_t* sk_shader_new_linear_gradient_color4f(const sk_point_t[2] points = 2, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_linear_gradient_color4f (SKPoint* points, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_linear_gradient_color4f (SKPoint* points, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9893,8 +13383,13 @@ internal static sk_shader_t sk_shader_new_linear_gradient_color4f (SKPoint* poin // sk_shader_t* sk_shader_new_perlin_noise_fractal_noise(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const sk_isize_t* tileSize) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_perlin_noise_fractal_noise (Single baseFrequencyX, Single baseFrequencyY, Int32 numOctaves, Single seed, SKSizeI* tileSize); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_perlin_noise_fractal_noise (Single baseFrequencyX, Single baseFrequencyY, Int32 numOctaves, Single seed, SKSizeI* tileSize); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9907,8 +13402,13 @@ internal static sk_shader_t sk_shader_new_perlin_noise_fractal_noise (Single bas // sk_shader_t* sk_shader_new_perlin_noise_turbulence(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const sk_isize_t* tileSize) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_perlin_noise_turbulence (Single baseFrequencyX, Single baseFrequencyY, Int32 numOctaves, Single seed, SKSizeI* tileSize); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_perlin_noise_turbulence (Single baseFrequencyX, Single baseFrequencyY, Int32 numOctaves, Single seed, SKSizeI* tileSize); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9921,8 +13421,13 @@ internal static sk_shader_t sk_shader_new_perlin_noise_turbulence (Single baseFr // sk_shader_t* sk_shader_new_radial_gradient(const sk_point_t* center, float radius, const sk_color_t[-1] colors, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_radial_gradient (SKPoint* center, Single radius, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_radial_gradient (SKPoint* center, Single radius, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9935,8 +13440,13 @@ internal static sk_shader_t sk_shader_new_radial_gradient (SKPoint* center, Sing // sk_shader_t* sk_shader_new_radial_gradient_color4f(const sk_point_t* center, float radius, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_radial_gradient_color4f (SKPoint* center, Single radius, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_radial_gradient_color4f (SKPoint* center, Single radius, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9949,8 +13459,13 @@ internal static sk_shader_t sk_shader_new_radial_gradient_color4f (SKPoint* cent // sk_shader_t* sk_shader_new_sweep_gradient(const sk_point_t* center, const sk_color_t[-1] colors, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_sweep_gradient (SKPoint* center, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, Single startAngle, Single endAngle, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_sweep_gradient (SKPoint* center, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, Single startAngle, Single endAngle, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9963,8 +13478,13 @@ internal static sk_shader_t sk_shader_new_sweep_gradient (SKPoint* center, UInt3 // sk_shader_t* sk_shader_new_sweep_gradient_color4f(const sk_point_t* center, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_sweep_gradient_color4f (SKPoint* center, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, Single startAngle, Single endAngle, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_sweep_gradient_color4f (SKPoint* center, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, Single startAngle, Single endAngle, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9977,8 +13497,13 @@ internal static sk_shader_t sk_shader_new_sweep_gradient_color4f (SKPoint* cente // sk_shader_t* sk_shader_new_two_point_conical_gradient(const sk_point_t* start, float startRadius, const sk_point_t* end, float endRadius, const sk_color_t[-1] colors, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_two_point_conical_gradient (SKPoint* start, Single startRadius, SKPoint* end, Single endRadius, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_two_point_conical_gradient (SKPoint* start, Single startRadius, SKPoint* end, Single endRadius, UInt32* colors, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -9991,8 +13516,13 @@ internal static sk_shader_t sk_shader_new_two_point_conical_gradient (SKPoint* s // sk_shader_t* sk_shader_new_two_point_conical_gradient_color4f(const sk_point_t* start, float startRadius, const sk_point_t* end, float endRadius, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float[-1] colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_new_two_point_conical_gradient_color4f (SKPoint* start, Single startRadius, SKPoint* end, Single endRadius, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_new_two_point_conical_gradient_color4f (SKPoint* start, Single startRadius, SKPoint* end, Single endRadius, SKColorF* colors, sk_colorspace_t colorspace, Single* colorPos, Int32 colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10005,8 +13535,13 @@ internal static sk_shader_t sk_shader_new_two_point_conical_gradient_color4f (SK // void sk_shader_ref(sk_shader_t* shader) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_shader_ref (sk_shader_t shader); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_shader_ref (sk_shader_t shader); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10019,8 +13554,13 @@ internal static void sk_shader_ref (sk_shader_t shader) => // void sk_shader_unref(sk_shader_t* shader) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_shader_unref (sk_shader_t shader); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_shader_unref (sk_shader_t shader); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10033,8 +13573,13 @@ internal static void sk_shader_unref (sk_shader_t shader) => // sk_shader_t* sk_shader_with_color_filter(const sk_shader_t* shader, const sk_colorfilter_t* filter) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_with_color_filter (sk_shader_t shader, sk_colorfilter_t filter); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_with_color_filter (sk_shader_t shader, sk_colorfilter_t filter); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10047,8 +13592,13 @@ internal static sk_shader_t sk_shader_with_color_filter (sk_shader_t shader, sk_ // sk_shader_t* sk_shader_with_local_matrix(const sk_shader_t* shader, const sk_matrix_t* localMatrix) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_shader_t sk_shader_with_local_matrix (sk_shader_t shader, SKMatrix* localMatrix); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_shader_t sk_shader_with_local_matrix (sk_shader_t shader, SKMatrix* localMatrix); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10065,8 +13615,13 @@ internal static sk_shader_t sk_shader_with_local_matrix (sk_shader_t shader, SKM // void sk_dynamicmemorywstream_copy_to(sk_wstream_dynamicmemorystream_t* cstream, void* data) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_dynamicmemorywstream_copy_to (sk_wstream_dynamicmemorystream_t cstream, void* data); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_dynamicmemorywstream_copy_to (sk_wstream_dynamicmemorystream_t cstream, void* data); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10079,8 +13634,13 @@ internal static void sk_dynamicmemorywstream_copy_to (sk_wstream_dynamicmemoryst // void sk_dynamicmemorywstream_destroy(sk_wstream_dynamicmemorystream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_dynamicmemorywstream_destroy (sk_wstream_dynamicmemorystream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_dynamicmemorywstream_destroy (sk_wstream_dynamicmemorystream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10093,8 +13653,13 @@ internal static void sk_dynamicmemorywstream_destroy (sk_wstream_dynamicmemoryst // sk_data_t* sk_dynamicmemorywstream_detach_as_data(sk_wstream_dynamicmemorystream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_dynamicmemorywstream_detach_as_data (sk_wstream_dynamicmemorystream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_dynamicmemorywstream_detach_as_data (sk_wstream_dynamicmemorystream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10107,8 +13672,13 @@ internal static sk_data_t sk_dynamicmemorywstream_detach_as_data (sk_wstream_dyn // sk_stream_asset_t* sk_dynamicmemorywstream_detach_as_stream(sk_wstream_dynamicmemorystream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_asset_t sk_dynamicmemorywstream_detach_as_stream (sk_wstream_dynamicmemorystream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_asset_t sk_dynamicmemorywstream_detach_as_stream (sk_wstream_dynamicmemorystream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10121,8 +13691,13 @@ internal static sk_stream_asset_t sk_dynamicmemorywstream_detach_as_stream (sk_w // sk_wstream_dynamicmemorystream_t* sk_dynamicmemorywstream_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_wstream_dynamicmemorystream_t sk_dynamicmemorywstream_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_wstream_dynamicmemorystream_t sk_dynamicmemorywstream_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10135,9 +13710,15 @@ internal static sk_wstream_dynamicmemorystream_t sk_dynamicmemorywstream_new () // bool sk_dynamicmemorywstream_write_to_stream(sk_wstream_dynamicmemorystream_t* cstream, sk_wstream_t* dst) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_dynamicmemorywstream_write_to_stream (sk_wstream_dynamicmemorystream_t cstream, sk_wstream_t dst); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_dynamicmemorywstream_write_to_stream (sk_wstream_dynamicmemorystream_t cstream, sk_wstream_t dst); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10151,8 +13732,13 @@ internal static bool sk_dynamicmemorywstream_write_to_stream (sk_wstream_dynamic // void sk_filestream_destroy(sk_stream_filestream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_filestream_destroy (sk_stream_filestream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_filestream_destroy (sk_stream_filestream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10165,9 +13751,15 @@ internal static void sk_filestream_destroy (sk_stream_filestream_t cstream) => // bool sk_filestream_is_valid(sk_stream_filestream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_filestream_is_valid (sk_stream_filestream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_filestream_is_valid (sk_stream_filestream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10181,8 +13773,13 @@ internal static bool sk_filestream_is_valid (sk_stream_filestream_t cstream) => // sk_stream_filestream_t* sk_filestream_new(const char* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_filestream_t sk_filestream_new (/* char */ void* path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_filestream_t sk_filestream_new (/* char */ void* path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10195,8 +13792,13 @@ internal static sk_stream_filestream_t sk_filestream_new (/* char */ void* path) // void sk_filewstream_destroy(sk_wstream_filestream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_filewstream_destroy (sk_wstream_filestream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_filewstream_destroy (sk_wstream_filestream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10209,9 +13811,15 @@ internal static void sk_filewstream_destroy (sk_wstream_filestream_t cstream) => // bool sk_filewstream_is_valid(sk_wstream_filestream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_filewstream_is_valid (sk_wstream_filestream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_filewstream_is_valid (sk_wstream_filestream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10225,8 +13833,13 @@ internal static bool sk_filewstream_is_valid (sk_wstream_filestream_t cstream) = // sk_wstream_filestream_t* sk_filewstream_new(const char* path) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_wstream_filestream_t sk_filewstream_new (/* char */ void* path); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_wstream_filestream_t sk_filewstream_new (/* char */ void* path); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10239,8 +13852,13 @@ internal static sk_wstream_filestream_t sk_filewstream_new (/* char */ void* pat // void sk_memorystream_destroy(sk_stream_memorystream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_memorystream_destroy (sk_stream_memorystream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_memorystream_destroy (sk_stream_memorystream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10253,8 +13871,13 @@ internal static void sk_memorystream_destroy (sk_stream_memorystream_t cstream) // sk_stream_memorystream_t* sk_memorystream_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_memorystream_t sk_memorystream_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_memorystream_t sk_memorystream_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10267,8 +13890,13 @@ internal static sk_stream_memorystream_t sk_memorystream_new () => // sk_stream_memorystream_t* sk_memorystream_new_with_data(const void* data, size_t length, bool copyData) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_memorystream_t sk_memorystream_new_with_data (void* data, /* size_t */ IntPtr length, [MarshalAs (UnmanagedType.I1)] bool copyData); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_memorystream_t sk_memorystream_new_with_data (void* data, /* size_t */ IntPtr length, [MarshalAs (UnmanagedType.I1)] bool copyData); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10281,8 +13909,13 @@ internal static sk_stream_memorystream_t sk_memorystream_new_with_data (void* da // sk_stream_memorystream_t* sk_memorystream_new_with_length(size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_memorystream_t sk_memorystream_new_with_length (/* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_memorystream_t sk_memorystream_new_with_length (/* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10295,8 +13928,13 @@ internal static sk_stream_memorystream_t sk_memorystream_new_with_length (/* siz // sk_stream_memorystream_t* sk_memorystream_new_with_skdata(sk_data_t* data) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_memorystream_t sk_memorystream_new_with_skdata (sk_data_t data); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_memorystream_t sk_memorystream_new_with_skdata (sk_data_t data); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10309,8 +13947,13 @@ internal static sk_stream_memorystream_t sk_memorystream_new_with_skdata (sk_dat // void sk_memorystream_set_memory(sk_stream_memorystream_t* cmemorystream, const void* data, size_t length, bool copyData) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_memorystream_set_memory (sk_stream_memorystream_t cmemorystream, void* data, /* size_t */ IntPtr length, [MarshalAs (UnmanagedType.I1)] bool copyData); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_memorystream_set_memory (sk_stream_memorystream_t cmemorystream, void* data, /* size_t */ IntPtr length, [MarshalAs (UnmanagedType.I1)] bool copyData); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10323,8 +13966,13 @@ internal static void sk_memorystream_set_memory (sk_stream_memorystream_t cmemor // void sk_stream_asset_destroy(sk_stream_asset_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_stream_asset_destroy (sk_stream_asset_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_stream_asset_destroy (sk_stream_asset_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10337,8 +13985,13 @@ internal static void sk_stream_asset_destroy (sk_stream_asset_t cstream) => // void sk_stream_destroy(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_stream_destroy (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_stream_destroy (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10351,8 +14004,13 @@ internal static void sk_stream_destroy (sk_stream_t cstream) => // sk_stream_t* sk_stream_duplicate(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_t sk_stream_duplicate (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_t sk_stream_duplicate (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10365,8 +14023,13 @@ internal static sk_stream_t sk_stream_duplicate (sk_stream_t cstream) => // sk_stream_t* sk_stream_fork(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_t sk_stream_fork (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_t sk_stream_fork (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10379,8 +14042,13 @@ internal static sk_stream_t sk_stream_fork (sk_stream_t cstream) => // size_t sk_stream_get_length(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_stream_get_length (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_stream_get_length (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10393,8 +14061,13 @@ private partial class Delegates { // const void* sk_stream_get_memory_base(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void* sk_stream_get_memory_base (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void* sk_stream_get_memory_base (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10407,8 +14080,13 @@ private partial class Delegates { // size_t sk_stream_get_position(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_stream_get_position (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_stream_get_position (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10421,9 +14099,15 @@ private partial class Delegates { // bool sk_stream_has_length(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_has_length (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_has_length (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10437,9 +14121,15 @@ internal static bool sk_stream_has_length (sk_stream_t cstream) => // bool sk_stream_has_position(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_has_position (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_has_position (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10453,9 +14143,15 @@ internal static bool sk_stream_has_position (sk_stream_t cstream) => // bool sk_stream_is_at_end(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_is_at_end (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_is_at_end (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10469,9 +14165,15 @@ internal static bool sk_stream_is_at_end (sk_stream_t cstream) => // bool sk_stream_move(sk_stream_t* cstream, int offset) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_move (sk_stream_t cstream, Int32 offset); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_move (sk_stream_t cstream, Int32 offset); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10485,8 +14187,13 @@ internal static bool sk_stream_move (sk_stream_t cstream, Int32 offset) => // size_t sk_stream_peek(sk_stream_t* cstream, void* buffer, size_t size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_stream_peek (sk_stream_t cstream, void* buffer, /* size_t */ IntPtr size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_stream_peek (sk_stream_t cstream, void* buffer, /* size_t */ IntPtr size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10499,8 +14206,13 @@ private partial class Delegates { // size_t sk_stream_read(sk_stream_t* cstream, void* buffer, size_t size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_stream_read (sk_stream_t cstream, void* buffer, /* size_t */ IntPtr size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_stream_read (sk_stream_t cstream, void* buffer, /* size_t */ IntPtr size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10513,9 +14225,15 @@ private partial class Delegates { // bool sk_stream_read_bool(sk_stream_t* cstream, bool* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_bool (sk_stream_t cstream, Byte* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_bool (sk_stream_t cstream, Byte* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10529,9 +14247,15 @@ internal static bool sk_stream_read_bool (sk_stream_t cstream, Byte* buffer) => // bool sk_stream_read_s16(sk_stream_t* cstream, int16_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_s16 (sk_stream_t cstream, Int16* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_s16 (sk_stream_t cstream, Int16* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10545,9 +14269,15 @@ internal static bool sk_stream_read_s16 (sk_stream_t cstream, Int16* buffer) => // bool sk_stream_read_s32(sk_stream_t* cstream, int32_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_s32 (sk_stream_t cstream, Int32* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_s32 (sk_stream_t cstream, Int32* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10561,9 +14291,15 @@ internal static bool sk_stream_read_s32 (sk_stream_t cstream, Int32* buffer) => // bool sk_stream_read_s8(sk_stream_t* cstream, int8_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_s8 (sk_stream_t cstream, SByte* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_s8 (sk_stream_t cstream, SByte* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10577,9 +14313,15 @@ internal static bool sk_stream_read_s8 (sk_stream_t cstream, SByte* buffer) => // bool sk_stream_read_u16(sk_stream_t* cstream, uint16_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_u16 (sk_stream_t cstream, UInt16* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_u16 (sk_stream_t cstream, UInt16* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10593,9 +14335,15 @@ internal static bool sk_stream_read_u16 (sk_stream_t cstream, UInt16* buffer) => // bool sk_stream_read_u32(sk_stream_t* cstream, uint32_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_u32 (sk_stream_t cstream, UInt32* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_u32 (sk_stream_t cstream, UInt32* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10609,9 +14357,15 @@ internal static bool sk_stream_read_u32 (sk_stream_t cstream, UInt32* buffer) => // bool sk_stream_read_u8(sk_stream_t* cstream, uint8_t* buffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_read_u8 (sk_stream_t cstream, Byte* buffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_read_u8 (sk_stream_t cstream, Byte* buffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10625,9 +14379,15 @@ internal static bool sk_stream_read_u8 (sk_stream_t cstream, Byte* buffer) => // bool sk_stream_rewind(sk_stream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_rewind (sk_stream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_rewind (sk_stream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10641,9 +14401,15 @@ internal static bool sk_stream_rewind (sk_stream_t cstream) => // bool sk_stream_seek(sk_stream_t* cstream, size_t position) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_stream_seek (sk_stream_t cstream, /* size_t */ IntPtr position); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_stream_seek (sk_stream_t cstream, /* size_t */ IntPtr position); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10657,8 +14423,13 @@ internal static bool sk_stream_seek (sk_stream_t cstream, /* size_t */ IntPtr po // size_t sk_stream_skip(sk_stream_t* cstream, size_t size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_stream_skip (sk_stream_t cstream, /* size_t */ IntPtr size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_stream_skip (sk_stream_t cstream, /* size_t */ IntPtr size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10671,8 +14442,13 @@ private partial class Delegates { // size_t sk_wstream_bytes_written(sk_wstream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_wstream_bytes_written (sk_wstream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_wstream_bytes_written (sk_wstream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10685,8 +14461,13 @@ private partial class Delegates { // void sk_wstream_flush(sk_wstream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_wstream_flush (sk_wstream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_wstream_flush (sk_wstream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10699,8 +14480,13 @@ internal static void sk_wstream_flush (sk_wstream_t cstream) => // int sk_wstream_get_size_of_packed_uint(size_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_wstream_get_size_of_packed_uint (/* size_t */ IntPtr value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_wstream_get_size_of_packed_uint (/* size_t */ IntPtr value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10713,9 +14499,15 @@ internal static Int32 sk_wstream_get_size_of_packed_uint (/* size_t */ IntPtr va // bool sk_wstream_newline(sk_wstream_t* cstream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_newline (sk_wstream_t cstream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_newline (sk_wstream_t cstream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10729,9 +14521,15 @@ internal static bool sk_wstream_newline (sk_wstream_t cstream) => // bool sk_wstream_write(sk_wstream_t* cstream, const void* buffer, size_t size) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write (sk_wstream_t cstream, void* buffer, /* size_t */ IntPtr size); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write (sk_wstream_t cstream, void* buffer, /* size_t */ IntPtr size); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10745,9 +14543,15 @@ internal static bool sk_wstream_write (sk_wstream_t cstream, void* buffer, /* si // bool sk_wstream_write_16(sk_wstream_t* cstream, uint16_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_16 (sk_wstream_t cstream, UInt16 value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_16 (sk_wstream_t cstream, UInt16 value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10761,9 +14565,15 @@ internal static bool sk_wstream_write_16 (sk_wstream_t cstream, UInt16 value) => // bool sk_wstream_write_32(sk_wstream_t* cstream, uint32_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_32 (sk_wstream_t cstream, UInt32 value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_32 (sk_wstream_t cstream, UInt32 value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10777,9 +14587,15 @@ internal static bool sk_wstream_write_32 (sk_wstream_t cstream, UInt32 value) => // bool sk_wstream_write_8(sk_wstream_t* cstream, uint8_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_8 (sk_wstream_t cstream, Byte value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_8 (sk_wstream_t cstream, Byte value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10793,9 +14609,15 @@ internal static bool sk_wstream_write_8 (sk_wstream_t cstream, Byte value) => // bool sk_wstream_write_bigdec_as_text(sk_wstream_t* cstream, int64_t value, int minDigits) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_bigdec_as_text (sk_wstream_t cstream, Int64 value, Int32 minDigits); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_bigdec_as_text (sk_wstream_t cstream, Int64 value, Int32 minDigits); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10809,9 +14631,15 @@ internal static bool sk_wstream_write_bigdec_as_text (sk_wstream_t cstream, Int6 // bool sk_wstream_write_bool(sk_wstream_t* cstream, bool value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_bool (sk_wstream_t cstream, [MarshalAs (UnmanagedType.I1)] bool value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_bool (sk_wstream_t cstream, [MarshalAs (UnmanagedType.I1)] bool value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10825,9 +14653,15 @@ internal static bool sk_wstream_write_bool (sk_wstream_t cstream, [MarshalAs (Un // bool sk_wstream_write_dec_as_text(sk_wstream_t* cstream, int32_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_dec_as_text (sk_wstream_t cstream, Int32 value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_dec_as_text (sk_wstream_t cstream, Int32 value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10841,9 +14675,15 @@ internal static bool sk_wstream_write_dec_as_text (sk_wstream_t cstream, Int32 v // bool sk_wstream_write_hex_as_text(sk_wstream_t* cstream, uint32_t value, int minDigits) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_hex_as_text (sk_wstream_t cstream, UInt32 value, Int32 minDigits); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_hex_as_text (sk_wstream_t cstream, UInt32 value, Int32 minDigits); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10857,9 +14697,15 @@ internal static bool sk_wstream_write_hex_as_text (sk_wstream_t cstream, UInt32 // bool sk_wstream_write_packed_uint(sk_wstream_t* cstream, size_t value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_packed_uint (sk_wstream_t cstream, /* size_t */ IntPtr value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_packed_uint (sk_wstream_t cstream, /* size_t */ IntPtr value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10873,9 +14719,15 @@ internal static bool sk_wstream_write_packed_uint (sk_wstream_t cstream, /* size // bool sk_wstream_write_scalar(sk_wstream_t* cstream, float value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_scalar (sk_wstream_t cstream, Single value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_scalar (sk_wstream_t cstream, Single value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10889,9 +14741,15 @@ internal static bool sk_wstream_write_scalar (sk_wstream_t cstream, Single value // bool sk_wstream_write_scalar_as_text(sk_wstream_t* cstream, float value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_scalar_as_text (sk_wstream_t cstream, Single value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_scalar_as_text (sk_wstream_t cstream, Single value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10905,9 +14763,15 @@ internal static bool sk_wstream_write_scalar_as_text (sk_wstream_t cstream, Sing // bool sk_wstream_write_stream(sk_wstream_t* cstream, sk_stream_t* input, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_stream (sk_wstream_t cstream, sk_stream_t input, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_stream (sk_wstream_t cstream, sk_stream_t input, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10921,9 +14785,15 @@ internal static bool sk_wstream_write_stream (sk_wstream_t cstream, sk_stream_t // bool sk_wstream_write_text(sk_wstream_t* cstream, const char* value) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_wstream_write_text (sk_wstream_t cstream, [MarshalAs (UnmanagedType.LPStr)] String value); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_wstream_write_text (sk_wstream_t cstream, [MarshalAs (UnmanagedType.LPStr)] String value); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10941,8 +14811,13 @@ internal static bool sk_wstream_write_text (sk_wstream_t cstream, [MarshalAs (Un // void sk_string_destructor(const sk_string_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_string_destructor (sk_string_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_string_destructor (sk_string_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10955,8 +14830,13 @@ internal static void sk_string_destructor (sk_string_t param0) => // const char* sk_string_get_c_str(const sk_string_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* char */ void* sk_string_get_c_str (sk_string_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* char */ void* sk_string_get_c_str (sk_string_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10969,8 +14849,13 @@ private partial class Delegates { // size_t sk_string_get_size(const sk_string_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_string_get_size (sk_string_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_string_get_size (sk_string_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10983,8 +14868,13 @@ private partial class Delegates { // sk_string_t* sk_string_new_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_string_t sk_string_new_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_string_t sk_string_new_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -10997,8 +14887,13 @@ internal static sk_string_t sk_string_new_empty () => // sk_string_t* sk_string_new_with_copy(const char* src, size_t length) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_string_t sk_string_new_with_copy (/* char */ void* src, /* size_t */ IntPtr length); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_string_t sk_string_new_with_copy (/* char */ void* src, /* size_t */ IntPtr length); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11015,8 +14910,13 @@ internal static sk_string_t sk_string_new_with_copy (/* char */ void* src, /* si // void sk_surface_draw(sk_surface_t* surface, sk_canvas_t* canvas, float x, float y, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_surface_draw (sk_surface_t surface, sk_canvas_t canvas, Single x, Single y, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_surface_draw (sk_surface_t surface, sk_canvas_t canvas, Single x, Single y, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11029,8 +14929,13 @@ internal static void sk_surface_draw (sk_surface_t surface, sk_canvas_t canvas, // void sk_surface_flush(sk_surface_t* surface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_surface_flush (sk_surface_t surface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_surface_flush (sk_surface_t surface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11043,8 +14948,13 @@ internal static void sk_surface_flush (sk_surface_t surface) => // void sk_surface_flush_and_submit(sk_surface_t* surface, bool syncCpu) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_surface_flush_and_submit (sk_surface_t surface, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_surface_flush_and_submit (sk_surface_t surface, [MarshalAs (UnmanagedType.I1)] bool syncCpu); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11057,8 +14967,13 @@ internal static void sk_surface_flush_and_submit (sk_surface_t surface, [Marshal // sk_canvas_t* sk_surface_get_canvas(sk_surface_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_surface_get_canvas (sk_surface_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_surface_get_canvas (sk_surface_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11071,8 +14986,13 @@ internal static sk_canvas_t sk_surface_get_canvas (sk_surface_t param0) => // const sk_surfaceprops_t* sk_surface_get_props(sk_surface_t* surface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surfaceprops_t sk_surface_get_props (sk_surface_t surface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surfaceprops_t sk_surface_get_props (sk_surface_t surface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11085,8 +15005,13 @@ internal static sk_surfaceprops_t sk_surface_get_props (sk_surface_t surface) => // gr_recording_context_t* sk_surface_get_recording_context(sk_surface_t* surface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial gr_recording_context_t sk_surface_get_recording_context (sk_surface_t surface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern gr_recording_context_t sk_surface_get_recording_context (sk_surface_t surface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11099,8 +15024,13 @@ internal static gr_recording_context_t sk_surface_get_recording_context (sk_surf // sk_surface_t* sk_surface_new_backend_render_target(gr_recording_context_t* context, const gr_backendrendertarget_t* target, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_backend_render_target (gr_recording_context_t context, gr_backendrendertarget_t target, GRSurfaceOrigin origin, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_backend_render_target (gr_recording_context_t context, gr_backendrendertarget_t target, GRSurfaceOrigin origin, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11113,8 +15043,13 @@ internal static sk_surface_t sk_surface_new_backend_render_target (gr_recording_ // sk_surface_t* sk_surface_new_backend_texture(gr_recording_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, int samples, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_backend_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, Int32 samples, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_backend_texture (gr_recording_context_t context, gr_backendtexture_t texture, GRSurfaceOrigin origin, Int32 samples, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11127,8 +15062,13 @@ internal static sk_surface_t sk_surface_new_backend_texture (gr_recording_contex // sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_surface_new_image_snapshot (sk_surface_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_surface_new_image_snapshot (sk_surface_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11141,8 +15081,13 @@ internal static sk_image_t sk_surface_new_image_snapshot (sk_surface_t param0) = // sk_image_t* sk_surface_new_image_snapshot_with_crop(sk_surface_t* surface, const sk_irect_t* bounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_image_t sk_surface_new_image_snapshot_with_crop (sk_surface_t surface, SKRectI* bounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_image_t sk_surface_new_image_snapshot_with_crop (sk_surface_t surface, SKRectI* bounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11155,8 +15100,13 @@ internal static sk_image_t sk_surface_new_image_snapshot_with_crop (sk_surface_t // sk_surface_t* sk_surface_new_metal_layer(gr_recording_context_t* context, const void* layer, gr_surfaceorigin_t origin, int sampleCount, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props, const void** drawable) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_metal_layer (gr_recording_context_t context, void* layer, GRSurfaceOrigin origin, Int32 sampleCount, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props, void** drawable); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_metal_layer (gr_recording_context_t context, void* layer, GRSurfaceOrigin origin, Int32 sampleCount, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props, void** drawable); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11169,8 +15119,13 @@ internal static sk_surface_t sk_surface_new_metal_layer (gr_recording_context_t // sk_surface_t* sk_surface_new_metal_view(gr_recording_context_t* context, const void* mtkView, gr_surfaceorigin_t origin, int sampleCount, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_metal_view (gr_recording_context_t context, void* mtkView, GRSurfaceOrigin origin, Int32 sampleCount, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_metal_view (gr_recording_context_t context, void* mtkView, GRSurfaceOrigin origin, Int32 sampleCount, SKColorTypeNative colorType, sk_colorspace_t colorspace, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11183,8 +15138,13 @@ internal static sk_surface_t sk_surface_new_metal_view (gr_recording_context_t c // sk_surface_t* sk_surface_new_null(int width, int height) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_null (Int32 width, Int32 height); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_null (Int32 width, Int32 height); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11197,8 +15157,13 @@ internal static sk_surface_t sk_surface_new_null (Int32 width, Int32 height) => // sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*, size_t rowBytes, const sk_surfaceprops_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_raster (SKImageInfoNative* param0, /* size_t */ IntPtr rowBytes, sk_surfaceprops_t param2); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_raster (SKImageInfoNative* param0, /* size_t */ IntPtr rowBytes, sk_surfaceprops_t param2); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11211,8 +15176,13 @@ internal static sk_surface_t sk_surface_new_raster (SKImageInfoNative* param0, / // sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels, size_t rowBytes, const sk_surface_raster_release_proc releaseProc, void* context, const sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_raster_direct (SKImageInfoNative* param0, void* pixels, /* size_t */ IntPtr rowBytes, void* releaseProc, void* context, sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_raster_direct (SKImageInfoNative* param0, void* pixels, /* size_t */ IntPtr rowBytes, SKSurfaceRasterReleaseProxyDelegate releaseProc, void* context, sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11225,8 +15195,13 @@ internal static sk_surface_t sk_surface_new_raster_direct (SKImageInfoNative* pa // sk_surface_t* sk_surface_new_render_target(gr_recording_context_t* context, bool budgeted, const sk_imageinfo_t* cinfo, int sampleCount, gr_surfaceorigin_t origin, const sk_surfaceprops_t* props, bool shouldCreateWithMips) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surface_t sk_surface_new_render_target (gr_recording_context_t context, [MarshalAs (UnmanagedType.I1)] bool budgeted, SKImageInfoNative* cinfo, Int32 sampleCount, GRSurfaceOrigin origin, sk_surfaceprops_t props, [MarshalAs (UnmanagedType.I1)] bool shouldCreateWithMips); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surface_t sk_surface_new_render_target (gr_recording_context_t context, [MarshalAs (UnmanagedType.I1)] bool budgeted, SKImageInfoNative* cinfo, Int32 sampleCount, GRSurfaceOrigin origin, sk_surfaceprops_t props, [MarshalAs (UnmanagedType.I1)] bool shouldCreateWithMips); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11239,9 +15214,15 @@ internal static sk_surface_t sk_surface_new_render_target (gr_recording_context_ // bool sk_surface_peek_pixels(sk_surface_t* surface, sk_pixmap_t* pixmap) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_surface_peek_pixels (sk_surface_t surface, sk_pixmap_t pixmap); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_surface_peek_pixels (sk_surface_t surface, sk_pixmap_t pixmap); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11255,9 +15236,15 @@ internal static bool sk_surface_peek_pixels (sk_surface_t surface, sk_pixmap_t p // bool sk_surface_read_pixels(sk_surface_t* surface, sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_surface_read_pixels (sk_surface_t surface, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_surface_read_pixels (sk_surface_t surface, SKImageInfoNative* dstInfo, void* dstPixels, /* size_t */ IntPtr dstRowBytes, Int32 srcX, Int32 srcY); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11271,8 +15258,13 @@ internal static bool sk_surface_read_pixels (sk_surface_t surface, SKImageInfoNa // void sk_surface_unref(sk_surface_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_surface_unref (sk_surface_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_surface_unref (sk_surface_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11285,8 +15277,13 @@ internal static void sk_surface_unref (sk_surface_t param0) => // void sk_surfaceprops_delete(sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_surfaceprops_delete (sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_surfaceprops_delete (sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11299,8 +15296,13 @@ internal static void sk_surfaceprops_delete (sk_surfaceprops_t props) => // uint32_t sk_surfaceprops_get_flags(sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_surfaceprops_get_flags (sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_surfaceprops_get_flags (sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11313,8 +15315,13 @@ internal static UInt32 sk_surfaceprops_get_flags (sk_surfaceprops_t props) => // sk_pixelgeometry_t sk_surfaceprops_get_pixel_geometry(sk_surfaceprops_t* props) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKPixelGeometry sk_surfaceprops_get_pixel_geometry (sk_surfaceprops_t props); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKPixelGeometry sk_surfaceprops_get_pixel_geometry (sk_surfaceprops_t props); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11327,8 +15334,13 @@ internal static SKPixelGeometry sk_surfaceprops_get_pixel_geometry (sk_surfacepr // sk_surfaceprops_t* sk_surfaceprops_new(uint32_t flags, sk_pixelgeometry_t geometry) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_surfaceprops_t sk_surfaceprops_new (UInt32 flags, SKPixelGeometry geometry); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_surfaceprops_t sk_surfaceprops_new (UInt32 flags, SKPixelGeometry geometry); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11345,8 +15357,13 @@ internal static sk_surfaceprops_t sk_surfaceprops_new (UInt32 flags, SKPixelGeom // sk_canvas_t* sk_svgcanvas_create_with_stream(const sk_rect_t* bounds, sk_wstream_t* stream) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_canvas_t sk_svgcanvas_create_with_stream (SKRect* bounds, sk_wstream_t stream); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_canvas_t sk_svgcanvas_create_with_stream (SKRect* bounds, sk_wstream_t stream); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11363,8 +15380,13 @@ internal static sk_canvas_t sk_svgcanvas_create_with_stream (SKRect* bounds, sk_ // void sk_textblob_builder_alloc_run(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float x, float y, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single x, Single y, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single x, Single y, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11377,8 +15399,13 @@ internal static void sk_textblob_builder_alloc_run (sk_textblob_builder_t builde // void sk_textblob_builder_alloc_run_pos(sk_textblob_builder_t* builder, const sk_font_t* font, int count, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_pos (sk_textblob_builder_t builder, sk_font_t font, Int32 count, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_pos (sk_textblob_builder_t builder, sk_font_t font, Int32 count, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11391,8 +15418,13 @@ internal static void sk_textblob_builder_alloc_run_pos (sk_textblob_builder_t bu // void sk_textblob_builder_alloc_run_pos_h(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float y, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_pos_h (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single y, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_pos_h (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single y, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11405,8 +15437,13 @@ internal static void sk_textblob_builder_alloc_run_pos_h (sk_textblob_builder_t // void sk_textblob_builder_alloc_run_rsxform(sk_textblob_builder_t* builder, const sk_font_t* font, int count, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_rsxform (sk_textblob_builder_t builder, sk_font_t font, Int32 count, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_rsxform (sk_textblob_builder_t builder, sk_font_t font, Int32 count, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11419,8 +15456,13 @@ internal static void sk_textblob_builder_alloc_run_rsxform (sk_textblob_builder_ // void sk_textblob_builder_alloc_run_text(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float x, float y, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_text (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single x, Single y, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_text (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single x, Single y, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11433,8 +15475,13 @@ internal static void sk_textblob_builder_alloc_run_text (sk_textblob_builder_t b // void sk_textblob_builder_alloc_run_text_pos(sk_textblob_builder_t* builder, const sk_font_t* font, int count, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_text_pos (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_text_pos (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11447,8 +15494,13 @@ internal static void sk_textblob_builder_alloc_run_text_pos (sk_textblob_builder // void sk_textblob_builder_alloc_run_text_pos_h(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float y, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_text_pos_h (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single y, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_text_pos_h (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Single y, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11461,8 +15513,13 @@ internal static void sk_textblob_builder_alloc_run_text_pos_h (sk_textblob_build // void sk_textblob_builder_alloc_run_text_rsxform(sk_textblob_builder_t* builder, const sk_font_t* font, int count, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_alloc_run_text_rsxform (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_alloc_run_text_rsxform (sk_textblob_builder_t builder, sk_font_t font, Int32 count, Int32 textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11475,8 +15532,13 @@ internal static void sk_textblob_builder_alloc_run_text_rsxform (sk_textblob_bui // void sk_textblob_builder_delete(sk_textblob_builder_t* builder) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_builder_delete (sk_textblob_builder_t builder); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_builder_delete (sk_textblob_builder_t builder); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11489,8 +15551,13 @@ internal static void sk_textblob_builder_delete (sk_textblob_builder_t builder) // sk_textblob_t* sk_textblob_builder_make(sk_textblob_builder_t* builder) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_textblob_t sk_textblob_builder_make (sk_textblob_builder_t builder); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_textblob_t sk_textblob_builder_make (sk_textblob_builder_t builder); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11503,8 +15570,13 @@ internal static sk_textblob_t sk_textblob_builder_make (sk_textblob_builder_t bu // sk_textblob_builder_t* sk_textblob_builder_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_textblob_builder_t sk_textblob_builder_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_textblob_builder_t sk_textblob_builder_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11517,8 +15589,13 @@ internal static sk_textblob_builder_t sk_textblob_builder_new () => // void sk_textblob_get_bounds(const sk_textblob_t* blob, sk_rect_t* bounds) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_get_bounds (sk_textblob_t blob, SKRect* bounds); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_get_bounds (sk_textblob_t blob, SKRect* bounds); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11531,8 +15608,13 @@ internal static void sk_textblob_get_bounds (sk_textblob_t blob, SKRect* bounds) // int sk_textblob_get_intercepts(const sk_textblob_t* blob, const float[2] bounds = 2, float[-1] intervals, const sk_paint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_textblob_get_intercepts (sk_textblob_t blob, Single* bounds, Single* intervals, sk_paint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_textblob_get_intercepts (sk_textblob_t blob, Single* bounds, Single* intervals, sk_paint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11545,8 +15627,13 @@ internal static Int32 sk_textblob_get_intercepts (sk_textblob_t blob, Single* bo // uint32_t sk_textblob_get_unique_id(const sk_textblob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt32 sk_textblob_get_unique_id (sk_textblob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt32 sk_textblob_get_unique_id (sk_textblob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11559,8 +15646,13 @@ internal static UInt32 sk_textblob_get_unique_id (sk_textblob_t blob) => // void sk_textblob_ref(const sk_textblob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_ref (sk_textblob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_ref (sk_textblob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11573,8 +15665,13 @@ internal static void sk_textblob_ref (sk_textblob_t blob) => // void sk_textblob_unref(const sk_textblob_t* blob) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_textblob_unref (sk_textblob_t blob); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_textblob_unref (sk_textblob_t blob); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11591,8 +15688,13 @@ internal static void sk_textblob_unref (sk_textblob_t blob) => // int sk_fontmgr_count_families(sk_fontmgr_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_fontmgr_count_families (sk_fontmgr_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_fontmgr_count_families (sk_fontmgr_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11605,8 +15707,13 @@ internal static Int32 sk_fontmgr_count_families (sk_fontmgr_t param0) => // sk_fontmgr_t* sk_fontmgr_create_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontmgr_t sk_fontmgr_create_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontmgr_t sk_fontmgr_create_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11619,8 +15726,13 @@ internal static sk_fontmgr_t sk_fontmgr_create_default () => // sk_typeface_t* sk_fontmgr_create_from_data(sk_fontmgr_t*, sk_data_t* data, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontmgr_create_from_data (sk_fontmgr_t param0, sk_data_t data, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontmgr_create_from_data (sk_fontmgr_t param0, sk_data_t data, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11633,8 +15745,13 @@ internal static sk_typeface_t sk_fontmgr_create_from_data (sk_fontmgr_t param0, // sk_typeface_t* sk_fontmgr_create_from_file(sk_fontmgr_t*, const char* path, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontmgr_create_from_file (sk_fontmgr_t param0, /* char */ void* path, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontmgr_create_from_file (sk_fontmgr_t param0, /* char */ void* path, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11647,8 +15764,13 @@ internal static sk_typeface_t sk_fontmgr_create_from_file (sk_fontmgr_t param0, // sk_typeface_t* sk_fontmgr_create_from_stream(sk_fontmgr_t*, sk_stream_asset_t* stream, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontmgr_create_from_stream (sk_fontmgr_t param0, sk_stream_asset_t stream, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontmgr_create_from_stream (sk_fontmgr_t param0, sk_stream_asset_t stream, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11661,8 +15783,13 @@ internal static sk_typeface_t sk_fontmgr_create_from_stream (sk_fontmgr_t param0 // sk_fontstyleset_t* sk_fontmgr_create_styleset(sk_fontmgr_t*, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontstyleset_t sk_fontmgr_create_styleset (sk_fontmgr_t param0, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontstyleset_t sk_fontmgr_create_styleset (sk_fontmgr_t param0, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11675,8 +15802,13 @@ internal static sk_fontstyleset_t sk_fontmgr_create_styleset (sk_fontmgr_t param // void sk_fontmgr_get_family_name(sk_fontmgr_t*, int index, sk_string_t* familyName) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_fontmgr_get_family_name (sk_fontmgr_t param0, Int32 index, sk_string_t familyName); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_fontmgr_get_family_name (sk_fontmgr_t param0, Int32 index, sk_string_t familyName); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11689,8 +15821,13 @@ internal static void sk_fontmgr_get_family_name (sk_fontmgr_t param0, Int32 inde // sk_fontstyleset_t* sk_fontmgr_match_family(sk_fontmgr_t*, const char* familyName) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontstyleset_t sk_fontmgr_match_family (sk_fontmgr_t param0, IntPtr familyName); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontstyleset_t sk_fontmgr_match_family (sk_fontmgr_t param0, IntPtr familyName); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11703,8 +15840,13 @@ internal static sk_fontstyleset_t sk_fontmgr_match_family (sk_fontmgr_t param0, // sk_typeface_t* sk_fontmgr_match_family_style(sk_fontmgr_t*, const char* familyName, sk_fontstyle_t* style) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontmgr_match_family_style (sk_fontmgr_t param0, IntPtr familyName, sk_fontstyle_t style); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontmgr_match_family_style (sk_fontmgr_t param0, IntPtr familyName, sk_fontstyle_t style); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11717,8 +15859,13 @@ internal static sk_typeface_t sk_fontmgr_match_family_style (sk_fontmgr_t param0 // sk_typeface_t* sk_fontmgr_match_family_style_character(sk_fontmgr_t*, const char* familyName, sk_fontstyle_t* style, const char** bcp47, int bcp47Count, int32_t character) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontmgr_match_family_style_character (sk_fontmgr_t param0, IntPtr familyName, sk_fontstyle_t style, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] bcp47, Int32 bcp47Count, Int32 character); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontmgr_match_family_style_character (sk_fontmgr_t param0, IntPtr familyName, sk_fontstyle_t style, [MarshalAs (UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] bcp47, Int32 bcp47Count, Int32 character); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11731,8 +15878,13 @@ internal static sk_typeface_t sk_fontmgr_match_family_style_character (sk_fontmg // sk_fontmgr_t* sk_fontmgr_ref_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontmgr_t sk_fontmgr_ref_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontmgr_t sk_fontmgr_ref_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11745,8 +15897,13 @@ internal static sk_fontmgr_t sk_fontmgr_ref_default () => // void sk_fontmgr_unref(sk_fontmgr_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_fontmgr_unref (sk_fontmgr_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_fontmgr_unref (sk_fontmgr_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11759,8 +15916,13 @@ internal static void sk_fontmgr_unref (sk_fontmgr_t param0) => // void sk_fontstyle_delete(sk_fontstyle_t* fs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_fontstyle_delete (sk_fontstyle_t fs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_fontstyle_delete (sk_fontstyle_t fs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11773,8 +15935,13 @@ internal static void sk_fontstyle_delete (sk_fontstyle_t fs) => // sk_font_style_slant_t sk_fontstyle_get_slant(const sk_fontstyle_t* fs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKFontStyleSlant sk_fontstyle_get_slant (sk_fontstyle_t fs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKFontStyleSlant sk_fontstyle_get_slant (sk_fontstyle_t fs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11787,8 +15954,13 @@ internal static SKFontStyleSlant sk_fontstyle_get_slant (sk_fontstyle_t fs) => // int sk_fontstyle_get_weight(const sk_fontstyle_t* fs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_fontstyle_get_weight (sk_fontstyle_t fs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_fontstyle_get_weight (sk_fontstyle_t fs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11801,8 +15973,13 @@ internal static Int32 sk_fontstyle_get_weight (sk_fontstyle_t fs) => // int sk_fontstyle_get_width(const sk_fontstyle_t* fs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_fontstyle_get_width (sk_fontstyle_t fs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_fontstyle_get_width (sk_fontstyle_t fs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11815,8 +15992,13 @@ internal static Int32 sk_fontstyle_get_width (sk_fontstyle_t fs) => // sk_fontstyle_t* sk_fontstyle_new(int weight, int width, sk_font_style_slant_t slant) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontstyle_t sk_fontstyle_new (Int32 weight, Int32 width, SKFontStyleSlant slant); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontstyle_t sk_fontstyle_new (Int32 weight, Int32 width, SKFontStyleSlant slant); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11829,8 +16011,13 @@ internal static sk_fontstyle_t sk_fontstyle_new (Int32 weight, Int32 width, SKFo // sk_fontstyleset_t* sk_fontstyleset_create_empty() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontstyleset_t sk_fontstyleset_create_empty (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontstyleset_t sk_fontstyleset_create_empty (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11843,8 +16030,13 @@ internal static sk_fontstyleset_t sk_fontstyleset_create_empty () => // sk_typeface_t* sk_fontstyleset_create_typeface(sk_fontstyleset_t* fss, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontstyleset_create_typeface (sk_fontstyleset_t fss, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontstyleset_create_typeface (sk_fontstyleset_t fss, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11857,8 +16049,13 @@ internal static sk_typeface_t sk_fontstyleset_create_typeface (sk_fontstyleset_t // int sk_fontstyleset_get_count(sk_fontstyleset_t* fss) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_fontstyleset_get_count (sk_fontstyleset_t fss); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_fontstyleset_get_count (sk_fontstyleset_t fss); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11871,8 +16068,13 @@ internal static Int32 sk_fontstyleset_get_count (sk_fontstyleset_t fss) => // void sk_fontstyleset_get_style(sk_fontstyleset_t* fss, int index, sk_fontstyle_t* fs, sk_string_t* style) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_fontstyleset_get_style (sk_fontstyleset_t fss, Int32 index, sk_fontstyle_t fs, sk_string_t style); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_fontstyleset_get_style (sk_fontstyleset_t fss, Int32 index, sk_fontstyle_t fs, sk_string_t style); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11885,8 +16087,13 @@ internal static void sk_fontstyleset_get_style (sk_fontstyleset_t fss, Int32 ind // sk_typeface_t* sk_fontstyleset_match_style(sk_fontstyleset_t* fss, sk_fontstyle_t* style) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_fontstyleset_match_style (sk_fontstyleset_t fss, sk_fontstyle_t style); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_fontstyleset_match_style (sk_fontstyleset_t fss, sk_fontstyle_t style); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11899,8 +16106,13 @@ internal static sk_typeface_t sk_fontstyleset_match_style (sk_fontstyleset_t fss // void sk_fontstyleset_unref(sk_fontstyleset_t* fss) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_fontstyleset_unref (sk_fontstyleset_t fss); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_fontstyleset_unref (sk_fontstyleset_t fss); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11913,8 +16125,13 @@ internal static void sk_fontstyleset_unref (sk_fontstyleset_t fss) => // sk_data_t* sk_typeface_copy_table_data(const sk_typeface_t* typeface, sk_font_table_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_data_t sk_typeface_copy_table_data (sk_typeface_t typeface, UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_data_t sk_typeface_copy_table_data (sk_typeface_t typeface, UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11927,8 +16144,13 @@ internal static sk_data_t sk_typeface_copy_table_data (sk_typeface_t typeface, U // int sk_typeface_count_glyphs(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_count_glyphs (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_count_glyphs (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11941,8 +16163,13 @@ internal static Int32 sk_typeface_count_glyphs (sk_typeface_t typeface) => // int sk_typeface_count_tables(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_count_tables (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_count_tables (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11955,8 +16182,13 @@ internal static Int32 sk_typeface_count_tables (sk_typeface_t typeface) => // sk_typeface_t* sk_typeface_create_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_create_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_create_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11969,8 +16201,13 @@ internal static sk_typeface_t sk_typeface_create_default () => // sk_typeface_t* sk_typeface_create_from_data(sk_data_t* data, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_create_from_data (sk_data_t data, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_create_from_data (sk_data_t data, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11983,8 +16220,13 @@ internal static sk_typeface_t sk_typeface_create_from_data (sk_data_t data, Int3 // sk_typeface_t* sk_typeface_create_from_file(const char* path, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_create_from_file (/* char */ void* path, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_create_from_file (/* char */ void* path, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -11997,8 +16239,13 @@ internal static sk_typeface_t sk_typeface_create_from_file (/* char */ void* pat // sk_typeface_t* sk_typeface_create_from_name(const char* familyName, const sk_fontstyle_t* style) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_create_from_name (IntPtr familyName, sk_fontstyle_t style); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_create_from_name (IntPtr familyName, sk_fontstyle_t style); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12011,8 +16258,13 @@ internal static sk_typeface_t sk_typeface_create_from_name (IntPtr familyName, s // sk_typeface_t* sk_typeface_create_from_stream(sk_stream_asset_t* stream, int index) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_create_from_stream (sk_stream_asset_t stream, Int32 index); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_create_from_stream (sk_stream_asset_t stream, Int32 index); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12025,8 +16277,13 @@ internal static sk_typeface_t sk_typeface_create_from_stream (sk_stream_asset_t // sk_string_t* sk_typeface_get_family_name(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_string_t sk_typeface_get_family_name (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_string_t sk_typeface_get_family_name (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12039,8 +16296,13 @@ internal static sk_string_t sk_typeface_get_family_name (sk_typeface_t typeface) // sk_font_style_slant_t sk_typeface_get_font_slant(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKFontStyleSlant sk_typeface_get_font_slant (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKFontStyleSlant sk_typeface_get_font_slant (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12053,8 +16315,13 @@ internal static SKFontStyleSlant sk_typeface_get_font_slant (sk_typeface_t typef // int sk_typeface_get_font_weight(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_get_font_weight (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_get_font_weight (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12067,8 +16334,13 @@ internal static Int32 sk_typeface_get_font_weight (sk_typeface_t typeface) => // int sk_typeface_get_font_width(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_get_font_width (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_get_font_width (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12081,8 +16353,13 @@ internal static Int32 sk_typeface_get_font_width (sk_typeface_t typeface) => // sk_fontstyle_t* sk_typeface_get_fontstyle(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_fontstyle_t sk_typeface_get_fontstyle (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_fontstyle_t sk_typeface_get_fontstyle (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12095,9 +16372,15 @@ internal static sk_fontstyle_t sk_typeface_get_fontstyle (sk_typeface_t typeface // bool sk_typeface_get_kerning_pair_adjustments(const sk_typeface_t* typeface, const uint16_t[-1] glyphs, int count, int32_t[-1] adjustments) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_typeface_get_kerning_pair_adjustments (sk_typeface_t typeface, UInt16* glyphs, Int32 count, Int32* adjustments); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_typeface_get_kerning_pair_adjustments (sk_typeface_t typeface, UInt16* glyphs, Int32 count, Int32* adjustments); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12111,8 +16394,13 @@ internal static bool sk_typeface_get_kerning_pair_adjustments (sk_typeface_t typ // size_t sk_typeface_get_table_data(const sk_typeface_t* typeface, sk_font_table_tag_t tag, size_t offset, size_t length, void* data) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_typeface_get_table_data (sk_typeface_t typeface, UInt32 tag, /* size_t */ IntPtr offset, /* size_t */ IntPtr length, void* data); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_typeface_get_table_data (sk_typeface_t typeface, UInt32 tag, /* size_t */ IntPtr offset, /* size_t */ IntPtr length, void* data); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12125,8 +16413,13 @@ private partial class Delegates { // size_t sk_typeface_get_table_size(const sk_typeface_t* typeface, sk_font_table_tag_t tag) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial /* size_t */ IntPtr sk_typeface_get_table_size (sk_typeface_t typeface, UInt32 tag); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern /* size_t */ IntPtr sk_typeface_get_table_size (sk_typeface_t typeface, UInt32 tag); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12139,8 +16432,13 @@ private partial class Delegates { // int sk_typeface_get_table_tags(const sk_typeface_t* typeface, sk_font_table_tag_t[-1] tags) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_get_table_tags (sk_typeface_t typeface, UInt32* tags); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_get_table_tags (sk_typeface_t typeface, UInt32* tags); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12153,8 +16451,13 @@ internal static Int32 sk_typeface_get_table_tags (sk_typeface_t typeface, UInt32 // int sk_typeface_get_units_per_em(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_typeface_get_units_per_em (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_typeface_get_units_per_em (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12167,9 +16470,15 @@ internal static Int32 sk_typeface_get_units_per_em (sk_typeface_t typeface) => // bool sk_typeface_is_fixed_pitch(const sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_typeface_is_fixed_pitch (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_typeface_is_fixed_pitch (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12183,8 +16492,13 @@ internal static bool sk_typeface_is_fixed_pitch (sk_typeface_t typeface) => // sk_stream_asset_t* sk_typeface_open_stream(const sk_typeface_t* typeface, int* ttcIndex) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_asset_t sk_typeface_open_stream (sk_typeface_t typeface, Int32* ttcIndex); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_asset_t sk_typeface_open_stream (sk_typeface_t typeface, Int32* ttcIndex); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12197,8 +16511,13 @@ internal static sk_stream_asset_t sk_typeface_open_stream (sk_typeface_t typefac // sk_typeface_t* sk_typeface_ref_default() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_typeface_t sk_typeface_ref_default (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_typeface_t sk_typeface_ref_default (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12211,8 +16530,13 @@ internal static sk_typeface_t sk_typeface_ref_default () => // uint16_t sk_typeface_unichar_to_glyph(const sk_typeface_t* typeface, const int32_t unichar) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial UInt16 sk_typeface_unichar_to_glyph (sk_typeface_t typeface, Int32 unichar); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern UInt16 sk_typeface_unichar_to_glyph (sk_typeface_t typeface, Int32 unichar); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12225,8 +16549,13 @@ internal static UInt16 sk_typeface_unichar_to_glyph (sk_typeface_t typeface, Int // void sk_typeface_unichars_to_glyphs(const sk_typeface_t* typeface, const int32_t[-1] unichars, int count, uint16_t[-1] glyphs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_typeface_unichars_to_glyphs (sk_typeface_t typeface, Int32* unichars, Int32 count, UInt16* glyphs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_typeface_unichars_to_glyphs (sk_typeface_t typeface, Int32* unichars, Int32 count, UInt16* glyphs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12239,8 +16568,13 @@ internal static void sk_typeface_unichars_to_glyphs (sk_typeface_t typeface, Int // void sk_typeface_unref(sk_typeface_t* typeface) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_typeface_unref (sk_typeface_t typeface); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_typeface_unref (sk_typeface_t typeface); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12257,8 +16591,13 @@ internal static void sk_typeface_unref (sk_typeface_t typeface) => // sk_vertices_t* sk_vertices_make_copy(sk_vertices_vertex_mode_t vmode, int vertexCount, const sk_point_t* positions, const sk_point_t* texs, const sk_color_t* colors, int indexCount, const uint16_t* indices) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_vertices_t sk_vertices_make_copy (SKVertexMode vmode, Int32 vertexCount, SKPoint* positions, SKPoint* texs, UInt32* colors, Int32 indexCount, UInt16* indices); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_vertices_t sk_vertices_make_copy (SKVertexMode vmode, Int32 vertexCount, SKPoint* positions, SKPoint* texs, UInt32* colors, Int32 indexCount, UInt16* indices); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12271,8 +16610,13 @@ internal static sk_vertices_t sk_vertices_make_copy (SKVertexMode vmode, Int32 v // void sk_vertices_ref(sk_vertices_t* cvertices) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_vertices_ref (sk_vertices_t cvertices); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_vertices_ref (sk_vertices_t cvertices); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12285,8 +16629,13 @@ internal static void sk_vertices_ref (sk_vertices_t cvertices) => // void sk_vertices_unref(sk_vertices_t* cvertices) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_vertices_unref (sk_vertices_t cvertices); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_vertices_unref (sk_vertices_t cvertices); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12303,8 +16652,13 @@ internal static void sk_vertices_unref (sk_vertices_t cvertices) => // sk_compatpaint_t* sk_compatpaint_clone(const sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_compatpaint_t sk_compatpaint_clone (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_compatpaint_t sk_compatpaint_clone (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12317,8 +16671,13 @@ internal static sk_compatpaint_t sk_compatpaint_clone (sk_compatpaint_t paint) = // void sk_compatpaint_delete(sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_delete (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_delete (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12331,8 +16690,13 @@ internal static void sk_compatpaint_delete (sk_compatpaint_t paint) => // int sk_compatpaint_get_filter_quality(const sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial Int32 sk_compatpaint_get_filter_quality (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern Int32 sk_compatpaint_get_filter_quality (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12345,8 +16709,13 @@ internal static Int32 sk_compatpaint_get_filter_quality (sk_compatpaint_t paint) // sk_font_t* sk_compatpaint_get_font(sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_font_t sk_compatpaint_get_font (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_font_t sk_compatpaint_get_font (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12359,9 +16728,15 @@ internal static sk_font_t sk_compatpaint_get_font (sk_compatpaint_t paint) => // bool sk_compatpaint_get_lcd_render_text(const sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + [return: MarshalAs (UnmanagedType.I1)] + internal static partial bool sk_compatpaint_get_lcd_render_text (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.I1)] internal static extern bool sk_compatpaint_get_lcd_render_text (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12375,8 +16750,13 @@ internal static bool sk_compatpaint_get_lcd_render_text (sk_compatpaint_t paint) // sk_text_align_t sk_compatpaint_get_text_align(const sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKTextAlign sk_compatpaint_get_text_align (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKTextAlign sk_compatpaint_get_text_align (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12389,8 +16769,13 @@ internal static SKTextAlign sk_compatpaint_get_text_align (sk_compatpaint_t pain // sk_text_encoding_t sk_compatpaint_get_text_encoding(const sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial SKTextEncoding sk_compatpaint_get_text_encoding (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern SKTextEncoding sk_compatpaint_get_text_encoding (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12403,8 +16788,13 @@ internal static SKTextEncoding sk_compatpaint_get_text_encoding (sk_compatpaint_ // sk_font_t* sk_compatpaint_make_font(sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_font_t sk_compatpaint_make_font (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_font_t sk_compatpaint_make_font (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12417,8 +16807,13 @@ internal static sk_font_t sk_compatpaint_make_font (sk_compatpaint_t paint) => // sk_compatpaint_t* sk_compatpaint_new() #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_compatpaint_t sk_compatpaint_new (); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_compatpaint_t sk_compatpaint_new (); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12431,8 +16826,13 @@ internal static sk_compatpaint_t sk_compatpaint_new () => // sk_compatpaint_t* sk_compatpaint_new_with_font(const sk_font_t* font) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_compatpaint_t sk_compatpaint_new_with_font (sk_font_t font); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_compatpaint_t sk_compatpaint_new_with_font (sk_font_t font); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12445,8 +16845,13 @@ internal static sk_compatpaint_t sk_compatpaint_new_with_font (sk_font_t font) = // void sk_compatpaint_reset(sk_compatpaint_t* paint) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_reset (sk_compatpaint_t paint); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_reset (sk_compatpaint_t paint); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12459,8 +16864,13 @@ internal static void sk_compatpaint_reset (sk_compatpaint_t paint) => // void sk_compatpaint_set_filter_quality(sk_compatpaint_t* paint, int quality) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_set_filter_quality (sk_compatpaint_t paint, Int32 quality); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_set_filter_quality (sk_compatpaint_t paint, Int32 quality); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12473,8 +16883,13 @@ internal static void sk_compatpaint_set_filter_quality (sk_compatpaint_t paint, // void sk_compatpaint_set_is_antialias(sk_compatpaint_t* paint, bool antialias) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_set_is_antialias (sk_compatpaint_t paint, [MarshalAs (UnmanagedType.I1)] bool antialias); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_set_is_antialias (sk_compatpaint_t paint, [MarshalAs (UnmanagedType.I1)] bool antialias); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12487,8 +16902,13 @@ internal static void sk_compatpaint_set_is_antialias (sk_compatpaint_t paint, [M // void sk_compatpaint_set_lcd_render_text(sk_compatpaint_t* paint, bool lcdRenderText) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_set_lcd_render_text (sk_compatpaint_t paint, [MarshalAs (UnmanagedType.I1)] bool lcdRenderText); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_set_lcd_render_text (sk_compatpaint_t paint, [MarshalAs (UnmanagedType.I1)] bool lcdRenderText); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12501,8 +16921,13 @@ internal static void sk_compatpaint_set_lcd_render_text (sk_compatpaint_t paint, // void sk_compatpaint_set_text_align(sk_compatpaint_t* paint, sk_text_align_t align) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_set_text_align (sk_compatpaint_t paint, SKTextAlign align); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_set_text_align (sk_compatpaint_t paint, SKTextAlign align); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12515,8 +16940,13 @@ internal static void sk_compatpaint_set_text_align (sk_compatpaint_t paint, SKTe // void sk_compatpaint_set_text_encoding(sk_compatpaint_t* paint, sk_text_encoding_t encoding) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_compatpaint_set_text_encoding (sk_compatpaint_t paint, SKTextEncoding encoding); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_compatpaint_set_text_encoding (sk_compatpaint_t paint, SKTextEncoding encoding); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12533,8 +16963,13 @@ internal static void sk_compatpaint_set_text_encoding (sk_compatpaint_t paint, S // sk_manageddrawable_t* sk_manageddrawable_new(void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_manageddrawable_t sk_manageddrawable_new (void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_manageddrawable_t sk_manageddrawable_new (void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12547,8 +16982,13 @@ internal static sk_manageddrawable_t sk_manageddrawable_new (void* context) => // void sk_manageddrawable_set_procs(sk_manageddrawable_procs_t procs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_manageddrawable_set_procs (SKManagedDrawableDelegates procs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_manageddrawable_set_procs (SKManagedDrawableDelegates procs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12561,8 +17001,13 @@ internal static void sk_manageddrawable_set_procs (SKManagedDrawableDelegates pr // void sk_manageddrawable_unref(sk_manageddrawable_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_manageddrawable_unref (sk_manageddrawable_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_manageddrawable_unref (sk_manageddrawable_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12579,8 +17024,13 @@ internal static void sk_manageddrawable_unref (sk_manageddrawable_t param0) => // void sk_managedstream_destroy(sk_stream_managedstream_t* s) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedstream_destroy (sk_stream_managedstream_t s); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedstream_destroy (sk_stream_managedstream_t s); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12593,8 +17043,13 @@ internal static void sk_managedstream_destroy (sk_stream_managedstream_t s) => // sk_stream_managedstream_t* sk_managedstream_new(void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_stream_managedstream_t sk_managedstream_new (void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_stream_managedstream_t sk_managedstream_new (void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12607,8 +17062,13 @@ internal static sk_stream_managedstream_t sk_managedstream_new (void* context) = // void sk_managedstream_set_procs(sk_managedstream_procs_t procs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedstream_set_procs (SKManagedStreamDelegates procs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedstream_set_procs (SKManagedStreamDelegates procs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12621,8 +17081,13 @@ internal static void sk_managedstream_set_procs (SKManagedStreamDelegates procs) // void sk_managedwstream_destroy(sk_wstream_managedstream_t* s) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedwstream_destroy (sk_wstream_managedstream_t s); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedwstream_destroy (sk_wstream_managedstream_t s); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12635,8 +17100,13 @@ internal static void sk_managedwstream_destroy (sk_wstream_managedstream_t s) => // sk_wstream_managedstream_t* sk_managedwstream_new(void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_wstream_managedstream_t sk_managedwstream_new (void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_wstream_managedstream_t sk_managedwstream_new (void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12649,8 +17119,13 @@ internal static sk_wstream_managedstream_t sk_managedwstream_new (void* context) // void sk_managedwstream_set_procs(sk_managedwstream_procs_t procs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedwstream_set_procs (SKManagedWStreamDelegates procs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedwstream_set_procs (SKManagedWStreamDelegates procs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12667,8 +17142,13 @@ internal static void sk_managedwstream_set_procs (SKManagedWStreamDelegates proc // void sk_managedtracememorydump_delete(sk_managedtracememorydump_t*) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedtracememorydump_delete (sk_managedtracememorydump_t param0); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedtracememorydump_delete (sk_managedtracememorydump_t param0); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12681,8 +17161,13 @@ internal static void sk_managedtracememorydump_delete (sk_managedtracememorydump // sk_managedtracememorydump_t* sk_managedtracememorydump_new(bool detailed, bool dumpWrapped, void* context) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial sk_managedtracememorydump_t sk_managedtracememorydump_new ([MarshalAs (UnmanagedType.I1)] bool detailed, [MarshalAs (UnmanagedType.I1)] bool dumpWrapped, void* context); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern sk_managedtracememorydump_t sk_managedtracememorydump_new ([MarshalAs (UnmanagedType.I1)] bool detailed, [MarshalAs (UnmanagedType.I1)] bool dumpWrapped, void* context); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12695,8 +17180,13 @@ internal static sk_managedtracememorydump_t sk_managedtracememorydump_new ([Mars // void sk_managedtracememorydump_set_procs(sk_managedtracememorydump_procs_t procs) #if !USE_DELEGATES + #if USE_LIBRARY_IMPORT + [LibraryImport (SKIA)] + internal static partial void sk_managedtracememorydump_set_procs (SKManagedTraceMemoryDumpDelegates procs); + #else // !USE_LIBRARY_IMPORT [DllImport (SKIA, CallingConvention = CallingConvention.Cdecl)] internal static extern void sk_managedtracememorydump_set_procs (SKManagedTraceMemoryDumpDelegates procs); + #endif #else private partial class Delegates { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] @@ -12715,6 +17205,7 @@ internal static void sk_managedtracememorydump_set_procs (SKManagedTraceMemoryDu #endregion Functions #region Delegates +#if !USE_LIBRARY_IMPORT namespace SkiaSharp { // typedef void (*)()* gr_gl_func_ptr @@ -12862,6 +17353,7 @@ namespace SkiaSharp { } +#endif // !USE_LIBRARY_IMPORT #endregion #region Structs @@ -12890,7 +17382,9 @@ internal unsafe partial struct GRContextOptionsNative : IEquatable +#pragma warning disable CS8909 fAvoidStencilBuffers == obj.fAvoidStencilBuffers && fRuntimeProgramCacheSize == obj.fRuntimeProgramCacheSize && fGlyphCacheTextureMaximumBytes == obj.fGlyphCacheTextureMaximumBytes && fAllowPathMaskCaching == obj.fAllowPathMaskCaching && fDoManualMipmapping == obj.fDoManualMipmapping && fBufferMapThreshold == obj.fBufferMapThreshold; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRContextOptionsNative f && Equals (f); @@ -12940,7 +17434,9 @@ public bool Protected { } public readonly bool Equals (GRGlFramebufferInfo obj) => +#pragma warning disable CS8909 fFBOID == obj.fFBOID && fFormat == obj.fFormat && fProtected == obj.fProtected; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRGlFramebufferInfo f && Equals (f); @@ -12994,7 +17490,9 @@ public bool Protected { } public readonly bool Equals (GRGlTextureInfo obj) => +#pragma warning disable CS8909 fTarget == obj.fTarget && fID == obj.fID && fFormat == obj.fFormat && fProtected == obj.fProtected; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRGlTextureInfo f && Equals (f); @@ -13024,7 +17522,9 @@ internal unsafe partial struct GRMtlTextureInfoNative : IEquatable +#pragma warning disable CS8909 fTexture == obj.fTexture; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRMtlTextureInfoNative f && Equals (f); @@ -13086,7 +17586,9 @@ public IntPtr BackendMemory { private Byte fUsesSystemHeap; public readonly bool Equals (GRVkAlloc obj) => +#pragma warning disable CS8909 fMemory == obj.fMemory && fOffset == obj.fOffset && fSize == obj.fSize && fFlags == obj.fFlags && fBackendMemory == obj.fBackendMemory && fUsesSystemHeap == obj.fUsesSystemHeap; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRVkAlloc f && Equals (f); @@ -13157,7 +17659,11 @@ internal unsafe partial struct GRVkBackendContextNative : IEquatable fGetProc; +#else public GRVkGetProcProxyDelegate fGetProc; +#endif // public void* fGetProcUserData public void* fGetProcUserData; @@ -13169,7 +17675,9 @@ internal unsafe partial struct GRVkBackendContextNative : IEquatable +#pragma warning disable CS8909 fInstance == obj.fInstance && fPhysicalDevice == obj.fPhysicalDevice && fDevice == obj.fDevice && fQueue == obj.fQueue && fGraphicsQueueIndex == obj.fGraphicsQueueIndex && fMinAPIVersion == obj.fMinAPIVersion && fInstanceVersion == obj.fInstanceVersion && fMaxAPIVersion == obj.fMaxAPIVersion && fExtensions == obj.fExtensions && fVkExtensions == obj.fVkExtensions && fFeatures == obj.fFeatures && fDeviceFeatures == obj.fDeviceFeatures && fDeviceFeatures2 == obj.fDeviceFeatures2 && fMemoryAllocator == obj.fMemoryAllocator && fGetProc == obj.fGetProc && fGetProcUserData == obj.fGetProcUserData && fOwnsInstanceAndDevice == obj.fOwnsInstanceAndDevice && fProtectedContext == obj.fProtectedContext; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRVkBackendContextNative f && Equals (f); @@ -13294,7 +17802,9 @@ public UInt32 SharingMode { } public readonly bool Equals (GRVkImageInfo obj) => +#pragma warning disable CS8909 fImage == obj.fImage && fAlloc == obj.fAlloc && fImageTiling == obj.fImageTiling && fImageLayout == obj.fImageLayout && fFormat == obj.fFormat && fImageUsageFlags == obj.fImageUsageFlags && fSampleCount == obj.fSampleCount && fLevelCount == obj.fLevelCount && fCurrentQueueFamily == obj.fCurrentQueueFamily && fProtected == obj.fProtected && fYcbcrConversionInfo == obj.fYcbcrConversionInfo && fSharingMode == obj.fSharingMode; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GRVkImageInfo f && Equals (f); @@ -13392,7 +17902,9 @@ public UInt32 FormatFeatures { } public readonly bool Equals (GrVkYcbcrConversionInfo obj) => +#pragma warning disable CS8909 fFormat == obj.fFormat && fExternalFormat == obj.fExternalFormat && fYcbcrModel == obj.fYcbcrModel && fYcbcrRange == obj.fYcbcrRange && fXChromaOffset == obj.fXChromaOffset && fYChromaOffset == obj.fYChromaOffset && fChromaFilter == obj.fChromaFilter && fForceExplicitReconstruction == obj.fForceExplicitReconstruction && fFormatFeatures == obj.fFormatFeatures; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is GrVkYcbcrConversionInfo f && Equals (f); @@ -13480,7 +17992,9 @@ public SKRectI FrameRect { } public readonly bool Equals (SKCodecFrameInfo obj) => +#pragma warning disable CS8909 fRequiredFrame == obj.fRequiredFrame && fDuration == obj.fDuration && fFullyReceived == obj.fFullyReceived && fAlphaType == obj.fAlphaType && fHasAlphaWithinBounds == obj.fHasAlphaWithinBounds && fDisposalMethod == obj.fDisposalMethod && fBlend == obj.fBlend && fFrameRect == obj.fFrameRect; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKCodecFrameInfo f && Equals (f); @@ -13523,7 +18037,9 @@ internal unsafe partial struct SKCodecOptionsInternal : IEquatable +#pragma warning disable CS8909 fZeroInitialized == obj.fZeroInitialized && fSubset == obj.fSubset && fFrameIndex == obj.fFrameIndex && fPriorFrame == obj.fPriorFrame; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKCodecOptionsInternal f && Equals (f); @@ -13566,7 +18082,9 @@ public readonly override int GetHashCode () public readonly Single Alpha => fA; public readonly bool Equals (SKColorF obj) => +#pragma warning disable CS8909 fR == obj.fR && fG == obj.fG && fB == obj.fB && fA == obj.fA; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKColorF f && Equals (f); @@ -13649,7 +18167,9 @@ public Single WY { } public readonly bool Equals (SKColorSpacePrimaries obj) => +#pragma warning disable CS8909 fRX == obj.fRX && fRY == obj.fRY && fGX == obj.fGX && fGY == obj.fGY && fBX == obj.fBX && fBY == obj.fBY && fWX == obj.fWX && fWY == obj.fWY; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKColorSpacePrimaries f && Equals (f); @@ -13729,7 +18249,9 @@ public Single F { } public readonly bool Equals (SKColorSpaceTransferFn obj) => +#pragma warning disable CS8909 fG == obj.fG && fA == obj.fA && fB == obj.fB && fC == obj.fC && fD == obj.fD && fE == obj.fE && fF == obj.fF; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKColorSpaceTransferFn f && Equals (f); @@ -13786,7 +18308,9 @@ public unsafe partial struct SKColorSpaceXyz : IEquatable { private Single fM22; public readonly bool Equals (SKColorSpaceXyz obj) => +#pragma warning disable CS8909 fM00 == obj.fM00 && fM01 == obj.fM01 && fM02 == obj.fM02 && fM10 == obj.fM10 && fM11 == obj.fM11 && fM12 == obj.fM12 && fM20 == obj.fM20 && fM21 == obj.fM21 && fM22 == obj.fM22; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKColorSpaceXyz f && Equals (f); @@ -13826,7 +18350,9 @@ public readonly override int GetHashCode () public readonly Single C => fC; public readonly bool Equals (SKCubicResampler obj) => +#pragma warning disable CS8909 fB == obj.fB && fC == obj.fC; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKCubicResampler f && Equals (f); @@ -13884,7 +18410,9 @@ internal unsafe partial struct SKDocumentPdfMetadataInternal : IEquatable +#pragma warning disable CS8909 fTitle == obj.fTitle && fAuthor == obj.fAuthor && fSubject == obj.fSubject && fKeywords == obj.fKeywords && fCreator == obj.fCreator && fProducer == obj.fProducer && fCreation == obj.fCreation && fModified == obj.fModified && fRasterDPI == obj.fRasterDPI && fPDFA == obj.fPDFA && fEncodingQuality == obj.fEncodingQuality; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKDocumentPdfMetadataInternal f && Equals (f); @@ -13966,7 +18494,9 @@ public unsafe partial struct SKFontMetrics : IEquatable { private Single fStrikeoutPosition; public readonly bool Equals (SKFontMetrics obj) => +#pragma warning disable CS8909 fFlags == obj.fFlags && fTop == obj.fTop && fAscent == obj.fAscent && fDescent == obj.fDescent && fBottom == obj.fBottom && fLeading == obj.fLeading && fAvgCharWidth == obj.fAvgCharWidth && fMaxCharWidth == obj.fMaxCharWidth && fXMin == obj.fXMin && fXMax == obj.fXMax && fXHeight == obj.fXHeight && fCapHeight == obj.fCapHeight && fUnderlineThickness == obj.fUnderlineThickness && fUnderlinePosition == obj.fUnderlinePosition && fStrikeoutThickness == obj.fStrikeoutThickness && fStrikeoutPosition == obj.fStrikeoutPosition; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKFontMetrics f && Equals (f); @@ -14026,7 +18556,9 @@ public Single Contrast { } public readonly bool Equals (SKHighContrastConfig obj) => +#pragma warning disable CS8909 fGrayscale == obj.fGrayscale && fInvertStyle == obj.fInvertStyle && fContrast == obj.fContrast; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKHighContrastConfig f && Equals (f); @@ -14067,7 +18599,9 @@ internal unsafe partial struct SKImageInfoNative : IEquatable public SKAlphaType alphaType; public readonly bool Equals (SKImageInfoNative obj) => +#pragma warning disable CS8909 colorspace == obj.colorspace && width == obj.width && height == obj.height && colorType == obj.colorType && alphaType == obj.alphaType; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKImageInfoNative f && Equals (f); @@ -14109,7 +18643,9 @@ public Int32 Y { } public readonly bool Equals (SKPointI obj) => +#pragma warning disable CS8909 x == obj.x && y == obj.y; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKPointI f && Equals (f); @@ -14162,7 +18698,9 @@ public Int32 Bottom { } public readonly bool Equals (SKRectI obj) => +#pragma warning disable CS8909 left == obj.left && top == obj.top && right == obj.right && bottom == obj.bottom; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRectI f && Equals (f); @@ -14203,7 +18741,9 @@ public Int32 Height { } public readonly bool Equals (SKSizeI obj) => +#pragma warning disable CS8909 w == obj.w && h == obj.h; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKSizeI f && Equals (f); @@ -14246,7 +18786,9 @@ public readonly override int GetHashCode () private readonly /* char */ void* fICCProfileDescription; public readonly bool Equals (SKJpegEncoderOptions obj) => +#pragma warning disable CS8909 fQuality == obj.fQuality && fDownsample == obj.fDownsample && fAlphaOption == obj.fAlphaOption && xmpMetadata == obj.xmpMetadata && fICCProfile == obj.fICCProfile && fICCProfileDescription == obj.fICCProfileDescription; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKJpegEncoderOptions f && Equals (f); @@ -14296,7 +18838,9 @@ internal unsafe partial struct SKLatticeInternal : IEquatable public UInt32* fColors; public readonly bool Equals (SKLatticeInternal obj) => +#pragma warning disable CS8909 fXDivs == obj.fXDivs && fYDivs == obj.fYDivs && fRectTypes == obj.fRectTypes && fXCount == obj.fXCount && fYCount == obj.fYCount && fBounds == obj.fBounds && fColors == obj.fColors; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKLatticeInternal f && Equals (f); @@ -14326,22 +18870,44 @@ public readonly override int GetHashCode () [StructLayout (LayoutKind.Sequential)] internal unsafe partial struct SKManagedDrawableDelegates : IEquatable { // public sk_manageddrawable_draw_proc fDraw +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDraw; +#else public SKManagedDrawableDrawProxyDelegate fDraw; +#endif // public sk_manageddrawable_getBounds_proc fGetBounds +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fGetBounds; +#else public SKManagedDrawableGetBoundsProxyDelegate fGetBounds; +#endif // public sk_manageddrawable_approximateBytesUsed_proc fApproximateBytesUsed +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fApproximateBytesUsed; +#else public SKManagedDrawableApproximateBytesUsedProxyDelegate fApproximateBytesUsed; +#endif // public sk_manageddrawable_makePictureSnapshot_proc fMakePictureSnapshot +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fMakePictureSnapshot; +#else public SKManagedDrawableMakePictureSnapshotProxyDelegate fMakePictureSnapshot; +#endif // public sk_manageddrawable_destroy_proc fDestroy +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDestroy; +#else public SKManagedDrawableDestroyProxyDelegate fDestroy; +#endif public readonly bool Equals (SKManagedDrawableDelegates obj) => +#pragma warning disable CS8909 fDraw == obj.fDraw && fGetBounds == obj.fGetBounds && fApproximateBytesUsed == obj.fApproximateBytesUsed && fMakePictureSnapshot == obj.fMakePictureSnapshot && fDestroy == obj.fDestroy; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKManagedDrawableDelegates f && Equals (f); @@ -14369,46 +18935,100 @@ public readonly override int GetHashCode () [StructLayout (LayoutKind.Sequential)] internal unsafe partial struct SKManagedStreamDelegates : IEquatable { // public sk_managedstream_read_proc fRead +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fRead; +#else public SKManagedStreamReadProxyDelegate fRead; +#endif // public sk_managedstream_peek_proc fPeek +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fPeek; +#else public SKManagedStreamPeekProxyDelegate fPeek; +#endif // public sk_managedstream_isAtEnd_proc fIsAtEnd +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fIsAtEnd; +#else public SKManagedStreamIsAtEndProxyDelegate fIsAtEnd; +#endif // public sk_managedstream_hasPosition_proc fHasPosition +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fHasPosition; +#else public SKManagedStreamHasPositionProxyDelegate fHasPosition; +#endif // public sk_managedstream_hasLength_proc fHasLength +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fHasLength; +#else public SKManagedStreamHasLengthProxyDelegate fHasLength; +#endif // public sk_managedstream_rewind_proc fRewind +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fRewind; +#else public SKManagedStreamRewindProxyDelegate fRewind; +#endif // public sk_managedstream_getPosition_proc fGetPosition +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fGetPosition; +#else public SKManagedStreamGetPositionProxyDelegate fGetPosition; +#endif // public sk_managedstream_seek_proc fSeek +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fSeek; +#else public SKManagedStreamSeekProxyDelegate fSeek; +#endif // public sk_managedstream_move_proc fMove +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fMove; +#else public SKManagedStreamMoveProxyDelegate fMove; +#endif // public sk_managedstream_getLength_proc fGetLength +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fGetLength; +#else public SKManagedStreamGetLengthProxyDelegate fGetLength; +#endif // public sk_managedstream_duplicate_proc fDuplicate +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDuplicate; +#else public SKManagedStreamDuplicateProxyDelegate fDuplicate; +#endif // public sk_managedstream_fork_proc fFork +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fFork; +#else public SKManagedStreamForkProxyDelegate fFork; +#endif // public sk_managedstream_destroy_proc fDestroy +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDestroy; +#else public SKManagedStreamDestroyProxyDelegate fDestroy; +#endif public readonly bool Equals (SKManagedStreamDelegates obj) => +#pragma warning disable CS8909 fRead == obj.fRead && fPeek == obj.fPeek && fIsAtEnd == obj.fIsAtEnd && fHasPosition == obj.fHasPosition && fHasLength == obj.fHasLength && fRewind == obj.fRewind && fGetPosition == obj.fGetPosition && fSeek == obj.fSeek && fMove == obj.fMove && fGetLength == obj.fGetLength && fDuplicate == obj.fDuplicate && fFork == obj.fFork && fDestroy == obj.fDestroy; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKManagedStreamDelegates f && Equals (f); @@ -14444,13 +19064,23 @@ public readonly override int GetHashCode () [StructLayout (LayoutKind.Sequential)] internal unsafe partial struct SKManagedTraceMemoryDumpDelegates : IEquatable { // public sk_managedtraceMemoryDump_dumpNumericValue_proc fDumpNumericValue +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDumpNumericValue; +#else public SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate fDumpNumericValue; +#endif // public sk_managedtraceMemoryDump_dumpStringValue_proc fDumpStringValue +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDumpStringValue; +#else public SKManagedTraceMemoryDumpDumpStringValueProxyDelegate fDumpStringValue; +#endif public readonly bool Equals (SKManagedTraceMemoryDumpDelegates obj) => +#pragma warning disable CS8909 fDumpNumericValue == obj.fDumpNumericValue && fDumpStringValue == obj.fDumpStringValue; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKManagedTraceMemoryDumpDelegates f && Equals (f); @@ -14475,19 +19105,37 @@ public readonly override int GetHashCode () [StructLayout (LayoutKind.Sequential)] internal unsafe partial struct SKManagedWStreamDelegates : IEquatable { // public sk_managedwstream_write_proc fWrite +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fWrite; +#else public SKManagedWStreamWriteProxyDelegate fWrite; +#endif // public sk_managedwstream_flush_proc fFlush +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fFlush; +#else public SKManagedWStreamFlushProxyDelegate fFlush; +#endif // public sk_managedwstream_bytesWritten_proc fBytesWritten +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fBytesWritten; +#else public SKManagedWStreamBytesWrittenProxyDelegate fBytesWritten; +#endif // public sk_managedwstream_destroy_proc fDestroy +#if USE_LIBRARY_IMPORT + public delegate* unmanaged[Cdecl] fDestroy; +#else public SKManagedWStreamDestroyProxyDelegate fDestroy; +#endif public readonly bool Equals (SKManagedWStreamDelegates obj) => +#pragma warning disable CS8909 fWrite == obj.fWrite && fFlush == obj.fFlush && fBytesWritten == obj.fBytesWritten && fDestroy == obj.fDestroy; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKManagedWStreamDelegates f && Equals (f); @@ -14577,7 +19225,9 @@ public Single Persp2 { } public readonly bool Equals (SKMatrix obj) => +#pragma warning disable CS8909 scaleX == obj.scaleX && skewX == obj.skewX && transX == obj.transX && skewY == obj.skewY && scaleY == obj.scaleY && transY == obj.transY && persp0 == obj.persp0 && persp1 == obj.persp1 && persp2 == obj.persp2; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKMatrix f && Equals (f); @@ -14721,7 +19371,9 @@ public Single M33 { } public readonly bool Equals (SKMatrix44 obj) => +#pragma warning disable CS8909 m00 == obj.m00 && m01 == obj.m01 && m02 == obj.m02 && m03 == obj.m03 && m10 == obj.m10 && m11 == obj.m11 && m12 == obj.m12 && m13 == obj.m13 && m20 == obj.m20 && m21 == obj.m21 && m22 == obj.m22 && m23 == obj.m23 && m30 == obj.m30 && m31 == obj.m31 && m32 == obj.m32 && m33 == obj.m33; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKMatrix44 f && Equals (f); @@ -14775,7 +19427,9 @@ public readonly override int GetHashCode () private readonly /* char */ void* fICCProfileDescription; public readonly bool Equals (SKPngEncoderOptions obj) => +#pragma warning disable CS8909 fFilterFlags == obj.fFilterFlags && fZLibLevel == obj.fZLibLevel && fComments == obj.fComments && fICCProfile == obj.fICCProfile && fICCProfileDescription == obj.fICCProfileDescription; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKPngEncoderOptions f && Equals (f); @@ -14817,7 +19471,9 @@ public Single Y { } public readonly bool Equals (SKPoint obj) => +#pragma warning disable CS8909 x == obj.x && y == obj.y; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKPoint f && Equals (f); @@ -14863,7 +19519,9 @@ public Single Z { } public readonly bool Equals (SKPoint3 obj) => +#pragma warning disable CS8909 x == obj.x && y == obj.y && z == obj.z; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKPoint3 f && Equals (f); @@ -14917,7 +19575,9 @@ public Single Bottom { } public readonly bool Equals (SKRect obj) => +#pragma warning disable CS8909 left == obj.left && top == obj.top && right == obj.right && bottom == obj.bottom; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRect f && Equals (f); @@ -14972,7 +19632,9 @@ public Single TY { } public readonly bool Equals (SKRotationScaleMatrix obj) => +#pragma warning disable CS8909 fSCos == obj.fSCos && fSSin == obj.fSSin && fTX == obj.fTX && fTY == obj.fTY; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRotationScaleMatrix f && Equals (f); @@ -15011,7 +19673,9 @@ internal unsafe partial struct SKRuntimeEffectChildNative : IEquatable +#pragma warning disable CS8909 fName == obj.fName && fNameLength == obj.fNameLength && fType == obj.fType && fIndex == obj.fIndex; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRuntimeEffectChildNative f && Equals (f); @@ -15056,7 +19720,9 @@ internal unsafe partial struct SKRuntimeEffectUniformNative : IEquatable +#pragma warning disable CS8909 fName == obj.fName && fNameLength == obj.fNameLength && fOffset == obj.fOffset && fType == obj.fType && fCount == obj.fCount && fFlags == obj.fFlags; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRuntimeEffectUniformNative f && Equals (f); @@ -15105,7 +19771,9 @@ public readonly override int GetHashCode () public readonly SKMipmapMode Mipmap => fMipmap; public readonly bool Equals (SKSamplingOptions obj) => +#pragma warning disable CS8909 fMaxAniso == obj.fMaxAniso && fUseCubic == obj.fUseCubic && fCubic == obj.fCubic && fFilter == obj.fFilter && fMipmap == obj.fMipmap; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKSamplingOptions f && Equals (f); @@ -15147,7 +19815,9 @@ public Single Height { } public readonly bool Equals (SKSize obj) => +#pragma warning disable CS8909 w == obj.w && h == obj.h; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKSize f && Equals (f); @@ -15184,7 +19854,9 @@ internal unsafe partial struct SKRunBufferInternal : IEquatable +#pragma warning disable CS8909 glyphs == obj.glyphs && pos == obj.pos && utf8text == obj.utf8text && clusters == obj.clusters; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKRunBufferInternal f && Equals (f); @@ -15235,7 +19907,9 @@ internal unsafe partial struct SKTimeDateTimeInternal : IEquatable +#pragma warning disable CS8909 fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKTimeDateTimeInternal f && Equals (f); @@ -15278,7 +19952,9 @@ public readonly override int GetHashCode () private readonly /* char */ void* fICCProfileDescription; public readonly bool Equals (SKWebpEncoderOptions obj) => +#pragma warning disable CS8909 fCompression == obj.fCompression && fQuality == obj.fQuality && fICCProfile == obj.fICCProfile && fICCProfileDescription == obj.fICCProfileDescription; +#pragma warning restore CS8909 public readonly override bool Equals (object obj) => obj is SKWebpEncoderOptions f && Equals (f); @@ -16048,3 +20724,349 @@ public enum SKWebpEncoderCompression { } #endregion + +#region DelegateProxies + +namespace SkiaSharp { +internal static unsafe partial class DelegateProxies { + /// Proxy for gr_gl_get_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] GRGlGetProcProxy = &GRGlGetProcProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly GRGlGetProcProxyDelegate GRGlGetProcProxy = GRGlGetProcProxyImplementation; + [MonoPInvokeCallback (typeof (GRGlGetProcProxyDelegate))] +#endif + private static partial IntPtr GRGlGetProcProxyImplementation(void* ctx,/* char */ void* name); + + /// Proxy for gr_vk_get_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] GRVkGetProcProxy = &GRVkGetProcProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly GRVkGetProcProxyDelegate GRVkGetProcProxy = GRVkGetProcProxyImplementation; + [MonoPInvokeCallback (typeof (GRVkGetProcProxyDelegate))] +#endif + private static partial IntPtr GRVkGetProcProxyImplementation(void* ctx,/* char */ void* name,vk_instance_t instance,vk_device_t device); + + /// Proxy for sk_bitmap_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKBitmapReleaseProxy = &SKBitmapReleaseProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKBitmapReleaseProxyDelegate SKBitmapReleaseProxy = SKBitmapReleaseProxyImplementation; + [MonoPInvokeCallback (typeof (SKBitmapReleaseProxyDelegate))] +#endif + private static partial void SKBitmapReleaseProxyImplementation(void* addr,void* context); + + /// Proxy for sk_data_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKDataReleaseProxy = &SKDataReleaseProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKDataReleaseProxyDelegate SKDataReleaseProxy = SKDataReleaseProxyImplementation; + [MonoPInvokeCallback (typeof (SKDataReleaseProxyDelegate))] +#endif + private static partial void SKDataReleaseProxyImplementation(void* ptr,void* context); + + /// Proxy for sk_glyph_path_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKGlyphPathProxy = &SKGlyphPathProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKGlyphPathProxyDelegate SKGlyphPathProxy = SKGlyphPathProxyImplementation; + [MonoPInvokeCallback (typeof (SKGlyphPathProxyDelegate))] +#endif + private static partial void SKGlyphPathProxyImplementation(sk_path_t pathOrNull,SKMatrix* matrix,void* context); + + /// Proxy for sk_image_raster_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKImageRasterReleaseProxy = &SKImageRasterReleaseProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseProxy = SKImageRasterReleaseProxyImplementation; + [MonoPInvokeCallback (typeof (SKImageRasterReleaseProxyDelegate))] +#endif + private static partial void SKImageRasterReleaseProxyImplementation(void* addr,void* context); + + /// Proxy for sk_image_raster_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKImageRasterReleaseProxyForCoTaskMem = &SKImageRasterReleaseProxyImplementationForCoTaskMem; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseProxyForCoTaskMem = SKImageRasterReleaseProxyImplementationForCoTaskMem; + [MonoPInvokeCallback (typeof (SKImageRasterReleaseProxyDelegate))] +#endif + private static partial void SKImageRasterReleaseProxyImplementationForCoTaskMem(void* addr,void* context); + + /// Proxy for sk_image_texture_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKImageTextureReleaseProxy = &SKImageTextureReleaseProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKImageTextureReleaseProxyDelegate SKImageTextureReleaseProxy = SKImageTextureReleaseProxyImplementation; + [MonoPInvokeCallback (typeof (SKImageTextureReleaseProxyDelegate))] +#endif + private static partial void SKImageTextureReleaseProxyImplementation(void* context); + + /// Proxy for sk_manageddrawable_approximateBytesUsed_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedDrawableApproximateBytesUsedProxy = &SKManagedDrawableApproximateBytesUsedProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedDrawableApproximateBytesUsedProxyDelegate SKManagedDrawableApproximateBytesUsedProxy = SKManagedDrawableApproximateBytesUsedProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedDrawableApproximateBytesUsedProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedDrawableApproximateBytesUsedProxyImplementation(sk_manageddrawable_t d,void* context); + + /// Proxy for sk_manageddrawable_destroy_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedDrawableDestroyProxy = &SKManagedDrawableDestroyProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedDrawableDestroyProxyDelegate SKManagedDrawableDestroyProxy = SKManagedDrawableDestroyProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedDrawableDestroyProxyDelegate))] +#endif + private static partial void SKManagedDrawableDestroyProxyImplementation(sk_manageddrawable_t d,void* context); + + /// Proxy for sk_manageddrawable_draw_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedDrawableDrawProxy = &SKManagedDrawableDrawProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedDrawableDrawProxyDelegate SKManagedDrawableDrawProxy = SKManagedDrawableDrawProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedDrawableDrawProxyDelegate))] +#endif + private static partial void SKManagedDrawableDrawProxyImplementation(sk_manageddrawable_t d,void* context,sk_canvas_t ccanvas); + + /// Proxy for sk_manageddrawable_getBounds_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedDrawableGetBoundsProxy = &SKManagedDrawableGetBoundsProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedDrawableGetBoundsProxyDelegate SKManagedDrawableGetBoundsProxy = SKManagedDrawableGetBoundsProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedDrawableGetBoundsProxyDelegate))] +#endif + private static partial void SKManagedDrawableGetBoundsProxyImplementation(sk_manageddrawable_t d,void* context,SKRect* rect); + + /// Proxy for sk_manageddrawable_makePictureSnapshot_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedDrawableMakePictureSnapshotProxy = &SKManagedDrawableMakePictureSnapshotProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedDrawableMakePictureSnapshotProxyDelegate SKManagedDrawableMakePictureSnapshotProxy = SKManagedDrawableMakePictureSnapshotProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedDrawableMakePictureSnapshotProxyDelegate))] +#endif + private static partial sk_picture_t SKManagedDrawableMakePictureSnapshotProxyImplementation(sk_manageddrawable_t d,void* context); + + /// Proxy for sk_managedstream_destroy_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamDestroyProxy = &SKManagedStreamDestroyProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamDestroyProxyDelegate SKManagedStreamDestroyProxy = SKManagedStreamDestroyProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamDestroyProxyDelegate))] +#endif + private static partial void SKManagedStreamDestroyProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_duplicate_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamDuplicateProxy = &SKManagedStreamDuplicateProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamDuplicateProxyDelegate SKManagedStreamDuplicateProxy = SKManagedStreamDuplicateProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamDuplicateProxyDelegate))] +#endif + private static partial sk_stream_managedstream_t SKManagedStreamDuplicateProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_fork_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamForkProxy = &SKManagedStreamForkProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamForkProxyDelegate SKManagedStreamForkProxy = SKManagedStreamForkProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamForkProxyDelegate))] +#endif + private static partial sk_stream_managedstream_t SKManagedStreamForkProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_getLength_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamGetLengthProxy = &SKManagedStreamGetLengthProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamGetLengthProxyDelegate SKManagedStreamGetLengthProxy = SKManagedStreamGetLengthProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamGetLengthProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedStreamGetLengthProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_getPosition_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamGetPositionProxy = &SKManagedStreamGetPositionProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamGetPositionProxyDelegate SKManagedStreamGetPositionProxy = SKManagedStreamGetPositionProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamGetPositionProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedStreamGetPositionProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_hasLength_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamHasLengthProxy = &SKManagedStreamHasLengthProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamHasLengthProxyDelegate SKManagedStreamHasLengthProxy = SKManagedStreamHasLengthProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamHasLengthProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamHasLengthProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_hasPosition_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamHasPositionProxy = &SKManagedStreamHasPositionProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamHasPositionProxyDelegate SKManagedStreamHasPositionProxy = SKManagedStreamHasPositionProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamHasPositionProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamHasPositionProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_isAtEnd_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamIsAtEndProxy = &SKManagedStreamIsAtEndProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamIsAtEndProxyDelegate SKManagedStreamIsAtEndProxy = SKManagedStreamIsAtEndProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamIsAtEndProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamIsAtEndProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_move_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamMoveProxy = &SKManagedStreamMoveProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamMoveProxyDelegate SKManagedStreamMoveProxy = SKManagedStreamMoveProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamMoveProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamMoveProxyImplementation(sk_stream_managedstream_t s,void* context,Int32 offset); + + /// Proxy for sk_managedstream_peek_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamPeekProxy = &SKManagedStreamPeekProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamPeekProxyDelegate SKManagedStreamPeekProxy = SKManagedStreamPeekProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamPeekProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedStreamPeekProxyImplementation(sk_stream_managedstream_t s,void* context,void* buffer,/* size_t */ IntPtr size); + + /// Proxy for sk_managedstream_read_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamReadProxy = &SKManagedStreamReadProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamReadProxyDelegate SKManagedStreamReadProxy = SKManagedStreamReadProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamReadProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedStreamReadProxyImplementation(sk_stream_managedstream_t s,void* context,void* buffer,/* size_t */ IntPtr size); + + /// Proxy for sk_managedstream_rewind_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamRewindProxy = &SKManagedStreamRewindProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamRewindProxyDelegate SKManagedStreamRewindProxy = SKManagedStreamRewindProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamRewindProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamRewindProxyImplementation(sk_stream_managedstream_t s,void* context); + + /// Proxy for sk_managedstream_seek_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedStreamSeekProxy = &SKManagedStreamSeekProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedStreamSeekProxyDelegate SKManagedStreamSeekProxy = SKManagedStreamSeekProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedStreamSeekProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedStreamSeekProxyImplementation(sk_stream_managedstream_t s,void* context,/* size_t */ IntPtr position); + + /// Proxy for sk_managedtraceMemoryDump_dumpNumericValue_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedTraceMemoryDumpDumpNumericValueProxy = &SKManagedTraceMemoryDumpDumpNumericValueProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate SKManagedTraceMemoryDumpDumpNumericValueProxy = SKManagedTraceMemoryDumpDumpNumericValueProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate))] +#endif + private static partial void SKManagedTraceMemoryDumpDumpNumericValueProxyImplementation(sk_managedtracememorydump_t d,void* context,/* char */ void* dumpName,/* char */ void* valueName,/* char */ void* units,UInt64 value); + + /// Proxy for sk_managedtraceMemoryDump_dumpStringValue_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedTraceMemoryDumpDumpStringValueProxy = &SKManagedTraceMemoryDumpDumpStringValueProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedTraceMemoryDumpDumpStringValueProxyDelegate SKManagedTraceMemoryDumpDumpStringValueProxy = SKManagedTraceMemoryDumpDumpStringValueProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedTraceMemoryDumpDumpStringValueProxyDelegate))] +#endif + private static partial void SKManagedTraceMemoryDumpDumpStringValueProxyImplementation(sk_managedtracememorydump_t d,void* context,/* char */ void* dumpName,/* char */ void* valueName,/* char */ void* value); + + /// Proxy for sk_managedwstream_bytesWritten_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedWStreamBytesWrittenProxy = &SKManagedWStreamBytesWrittenProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedWStreamBytesWrittenProxyDelegate SKManagedWStreamBytesWrittenProxy = SKManagedWStreamBytesWrittenProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedWStreamBytesWrittenProxyDelegate))] +#endif + private static partial /* size_t */ IntPtr SKManagedWStreamBytesWrittenProxyImplementation(sk_wstream_managedstream_t s,void* context); + + /// Proxy for sk_managedwstream_destroy_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedWStreamDestroyProxy = &SKManagedWStreamDestroyProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedWStreamDestroyProxyDelegate SKManagedWStreamDestroyProxy = SKManagedWStreamDestroyProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedWStreamDestroyProxyDelegate))] +#endif + private static partial void SKManagedWStreamDestroyProxyImplementation(sk_wstream_managedstream_t s,void* context); + + /// Proxy for sk_managedwstream_flush_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedWStreamFlushProxy = &SKManagedWStreamFlushProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedWStreamFlushProxyDelegate SKManagedWStreamFlushProxy = SKManagedWStreamFlushProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedWStreamFlushProxyDelegate))] +#endif + private static partial void SKManagedWStreamFlushProxyImplementation(sk_wstream_managedstream_t s,void* context); + + /// Proxy for sk_managedwstream_write_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKManagedWStreamWriteProxy = &SKManagedWStreamWriteProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKManagedWStreamWriteProxyDelegate SKManagedWStreamWriteProxy = SKManagedWStreamWriteProxyImplementation; + [MonoPInvokeCallback (typeof (SKManagedWStreamWriteProxyDelegate))] +#endif + [return: MarshalAs (UnmanagedType.I1)] + private static partial bool SKManagedWStreamWriteProxyImplementation(sk_wstream_managedstream_t s,void* context,void* buffer,/* size_t */ IntPtr size); + + /// Proxy for sk_surface_raster_release_proc native function. +#if USE_LIBRARY_IMPORT + public static readonly delegate* unmanaged[Cdecl] SKSurfaceRasterReleaseProxy = &SKSurfaceRasterReleaseProxyImplementation; + [UnmanagedCallersOnly(CallConvs = new [] {typeof(CallConvCdecl)})] +#else + public static readonly SKSurfaceRasterReleaseProxyDelegate SKSurfaceRasterReleaseProxy = SKSurfaceRasterReleaseProxyImplementation; + [MonoPInvokeCallback (typeof (SKSurfaceRasterReleaseProxyDelegate))] +#endif + private static partial void SKSurfaceRasterReleaseProxyImplementation(void* addr,void* context); + +} +} + +#endregion diff --git a/binding/SkiaSharp/SkiaSharp.csproj b/binding/SkiaSharp/SkiaSharp.csproj index eb53cfa375..51f3fcc4c8 100644 --- a/binding/SkiaSharp/SkiaSharp.csproj +++ b/binding/SkiaSharp/SkiaSharp.csproj @@ -6,10 +6,15 @@ SkiaSharp enable true + $(WarningsAsErrors);CA1420;CA1421; + $(NoWarn);CS8826 $(DefineConstants);USE_DELEGATES + + $(DefineConstants);USE_LIBRARY_IMPORT + diff --git a/binding/libHarfBuzzSharp.json b/binding/libHarfBuzzSharp.json index 2f7b479bee..2ba856d24a 100644 --- a/binding/libHarfBuzzSharp.json +++ b/binding/libHarfBuzzSharp.json @@ -231,6 +231,11 @@ "-1": "int" } }, + "hb_unicode_combining_category_func_t": { + "parameters": { + "-1": "int" + } + }, "hb_font_get_glyph_from_name": { "parameters": { "1": "[MarshalAs (UnmanagedType.LPStr)] String" @@ -265,6 +270,23 @@ "parameters": { "1": "[MarshalAs (UnmanagedType.LPStr)] String" } + }, + "hb_destroy_func_t": { + "proxySuffixes": [ + "", "ForMulti" + ] + }, + "hb_unicode_decompose_compatibility_func_t": { + "generateProxy": false + }, + "hb_unicode_eastasian_width_func_t": { + "generateProxy": false + }, + "hb_buffer_message_func_t": { + "generateProxy": false + }, + "hb_font_get_glyph_func_t": { + "generateProxy": false } } } diff --git a/binding/libSkiaSharp.json b/binding/libSkiaSharp.json index a67a69969c..adeb369440 100644 --- a/binding/libSkiaSharp.json +++ b/binding/libSkiaSharp.json @@ -405,6 +405,9 @@ }, "functions": { // delegates + "gr_gl_func_ptr": { + "generateProxy": false + }, "gr_gl_get_proc": { "cs": "GRGlGetProcProxyDelegate", "parameters": { @@ -412,7 +415,8 @@ } }, "gr_vk_func_ptr": { - "convention": "stdcall" + "convention": "stdcall", + "generateProxy": false }, "gr_vk_get_proc": { "cs": "GRVkGetProcProxyDelegate", @@ -479,6 +483,11 @@ "parameters": { "1": "[MarshalAs (UnmanagedType.LPStr)] String" } + }, + "sk_image_raster_release_proc": { + "proxySuffixes": [ + "", "ForCoTaskMem" + ] } } } diff --git a/tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj b/tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj index ebea412d93..c60eb637e6 100644 --- a/tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj +++ b/tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj @@ -12,6 +12,10 @@ AnyCPU;x64;x86 + + $(DefineConstants);USE_LIBRARY_IMPORT + + diff --git a/tests/SkiaSharp.Tests.Devices/SkiaSharp.Tests.Devices.csproj b/tests/SkiaSharp.Tests.Devices/SkiaSharp.Tests.Devices.csproj index a259ea14b5..1d36bc7211 100644 --- a/tests/SkiaSharp.Tests.Devices/SkiaSharp.Tests.Devices.csproj +++ b/tests/SkiaSharp.Tests.Devices/SkiaSharp.Tests.Devices.csproj @@ -12,6 +12,7 @@ false true true + $(DefineConstants);USE_LIBRARY_IMPORT diff --git a/tests/SkiaSharp.Tests.Wasm/SkiaSharp.Tests.Wasm.csproj b/tests/SkiaSharp.Tests.Wasm/SkiaSharp.Tests.Wasm.csproj index e80826f6cd..4aebacf1e0 100644 --- a/tests/SkiaSharp.Tests.Wasm/SkiaSharp.Tests.Wasm.csproj +++ b/tests/SkiaSharp.Tests.Wasm/SkiaSharp.Tests.Wasm.csproj @@ -9,6 +9,7 @@ SkiaSharp.Tests true true + $(DefineConstants);USE_LIBRARY_IMPORT diff --git a/tests/SkiaSharp.Tests/SkiaSharp.Tests.csproj b/tests/SkiaSharp.Tests/SkiaSharp.Tests.csproj index effe3dfd36..bef9cc5d12 100644 --- a/tests/SkiaSharp.Tests/SkiaSharp.Tests.csproj +++ b/tests/SkiaSharp.Tests/SkiaSharp.Tests.csproj @@ -2,7 +2,7 @@ $(TFMCurrent) - $(DefineConstants);USE_LIBRARY_LOADER + $(DefineConstants);USE_LIBRARY_LOADER;USE_LIBRARY_IMPORT SkiaSharp.Tests SkiaSharp.Tests true diff --git a/tests/Tests/ApiTests.cs b/tests/Tests/ApiTests.cs index 9b6f4dcf7f..3db1b815d6 100644 --- a/tests/Tests/ApiTests.cs +++ b/tests/Tests/ApiTests.cs @@ -61,9 +61,15 @@ public class ApiTest : BaseTest public void DelegateTypesAreValid() { var del = InteropDelegatesData; +#if USE_LIBRARY_IMPORT + // Targets using USE_LIBRARY_IMPORT don't have delegates generated as they are not used. + Assert.Empty(del); +#else Assert.NotEmpty(del); +#endif } +#if !USE_LIBRARY_IMPORT [Trait(Traits.Category.Key, Traits.Category.Values.Api)] [SkippableTheory] [MemberData(nameof(InteropDelegatesData))] @@ -71,6 +77,7 @@ public void DelegateTypesHaveAttributes(Type delegateType) { Assert.NotNull(delegateType.GetCustomAttribute()); } +#endif [Trait(Traits.Category.Key, Traits.Category.Values.Api)] [SkippableTheory] diff --git a/tests/Tests/SkiaSharp/ManagedStream.cs b/tests/Tests/SkiaSharp/ManagedStream.cs index 6e9773f1f0..6084937d42 100644 --- a/tests/Tests/SkiaSharp/ManagedStream.cs +++ b/tests/Tests/SkiaSharp/ManagedStream.cs @@ -4,26 +4,26 @@ namespace SkiaSharp.Tests { public class ManagedStream : SKAbstractManagedStream { - protected override IntPtr OnRead (IntPtr buffer, IntPtr size) => (IntPtr)0; + protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size) => (IntPtr)0; - protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) => (IntPtr)0; + protected internal override IntPtr OnPeek (IntPtr buffer, IntPtr size) => (IntPtr)0; - protected override bool OnIsAtEnd () => false; + protected internal override bool OnIsAtEnd () => false; - protected override bool OnHasPosition () => false; + protected internal override bool OnHasPosition () => false; - protected override bool OnHasLength () => false; + protected internal override bool OnHasLength () => false; - protected override bool OnRewind () => false; + protected internal override bool OnRewind () => false; - protected override IntPtr OnGetPosition () => (IntPtr)0; + protected internal override IntPtr OnGetPosition () => (IntPtr)0; - protected override IntPtr OnGetLength () => (IntPtr)0; + protected internal override IntPtr OnGetLength () => (IntPtr)0; - protected override bool OnSeek (IntPtr position) => false; + protected internal override bool OnSeek (IntPtr position) => false; - protected override bool OnMove (int offset) => false; + protected internal override bool OnMove (int offset) => false; - protected override IntPtr OnCreateNew () => IntPtr.Zero; + protected internal override IntPtr OnCreateNew () => IntPtr.Zero; } } diff --git a/tests/Tests/SkiaSharp/SKDrawableTest.cs b/tests/Tests/SkiaSharp/SKDrawableTest.cs index dbce03c681..4f9dfda130 100644 --- a/tests/Tests/SkiaSharp/SKDrawableTest.cs +++ b/tests/Tests/SkiaSharp/SKDrawableTest.cs @@ -107,28 +107,28 @@ class TestDrawable : SKDrawable public int SnapshotFireCount; public int ApproxBytesCount; - protected override void OnDraw(SKCanvas canvas) + protected internal override void OnDraw(SKCanvas canvas) { DrawFireCount++; canvas.DrawColor(SKColors.Blue); } - protected override SKRect OnGetBounds() + protected internal override SKRect OnGetBounds() { BoundsFireCount++; return SKRect.Create(100, 100); } - protected override SKPicture OnSnapshot() + protected internal override SKPicture OnSnapshot() { SnapshotFireCount++; return base.OnSnapshot(); } - protected override int OnGetApproximateBytesUsed () + protected internal override int OnGetApproximateBytesUsed () { ApproxBytesCount++; diff --git a/tests/Tests/SkiaSharp/SKFrontBufferedManagedStreamTest.cs b/tests/Tests/SkiaSharp/SKFrontBufferedManagedStreamTest.cs index 53cb11a8a0..63a47b74d3 100644 --- a/tests/Tests/SkiaSharp/SKFrontBufferedManagedStreamTest.cs +++ b/tests/Tests/SkiaSharp/SKFrontBufferedManagedStreamTest.cs @@ -182,9 +182,9 @@ public LengthOptionalStream (bool hasLength, bool hasPosition) fHasPosition = hasPosition; } - protected override bool OnHasLength () => fHasLength; + protected internal override bool OnHasLength () => fHasLength; - protected override bool OnHasPosition () => fHasPosition; + protected internal override bool OnHasPosition () => fHasPosition; } [SkippableTheory] @@ -222,9 +222,9 @@ private class FailingStream : ManagedStream { private bool fAtEnd; - protected override bool OnIsAtEnd () => fAtEnd; + protected internal override bool OnIsAtEnd () => fAtEnd; - protected override IntPtr OnRead (IntPtr buffer, IntPtr size) + protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size) { Assert.False (fAtEnd); fAtEnd = true; diff --git a/tests/Tests/SkiaSharp/SKGraphicsTest.cs b/tests/Tests/SkiaSharp/SKGraphicsTest.cs index e1f183c353..7f09a12a35 100644 --- a/tests/Tests/SkiaSharp/SKGraphicsTest.cs +++ b/tests/Tests/SkiaSharp/SKGraphicsTest.cs @@ -140,10 +140,10 @@ public TextWriterDump(bool detailedDump, bool dumpWrappedObjects) public List Lines { get; } = new List(); - protected override void OnDumpNumericValue(string dumpName, string valueName, string units, ulong value) => + protected internal override void OnDumpNumericValue(string dumpName, string valueName, string units, ulong value) => Lines.Add($"{dumpName}.{valueName} = {value} {units}"); - protected override void OnDumpStringValue(string dumpName, string valueName, string value) => + protected internal override void OnDumpStringValue(string dumpName, string valueName, string value) => Lines.Add($"{dumpName}.{valueName} = '{value}'"); } } diff --git a/utils/SkiaSharpGenerator/BaseTool.cs b/utils/SkiaSharpGenerator/BaseTool.cs index 4c1b1ed201..51cddf91a2 100644 --- a/utils/SkiaSharpGenerator/BaseTool.cs +++ b/utils/SkiaSharpGenerator/BaseTool.cs @@ -191,6 +191,67 @@ protected async Task LoadConfigAsync(string configPath) return config ?? throw new InvalidOperationException("Unable to parse json config file."); } + protected (List args, string returnType) GetManagedFunctionArguments(CppFunctionType function, FunctionMapping? map) + { + var paramsList = new List(); + for (var i = 0; i < function.Parameters.Count; i++) + { + var p = function.Parameters[i]; + var n = string.IsNullOrEmpty(p.Name) ? $"param{i}" : p.Name; + var t = GetType(p.Type); + var cppT = GetCppType(p.Type); + if (t == "Boolean" || cppT == "bool") + t = "[MarshalAs (UnmanagedType.I1)] bool"; + if (map != null && map.Parameters.TryGetValue(i.ToString(), out var newT)) + t = newT; + paramsList.Add($"{t} {n}"); + } + + var returnType = GetType(function.ReturnType); + if (map != null && map.Parameters.TryGetValue("-1", out var newR)) + { + returnType = newR; + } + else if (returnType == "Boolean" || GetCppType(function.ReturnType) == "bool") + { + returnType = "bool"; + } + return (paramsList, returnType); + } + + protected string? GetFunctionPointerType(CppType type, FunctionMapping? map = null) + { + if (map is null) + { + functionMappings.TryGetValue(type.GetDisplayName(), out map); + } + + type = (type as CppQualifiedType)?.ElementType as CppTypedef ?? type; + type = (type as CppTypedef)?.ElementType as CppTypedef ?? type; + type = (type as CppTypedef)?.ElementType as CppPointerType ?? type; + type = (type as CppPointerType)?.ElementType as CppFunctionType ?? type; + if (type is CppFunctionType { CallingConvention: CppCallingConvention.C } function) + { + var parameters = string.Join(", ", function.Parameters + .Select((p, i) => (p.Type, i)) + .Concat(new[] { (function.ReturnType, -1) }) + .Select(tuple => + { + var (cppType, i) = tuple; + var t = GetType(cppType); + var cppT = GetCppType(cppType); + if (t == "Boolean" || cppT == "bool") + t = "bool"; + if (map != null && map.Parameters.TryGetValue(i.ToString(), out var newT)) + t = newT; + return t; + })); + return $"delegate* unmanaged[Cdecl] <{parameters}>"; + } + + return null; + } + protected string GetType(CppType type) { var typeName = GetCppType(type); diff --git a/utils/SkiaSharpGenerator/ConfigJson/FunctionMapping.cs b/utils/SkiaSharpGenerator/ConfigJson/FunctionMapping.cs index f8f6b3ad77..40b7a98bda 100644 --- a/utils/SkiaSharpGenerator/ConfigJson/FunctionMapping.cs +++ b/utils/SkiaSharpGenerator/ConfigJson/FunctionMapping.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel; using System.Text.Json.Serialization; namespace SkiaSharpGenerator @@ -10,5 +11,11 @@ public class FunctionMapping [JsonPropertyName("parameters")] public Dictionary Parameters { get; set; } = new Dictionary(); + + [JsonPropertyName("generateProxy")] + public bool? GenerateProxy { get; set; } + + [JsonPropertyName("proxySuffixes")] + public List? ProxySuffixes { get; set; } } } diff --git a/utils/SkiaSharpGenerator/Generate/Generator.cs b/utils/SkiaSharpGenerator/Generate/Generator.cs index cea06f3eb5..011adcaab2 100644 --- a/utils/SkiaSharpGenerator/Generate/Generator.cs +++ b/utils/SkiaSharpGenerator/Generate/Generator.cs @@ -40,6 +40,7 @@ private void WriteApi(TextWriter writer) writer.WriteLine("using System;"); writer.WriteLine("using System.Runtime.InteropServices;"); + writer.WriteLine("using System.Runtime.CompilerServices;"); writer.WriteLine(); WriteNamespaces(writer); writer.WriteLine(); @@ -62,6 +63,8 @@ private void WriteApi(TextWriter writer) WriteStructs(writer); writer.WriteLine(); WriteEnums(writer); + writer.WriteLine(); + WriteDelegateProxies(writer); } private void WriteDelegates(TextWriter writer) @@ -69,6 +72,7 @@ private void WriteDelegates(TextWriter writer) Log?.LogVerbose(" Writing delegates..."); writer.WriteLine($"#region Delegates"); + writer.WriteLine($"#if !USE_LIBRARY_IMPORT"); var delegates = compilation.Typedefs .Where(t => t.ElementType.TypeKind == CppTypeKind.Pointer) @@ -90,6 +94,7 @@ private void WriteDelegates(TextWriter writer) } writer.WriteLine(); + writer.WriteLine($"#endif // !USE_LIBRARY_IMPORT"); writer.WriteLine($"#endregion"); } @@ -113,28 +118,9 @@ private void WriteDelegate(TextWriter writer, CppTypedef del) writer.WriteLine($"\t// {del}"); writer.WriteLine($"\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); - var paramsList = new List(); - for (var i = 0; i < function.Parameters.Count; i++) + var (paramsList, returnType) = GetManagedFunctionArguments(function, map); + if (returnType == "bool") { - var p = function.Parameters[i]; - var n = string.IsNullOrEmpty(p.Name) ? $"param{i}" : p.Name; - var t = GetType(p.Type); - var cppT = GetCppType(p.Type); - if (t == "Boolean" || cppT == "bool") - t = $"[MarshalAs (UnmanagedType.I1)] bool"; - if (map != null && map.Parameters.TryGetValue(i.ToString(), out var newT)) - t = newT; - paramsList.Add($"{t} {n}"); - } - - var returnType = GetType(function.ReturnType); - if (map != null && map.Parameters.TryGetValue("-1", out var newR)) - { - returnType = newR; - } - else if (returnType == "Boolean" || GetCppType(function.ReturnType) == "bool") - { - returnType = "bool"; writer.WriteLine($"\t[return: MarshalAs (UnmanagedType.I1)]"); } @@ -198,6 +184,7 @@ private void WriteStruct(TextWriter writer, CppClass klass) foreach (var field in klass.Fields) { var type = GetType(field.Type); + var funcPointerType = GetFunctionPointerType(field.Type); var cppT = GetCppType(field.Type); writer.WriteLine($"\t\t// {field}"); @@ -212,7 +199,18 @@ private void WriteStruct(TextWriter writer, CppClass klass) var vis = map?.IsInternal == true ? "public" : "private"; var ro = map?.IsReadOnly == true ? " readonly" : ""; - writer.WriteLine($"\t\t{vis}{ro} {type} {fieldName};"); + if (funcPointerType is null) + { + writer.WriteLine($"\t\t{vis}{ro} {type} {fieldName};"); + } + else + { + writer.WriteLine($"#if USE_LIBRARY_IMPORT"); + writer.WriteLine($"\t\t{vis}{ro} {funcPointerType} {fieldName};"); + writer.WriteLine($"#else"); + writer.WriteLine($"\t\t{vis}{ro} {type} {fieldName};"); + writer.WriteLine($"#endif"); + } if (!isPrivate && (map == null || (map.GenerateProperties && !map.IsInternal))) { @@ -251,7 +249,18 @@ private void WriteStruct(TextWriter writer, CppClass klass) { if (map?.IsReadOnly == true) { - writer.WriteLine($"\t\tpublic readonly {type} {propertyName} => {fieldName};"); + if (funcPointerType is null) + { + writer.WriteLine($"\t\tpublic readonly {type} {propertyName} => {fieldName};"); + } + else + { + writer.WriteLine($"#if USE_LIBRARY_IMPORT"); + writer.WriteLine($"\t\tpublic readonly {funcPointerType} {propertyName} => {fieldName};"); + writer.WriteLine($"#else"); + writer.WriteLine($"\t\tpublic readonly {type} {propertyName} => {fieldName};"); + writer.WriteLine($"#endif"); + } } else { @@ -276,7 +285,9 @@ private void WriteStruct(TextWriter writer, CppClass klass) equalityFields.Add($"{f} == obj.{f}"); } writer.WriteLine($"\t\tpublic readonly bool Equals ({name} obj) =>"); + writer.WriteLine($"#pragma warning disable CS8909"); writer.WriteLine($"\t\t\t{string.Join(" && ", equalityFields)};"); + writer.WriteLine($"#pragma warning restore CS8909"); writer.WriteLine(); // Equals @@ -464,13 +475,22 @@ private void WriteFunctions(TextWriter writer) var skipFunction = false; var paramsList = new List(); + var paramsListWithFuncPointers = new List(); var paramNamesList = new List(); for (var i = 0; i < function.Parameters.Count; i++) { var p = function.Parameters[i]; var n = string.IsNullOrEmpty(p.Name) ? $"param{i}" : p.Name; n = SafeName(n); - var t = GetType(p.Type); + var t1 = GetType(p.Type); + var t2 = GetFunctionPointerType(p.Type); + + // Mono WASM didn't support function pointers in DllImport definitions until .NET 8. + // While it should, it still didn't work for me even on .NET 9 previews, so keeping `void*` instead of function pointers. + // It makes higher chance of accident mistakes, but old managed delegates build should catch the errors compile time too. + if (t2 is not null) t2 = "void*"; + t2 ??= t1; + var cppT = GetCppType(p.Type); if (excludedTypes.Contains(cppT) == true) { @@ -478,11 +498,12 @@ private void WriteFunctions(TextWriter writer) skipFunction = true; break; } - if (t == "Boolean" || cppT == "bool") - t = $"[MarshalAs (UnmanagedType.I1)] bool"; + if (t1 == "Boolean" || cppT == "bool") + t1 = t2 = "[MarshalAs (UnmanagedType.I1)] bool"; if (funcMap != null && funcMap.Parameters.TryGetValue(i.ToString(), out var newT)) - t = newT; - paramsList.Add($"{t} {n}"); + t1 = t2 = newT; + paramsList.Add($"{t1} {n}"); + paramsListWithFuncPointers.Add($"{t2} {n}"); paramNamesList.Add(n); } @@ -504,10 +525,19 @@ private void WriteFunctions(TextWriter writer) writer.WriteLine(); writer.WriteLine($"\t\t// {function}"); writer.WriteLine($"\t\t#if !USE_DELEGATES"); + writer.WriteLine($"\t\t#if USE_LIBRARY_IMPORT"); + writer.WriteLine($"\t\t[LibraryImport ({config.DllName})]"); + if (!string.IsNullOrEmpty(retAttr)) + writer.WriteLine($"\t\t{retAttr}"); + writer.WriteLine($"\t\tinternal static partial {returnType} {name} ({string.Join(", ", paramsListWithFuncPointers)});"); + + writer.WriteLine($"\t\t#else // !USE_LIBRARY_IMPORT"); writer.WriteLine($"\t\t[DllImport ({config.DllName}, CallingConvention = CallingConvention.Cdecl)]"); if (!string.IsNullOrEmpty(retAttr)) writer.WriteLine($"\t\t{retAttr}"); writer.WriteLine($"\t\tinternal static extern {returnType} {name} ({string.Join(", ", paramsList)});"); + writer.WriteLine($"\t\t#endif"); + writer.WriteLine($"\t\t#else"); writer.WriteLine($"\t\tprivate partial class Delegates {{"); writer.WriteLine($"\t\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); @@ -525,5 +555,86 @@ private void WriteFunctions(TextWriter writer) writer.WriteLine(); } } + + public void WriteDelegateProxies(TextWriter writer) + { + Log?.LogVerbose(" Writing delegate proxies..."); + + writer.WriteLine($"#region DelegateProxies"); + + var delegates = compilation.Typedefs + .Where(t => t.ElementType.TypeKind == CppTypeKind.Pointer) + .Where(t => IncludeNamespace(t.GetDisplayName())) + .OrderBy(t => t.GetDisplayName()) + .GroupBy(t => GetNamespace(t.GetDisplayName())); + + foreach (var group in delegates) + { + writer.WriteLine(); + writer.WriteLine($"namespace {group.Key} {{"); + writer.WriteLine($"internal static unsafe partial class DelegateProxies {{ "); + + foreach (var del in group) + { + WriteDelegateProxy(writer, del); + } + + writer.WriteLine($"}}"); + writer.WriteLine($"}}"); + } + + writer.WriteLine(); + writer.WriteLine($"#endregion"); + } + + private void WriteDelegateProxy(TextWriter writer, CppTypedef del) + { + if (!(((CppPointerType)del.ElementType).ElementType is CppFunctionType function)) + { + Log?.LogWarning($"Unknown delegate type {del}"); + + writer.WriteLine($"// TODO: {del}"); + return; + } + + var nativeName = del.GetDisplayName(); + + Log?.LogVerbose($" {nativeName}"); + + functionMappings.TryGetValue(nativeName, out var map); + var name = map?.CsType ?? CleanName(nativeName); + + if (map?.GenerateProxy == false) + { + return; + } + + var functionPointerType = GetFunctionPointerType(del, map); + + var (paramsList, returnType) = GetManagedFunctionArguments(function, map); + + var proxies = map?.ProxySuffixes ?? new List { "" }; + + foreach (var proxyPrefix in proxies) + { + var proxyName = name.EndsWith("ProxyDelegate") ? name.Replace("ProxyDelegate", "Proxy") : name; + var implName = name.EndsWith("ProxyDelegate") ? name.Replace("ProxyDelegate", "ProxyImplementation") : name + "Implementation"; + + proxyName += proxyPrefix; + implName += proxyPrefix; + + writer.WriteLine($"\t/// Proxy for {nativeName} native function."); + writer.WriteLine($"#if USE_LIBRARY_IMPORT"); + writer.WriteLine($"\tpublic static readonly {functionPointerType} {proxyName} = &{implName};"); + writer.WriteLine($"\t[UnmanagedCallersOnly(CallConvs = new [] {{typeof(CallConvCdecl)}})]"); + writer.WriteLine($"#else"); + writer.WriteLine($"\tpublic static readonly {name} {proxyName} = {implName};"); + writer.WriteLine($"\t[MonoPInvokeCallback (typeof ({name}))]"); + writer.WriteLine($"#endif"); + if (returnType == "bool") writer.WriteLine($"\t[return: MarshalAs (UnmanagedType.I1)]"); + writer.WriteLine($"\tprivate static partial {returnType} {implName}({string.Join(",", paramsList)});"); + writer.WriteLine(); + } + } } }