1
0

browserPopup.h 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_POPUP_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_POPUP_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./browserUiCommon.h"
  7. #define NWC_OMBROWSERPOPUP L"Nullsoft_omBrowserPopup"
  8. // {6EFB8AF7-C54F-43fb-B1DD-DF2EE7E67703}
  9. static const GUID WTID_BrowserPopup =
  10. { 0x6efb8af7, 0xc54f, 0x43fb, { 0xb1, 0xdd, 0xdf, 0x2e, 0xe7, 0xe6, 0x77, 0x3 } };
  11. // {00000010-0000-00FF-8000-C5E2FB8CD50B} // guid will be incremented for each instance
  12. static const GUID SkinClass_BrowserPopup =
  13. { 0x00000010, 0x0000, 0x00FF, { 0x80, 0x00, 0xc5, 0xe2, 0xfb, 0x8c, 0xd5, 0xb } };
  14. typedef void (CALLBACK *DISPATCHAPC)(IDispatch *pDisp, ULONG_PTR /*param*/);
  15. HWND BrowserPopup_Create(obj_ombrowser *browserManager, ifc_omservice *service, UINT fStyle, INT x, INT y, INT cx, INT cy, HWND hOwner, DISPATCHAPC callback, ULONG_PTR param);
  16. // browser common messages
  17. #define BrowserPopup_GetToolbar(/*HWND*/ __hwndPopup)\
  18. BrowserControl_GetToolbar(__hwndPopup)
  19. #define BrowserPopup_GetStatusbar(/*HWND*/ __hwndPopup)\
  20. BrowserControl_GetStatusbar(__hwndPopup)
  21. #define BrowserPopup_GetHost(/*HWND*/ __hwndPopup)\
  22. BrowserControl_GetHost(__hwndPopup)
  23. #define BrowserPopup_UpdateSkin(/*HWND*/ __hwndPopup, /*BOOL*/ __fRedraw)\
  24. BrowserControl_UpdateSkin(__hwndPopup, __fRedraw)
  25. #define BrowserPopup_GetService(/*HWND*/ __hwndPopup, /*ifc_omservice** */ __serviceOut)\
  26. BrowserControl_GetService(__hwndPopup, __serviceOut)
  27. #define BrowserPopup_Navigate(/*HWND*/ __hwndPopup, /*LPCWSTR*/ __navigateUrl, /*BOOL*/ __scheduleBlocked)\
  28. BrowserControl_Navigate(__hwndPopup, __navigateUrl, __scheduleBlocked)
  29. #define BrowserPopup_NavigateHome(/*HWND*/ __hwndPopup, /*BOOL*/ __scheduleBlocked)\
  30. BrowserPopup_Navigate((__hwndPopup), NAVIGATE_HOME, (__scheduleBlocked))
  31. #define BrowserPopup_WriteDocument(/*HWND*/ __hwndPopup, /*BSTR*/ __documentData, /*BOOL*/ __scheduleBlocked)\
  32. BrowserControl_WriteDocument(__hwndPopup, __documentData, __scheduleBlocked)
  33. #define BrowserPopup_ShowOperation(/*HWND*/ __hwndView, /*const OPERATIONINFO* */ __pOperationInfo)\
  34. BrowserControl_ShowOperation(__hwndView, __pOperationInfo)
  35. // browser popup messages
  36. #define NBPM_PARENTCHANGED (NBPM_FIRST + 1) // wParam = not used, lParam = not used
  37. #define NBPM_SKINREFRESHING (NBPM_FIRST + 2) // wParam = not used, lParam = not used. Return 0 to allow, non zero to prevent.
  38. #define BrowserPopup_SkinRefreshing(/*HWND*/ __hwndPopup)\
  39. SENDMSG((__hwndPopup), NBPM_SKINREFRESHING, 0, 0L)
  40. #define NBPM_SKINREFRESHED (NBPM_FIRST + 3) // wParam = not used, lParam = not used.
  41. #define BrowserPopup_SkinRefreshed(/*HWND*/ __hwndPopup)\
  42. SENDMSG((__hwndPopup), NBPM_SKINREFRESHED, 0, 0L)
  43. #define NBPM_SETFRAMEPOS (NBPM_FIRST + 4) // wParam = not used, lParam = (LPARAM)(WINDOWPOS*)pwp;
  44. #define BrowserPopup_SetFramePos(/*HWND*/ __hwndPopup, /*HWND*/__hwndInsertAfter, /*INT*/ __x, /*INT*/ __y, /*INT*/__cx, /*INT*/ __cy, /*UINT*/ __flags)\
  45. { WINDOWPOS wp; wp.hwndInsertAfter = (__hwndInsertAfter); wp.x = (__x); wp.y = (__y); wp.cx = (__cx); wp.cy = (__cy); wp.flags = (__flags);\
  46. SENDMSG((__hwndPopup), NBPM_SETFRAMEPOS, 0, (LPARAM)(&wp));}
  47. #define NBPM_ACTIVATEFRAME (NBPM_FIRST + 5) // wParam = not used, lParam = not used.
  48. #define BrowserPopup_ActivateFrame(/*HWND*/ __hwndPopup)\
  49. SENDMSG((__hwndPopup), NBPM_ACTIVATEFRAME, 0, 0L)
  50. #define NBPM_REFRESHTITLE (NBPM_FIRST + 6) // wParam - not used, lParam - not used, return TRUE on success
  51. #define BrowserPopup_RefreshTitle(/*HWND*/ __hwndPopup)\
  52. ((BOOL)SENDMSG((__hwndPopup), NBPM_REFRESHTITLE, 0, 0L))
  53. #endif //NULLSOFT_WINAMP_OMBROWSER_POPUP_HEADER