#ifndef DEF_INPUT
#define DEF_INPUT

///Jovian
///Adaptation pour CMake

// Include
#include <SDL.h>


class Input
{
    public:

    Input();
    ~Input();

    virtual void updateEvents();
    bool isFinished() const;
    void showCursor(bool reponse) const;
    void capPtr(bool reponse);

    bool getKey(const SDL_Scancode key) const;
    bool getMouseKey(const Uint8 key) const;
    bool isMouseMoving() const;

    int getX() const;
    int getY() const;

    int getXRel() const;
    int getYRel() const;

    void setWindow(SDL_Window* activWindow);

    int getMouseRelX() const;
    int getMouseRelY() const;


    protected:

    SDL_Event m_events;
    bool m_keys[SDL_NUM_SCANCODES];
    bool m_mouseKeys[8];

    int m_x;
    int m_y;
    int m_xRel;
    int m_yRel;

    bool m_finished;
    bool m_relativeMouse;

    SDL_Window* m_window;
    int m_windowHalfHeight;
    int m_windowHalfWidth;
};

#endif