Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*!
  2. * \file include/Window.h
  3. * \brief Windowing interface
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_H_
  8. #define _WINDOW_H_
  9. #include <ctime>
  10. /*!
  11. * \brief Windowing interface
  12. */
  13. class Window {
  14. public:
  15. /*!
  16. * \brief Deconstructs an object of Window
  17. */
  18. virtual ~Window();
  19. virtual void setSize(unsigned int width, unsigned int height) = 0;
  20. virtual void setFullscreen(bool fullscreen) = 0;
  21. virtual void setMousegrab(bool grab) = 0;
  22. virtual int initialize() = 0;
  23. virtual void eventHandling() = 0;
  24. virtual void setTextInput(bool on) = 0;
  25. virtual void delay(clock_t ms) = 0;
  26. virtual void swapBuffersGL() = 0;
  27. virtual void setDriver(const char *driver);
  28. virtual unsigned int getWidth();
  29. virtual unsigned int getHeight();
  30. virtual int initializeGL();
  31. virtual void resizeGL();
  32. virtual void glEnter2D();
  33. virtual void glExit2D();
  34. protected:
  35. bool mInit;
  36. char *mDriver;
  37. bool mFullscreen;
  38. bool mMousegrab;
  39. unsigned int mWidth;
  40. unsigned int mHeight;
  41. };
  42. Window &getWindow();
  43. #endif