🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

86 lines
2.5 KiB

  1. /*
  2. Copyright (c) 2012 Advanced Micro Devices, Inc.
  3. This software is provided 'as-is', without any express or implied warranty.
  4. In no event will the authors be held liable for any damages arising from the use of this software.
  5. Permission is granted to anyone to use this software for any purpose,
  6. including commercial applications, and to alter it and redistribute it freely,
  7. subject to the following restrictions:
  8. 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  9. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  10. 3. This notice may not be removed or altered from any source distribution.
  11. */
  12. //Originally written by Erwin Coumans
  13. #ifndef _WIN32_WINDOW_H
  14. #define _WIN32_WINDOW_H
  15. struct InternalData2;
  16. #include "CommonWindowInterface.h"
  17. class Win32Window : public CommonWindowInterface
  18. {
  19. protected:
  20. struct InternalData2* m_data;
  21. void pumpMessage();
  22. public:
  23. Win32Window();
  24. virtual ~Win32Window();
  25. virtual void createWindow(const b3gWindowConstructionInfo& ci);
  26. virtual void switchFullScreen(bool fullscreen,int width=0,int height=0,int colorBitsPerPixel=0);
  27. virtual void closeWindow();
  28. virtual void runMainLoop();
  29. virtual void startRendering();
  30. virtual void renderAllObjects();
  31. virtual void endRendering();
  32. virtual float getTimeInSeconds();
  33. virtual void setDebugMessage(int x,int y,const char* message);
  34. virtual bool requestedExit() const;
  35. virtual void setRequestExit();
  36. virtual void getMouseCoordinates(int& x, int& y);
  37. virtual void setMouseMoveCallback(b3MouseMoveCallback mouseCallback);
  38. virtual void setMouseButtonCallback(b3MouseButtonCallback mouseCallback);
  39. virtual void setResizeCallback(b3ResizeCallback resizeCallback);
  40. virtual void setWheelCallback(b3WheelCallback wheelCallback);
  41. virtual void setKeyboardCallback( b3KeyboardCallback keyboardCallback);
  42. virtual b3MouseMoveCallback getMouseMoveCallback();
  43. virtual b3MouseButtonCallback getMouseButtonCallback();
  44. virtual b3ResizeCallback getResizeCallback();
  45. virtual b3WheelCallback getWheelCallback();
  46. virtual b3KeyboardCallback getKeyboardCallback();
  47. virtual void setRenderCallback( b3RenderCallback renderCallback);
  48. virtual void setWindowTitle(const char* title);
  49. virtual bool isModifierKeyPressed(int key);
  50. };
  51. #endif //_WIN32_WINDOW_H