/*********************************************************************
*                                                                    *          
*                              FLY                                   *
*                           --E#Y#E--				     *
*                         ===MUSCLE===                               *
*                                                                    *
*********************************************************************/
#ifndef WIN_H_
#define WIN_H_

/* C++ Header Files */
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <limits>
/* X11 */
#include <X11/keysym.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
/* OpenGL */
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glu.h>
#include <GL/glext.h>
#include <GL/glxext.h>
/* Flysimulator */
#include "../WIN/fps.h"
#include "../CONF/config.h"
#include "../OGL/move.h"
#include "../OGL/opengl.h"

//---------------------------------------------------------------------------

/* Standard */
using namespace std;

using std::vector;
using std::string;
using std::ifstream;
using std::map;

//---------------------------------------------------------------------------

/* Function */
int ctxErrorHandler(Display *display, XErrorEvent *ev);

/* Class Wind */
class WIND
{
public:
	/* Function */
	void desc_fbconfig(GLXFBConfig fbconfig);
	void createWin(int width, int height, int bpp, bool wide);
	void createRender(int width, int height, int bpp, bool wide);
	void perspective(int width, int height);
	void eventloop(void);
	void loadFont();
	void closeWin();
};

//---------------------------------------------------------------------------

#endif

