1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- /*!
- * \file include/Window.h
- * \brief Windowing interface
- *
- * \author xythobuz
- */
-
- #ifndef _WINDOW_H_
- #define _WINDOW_H_
-
- #include <ctime>
-
- #include "global.h"
-
- /*!
- * \brief Windowing interface
- */
- class Window {
- public:
-
- /*!
- * \brief Deconstructs an object of Window
- */
- virtual ~Window();
-
- virtual void setDriver(const char *driver) = 0;
-
- virtual void setSize(unsigned int width, unsigned int height) = 0;
-
- virtual void setFullscreen(bool fullscreen) = 0;
-
- virtual void setMousegrab(bool grab) = 0;
-
- virtual int initialize() = 0;
-
- virtual void eventHandling() = 0;
-
- virtual void setTextInput(bool on) = 0;
-
- virtual void delay(clock_t ms) = 0;
-
- virtual void swapBuffersGL() = 0;
-
- virtual int initializeGL();
-
- virtual void resizeGL();
-
- virtual void glEnter2D();
-
- virtual void glExit2D();
-
- virtual void setFont(const char *font) = 0;
-
- virtual int initializeFont() = 0;
-
- virtual void writeString(WindowString *s) = 0;
-
- virtual void drawText(unsigned int x, unsigned int y, float scale, unsigned char *color, const char *s, ...)
- __attribute__((format(printf, 6, 0))) = 0;
-
- unsigned int mWidth;
- unsigned int mHeight;
-
- protected:
- bool mInit;
- char *mDriver;
- bool mFullscreen;
- bool mMousegrab;
-
- bool mFontInit;
- char *mFontName;
- };
-
- #endif
|