WebClient.h 854 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include <Atomic/Core/Object.h>
  2. #include "WebRenderHandler.h"
  3. #pragma once
  4. class CefClient;
  5. namespace Atomic
  6. {
  7. class WebClientPrivate;
  8. class ATOMIC_API WebClient : public Object
  9. {
  10. friend class WebBrowserHost;
  11. friend class WebClientPrivate;
  12. OBJECT(WebClient)
  13. public:
  14. /// Construct.
  15. WebClient(Context* context);
  16. /// Destruct.
  17. virtual ~WebClient();
  18. // call once initialized with handlers
  19. bool CreateBrowser();
  20. void SetWebRenderHandler(WebRenderHandler* handler);
  21. CefClient* GetCefClient();
  22. void WasResized();
  23. void SendMouseClickEvent(int x, int y, unsigned button, bool mouseUp, unsigned modifier) const;
  24. void SendMouseMoveEvent(int x, int y, unsigned modifier, bool mouseLeave = false) const;
  25. private:
  26. SharedPtr<WebRenderHandler> renderHandler_;
  27. WebClientPrivate* d_;
  28. };
  29. }