////REVIEW: could have a monitor path where if there's multiple state monitors on the same control with //// the same listener, the monitor is notified only once but made aware of the multiple triggers namespace UnityEngine.InputSystem.LowLevel { /// /// Interface used to monitor input state changes. /// /// /// Use to install a state change monitor receiving state change /// callbacks for a specific control. /// /// public interface IInputStateChangeMonitor { ////REVIEW: For v2, consider changing the signature of this to put the "was consumed" signal *outside* the eventPtr /// /// Called when the state monitored by a state change monitor has been modified. /// /// Control that is being monitored by the state change monitor and that had its state /// memory changed. /// Time on the timeline at which the control state change was received. /// If the state change was initiated by a state event (either a /// or ), this is the pointer to that event. Otherwise it is pointer that is still /// , but refers a "dummy" event that is not a or . /// Index of the monitor as passed to . /// /// /// To signal that the state change has been processed by the monitor and that no other pending notifications on the /// same monitor instance should be sent, set the flag to true on . /// Note, however, that aside from only silencing change monitors on the same instance, /// it also only silences change monitors with the same groupIndex value as supplied to /// . /// void NotifyControlStateChanged(InputControl control, double time, InputEventPtr eventPtr, long monitorIndex); /// /// Called when a timeout set on a state change monitor has expired. /// /// Control on which the timeout expired. /// Input time at which the timer expired. This is the time at which an is being /// run whose is past the time of expiration. /// Index of the monitor as given to . /// Index of the timer as given to . /// void NotifyTimerExpired(InputControl control, double time, long monitorIndex, int timerIndex); } }