using System;
namespace Avalonia.Input.Raw
{
///
/// A raw input event.
///
///
/// Raw input events are sent from the windowing subsystem to the
/// for processing: this gives an application the opportunity to pre-process the event. After
/// pre-processing they are consumed by the relevant and turned into
/// standard Avalonia events.
///
public class RawInputEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// The associated device.
/// The event timestamp.
/// The root from which the event originates.
public RawInputEventArgs(IInputDevice device, ulong timestamp, IInputRoot root)
{
Device = device ?? throw new ArgumentNullException(nameof(device));
Timestamp = timestamp;
Root = root ?? throw new ArgumentNullException(nameof(root));
}
///
/// Gets the associated device.
///
public IInputDevice Device { get; }
///
/// Gets the root from which the event originates.
///
public IInputRoot Root { get; }
///
/// Gets or sets a value indicating whether the event was handled.
///
///
/// If an event is not marked handled after processing via the
/// , then it will be passed on to the underlying OS for
/// handling.
///
public bool Handled { get; set; }
///
/// Gets the timestamp associated with the event.
///
public ulong Timestamp { get; set; }
}
}