#include "main.h"

/*

Actual Program

**********************/

using namespace std;

void draw(){renderManager.draw();}
void idle(){renderManager.update();}
void reDrawScreen(int w, int h){renderManager.reDrawScreen(w, h);}

void mouseButton(int button,int state,int x, int y){Input::pressedMouse(button,state,x,y);}
void dragMotion(int x, int y){Input::dragMouse(x,y);}
void mouseMotion(int x, int y){Input::moveMouse(x,y);}

void normalKey(unsigned char key, int x, int y){Input::normalKeyDown(key,x,y);}
void specialKey(int key, int x, int y){Input::specialKeyDown(key,x,y);}
void keyUp(unsigned char key,int x,int y){Input::keyUp(key,x,y);}
void specialKeyUp (int key,int x, int y){Input::specialKeyUp(key,x,y);}



int main(int argc, char** argv)
{
    renderManager.initWindow(1024,768,"Inkscan Data Viewer");


    //window stuff
    glutDisplayFunc(draw);
	glutIdleFunc(idle);
	glutReshapeFunc(reDrawScreen);

    //Mouse
  	glutMouseFunc(mouseButton);
	glutPassiveMotionFunc(mouseMotion);
	glutMotionFunc(dragMotion);

    //Keyboard
	glutKeyboardFunc(normalKey);
	glutSpecialFunc(specialKey);
    glutKeyboardUpFunc(keyUp);
    glutSpecialUpFunc(specialKeyUp);

    //run program
    renderManager.setup();

    delete(&renderManager);

    return 0;
}

// load the named file and dump its structure to STDOUT

