// Generated API outline. Implementation bodies omitted.
#nullable enable
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
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;
using static Xui.Core.Math2D.Constants;
namespace Xui.Core.Canvas.Composition
{
/// A platform-independent retained composition element with identity, placement and children.
///
///
/// Applications declare composition through ICompositionContext.Group and GpuSurface. A retained
/// context reconciles those declarations by key into nodes. A platform presenter maps each node
/// to suitable resources: native views or layers, compositor visuals, GPU surfaces, or drawing
/// replayed into a parent. A node does not require a native view or an intermediate bitmap.
/// Content can remain unchanged while its placement and presentation are updated.
///
///
/// Immediate and export contexts can implement the same declarations without constructing this
/// tree. SVG currently emits groups directly. iOS presents the retained tree using UIKit views,
/// effect views and MTKView GPU surfaces. Android presents backed graphics groups through Java
/// views and hardware display lists, with Vulkan presentation for GPU leaves. Windows currently draws groups immediately. Native visuals or offscreen GPU textures are possible
/// backend strategies, not capabilities guaranteed by this base class. GPU surface support and
/// the need for a portable fallback are reported by ICompositionContext.GpuSurface.
///
///
/// This is a rendering/composition model, not the Xui UI view tree. It does not supply layout,
/// input routing, focus or accessibility semantics merely because a backend uses native views.
/// Derived nodes own their content, children and any platform resources, released by overriding
/// DisposeCore. The base provides presentation properties and an idempotent disposal entry point.
///
///
public abstract partial class Node
{
/// Stack-only enumerator over a node's visible children.
public ref struct Enumerator
{
/// The current child. Valid only after MoveNext returns true.
public readonly Node Current { get; }
/// Advances to the next visible child in presentation order.
public bool MoveNext();
}
}
/// A platform-independent retained composition element with identity, placement and children.
///
///
/// Applications declare composition through ICompositionContext.Group and GpuSurface. A retained
/// context reconciles those declarations by key into nodes. A platform presenter maps each node
/// to suitable resources: native views or layers, compositor visuals, GPU surfaces, or drawing
/// replayed into a parent. A node does not require a native view or an intermediate bitmap.
/// Content can remain unchanged while its placement and presentation are updated.
///
///
/// Immediate and export contexts can implement the same declarations without constructing this
/// tree. SVG currently emits groups directly. iOS presents the retained tree using UIKit views,
/// effect views and MTKView GPU surfaces. Android presents backed graphics groups through Java
/// views and hardware display lists, with Vulkan presentation for GPU leaves. Windows currently draws groups immediately. Native visuals or offscreen GPU textures are possible
/// backend strategies, not capabilities guaranteed by this base class. GPU surface support and
/// the need for a portable fallback are reported by ICompositionContext.GpuSurface.
///
///
/// This is a rendering/composition model, not the Xui UI view tree. It does not supply layout,
/// input routing, focus or accessibility semantics merely because a backend uses native views.
/// Derived nodes own their content, children and any platform resources, released by overriding
/// DisposeCore. The base provides presentation properties and an idempotent disposal entry point.
///
///
public abstract partial class Node
{
/// Number of visible children in back-to-front order. Leaf nodes return zero.
public virtual int Count { get; }
/// Returns the visible child at the given index.
public virtual Node this[int index] { get; }
/// Enumerates visible children without allocating or boxing an enumerator.
/// Do not mutate the hierarchy during enumeration.
public Enumerator GetEnumerator();
}
}
namespace Xui.Core.Canvas.Composition
{
using Xui.Core.Canvas.Composition.Graphics;
using Xui.Core.Math2D;
/// A platform-independent retained composition element with identity, placement and children.
///
///
/// Applications declare composition through ICompositionContext.Group and GpuSurface. A retained
/// context reconciles those declarations by key into nodes. A platform presenter maps each node
/// to suitable resources: native views or layers, compositor visuals, GPU surfaces, or drawing
/// replayed into a parent. A node does not require a native view or an intermediate bitmap.
/// Content can remain unchanged while its placement and presentation are updated.
///
///
/// Immediate and export contexts can implement the same declarations without constructing this
/// tree. SVG currently emits groups directly. iOS presents the retained tree using UIKit views,
/// effect views and MTKView GPU surfaces. Android presents backed graphics groups through Java
/// views and hardware display lists, with Vulkan presentation for GPU leaves. Windows currently draws groups immediately. Native visuals or offscreen GPU textures are possible
/// backend strategies, not capabilities guaranteed by this base class. GPU surface support and
/// the need for a portable fallback are reported by ICompositionContext.GpuSurface.
///
///
/// This is a rendering/composition model, not the Xui UI view tree. It does not supply layout,
/// input routing, focus or accessibility semantics merely because a backend uses native views.
/// Derived nodes own their content, children and any platform resources, released by overriding
/// DisposeCore. The base provides presentation properties and an idempotent disposal entry point.
///
///
public abstract partial class Node : IDisposable
{
/// Stable sibling identity, effects, clipping and content-update declarations.
public GroupOptions Options { get; }
/// Resolved content bounds used for drawing or native surface placement.
public Rect RasterBounds { get; }
/// Resolved transform relative to the parent presentation surface.
public AffineTransform Placement { get; }
/// Device scale used to present the content.
public nfloat Scale { get; }
/// Whether this frame requested fresh content for this node.
public bool Updating { get; }
/// Releases the node's owned resources once, including derived content and children.
public void Dispose();
/// Overrides release their owned content, children and platform resources, then call base.
protected virtual void DisposeCore();
}
}