main.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_WA5SERVICE_MAIN_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_WA5SERVICE_MAIN_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #define OMBROWSER_VERSION_MAJOR 1
  7. #define OMBROWSER_VERSION_MINOR 5
  8. #define OMBROWSER_NAME L"omBrowser"
  9. #include "./common.h"
  10. /* string managment */
  11. LPWSTR Plugin_MallocString(size_t cchLen);
  12. LPWSTR Plugin_ReAllocString(LPWSTR pszString, size_t cchLen);
  13. void Plugin_FreeString(LPWSTR pszString);
  14. LPWSTR Plugin_CopyString(LPCWSTR pszSource);
  15. LPSTR Plugin_MallocAnsiString(size_t cchLen);
  16. LPSTR Plugin_CopyAnsiString(LPCSTR pszSource);
  17. void Plugin_FreeAnsiString(LPSTR pszString);
  18. LPWSTR Plugin_DuplicateResString(LPCWSTR pszResource);
  19. void Plugin_FreeResString(LPWSTR pszResource);
  20. HRESULT Plugin_CopyResString(LPWSTR pszBuffer, INT cchBufferMax, LPCWSTR pszString);
  21. LPSTR Plugin_WideCharToMultiByte(UINT codePage, DWORD dwFlags, LPCWSTR lpWideCharStr, INT cchWideChar, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar);
  22. LPWSTR Plugin_MultiByteToWideChar(UINT codePage, DWORD dwFlags, LPCSTR lpMultiByteStr, INT cbMultiByte);
  23. HRESULT Plugin_FormatUuidString(UUID &uid, LPWSTR pszBuffer, size_t cchBufferMax);
  24. HINSTANCE Plugin_GetInstance(void);
  25. HINSTANCE Plugin_GetLangInstance(void);
  26. HRESULT Plugin_Initialize(HWND hwndWinamp);
  27. class ifc_wasabihelper;
  28. HRESULT Plugin_GetWasabiHelper(ifc_wasabihelper **wasabiHelper);
  29. class ifc_skinhelper;
  30. HRESULT Plugin_GetSkinHelper(ifc_skinhelper **skinHelper);
  31. class ifc_skinnedbrowser;
  32. HRESULT Plugin_GetBrowserSkin(ifc_skinnedbrowser **skinnedBrowser);
  33. HRESULT Plugin_GetWinampWnd(HWND *hwndWinamp);
  34. class ifc_winamphook;
  35. HRESULT Plugin_RegisterWinampHook(ifc_winamphook *hook, UINT *cookieOut);
  36. HRESULT Plugin_UnregisterWinampHook(UINT cookie);
  37. const wchar_t* Plugin_LoadString(UINT id, wchar_t *buffer, int bufferMax);
  38. const char* Plugin_LoadStringAnsi(UINT id, char *buffer, int bufferMax);
  39. HWND Plugin_CreateDialogParam(const wchar_t *templateName, HWND parent, DLGPROC proc, LPARAM param);
  40. INT_PTR Plugin_DialogBoxParam(const wchar_t *templateName, HWND parent, DLGPROC proc, LPARAM param);
  41. HMENU Plugin_LoadMenu(const wchar_t *menuName);
  42. void *Plugin_LoadResource(const wchar_t *resourceType, const wchar_t *resourceName, unsigned long *size);
  43. HACCEL Plugin_LoadAccelerators(const wchar_t *tableName);
  44. class ifc_omimageloader;
  45. HRESULT Plugin_QueryImageLoader(HINSTANCE hInstance, LPCWSTR pszName, BOOL fPremultiply, ifc_omimageloader **imageLoader);
  46. size_t Plugin_TlsAlloc(void);
  47. BOOL Plugin_TlsFree(size_t index);
  48. void *Plugin_TlsGetValue(size_t index);
  49. BOOL Plugin_TlsSetValue(size_t index, void* value);
  50. typedef void (CALLBACK *PLUGINUNLOADCALLBACK)(void);
  51. void Plugin_RegisterUnloadCallback(PLUGINUNLOADCALLBACK callback);
  52. class ifc_ombrowserclass;
  53. HRESULT Plugin_GetBrowserClass(LPCWSTR pszName, ifc_ombrowserclass **instance);
  54. HRESULT Plugin_UnregisterBrowserClass(LPCWSTR pszName); // internal call
  55. HRESULT Plugin_EnsurePathExist(LPCWSTR pszDirectory);
  56. #define RESPATH_TARGETIE 0x0001 // IE safe path
  57. #define RESPATH_COMPACT 0x0002 // compact path relative to winamp location if possible
  58. HRESULT Plugin_MakeResourcePath(LPWSTR pszBuffer, UINT cchBufferMax, HINSTANCE hInstance, LPCWSTR pszType, LPCWSTR pszName, UINT uFlags);
  59. class ifc_omservicehost;
  60. HRESULT Plugin_ResolveRelativePath(LPCWSTR pszPath, ifc_omservicehost *host, LPWSTR pszBuffer, UINT cchBufferMax);
  61. BOOL Plugin_IsDirectMouseWheelMessage(const UINT uMsg);
  62. #endif //NULLSOFT_WINAMP_OMBROWSER_WA5SERVICE_MAIN_HEADER