committed by
GitHub
838 changed files with 22575 additions and 10826 deletions
@ -0,0 +1,8 @@ |
|||||
|
version: '1.1.0' |
||||
|
invalidStatus: "pending" |
||||
|
labelRule: |
||||
|
values: |
||||
|
- "bug" |
||||
|
- "feature" |
||||
|
- "enhancement" |
||||
|
- "area-infrastructure" |
||||
@ -1,76 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/ColorPicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/ColorPreviewer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/ColorSlider.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/ColorSpectrum.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/ColorView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent/Fluent.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/ColorPicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/ColorPreviewer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/ColorSlider.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/ColorSpectrum.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/ColorView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple/Simple.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.ColorPicker.dll</Right> |
|
||||
</Suppression> |
|
||||
</Suppressions> |
|
||||
@ -1,16 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Fluent.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.DataGrid.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.DataGrid.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Themes/Simple.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Controls.DataGrid.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Controls.DataGrid.dll</Right> |
|
||||
</Suppression> |
|
||||
</Suppressions> |
|
||||
@ -1,64 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Controls/BrushEditor.axaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Controls/FilterTextBox.axaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Controls/ThicknessEditor.axaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/ConsoleView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/ControlDetailsView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/EventsPageView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/LayoutExplorerView.axaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/MainView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/MainWindow.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Diagnostics/Views/TreePageView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Diagnostics.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Diagnostics.dll</Right> |
|
||||
</Suppression> |
|
||||
</Suppressions> |
|
||||
@ -0,0 +1,10 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
||||
|
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
||||
|
<Suppression> |
||||
|
<DiagnosticId>CP0001</DiagnosticId> |
||||
|
<Target>T:Tmds.DBus.SourceGenerator.PropertyChanges`1</Target> |
||||
|
<Left>baseline/netstandard2.0/Avalonia.FreeDesktop.dll</Left> |
||||
|
<Right>target/netstandard2.0/Avalonia.FreeDesktop.dll</Right> |
||||
|
</Suppression> |
||||
|
</Suppressions> |
||||
@ -1,10 +1,10 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
||||
<Suppression> |
<Suppression> |
||||
<DiagnosticId>CP0006</DiagnosticId> |
<DiagnosticId>CP0006</DiagnosticId> |
||||
<Target>M:Avalonia.Skia.ISkiaSharpApiLease.TryLeasePlatformGraphicsApi</Target> |
<Target>M:Avalonia.Skia.ISkiaGpuWithPlatformGraphicsContext.TryGetGrContext</Target> |
||||
<Left>baseline/netstandard2.0/Avalonia.Skia.dll</Left> |
<Left>baseline/netstandard2.0/Avalonia.Skia.dll</Left> |
||||
<Right>target/netstandard2.0/Avalonia.Skia.dll</Right> |
<Right>target/netstandard2.0/Avalonia.Skia.dll</Right> |
||||
</Suppression> |
</Suppression> |
||||
</Suppressions> |
</Suppressions> |
||||
|
|||||
@ -1,448 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Accents/BaseColorsPalette.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Accents/BaseResources.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Accents/FluentControlResources.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/AdornerLayer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/AutoCompleteBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Button.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ButtonSpinner.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Calendar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarDatePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarDayButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CaptionButtons.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Carousel.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CheckBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ComboBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ComboBoxItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ContentControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ContextMenu.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DataValidationErrors.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DatePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DateTimePickerShared.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DropDownButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/EmbeddableControlRoot.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Expander.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/FluentControls.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/FlyoutPresenter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/GridSplitter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ItemsControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Label.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ListBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ListBoxItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ManagedFileChooser.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Menu.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/MenuFlyoutPresenter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/MenuItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/MenuScrollViewer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NativeMenuBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NotificationCard.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NumericUpDown.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/OverlayPopupHost.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/PathIcon.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/PopupRoot.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ProgressBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RadioButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RefreshContainer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RefreshVisualizer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RepeatButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ScrollBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ScrollViewer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SelectableTextBlock.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Separator.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Slider.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SplitButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SplitView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabStrip.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabStripItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TextBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ThemeVariantScope.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TimePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TitleBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToggleButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToggleSwitch.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToolTip.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TransitioningContentControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TreeView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TreeViewItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/UserControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Window.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/WindowNotificationManager.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/DensityStyles/Compact.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/FluentTheme.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Fluent.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Fluent.dll</Right> |
|
||||
</Suppression> |
|
||||
</Suppressions> |
|
||||
@ -1,424 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Accents/Base.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/AdornerLayer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/AutoCompleteBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Button.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ButtonSpinner.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Calendar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarDatePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarDayButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CalendarItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CaptionButtons.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Carousel.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/CheckBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ComboBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ComboBoxItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ContentControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ContextMenu.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DataValidationErrors.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DatePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DateTimePickerShared.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/DropDownButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/EmbeddableControlRoot.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Expander.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/FlyoutPresenter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/GridSplitter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ItemsControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Label.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ListBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ListBoxItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ManagedFileChooser.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Menu.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/MenuFlyoutPresenter.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/MenuItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NativeMenuBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NotificationCard.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/NumericUpDown.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/OverlayPopupHost.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/PathIcon.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/PopupRoot.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ProgressBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RadioButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RefreshContainer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RefreshVisualizer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/RepeatButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ScrollBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ScrollViewer.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SelectableTextBlock.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Separator.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SimpleControls.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Slider.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SplitButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/SplitView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabStrip.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TabStripItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TextBox.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ThemeVariantScope.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TimePicker.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TitleBar.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToggleButton.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToggleSwitch.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/ToolTip.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TransitioningContentControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TreeView.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/TreeViewItem.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/UserControl.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/Window.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/Controls/WindowNotificationManager.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
<Suppression> |
|
||||
<DiagnosticId>CP0001</DiagnosticId> |
|
||||
<Target>T:CompiledAvaloniaXaml.!AvaloniaResources.NamespaceInfo:/SimpleTheme.xaml</Target> |
|
||||
<Left>baseline/netstandard2.0/Avalonia.Themes.Simple.dll</Left> |
|
||||
<Right>target/netstandard2.0/Avalonia.Themes.Simple.dll</Right> |
|
||||
</Suppression> |
|
||||
</Suppressions> |
|
||||
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> |
||||
|
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
||||
|
<Suppression> |
||||
|
<DiagnosticId>CP0002</DiagnosticId> |
||||
|
<Target>M:Avalonia.iOS.UIViewControlHandle.get_HandleDescriptor</Target> |
||||
|
<Left>baseline/net8.0-tvos17.0/Avalonia.iOS.dll</Left> |
||||
|
<Right>target/net8.0-tvos17.0/Avalonia.iOS.dll</Right> |
||||
|
</Suppression> |
||||
|
<Suppression> |
||||
|
<DiagnosticId>CP0007</DiagnosticId> |
||||
|
<Target>T:Avalonia.iOS.UIViewControlHandle</Target> |
||||
|
<Left>baseline/net8.0-tvos17.0/Avalonia.iOS.dll</Left> |
||||
|
<Right>target/net8.0-tvos17.0/Avalonia.iOS.dll</Right> |
||||
|
</Suppression> |
||||
|
</Suppressions> |
||||
File diff suppressed because it is too large
@ -1,9 +1,6 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<!-- '!NET6_0_OR_GREATER' equivalent --> |
<!-- '!NET6_0_OR_GREATER' equivalent --> |
||||
<ItemGroup Condition="!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')))"> |
<ItemGroup Condition="!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')))"> |
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> |
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" /> |
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" /> |
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" /> |
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.6.0" /> |
|
||||
</ItemGroup> |
</ItemGroup> |
||||
</Project> |
</Project> |
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.7" /> |
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.9" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
</Project> |
</Project> |
||||
|
|||||
@ -1,13 +1,22 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net461'" > |
<PropertyGroup Condition="'$(TargetFramework)'=='net461'" > |
||||
<OutputType>WinExe</OutputType> |
<OutputType>WinExe</OutputType> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
<ItemGroup> |
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\Avalonia.Desktop\Avalonia.Desktop.csproj" /> |
<ItemGroup Condition="'$(TargetFramework)'!='net461'"> |
||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)../src/Avalonia.Desktop/Avalonia.Desktop.csproj" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup Condition="'$(TargetFramework)'=='net461'"> |
||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)../src/Windows/Avalonia.Win32/Avalonia.Win32.csproj" /> |
||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)../src/Skia/Avalonia.Skia/Avalonia.Skia.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
<Target Name="GatherReferences" AfterTargets="CoreCompile"> |
<Target Name="GatherReferences" AfterTargets="CoreCompile"> |
||||
<WriteLinesToFile File="$(TargetPath).refs" |
<WriteLinesToFile File="$(TargetPath).refs" |
||||
Lines="@(ReferencePathWithRefAssemblies)" |
Lines="@(ReferencePathWithRefAssemblies)" |
||||
Overwrite="true" /> |
Overwrite="true" /> |
||||
</Target> |
</Target> |
||||
|
|
||||
</Project> |
</Project> |
||||
|
|||||
@ -0,0 +1,13 @@ |
|||||
|
#pragma once |
||||
|
#import <Cocoa/Cocoa.h> |
||||
|
#import "avalonia-native.h" |
||||
|
|
||||
|
// Defines the interface between AvnAutomationNode and objects which implement
|
||||
|
// NSAccessibility such as AvnAccessibilityElement or AvnWindow.
|
||||
|
@protocol AvnAccessibility <NSAccessibility> |
||||
|
@required |
||||
|
- (void) raiseChildrenChanged; |
||||
|
@optional |
||||
|
- (void) raiseFocusChanged; |
||||
|
- (void) raisePropertyChanged:(AvnAutomationProperty)property; |
||||
|
@end |
||||
@ -0,0 +1,18 @@ |
|||||
|
#pragma once |
||||
|
#include "avalonia-native.h" |
||||
|
#include "AvnAccessibility.h" |
||||
|
|
||||
|
// Defines a means for managed code to raise accessibility events.
|
||||
|
class AvnAutomationNode : public ComSingleObject<IAvnAutomationNode, &IID_IAvnAutomationNode> |
||||
|
{ |
||||
|
public: |
||||
|
FORWARD_IUNKNOWN() |
||||
|
AvnAutomationNode(id <AvnAccessibility> owner) { _owner = owner; } |
||||
|
AvnAccessibilityElement* GetOwner() { return _owner; } |
||||
|
virtual void Dispose() override { _owner = nil; } |
||||
|
virtual void ChildrenChanged () override { [_owner raiseChildrenChanged]; } |
||||
|
virtual void PropertyChanged (AvnAutomationProperty property) override { [_owner raisePropertyChanged:property]; } |
||||
|
virtual void FocusChanged () override { [_owner raiseFocusChanged]; } |
||||
|
private: |
||||
|
__strong id <AvnAccessibility> _owner; |
||||
|
}; |
||||
@ -1,9 +0,0 @@ |
|||||
//
|
|
||||
// Created by Dan Walmsley on 06/05/2022.
|
|
||||
// Copyright (c) 2022 Avalonia. All rights reserved.
|
|
||||
//
|
|
||||
|
|
||||
#ifndef AVALONIA_NATIVE_OSX_POPUPIMPL_H |
|
||||
#define AVALONIA_NATIVE_OSX_POPUPIMPL_H |
|
||||
|
|
||||
#endif //AVALONIA_NATIVE_OSX_POPUPIMPL_H
|
|
||||
@ -0,0 +1,77 @@ |
|||||
|
//
|
||||
|
// TopLevelImpl.h
|
||||
|
// Avalonia.Native.OSX
|
||||
|
//
|
||||
|
// Created by Benedikt Stebner on 16.05.24.
|
||||
|
// Copyright © 2024 Avalonia. All rights reserved.
|
||||
|
//
|
||||
|
|
||||
|
#ifndef TopLevelImpl_h |
||||
|
#define TopLevelImpl_h |
||||
|
|
||||
|
#include "rendertarget.h" |
||||
|
#include "INSWindowHolder.h" |
||||
|
#include "AvnTextInputMethod.h" |
||||
|
#include "AutoFitContentView.h" |
||||
|
#include <list> |
||||
|
|
||||
|
class TopLevelImpl : public virtual ComObject, |
||||
|
public virtual IAvnTopLevel, |
||||
|
public INSViewHolder{ |
||||
|
|
||||
|
public: |
||||
|
FORWARD_IUNKNOWN() |
||||
|
BEGIN_INTERFACE_MAP() |
||||
|
INTERFACE_MAP_ENTRY(IAvnTopLevel, IID_IAvnTopLevel) |
||||
|
END_INTERFACE_MAP() |
||||
|
|
||||
|
virtual ~TopLevelImpl(); |
||||
|
|
||||
|
TopLevelImpl(IAvnTopLevelEvents* events); |
||||
|
|
||||
|
virtual AvnView *GetNSView() override; |
||||
|
|
||||
|
virtual HRESULT SetCursor(IAvnCursor* cursor) override; |
||||
|
|
||||
|
virtual HRESULT GetScaling(double*ret) override; |
||||
|
|
||||
|
virtual HRESULT GetClientSize(AvnSize *ret) override; |
||||
|
|
||||
|
virtual HRESULT GetInputMethod(IAvnTextInputMethod **ppv) override; |
||||
|
|
||||
|
virtual HRESULT ObtainNSViewHandle(void** retOut) override; |
||||
|
|
||||
|
virtual HRESULT ObtainNSViewHandleRetained(void** retOut) override; |
||||
|
|
||||
|
virtual HRESULT CreateSoftwareRenderTarget(IAvnSoftwareRenderTarget** ret) override; |
||||
|
|
||||
|
virtual HRESULT CreateMetalRenderTarget(IAvnMetalDevice* device, IAvnMetalRenderTarget** ret) override; |
||||
|
|
||||
|
virtual HRESULT CreateGlRenderTarget(IAvnGlContext* context, IAvnGlSurfaceRenderTarget** ret) override; |
||||
|
|
||||
|
virtual HRESULT CreateNativeControlHost(IAvnNativeControlHost **retOut) override; |
||||
|
|
||||
|
virtual HRESULT Invalidate() override; |
||||
|
|
||||
|
virtual HRESULT PointToClient(AvnPoint point, AvnPoint *ret) override; |
||||
|
|
||||
|
virtual HRESULT PointToScreen(AvnPoint point, AvnPoint *ret) override; |
||||
|
|
||||
|
virtual HRESULT SetTransparencyMode(AvnWindowTransparencyMode mode) override; |
||||
|
|
||||
|
virtual HRESULT GetCurrentDisplayId (CGDirectDisplayID* ret) override; |
||||
|
protected: |
||||
|
NSCursor *cursor; |
||||
|
virtual void UpdateAppearance(); |
||||
|
|
||||
|
public: |
||||
|
NSObject<IRenderTarget> *currentRenderTarget; |
||||
|
ComPtr<AvnTextInputMethod> InputMethod; |
||||
|
ComPtr<IAvnTopLevelEvents> TopLevelEvents; |
||||
|
AvnView *View; |
||||
|
|
||||
|
void UpdateCursor(); |
||||
|
virtual void SetClientSize(NSSize size); |
||||
|
}; |
||||
|
|
||||
|
#endif /* TopLevelImpl_h */ |
||||
@ -0,0 +1,285 @@ |
|||||
|
#import <AppKit/AppKit.h> |
||||
|
#import <Cocoa/Cocoa.h> |
||||
|
#include "automation.h" |
||||
|
#include "cursor.h" |
||||
|
#include "AutoFitContentView.h" |
||||
|
#include "TopLevelImpl.h" |
||||
|
#include "AvnTextInputMethod.h" |
||||
|
#include "AvnView.h" |
||||
|
|
||||
|
TopLevelImpl::~TopLevelImpl() { |
||||
|
View = nullptr; |
||||
|
} |
||||
|
|
||||
|
TopLevelImpl::TopLevelImpl(IAvnTopLevelEvents *events) { |
||||
|
TopLevelEvents = events; |
||||
|
|
||||
|
View = [[AvnView alloc] initWithParent:this]; |
||||
|
InputMethod = new AvnTextInputMethod(View); |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::GetScaling(double *ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
if (ret == nullptr) |
||||
|
return E_POINTER; |
||||
|
|
||||
|
if ([View window] == nullptr) { |
||||
|
*ret = 1; |
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
*ret = [[View window] backingScaleFactor]; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::GetClientSize(AvnSize *ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
if (ret == nullptr) |
||||
|
return E_POINTER; |
||||
|
|
||||
|
NSRect frame = [View frame]; |
||||
|
|
||||
|
ret->Width = frame.size.width; |
||||
|
ret->Height = frame.size.height; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::GetInputMethod(IAvnTextInputMethod **retOut) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
*retOut = InputMethod; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::ObtainNSViewHandle(void **ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if (ret == nullptr) { |
||||
|
return E_POINTER; |
||||
|
} |
||||
|
|
||||
|
*ret = (__bridge void *) View; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::ObtainNSViewHandleRetained(void **ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if (ret == nullptr) { |
||||
|
return E_POINTER; |
||||
|
} |
||||
|
|
||||
|
*ret = (__bridge_retained void *) View; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::SetCursor(IAvnCursor *cursor) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
Cursor *avnCursor = dynamic_cast<Cursor *>(cursor); |
||||
|
this->cursor = avnCursor->GetNative(); |
||||
|
UpdateCursor(); |
||||
|
|
||||
|
if (avnCursor->IsHidden()) { |
||||
|
[NSCursor hide]; |
||||
|
} else { |
||||
|
[NSCursor unhide]; |
||||
|
} |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
void TopLevelImpl::UpdateCursor() { |
||||
|
if (cursor != nil) { |
||||
|
[cursor set]; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::CreateSoftwareRenderTarget(IAvnSoftwareRenderTarget **ppv) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if(![NSThread isMainThread]) |
||||
|
return COR_E_INVALIDOPERATION; |
||||
|
|
||||
|
if (View == NULL) |
||||
|
return E_FAIL; |
||||
|
|
||||
|
auto target = [[IOSurfaceRenderTarget alloc] initWithOpenGlContext: nil]; |
||||
|
*ppv = [target createSoftwareRenderTarget]; |
||||
|
[View setRenderTarget: target]; |
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::CreateGlRenderTarget(IAvnGlContext* glContext, IAvnGlSurfaceRenderTarget **ppv) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if(![NSThread isMainThread]) |
||||
|
return COR_E_INVALIDOPERATION; |
||||
|
|
||||
|
if (View == NULL) |
||||
|
return E_FAIL; |
||||
|
|
||||
|
auto target = [[IOSurfaceRenderTarget alloc] initWithOpenGlContext: glContext]; |
||||
|
*ppv = [target createSurfaceRenderTarget]; |
||||
|
[View setRenderTarget: target]; |
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::CreateMetalRenderTarget(IAvnMetalDevice* device, IAvnMetalRenderTarget **ppv) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if(![NSThread isMainThread]) |
||||
|
return COR_E_INVALIDOPERATION; |
||||
|
|
||||
|
if (View == NULL) |
||||
|
return E_FAIL; |
||||
|
|
||||
|
auto target = [[MetalRenderTarget alloc] initWithDevice: device]; |
||||
|
[View setRenderTarget: target]; |
||||
|
[target getRenderTarget: ppv]; |
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::CreateNativeControlHost(IAvnNativeControlHost **retOut) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
if (View == NULL) |
||||
|
return E_FAIL; |
||||
|
*retOut = ::CreateNativeControlHost(View); |
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
AvnView *TopLevelImpl::GetNSView() { |
||||
|
return View; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::Invalidate() { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
[View setNeedsDisplayInRect:[View frame]]; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::PointToClient(AvnPoint point, AvnPoint *ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
if (ret == nullptr) { |
||||
|
return E_POINTER; |
||||
|
} |
||||
|
|
||||
|
auto window = [View window]; |
||||
|
|
||||
|
if(window == nullptr){ |
||||
|
ret = &point; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
auto frame = [View frame]; |
||||
|
|
||||
|
auto viewRect = [View convertRect:frame toView:nil]; |
||||
|
|
||||
|
auto viewScreenRect = [window convertRectToScreen:viewRect]; |
||||
|
|
||||
|
auto primaryDisplayHeight = NSMaxY([[[NSScreen screens] firstObject] frame]); |
||||
|
|
||||
|
//Window coord are bottom to top so we need to adjust by primaryScreenHeight |
||||
|
auto viewScreenLocation = NSMakePoint(viewScreenRect.origin.x, primaryDisplayHeight - viewScreenRect.origin.y - frame.size.height); |
||||
|
|
||||
|
//Substract client point from screen position of the view |
||||
|
auto localPoint = NSMakePoint(point.X - viewScreenLocation.x, point.Y - viewScreenLocation.y); |
||||
|
|
||||
|
point = ToAvnPoint(localPoint); |
||||
|
|
||||
|
*ret = point; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::PointToScreen(AvnPoint point, AvnPoint *ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
@autoreleasepool { |
||||
|
if (ret == nullptr) { |
||||
|
return E_POINTER; |
||||
|
} |
||||
|
|
||||
|
auto window = [View window]; |
||||
|
|
||||
|
if(window == nullptr){ |
||||
|
ret = &point; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
auto frame = [View frame]; |
||||
|
|
||||
|
//Get rect inside current window |
||||
|
auto viewRect = [View convertRect:frame toView:nil]; |
||||
|
|
||||
|
//Get screen rect of the view |
||||
|
auto viewScreenRect = [window convertRectToScreen:viewRect]; |
||||
|
|
||||
|
auto primaryDisplayHeight = NSMaxY([[[NSScreen screens] firstObject] frame]); |
||||
|
|
||||
|
//Window coord are bottom to top so we need to adjust by primaryScreenHeight |
||||
|
auto viewScreenLocation = NSMakePoint(viewScreenRect.origin.x, primaryDisplayHeight - viewScreenRect.origin.y - frame.size.height); |
||||
|
|
||||
|
//Add client point to screen position of the view |
||||
|
auto screenPoint = ToAvnPoint(NSMakePoint(viewScreenLocation.x + point.X, viewScreenLocation.y + point.Y)); |
||||
|
|
||||
|
*ret = screenPoint; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::SetTransparencyMode(AvnWindowTransparencyMode mode) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
HRESULT TopLevelImpl::GetCurrentDisplayId (CGDirectDisplayID* ret) { |
||||
|
START_COM_CALL; |
||||
|
|
||||
|
auto window = [View window]; |
||||
|
*ret = [window.screen av_displayId]; |
||||
|
|
||||
|
return S_OK; |
||||
|
} |
||||
|
|
||||
|
void TopLevelImpl::UpdateAppearance() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
void TopLevelImpl::SetClientSize(NSSize size){ |
||||
|
[View setFrameSize:size]; |
||||
|
} |
||||
|
|
||||
|
extern IAvnTopLevel* CreateAvnTopLevel(IAvnTopLevelEvents* events) |
||||
|
{ |
||||
|
@autoreleasepool |
||||
|
{ |
||||
|
IAvnTopLevel* ptr = (IAvnTopLevel*)new TopLevelImpl(events); |
||||
|
return ptr; |
||||
|
} |
||||
|
} |
||||
@ -1,12 +1,13 @@ |
|||||
#pragma once |
#pragma once |
||||
|
|
||||
#import <Cocoa/Cocoa.h> |
#import <Cocoa/Cocoa.h> |
||||
|
#include "AvnAccessibility.h" |
||||
NS_ASSUME_NONNULL_BEGIN |
NS_ASSUME_NONNULL_BEGIN |
||||
|
|
||||
class IAvnAutomationPeer; |
class IAvnAutomationPeer; |
||||
|
|
||||
@interface AvnAccessibilityElement : NSAccessibilityElement |
@interface AvnAccessibilityElement : NSAccessibilityElement <AvnAccessibility> |
||||
+ (AvnAccessibilityElement *) acquire:(IAvnAutomationPeer *) peer; |
+ (id _Nullable) acquire:(IAvnAutomationPeer *) peer; |
||||
@end |
@end |
||||
|
|
||||
NS_ASSUME_NONNULL_END |
NS_ASSUME_NONNULL_END |
||||
|
|||||
|
Before Width: | Height: | Size: 701 B |
@ -0,0 +1,30 @@ |
|||||
|
<UserControl xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
x:Class="ControlCatalog.Pages.OpenGl.GlPageKnobs" |
||||
|
xmlns:pages="using:ControlCatalog.Pages" |
||||
|
xmlns:gl="using:ControlCatalog.Pages.OpenGl" |
||||
|
> |
||||
|
<Grid> |
||||
|
<StackPanel> |
||||
|
<TextBlock Text="{Binding $parent[gl:GlPageKnobs].Info}"/> |
||||
|
</StackPanel> |
||||
|
<Grid ColumnDefinitions="*,Auto" Margin="20"> |
||||
|
<StackPanel Grid.Column="1" MinWidth="300"> |
||||
|
<TextBlock>Yaw</TextBlock> |
||||
|
<Slider Value="{Binding $parent[gl:GlPageKnobs].Yaw, Mode=TwoWay}" Maximum="10"/> |
||||
|
<TextBlock>Pitch</TextBlock> |
||||
|
<Slider Value="{Binding $parent[gl:GlPageKnobs].Pitch, Mode=TwoWay}" Maximum="10"/> |
||||
|
<TextBlock>Roll</TextBlock> |
||||
|
<Slider Value="{Binding $parent[gl:GlPageKnobs].Roll, Mode=TwoWay}" Maximum="10"/> |
||||
|
<StackPanel Orientation="Horizontal"> |
||||
|
<TextBlock FontWeight="Bold" Foreground="#C000C0">D</TextBlock> |
||||
|
<TextBlock FontWeight="Bold" Foreground="#00C090">I</TextBlock> |
||||
|
<TextBlock FontWeight="Bold" Foreground="#90C000">S</TextBlock> |
||||
|
<TextBlock FontWeight="Bold" Foreground="#C09000">C</TextBlock> |
||||
|
<TextBlock FontWeight="Bold" Foreground="#00C090">O</TextBlock> |
||||
|
</StackPanel> |
||||
|
<Slider Value="{Binding $parent[gl:GlPageKnobs].Disco, Mode=TwoWay}" Maximum="1"/> |
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
</UserControl> |
||||
@ -0,0 +1,70 @@ |
|||||
|
using Avalonia; |
||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Markup.Xaml; |
||||
|
|
||||
|
namespace ControlCatalog.Pages.OpenGl; |
||||
|
|
||||
|
public partial class GlPageKnobs : UserControl |
||||
|
{ |
||||
|
public GlPageKnobs() |
||||
|
{ |
||||
|
AvaloniaXamlLoader.Load(this); |
||||
|
} |
||||
|
|
||||
|
private float _yaw; |
||||
|
|
||||
|
public static readonly DirectProperty<GlPageKnobs, float> YawProperty = |
||||
|
AvaloniaProperty.RegisterDirect<GlPageKnobs, float>("Yaw", o => o.Yaw, (o, v) => o.Yaw = v); |
||||
|
|
||||
|
public float Yaw |
||||
|
{ |
||||
|
get => _yaw; |
||||
|
set => SetAndRaise(YawProperty, ref _yaw, value); |
||||
|
} |
||||
|
|
||||
|
private float _pitch; |
||||
|
|
||||
|
public static readonly DirectProperty<GlPageKnobs, float> PitchProperty = |
||||
|
AvaloniaProperty.RegisterDirect<GlPageKnobs, float>("Pitch", o => o.Pitch, (o, v) => o.Pitch = v); |
||||
|
|
||||
|
public float Pitch |
||||
|
{ |
||||
|
get => _pitch; |
||||
|
set => SetAndRaise(PitchProperty, ref _pitch, value); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private float _roll; |
||||
|
|
||||
|
public static readonly DirectProperty<GlPageKnobs, float> RollProperty = |
||||
|
AvaloniaProperty.RegisterDirect<GlPageKnobs, float>("Roll", o => o.Roll, (o, v) => o.Roll = v); |
||||
|
|
||||
|
public float Roll |
||||
|
{ |
||||
|
get => _roll; |
||||
|
set => SetAndRaise(RollProperty, ref _roll, value); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private float _disco; |
||||
|
|
||||
|
public static readonly DirectProperty<GlPageKnobs, float> DiscoProperty = |
||||
|
AvaloniaProperty.RegisterDirect<GlPageKnobs, float>("Disco", o => o.Disco, (o, v) => o.Disco = v); |
||||
|
|
||||
|
public float Disco |
||||
|
{ |
||||
|
get => _disco; |
||||
|
set => SetAndRaise(DiscoProperty, ref _disco, value); |
||||
|
} |
||||
|
|
||||
|
private string _info = string.Empty; |
||||
|
|
||||
|
public static readonly DirectProperty<GlPageKnobs, string> InfoProperty = |
||||
|
AvaloniaProperty.RegisterDirect<GlPageKnobs, string>("Info", o => o.Info, (o, v) => o.Info = v); |
||||
|
|
||||
|
public string Info |
||||
|
{ |
||||
|
get => _info; |
||||
|
private set => SetAndRaise(InfoProperty, ref _info, value); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,311 @@ |
|||||
|
using System; |
||||
|
using System.Diagnostics; |
||||
|
using System.IO; |
||||
|
using System.Linq; |
||||
|
using System.Numerics; |
||||
|
using System.Runtime.InteropServices; |
||||
|
using Avalonia; |
||||
|
using Avalonia.OpenGL; |
||||
|
using static Avalonia.OpenGL.GlConsts; |
||||
|
// ReSharper disable StringLiteralTypo
|
||||
|
|
||||
|
namespace ControlCatalog.Pages.OpenGl; |
||||
|
|
||||
|
internal class OpenGlContent |
||||
|
{ |
||||
|
private int _vertexShader; |
||||
|
private int _fragmentShader; |
||||
|
private int _shaderProgram; |
||||
|
private int _vertexBufferObject; |
||||
|
private int _indexBufferObject; |
||||
|
private int _vertexArrayObject; |
||||
|
private GlVersion GlVersion; |
||||
|
|
||||
|
private string GetShader(bool fragment, string shader) |
||||
|
{ |
||||
|
var version = (GlVersion.Type == GlProfileType.OpenGL |
||||
|
? RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 150 : 120 |
||||
|
: 100); |
||||
|
var data = "#version " + version + "\n"; |
||||
|
if (GlVersion.Type == GlProfileType.OpenGLES) |
||||
|
data += "precision mediump float;\n"; |
||||
|
if (version >= 150) |
||||
|
{ |
||||
|
shader = shader.Replace("attribute", "in"); |
||||
|
if (fragment) |
||||
|
shader = shader |
||||
|
.Replace("varying", "in") |
||||
|
.Replace("//DECLAREGLFRAG", "out vec4 outFragColor;") |
||||
|
.Replace("gl_FragColor", "outFragColor"); |
||||
|
else |
||||
|
shader = shader.Replace("varying", "out"); |
||||
|
} |
||||
|
|
||||
|
data += shader; |
||||
|
|
||||
|
return data; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private string VertexShaderSource => GetShader(false, @"
|
||||
|
attribute vec3 aPos; |
||||
|
attribute vec3 aNormal; |
||||
|
uniform mat4 uModel; |
||||
|
uniform mat4 uProjection; |
||||
|
uniform mat4 uView; |
||||
|
|
||||
|
varying vec3 FragPos; |
||||
|
varying vec3 VecPos; |
||||
|
varying vec3 Normal; |
||||
|
uniform float uTime; |
||||
|
uniform float uDisco; |
||||
|
void main() |
||||
|
{ |
||||
|
float discoScale = sin(uTime * 10.0) / 10.0; |
||||
|
float distortionX = 1.0 + uDisco * cos(uTime * 20.0) / 10.0; |
||||
|
|
||||
|
float scale = 1.0 + uDisco * discoScale; |
||||
|
|
||||
|
vec3 scaledPos = aPos; |
||||
|
scaledPos.x = scaledPos.x * distortionX; |
||||
|
|
||||
|
scaledPos *= scale; |
||||
|
gl_Position = uProjection * uView * uModel * vec4(scaledPos, 1.0); |
||||
|
FragPos = vec3(uModel * vec4(aPos, 1.0)); |
||||
|
VecPos = aPos; |
||||
|
Normal = normalize(vec3(uModel * vec4(aNormal, 1.0))); |
||||
|
} |
||||
|
");
|
||||
|
|
||||
|
private string FragmentShaderSource => GetShader(true, @"
|
||||
|
varying vec3 FragPos; |
||||
|
varying vec3 VecPos; |
||||
|
varying vec3 Normal; |
||||
|
uniform float uMaxY; |
||||
|
uniform float uMinY; |
||||
|
uniform float uTime; |
||||
|
uniform float uDisco; |
||||
|
//DECLAREGLFRAG
|
||||
|
|
||||
|
void main() |
||||
|
{ |
||||
|
float y = (VecPos.y - uMinY) / (uMaxY - uMinY); |
||||
|
float c = cos(atan(VecPos.x, VecPos.z) * 20.0 + uTime * 40.0 + y * 50.0); |
||||
|
float s = sin(-atan(VecPos.z, VecPos.x) * 20.0 - uTime * 20.0 - y * 30.0); |
||||
|
|
||||
|
vec3 discoColor = vec3( |
||||
|
0.5 + abs(0.5 - y) * cos(uTime * 10.0), |
||||
|
0.25 + (smoothstep(0.3, 0.8, y) * (0.5 - c / 4.0)), |
||||
|
0.25 + abs((smoothstep(0.1, 0.4, y) * (0.5 - s / 4.0)))); |
||||
|
|
||||
|
vec3 objectColor = vec3((1.0 - y), 0.40 + y / 4.0, y * 0.75 + 0.25); |
||||
|
objectColor = objectColor * (1.0 - uDisco) + discoColor * uDisco; |
||||
|
|
||||
|
float ambientStrength = 0.3; |
||||
|
vec3 lightColor = vec3(1.0, 1.0, 1.0); |
||||
|
vec3 lightPos = vec3(uMaxY * 2.0, uMaxY * 2.0, uMaxY * 2.0); |
||||
|
vec3 ambient = ambientStrength * lightColor; |
||||
|
|
||||
|
|
||||
|
vec3 norm = normalize(Normal); |
||||
|
vec3 lightDir = normalize(lightPos - FragPos); |
||||
|
|
||||
|
float diff = max(dot(norm, lightDir), 0.0); |
||||
|
vec3 diffuse = diff * lightColor; |
||||
|
|
||||
|
vec3 result = (ambient + diffuse) * objectColor; |
||||
|
gl_FragColor = vec4(result, 1.0); |
||||
|
|
||||
|
} |
||||
|
");
|
||||
|
|
||||
|
[StructLayout(LayoutKind.Sequential, Pack = 4)] |
||||
|
private struct Vertex |
||||
|
{ |
||||
|
public Vector3 Position; |
||||
|
public Vector3 Normal; |
||||
|
} |
||||
|
|
||||
|
private readonly Vertex[] _points; |
||||
|
private readonly ushort[] _indices; |
||||
|
private readonly float _minY; |
||||
|
private readonly float _maxY; |
||||
|
|
||||
|
public OpenGlContent() |
||||
|
{ |
||||
|
var name = typeof(OpenGlPage).Assembly.GetManifestResourceNames().First(x => x.Contains("teapot.bin")); |
||||
|
using (var sr = new BinaryReader(typeof(OpenGlPage).Assembly.GetManifestResourceStream(name)!)) |
||||
|
{ |
||||
|
var buf = new byte[sr.ReadInt32()]; |
||||
|
sr.Read(buf, 0, buf.Length); |
||||
|
var points = new float[buf.Length / 4]; |
||||
|
Buffer.BlockCopy(buf, 0, points, 0, buf.Length); |
||||
|
buf = new byte[sr.ReadInt32()]; |
||||
|
sr.Read(buf, 0, buf.Length); |
||||
|
_indices = new ushort[buf.Length / 2]; |
||||
|
Buffer.BlockCopy(buf, 0, _indices, 0, buf.Length); |
||||
|
_points = new Vertex[points.Length / 3]; |
||||
|
for (var primitive = 0; primitive < points.Length / 3; primitive++) |
||||
|
{ |
||||
|
var srci = primitive * 3; |
||||
|
_points[primitive] = new Vertex |
||||
|
{ |
||||
|
Position = new Vector3(points[srci], points[srci + 1], points[srci + 2]) |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
for (int i = 0; i < _indices.Length; i += 3) |
||||
|
{ |
||||
|
Vector3 a = _points[_indices[i]].Position; |
||||
|
Vector3 b = _points[_indices[i + 1]].Position; |
||||
|
Vector3 c = _points[_indices[i + 2]].Position; |
||||
|
var normal = Vector3.Normalize(Vector3.Cross(c - b, a - b)); |
||||
|
|
||||
|
_points[_indices[i]].Normal += normal; |
||||
|
_points[_indices[i + 1]].Normal += normal; |
||||
|
_points[_indices[i + 2]].Normal += normal; |
||||
|
} |
||||
|
|
||||
|
for (int i = 0; i < _points.Length; i++) |
||||
|
{ |
||||
|
_points[i].Normal = Vector3.Normalize(_points[i].Normal); |
||||
|
_maxY = Math.Max(_maxY, _points[i].Position.Y); |
||||
|
_minY = Math.Min(_minY, _points[i].Position.Y); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private static void CheckError(GlInterface gl) |
||||
|
{ |
||||
|
int err; |
||||
|
while ((err = gl.GetError()) != GL_NO_ERROR) |
||||
|
Console.WriteLine(err); |
||||
|
} |
||||
|
|
||||
|
public string Info { get; private set; } = string.Empty; |
||||
|
|
||||
|
public unsafe void Init(GlInterface GL, GlVersion version) |
||||
|
{ |
||||
|
GlVersion = version; |
||||
|
CheckError(GL); |
||||
|
|
||||
|
Info = $"Renderer: {GL.GetString(GL_RENDERER)} Version: {GL.GetString(GL_VERSION)}"; |
||||
|
|
||||
|
// Load the source of the vertex shader and compile it.
|
||||
|
_vertexShader = GL.CreateShader(GL_VERTEX_SHADER); |
||||
|
Console.WriteLine(GL.CompileShaderAndGetError(_vertexShader, VertexShaderSource)); |
||||
|
|
||||
|
// Load the source of the fragment shader and compile it.
|
||||
|
_fragmentShader = GL.CreateShader(GL_FRAGMENT_SHADER); |
||||
|
Console.WriteLine(GL.CompileShaderAndGetError(_fragmentShader, FragmentShaderSource)); |
||||
|
|
||||
|
// Create the shader program, attach the vertex and fragment shaders and link the program.
|
||||
|
_shaderProgram = GL.CreateProgram(); |
||||
|
GL.AttachShader(_shaderProgram, _vertexShader); |
||||
|
GL.AttachShader(_shaderProgram, _fragmentShader); |
||||
|
const int positionLocation = 0; |
||||
|
const int normalLocation = 1; |
||||
|
GL.BindAttribLocationString(_shaderProgram, positionLocation, "aPos"); |
||||
|
GL.BindAttribLocationString(_shaderProgram, normalLocation, "aNormal"); |
||||
|
Console.WriteLine(GL.LinkProgramAndGetError(_shaderProgram)); |
||||
|
CheckError(GL); |
||||
|
|
||||
|
// Create the vertex buffer object (VBO) for the vertex data.
|
||||
|
_vertexBufferObject = GL.GenBuffer(); |
||||
|
// Bind the VBO and copy the vertex data into it.
|
||||
|
GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); |
||||
|
CheckError(GL); |
||||
|
var vertexSize = Marshal.SizeOf<Vertex>(); |
||||
|
fixed (void* pdata = _points) |
||||
|
GL.BufferData(GL_ARRAY_BUFFER, new IntPtr(_points.Length * vertexSize), |
||||
|
new IntPtr(pdata), GL_STATIC_DRAW); |
||||
|
|
||||
|
_indexBufferObject = GL.GenBuffer(); |
||||
|
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject); |
||||
|
CheckError(GL); |
||||
|
fixed (void* pdata = _indices) |
||||
|
GL.BufferData(GL_ELEMENT_ARRAY_BUFFER, new IntPtr(_indices.Length * sizeof(ushort)), new IntPtr(pdata), |
||||
|
GL_STATIC_DRAW); |
||||
|
CheckError(GL); |
||||
|
_vertexArrayObject = GL.GenVertexArray(); |
||||
|
GL.BindVertexArray(_vertexArrayObject); |
||||
|
CheckError(GL); |
||||
|
GL.VertexAttribPointer(positionLocation, 3, GL_FLOAT, |
||||
|
0, vertexSize, IntPtr.Zero); |
||||
|
GL.VertexAttribPointer(normalLocation, 3, GL_FLOAT, |
||||
|
0, vertexSize, new IntPtr(12)); |
||||
|
GL.EnableVertexAttribArray(positionLocation); |
||||
|
GL.EnableVertexAttribArray(normalLocation); |
||||
|
CheckError(GL); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void Deinit(GlInterface GL) |
||||
|
{ |
||||
|
// Unbind everything
|
||||
|
GL.BindBuffer(GL_ARRAY_BUFFER, 0); |
||||
|
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
||||
|
GL.BindVertexArray(0); |
||||
|
GL.UseProgram(0); |
||||
|
|
||||
|
// Delete all resources.
|
||||
|
GL.DeleteBuffer(_vertexBufferObject); |
||||
|
GL.DeleteBuffer(_indexBufferObject); |
||||
|
GL.DeleteVertexArray(_vertexArrayObject); |
||||
|
GL.DeleteProgram(_shaderProgram); |
||||
|
GL.DeleteShader(_fragmentShader); |
||||
|
GL.DeleteShader(_vertexShader); |
||||
|
} |
||||
|
|
||||
|
static Stopwatch St = Stopwatch.StartNew(); |
||||
|
|
||||
|
public unsafe void OnOpenGlRender(GlInterface gl, int fb, PixelSize size, |
||||
|
float yaw, float pitch, float roll, float disco) |
||||
|
{ |
||||
|
gl.Viewport(0, 0, size.Width, size.Height); |
||||
|
gl.ClearDepth(1); |
||||
|
gl.Disable(GL_CULL_FACE); |
||||
|
gl.Disable(GL_SCISSOR_TEST); |
||||
|
gl.DepthFunc(GL_LESS); |
||||
|
gl.DepthMask(1); |
||||
|
|
||||
|
gl.ClearColor(0, 0, 0, 0); |
||||
|
gl.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
||||
|
gl.Enable(GL_DEPTH_TEST); |
||||
|
|
||||
|
|
||||
|
var GL = gl; |
||||
|
|
||||
|
GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); |
||||
|
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject); |
||||
|
GL.BindVertexArray(_vertexArrayObject); |
||||
|
GL.UseProgram(_shaderProgram); |
||||
|
CheckError(GL); |
||||
|
var projection = |
||||
|
Matrix4x4.CreatePerspectiveFieldOfView((float)(Math.PI / 4), (float)(size.Width / size.Height), |
||||
|
0.01f, 1000); |
||||
|
|
||||
|
|
||||
|
var view = Matrix4x4.CreateLookAt(new Vector3(25, 25, 25), new Vector3(), new Vector3(0, 1, 0)); |
||||
|
var model = Matrix4x4.CreateFromYawPitchRoll(yaw, pitch, roll); |
||||
|
var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel"); |
||||
|
var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView"); |
||||
|
var projectionLoc = GL.GetUniformLocationString(_shaderProgram, "uProjection"); |
||||
|
var maxYLoc = GL.GetUniformLocationString(_shaderProgram, "uMaxY"); |
||||
|
var minYLoc = GL.GetUniformLocationString(_shaderProgram, "uMinY"); |
||||
|
var timeLoc = GL.GetUniformLocationString(_shaderProgram, "uTime"); |
||||
|
var discoLoc = GL.GetUniformLocationString(_shaderProgram, "uDisco"); |
||||
|
GL.UniformMatrix4fv(modelLoc, 1, false, &model); |
||||
|
GL.UniformMatrix4fv(viewLoc, 1, false, &view); |
||||
|
GL.UniformMatrix4fv(projectionLoc, 1, false, &projection); |
||||
|
GL.Uniform1f(maxYLoc, _maxY); |
||||
|
GL.Uniform1f(minYLoc, _minY); |
||||
|
GL.Uniform1f(timeLoc, (float)St.Elapsed.TotalSeconds); |
||||
|
GL.Uniform1f(discoLoc, disco); |
||||
|
CheckError(GL); |
||||
|
GL.DrawElements(GL_TRIANGLES, _indices.Length, GL_UNSIGNED_SHORT, IntPtr.Zero); |
||||
|
|
||||
|
CheckError(GL); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,118 @@ |
|||||
|
using System; |
||||
|
using Avalonia; |
||||
|
using Avalonia.Logging; |
||||
|
using Avalonia.OpenGL; |
||||
|
using SkiaSharp; |
||||
|
using static Avalonia.OpenGL.GlConsts; |
||||
|
namespace ControlCatalog.Pages.OpenGl; |
||||
|
|
||||
|
internal class OpenGlFbo : IDisposable |
||||
|
{ |
||||
|
private readonly GRContext _grContext; |
||||
|
private int _fbo; |
||||
|
private int _depthBuffer; |
||||
|
private int _texture; |
||||
|
private PixelSize _size; |
||||
|
public PixelSize Size => _size; |
||||
|
public GlInterface Gl => Context.GlInterface; |
||||
|
public IGlContext Context { get; } |
||||
|
|
||||
|
public OpenGlFbo(IGlContext context, GRContext grContext) |
||||
|
{ |
||||
|
_grContext = grContext; |
||||
|
Context = context; |
||||
|
_fbo = Gl.GenFramebuffer(); |
||||
|
} |
||||
|
|
||||
|
public void Resize(PixelSize size) |
||||
|
{ |
||||
|
if(_size == size) |
||||
|
return; |
||||
|
|
||||
|
if (_texture != 0) |
||||
|
Gl.DeleteTexture(_texture); |
||||
|
_texture = 0; |
||||
|
if(_depthBuffer != 0) |
||||
|
Gl.DeleteRenderbuffer(_depthBuffer); |
||||
|
_depthBuffer = 0; |
||||
|
Gl.BindFramebuffer(GL_FRAMEBUFFER, _fbo); |
||||
|
|
||||
|
_texture = Gl.GenTexture(); |
||||
|
|
||||
|
var textureFormat = Context.Version.Type == GlProfileType.OpenGLES && Context.Version.Major == 2 |
||||
|
? GL_RGBA |
||||
|
: GL_RGBA8; |
||||
|
|
||||
|
Gl.BindTexture(GL_TEXTURE_2D, _texture); |
||||
|
Gl.TexImage2D(GL_TEXTURE_2D, 0, textureFormat, size.Width, size.Height, 0, GL_RGBA, |
||||
|
GL_UNSIGNED_BYTE, IntPtr.Zero); |
||||
|
Gl.FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture, 0); |
||||
|
|
||||
|
_depthBuffer = Gl.GenRenderbuffer(); |
||||
|
var depthFormat = Context.Version.Type == GlProfileType.OpenGLES |
||||
|
? GL_DEPTH_COMPONENT16 |
||||
|
: GL_DEPTH_COMPONENT; |
||||
|
Gl.BindRenderbuffer(GL_RENDERBUFFER, _depthBuffer); |
||||
|
Gl.RenderbufferStorage(GL_RENDERBUFFER, depthFormat, size.Width, size.Height); |
||||
|
Gl.FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _depthBuffer); |
||||
|
|
||||
|
var status = Gl.CheckFramebufferStatus(GL_FRAMEBUFFER); |
||||
|
IsValid = (status == GL_FRAMEBUFFER_COMPLETE); |
||||
|
if(!IsValid) |
||||
|
{ |
||||
|
int code = Gl.GetError(); |
||||
|
Console.WriteLine("Unable to configure OpenGL FBO: " + code); |
||||
|
} |
||||
|
|
||||
|
_size = size; |
||||
|
} |
||||
|
|
||||
|
public bool IsValid { get; private set; } |
||||
|
|
||||
|
public int Fbo => _fbo; |
||||
|
|
||||
|
public SKImage? Snapshot() |
||||
|
{ |
||||
|
Gl.Flush(); |
||||
|
_grContext.ResetContext(); |
||||
|
|
||||
|
using var texture = new GRBackendTexture(_size.Width, _size.Height, false, |
||||
|
new GRGlTextureInfo(GlConsts.GL_TEXTURE_2D, (uint)_texture, SKColorType.Rgba8888.ToGlSizedFormat())); |
||||
|
|
||||
|
var surf = SKSurface.Create(_grContext, texture, GRSurfaceOrigin.BottomLeft, SKColorType.Rgba8888); |
||||
|
if (surf == null) |
||||
|
{ |
||||
|
using var unformatted = new GRBackendTexture(_size.Width, _size.Height, false, |
||||
|
new GRGlTextureInfo(GlConsts.GL_TEXTURE_2D, (uint)_texture)); |
||||
|
|
||||
|
surf = SKSurface.Create(_grContext, unformatted, GRSurfaceOrigin.BottomLeft, SKColorType.Rgba8888); |
||||
|
} |
||||
|
|
||||
|
SKImage? rv; |
||||
|
using (surf) |
||||
|
rv = surf?.Snapshot(); |
||||
|
_grContext.Flush(); |
||||
|
return rv; |
||||
|
/* |
||||
|
var target = new GRBackendRenderTarget(_size.Width, _size.Height, 0, 0, |
||||
|
new GRGlFramebufferInfo((uint)_fbo, SKColorType.Rgba8888.ToGlSizedFormat())); |
||||
|
SKImage rv; |
||||
|
using (var surface = SKSurface.Create(_grContext, target, |
||||
|
GRSurfaceOrigin.BottomLeft, SKColorType.Rgba8888, |
||||
|
new SKSurfaceProperties(SKPixelGeometry.RgbHorizontal))) |
||||
|
rv = surface.Snapshot(); |
||||
|
_grContext.Flush(); |
||||
|
return rv;*/ |
||||
|
} |
||||
|
|
||||
|
public void Dispose() |
||||
|
{ |
||||
|
if(_fbo != 0) |
||||
|
Gl.DeleteFramebuffer(_fbo); |
||||
|
_fbo = 0; |
||||
|
if (_depthBuffer != 0) |
||||
|
Gl.DeleteRenderbuffer(_depthBuffer); |
||||
|
if(_texture != 0) |
||||
|
Gl.DeleteTexture(_texture); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
<UserControl xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
x:Class="ControlCatalog.Pages.OpenGlLeasePage" |
||||
|
xmlns:pages="using:ControlCatalog.Pages" |
||||
|
xmlns:openGl="clr-namespace:ControlCatalog.Pages.OpenGl"> |
||||
|
<Grid> |
||||
|
<Control x:Name="Viewport" /> |
||||
|
<openGl:GlPageKnobs x:Name="Knobs" /> |
||||
|
</Grid> |
||||
|
</UserControl> |
||||
@ -0,0 +1,216 @@ |
|||||
|
using System; |
||||
|
using Avalonia; |
||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.LogicalTree; |
||||
|
using Avalonia.Markup.Xaml; |
||||
|
using Avalonia.Media; |
||||
|
using Avalonia.OpenGL; |
||||
|
using Avalonia.Platform; |
||||
|
using Avalonia.Rendering.Composition; |
||||
|
using Avalonia.Skia; |
||||
|
using ControlCatalog.Pages.OpenGl; |
||||
|
using SkiaSharp; |
||||
|
using static Avalonia.OpenGL.GlConsts; |
||||
|
|
||||
|
namespace ControlCatalog.Pages; |
||||
|
|
||||
|
public class OpenGlLeasePage : UserControl |
||||
|
{ |
||||
|
private readonly Control _viewport; |
||||
|
private readonly GlPageKnobs _knobs; |
||||
|
private CompositionCustomVisual? _visual; |
||||
|
|
||||
|
class GlVisual : CompositionCustomVisualHandler |
||||
|
{ |
||||
|
private OpenGlContent _content; |
||||
|
private Parameters _parameters; |
||||
|
private bool _contentInitialized; |
||||
|
private OpenGlFbo? _fbo; |
||||
|
private bool _reRender; |
||||
|
private IGlContext? _gl; |
||||
|
|
||||
|
public GlVisual(OpenGlContent content, Parameters parameters) |
||||
|
{ |
||||
|
_content = content; |
||||
|
_parameters = parameters; |
||||
|
} |
||||
|
|
||||
|
public override void OnRender(ImmediateDrawingContext drawingContext) |
||||
|
{ |
||||
|
if (_parameters.Disco > 0.01f) |
||||
|
RegisterForNextAnimationFrameUpdate(); |
||||
|
var bounds = GetRenderBounds(); |
||||
|
var size = PixelSize.FromSize(bounds.Size, 1); |
||||
|
if (size.Width < 1 || size.Height < 1) |
||||
|
return; |
||||
|
|
||||
|
if(drawingContext.TryGetFeature<ISkiaSharpApiLeaseFeature>(out var skiaFeature)) |
||||
|
{ |
||||
|
using var skiaLease = skiaFeature.Lease(); |
||||
|
var grContext = skiaLease.GrContext; |
||||
|
if (grContext == null) |
||||
|
return; |
||||
|
SKImage? snapshot; |
||||
|
using (var platformApiLease = skiaLease.TryLeasePlatformGraphicsApi()) |
||||
|
{ |
||||
|
if (platformApiLease?.Context is not IGlContext glContext) |
||||
|
return; |
||||
|
|
||||
|
var gl = glContext.GlInterface; |
||||
|
if (_gl != glContext) |
||||
|
{ |
||||
|
// The old context is lost
|
||||
|
_fbo = null; |
||||
|
_contentInitialized = false; |
||||
|
_gl = glContext; |
||||
|
} |
||||
|
|
||||
|
gl.GetIntegerv(GL_FRAMEBUFFER_BINDING, out var oldFb); |
||||
|
|
||||
|
_fbo ??= new OpenGlFbo(glContext, grContext); |
||||
|
if (_fbo.Size != size) |
||||
|
_fbo.Resize(size); |
||||
|
|
||||
|
gl.BindFramebuffer(GL_FRAMEBUFFER, _fbo.Fbo); |
||||
|
|
||||
|
|
||||
|
if (!_contentInitialized) |
||||
|
{ |
||||
|
_content.Init(gl, glContext.Version); |
||||
|
_contentInitialized = true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
_content.OnOpenGlRender(gl, _fbo.Fbo, size, _parameters.Yaw, _parameters.Pitch, |
||||
|
_parameters.Roll, _parameters.Disco); |
||||
|
|
||||
|
snapshot = _fbo.Snapshot(); |
||||
|
gl.BindFramebuffer(GL_FRAMEBUFFER, oldFb); |
||||
|
} |
||||
|
|
||||
|
using(snapshot) |
||||
|
if (snapshot != null) |
||||
|
skiaLease.SkCanvas.DrawImage(snapshot, new SKRect(0, 0, |
||||
|
(float)bounds.Width, (float)bounds.Height)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public override void OnAnimationFrameUpdate() |
||||
|
{ |
||||
|
if (_reRender || _parameters.Disco > 0.01f) |
||||
|
{ |
||||
|
_reRender = false; |
||||
|
Invalidate(); |
||||
|
} |
||||
|
|
||||
|
base.OnAnimationFrameUpdate(); |
||||
|
} |
||||
|
|
||||
|
public override void OnMessage(object message) |
||||
|
{ |
||||
|
if (message is Parameters p) |
||||
|
{ |
||||
|
_parameters = p; |
||||
|
_reRender = true; |
||||
|
RegisterForNextAnimationFrameUpdate(); |
||||
|
} |
||||
|
else if (message is DisposeMessage) |
||||
|
{ |
||||
|
if (_gl != null) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
if (_fbo != null || _contentInitialized) |
||||
|
{ |
||||
|
using (_gl.MakeCurrent()) |
||||
|
{ |
||||
|
if (_contentInitialized) |
||||
|
_content.Deinit(_gl.GlInterface); |
||||
|
_contentInitialized = false; |
||||
|
_fbo?.Dispose(); |
||||
|
_fbo = null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
Console.WriteLine(e.ToString()); |
||||
|
} |
||||
|
|
||||
|
_gl = null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
base.OnMessage(message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class Parameters |
||||
|
{ |
||||
|
public float Yaw; |
||||
|
public float Pitch; |
||||
|
public float Roll; |
||||
|
public float Disco; |
||||
|
} |
||||
|
|
||||
|
public class DisposeMessage |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public OpenGlLeasePage() |
||||
|
{ |
||||
|
AvaloniaXamlLoader.Load(this); |
||||
|
_viewport = this.FindControl<Control>("Viewport")!; |
||||
|
_viewport.AttachedToVisualTree += ViewportAttachedToVisualTree; |
||||
|
_viewport.DetachedFromVisualTree += ViewportDetachedFromVisualTree; |
||||
|
_knobs = this.FindControl<GlPageKnobs>("Knobs")!; |
||||
|
_knobs.PropertyChanged += KnobsPropertyChanged; |
||||
|
} |
||||
|
|
||||
|
private void KnobsPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs change) |
||||
|
{ |
||||
|
if (change.Property == GlPageKnobs.YawProperty |
||||
|
|| change.Property == GlPageKnobs.RollProperty |
||||
|
|| change.Property == GlPageKnobs.PitchProperty |
||||
|
|| change.Property == GlPageKnobs.DiscoProperty) |
||||
|
_visual?.SendHandlerMessage(GetParameters()); |
||||
|
} |
||||
|
|
||||
|
Parameters GetParameters() => new() |
||||
|
{ |
||||
|
Yaw = _knobs!.Yaw, Pitch = _knobs.Pitch, Roll = _knobs.Roll, Disco = _knobs.Disco |
||||
|
}; |
||||
|
|
||||
|
private void ViewportAttachedToVisualTree(object? sender, VisualTreeAttachmentEventArgs e) |
||||
|
{ |
||||
|
var visual = ElementComposition.GetElementVisual(_viewport!); |
||||
|
if(visual == null) |
||||
|
return; |
||||
|
_visual = visual.Compositor.CreateCustomVisual(new GlVisual(new OpenGlContent(), GetParameters())); |
||||
|
ElementComposition.SetElementChildVisual(_viewport, _visual); |
||||
|
UpdateSize(Bounds.Size); |
||||
|
} |
||||
|
|
||||
|
private void UpdateSize(Size size) |
||||
|
{ |
||||
|
if (_visual != null) |
||||
|
_visual.Size = new Vector(size.Width, size.Height); |
||||
|
} |
||||
|
|
||||
|
protected override Size ArrangeOverride(Size finalSize) |
||||
|
{ |
||||
|
var size = base.ArrangeOverride(finalSize); |
||||
|
UpdateSize(size); |
||||
|
return size; |
||||
|
} |
||||
|
|
||||
|
private void ViewportDetachedFromVisualTree(object? sender, VisualTreeAttachmentEventArgs e) |
||||
|
{ |
||||
|
_visual?.SendHandlerMessage(new DisposeMessage()); |
||||
|
_visual = null; |
||||
|
ElementComposition.SetElementChildVisual(_viewport, null); |
||||
|
base.OnDetachedFromVisualTree(e); |
||||
|
} |
||||
|
} |
||||
@ -1,29 +1,13 @@ |
|||||
<UserControl xmlns="https://github.com/avaloniaui" |
<UserControl xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
x:Class="ControlCatalog.Pages.OpenGlPage" |
x:Class="ControlCatalog.Pages.OpenGlPage" |
||||
xmlns:pages="using:ControlCatalog.Pages"> |
xmlns:pages="using:ControlCatalog.Pages" |
||||
<Grid> |
xmlns:openGl="clr-namespace:ControlCatalog.Pages.OpenGl"> |
||||
|
<Grid x:Name="MainGrid"> |
||||
<pages:OpenGlPageControl x:Name="GL"/> |
<pages:OpenGlPageControl x:Name="GL"/> |
||||
<StackPanel> |
<openGl:GlPageKnobs x:Name="Knobs" /> |
||||
<TextBlock Text="{Binding #GL.Info}"/> |
<Button x:Name="Snapshot" |
||||
</StackPanel> |
IsVisible="False" |
||||
<Grid ColumnDefinitions="*,Auto" Margin="20"> |
VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="SnapshotClick">Snapshot</Button> |
||||
<StackPanel Grid.Column="1" MinWidth="300"> |
|
||||
<TextBlock>Yaw</TextBlock> |
|
||||
<Slider Value="{Binding Yaw, Mode=TwoWay, ElementName=GL}" Maximum="10"/> |
|
||||
<TextBlock>Pitch</TextBlock> |
|
||||
<Slider Value="{Binding Pitch, Mode=TwoWay, ElementName=GL}" Maximum="10"/> |
|
||||
<TextBlock>Roll</TextBlock> |
|
||||
<Slider Value="{Binding Roll, Mode=TwoWay, ElementName=GL}" Maximum="10"/> |
|
||||
<StackPanel Orientation="Horizontal"> |
|
||||
<TextBlock FontWeight="Bold" Foreground="#C000C0">D</TextBlock> |
|
||||
<TextBlock FontWeight="Bold" Foreground="#00C090">I</TextBlock> |
|
||||
<TextBlock FontWeight="Bold" Foreground="#90C000">S</TextBlock> |
|
||||
<TextBlock FontWeight="Bold" Foreground="#C09000">C</TextBlock> |
|
||||
<TextBlock FontWeight="Bold" Foreground="#00C090">O</TextBlock> |
|
||||
</StackPanel> |
|
||||
<Slider Value="{Binding Disco, Mode=TwoWay, ElementName=GL}" Maximum="1"/> |
|
||||
</StackPanel> |
|
||||
</Grid> |
|
||||
</Grid> |
</Grid> |
||||
</UserControl> |
</UserControl> |
||||
|
|||||
@ -1,375 +1,84 @@ |
|||||
using System; |
|
||||
using System.Diagnostics; |
|
||||
using System.IO; |
|
||||
using System.Linq; |
|
||||
using System.Numerics; |
|
||||
using System.Runtime.InteropServices; |
using System.Runtime.InteropServices; |
||||
using Avalonia; |
using Avalonia; |
||||
using Avalonia.Controls; |
using Avalonia.Controls; |
||||
|
using Avalonia.Controls.Primitives; |
||||
|
using Avalonia.Interactivity; |
||||
|
using Avalonia.Markup.Xaml; |
||||
using Avalonia.OpenGL; |
using Avalonia.OpenGL; |
||||
using Avalonia.OpenGL.Controls; |
using Avalonia.OpenGL.Controls; |
||||
using Avalonia.Platform.Interop; |
using Avalonia.Rendering.Composition; |
||||
using Avalonia.Threading; |
using ControlCatalog.Pages.OpenGl; |
||||
using static Avalonia.OpenGL.GlConsts; |
|
||||
// ReSharper disable StringLiteralTypo
|
// ReSharper disable StringLiteralTypo
|
||||
|
|
||||
namespace ControlCatalog.Pages |
namespace ControlCatalog.Pages |
||||
{ |
{ |
||||
public class OpenGlPage : UserControl |
public class OpenGlPage : UserControl |
||||
{ |
{ |
||||
|
public OpenGlPage() |
||||
} |
|
||||
|
|
||||
public class OpenGlPageControl : OpenGlControlBase |
|
||||
{ |
|
||||
private float _yaw; |
|
||||
|
|
||||
public static readonly DirectProperty<OpenGlPageControl, float> YawProperty = |
|
||||
AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Yaw", o => o.Yaw, (o, v) => o.Yaw = v); |
|
||||
|
|
||||
public float Yaw |
|
||||
{ |
|
||||
get => _yaw; |
|
||||
set => SetAndRaise(YawProperty, ref _yaw, value); |
|
||||
} |
|
||||
|
|
||||
private float _pitch; |
|
||||
|
|
||||
public static readonly DirectProperty<OpenGlPageControl, float> PitchProperty = |
|
||||
AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Pitch", o => o.Pitch, (o, v) => o.Pitch = v); |
|
||||
|
|
||||
public float Pitch |
|
||||
{ |
|
||||
get => _pitch; |
|
||||
set => SetAndRaise(PitchProperty, ref _pitch, value); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
private float _roll; |
|
||||
|
|
||||
public static readonly DirectProperty<OpenGlPageControl, float> RollProperty = |
|
||||
AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Roll", o => o.Roll, (o, v) => o.Roll = v); |
|
||||
|
|
||||
public float Roll |
|
||||
{ |
|
||||
get => _roll; |
|
||||
set => SetAndRaise(RollProperty, ref _roll, value); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
private float _disco; |
|
||||
|
|
||||
public static readonly DirectProperty<OpenGlPageControl, float> DiscoProperty = |
|
||||
AvaloniaProperty.RegisterDirect<OpenGlPageControl, float>("Disco", o => o.Disco, (o, v) => o.Disco = v); |
|
||||
|
|
||||
public float Disco |
|
||||
{ |
|
||||
get => _disco; |
|
||||
set => SetAndRaise(DiscoProperty, ref _disco, value); |
|
||||
} |
|
||||
|
|
||||
private string _info = string.Empty; |
|
||||
|
|
||||
public static readonly DirectProperty<OpenGlPageControl, string> InfoProperty = |
|
||||
AvaloniaProperty.RegisterDirect<OpenGlPageControl, string>("Info", o => o.Info, (o, v) => o.Info = v); |
|
||||
|
|
||||
public string Info |
|
||||
{ |
|
||||
get => _info; |
|
||||
private set => SetAndRaise(InfoProperty, ref _info, value); |
|
||||
} |
|
||||
|
|
||||
private int _vertexShader; |
|
||||
private int _fragmentShader; |
|
||||
private int _shaderProgram; |
|
||||
private int _vertexBufferObject; |
|
||||
private int _indexBufferObject; |
|
||||
private int _vertexArrayObject; |
|
||||
|
|
||||
private string GetShader(bool fragment, string shader) |
|
||||
{ |
|
||||
var version = (GlVersion.Type == GlProfileType.OpenGL ? |
|
||||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 150 : 120 : |
|
||||
100); |
|
||||
var data = "#version " + version + "\n"; |
|
||||
if (GlVersion.Type == GlProfileType.OpenGLES) |
|
||||
data += "precision mediump float;\n"; |
|
||||
if (version >= 150) |
|
||||
{ |
|
||||
shader = shader.Replace("attribute", "in"); |
|
||||
if (fragment) |
|
||||
shader = shader |
|
||||
.Replace("varying", "in") |
|
||||
.Replace("//DECLAREGLFRAG", "out vec4 outFragColor;") |
|
||||
.Replace("gl_FragColor", "outFragColor"); |
|
||||
else |
|
||||
shader = shader.Replace("varying", "out"); |
|
||||
} |
|
||||
|
|
||||
data += shader; |
|
||||
|
|
||||
return data; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
private string VertexShaderSource => GetShader(false, @"
|
|
||||
attribute vec3 aPos; |
|
||||
attribute vec3 aNormal; |
|
||||
uniform mat4 uModel; |
|
||||
uniform mat4 uProjection; |
|
||||
uniform mat4 uView; |
|
||||
|
|
||||
varying vec3 FragPos; |
|
||||
varying vec3 VecPos; |
|
||||
varying vec3 Normal; |
|
||||
uniform float uTime; |
|
||||
uniform float uDisco; |
|
||||
void main() |
|
||||
{ |
{ |
||||
float discoScale = sin(uTime * 10.0) / 10.0; |
AvaloniaXamlLoader.Load(this); |
||||
float distortionX = 1.0 + uDisco * cos(uTime * 20.0) / 10.0; |
this.FindControl<OpenGlPageControl>("GL") |
||||
|
!.Init(this.FindControl<GlPageKnobs>("Knobs")!); |
||||
|
|
||||
float scale = 1.0 + uDisco * discoScale; |
AttachedToVisualTree += delegate |
||||
|
{ |
||||
vec3 scaledPos = aPos; |
if (TopLevel.GetTopLevel(this) is Window) |
||||
scaledPos.x = scaledPos.x * distortionX; |
this.FindControl<Button>("Snapshot")!.IsVisible = true; |
||||
|
}; |
||||
scaledPos *= scale; |
|
||||
gl_Position = uProjection * uView * uModel * vec4(scaledPos, 1.0); |
|
||||
FragPos = vec3(uModel * vec4(aPos, 1.0)); |
|
||||
VecPos = aPos; |
|
||||
Normal = normalize(vec3(uModel * vec4(aNormal, 1.0))); |
|
||||
} |
|
||||
");
|
|
||||
|
|
||||
private string FragmentShaderSource => GetShader(true, @"
|
|
||||
varying vec3 FragPos; |
|
||||
varying vec3 VecPos; |
|
||||
varying vec3 Normal; |
|
||||
uniform float uMaxY; |
|
||||
uniform float uMinY; |
|
||||
uniform float uTime; |
|
||||
uniform float uDisco; |
|
||||
//DECLAREGLFRAG
|
|
||||
|
|
||||
void main() |
|
||||
{ |
|
||||
float y = (VecPos.y - uMinY) / (uMaxY - uMinY); |
|
||||
float c = cos(atan(VecPos.x, VecPos.z) * 20.0 + uTime * 40.0 + y * 50.0); |
|
||||
float s = sin(-atan(VecPos.z, VecPos.x) * 20.0 - uTime * 20.0 - y * 30.0); |
|
||||
|
|
||||
vec3 discoColor = vec3( |
|
||||
0.5 + abs(0.5 - y) * cos(uTime * 10.0), |
|
||||
0.25 + (smoothstep(0.3, 0.8, y) * (0.5 - c / 4.0)), |
|
||||
0.25 + abs((smoothstep(0.1, 0.4, y) * (0.5 - s / 4.0)))); |
|
||||
|
|
||||
vec3 objectColor = vec3((1.0 - y), 0.40 + y / 4.0, y * 0.75 + 0.25); |
|
||||
objectColor = objectColor * (1.0 - uDisco) + discoColor * uDisco; |
|
||||
|
|
||||
float ambientStrength = 0.3; |
|
||||
vec3 lightColor = vec3(1.0, 1.0, 1.0); |
|
||||
vec3 lightPos = vec3(uMaxY * 2.0, uMaxY * 2.0, uMaxY * 2.0); |
|
||||
vec3 ambient = ambientStrength * lightColor; |
|
||||
|
|
||||
|
|
||||
vec3 norm = normalize(Normal); |
|
||||
vec3 lightDir = normalize(lightPos - FragPos); |
|
||||
|
|
||||
float diff = max(dot(norm, lightDir), 0.0); |
|
||||
vec3 diffuse = diff * lightColor; |
|
||||
|
|
||||
vec3 result = (ambient + diffuse) * objectColor; |
|
||||
gl_FragColor = vec4(result, 1.0); |
|
||||
|
|
||||
} |
|
||||
");
|
|
||||
|
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)] |
|
||||
private struct Vertex |
|
||||
{ |
|
||||
public Vector3 Position; |
|
||||
public Vector3 Normal; |
|
||||
} |
} |
||||
|
|
||||
private readonly Vertex[] _points; |
private async void SnapshotClick(object sender, RoutedEventArgs e) |
||||
private readonly ushort[] _indices; |
|
||||
private readonly float _minY; |
|
||||
private readonly float _maxY; |
|
||||
|
|
||||
|
|
||||
public OpenGlPageControl() |
|
||||
{ |
{ |
||||
var name = typeof(OpenGlPage).Assembly.GetManifestResourceNames().First(x => x.Contains("teapot.bin")); |
var v = ElementComposition.GetElementVisual(this)!; |
||||
using (var sr = new BinaryReader(typeof(OpenGlPage).Assembly.GetManifestResourceStream(name)!)) |
var snap = await v.Compositor.CreateCompositionVisualSnapshot(v, 1.5); |
||||
|
await new Window() |
||||
{ |
{ |
||||
var buf = new byte[sr.ReadInt32()]; |
Content = new ScrollViewer() |
||||
sr.Read(buf, 0, buf.Length); |
|
||||
var points = new float[buf.Length / 4]; |
|
||||
Buffer.BlockCopy(buf, 0, points, 0, buf.Length); |
|
||||
buf = new byte[sr.ReadInt32()]; |
|
||||
sr.Read(buf, 0, buf.Length); |
|
||||
_indices = new ushort[buf.Length / 2]; |
|
||||
Buffer.BlockCopy(buf, 0, _indices, 0, buf.Length); |
|
||||
_points = new Vertex[points.Length / 3]; |
|
||||
for (var primitive = 0; primitive < points.Length / 3; primitive++) |
|
||||
{ |
{ |
||||
var srci = primitive * 3; |
HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, |
||||
_points[primitive] = new Vertex |
VerticalScrollBarVisibility = ScrollBarVisibility.Auto, |
||||
|
Content = new Image() |
||||
{ |
{ |
||||
Position = new Vector3(points[srci], points[srci + 1], points[srci + 2]) |
Source = snap |
||||
}; |
} |
||||
} |
|
||||
|
|
||||
for (int i = 0; i < _indices.Length; i += 3) |
|
||||
{ |
|
||||
Vector3 a = _points[_indices[i]].Position; |
|
||||
Vector3 b = _points[_indices[i + 1]].Position; |
|
||||
Vector3 c = _points[_indices[i + 2]].Position; |
|
||||
var normal = Vector3.Normalize(Vector3.Cross(c - b, a - b)); |
|
||||
|
|
||||
_points[_indices[i]].Normal += normal; |
|
||||
_points[_indices[i + 1]].Normal += normal; |
|
||||
_points[_indices[i + 2]].Normal += normal; |
|
||||
} |
|
||||
|
|
||||
for (int i = 0; i < _points.Length; i++) |
|
||||
{ |
|
||||
_points[i].Normal = Vector3.Normalize(_points[i].Normal); |
|
||||
_maxY = Math.Max(_maxY, _points[i].Position.Y); |
|
||||
_minY = Math.Min(_minY, _points[i].Position.Y); |
|
||||
} |
} |
||||
} |
}.ShowDialog((Window)TopLevel.GetTopLevel(this)); |
||||
|
|
||||
} |
} |
||||
|
} |
||||
|
|
||||
private static void CheckError(GlInterface gl) |
public class OpenGlPageControl : OpenGlControlBase |
||||
{ |
{ |
||||
int err; |
private OpenGlContent _content = new(); |
||||
while ((err = gl.GetError()) != GL_NO_ERROR) |
private GlPageKnobs? _knobs; |
||||
Console.WriteLine(err); |
|
||||
} |
|
||||
|
|
||||
protected override unsafe void OnOpenGlInit(GlInterface GL) |
|
||||
{ |
|
||||
CheckError(GL); |
|
||||
|
|
||||
Info = $"Renderer: {GL.GetString(GL_RENDERER)} Version: {GL.GetString(GL_VERSION)}"; |
|
||||
|
|
||||
// Load the source of the vertex shader and compile it.
|
|
||||
_vertexShader = GL.CreateShader(GL_VERTEX_SHADER); |
|
||||
Console.WriteLine(GL.CompileShaderAndGetError(_vertexShader, VertexShaderSource)); |
|
||||
|
|
||||
// Load the source of the fragment shader and compile it.
|
|
||||
_fragmentShader = GL.CreateShader(GL_FRAGMENT_SHADER); |
|
||||
Console.WriteLine(GL.CompileShaderAndGetError(_fragmentShader, FragmentShaderSource)); |
|
||||
|
|
||||
// Create the shader program, attach the vertex and fragment shaders and link the program.
|
|
||||
_shaderProgram = GL.CreateProgram(); |
|
||||
GL.AttachShader(_shaderProgram, _vertexShader); |
|
||||
GL.AttachShader(_shaderProgram, _fragmentShader); |
|
||||
const int positionLocation = 0; |
|
||||
const int normalLocation = 1; |
|
||||
GL.BindAttribLocationString(_shaderProgram, positionLocation, "aPos"); |
|
||||
GL.BindAttribLocationString(_shaderProgram, normalLocation, "aNormal"); |
|
||||
Console.WriteLine(GL.LinkProgramAndGetError(_shaderProgram)); |
|
||||
CheckError(GL); |
|
||||
|
|
||||
// Create the vertex buffer object (VBO) for the vertex data.
|
|
||||
_vertexBufferObject = GL.GenBuffer(); |
|
||||
// Bind the VBO and copy the vertex data into it.
|
|
||||
GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); |
|
||||
CheckError(GL); |
|
||||
var vertexSize = Marshal.SizeOf<Vertex>(); |
|
||||
fixed (void* pdata = _points) |
|
||||
GL.BufferData(GL_ARRAY_BUFFER, new IntPtr(_points.Length * vertexSize), |
|
||||
new IntPtr(pdata), GL_STATIC_DRAW); |
|
||||
|
|
||||
_indexBufferObject = GL.GenBuffer(); |
|
||||
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject); |
|
||||
CheckError(GL); |
|
||||
fixed (void* pdata = _indices) |
|
||||
GL.BufferData(GL_ELEMENT_ARRAY_BUFFER, new IntPtr(_indices.Length * sizeof(ushort)), new IntPtr(pdata), |
|
||||
GL_STATIC_DRAW); |
|
||||
CheckError(GL); |
|
||||
_vertexArrayObject = GL.GenVertexArray(); |
|
||||
GL.BindVertexArray(_vertexArrayObject); |
|
||||
CheckError(GL); |
|
||||
GL.VertexAttribPointer(positionLocation, 3, GL_FLOAT, |
|
||||
0, vertexSize, IntPtr.Zero); |
|
||||
GL.VertexAttribPointer(normalLocation, 3, GL_FLOAT, |
|
||||
0, vertexSize, new IntPtr(12)); |
|
||||
GL.EnableVertexAttribArray(positionLocation); |
|
||||
GL.EnableVertexAttribArray(normalLocation); |
|
||||
CheckError(GL); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected override void OnOpenGlDeinit(GlInterface GL) |
public void Init(GlPageKnobs knobs) |
||||
{ |
{ |
||||
// Unbind everything
|
_knobs = knobs; |
||||
GL.BindBuffer(GL_ARRAY_BUFFER, 0); |
_knobs.PropertyChanged += KnobsPropertyChanged; |
||||
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
|
||||
GL.BindVertexArray(0); |
|
||||
GL.UseProgram(0); |
|
||||
|
|
||||
// Delete all resources.
|
|
||||
GL.DeleteBuffer(_vertexBufferObject); |
|
||||
GL.DeleteBuffer(_indexBufferObject); |
|
||||
GL.DeleteVertexArray(_vertexArrayObject); |
|
||||
GL.DeleteProgram(_shaderProgram); |
|
||||
GL.DeleteShader(_fragmentShader); |
|
||||
GL.DeleteShader(_vertexShader); |
|
||||
} |
} |
||||
|
|
||||
static Stopwatch St = Stopwatch.StartNew(); |
private void KnobsPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs change) |
||||
protected override unsafe void OnOpenGlRender(GlInterface gl, int fb) |
|
||||
{ |
{ |
||||
gl.ClearColor(0, 0, 0, 0); |
if (change.Property == GlPageKnobs.YawProperty |
||||
gl.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
|| change.Property == GlPageKnobs.RollProperty |
||||
gl.Enable(GL_DEPTH_TEST); |
|| change.Property == GlPageKnobs.PitchProperty |
||||
gl.Viewport(0, 0, (int)Bounds.Width, (int)Bounds.Height); |
|| change.Property == GlPageKnobs.DiscoProperty) |
||||
var GL = gl; |
|
||||
|
|
||||
GL.BindBuffer(GL_ARRAY_BUFFER, _vertexBufferObject); |
|
||||
GL.BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBufferObject); |
|
||||
GL.BindVertexArray(_vertexArrayObject); |
|
||||
GL.UseProgram(_shaderProgram); |
|
||||
CheckError(GL); |
|
||||
var projection = |
|
||||
Matrix4x4.CreatePerspectiveFieldOfView((float)(Math.PI / 4), (float)(Bounds.Width / Bounds.Height), |
|
||||
0.01f, 1000); |
|
||||
|
|
||||
|
|
||||
var view = Matrix4x4.CreateLookAt(new Vector3(25, 25, 25), new Vector3(), new Vector3(0, 1, 0)); |
|
||||
var model = Matrix4x4.CreateFromYawPitchRoll(_yaw, _pitch, _roll); |
|
||||
var modelLoc = GL.GetUniformLocationString(_shaderProgram, "uModel"); |
|
||||
var viewLoc = GL.GetUniformLocationString(_shaderProgram, "uView"); |
|
||||
var projectionLoc = GL.GetUniformLocationString(_shaderProgram, "uProjection"); |
|
||||
var maxYLoc = GL.GetUniformLocationString(_shaderProgram, "uMaxY"); |
|
||||
var minYLoc = GL.GetUniformLocationString(_shaderProgram, "uMinY"); |
|
||||
var timeLoc = GL.GetUniformLocationString(_shaderProgram, "uTime"); |
|
||||
var discoLoc = GL.GetUniformLocationString(_shaderProgram, "uDisco"); |
|
||||
GL.UniformMatrix4fv(modelLoc, 1, false, &model); |
|
||||
GL.UniformMatrix4fv(viewLoc, 1, false, &view); |
|
||||
GL.UniformMatrix4fv(projectionLoc, 1, false, &projection); |
|
||||
GL.Uniform1f(maxYLoc, _maxY); |
|
||||
GL.Uniform1f(minYLoc, _minY); |
|
||||
GL.Uniform1f(timeLoc, (float)St.Elapsed.TotalSeconds); |
|
||||
GL.Uniform1f(discoLoc, _disco); |
|
||||
CheckError(GL); |
|
||||
GL.DrawElements(GL_TRIANGLES, _indices.Length, GL_UNSIGNED_SHORT, IntPtr.Zero); |
|
||||
|
|
||||
CheckError(GL); |
|
||||
if (_disco > 0.01) |
|
||||
RequestNextFrameRendering(); |
RequestNextFrameRendering(); |
||||
} |
} |
||||
|
|
||||
|
protected override unsafe void OnOpenGlInit(GlInterface GL) => _content.Init(GL, GlVersion); |
||||
|
|
||||
|
protected override void OnOpenGlDeinit(GlInterface GL) => _content.Deinit(GL); |
||||
|
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) |
protected override unsafe void OnOpenGlRender(GlInterface gl, int fb) |
||||
{ |
{ |
||||
if (change.Property == YawProperty || change.Property == RollProperty || change.Property == PitchProperty || |
if (_knobs == null) |
||||
change.Property == DiscoProperty) |
return; |
||||
|
_content.OnOpenGlRender(gl, fb, new PixelSize((int)Bounds.Width, (int)Bounds.Height), |
||||
|
_knobs.Yaw, _knobs.Pitch, _knobs.Roll, _knobs.Disco); |
||||
|
if (_knobs.Disco > 0.01) |
||||
RequestNextFrameRendering(); |
RequestNextFrameRendering(); |
||||
base.OnPropertyChanged(change); |
|
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,41 +1,11 @@ |
|||||
<UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ControlCatalog.Pages.ProgressBarPage"> |
<UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ControlCatalog.Pages.ProgressBarPage"> |
||||
<StackPanel Orientation="Vertical" Spacing="4"> |
<StackPanel Orientation="Vertical" Spacing="4"> |
||||
<TextBlock Classes="h2">A progress bar control</TextBlock> |
|
||||
<StackPanel Spacing="5"> |
|
||||
<StackPanel Orientation="Horizontal" Spacing="5"> |
|
||||
<TextBlock VerticalAlignment="Center">Maximum</TextBlock> |
|
||||
<NumericUpDown x:Name="maximum" Value="100" VerticalAlignment="Center"/> |
|
||||
</StackPanel> |
|
||||
<StackPanel Orientation="Horizontal" Spacing="5"> |
|
||||
<TextBlock VerticalAlignment="Center">Minimum</TextBlock> |
|
||||
<NumericUpDown x:Name="minimum" Value="0" VerticalAlignment="Center"/> |
|
||||
</StackPanel> |
|
||||
<StackPanel Orientation="Horizontal" Spacing="5"> |
|
||||
<TextBlock VerticalAlignment="Center">Progress Text Format</TextBlock> |
|
||||
<TextBox x:Name="stringFormat" Text="{}{0:0}%" VerticalAlignment="Center"/> |
|
||||
</StackPanel> |
|
||||
<CheckBox x:Name="showProgress" Margin="10,16,0,0" Content="Show Progress Text" /> |
|
||||
<CheckBox x:Name="isIndeterminate" Margin="10,16,0,0" Content="Toggle Indeterminate" /> |
|
||||
<StackPanel Orientation="Horizontal" Margin="0,16,0,0" HorizontalAlignment="Center" Spacing="16"> |
|
||||
<StackPanel Spacing="16"> |
|
||||
<ProgressBar IsIndeterminate="{Binding #isIndeterminate.IsChecked}" ShowProgressText="{Binding #showProgress.IsChecked}" Value="{Binding #hprogress.Value}" |
|
||||
Minimum="{Binding #minimum.Value}" Maximum="{Binding #maximum.Value}" ProgressTextFormat="{Binding #stringFormat.Text}"/> |
|
||||
</StackPanel> |
|
||||
<ProgressBar IsIndeterminate="{Binding #isIndeterminate.IsChecked}" ShowProgressText="{Binding #showProgress.IsChecked}" Value="{Binding #vprogress.Value}" Orientation="Vertical" |
|
||||
Minimum="{Binding #minimum.Value}" Maximum="{Binding #maximum.Value}" ProgressTextFormat="{Binding #stringFormat.Text}"/> |
|
||||
</StackPanel> |
|
||||
<StackPanel Margin="16"> |
|
||||
<Slider Name="hprogress" Minimum="{Binding #minimum.Value}" Maximum="{Binding #maximum.Value}" Value="40" /> |
|
||||
<Slider Name="vprogress" Minimum="{Binding #minimum.Value}" Maximum="{Binding #maximum.Value}" Value="60" /> |
|
||||
</StackPanel> |
|
||||
|
|
||||
<StackPanel Spacing="10"> |
<StackPanel Spacing="10"> |
||||
<ProgressBar VerticalAlignment="Center" IsIndeterminate="True" |
<ProgressBar VerticalAlignment="Center" IsIndeterminate="True" /> |
||||
Minimum="{Binding #minimum.Value}" Maximum="{Binding #maximum.Value}"/> |
|
||||
<ProgressBar VerticalAlignment="Center" Value="5" Maximum="10" /> |
<ProgressBar VerticalAlignment="Center" Value="5" Maximum="10" /> |
||||
<ProgressBar VerticalAlignment="Center" Value="50" /> |
<ProgressBar VerticalAlignment="Center" Value="50" /> |
||||
<ProgressBar VerticalAlignment="Center" Value="50" Minimum="25" Maximum="75" /> |
<ProgressBar VerticalAlignment="Center" Value="50" Minimum="25" Maximum="75" /> |
||||
</StackPanel> |
</StackPanel> |
||||
</StackPanel> |
</StackPanel> |
||||
</StackPanel> |
|
||||
</UserControl> |
</UserControl> |
||||
|
|||||
@ -1,13 +1,26 @@ |
|||||
<Application xmlns="https://github.com/avaloniaui" |
<Application xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
x:Class="IntegrationTestApp.App"> |
xmlns:self="using:IntegrationTestApp" |
||||
|
x:Class="IntegrationTestApp.App" |
||||
|
x:DataType="self:App" |
||||
|
RequestedThemeVariant="Default"> |
||||
<Application.Styles> |
<Application.Styles> |
||||
<FluentTheme /> |
<FluentTheme /> |
||||
</Application.Styles> |
</Application.Styles> |
||||
<TrayIcon.Icons> |
<TrayIcon.Icons> |
||||
<TrayIcons> |
<TrayIcons> |
||||
<TrayIcon Icon="/Assets/icon.ico"> |
<TrayIcon Icon="/Assets/icon.ico" |
||||
</TrayIcon> |
ToolTipText="IntegrationTestApp TrayIcon" |
||||
</TrayIcons> |
Command="{Binding TrayIconCommand}" |
||||
</TrayIcon.Icons> |
CommandParameter="TrayIconClicked"> |
||||
|
<TrayIcon.Menu> |
||||
|
<NativeMenu> |
||||
|
<NativeMenuItem Header="Raise Menu Clicked" |
||||
|
Command="{Binding TrayIconCommand}" |
||||
|
CommandParameter="TrayIconMenuClicked" /> |
||||
|
</NativeMenu> |
||||
|
</TrayIcon.Menu> |
||||
|
</TrayIcon> |
||||
|
</TrayIcons> |
||||
|
</TrayIcon.Icons> |
||||
</Application> |
</Application> |
||||
|
|||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using System.Windows.Input; |
||||
|
|
||||
|
namespace IntegrationTestApp; |
||||
|
|
||||
|
internal class DelegateCommand : ICommand |
||||
|
{ |
||||
|
private readonly Action _action; |
||||
|
private readonly Func<object?, bool> _canExecute; |
||||
|
public DelegateCommand(Action action, Func<object?, bool>? canExecute = default) |
||||
|
{ |
||||
|
_action = action; |
||||
|
_canExecute = canExecute ?? new(_ => true); |
||||
|
} |
||||
|
|
||||
|
public event EventHandler? CanExecuteChanged { add { } remove { } } |
||||
|
public bool CanExecute(object? parameter) => _canExecute(parameter); |
||||
|
public void Execute(object? parameter) => _action(); |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
using System; |
||||
|
using Avalonia.Platform; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal interface INativeControlFactory |
||||
|
{ |
||||
|
IPlatformHandle CreateControl(IPlatformHandle parent, Func<IPlatformHandle> createDefault); |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
using MonoMac.AppKit; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class MacHelper |
||||
|
{ |
||||
|
private static bool s_isInitialized; |
||||
|
|
||||
|
public static void EnsureInitialized() |
||||
|
{ |
||||
|
if (s_isInitialized) |
||||
|
return; |
||||
|
s_isInitialized = true; |
||||
|
NSApplication.Init(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
using System.Text; |
||||
|
using Avalonia.Platform; |
||||
|
using MonoMac.AppKit; |
||||
|
using MonoMac.WebKit; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class MacOSTextBoxFactory : INativeControlFactory |
||||
|
{ |
||||
|
public IPlatformHandle CreateControl(IPlatformHandle parent, Func<IPlatformHandle> createDefault) |
||||
|
{ |
||||
|
MacHelper.EnsureInitialized(); |
||||
|
|
||||
|
var textView = new NSTextView(); |
||||
|
textView.TextStorage.Append(new("Native text box")); |
||||
|
|
||||
|
return new MacOSViewHandle(textView); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using Avalonia.Controls.Platform; |
||||
|
using MonoMac.AppKit; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class MacOSViewHandle(NSView view) : INativeControlHostDestroyableControlHandle |
||||
|
{ |
||||
|
private NSView? _view = view; |
||||
|
|
||||
|
public IntPtr Handle => _view?.Handle ?? IntPtr.Zero; |
||||
|
public string HandleDescriptor => "NSView"; |
||||
|
|
||||
|
public void Destroy() |
||||
|
{ |
||||
|
_view?.Dispose(); |
||||
|
_view = null; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Platform; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class NativeTextBox : NativeControlHost |
||||
|
{ |
||||
|
public static INativeControlFactory? Factory { get; set; } |
||||
|
|
||||
|
protected override IPlatformHandle CreateNativeControlCore(IPlatformHandle parent) |
||||
|
{ |
||||
|
return Factory?.CreateControl(parent, () => base.CreateNativeControlCore(parent)) |
||||
|
?? base.CreateNativeControlCore(parent); |
||||
|
} |
||||
|
|
||||
|
protected override void DestroyNativeControlCore(IPlatformHandle control) |
||||
|
{ |
||||
|
base.DestroyNativeControlCore(control); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
using System; |
||||
|
using System.Text; |
||||
|
using Avalonia.Platform; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class Win32TextBoxFactory : INativeControlFactory |
||||
|
{ |
||||
|
public IPlatformHandle CreateControl(IPlatformHandle parent, Func<IPlatformHandle> createDefault) |
||||
|
{ |
||||
|
var handle = WinApi.CreateWindowEx(0, "EDIT", |
||||
|
@"Native text box", |
||||
|
(uint)(WinApi.WindowStyles.WS_CHILD | WinApi.WindowStyles.WS_VISIBLE | WinApi.WindowStyles.WS_BORDER), |
||||
|
0, 0, 1, 1, |
||||
|
parent.Handle, |
||||
|
IntPtr.Zero, |
||||
|
WinApi.GetModuleHandle(null), |
||||
|
IntPtr.Zero); |
||||
|
return new Win32WindowControlHandle(handle, "HWND"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using Avalonia.Controls.Platform; |
||||
|
using Avalonia.Platform; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class Win32WindowControlHandle : PlatformHandle, INativeControlHostDestroyableControlHandle |
||||
|
{ |
||||
|
public Win32WindowControlHandle(IntPtr handle, string descriptor) : base(handle, descriptor) { } |
||||
|
public void Destroy() => WinApi.DestroyWindow(Handle); |
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
using System; |
||||
|
using System.Runtime.InteropServices; |
||||
|
|
||||
|
namespace IntegrationTestApp.Embedding; |
||||
|
|
||||
|
internal class WinApi |
||||
|
{ |
||||
|
[Flags] |
||||
|
public enum WindowStyles : uint |
||||
|
{ |
||||
|
WS_BORDER = 0x800000, |
||||
|
WS_CAPTION = 0xc00000, |
||||
|
WS_CHILD = 0x40000000, |
||||
|
WS_CLIPCHILDREN = 0x2000000, |
||||
|
WS_CLIPSIBLINGS = 0x4000000, |
||||
|
WS_DISABLED = 0x8000000, |
||||
|
WS_DLGFRAME = 0x400000, |
||||
|
WS_GROUP = 0x20000, |
||||
|
WS_HSCROLL = 0x100000, |
||||
|
WS_MAXIMIZE = 0x1000000, |
||||
|
WS_MAXIMIZEBOX = 0x10000, |
||||
|
WS_MINIMIZE = 0x20000000, |
||||
|
WS_MINIMIZEBOX = 0x20000, |
||||
|
WS_OVERLAPPED = 0x0, |
||||
|
WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, |
||||
|
WS_POPUP = 0x80000000u, |
||||
|
WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU, |
||||
|
WS_SYSMENU = 0x80000, |
||||
|
WS_TABSTOP = 0x10000, |
||||
|
WS_THICKFRAME = 0x40000, |
||||
|
WS_VISIBLE = 0x10000000, |
||||
|
WS_VSCROLL = 0x200000, |
||||
|
WS_EX_DLGMODALFRAME = 0x00000001, |
||||
|
WS_EX_NOPARENTNOTIFY = 0x00000004, |
||||
|
WS_EX_NOREDIRECTIONBITMAP = 0x00200000, |
||||
|
WS_EX_TOPMOST = 0x00000008, |
||||
|
WS_EX_ACCEPTFILES = 0x00000010, |
||||
|
WS_EX_TRANSPARENT = 0x00000020, |
||||
|
WS_EX_MDICHILD = 0x00000040, |
||||
|
WS_EX_TOOLWINDOW = 0x00000080, |
||||
|
WS_EX_WINDOWEDGE = 0x00000100, |
||||
|
WS_EX_CLIENTEDGE = 0x00000200, |
||||
|
WS_EX_CONTEXTHELP = 0x00000400, |
||||
|
WS_EX_RIGHT = 0x00001000, |
||||
|
WS_EX_LEFT = 0x00000000, |
||||
|
WS_EX_RTLREADING = 0x00002000, |
||||
|
WS_EX_LTRREADING = 0x00000000, |
||||
|
WS_EX_LEFTSCROLLBAR = 0x00004000, |
||||
|
WS_EX_RIGHTSCROLLBAR = 0x00000000, |
||||
|
WS_EX_CONTROLPARENT = 0x00010000, |
||||
|
WS_EX_STATICEDGE = 0x00020000, |
||||
|
WS_EX_APPWINDOW = 0x00040000, |
||||
|
WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE, |
||||
|
WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST, |
||||
|
WS_EX_LAYERED = 0x00080000, |
||||
|
WS_EX_NOINHERITLAYOUT = 0x00100000, |
||||
|
WS_EX_LAYOUTRTL = 0x00400000, |
||||
|
WS_EX_COMPOSITED = 0x02000000, |
||||
|
WS_EX_NOACTIVATE = 0x08000000 |
||||
|
} |
||||
|
|
||||
|
[DllImport("user32.dll", SetLastError = true)] |
||||
|
public static extern bool DestroyWindow(IntPtr hwnd); |
||||
|
|
||||
|
[DllImport("kernel32.dll")] |
||||
|
public static extern IntPtr GetModuleHandle(string? lpModuleName); |
||||
|
|
||||
|
[DllImport("user32.dll", SetLastError = true)] |
||||
|
public static extern IntPtr CreateWindowEx( |
||||
|
int dwExStyle, |
||||
|
string lpClassName, |
||||
|
string lpWindowName, |
||||
|
uint dwStyle, |
||||
|
int x, |
||||
|
int y, |
||||
|
int nWidth, |
||||
|
int nHeight, |
||||
|
IntPtr hWndParent, |
||||
|
IntPtr hMenu, |
||||
|
IntPtr hInstance, |
||||
|
IntPtr lpParam); |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue