BsWin32Platform.h 850 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "BsPlatform.h"
  3. #include "BsWin32Defs.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Contains the main message loop
  8. *
  9. * @note This is separated from the main Platform because we don't want to include various Windows
  10. * defines in a lot of our code that includes "Platform.h".
  11. */
  12. class BS_CORE_EXPORT Win32Platform : public Platform
  13. {
  14. public:
  15. /**
  16. * @brief Creates a new bitmap usable by various Win32 methods from the provided pixel data.
  17. * Caller must ensure to call ::DeleteObject on the bitmap handle when finished.
  18. */
  19. static HBITMAP createBitmap(const PixelDataPtr& pixelData, bool premultiplyAlpha);
  20. /**
  21. * @brief Main message loop callback that processes messages received from windows.
  22. */
  23. static LRESULT CALLBACK _win32WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  24. };
  25. }