using Avalonia.Metadata; namespace Avalonia.Input { /// /// Manages focus for the application. /// [NotClientImplementable] public interface IFocusManager { /// /// Gets the currently focused . /// IInputElement? Current { get; } /// /// Gets the current focus scope. /// IFocusScope? Scope { get; } /// /// Focuses a control. /// /// The control to focus. /// The method by which focus was changed. /// Any key modifiers active at the time of focus. void Focus( IInputElement? control, NavigationMethod method = NavigationMethod.Unspecified, KeyModifiers keyModifiers = KeyModifiers.None); /// /// Notifies the focus manager of a change in focus scope. /// /// The new focus scope. /// /// This should not be called by client code. It is called by an /// when it activates, e.g. when a Window is activated. /// void SetFocusScope(IFocusScope scope); /// /// Notifies the focus manager that a focus scope has been removed. /// /// The focus scope to be removed. /// This should not be called by client code. It is called by an /// when it deactivates or closes, e.g. when a Window is closed. void RemoveFocusScope(IFocusScope scope); } }