diff --git a/build/ApiCompatAttributeExcludeList.txt b/build/ApiCompatAttributeExcludeList.txt
new file mode 100644
index 0000000000..1df5a30ec3
--- /dev/null
+++ b/build/ApiCompatAttributeExcludeList.txt
@@ -0,0 +1,2 @@
+T:Avalonia.Metadata.NotClientImplementableAttribute
+T:Avalonia.Metadata.UnstableAttribute
diff --git a/src/Avalonia.Base/Animation/IAnimation.cs b/src/Avalonia.Base/Animation/IAnimation.cs
index 436a765d27..eda86ed106 100644
--- a/src/Avalonia.Base/Animation/IAnimation.cs
+++ b/src/Avalonia.Base/Animation/IAnimation.cs
@@ -1,12 +1,14 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Avalonia.Metadata;
namespace Avalonia.Animation
{
///
/// Interface for Animation objects
///
+ [NotClientImplementable]
public interface IAnimation
{
///
diff --git a/src/Avalonia.Base/Animation/IAnimationSetter.cs b/src/Avalonia.Base/Animation/IAnimationSetter.cs
index 6a1d3539e2..8c4ba95517 100644
--- a/src/Avalonia.Base/Animation/IAnimationSetter.cs
+++ b/src/Avalonia.Base/Animation/IAnimationSetter.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Animation
{
+ [NotClientImplementable]
public interface IAnimationSetter
{
AvaloniaProperty? Property { get; set; }
diff --git a/src/Avalonia.Base/Animation/IAnimator.cs b/src/Avalonia.Base/Animation/IAnimator.cs
index f64ac9f913..06ba8dc329 100644
--- a/src/Avalonia.Base/Animation/IAnimator.cs
+++ b/src/Avalonia.Base/Animation/IAnimator.cs
@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
+using Avalonia.Metadata;
namespace Avalonia.Animation
{
///
/// Interface for Animator objects
///
+ [NotClientImplementable]
public interface IAnimator : IList
{
///
diff --git a/src/Avalonia.Base/Animation/IClock.cs b/src/Avalonia.Base/Animation/IClock.cs
index ae44102077..7b3b7b3924 100644
--- a/src/Avalonia.Base/Animation/IClock.cs
+++ b/src/Avalonia.Base/Animation/IClock.cs
@@ -1,9 +1,9 @@
using System;
-using System.Collections.Generic;
-using System.Text;
+using Avalonia.Metadata;
namespace Avalonia.Animation
{
+ [NotClientImplementable]
public interface IClock : IObservable
{
PlayState PlayState { get; set; }
diff --git a/src/Avalonia.Base/Animation/IGlobalClock.cs b/src/Avalonia.Base/Animation/IGlobalClock.cs
index b0455e2c80..138dc07539 100644
--- a/src/Avalonia.Base/Animation/IGlobalClock.cs
+++ b/src/Avalonia.Base/Animation/IGlobalClock.cs
@@ -1,9 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using Avalonia.Metadata;
namespace Avalonia.Animation
{
+ [NotClientImplementable]
public interface IGlobalClock : IClock
{
}
diff --git a/src/Avalonia.Base/Animation/ITransition.cs b/src/Avalonia.Base/Animation/ITransition.cs
index 241ca208d1..639b92ce35 100644
--- a/src/Avalonia.Base/Animation/ITransition.cs
+++ b/src/Avalonia.Base/Animation/ITransition.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Animation
{
///
/// Interface for Transition objects.
///
+ [NotClientImplementable]
public interface ITransition
{
///
diff --git a/src/Avalonia.Base/Controls/INameScope.cs b/src/Avalonia.Base/Controls/INameScope.cs
index 1ca7db2f37..a12e88c055 100644
--- a/src/Avalonia.Base/Controls/INameScope.cs
+++ b/src/Avalonia.Base/Controls/INameScope.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Threading.Tasks;
+using Avalonia.Metadata;
using Avalonia.Utilities;
namespace Avalonia.Controls
@@ -7,6 +6,7 @@ namespace Avalonia.Controls
///
/// Defines a name scope.
///
+ [NotClientImplementable]
public interface INameScope
{
///
diff --git a/src/Avalonia.Base/Controls/IPseudoClasses.cs b/src/Avalonia.Base/Controls/IPseudoClasses.cs
index 27290716d0..eda521727f 100644
--- a/src/Avalonia.Base/Controls/IPseudoClasses.cs
+++ b/src/Avalonia.Base/Controls/IPseudoClasses.cs
@@ -1,9 +1,11 @@
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
///
/// Exposes an interface for setting pseudoclasses on a collection.
///
+ [NotClientImplementable]
public interface IPseudoClasses
{
///
diff --git a/src/Avalonia.Base/Controls/IResourceHost.cs b/src/Avalonia.Base/Controls/IResourceHost.cs
index ea34a8b39a..286f0e36ef 100644
--- a/src/Avalonia.Base/Controls/IResourceHost.cs
+++ b/src/Avalonia.Base/Controls/IResourceHost.cs
@@ -1,6 +1,5 @@
using System;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
@@ -10,6 +9,7 @@ namespace Avalonia.Controls
///
/// This interface is implemented by and `Application`.
///
+ [NotClientImplementable]
public interface IResourceHost : IResourceNode
{
///
diff --git a/src/Avalonia.Base/Controls/IResourceNode.cs b/src/Avalonia.Base/Controls/IResourceNode.cs
index 73bfeaf161..d6c900f97f 100644
--- a/src/Avalonia.Base/Controls/IResourceNode.cs
+++ b/src/Avalonia.Base/Controls/IResourceNode.cs
@@ -1,6 +1,5 @@
using System;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
@@ -12,6 +11,7 @@ namespace Avalonia.Controls
/// () and resource providers such as
/// (see ).
///
+ [NotClientImplementable]
public interface IResourceNode
{
///
diff --git a/src/Avalonia.Base/Controls/ISetInheritanceParent.cs b/src/Avalonia.Base/Controls/ISetInheritanceParent.cs
index dbf8c68892..e85e025005 100644
--- a/src/Avalonia.Base/Controls/ISetInheritanceParent.cs
+++ b/src/Avalonia.Base/Controls/ISetInheritanceParent.cs
@@ -1,4 +1,4 @@
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
@@ -10,6 +10,7 @@ namespace Avalonia.Controls
/// Additionally, also sets the inheritance parent; this
/// interface is only needed where the logical and inheritance parents differ.
///
+ [NotClientImplementable]
public interface ISetInheritanceParent
{
///
diff --git a/src/Avalonia.Base/Controls/ISetLogicalParent.cs b/src/Avalonia.Base/Controls/ISetLogicalParent.cs
index 85bda05961..7f1b4b5d87 100644
--- a/src/Avalonia.Base/Controls/ISetLogicalParent.cs
+++ b/src/Avalonia.Base/Controls/ISetLogicalParent.cs
@@ -1,6 +1,5 @@
using Avalonia.LogicalTree;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
@@ -10,6 +9,7 @@ namespace Avalonia.Controls
///
/// You should not usually need to use this interface - it is for advanced scenarios only.
///
+ [NotClientImplementable]
public interface ISetLogicalParent
{
///
diff --git a/src/Avalonia.Base/Data/Core/IPropertyInfo.cs b/src/Avalonia.Base/Data/Core/IPropertyInfo.cs
index 4d80feb4ba..0cb8a937cc 100644
--- a/src/Avalonia.Base/Data/Core/IPropertyInfo.cs
+++ b/src/Avalonia.Base/Data/Core/IPropertyInfo.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Data.Core
{
+ [NotClientImplementable]
public interface IPropertyInfo
{
string Name { get; }
diff --git a/src/Avalonia.Base/Data/IBinding.cs b/src/Avalonia.Base/Data/IBinding.cs
index 9535cf608e..7d44bf09b5 100644
--- a/src/Avalonia.Base/Data/IBinding.cs
+++ b/src/Avalonia.Base/Data/IBinding.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Data
{
///
/// Holds a binding that can be applied to a property on an object.
///
+ [NotClientImplementable]
public interface IBinding
{
///
diff --git a/src/Avalonia.Base/IAvaloniaObject.cs b/src/Avalonia.Base/IAvaloniaObject.cs
index 00f5062f9e..3b0016903b 100644
--- a/src/Avalonia.Base/IAvaloniaObject.cs
+++ b/src/Avalonia.Base/IAvaloniaObject.cs
@@ -1,11 +1,13 @@
using System;
using Avalonia.Data;
+using Avalonia.Metadata;
namespace Avalonia
{
///
/// Interface for getting/setting values on an object.
///
+ [NotClientImplementable]
public interface IAvaloniaObject
{
///
diff --git a/src/Avalonia.Base/IDataContextProvider.cs b/src/Avalonia.Base/IDataContextProvider.cs
index 1172adcaa4..1d381cf4a5 100644
--- a/src/Avalonia.Base/IDataContextProvider.cs
+++ b/src/Avalonia.Base/IDataContextProvider.cs
@@ -1,10 +1,11 @@
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia
{
///
/// Defines an element with a data context that can be used for binding.
///
+ [NotClientImplementable]
public interface IDataContextProvider : IAvaloniaObject
{
///
diff --git a/src/Avalonia.Base/IDirectPropertyAccessor.cs b/src/Avalonia.Base/IDirectPropertyAccessor.cs
index e34483fa7b..476a36f372 100644
--- a/src/Avalonia.Base/IDirectPropertyAccessor.cs
+++ b/src/Avalonia.Base/IDirectPropertyAccessor.cs
@@ -1,4 +1,5 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia
{
diff --git a/src/Avalonia.Base/IDirectPropertyMetadata.cs b/src/Avalonia.Base/IDirectPropertyMetadata.cs
index 4fd4a3a6b7..7d74470a13 100644
--- a/src/Avalonia.Base/IDirectPropertyMetadata.cs
+++ b/src/Avalonia.Base/IDirectPropertyMetadata.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia
{
///
/// Untyped interface to
///
+ [NotClientImplementable]
public interface IDirectPropertyMetadata
{
///
diff --git a/src/Avalonia.Base/IStyledElement.cs b/src/Avalonia.Base/IStyledElement.cs
index a068d4a5bf..4eed54de45 100644
--- a/src/Avalonia.Base/IStyledElement.cs
+++ b/src/Avalonia.Base/IStyledElement.cs
@@ -2,12 +2,12 @@
using System.ComponentModel;
using Avalonia.Controls;
using Avalonia.LogicalTree;
+using Avalonia.Metadata;
using Avalonia.Styling;
-#nullable enable
-
namespace Avalonia
{
+ [NotClientImplementable]
public interface IStyledElement :
IStyleable,
IStyleHost,
diff --git a/src/Avalonia.Base/IStyledPropertyMetadata.cs b/src/Avalonia.Base/IStyledPropertyMetadata.cs
index 6b29b5f977..89990338e0 100644
--- a/src/Avalonia.Base/IStyledPropertyMetadata.cs
+++ b/src/Avalonia.Base/IStyledPropertyMetadata.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia
{
///
/// Untyped interface to
///
+ [NotClientImplementable]
public interface IStyledPropertyMetadata
{
///
diff --git a/src/Avalonia.Base/Input/IAccessKeyHandler.cs b/src/Avalonia.Base/Input/IAccessKeyHandler.cs
index e484d003c7..93a50968e2 100644
--- a/src/Avalonia.Base/Input/IAccessKeyHandler.cs
+++ b/src/Avalonia.Base/Input/IAccessKeyHandler.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input
{
///
/// Defines the interface for classes that handle access keys for a window.
///
+ [Unstable]
public interface IAccessKeyHandler
{
///
diff --git a/src/Avalonia.Base/Input/IFocusManager.cs b/src/Avalonia.Base/Input/IFocusManager.cs
index 2510479a8e..0c85cad2f7 100644
--- a/src/Avalonia.Base/Input/IFocusManager.cs
+++ b/src/Avalonia.Base/Input/IFocusManager.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input
{
///
/// Manages focus for the application.
///
+ [NotClientImplementable]
public interface IFocusManager
{
///
diff --git a/src/Avalonia.Base/Input/IInputDevice.cs b/src/Avalonia.Base/Input/IInputDevice.cs
index ab0fae65df..fe4f584f18 100644
--- a/src/Avalonia.Base/Input/IInputDevice.cs
+++ b/src/Avalonia.Base/Input/IInputDevice.cs
@@ -1,7 +1,9 @@
using Avalonia.Input.Raw;
+using Avalonia.Metadata;
namespace Avalonia.Input
{
+ [NotClientImplementable]
public interface IInputDevice
{
///
diff --git a/src/Avalonia.Base/Input/IInputElement.cs b/src/Avalonia.Base/Input/IInputElement.cs
index d1552a3a2a..78001143d7 100644
--- a/src/Avalonia.Base/Input/IInputElement.cs
+++ b/src/Avalonia.Base/Input/IInputElement.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Avalonia.Interactivity;
+using Avalonia.Metadata;
using Avalonia.VisualTree;
#nullable enable
@@ -10,6 +11,7 @@ namespace Avalonia.Input
///
/// Defines input-related functionality for a control.
///
+ [NotClientImplementable]
public interface IInputElement : IInteractive, IVisual
{
///
diff --git a/src/Avalonia.Base/Input/IInputManager.cs b/src/Avalonia.Base/Input/IInputManager.cs
index 80b71d3e47..658226a519 100644
--- a/src/Avalonia.Base/Input/IInputManager.cs
+++ b/src/Avalonia.Base/Input/IInputManager.cs
@@ -1,5 +1,6 @@
using System;
using Avalonia.Input.Raw;
+using Avalonia.Metadata;
namespace Avalonia.Input
{
@@ -7,6 +8,7 @@ namespace Avalonia.Input
/// Receives input from the windowing subsystem and dispatches it to interested parties
/// for processing.
///
+ [NotClientImplementable]
public interface IInputManager
{
///
diff --git a/src/Avalonia.Base/Input/IInputRoot.cs b/src/Avalonia.Base/Input/IInputRoot.cs
index 98e8699573..7edc69df52 100644
--- a/src/Avalonia.Base/Input/IInputRoot.cs
+++ b/src/Avalonia.Base/Input/IInputRoot.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input
{
///
/// Defines the interface for top-level input elements.
///
+ [NotClientImplementable]
public interface IInputRoot : IInputElement
{
///
diff --git a/src/Avalonia.Base/Input/IKeyboardDevice.cs b/src/Avalonia.Base/Input/IKeyboardDevice.cs
index d0e84e5ad0..c8db8bf16f 100644
--- a/src/Avalonia.Base/Input/IKeyboardDevice.cs
+++ b/src/Avalonia.Base/Input/IKeyboardDevice.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using Avalonia.Metadata;
namespace Avalonia.Input
{
@@ -50,6 +51,7 @@ namespace Avalonia.Input
KeyboardMask = Alt | Control | Shift | Meta
}
+ [NotClientImplementable]
public interface IKeyboardDevice : IInputDevice, INotifyPropertyChanged
{
IInputElement? FocusedElement { get; }
diff --git a/src/Avalonia.Base/Input/IKeyboardNavigationHandler.cs b/src/Avalonia.Base/Input/IKeyboardNavigationHandler.cs
index 88d00b3b50..3bcd6d6206 100644
--- a/src/Avalonia.Base/Input/IKeyboardNavigationHandler.cs
+++ b/src/Avalonia.Base/Input/IKeyboardNavigationHandler.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input
{
///
/// Defines the interface for classes that handle keyboard navigation for a window.
///
+ [Unstable]
public interface IKeyboardNavigationHandler
{
///
diff --git a/src/Avalonia.Base/Input/IMainMenu.cs b/src/Avalonia.Base/Input/IMainMenu.cs
index 67b58c0ffc..213a979c28 100644
--- a/src/Avalonia.Base/Input/IMainMenu.cs
+++ b/src/Avalonia.Base/Input/IMainMenu.cs
@@ -1,5 +1,6 @@
using System;
using Avalonia.Interactivity;
+using Avalonia.Metadata;
using Avalonia.VisualTree;
namespace Avalonia.Input
@@ -7,6 +8,7 @@ namespace Avalonia.Input
///
/// Defines the interface for a window's main menu.
///
+ [NotClientImplementable]
public interface IMainMenu : IVisual
{
///
diff --git a/src/Avalonia.Base/Input/IMouseDevice.cs b/src/Avalonia.Base/Input/IMouseDevice.cs
index 6b7f0e76e5..2d66397d63 100644
--- a/src/Avalonia.Base/Input/IMouseDevice.cs
+++ b/src/Avalonia.Base/Input/IMouseDevice.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Input
{
///
/// Represents a mouse device.
///
+ [NotClientImplementable]
public interface IMouseDevice : IPointerDevice
{
///
diff --git a/src/Avalonia.Base/Input/IPointer.cs b/src/Avalonia.Base/Input/IPointer.cs
index 7af48cef82..66aeacadc9 100644
--- a/src/Avalonia.Base/Input/IPointer.cs
+++ b/src/Avalonia.Base/Input/IPointer.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input
{
+ [NotClientImplementable]
public interface IPointer
{
int Id { get; }
diff --git a/src/Avalonia.Base/Input/IPointerDevice.cs b/src/Avalonia.Base/Input/IPointerDevice.cs
index 0096bb77bf..0993835feb 100644
--- a/src/Avalonia.Base/Input/IPointerDevice.cs
+++ b/src/Avalonia.Base/Input/IPointerDevice.cs
@@ -1,9 +1,11 @@
using System;
using Avalonia.VisualTree;
using Avalonia.Input.Raw;
+using Avalonia.Metadata;
namespace Avalonia.Input
{
+ [NotClientImplementable]
public interface IPointerDevice : IInputDevice
{
///
diff --git a/src/Avalonia.Base/Input/Platform/IClipboard.cs b/src/Avalonia.Base/Input/Platform/IClipboard.cs
index eb880904eb..bf2a5a8602 100644
--- a/src/Avalonia.Base/Input/Platform/IClipboard.cs
+++ b/src/Avalonia.Base/Input/Platform/IClipboard.cs
@@ -1,7 +1,9 @@
using System.Threading.Tasks;
+using Avalonia.Metadata;
namespace Avalonia.Input.Platform
{
+ [NotClientImplementable]
public interface IClipboard
{
Task GetTextAsync();
diff --git a/src/Avalonia.Base/Input/Platform/IPlatformDragSource.cs b/src/Avalonia.Base/Input/Platform/IPlatformDragSource.cs
index 30d8ee5337..8d1b93087e 100644
--- a/src/Avalonia.Base/Input/Platform/IPlatformDragSource.cs
+++ b/src/Avalonia.Base/Input/Platform/IPlatformDragSource.cs
@@ -1,7 +1,9 @@
using System.Threading.Tasks;
+using Avalonia.Metadata;
namespace Avalonia.Input.Platform
{
+ [Unstable]
public interface IPlatformDragSource
{
Task DoDragDrop(PointerEventArgs triggerEvent, IDataObject data, DragDropEffects allowedEffects);
diff --git a/src/Avalonia.Base/Input/Raw/IDragDropDevice.cs b/src/Avalonia.Base/Input/Raw/IDragDropDevice.cs
index f7b7914bd1..3bcc9fadd3 100644
--- a/src/Avalonia.Base/Input/Raw/IDragDropDevice.cs
+++ b/src/Avalonia.Base/Input/Raw/IDragDropDevice.cs
@@ -1,5 +1,8 @@
-namespace Avalonia.Input.Raw
+using Avalonia.Metadata;
+
+namespace Avalonia.Input.Raw
{
+ [NotClientImplementable]
public interface IDragDropDevice : IInputDevice
{
}
diff --git a/src/Avalonia.Base/Input/TextInput/ITextInputMethodImpl.cs b/src/Avalonia.Base/Input/TextInput/ITextInputMethodImpl.cs
index 4404c903b7..be7ad81f81 100644
--- a/src/Avalonia.Base/Input/TextInput/ITextInputMethodImpl.cs
+++ b/src/Avalonia.Base/Input/TextInput/ITextInputMethodImpl.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Input.TextInput
{
+ [Unstable]
public interface ITextInputMethodImpl
{
void SetClient(ITextInputMethodClient? client);
@@ -8,6 +11,7 @@ namespace Avalonia.Input.TextInput
void Reset();
}
+ [NotClientImplementable]
public interface ITextInputMethodRoot : IInputRoot
{
ITextInputMethodImpl? InputMethod { get; }
diff --git a/src/Avalonia.Base/Interactivity/IInteractive.cs b/src/Avalonia.Base/Interactivity/IInteractive.cs
index 6d7dcd64f4..980bf54f1f 100644
--- a/src/Avalonia.Base/Interactivity/IInteractive.cs
+++ b/src/Avalonia.Base/Interactivity/IInteractive.cs
@@ -1,4 +1,5 @@
using System;
+using Avalonia.Metadata;
#nullable enable
@@ -7,6 +8,7 @@ namespace Avalonia.Interactivity
///
/// Interface for objects that raise routed events.
///
+ [NotClientImplementable]
public interface IInteractive
{
///
diff --git a/src/Avalonia.Base/Layout/ILayoutManager.cs b/src/Avalonia.Base/Layout/ILayoutManager.cs
index 614670a53b..143ce13a1b 100644
--- a/src/Avalonia.Base/Layout/ILayoutManager.cs
+++ b/src/Avalonia.Base/Layout/ILayoutManager.cs
@@ -1,12 +1,12 @@
using System;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Layout
{
///
/// Manages measuring and arranging of controls.
///
+ [NotClientImplementable]
public interface ILayoutManager : IDisposable
{
///
diff --git a/src/Avalonia.Base/Layout/ILayoutRoot.cs b/src/Avalonia.Base/Layout/ILayoutRoot.cs
index e2f16b338a..df15fc1a1d 100644
--- a/src/Avalonia.Base/Layout/ILayoutRoot.cs
+++ b/src/Avalonia.Base/Layout/ILayoutRoot.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Layout
{
///
/// Defines the root of a layoutable tree.
///
+ [NotClientImplementable]
public interface ILayoutRoot : ILayoutable
{
///
diff --git a/src/Avalonia.Base/Layout/ILayoutable.cs b/src/Avalonia.Base/Layout/ILayoutable.cs
index 54d3ba6a11..d8b546b04a 100644
--- a/src/Avalonia.Base/Layout/ILayoutable.cs
+++ b/src/Avalonia.Base/Layout/ILayoutable.cs
@@ -1,12 +1,12 @@
+using Avalonia.Metadata;
using Avalonia.VisualTree;
-#nullable enable
-
namespace Avalonia.Layout
{
///
/// Defines layout-related functionality for a control.
///
+ [NotClientImplementable]
public interface ILayoutable : IVisual
{
///
diff --git a/src/Avalonia.Base/LogicalTree/ILogical.cs b/src/Avalonia.Base/LogicalTree/ILogical.cs
index caff3d8150..9cc2edff86 100644
--- a/src/Avalonia.Base/LogicalTree/ILogical.cs
+++ b/src/Avalonia.Base/LogicalTree/ILogical.cs
@@ -1,12 +1,14 @@
using System;
using Avalonia.Collections;
using Avalonia.Controls;
+using Avalonia.Metadata;
namespace Avalonia.LogicalTree
{
///
/// Represents a node in the logical tree.
///
+ [NotClientImplementable]
public interface ILogical
{
///
diff --git a/src/Avalonia.Base/LogicalTree/ILogicalRoot.cs b/src/Avalonia.Base/LogicalTree/ILogicalRoot.cs
index 4a61544a6f..ea0f554e96 100644
--- a/src/Avalonia.Base/LogicalTree/ILogicalRoot.cs
+++ b/src/Avalonia.Base/LogicalTree/ILogicalRoot.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.LogicalTree
+using Avalonia.Metadata;
+
+namespace Avalonia.LogicalTree
{
///
/// Represents a root of a logical tree.
///
+ [NotClientImplementable]
public interface ILogicalRoot : ILogical
{
}
diff --git a/src/Avalonia.Base/Media/IBrush.cs b/src/Avalonia.Base/Media/IBrush.cs
index 830c066182..10700492d1 100644
--- a/src/Avalonia.Base/Media/IBrush.cs
+++ b/src/Avalonia.Base/Media/IBrush.cs
@@ -1,4 +1,5 @@
using System.ComponentModel;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
@@ -6,6 +7,7 @@ namespace Avalonia.Media
/// Describes how an area is painted.
///
[TypeConverter(typeof(BrushConverter))]
+ [NotClientImplementable]
public interface IBrush
{
///
diff --git a/src/Avalonia.Base/Media/IConicGradientBrush.cs b/src/Avalonia.Base/Media/IConicGradientBrush.cs
index 5368dd1851..6a397b86d4 100644
--- a/src/Avalonia.Base/Media/IConicGradientBrush.cs
+++ b/src/Avalonia.Base/Media/IConicGradientBrush.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Paints an area with a conic gradient.
///
+ [NotClientImplementable]
public interface IConicGradientBrush : IGradientBrush
{
///
diff --git a/src/Avalonia.Base/Media/IDashStyle.cs b/src/Avalonia.Base/Media/IDashStyle.cs
index 7835c7a1e9..7208216603 100644
--- a/src/Avalonia.Base/Media/IDashStyle.cs
+++ b/src/Avalonia.Base/Media/IDashStyle.cs
@@ -1,10 +1,12 @@
using System.Collections.Generic;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
///
/// Represents the sequence of dashes and gaps that will be applied by a .
///
+ [NotClientImplementable]
public interface IDashStyle
{
///
diff --git a/src/Avalonia.Base/Media/IExperimentalAcrylicMaterial.cs b/src/Avalonia.Base/Media/IExperimentalAcrylicMaterial.cs
index e71584258a..38048fb255 100644
--- a/src/Avalonia.Base/Media/IExperimentalAcrylicMaterial.cs
+++ b/src/Avalonia.Base/Media/IExperimentalAcrylicMaterial.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Experimental Interface for producing Acrylic-like materials.
///
+ [NotClientImplementable]
public interface IExperimentalAcrylicMaterial
{
///
diff --git a/src/Avalonia.Base/Media/IGradientBrush.cs b/src/Avalonia.Base/Media/IGradientBrush.cs
index 18db0af660..9b78a4af78 100644
--- a/src/Avalonia.Base/Media/IGradientBrush.cs
+++ b/src/Avalonia.Base/Media/IGradientBrush.cs
@@ -1,10 +1,12 @@
using System.Collections.Generic;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
///
/// A brush that draws with a gradient.
///
+ [NotClientImplementable]
public interface IGradientBrush : IBrush
{
///
diff --git a/src/Avalonia.Base/Media/IGradientStop.cs b/src/Avalonia.Base/Media/IGradientStop.cs
index 22eb9df60d..64b952f3bc 100644
--- a/src/Avalonia.Base/Media/IGradientStop.cs
+++ b/src/Avalonia.Base/Media/IGradientStop.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Describes the location and color of a transition point in a gradient.
///
+ [NotClientImplementable]
public interface IGradientStop
{
///
diff --git a/src/Avalonia.Base/Media/IImageBrush.cs b/src/Avalonia.Base/Media/IImageBrush.cs
index aaa481bd28..732f1957d0 100644
--- a/src/Avalonia.Base/Media/IImageBrush.cs
+++ b/src/Avalonia.Base/Media/IImageBrush.cs
@@ -1,10 +1,12 @@
using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
///
/// Paints an area with an .
///
+ [NotClientImplementable]
public interface IImageBrush : ITileBrush
{
///
@@ -12,4 +14,4 @@ namespace Avalonia.Media
///
IBitmap Source { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Media/ILinearGradientBrush.cs b/src/Avalonia.Base/Media/ILinearGradientBrush.cs
index 3e2a5a0e22..4f4a55db36 100644
--- a/src/Avalonia.Base/Media/ILinearGradientBrush.cs
+++ b/src/Avalonia.Base/Media/ILinearGradientBrush.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// A brush that draws with a linear gradient.
///
+ [NotClientImplementable]
public interface ILinearGradientBrush : IGradientBrush
{
///
@@ -15,4 +18,4 @@
///
RelativePoint EndPoint { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Media/IMutableBrush.cs b/src/Avalonia.Base/Media/IMutableBrush.cs
index 415db61d68..fef124ba36 100644
--- a/src/Avalonia.Base/Media/IMutableBrush.cs
+++ b/src/Avalonia.Base/Media/IMutableBrush.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
///
/// Represents a mutable brush which can return an immutable clone of itself.
///
+ [NotClientImplementable]
public interface IMutableBrush : IBrush, IAffectsRender
{
///
diff --git a/src/Avalonia.Base/Media/IMutableExperimentalAcrylicMaterial.cs b/src/Avalonia.Base/Media/IMutableExperimentalAcrylicMaterial.cs
index fcfe4631a6..f954a8c52a 100644
--- a/src/Avalonia.Base/Media/IMutableExperimentalAcrylicMaterial.cs
+++ b/src/Avalonia.Base/Media/IMutableExperimentalAcrylicMaterial.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Represents a mutable brush which can return an immutable clone of itself.
///
+ [NotClientImplementable]
public interface IMutableExperimentalAcrylicMaterial : IExperimentalAcrylicMaterial, IAffectsRender
{
///
diff --git a/src/Avalonia.Base/Media/IMutableTransform.cs b/src/Avalonia.Base/Media/IMutableTransform.cs
index 2033c434c0..22526eed17 100644
--- a/src/Avalonia.Base/Media/IMutableTransform.cs
+++ b/src/Avalonia.Base/Media/IMutableTransform.cs
@@ -1,4 +1,5 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Media
{
diff --git a/src/Avalonia.Base/Media/IPen.cs b/src/Avalonia.Base/Media/IPen.cs
index 1cad9948b4..eca1cb507a 100644
--- a/src/Avalonia.Base/Media/IPen.cs
+++ b/src/Avalonia.Base/Media/IPen.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Describes how a stroke is drawn.
///
+ [NotClientImplementable]
public interface IPen
{
///
diff --git a/src/Avalonia.Base/Media/IRadialGradientBrush.cs b/src/Avalonia.Base/Media/IRadialGradientBrush.cs
index cadf53cc18..0f025e98bc 100644
--- a/src/Avalonia.Base/Media/IRadialGradientBrush.cs
+++ b/src/Avalonia.Base/Media/IRadialGradientBrush.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media
+using Avalonia.Metadata;
+
+namespace Avalonia.Media
{
///
/// Paints an area with a radial gradient.
///
+ [NotClientImplementable]
public interface IRadialGradientBrush : IGradientBrush
{
///
@@ -21,4 +24,4 @@
///
double Radius { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Media/ISolidColorBrush.cs b/src/Avalonia.Base/Media/ISolidColorBrush.cs
index d0ab00599b..29e11210f1 100644
--- a/src/Avalonia.Base/Media/ISolidColorBrush.cs
+++ b/src/Avalonia.Base/Media/ISolidColorBrush.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Media
{
///
/// Fills an area with a solid color.
///
+ [NotClientImplementable]
public interface ISolidColorBrush : IBrush
{
///
@@ -10,4 +13,4 @@ namespace Avalonia.Media
///
Color Color { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Media/ITileBrush.cs b/src/Avalonia.Base/Media/ITileBrush.cs
index 991857eec9..cb5a591003 100644
--- a/src/Avalonia.Base/Media/ITileBrush.cs
+++ b/src/Avalonia.Base/Media/ITileBrush.cs
@@ -1,10 +1,12 @@
using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
namespace Avalonia.Media
-{
+{
///
/// A brush which displays a repeating image.
///
+ [NotClientImplementable]
public interface ITileBrush : IBrush
{
///
diff --git a/src/Avalonia.Base/Media/IVisualBrush.cs b/src/Avalonia.Base/Media/IVisualBrush.cs
index e74892b218..b8900bbd73 100644
--- a/src/Avalonia.Base/Media/IVisualBrush.cs
+++ b/src/Avalonia.Base/Media/IVisualBrush.cs
@@ -1,10 +1,12 @@
-using Avalonia.VisualTree;
+using Avalonia.Metadata;
+using Avalonia.VisualTree;
namespace Avalonia.Media
{
///
/// Paints an area with an .
///
+ [NotClientImplementable]
public interface IVisualBrush : ITileBrush
{
///
@@ -12,4 +14,4 @@ namespace Avalonia.Media
///
IVisual Visual { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Media/Imaging/IBitmap.cs b/src/Avalonia.Base/Media/Imaging/IBitmap.cs
index 134bebc002..bd04d5ce86 100644
--- a/src/Avalonia.Base/Media/Imaging/IBitmap.cs
+++ b/src/Avalonia.Base/Media/Imaging/IBitmap.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Utilities;
@@ -8,6 +9,7 @@ namespace Avalonia.Media.Imaging
///
/// Represents a bitmap image.
///
+ [NotClientImplementable]
public interface IBitmap : IImage, IDisposable
{
///
diff --git a/src/Avalonia.Base/Media/TextFormatting/ITextSource.cs b/src/Avalonia.Base/Media/TextFormatting/ITextSource.cs
index 32012ab8e9..85641977e6 100644
--- a/src/Avalonia.Base/Media/TextFormatting/ITextSource.cs
+++ b/src/Avalonia.Base/Media/TextFormatting/ITextSource.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Media.TextFormatting
+using Avalonia.Metadata;
+
+namespace Avalonia.Media.TextFormatting
{
///
/// Produces objects that are used by the .
///
+ [NotClientImplementable]
public interface ITextSource
{
///
diff --git a/src/Avalonia.Base/Metadata/NotClientImplementableAttribute.cs b/src/Avalonia.Base/Metadata/NotClientImplementableAttribute.cs
new file mode 100644
index 0000000000..348c983c03
--- /dev/null
+++ b/src/Avalonia.Base/Metadata/NotClientImplementableAttribute.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace Avalonia.Metadata
+{
+ ///
+ /// This interface is not intended to be implemented outside of the core Avalonia framework as
+ /// its API may change without warning.
+ ///
+ ///
+ /// This interface is stable for consumption by a client, but should not be implemented as members
+ /// may be added to its API.
+ ///
+ [AttributeUsage(AttributeTargets.Interface)]
+ public class NotClientImplementableAttribute : Attribute
+ {
+ }
+}
diff --git a/src/Avalonia.Base/Metadata/UnstableAttribute.cs b/src/Avalonia.Base/Metadata/UnstableAttribute.cs
new file mode 100644
index 0000000000..3b6fa5168a
--- /dev/null
+++ b/src/Avalonia.Base/Metadata/UnstableAttribute.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Avalonia.Metadata
+{
+ ///
+ /// This API is unstable and is not covered by API compatibility guarantees between minor and
+ /// patch releases.
+ ///
+ public class UnstableAttribute : Attribute
+ {
+ }
+}
diff --git a/src/Avalonia.Base/Platform/IAssetLoader.cs b/src/Avalonia.Base/Platform/IAssetLoader.cs
index e3899784ad..b65d61803f 100644
--- a/src/Avalonia.Base/Platform/IAssetLoader.cs
+++ b/src/Avalonia.Base/Platform/IAssetLoader.cs
@@ -2,12 +2,14 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Loads assets compiled into the application binary.
///
+ [Unstable]
public interface IAssetLoader
{
///
diff --git a/src/Avalonia.Base/Platform/IBitmapImpl.cs b/src/Avalonia.Base/Platform/IBitmapImpl.cs
index 1e68bc477d..8f11f68e7c 100644
--- a/src/Avalonia.Base/Platform/IBitmapImpl.cs
+++ b/src/Avalonia.Base/Platform/IBitmapImpl.cs
@@ -1,11 +1,13 @@
using System;
using System.IO;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines the platform-specific interface for a .
///
+ [Unstable]
public interface IBitmapImpl : IDisposable
{
///
diff --git a/src/Avalonia.Base/Platform/ICursorImpl.cs b/src/Avalonia.Base/Platform/ICursorImpl.cs
index 14235869f7..74e0ba2e5c 100644
--- a/src/Avalonia.Base/Platform/ICursorImpl.cs
+++ b/src/Avalonia.Base/Platform/ICursorImpl.cs
@@ -1,5 +1,6 @@
using System;
using Avalonia.Input;
+using Avalonia.Metadata;
#nullable enable
@@ -8,6 +9,7 @@ namespace Avalonia.Platform
///
/// Represents a platform implementation of a .
///
+ [Unstable]
public interface ICursorImpl : IDisposable
{
}
diff --git a/src/Avalonia.Base/Platform/IDrawingContextImpl.cs b/src/Avalonia.Base/Platform/IDrawingContextImpl.cs
index 4e6612e908..d84a509234 100644
--- a/src/Avalonia.Base/Platform/IDrawingContextImpl.cs
+++ b/src/Avalonia.Base/Platform/IDrawingContextImpl.cs
@@ -3,12 +3,14 @@ using Avalonia.Media;
using Avalonia.Rendering.SceneGraph;
using Avalonia.Utilities;
using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines the interface through which drawing occurs.
///
+ [Unstable]
public interface IDrawingContextImpl : IDisposable
{
///
diff --git a/src/Avalonia.Base/Platform/IFontManagerImpl.cs b/src/Avalonia.Base/Platform/IFontManagerImpl.cs
index 0110287afd..932249bd52 100644
--- a/src/Avalonia.Base/Platform/IFontManagerImpl.cs
+++ b/src/Avalonia.Base/Platform/IFontManagerImpl.cs
@@ -1,9 +1,11 @@
using System.Collections.Generic;
using System.Globalization;
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IFontManagerImpl
{
///
diff --git a/src/Avalonia.Base/Platform/IGeometryImpl.cs b/src/Avalonia.Base/Platform/IGeometryImpl.cs
index ed6de1b5c7..c80f8923ef 100644
--- a/src/Avalonia.Base/Platform/IGeometryImpl.cs
+++ b/src/Avalonia.Base/Platform/IGeometryImpl.cs
@@ -1,10 +1,12 @@
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines the platform-specific interface for a .
///
+ [Unstable]
public interface IGeometryImpl
{
///
diff --git a/src/Avalonia.Base/Platform/IGlyphRunImpl.cs b/src/Avalonia.Base/Platform/IGlyphRunImpl.cs
index 08786d9689..7801bdd50f 100644
--- a/src/Avalonia.Base/Platform/IGlyphRunImpl.cs
+++ b/src/Avalonia.Base/Platform/IGlyphRunImpl.cs
@@ -1,9 +1,11 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Actual implementation of a glyph run that stores platform dependent resources.
///
+ [Unstable]
public interface IGlyphRunImpl : IDisposable { }
}
diff --git a/src/Avalonia.Base/Platform/IGlyphTypefaceImpl.cs b/src/Avalonia.Base/Platform/IGlyphTypefaceImpl.cs
index 6afd79d29c..415f34fb29 100644
--- a/src/Avalonia.Base/Platform/IGlyphTypefaceImpl.cs
+++ b/src/Avalonia.Base/Platform/IGlyphTypefaceImpl.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IGlyphTypefaceImpl : IDisposable
{
///
diff --git a/src/Avalonia.Base/Platform/IMacOSTopLevelPlatformHandle.cs b/src/Avalonia.Base/Platform/IMacOSTopLevelPlatformHandle.cs
index e399976bbe..b087724079 100644
--- a/src/Avalonia.Base/Platform/IMacOSTopLevelPlatformHandle.cs
+++ b/src/Avalonia.Base/Platform/IMacOSTopLevelPlatformHandle.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IMacOSTopLevelPlatformHandle
{
IntPtr NSView { get; }
diff --git a/src/Avalonia.Base/Platform/IPlatformRenderInterface.cs b/src/Avalonia.Base/Platform/IPlatformRenderInterface.cs
index c46efd46c3..0eeefddf0b 100644
--- a/src/Avalonia.Base/Platform/IPlatformRenderInterface.cs
+++ b/src/Avalonia.Base/Platform/IPlatformRenderInterface.cs
@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.IO;
using Avalonia.Media;
using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines the main platform-specific interface for the rendering subsystem.
///
+ [Unstable]
public interface IPlatformRenderInterface
{
///
diff --git a/src/Avalonia.Base/Platform/IPlatformSettings.cs b/src/Avalonia.Base/Platform/IPlatformSettings.cs
index e4b28e6575..78d1817312 100644
--- a/src/Avalonia.Base/Platform/IPlatformSettings.cs
+++ b/src/Avalonia.Base/Platform/IPlatformSettings.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IPlatformSettings
{
Size DoubleClickSize { get; }
diff --git a/src/Avalonia.Base/Platform/IPlatformThreadingInterface.cs b/src/Avalonia.Base/Platform/IPlatformThreadingInterface.cs
index 2137f965cc..bf18a7da5b 100644
--- a/src/Avalonia.Base/Platform/IPlatformThreadingInterface.cs
+++ b/src/Avalonia.Base/Platform/IPlatformThreadingInterface.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading;
+using Avalonia.Metadata;
using Avalonia.Threading;
namespace Avalonia.Platform
@@ -7,6 +8,7 @@ namespace Avalonia.Platform
///
/// Provides platform-specific services relating to threading.
///
+ [Unstable]
public interface IPlatformThreadingInterface
{
void RunLoop(CancellationToken cancellationToken);
diff --git a/src/Avalonia.Base/Platform/IRenderTargetBitmapImpl.cs b/src/Avalonia.Base/Platform/IRenderTargetBitmapImpl.cs
index 9add07afe3..d33c503650 100644
--- a/src/Avalonia.Base/Platform/IRenderTargetBitmapImpl.cs
+++ b/src/Avalonia.Base/Platform/IRenderTargetBitmapImpl.cs
@@ -1,3 +1,4 @@
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
@@ -5,6 +6,7 @@ namespace Avalonia.Platform
/// Defines the platform-specific interface for a
/// .
///
+ [Unstable]
public interface IRenderTargetBitmapImpl : IBitmapImpl, IRenderTarget
{
}
diff --git a/src/Avalonia.Base/Platform/IRuntimePlatform.cs b/src/Avalonia.Base/Platform/IRuntimePlatform.cs
index 850757a1ee..8ab04f5995 100644
--- a/src/Avalonia.Base/Platform/IRuntimePlatform.cs
+++ b/src/Avalonia.Base/Platform/IRuntimePlatform.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IRuntimePlatform
{
IDisposable StartSystemTimer(TimeSpan interval, Action tick);
@@ -9,6 +11,7 @@ namespace Avalonia.Platform
IUnmanagedBlob AllocBlob(int size);
}
+ [Unstable]
public interface IUnmanagedBlob : IDisposable
{
IntPtr Address { get; }
@@ -17,6 +20,7 @@ namespace Avalonia.Platform
}
+ [Unstable]
public struct RuntimePlatformInfo
{
public OperatingSystemType OperatingSystem { get; set; }
@@ -29,6 +33,7 @@ namespace Avalonia.Platform
public bool IsUnix { get; set; }
}
+ [Unstable]
public enum OperatingSystemType
{
Unknown,
diff --git a/src/Avalonia.Base/Platform/IStreamGeometryContextImpl.cs b/src/Avalonia.Base/Platform/IStreamGeometryContextImpl.cs
index 4587979308..3d5ee36608 100644
--- a/src/Avalonia.Base/Platform/IStreamGeometryContextImpl.cs
+++ b/src/Avalonia.Base/Platform/IStreamGeometryContextImpl.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Platform
{
///
/// Describes a geometry using drawing commands.
///
+ [Unstable]
public interface IStreamGeometryContextImpl : IGeometryContext
{
}
diff --git a/src/Avalonia.Base/Platform/IStreamGeometryImpl.cs b/src/Avalonia.Base/Platform/IStreamGeometryImpl.cs
index 5b070fde02..bd4411f3a4 100644
--- a/src/Avalonia.Base/Platform/IStreamGeometryImpl.cs
+++ b/src/Avalonia.Base/Platform/IStreamGeometryImpl.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Platform
{
///
/// Defines the platform-specific interface for a .
///
+ [Unstable]
public interface IStreamGeometryImpl : IGeometryImpl
{
///
diff --git a/src/Avalonia.Base/Platform/ITextShaperImpl.cs b/src/Avalonia.Base/Platform/ITextShaperImpl.cs
index 11be9e3f09..10e58b7d0b 100644
--- a/src/Avalonia.Base/Platform/ITextShaperImpl.cs
+++ b/src/Avalonia.Base/Platform/ITextShaperImpl.cs
@@ -1,4 +1,5 @@
using Avalonia.Media.TextFormatting;
+using Avalonia.Metadata;
using Avalonia.Utilities;
namespace Avalonia.Platform
@@ -6,6 +7,7 @@ namespace Avalonia.Platform
///
/// An abstraction that is used produce shaped text.
///
+ [Unstable]
public interface ITextShaperImpl
{
///
diff --git a/src/Avalonia.Base/Platform/ITransformedGeometryImpl.cs b/src/Avalonia.Base/Platform/ITransformedGeometryImpl.cs
index 1ed025b571..2754414cd1 100644
--- a/src/Avalonia.Base/Platform/ITransformedGeometryImpl.cs
+++ b/src/Avalonia.Base/Platform/ITransformedGeometryImpl.cs
@@ -1,4 +1,6 @@
-namespace Avalonia.Platform
+using Avalonia.Metadata;
+
+namespace Avalonia.Platform
{
///
/// Represents a geometry with a transform applied.
@@ -7,6 +9,7 @@
/// An transforms a geometry without transforming its
/// stroke thickness.
///
+ [Unstable]
public interface ITransformedGeometryImpl : IGeometryImpl
{
///
diff --git a/src/Avalonia.Base/Platform/IWriteableBitmapImpl.cs b/src/Avalonia.Base/Platform/IWriteableBitmapImpl.cs
index c4e2e4915f..fa1e1862b7 100644
--- a/src/Avalonia.Base/Platform/IWriteableBitmapImpl.cs
+++ b/src/Avalonia.Base/Platform/IWriteableBitmapImpl.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Platform
+using Avalonia.Metadata;
+
+namespace Avalonia.Platform
{
///
/// Defines the platform-specific interface for a .
///
+ [Unstable]
public interface IWriteableBitmapImpl : IBitmapImpl
{
ILockedFramebuffer Lock();
diff --git a/src/Avalonia.Base/Platform/Interop/IDynamicLibraryLoader.cs b/src/Avalonia.Base/Platform/Interop/IDynamicLibraryLoader.cs
index 8124ce6bc4..9389ebc703 100644
--- a/src/Avalonia.Base/Platform/Interop/IDynamicLibraryLoader.cs
+++ b/src/Avalonia.Base/Platform/Interop/IDynamicLibraryLoader.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform.Interop
{
+ [Unstable]
public interface IDynamicLibraryLoader
{
IntPtr LoadLibrary(string dll);
diff --git a/src/Avalonia.Base/Rendering/IDeferredRendererLock.cs b/src/Avalonia.Base/Rendering/IDeferredRendererLock.cs
index eab3dca58e..1c6bd69158 100644
--- a/src/Avalonia.Base/Rendering/IDeferredRendererLock.cs
+++ b/src/Avalonia.Base/Rendering/IDeferredRendererLock.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Rendering
{
+ [Unstable]
public interface IDeferredRendererLock
{
IDisposable? TryLock();
diff --git a/src/Avalonia.Base/Rendering/IRenderLoop.cs b/src/Avalonia.Base/Rendering/IRenderLoop.cs
index dd7442e7f8..9838967261 100644
--- a/src/Avalonia.Base/Rendering/IRenderLoop.cs
+++ b/src/Avalonia.Base/Rendering/IRenderLoop.cs
@@ -1,4 +1,6 @@
-namespace Avalonia.Rendering
+using Avalonia.Metadata;
+
+namespace Avalonia.Rendering
{
///
/// The application render loop.
@@ -7,6 +9,7 @@
/// The render loop is responsible for advancing the animation timer and updating the scene
/// graph for visible windows.
///
+ [NotClientImplementable]
public interface IRenderLoop
{
///
diff --git a/src/Avalonia.Base/Rendering/IRenderRoot.cs b/src/Avalonia.Base/Rendering/IRenderRoot.cs
index 54e58bf39c..1aa44158b2 100644
--- a/src/Avalonia.Base/Rendering/IRenderRoot.cs
+++ b/src/Avalonia.Base/Rendering/IRenderRoot.cs
@@ -1,3 +1,4 @@
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.VisualTree;
@@ -6,6 +7,7 @@ namespace Avalonia.Rendering
///
/// Represents the root of a renderable tree.
///
+ [NotClientImplementable]
public interface IRenderRoot : IVisual
{
///
diff --git a/src/Avalonia.Base/Rendering/IRenderTimer.cs b/src/Avalonia.Base/Rendering/IRenderTimer.cs
index d333e928a0..ee74c345be 100644
--- a/src/Avalonia.Base/Rendering/IRenderTimer.cs
+++ b/src/Avalonia.Base/Rendering/IRenderTimer.cs
@@ -1,11 +1,13 @@
using System;
using System.Threading.Tasks;
+using Avalonia.Metadata;
namespace Avalonia.Rendering
{
///
/// Defines the interface implemented by an application render timer.
///
+ [NotClientImplementable]
public interface IRenderTimer
{
///
diff --git a/src/Avalonia.Base/Rendering/IVisualBrushInitialize.cs b/src/Avalonia.Base/Rendering/IVisualBrushInitialize.cs
index 00449c5344..b5ab8ed0bd 100644
--- a/src/Avalonia.Base/Rendering/IVisualBrushInitialize.cs
+++ b/src/Avalonia.Base/Rendering/IVisualBrushInitialize.cs
@@ -1,4 +1,5 @@
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Rendering
{
@@ -6,6 +7,7 @@ namespace Avalonia.Rendering
/// Internal interface for initializing controls that are to be used as the visual in a
/// .
///
+ [Unstable]
public interface IVisualBrushInitialize
{
///
diff --git a/src/Avalonia.Base/Rendering/IVisualBrushRenderer.cs b/src/Avalonia.Base/Rendering/IVisualBrushRenderer.cs
index 1cd6515635..f5312ad39b 100644
--- a/src/Avalonia.Base/Rendering/IVisualBrushRenderer.cs
+++ b/src/Avalonia.Base/Rendering/IVisualBrushRenderer.cs
@@ -1,4 +1,5 @@
using Avalonia.Media;
+using Avalonia.Metadata;
using Avalonia.Platform;
namespace Avalonia.Rendering
@@ -6,6 +7,7 @@ namespace Avalonia.Rendering
///
/// Defines a renderer used to render a visual brush to a bitmap.
///
+ [Unstable]
public interface IVisualBrushRenderer
{
///
diff --git a/src/Avalonia.Base/Styling/Activators/IStyleActivator.cs b/src/Avalonia.Base/Styling/Activators/IStyleActivator.cs
index 479100ed8a..ac7b8b3ef1 100644
--- a/src/Avalonia.Base/Styling/Activators/IStyleActivator.cs
+++ b/src/Avalonia.Base/Styling/Activators/IStyleActivator.cs
@@ -1,6 +1,5 @@
-#nullable enable
-
-using System;
+using System;
+using Avalonia.Metadata;
namespace Avalonia.Styling.Activators
{
@@ -16,6 +15,7 @@ namespace Avalonia.Styling.Activators
/// - The subscription can have a tag associated with it, allowing a subscriber to index
/// into a list of subscriptions without having to allocate additional objects.
///
+ [Unstable]
public interface IStyleActivator : IDisposable
{
///
diff --git a/src/Avalonia.Base/Styling/Activators/IStyleActivatorSink.cs b/src/Avalonia.Base/Styling/Activators/IStyleActivatorSink.cs
index a1a6ef5c28..fbb18dc304 100644
--- a/src/Avalonia.Base/Styling/Activators/IStyleActivatorSink.cs
+++ b/src/Avalonia.Base/Styling/Activators/IStyleActivatorSink.cs
@@ -1,10 +1,11 @@
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Styling.Activators
{
///
/// Receives notifications from an .
///
+ [Unstable]
public interface IStyleActivatorSink
{
///
diff --git a/src/Avalonia.Base/Styling/IGlobalStyles.cs b/src/Avalonia.Base/Styling/IGlobalStyles.cs
index ab24e3138c..f9667a8895 100644
--- a/src/Avalonia.Base/Styling/IGlobalStyles.cs
+++ b/src/Avalonia.Base/Styling/IGlobalStyles.cs
@@ -1,13 +1,13 @@
using System;
using System.Collections.Generic;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
///
/// Defines the style host that provides styles global to the application.
///
+ [NotClientImplementable]
public interface IGlobalStyles : IStyleHost
{
///
diff --git a/src/Avalonia.Base/Styling/ISetter.cs b/src/Avalonia.Base/Styling/ISetter.cs
index d588817be8..71ae5d84c0 100644
--- a/src/Avalonia.Base/Styling/ISetter.cs
+++ b/src/Avalonia.Base/Styling/ISetter.cs
@@ -1,12 +1,12 @@
using System;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
///
/// Represents a setter for a .
///
+ [NotClientImplementable]
public interface ISetter
{
///
diff --git a/src/Avalonia.Base/Styling/ISetterInstance.cs b/src/Avalonia.Base/Styling/ISetterInstance.cs
index a299a87b64..e0d3137619 100644
--- a/src/Avalonia.Base/Styling/ISetterInstance.cs
+++ b/src/Avalonia.Base/Styling/ISetterInstance.cs
@@ -1,12 +1,12 @@
-#nullable enable
-
-using System;
+using System;
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
///
/// Represents a setter that has been instanced on a control.
///
+ [Unstable]
public interface ISetterInstance : IDisposable
{
///
diff --git a/src/Avalonia.Base/Styling/IStyle.cs b/src/Avalonia.Base/Styling/IStyle.cs
index 78fbe0f2b5..fe6e8319ad 100644
--- a/src/Avalonia.Base/Styling/IStyle.cs
+++ b/src/Avalonia.Base/Styling/IStyle.cs
@@ -1,13 +1,12 @@
using System.Collections.Generic;
-using Avalonia.Controls;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
///
/// Defines the interface for styles.
///
+ [NotClientImplementable]
public interface IStyle
{
///
diff --git a/src/Avalonia.Base/Styling/IStyleHost.cs b/src/Avalonia.Base/Styling/IStyleHost.cs
index 360b40d9a1..2ae488825c 100644
--- a/src/Avalonia.Base/Styling/IStyleHost.cs
+++ b/src/Avalonia.Base/Styling/IStyleHost.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
+using Avalonia.Metadata;
#nullable enable
@@ -8,6 +9,7 @@ namespace Avalonia.Styling
///
/// Defines an element that has a collection.
///
+ [NotClientImplementable]
public interface IStyleHost
{
///
diff --git a/src/Avalonia.Base/Styling/IStyleInstance.cs b/src/Avalonia.Base/Styling/IStyleInstance.cs
index 8ddb989bc0..5b5b99097c 100644
--- a/src/Avalonia.Base/Styling/IStyleInstance.cs
+++ b/src/Avalonia.Base/Styling/IStyleInstance.cs
@@ -1,12 +1,12 @@
using System;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
///
/// Represents a style that has been instanced on a control.
///
+ [Unstable]
public interface IStyleInstance : IDisposable
{
///
diff --git a/src/Avalonia.Base/Styling/IStyleable.cs b/src/Avalonia.Base/Styling/IStyleable.cs
index a3df779057..5bc972e7ab 100644
--- a/src/Avalonia.Base/Styling/IStyleable.cs
+++ b/src/Avalonia.Base/Styling/IStyleable.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Avalonia.Collections;
+using Avalonia.Metadata;
#nullable enable
@@ -9,6 +10,7 @@ namespace Avalonia.Styling
///
/// Interface for styleable elements.
///
+ [NotClientImplementable]
public interface IStyleable : IAvaloniaObject, INamed
{
///
diff --git a/src/Avalonia.Base/Styling/ITemplatedControl.cs b/src/Avalonia.Base/Styling/ITemplatedControl.cs
index 5485babb62..68989c8a5e 100644
--- a/src/Avalonia.Base/Styling/ITemplatedControl.cs
+++ b/src/Avalonia.Base/Styling/ITemplatedControl.cs
@@ -1,6 +1,8 @@
+using Avalonia.Metadata;
namespace Avalonia.Styling
{
+ [NotClientImplementable]
public interface ITemplatedControl : IAvaloniaObject
{
}
diff --git a/src/Avalonia.Base/VisualTree/IVisual.cs b/src/Avalonia.Base/VisualTree/IVisual.cs
index b1251618c4..3b053fab38 100644
--- a/src/Avalonia.Base/VisualTree/IVisual.cs
+++ b/src/Avalonia.Base/VisualTree/IVisual.cs
@@ -1,10 +1,9 @@
using System;
using Avalonia.Collections;
using Avalonia.Media;
+using Avalonia.Metadata;
using Avalonia.Rendering;
-#nullable enable
-
namespace Avalonia.VisualTree
{
///
@@ -18,6 +17,7 @@ namespace Avalonia.VisualTree
/// implemented by . It should not be necessary to implement it
/// anywhere else.
///
+ [NotClientImplementable]
public interface IVisual
{
///
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/IApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/IApplicationLifetime.cs
index 9860d0cb38..b38a539d4a 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/IApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/IApplicationLifetime.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Controls.ApplicationLifetimes
{
+ [NotClientImplementable]
public interface IApplicationLifetime
{
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/IClassicDesktopStyleApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/IClassicDesktopStyleApplicationLifetime.cs
index 2bd5c1238d..4b88f6b537 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/IClassicDesktopStyleApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/IClassicDesktopStyleApplicationLifetime.cs
@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
+using Avalonia.Metadata;
namespace Avalonia.Controls.ApplicationLifetimes
{
///
/// Controls application lifetime in classic desktop style
///
+ [NotClientImplementable]
public interface IClassicDesktopStyleApplicationLifetime : IControlledApplicationLifetime
{
///
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/IControlledApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/IControlledApplicationLifetime.cs
index 3f61aeb536..d7eda790df 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/IControlledApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/IControlledApplicationLifetime.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Controls.ApplicationLifetimes
{
+ [NotClientImplementable]
public interface IControlledApplicationLifetime : IApplicationLifetime
{
///
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/ISingleViewApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/ISingleViewApplicationLifetime.cs
index e25815602e..480c65e5ad 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/ISingleViewApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/ISingleViewApplicationLifetime.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Controls.ApplicationLifetimes
{
+ [NotClientImplementable]
public interface ISingleViewApplicationLifetime : IApplicationLifetime
{
Control? MainView { get; set; }
diff --git a/src/Avalonia.Controls/Diagnostics/IPopupHostProvider.cs b/src/Avalonia.Controls/Diagnostics/IPopupHostProvider.cs
index 45cd1d727e..64978248e5 100644
--- a/src/Avalonia.Controls/Diagnostics/IPopupHostProvider.cs
+++ b/src/Avalonia.Controls/Diagnostics/IPopupHostProvider.cs
@@ -1,11 +1,13 @@
using System;
using Avalonia.Controls.Primitives;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Diagnostics
{
///
/// Diagnostics interface to retrieve an associated .
///
+ [NotClientImplementable]
public interface IPopupHostProvider
{
///
diff --git a/src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs b/src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
index 08d559a5c1..1c7bdb9b37 100644
--- a/src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
+++ b/src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
@@ -2,11 +2,13 @@
using System.Collections.Generic;
using Avalonia.Input;
using Avalonia.Input.Raw;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Rendering;
namespace Avalonia.Controls.Embedding.Offscreen
{
+ [Unstable]
public abstract class OffscreenTopLevelImplBase : ITopLevelImpl
{
private double _scaling = 1;
diff --git a/src/Avalonia.Controls/IContentControl.cs b/src/Avalonia.Controls/IContentControl.cs
index d28b0afb25..b4d8d0f574 100644
--- a/src/Avalonia.Controls/IContentControl.cs
+++ b/src/Avalonia.Controls/IContentControl.cs
@@ -1,5 +1,6 @@
using Avalonia.Controls.Templates;
using Avalonia.Layout;
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
@@ -7,6 +8,7 @@ namespace Avalonia.Controls
/// Defines a control that displays according to a
/// .
///
+ [NotClientImplementable]
public interface IContentControl : IControl
{
///
diff --git a/src/Avalonia.Controls/IControl.cs b/src/Avalonia.Controls/IControl.cs
index b501bc15a7..3395fc1059 100644
--- a/src/Avalonia.Controls/IControl.cs
+++ b/src/Avalonia.Controls/IControl.cs
@@ -1,6 +1,7 @@
using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.Layout;
+using Avalonia.Metadata;
using Avalonia.VisualTree;
namespace Avalonia.Controls
@@ -8,6 +9,7 @@ namespace Avalonia.Controls
///
/// Interface for Avalonia controls.
///
+ [NotClientImplementable]
public interface IControl : IVisual,
IDataTemplateHost,
ILayoutable,
diff --git a/src/Avalonia.Controls/IGlobalDataTemplates.cs b/src/Avalonia.Controls/IGlobalDataTemplates.cs
index 92dcd2c189..f4499ddb5e 100644
--- a/src/Avalonia.Controls/IGlobalDataTemplates.cs
+++ b/src/Avalonia.Controls/IGlobalDataTemplates.cs
@@ -1,10 +1,12 @@
using Avalonia.Controls.Templates;
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
///
/// Defines the application-global data templates.
///
+ [NotClientImplementable]
public interface IGlobalDataTemplates : IDataTemplateHost
{
}
diff --git a/src/Avalonia.Controls/IMenu.cs b/src/Avalonia.Controls/IMenu.cs
index 0722a22f08..d90c5ea7a8 100644
--- a/src/Avalonia.Controls/IMenu.cs
+++ b/src/Avalonia.Controls/IMenu.cs
@@ -1,10 +1,12 @@
using Avalonia.Controls.Platform;
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
///
/// Represents a or .
///
+ [NotClientImplementable]
public interface IMenu : IMenuElement
{
///
diff --git a/src/Avalonia.Controls/IMenuElement.cs b/src/Avalonia.Controls/IMenuElement.cs
index a3200d2b1b..c13c20b639 100644
--- a/src/Avalonia.Controls/IMenuElement.cs
+++ b/src/Avalonia.Controls/IMenuElement.cs
@@ -1,11 +1,13 @@
using System.Collections.Generic;
using Avalonia.Input;
+using Avalonia.Metadata;
namespace Avalonia.Controls
{
///
/// Represents an or .
///
+ [NotClientImplementable]
public interface IMenuElement : IControl
{
///
diff --git a/src/Avalonia.Controls/IMenuItem.cs b/src/Avalonia.Controls/IMenuItem.cs
index 35e36eb0f4..9d7ef3c18d 100644
--- a/src/Avalonia.Controls/IMenuItem.cs
+++ b/src/Avalonia.Controls/IMenuItem.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Controls
+using Avalonia.Metadata;
+
+namespace Avalonia.Controls
{
///
/// Represents a .
///
+ [NotClientImplementable]
public interface IMenuItem : IMenuElement
{
///
diff --git a/src/Avalonia.Controls/INativeMenuExporterEventsImplBridge.cs b/src/Avalonia.Controls/INativeMenuExporterEventsImplBridge.cs
index f492e6ca0f..29963e4821 100644
--- a/src/Avalonia.Controls/INativeMenuExporterEventsImplBridge.cs
+++ b/src/Avalonia.Controls/INativeMenuExporterEventsImplBridge.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Controls
{
+ [Unstable]
public interface INativeMenuExporterEventsImplBridge
{
void RaiseNeedsUpdate ();
diff --git a/src/Avalonia.Controls/INativeMenuItemExporterEventsImplBridge.cs b/src/Avalonia.Controls/INativeMenuItemExporterEventsImplBridge.cs
index 6cb68d8ddd..a6c7489971 100644
--- a/src/Avalonia.Controls/INativeMenuItemExporterEventsImplBridge.cs
+++ b/src/Avalonia.Controls/INativeMenuItemExporterEventsImplBridge.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Controls
{
+ [Unstable]
public interface INativeMenuItemExporterEventsImplBridge
{
void RaiseClicked ();
diff --git a/src/Avalonia.Controls/IPanel.cs b/src/Avalonia.Controls/IPanel.cs
index 7b9e2c2074..8f2564ec74 100644
--- a/src/Avalonia.Controls/IPanel.cs
+++ b/src/Avalonia.Controls/IPanel.cs
@@ -1,8 +1,11 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Controls
{
///
/// Interface for controls that can contain multiple children.
///
+ [NotClientImplementable]
public interface IPanel : IControl
{
///
@@ -10,4 +13,4 @@ namespace Avalonia.Controls
///
Controls Children { get; }
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Controls/IScrollable.cs b/src/Avalonia.Controls/IScrollable.cs
index 2a98b3910a..680088290c 100644
--- a/src/Avalonia.Controls/IScrollable.cs
+++ b/src/Avalonia.Controls/IScrollable.cs
@@ -1,4 +1,3 @@
-
namespace Avalonia.Controls.Primitives
{
///
diff --git a/src/Avalonia.Controls/Notifications/IManagedNotificationManager.cs b/src/Avalonia.Controls/Notifications/IManagedNotificationManager.cs
index 977544674d..b2e6e9e80b 100644
--- a/src/Avalonia.Controls/Notifications/IManagedNotificationManager.cs
+++ b/src/Avalonia.Controls/Notifications/IManagedNotificationManager.cs
@@ -1,4 +1,6 @@
-namespace Avalonia.Controls.Notifications
+using Avalonia.Metadata;
+
+namespace Avalonia.Controls.Notifications
{
///
/// Represents a notification manager that can show arbitrary content.
@@ -9,6 +11,7 @@
/// can display arbitrary content, as opposed to notification managers which display notifications
/// using the host operating system's notification mechanism.
///
+ [NotClientImplementable]
public interface IManagedNotificationManager : INotificationManager
{
///
diff --git a/src/Avalonia.Controls/Notifications/INotification.cs b/src/Avalonia.Controls/Notifications/INotification.cs
index fa08233097..9ccce5b2c4 100644
--- a/src/Avalonia.Controls/Notifications/INotification.cs
+++ b/src/Avalonia.Controls/Notifications/INotification.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Notifications
{
///
/// Represents a notification that can be shown in a window or by the host operating system.
///
+ [NotClientImplementable]
public interface INotification
{
///
diff --git a/src/Avalonia.Controls/Notifications/INotificationManager.cs b/src/Avalonia.Controls/Notifications/INotificationManager.cs
index 72fb8e6c08..5fa479f2c3 100644
--- a/src/Avalonia.Controls/Notifications/INotificationManager.cs
+++ b/src/Avalonia.Controls/Notifications/INotificationManager.cs
@@ -1,9 +1,12 @@
-namespace Avalonia.Controls.Notifications
+using Avalonia.Metadata;
+
+namespace Avalonia.Controls.Notifications
{
///
/// Represents a notification manager that can be used to show notifications in a window or using
/// the host operating system.
///
+ [NotClientImplementable]
public interface INotificationManager
{
///
diff --git a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
index 6e9ac537f1..abef29bbd9 100644
--- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
+++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
@@ -4,6 +4,7 @@ using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Interactivity;
using Avalonia.LogicalTree;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Rendering;
using Avalonia.Threading;
@@ -14,6 +15,7 @@ namespace Avalonia.Controls.Platform
///
/// Provides the default keyboard and pointer interaction for menus.
///
+ [Unstable]
public class DefaultMenuInteractionHandler : IMenuInteractionHandler
{
private readonly bool _isContextMenu;
diff --git a/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs b/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs
index a8d3a3b3ac..99bbb8b56d 100644
--- a/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs
+++ b/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Platform
{
+ [Unstable]
public interface IApplicationPlatformEvents
{
void RaiseUrlsOpened(string[] urls);
diff --git a/src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs b/src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs
index dd8503f768..47b5a048b0 100644
--- a/src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs
+++ b/src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs
@@ -1,8 +1,11 @@
-namespace Avalonia.Controls.Platform
+using Avalonia.Metadata;
+
+namespace Avalonia.Controls.Platform
{
///
/// Handles user interaction for menus.
///
+ [Unstable]
public interface IMenuInteractionHandler
{
///
diff --git a/src/Avalonia.Controls/Platform/IMountedVolumeInfoProvider.cs b/src/Avalonia.Controls/Platform/IMountedVolumeInfoProvider.cs
index 6e10163175..daeb9076e6 100644
--- a/src/Avalonia.Controls/Platform/IMountedVolumeInfoProvider.cs
+++ b/src/Avalonia.Controls/Platform/IMountedVolumeInfoProvider.cs
@@ -1,13 +1,13 @@
using System;
using System.Collections.ObjectModel;
-using System.Threading.Tasks;
-using Avalonia.Platform;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Platform
{
///
/// Defines a platform-specific mount volumes info provider implementation.
///
+ [Unstable]
public interface IMountedVolumeInfoProvider
{
///
diff --git a/src/Avalonia.Controls/Platform/INativeControlHostImpl.cs b/src/Avalonia.Controls/Platform/INativeControlHostImpl.cs
index df13613848..ffa79aa8d6 100644
--- a/src/Avalonia.Controls/Platform/INativeControlHostImpl.cs
+++ b/src/Avalonia.Controls/Platform/INativeControlHostImpl.cs
@@ -1,10 +1,11 @@
using System;
using System.Diagnostics.CodeAnalysis;
+using Avalonia.Metadata;
using Avalonia.Platform;
-using Avalonia.VisualTree;
namespace Avalonia.Controls.Platform
{
+ [Unstable]
public interface INativeControlHostImpl
{
INativeControlHostDestroyableControlHandle CreateDefaultChild(IPlatformHandle parent);
@@ -13,11 +14,13 @@ namespace Avalonia.Controls.Platform
bool IsCompatibleWith(IPlatformHandle handle);
}
+ [Unstable]
public interface INativeControlHostDestroyableControlHandle : IPlatformHandle
{
void Destroy();
}
+ [Unstable]
public interface INativeControlHostControlTopLevelAttachment : IDisposable
{
INativeControlHostImpl? AttachedTo { get; set; }
@@ -27,6 +30,7 @@ namespace Avalonia.Controls.Platform
void ShowInBounds(Rect rect);
}
+ [Unstable]
public interface ITopLevelImplWithNativeControlHost
{
INativeControlHostImpl? NativeControlHost { get; }
diff --git a/src/Avalonia.Controls/Platform/IPlatformIconLoader.cs b/src/Avalonia.Controls/Platform/IPlatformIconLoader.cs
index ecbc6d2234..4c844ce30f 100644
--- a/src/Avalonia.Controls/Platform/IPlatformIconLoader.cs
+++ b/src/Avalonia.Controls/Platform/IPlatformIconLoader.cs
@@ -1,7 +1,9 @@
using System.IO;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IPlatformIconLoader
{
IWindowIconImpl LoadIcon(string fileName);
diff --git a/src/Avalonia.Controls/Platform/IPlatformLifetimeEventsImpl.cs b/src/Avalonia.Controls/Platform/IPlatformLifetimeEventsImpl.cs
index 4cd6640453..0658f9211c 100644
--- a/src/Avalonia.Controls/Platform/IPlatformLifetimeEventsImpl.cs
+++ b/src/Avalonia.Controls/Platform/IPlatformLifetimeEventsImpl.cs
@@ -1,9 +1,10 @@
using System;
-using System.ComponentModel;
using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IPlatformLifetimeEventsImpl
{
///
diff --git a/src/Avalonia.Controls/Platform/IPlatformNativeSurfaceHandle.cs b/src/Avalonia.Controls/Platform/IPlatformNativeSurfaceHandle.cs
index 264f5e4667..6ad07b1b13 100644
--- a/src/Avalonia.Controls/Platform/IPlatformNativeSurfaceHandle.cs
+++ b/src/Avalonia.Controls/Platform/IPlatformNativeSurfaceHandle.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IPlatformNativeSurfaceHandle : IPlatformHandle
{
PixelSize Size { get; }
diff --git a/src/Avalonia.Controls/Platform/IPopupImpl.cs b/src/Avalonia.Controls/Platform/IPopupImpl.cs
index 477d5fab43..cd86045dee 100644
--- a/src/Avalonia.Controls/Platform/IPopupImpl.cs
+++ b/src/Avalonia.Controls/Platform/IPopupImpl.cs
@@ -1,10 +1,12 @@
using Avalonia.Controls.Primitives.PopupPositioning;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines a platform-specific popup window implementation.
///
+ [Unstable]
public interface IPopupImpl : IWindowBaseImpl
{
IPopupPositioner PopupPositioner { get; }
diff --git a/src/Avalonia.Controls/Platform/IScreenImpl.cs b/src/Avalonia.Controls/Platform/IScreenImpl.cs
index b68391aa52..fcae3b6493 100644
--- a/src/Avalonia.Controls/Platform/IScreenImpl.cs
+++ b/src/Avalonia.Controls/Platform/IScreenImpl.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
-
-#nullable enable
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IScreenImpl
{
int ScreenCount { get; }
diff --git a/src/Avalonia.Controls/Platform/ISystemDialogImpl.cs b/src/Avalonia.Controls/Platform/ISystemDialogImpl.cs
index 1685a6a38c..715eda5cfa 100644
--- a/src/Avalonia.Controls/Platform/ISystemDialogImpl.cs
+++ b/src/Avalonia.Controls/Platform/ISystemDialogImpl.cs
@@ -1,10 +1,12 @@
using System.Threading.Tasks;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Platform
{
///
/// Defines a platform-specific system dialog implementation.
///
+ [Unstable]
public interface ISystemDialogImpl
{
///
diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
index 80434882f7..bd0339f525 100644
--- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
+++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
@@ -4,6 +4,7 @@ using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Layout;
+using Avalonia.Metadata;
using Avalonia.Rendering;
using JetBrains.Annotations;
@@ -50,6 +51,7 @@ namespace Avalonia.Platform
/// This interface is the common interface to and
/// .
///
+ [Unstable]
public interface ITopLevelImpl : IDisposable
{
///
diff --git a/src/Avalonia.Controls/Platform/ITopLevelImplWithTextInputMethod.cs b/src/Avalonia.Controls/Platform/ITopLevelImplWithTextInputMethod.cs
index bafb973765..a2e426ca08 100644
--- a/src/Avalonia.Controls/Platform/ITopLevelImplWithTextInputMethod.cs
+++ b/src/Avalonia.Controls/Platform/ITopLevelImplWithTextInputMethod.cs
@@ -1,9 +1,11 @@
using Avalonia.Input;
using Avalonia.Input.TextInput;
+using Avalonia.Metadata;
using Avalonia.Platform;
namespace Avalonia.Controls.Platform
{
+ [Unstable]
public interface ITopLevelImplWithTextInputMethod : ITopLevelImpl
{
public ITextInputMethodImpl? TextInputMethod { get; }
diff --git a/src/Avalonia.Controls/Platform/ITopLevelNativeMenuExporter.cs b/src/Avalonia.Controls/Platform/ITopLevelNativeMenuExporter.cs
index 9e72a40439..149a978c54 100644
--- a/src/Avalonia.Controls/Platform/ITopLevelNativeMenuExporter.cs
+++ b/src/Avalonia.Controls/Platform/ITopLevelNativeMenuExporter.cs
@@ -1,13 +1,16 @@
using System;
+using Avalonia.Metadata;
using Avalonia.Platform;
namespace Avalonia.Controls.Platform
{
+ [Unstable]
public interface INativeMenuExporter
{
void SetNativeMenu(NativeMenu? menu);
}
+ [Unstable]
public interface ITopLevelNativeMenuExporter : INativeMenuExporter
{
bool IsNativeMenuExported { get; }
@@ -15,11 +18,13 @@ namespace Avalonia.Controls.Platform
event EventHandler OnIsNativeMenuExportedChanged;
}
+ [Unstable]
public interface INativeMenuExporterProvider
{
INativeMenuExporter? NativeMenuExporter { get; }
}
-
+
+ [Unstable]
public interface ITopLevelImplWithNativeMenuExporter : ITopLevelImpl
{
ITopLevelNativeMenuExporter? NativeMenuExporter { get; }
diff --git a/src/Avalonia.Controls/Platform/ITrayIconImpl.cs b/src/Avalonia.Controls/Platform/ITrayIconImpl.cs
index 289b569645..4ef9397d04 100644
--- a/src/Avalonia.Controls/Platform/ITrayIconImpl.cs
+++ b/src/Avalonia.Controls/Platform/ITrayIconImpl.cs
@@ -1,8 +1,10 @@
using System;
using Avalonia.Controls.Platform;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface ITrayIconImpl : IDisposable
{
///
diff --git a/src/Avalonia.Controls/Platform/IWindowBaseImpl.cs b/src/Avalonia.Controls/Platform/IWindowBaseImpl.cs
index 066f4579c0..512fad6dfc 100644
--- a/src/Avalonia.Controls/Platform/IWindowBaseImpl.cs
+++ b/src/Avalonia.Controls/Platform/IWindowBaseImpl.cs
@@ -1,8 +1,10 @@
using System;
using Avalonia.Automation.Peers;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IWindowBaseImpl : ITopLevelImpl
{
///
diff --git a/src/Avalonia.Controls/Platform/IWindowIconImpl.cs b/src/Avalonia.Controls/Platform/IWindowIconImpl.cs
index 7086b7651c..4bb8844d97 100644
--- a/src/Avalonia.Controls/Platform/IWindowIconImpl.cs
+++ b/src/Avalonia.Controls/Platform/IWindowIconImpl.cs
@@ -1,7 +1,9 @@
using System.IO;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
+ [Unstable]
public interface IWindowIconImpl
{
void Save(Stream outputStream);
diff --git a/src/Avalonia.Controls/Platform/IWindowImpl.cs b/src/Avalonia.Controls/Platform/IWindowImpl.cs
index d4be4f9f45..af9392d440 100644
--- a/src/Avalonia.Controls/Platform/IWindowImpl.cs
+++ b/src/Avalonia.Controls/Platform/IWindowImpl.cs
@@ -1,12 +1,14 @@
using System;
using Avalonia.Controls;
using Avalonia.Input;
+using Avalonia.Metadata;
namespace Avalonia.Platform
{
///
/// Defines a platform-specific window implementation.
///
+ [Unstable]
public interface IWindowImpl : IWindowBaseImpl
{
///
diff --git a/src/Avalonia.Controls/Platform/IWindowingPlatform.cs b/src/Avalonia.Controls/Platform/IWindowingPlatform.cs
index fa26fe8fdd..5acc5adccd 100644
--- a/src/Avalonia.Controls/Platform/IWindowingPlatform.cs
+++ b/src/Avalonia.Controls/Platform/IWindowingPlatform.cs
@@ -1,5 +1,8 @@
+using Avalonia.Metadata;
+
namespace Avalonia.Platform
{
+ [Unstable]
public interface IWindowingPlatform
{
IWindowImpl CreateWindow();
diff --git a/src/Avalonia.Controls/Platform/InternalPlatformThreadingInterface.cs b/src/Avalonia.Controls/Platform/InternalPlatformThreadingInterface.cs
index 4e5908456e..630d2d8efb 100644
--- a/src/Avalonia.Controls/Platform/InternalPlatformThreadingInterface.cs
+++ b/src/Avalonia.Controls/Platform/InternalPlatformThreadingInterface.cs
@@ -1,14 +1,13 @@
using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading;
-using System.Threading.Tasks;
+using Avalonia.Metadata;
using Avalonia.Platform;
-using Avalonia.Rendering;
using Avalonia.Threading;
namespace Avalonia.Controls.Platform
{
+ [Unstable]
public class InternalPlatformThreadingInterface : IPlatformThreadingInterface
{
public InternalPlatformThreadingInterface()
diff --git a/src/Avalonia.Controls/Platform/MountedDriveInfo.cs b/src/Avalonia.Controls/Platform/MountedDriveInfo.cs
index f3104e4360..620ac9303f 100644
--- a/src/Avalonia.Controls/Platform/MountedDriveInfo.cs
+++ b/src/Avalonia.Controls/Platform/MountedDriveInfo.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Platform
{
///
/// Describes a Drive's properties.
///
+ [Unstable]
public class MountedVolumeInfo : IEquatable
{
public string? VolumeLabel { get; set; }
diff --git a/src/Avalonia.Controls/Platform/PlatformManager.cs b/src/Avalonia.Controls/Platform/PlatformManager.cs
index ee62316922..92f6f1cb52 100644
--- a/src/Avalonia.Controls/Platform/PlatformManager.cs
+++ b/src/Avalonia.Controls/Platform/PlatformManager.cs
@@ -1,9 +1,11 @@
using System;
using System.Reactive.Disposables;
+using Avalonia.Metadata;
using Avalonia.Platform;
namespace Avalonia.Controls.Platform
{
+ [Unstable]
public static partial class PlatformManager
{
static bool s_designerMode;
diff --git a/src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs b/src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs
index 62cd012d51..0a7daeaa24 100644
--- a/src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs
+++ b/src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs
@@ -1,7 +1,9 @@
-using Avalonia.Platform;
+using Avalonia.Metadata;
+using Avalonia.Platform;
namespace Avalonia.Controls.Platform.Surfaces
{
+ [Unstable]
public interface IFramebufferPlatformSurface
{
///
diff --git a/src/Avalonia.Controls/Presenters/IContentPresenter.cs b/src/Avalonia.Controls/Presenters/IContentPresenter.cs
index ab4d61e3bd..673de4700b 100644
--- a/src/Avalonia.Controls/Presenters/IContentPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/IContentPresenter.cs
@@ -1,4 +1,5 @@
using Avalonia.Controls.Primitives;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Presenters
{
@@ -6,6 +7,7 @@ namespace Avalonia.Controls.Presenters
/// Interface for controls that present a single item of data inside a
/// template.
///
+ [NotClientImplementable]
public interface IContentPresenter : IPresenter
{
///
diff --git a/src/Avalonia.Controls/Presenters/IContentPresenterHost.cs b/src/Avalonia.Controls/Presenters/IContentPresenterHost.cs
index 78c4affe44..562638e94a 100644
--- a/src/Avalonia.Controls/Presenters/IContentPresenterHost.cs
+++ b/src/Avalonia.Controls/Presenters/IContentPresenterHost.cs
@@ -1,5 +1,6 @@
using Avalonia.Collections;
using Avalonia.LogicalTree;
+using Avalonia.Metadata;
using Avalonia.Styling;
namespace Avalonia.Controls.Presenters
@@ -15,6 +16,7 @@ namespace Avalonia.Controls.Presenters
/// parent control's template is instantiated so they register themselves using this
/// interface.
///
+ [NotClientImplementable]
public interface IContentPresenterHost : ITemplatedControl
{
///
diff --git a/src/Avalonia.Controls/Presenters/IItemsPresenter.cs b/src/Avalonia.Controls/Presenters/IItemsPresenter.cs
index e7da3d4618..7cc72ef0a7 100644
--- a/src/Avalonia.Controls/Presenters/IItemsPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/IItemsPresenter.cs
@@ -1,8 +1,10 @@
using System.Collections;
using System.Collections.Specialized;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Presenters
{
+ [NotClientImplementable]
public interface IItemsPresenter : IPresenter
{
IEnumerable? Items { get; set; }
diff --git a/src/Avalonia.Controls/Presenters/IItemsPresenterHost.cs b/src/Avalonia.Controls/Presenters/IItemsPresenterHost.cs
index ba9ee0fe31..db11474871 100644
--- a/src/Avalonia.Controls/Presenters/IItemsPresenterHost.cs
+++ b/src/Avalonia.Controls/Presenters/IItemsPresenterHost.cs
@@ -1,3 +1,4 @@
+using Avalonia.Metadata;
using Avalonia.Styling;
namespace Avalonia.Controls.Presenters
@@ -13,6 +14,7 @@ namespace Avalonia.Controls.Presenters
/// parent control's template is instantiated so they register themselves using this
/// interface.
///
+ [NotClientImplementable]
public interface IItemsPresenterHost : ITemplatedControl
{
///
diff --git a/src/Avalonia.Controls/Presenters/IPresenter.cs b/src/Avalonia.Controls/Presenters/IPresenter.cs
index 5318ea2757..0399983189 100644
--- a/src/Avalonia.Controls/Presenters/IPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/IPresenter.cs
@@ -1,4 +1,5 @@
using Avalonia.Controls.Primitives;
+using Avalonia.Metadata;
namespace Avalonia.Controls.Presenters
{
@@ -12,6 +13,7 @@ namespace Avalonia.Controls.Presenters
/// of a then that signals that the visual child
/// of the presenter is not a part of the template.
///
+ [NotClientImplementable]
public interface IPresenter : IControl, INamed
{
}
diff --git a/src/Avalonia.Controls/Primitives/IPopupHost.cs b/src/Avalonia.Controls/Primitives/IPopupHost.cs
index 36d2ae9230..99b7be6385 100644
--- a/src/Avalonia.Controls/Primitives/IPopupHost.cs
+++ b/src/Avalonia.Controls/Primitives/IPopupHost.cs
@@ -2,6 +2,7 @@ using System;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Primitives.PopupPositioning;
using Avalonia.Input;
+using Avalonia.Metadata;
using Avalonia.VisualTree;
namespace Avalonia.Controls.Primitives
@@ -14,6 +15,7 @@ namespace Avalonia.Controls.Primitives
/// () or an which is created
/// on an .
///
+ [NotClientImplementable]
public interface IPopupHost : IDisposable, IFocusScope
{
///
diff --git a/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs b/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
index 8daf1ac68a..8d35a91e00 100644
--- a/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
+++ b/src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
@@ -45,6 +45,7 @@ Copyright © 2019 Nikita Tsukanov
*/
using System;
+using Avalonia.Metadata;
using Avalonia.VisualTree;
using Avalonia.Media;
@@ -61,6 +62,7 @@ namespace Avalonia.Controls.Primitives.PopupPositioning
/// requirement that a popup must intersect with or be at least partially adjacent to its parent
/// surface.
///
+ [Unstable]
public struct PopupPositionerParameters
{
private PopupGravity _gravity;
@@ -429,6 +431,7 @@ namespace Avalonia.Controls.Primitives.PopupPositioning
/// managed implementation is provided in for platforms
/// on which popups can be arbitrarily positioned.
///
+ [NotClientImplementable]
public interface IPopupPositioner
{
///
@@ -439,6 +442,7 @@ namespace Avalonia.Controls.Primitives.PopupPositioning
void Update(PopupPositionerParameters parameters);
}
+ [Unstable]
static class PopupPositionerExtensions
{
public static void ConfigurePosition(ref this PopupPositionerParameters positionerParameters,
diff --git a/src/Avalonia.Controls/Remote/RemoteServer.cs b/src/Avalonia.Controls/Remote/RemoteServer.cs
index f4cc91a0e6..2cf2d2b97d 100644
--- a/src/Avalonia.Controls/Remote/RemoteServer.cs
+++ b/src/Avalonia.Controls/Remote/RemoteServer.cs
@@ -1,11 +1,12 @@
using System;
using Avalonia.Controls.Embedding;
using Avalonia.Controls.Remote.Server;
-using Avalonia.Platform;
+using Avalonia.Metadata;
using Avalonia.Remote.Protocol;
namespace Avalonia.Controls.Remote
{
+ [Unstable]
public class RemoteServer
{
private EmbeddableControlRoot _topLevel;
diff --git a/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs b/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs
index c9fd1dc3b8..e800f2f4b0 100644
--- a/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs
+++ b/src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs
@@ -6,6 +6,7 @@ using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Layout;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Remote.Protocol;
using Avalonia.Remote.Protocol.Input;
@@ -18,6 +19,7 @@ using ProtocolPixelFormat = Avalonia.Remote.Protocol.Viewport.PixelFormat;
namespace Avalonia.Controls.Remote.Server
{
+ [Unstable]
public class RemoteServerTopLevelImpl : OffscreenTopLevelImplBase, IFramebufferPlatformSurface
{
private readonly IAvaloniaRemoteTransportConnection _transport;
diff --git a/src/Avalonia.Controls/Templates/IDataTemplateHost.cs b/src/Avalonia.Controls/Templates/IDataTemplateHost.cs
index 61986a0661..ce763c3336 100644
--- a/src/Avalonia.Controls/Templates/IDataTemplateHost.cs
+++ b/src/Avalonia.Controls/Templates/IDataTemplateHost.cs
@@ -1,9 +1,11 @@
-
+using Avalonia.Metadata;
+
namespace Avalonia.Controls.Templates
{
///
/// Defines an element that has a collection.
///
+ [NotClientImplementable]
public interface IDataTemplateHost
{
///
diff --git a/src/Avalonia.OpenGL/Imaging/IOpenGlBitmapImpl.cs b/src/Avalonia.OpenGL/Imaging/IOpenGlBitmapImpl.cs
index aef4f601be..22f0cebf57 100644
--- a/src/Avalonia.OpenGL/Imaging/IOpenGlBitmapImpl.cs
+++ b/src/Avalonia.OpenGL/Imaging/IOpenGlBitmapImpl.cs
@@ -1,15 +1,17 @@
using System;
-using Avalonia.Media.Imaging;
+using Avalonia.Metadata;
using Avalonia.Platform;
namespace Avalonia.OpenGL.Imaging
{
+ [Unstable]
public interface IOpenGlBitmapImpl : IBitmapImpl
{
IOpenGlBitmapAttachment CreateFramebufferAttachment(IGlContext context, Action presentCallback);
bool SupportsContext(IGlContext context);
}
+ [Unstable]
public interface IOpenGlBitmapAttachment : IDisposable
{
void Present();
diff --git a/src/Skia/Avalonia.Skia/GlyphRunImpl.cs b/src/Skia/Avalonia.Skia/GlyphRunImpl.cs
index f59a0a32c2..bdc3d075cf 100644
--- a/src/Skia/Avalonia.Skia/GlyphRunImpl.cs
+++ b/src/Skia/Avalonia.Skia/GlyphRunImpl.cs
@@ -1,4 +1,5 @@
using System;
+using Avalonia.Metadata;
using Avalonia.Platform;
using JetBrains.Annotations;
using SkiaSharp;
@@ -6,6 +7,7 @@ using SkiaSharp;
namespace Avalonia.Skia
{
///
+ [Unstable]
public class GlyphRunImpl : IGlyphRunImpl
{
public GlyphRunImpl([NotNull] SKTextBlob textBlob)
diff --git a/src/Skia/Avalonia.Skia/GlyphTypefaceImpl.cs b/src/Skia/Avalonia.Skia/GlyphTypefaceImpl.cs
index 5b6e5af60f..dcb4eac7ca 100644
--- a/src/Skia/Avalonia.Skia/GlyphTypefaceImpl.cs
+++ b/src/Skia/Avalonia.Skia/GlyphTypefaceImpl.cs
@@ -1,11 +1,13 @@
using System;
using System.Runtime.InteropServices;
+using Avalonia.Metadata;
using Avalonia.Platform;
using HarfBuzzSharp;
using SkiaSharp;
namespace Avalonia.Skia
{
+ [Unstable]
public class GlyphTypefaceImpl : IGlyphTypefaceImpl
{
private bool _isDisposed;
diff --git a/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs b/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs
index 38fa5a5253..1391a8f195 100644
--- a/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs
+++ b/src/Skia/Avalonia.Skia/ISkiaDrawingContextImpl.cs
@@ -1,8 +1,10 @@
+using Avalonia.Metadata;
using Avalonia.Platform;
using SkiaSharp;
namespace Avalonia.Skia
{
+ [Unstable]
public interface ISkiaDrawingContextImpl : IDrawingContextImpl
{
SKCanvas SkCanvas { get; }
diff --git a/src/Windows/Avalonia.Direct2D1/Media/BrushImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/BrushImpl.cs
index ad609a0810..602ea9b568 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/BrushImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/BrushImpl.cs
@@ -1,7 +1,9 @@
using System;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public abstract class BrushImpl : IDisposable
{
public SharpDX.Direct2D1.Brush PlatformBrush { get; set; }
diff --git a/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
index a259d8fab9..a0f98bbbc9 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
@@ -10,12 +10,14 @@ using SharpDX;
using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop;
using BitmapInterpolationMode = Avalonia.Media.Imaging.BitmapInterpolationMode;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
///
/// Draws using Direct2D1.
///
+ [Unstable]
public class DrawingContextImpl : IDrawingContextImpl
{
private readonly IVisualBrushRenderer _visualBrushRenderer;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs
index ec88347a17..c84c14daac 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs
@@ -1,4 +1,5 @@
using Avalonia.Logging;
+using Avalonia.Metadata;
using Avalonia.Platform;
using SharpDX.Direct2D1;
@@ -7,6 +8,7 @@ namespace Avalonia.Direct2D1.Media
///
/// The platform-specific interface for .
///
+ [Unstable]
public abstract class GeometryImpl : IGeometryImpl
{
private const float ContourApproximation = 0.0001f;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/GlyphTypefaceImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/GlyphTypefaceImpl.cs
index 4f2ed22a25..4154b44702 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/GlyphTypefaceImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/GlyphTypefaceImpl.cs
@@ -1,11 +1,13 @@
using System;
using Avalonia.Media;
+using Avalonia.Metadata;
using Avalonia.Platform;
using HarfBuzzSharp;
using SharpDX.DirectWrite;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class GlyphTypefaceImpl : IGlyphTypefaceImpl
{
private bool _isDisposed;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/ImageBrushImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/ImageBrushImpl.cs
index 296cefad4e..17dc359ed7 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/ImageBrushImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/ImageBrushImpl.cs
@@ -1,10 +1,12 @@
using Avalonia.Media;
+using Avalonia.Metadata;
using Avalonia.Rendering.Utilities;
using Avalonia.Utilities;
using SharpDX.Direct2D1;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public sealed class ImageBrushImpl : BrushImpl
{
private readonly OptionalDispose _bitmap;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/BitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/BitmapImpl.cs
index af6d5c5e7b..843efe2cc4 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/BitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/BitmapImpl.cs
@@ -1,10 +1,12 @@
using System;
using System.IO;
+using Avalonia.Metadata;
using Avalonia.Platform;
using D2DBitmap = SharpDX.Direct2D1.Bitmap;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public abstract class BitmapImpl : IBitmapImpl, IDisposable
{
public abstract Vector Dpi { get; }
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
index 63676e30b5..2656ab4c58 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
+using Avalonia.Metadata;
using SharpDX.WIC;
using Bitmap = SharpDX.Direct2D1.Bitmap;
@@ -8,6 +9,7 @@ namespace Avalonia.Direct2D1.Media
///
/// A Direct2D Bitmap implementation that uses a GPU memory bitmap as its image.
///
+ [Unstable]
public class D2DBitmapImpl : BitmapImpl
{
private readonly Bitmap _direct2DBitmap;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DRenderTargetBitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DRenderTargetBitmapImpl.cs
index 9a0e2ec00c..357e472d34 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DRenderTargetBitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DRenderTargetBitmapImpl.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Rendering;
using Avalonia.Utilities;
@@ -9,6 +10,7 @@ using D2DBitmap = SharpDX.Direct2D1.Bitmap;
namespace Avalonia.Direct2D1.Media.Imaging
{
+ [Unstable]
public class D2DRenderTargetBitmapImpl : D2DBitmapImpl, IDrawingContextLayerImpl, ILayerFactory
{
private readonly BitmapRenderTarget _renderTarget;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicBitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicBitmapImpl.cs
index df07f7f39c..1156246b29 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicBitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicBitmapImpl.cs
@@ -5,12 +5,14 @@ using SharpDX.WIC;
using APixelFormat = Avalonia.Platform.PixelFormat;
using AlphaFormat = Avalonia.Platform.AlphaFormat;
using D2DBitmap = SharpDX.Direct2D1.Bitmap;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
///
/// A WIC implementation of a .
///
+ [Unstable]
public class WicBitmapImpl : BitmapImpl
{
private readonly BitmapDecoder _decoder;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicRenderTargetBitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicRenderTargetBitmapImpl.cs
index 1265a7bdf0..8c9d01f37d 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicRenderTargetBitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/WicRenderTargetBitmapImpl.cs
@@ -1,10 +1,12 @@
using System;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Rendering;
using SharpDX.Direct2D1;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class WicRenderTargetBitmapImpl : WicBitmapImpl, IDrawingContextLayerImpl
{
private readonly WicRenderTarget _renderTarget;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/LinearGradientBrushImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/LinearGradientBrushImpl.cs
index 0e63d4cc03..5dfe683f59 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/LinearGradientBrushImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/LinearGradientBrushImpl.cs
@@ -1,8 +1,10 @@
using System.Linq;
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class LinearGradientBrushImpl : BrushImpl
{
public LinearGradientBrushImpl(
diff --git a/src/Windows/Avalonia.Direct2D1/Media/RadialGradientBrushImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/RadialGradientBrushImpl.cs
index 1fca6d4e33..0069e47001 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/RadialGradientBrushImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/RadialGradientBrushImpl.cs
@@ -1,8 +1,10 @@
using System.Linq;
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class RadialGradientBrushImpl : BrushImpl
{
public RadialGradientBrushImpl(
diff --git a/src/Windows/Avalonia.Direct2D1/Media/SolidColorBrushImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/SolidColorBrushImpl.cs
index fea1ca9157..b85494e2c1 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/SolidColorBrushImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/SolidColorBrushImpl.cs
@@ -1,7 +1,9 @@
using Avalonia.Media;
+using Avalonia.Metadata;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class SolidColorBrushImpl : BrushImpl
{
public SolidColorBrushImpl(ISolidColorBrush brush, SharpDX.Direct2D1.RenderTarget target)
diff --git a/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryContextImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryContextImpl.cs
index e1f7aad1b2..ec8f82556d 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryContextImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryContextImpl.cs
@@ -1,6 +1,7 @@
using System;
using Avalonia.Logging;
using Avalonia.Media;
+using Avalonia.Metadata;
using Avalonia.Platform;
using SharpDX.Direct2D1;
using D2D = SharpDX.Direct2D1;
@@ -8,6 +9,7 @@ using SweepDirection = SharpDX.Direct2D1.SweepDirection;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class StreamGeometryContextImpl : IStreamGeometryContextImpl
{
private readonly GeometrySink _sink;
diff --git a/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryImpl.cs
index 2bc2b2db71..e1677c0ed1 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/StreamGeometryImpl.cs
@@ -1,3 +1,4 @@
+using Avalonia.Metadata;
using Avalonia.Platform;
using SharpDX.Direct2D1;
@@ -6,6 +7,7 @@ namespace Avalonia.Direct2D1.Media
///
/// A Direct2D implementation of a .
///
+ [Unstable]
public class StreamGeometryImpl : GeometryImpl, IStreamGeometryImpl
{
///
diff --git a/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
index fe274701bf..3ecdb49e46 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
@@ -1,8 +1,10 @@
+using Avalonia.Metadata;
using Avalonia.Platform;
using SharpDX.Direct2D1;
namespace Avalonia.Direct2D1.Media
{
+ [Unstable]
public class TransformedGeometryImpl : GeometryImpl, ITransformedGeometryImpl
{
///
diff --git a/src/Windows/Avalonia.Win32/ScreenImpl.cs b/src/Windows/Avalonia.Win32/ScreenImpl.cs
index 96e45927da..f3754cd58f 100644
--- a/src/Windows/Avalonia.Win32/ScreenImpl.cs
+++ b/src/Windows/Avalonia.Win32/ScreenImpl.cs
@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Win32.Interop;
using static Avalonia.Win32.Interop.UnmanagedMethods;
namespace Avalonia.Win32
{
+ [Unstable]
public class ScreenImpl : IScreenImpl
{
public int ScreenCount
diff --git a/src/Windows/Avalonia.Win32/TrayIconImpl.cs b/src/Windows/Avalonia.Win32/TrayIconImpl.cs
index 6484ae6c54..7c3b8cf2d2 100644
--- a/src/Windows/Avalonia.Win32/TrayIconImpl.cs
+++ b/src/Windows/Avalonia.Win32/TrayIconImpl.cs
@@ -5,6 +5,7 @@ using Avalonia.Controls;
using Avalonia.Controls.Platform;
using Avalonia.Controls.Primitives.PopupPositioning;
using Avalonia.LogicalTree;
+using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Styling;
using Avalonia.Win32.Interop;
@@ -14,6 +15,7 @@ using static Avalonia.Win32.Interop.UnmanagedMethods;
namespace Avalonia.Win32
{
+ [Unstable]
public class TrayIconImpl : ITrayIconImpl
{
private readonly int _uniqueId;
diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs
index f0036236ec..8d836ef452 100644
--- a/src/Windows/Avalonia.Win32/WindowImpl.cs
+++ b/src/Windows/Avalonia.Win32/WindowImpl.cs
@@ -21,12 +21,14 @@ using Avalonia.Win32.OpenGl;
using Avalonia.Win32.WinRT;
using Avalonia.Win32.WinRT.Composition;
using static Avalonia.Win32.Interop.UnmanagedMethods;
+using Avalonia.Metadata;
namespace Avalonia.Win32
{
///
/// Window implementation for Win32 platform.
///
+ [Unstable]
public partial class WindowImpl : IWindowImpl, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo,
ITopLevelImplWithNativeControlHost,
ITopLevelImplWithTextInputMethod