using System;
using Avalonia.Metadata;
#nullable enable
namespace Avalonia.Interactivity
{
///
/// Interface for objects that raise routed events.
///
[NotClientImplementable]
public interface IInteractive
{
///
/// Gets the interactive parent of the object for bubbling and tunneling events.
///
IInteractive? InteractiveParent { get; }
///
/// Adds a handler for the specified routed event.
///
/// The routed event.
/// The handler.
/// The routing strategies to listen to.
/// Whether handled events should also be listened for.
/// A disposable that terminates the event subscription.
void AddHandler(
RoutedEvent routedEvent,
Delegate handler,
RoutingStrategies routes = RoutingStrategies.Direct | RoutingStrategies.Bubble,
bool handledEventsToo = false);
///
/// Removes a handler for the specified routed event.
///
/// The routed event.
/// The handler.
void RemoveHandler(RoutedEvent routedEvent, Delegate handler);
///
/// Adds the object's handlers for a routed event to an event route.
///
/// The event.
/// The event route.
void AddToEventRoute(RoutedEvent routedEvent, EventRoute route);
///
/// Raises a routed event.
///
/// The event args.
void RaiseEvent(RoutedEventArgs e);
}
}