1
0

browsercbi.h 870 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NULLSOFT_WASABI_BROWSERCBI_H
  2. #define NULLSOFT_WASABI_BROWSERCBI_H
  3. #include "syscbi.h"
  4. #include "browsercb.h"
  5. class waServiceFactory;
  6. #define SVCCALLBACK_PARENT SysCallbackI
  7. class BrowserCallbackI : public SVCCALLBACK_PARENT {
  8. protected:
  9. BrowserCallbackI() { }
  10. public:
  11. // set *override = true to prevent the URL from being opened
  12. // leave it alone otherwise (in case someone else wanted to override it)
  13. virtual void browsercb_onOpenURL(wchar_t *url, bool *override) { }
  14. private:
  15. virtual FOURCC syscb_getEventType() { return SysCallback::BROWSER; }
  16. virtual int syscb_notify(int msg, intptr_t param1, intptr_t param2) {
  17. switch (msg) {
  18. case BrowserCallback::ONOPENURL:
  19. browsercb_onOpenURL(reinterpret_cast<wchar_t*>(param1), reinterpret_cast<bool *>(param2));
  20. break;
  21. default: return 0;
  22. }
  23. return 1;
  24. }
  25. };
  26. #endif