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.

Window.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. typedef struct {
  11. char *text;
  12. unsigned int x;
  13. unsigned int y;
  14. float scale;
  15. unsigned char color[3];
  16. } WindowString;
  17. /*!
  18. * \brief Windowing interface
  19. */
  20. class Window {
  21. public:
  22. /*!
  23. * \brief Deconstructs an object of Window
  24. */
  25. virtual ~Window();
  26. virtual void setDriver(const char *driver) = 0;
  27. virtual void setSize(unsigned int width, unsigned int height) = 0;
  28. virtual void setFullscreen(bool fullscreen) = 0;
  29. virtual void setMousegrab(bool grab) = 0;
  30. virtual int initialize() = 0;
  31. virtual void eventHandling() = 0;
  32. virtual void delay(clock_t ms) = 0;
  33. virtual void swapBuffersGL() = 0;
  34. virtual void resizeGL(unsigned int w, unsigned int h);
  35. virtual void glEnter2D(unsigned int width, unsigned int height);
  36. virtual void glExit2D();
  37. virtual void setFont(const char *font) = 0;
  38. virtual int initializeFont() = 0;
  39. virtual void writeString(WindowString *s) = 0;
  40. };
  41. #endif