using Avalonia.Input.TextInput; using Avalonia.Metadata; using Avalonia.Platform; namespace Avalonia.Input { /// /// Defines the interface for top-level input elements. /// [PrivateApi] public interface IInputRoot { /// /// Gets focus manager of the root. /// /// /// Focus manager can be null only if window wasn't initialized yet. /// public IFocusManager? FocusManager { get; } /// /// Gets or sets the input element that the pointer is currently over. /// internal IInputElement? PointerOverElement { get; set; } internal ITextInputMethodImpl? InputMethod { get; } internal InputElement RootElement { get; } // HACK: This is a temporary hack for "default focus" concept. // If nothing is focused we send keyboard events to Window. Since for now we always // control PresentationSource, we simply pass the TopLevel as a separate parameter there. // It's also currently used by automation since we have special WindowAutomationPeer which needs to target the // window itself public InputElement FocusRoot { get; } /// /// Performs a hit-test for chrome/decoration elements at the given position. /// /// The point in root-relative coordinates. /// /// null if no chrome element was hit (no chrome involvement at this point). /// or /// if an interactive chrome element was hit — the platform should redirect non-client input to regular client input. /// Any other non- value indicates a specific non-client role (titlebar, resize grip, etc.). /// internal WindowDecorationsElementRole? HitTestChromeElement(Point point) => null; } }