using System;
using Chernobyl.Input.Controls.Axis;
using Chernobyl.Mathematics.Mechanics;
namespace Chernobyl.Input.Controls
{
///
/// An interface for handling game controller devices.
///
public interface IGamepad : IControl
{
///
/// The first button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl A { get; }
///
/// The second button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl B { get; }
///
/// The third button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl C { get; }
///
/// The fourth button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl D { get; }
///
/// The first left shoulder button on the or
/// null if it does not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl LeftShoulder1 { get; }
///
/// The first right button on the or null if it
/// does not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl RightShoulder1 { get; }
///
/// The left thumb stick on the or null if it
/// does not exist.
///
/// Thrown if this
/// has been disconnected.
IThumbstick LeftStick { get; }
///
/// The right thumb stick on the or null if it
/// does not exist.
///
IThumbstick RightStick { get; }
///
/// The select button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl Select { get; }
///
/// The start button on the or null if it does
/// not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl Start { get; }
///
/// The main or central button on the or null if
/// it does not exist.
///
/// Thrown if this
/// has been disconnected.
IButtonControl Main { get; }
///
/// The primary directional pad on the or null if
/// it does not exist.
///
/// Thrown if this
/// has been disconnected.
IDpad Dpad { get; }
///
/// The left trigger on the or null if it does
/// not exist. The left trigger has a maximum value of 1 and a minimum
/// value of 0.
///
/// Thrown if this
/// has been disconnected.
IAxisControl LeftTrigger { get; }
///
/// The left trigger on the or null if it does
/// not exist. The left trigger has a maximum value of 1 and a minimum
/// value of 0.
///
/// Thrown if this
/// has been disconnected.
IAxisControl RightTrigger { get; }
///
/// The amount of vibration, between 0 and 1, in the left motor. 0 means
/// no vibration, 1 means maximum vibration.
///
/// Thrown when the value
/// set on this property is less than 0 or greater than 1.
/// Thrown if this
/// has been disconnected.
float LeftVibration { get; set; }
///
/// The amount of vibration, between 0 and 1, in the right motor. 0 means
/// no vibration, 1 means maximum vibration.
///
/// Thrown when the value
/// set on this property is less than 0 or greater than 1.
/// Thrown if this
/// has been disconnected.
float RightVibration { get; set; }
}
///
/// An interface for working with analog sticks on a gamepad or other device.
/// Analog sticks give a two dimensional position of a protrusion relative
/// to a default center position. The value
/// will be (0, 0) when the is centered. The
/// maximum for the X and Y axes of the are 1.
/// The minimum for both axes is -1. This interface also gives indication of
/// the up or down button state of the analog stick.
///
public interface IThumbstick : IAxis2DControl, IButtonControl
{}
///
/// An interface for working with flat four button control usually found
/// on gamepads. D-pad is short for directional pad.
///
public interface IDpad : IControl
{
///
/// The top button on the or null if it does not
/// exist.
///
IButtonControl Up { get; }
///
/// The right button on the or null if it does not
/// exist.
///
IButtonControl Right { get; }
///
/// The bottom button on the or null if it does not
/// exist.
///
IButtonControl Down { get; }
///
/// The left button on the or null if it does not
/// exist.
///
IButtonControl Left { get; }
}
}