-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11.2.x Private/PublicAPI adjustments (#16733)
* Mark RenderWorker as internal * Add remaining Fonts.Tables types as internal * Mark new diagnostic APIs as a PrivateAPI * Restore old GetStyleDiagnostics APIs, but mark them with [PrivateApi], avoiding breaking changes
- Loading branch information
Showing
11 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Avalonia.Metadata; | ||
using Avalonia.Styling; | ||
|
||
namespace Avalonia.Diagnostics; | ||
|
||
[PrivateApi] | ||
[Unstable("Use StyledElementExtensions.GetValueStoreDiagnostic() instead")] | ||
public class StyleDiagnostics | ||
{ | ||
/// <summary> | ||
/// Currently applied styles. | ||
/// </summary> | ||
public IReadOnlyList<AppliedStyle> AppliedStyles { get; } | ||
|
||
public StyleDiagnostics(IReadOnlyList<AppliedStyle> appliedStyles) | ||
{ | ||
AppliedStyles = appliedStyles; | ||
} | ||
} | ||
|
||
[PrivateApi] | ||
[Unstable("Use StyledElementExtensions.GetValueStoreDiagnostic() instead")] | ||
public sealed class AppliedStyle | ||
{ | ||
private readonly StyleInstance _instance; | ||
|
||
internal AppliedStyle(StyleInstance instance) | ||
{ | ||
_instance = instance; | ||
} | ||
|
||
public bool HasActivator => _instance.HasActivator; | ||
public bool IsActive => _instance.IsActive(); | ||
public StyleBase Style => (StyleBase)_instance.Source; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters