// Generated API outline. Implementation bodies omitted. #nullable enable using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Threading; using System; using nfloat = System.Runtime.InteropServices.NFloat; namespace Xui.ToolKit.UI.Layer { using System.Runtime.CompilerServices; using Xui.Core.Abstract.Events; using Xui.Core.Animation; using Xui.Core.Canvas; using Xui.Core.Math2D; using Xui.Core.UI.Input; using Xui.Core.UI.Layer; /// /// Delayed press feedback and bounded, overlapping ripples. The host owns gesture capture and /// calls Begin/End when a press starts, commits or is cancelled. One layer can paint many logical /// cells by selecting a Target before arranging/rendering; it never allocates per-cell state. /// public struct PressFeedbackLayer : ILayer where TView : class, ILayerHost { /// Logical cell to begin or render. Leave at zero for a single button. public int Target; /// Optional pressed background; transparent by default. public Color Background; /// Ripple color, rendered at twelve percent opacity. public Color RippleColor; /// Outline used to clip feedback to the arranged bounds. public CornerRadius CornerRadius; /// Whether a competing ancestor drag gesture warrants a touch recognition delay. public static bool ShouldDelay(TView view, ref PointerEventRef e); /// Starts feedback at a point in the same coordinate space as the arranged bounds. public void Begin(TView view, Point position, bool delay); /// Quick taps show immediately and hold for 200ms; early scroll cancellation stays invisible. public void End(TView view, bool tapped); /// Keeps the most recently committed tap visible while its host awaits the first highlighted render. public void HoldReleasedFeedback(); /// Resumes completed feedback after reparenting, or clears it if the clock changed. public void Activate(TView view); /// Whether the current press has reached its highlight recognition time. public readonly bool IsPressVisible { get; } /// Current background strength for Target, for hosts that blend their own themed fill. public nfloat FeedbackOpacity { get; } /// Returns the desired border-edge size given the available space. public Size Measure(TView view, Size availableSize, IMeasureContext context); /// Finalises position and size within . public void Arrange(TView view, Rect rect, IMeasureContext context); /// Sets bounds before input, without requiring a drawing/measurement context. public void SetBounds(Rect rect); /// Draws content. Called after Arrange. public void Render(TView view, IContext context); /// Advances time-based state (animations, blinking cursors, etc.). public void Animate(TView view, TimeSpan previousTime, TimeSpan currentTime); /// Handles a pointer event in the given dispatch phase. public void OnPointerEvent(TView view, ref PointerEventRef e, EventPhase phase); /// Handles a key-down event while the host view has focus. public void OnKeyDown(TView view, ref KeyEventRef e); /// Handles a character input event while the host view has focus. public void OnChar(TView view, ref KeyEventRef e); /// Called when the host view gains keyboard focus. public void OnFocus(TView view); /// Called when the host view loses keyboard focus. public void OnBlur(TView view); } }