IButtonAssigner.cs
1 namespace Ryujinx.Input.Assigner 2 { 3 /// <summary> 4 /// An interface that allows to gather the driver input info to assign to a button on the UI. 5 /// </summary> 6 public interface IButtonAssigner 7 { 8 /// <summary> 9 /// Initialize the button assigner. 10 /// </summary> 11 void Initialize(); 12 13 /// <summary> 14 /// Read input. 15 /// </summary> 16 void ReadInput(); 17 18 /// <summary> 19 /// Check if a button was pressed. 20 /// </summary> 21 /// <returns>True if a button was pressed</returns> 22 bool IsAnyButtonPressed(); 23 24 /// <summary> 25 /// Indicate if the user of this API should cancel operations. This is triggered for example when a gamepad get disconnected or when a user cancel assignation operations. 26 /// </summary> 27 /// <returns>True if the user of this API should cancel operations</returns> 28 bool ShouldCancel(); 29 30 /// <summary> 31 /// Get the pressed button that was read in <see cref="ReadInput"/> by the button assigner. 32 /// </summary> 33 /// <returns>The pressed button that was read</returns> 34 Button? GetPressedButton(); 35 } 36 }