PVRShellOS.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /******************************************************************************
  2. @File PVRShellOS.h
  3. @Title Qt/PVRShellOS
  4. @Version
  5. @Copyright Copyright (C) Imagination Technologies Limited.
  6. @Platform Qt
  7. @Description Makes programming for 3D APIs easier by wrapping surface
  8. initialization, Texture allocation and other functions for use by a demo.
  9. ******************************************************************************/
  10. #ifndef _PVRSHELLOS_
  11. #define _PVRSHELLOS_
  12. /****************************************************************************
  13. ** INCLUDES **
  14. ****************************************************************************/
  15. #include <QMainWindow>
  16. #include <QTimer>
  17. #include <QTime>
  18. /****************************************************************************
  19. ** DEFINES **
  20. ****************************************************************************/
  21. #define PVRSHELL_DIR_SYM '/'
  22. #define _stricmp strcasecmp
  23. #define _strnicmp strncasecmp
  24. /*!***************************************************************************
  25. PVRShellInitOS
  26. @Brief Class. Interface with specific Operative System.
  27. *****************************************************************************/
  28. class PVRShell;
  29. class PVRShellInit;
  30. class PVRShellMainWindow : public QMainWindow
  31. {
  32. Q_OBJECT
  33. public:
  34. PVRShellMainWindow(PVRShellInit *pInit);
  35. virtual void keyPressEvent(QKeyEvent* keyEvent);
  36. virtual void mousePressEvent(QMouseEvent *mouseEvent);
  37. virtual void mouseReleaseEvent(QMouseEvent *mouseEvent);
  38. virtual void mouseMoveEvent(QMouseEvent *mouseEvent);
  39. virtual QSize sizeHint();
  40. bool IsTouched();
  41. float* GetTouchPosition();
  42. protected:
  43. PVRShellInit *m_pInit;
  44. bool m_bTouch;
  45. float m_fVec2PointerLocation[2];
  46. };
  47. class PVRShellTimer : public QTimer
  48. {
  49. Q_OBJECT
  50. public:
  51. PVRShellTimer(QObject *parent = 0);
  52. virtual ~PVRShellTimer();
  53. bool Init(int argc, char **argv);
  54. void DeInit();
  55. private slots:
  56. void Run();
  57. protected:
  58. PVRShellInit *m_pInit;
  59. };
  60. class PVRShellInitOS
  61. {
  62. public:
  63. PVRShellMainWindow *m_pWindow;
  64. QTime m_Time;
  65. };
  66. #endif /* _PVRSHELLOS_ */
  67. /*****************************************************************************
  68. End of file (PVRShellOS.h)
  69. *****************************************************************************/