ifc_ombrowsereventmngr.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_EVENTMANAGER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_EVENTMANAGER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/dispatch.h>
  7. // {EF73F304-7730-4e80-B938-A80B5C971CC5}
  8. static const GUID IFC_OmBrowserEventManager =
  9. { 0xef73f304, 0x7730, 0x4e80, { 0xb9, 0x38, 0xa8, 0xb, 0x5c, 0x97, 0x1c, 0xc5 } };
  10. class obj_ombrowser;
  11. class ifc_ombrowserevent;
  12. class __declspec(novtable) ifc_ombrowsereventmngr : public Dispatchable
  13. {
  14. protected:
  15. ifc_ombrowsereventmngr() {}
  16. ~ifc_ombrowsereventmngr() {}
  17. public:
  18. HRESULT RegisterHandler(ifc_ombrowserevent *handler);
  19. HRESULT UnregisterHandler(ifc_ombrowserevent *handler);
  20. HRESULT Signal_WindowCreate(HWND hwnd, const GUID *windowType);
  21. HRESULT Signal_WindowClose(HWND hwnd, const GUID *windowType);
  22. public:
  23. DISPATCH_CODES
  24. {
  25. API_REGISTERHANDLER = 10,
  26. API_UNREGISTERHANDLER = 20,
  27. API_SIGNAL_WINDOWCREATE = 30,
  28. API_SIGNAL_WINDOWCLOSE = 40,
  29. };
  30. };
  31. inline HRESULT ifc_ombrowsereventmngr::RegisterHandler(ifc_ombrowserevent *handler)
  32. {
  33. return _call(API_REGISTERHANDLER, (HRESULT)E_NOTIMPL, handler);
  34. }
  35. inline HRESULT ifc_ombrowsereventmngr::UnregisterHandler(ifc_ombrowserevent *handler)
  36. {
  37. return _call(API_UNREGISTERHANDLER, (HRESULT)E_NOTIMPL, handler);
  38. }
  39. inline HRESULT ifc_ombrowsereventmngr::Signal_WindowCreate(HWND hwnd, const GUID *windowType)
  40. {
  41. return _call(API_SIGNAL_WINDOWCREATE, (HRESULT)E_NOTIMPL, hwnd, windowType);
  42. }
  43. inline HRESULT ifc_ombrowsereventmngr::Signal_WindowClose(HWND hwnd, const GUID *windowType)
  44. {
  45. return _call(API_SIGNAL_WINDOWCLOSE, (HRESULT)E_NOTIMPL, hwnd, windowType);
  46. }
  47. #endif //NULLSOFT_WINAMP_OMBROWSER_EVENTMANAGER_INTERFACE_HEADER