Skip to content

Commit bee6a8a

Browse files
authored
Update docs (mono#2052)
1 parent 01deefb commit bee6a8a

31 files changed

+787
-343
lines changed

VERSIONS.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dependencies
2-
mdoc release 5.8.3
2+
mdoc release 5.8.9
33
harfbuzz release 2.8.2
44
skia release m88
55
xunit release 2.4.1

build.cake

+56-38
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.3.2
1010
#addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1
1111

12-
#tool nuget:?package=mdoc&version=5.8.3
12+
#tool nuget:?package=mdoc&version=5.8.9
1313
#tool nuget:?package=xunit.runner.console&version=2.4.1
1414
#tool nuget:?package=vswhere&version=2.8.4
1515

@@ -450,7 +450,7 @@ Task ("samples")
450450
{ "xamarin.forms.windows", "x86" },
451451
};
452452

453-
void BuildSample (FilePath sln)
453+
void BuildSample (FilePath sln, bool dryrun)
454454
{
455455
var platform = sln.GetDirectory ().GetDirectoryName ().ToLower ();
456456
var name = sln.GetFilenameWithoutExtension ();
@@ -470,12 +470,19 @@ Task ("samples")
470470
buildPlatform = platformMatrix [platform];
471471
}
472472

473-
Information ($"Building {sln} ({platform})...");
474-
475-
RunNuGetRestorePackagesConfig (sln);
476-
RunMSBuild (sln, platform: buildPlatform);
473+
if (dryrun) {
474+
Information ($" BUILD {sln}");
475+
} else {
476+
Information ($"Building sample {sln} ({platform})...");
477+
RunNuGetRestorePackagesConfig (sln);
478+
RunMSBuild (sln, platform: buildPlatform);
479+
}
477480
} else {
478-
Information ($"Skipping {sln} ({platform})...");
481+
if (dryrun) {
482+
Information ($" SKIP (NS) {sln} (not supported)");
483+
} else {
484+
Information ($"Skipping sample {sln} ({platform})...");
485+
}
479486
}
480487
}
481488

@@ -511,38 +518,49 @@ Task ("samples")
511518
Information (" " + sln);
512519
}
513520

514-
foreach (var sln in solutions) {
515-
// might have been deleted due to a platform build and cleanup
516-
if (!FileExists (sln))
517-
continue;
518-
519-
var name = sln.GetFilenameWithoutExtension ();
520-
var slnPlatform = name.GetExtension ();
521-
522-
if (string.IsNullOrEmpty (slnPlatform)) {
523-
// this is the main solution
524-
var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln");
525-
if (!variants.Any ()) {
526-
// there is no platform variant
527-
BuildSample (sln);
528-
// delete the built sample
529-
CleanDirectories (sln.GetDirectory ().FullPath);
530-
} else {
531-
// skip as there is a platform variant
532-
}
533-
} else {
534-
// this is a platform variant
535-
slnPlatform = slnPlatform.ToLower ();
536-
var shouldBuild =
537-
(isLinux && slnPlatform == ".linux") ||
538-
(isMac && slnPlatform == ".mac") ||
539-
(isWin && slnPlatform == ".windows");
540-
if (shouldBuild) {
541-
BuildSample (sln);
542-
// delete the built sample
543-
CleanDirectories (sln.GetDirectory ().FullPath);
521+
foreach (var dryrun in new [] { true, false }) {
522+
if (dryrun)
523+
Information ("Sample builds:");
524+
525+
foreach (var sln in solutions) {
526+
// might have been deleted due to a platform build and cleanup
527+
if (!FileExists (sln))
528+
continue;
529+
530+
var name = sln.GetFilenameWithoutExtension ();
531+
var slnPlatform = name.GetExtension ();
532+
533+
if (string.IsNullOrEmpty (slnPlatform)) {
534+
// this is the main solution
535+
var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln");
536+
if (!variants.Any ()) {
537+
// there is no platform variant
538+
BuildSample (sln, dryrun);
539+
// delete the built sample
540+
if (!dryrun)
541+
CleanDirectories (sln.GetDirectory ().FullPath);
542+
} else {
543+
// skip as there is a platform variant
544+
if (dryrun)
545+
Information ($" SKIP (PS) {sln} (has platform specific)");
546+
}
544547
} else {
545-
// skip this as this is not the correct platform
548+
// this is a platform variant
549+
slnPlatform = slnPlatform.ToLower ();
550+
var shouldBuild =
551+
(isLinux && slnPlatform == ".linux") ||
552+
(isMac && slnPlatform == ".mac") ||
553+
(isWin && slnPlatform == ".windows");
554+
if (shouldBuild) {
555+
BuildSample (sln, dryrun);
556+
// delete the built sample
557+
if (!dryrun)
558+
CleanDirectories (sln.GetDirectory ().FullPath);
559+
} else {
560+
// skip this as this is not the correct platform
561+
if (dryrun)
562+
Information ($" SKIP (AP) {sln} (has alternate platform)");
563+
}
546564
}
547565
}
548566
}

cake/UpdateDocs.cake

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ void CopyChangelogs (DirectoryPath diffRoot, string id, string version)
3030

3131
dllName += ".breaking";
3232
}
33-
var changelogPath = (FilePath)$"./logs/changelogs/{id}/{version}/{dllName}.md";
33+
var changelogPath = (FilePath)$"./changelogs/{id}/{version}/{dllName}.md";
3434
EnsureDirectoryExists (changelogPath.GetDirectory ());
3535
CopyFile (file, changelogPath);
36+
var changelogOutputPath = (FilePath)$"./output/logs/changelogs/{id}/{version}/{dllName}.md";
37+
EnsureDirectoryExists (changelogOutputPath.GetDirectory ());
38+
CopyFile (file, changelogOutputPath);
3639
}
3740
}
3841
}

cake/UtilsManaged.cake

+12-4
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ string[] GetReferenceSearchPaths()
181181
var refs = new List<string>();
182182

183183
if (IsRunningOnWindows()) {
184-
var vs = VS_INSTALL ?? VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" });
184+
var vs =
185+
VS_INSTALL ??
186+
VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }) ??
187+
VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin", IncludePrerelease = true });
185188
var referenceAssemblies = $"{vs}/Common7/IDE/ReferenceAssemblies/Microsoft/Framework";
186189
var pf = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
187190

@@ -196,7 +199,6 @@ string[] GetReferenceSearchPaths()
196199
refs.Add($"{pf}/Windows Kits/10/UnionMetadata/Facade");
197200
refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.UniversalApiContract/1.0.0.0");
198201
refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.FoundationContract/1.0.0.0");
199-
refs.Add($"{pf}/GtkSharp/2.12/lib");
200202
refs.Add($"{pf}/GtkSharp/2.12/lib/gtk-sharp-2.0");
201203
refs.Add($"{vs}/Common7/IDE/PublicAssemblies");
202204
} else {
@@ -237,7 +239,7 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
237239
comparer.SearchPaths.AddRange(GetReferenceSearchPaths());
238240
comparer.PackageCache = PACKAGE_CACHE_PATH.FullPath;
239241

240-
await AddDep("OpenTK.GLControl", "NET40");
242+
await AddDep("OpenTK.GLControl", "NET20");
241243
await AddDep("Tizen.NET", "netstandard2.0");
242244
await AddDep("Xamarin.Forms", "netstandard2.0");
243245
await AddDep("Xamarin.Forms", "MonoAndroid90");
@@ -253,7 +255,7 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
253255
await AddDep("AtkSharp", "netstandard2.0");
254256
await AddDep("System.Memory", "netstandard2.0");
255257
await AddDep("Uno.UI", "netstandard2.0");
256-
await AddDep("Uno.UI", "MonoAndroid90");
258+
await AddDep("Uno.UI", "MonoAndroid10.0");
257259
await AddDep("Uno.UI", "xamarinios10");
258260
await AddDep("Uno.UI", "xamarinmac20");
259261
await AddDep("Uno.UI", "UAP");
@@ -266,6 +268,12 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
266268
await AddDep("Xamarin.Forms", "Xamarin.Mac", "reference");
267269
await AddDep("Xamarin.Forms", "uap10.0", "reference");
268270

271+
Verbose("Added search paths:");
272+
foreach (var path in comparer.SearchPaths) {
273+
var found = GetFiles($"{path}/*.dll").Any() || GetFiles($"{path}/*.winmd").Any();
274+
Verbose($" {(found ? " " : "!")} {path}");
275+
}
276+
269277
return comparer;
270278

271279
async Task AddDep(string id, string platform, string type = "release")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# API diff: HarfBuzzSharp.dll
2+
3+
## HarfBuzzSharp.dll
4+
5+
> No changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# API diff: SkiaSharp.Views.Blazor.dll
2+
3+
## SkiaSharp.Views.Blazor.dll
4+
5+
> Assembly Version Changed: 2.88.0.0 vs 0.0.0.0
6+
7+
### New Namespace SkiaSharp.Views.Blazor
8+
9+
#### New Type: SkiaSharp.Views.Blazor.SKCanvasView
10+
11+
```csharp
12+
public class SKCanvasView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable {
13+
// constructors
14+
public SKCanvasView ();
15+
// properties
16+
public System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> AdditionalAttributes { get; set; }
17+
public bool EnableRenderLoop { get; set; }
18+
public bool IgnorePixelScaling { get; set; }
19+
public System.Action<SKPaintSurfaceEventArgs> OnPaintSurface { get; set; }
20+
// methods
21+
protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder);
22+
public virtual void Dispose ();
23+
public void Invalidate ();
24+
protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender);
25+
}
26+
```
27+
28+
#### New Type: SkiaSharp.Views.Blazor.SKGLView
29+
30+
```csharp
31+
public class SKGLView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable {
32+
// constructors
33+
public SKGLView ();
34+
// properties
35+
public System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> AdditionalAttributes { get; set; }
36+
public bool EnableRenderLoop { get; set; }
37+
public bool IgnorePixelScaling { get; set; }
38+
public System.Action<SKPaintGLSurfaceEventArgs> OnPaintSurface { get; set; }
39+
// methods
40+
protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder);
41+
public virtual void Dispose ();
42+
public void Invalidate ();
43+
protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender);
44+
}
45+
```
46+
47+
#### New Type: SkiaSharp.Views.Blazor.SKPaintGLSurfaceEventArgs
48+
49+
```csharp
50+
public class SKPaintGLSurfaceEventArgs : System.EventArgs {
51+
// constructors
52+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget);
53+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
54+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info);
55+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
56+
// properties
57+
public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; }
58+
public SkiaSharp.SKColorType ColorType { get; }
59+
public SkiaSharp.SKImageInfo Info { get; }
60+
public SkiaSharp.GRSurfaceOrigin Origin { get; }
61+
public SkiaSharp.SKImageInfo RawInfo { get; }
62+
public SkiaSharp.SKSurface Surface { get; }
63+
}
64+
```
65+
66+
#### New Type: SkiaSharp.Views.Blazor.SKPaintSurfaceEventArgs
67+
68+
```csharp
69+
public class SKPaintSurfaceEventArgs : System.EventArgs {
70+
// constructors
71+
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info);
72+
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
73+
// properties
74+
public SkiaSharp.SKImageInfo Info { get; }
75+
public SkiaSharp.SKImageInfo RawInfo { get; }
76+
public SkiaSharp.SKSurface Surface { get; }
77+
}
78+
```
79+
80+
### New Namespace SkiaSharp.Views.Blazor.Internal
81+
82+
#### New Type: SkiaSharp.Views.Blazor.Internal.ActionHelper
83+
84+
```csharp
85+
public class ActionHelper {
86+
// constructors
87+
public ActionHelper (System.Action action);
88+
// methods
89+
public void Invoke ();
90+
}
91+
```
92+
93+
#### New Type: SkiaSharp.Views.Blazor.Internal.FloatFloatActionHelper
94+
95+
```csharp
96+
public class FloatFloatActionHelper {
97+
// constructors
98+
public FloatFloatActionHelper (System.Action<System.Single,System.Single> action);
99+
// methods
100+
public void Invoke (float width, float height);
101+
}
102+
```
103+

changelogs/SkiaSharp.Views.Desktop.Common/2.88.0/SkiaSharp.Views.Desktop.Common.md

+33-9
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,42 @@
66
77
### Namespace SkiaSharp.Views.Desktop
88

9-
#### Type Changed: SkiaSharp.Views.Desktop.Extensions
9+
#### Type Changed: SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs
1010

11-
Added methods:
11+
Obsoleted constructors:
12+
13+
```diff
14+
[Obsolete ()]
15+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo);
16+
```
17+
18+
Added constructors:
19+
20+
```csharp
21+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info);
22+
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
23+
```
24+
25+
Added properties:
26+
27+
```csharp
28+
public SkiaSharp.SKImageInfo Info { get; }
29+
public SkiaSharp.SKImageInfo RawInfo { get; }
30+
```
31+
32+
33+
#### Type Changed: SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs
34+
35+
Added constructor:
36+
37+
```csharp
38+
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
39+
```
40+
41+
Added property:
1242

1343
```csharp
14-
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKBitmap skiaBitmap);
15-
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKImage skiaImage);
16-
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPixmap pixmap);
17-
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPicture picture, SkiaSharp.SKSizeI dimensions);
18-
public static SkiaSharp.SKBitmap ToSKBitmap (this System.Drawing.Bitmap bitmap);
19-
public static SkiaSharp.SKImage ToSKImage (this System.Drawing.Bitmap bitmap);
20-
public static void ToSKPixmap (this System.Drawing.Bitmap bitmap, SkiaSharp.SKPixmap pixmap);
44+
public SkiaSharp.SKImageInfo RawInfo { get; }
2145
```
2246

2347

changelogs/SkiaSharp.Views.Forms.GTK/2.88.0/SkiaSharp.Views.Forms.md

+18
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,21 @@
44

55
> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0
66
7+
### Namespace SkiaSharp.Views.Forms
8+
9+
#### Type Changed: SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs
10+
11+
Added constructor:
12+
13+
```csharp
14+
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
15+
```
16+
17+
Added property:
18+
19+
```csharp
20+
public SkiaSharp.SKImageInfo RawInfo { get; }
21+
```
22+
23+
24+

0 commit comments

Comments
 (0)