#ifndef __WFX_INPUT_JOYSTICKEVENT_H__
#define __WFX_INPUT_JOYSTICKEVENT_H__

#include <WFX/WFXIncludes.h>

namespace WFX {

    namespace input {
    
        /**
         * JoystickEvent class
         * contains information about the event
         */
        class JoystickEvent {
            public:
                /** Joystick Index */
                UChar Index;

                /** 
                 * Ctor 
                 * @param: id - Joystick index
                 */
                JoystickEvent (UChar id) {
                    Index = id;
                }
                
                 
            protected:

            private:
        };

        /**
         * JoystickButtonEvent
         * Describes a Joybutton press
         */
        class JoystickButtonEvent : public JoystickEvent {
            public:
                /** 
                 */
                enum BtnState {
                    BS_PRESSED,
                    BS_RELEASED
                };

                /** State - Up or Down */
                BtnState State;

                /** Button Index */
                UChar Button;

                
                /**
                 * Ctor
                 * @see JoystickEvent::JoystickEvent(Int id)
                 * @param: btn - Button index
                 * @param: s - Current state of the button
                 */
                JoystickButtonEvent(UChar id, UChar btn, BtnState s);
        };

        /**
         * JoystickAxisEvent
         * Describes a Joystick Axis event
         */
        class JoystickAxisEvent : public JoystickEvent {
            public:
                /** Axis Index */
                UChar Axis;

                /** 
                 * Value 
                 * Value in [-1..1]
                 */
                Real Value;
                
                /**
                 * Ctor
                 * @see JoystickEvent::JoystickEvent(Int id)
                 * @param: a - axis index
                 * @param: val - Value
                 */
                JoystickAxisEvent(UChar id, UChar a, Int val);
        };

        

        
    }

}



#endif
