blob: e7512f501f1a841dc133af6ea2e54f637ca446eb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#ifndef NULLSOFT_WINAMP_OMBROWSER_COMPONENT_HEADER
#define NULLSOFT_WINAMP_OMBROWSER_COMPONENT_HEADER
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#include <wtypes.h>
#include "../Agave/Component/ifc_wa5component.h"
#include "./ifc_winamphook.h"
#include <bfc/multipatch.h>
#include <vector>
class WasabiHelper;
class WinampHook;
class SkinHelper;
class ifc_wasabihelper;
class ifc_skinhelper;
class ifc_ombrowserclass;
class InternetFeatures;
#define MPIID_WA5COMPONENT 10
#define MPIID_WINAMPHOOK 20
class OmBrowserComponent : public MultiPatch<MPIID_WA5COMPONENT, ifc_wa5component>,
public MultiPatch<MPIID_WINAMPHOOK, ifc_winamphook>
{
public:
OmBrowserComponent();
~OmBrowserComponent();
public:
/* Dispatchable */
size_t AddRef();
size_t Release();
int QueryInterface(GUID interface_guid, void **object);
/* ifc_wa5component */
void RegisterServices(api_service *service);
int RegisterServicesSafeModeOk();
void DeregisterServices(api_service *service);
/* ifc_winamphook (partial) */
HRESULT ResetFont(void);
HRESULT SkinChanged(const wchar_t *skinName);
HRESULT SkinColorChange(const wchar_t *colorTheme);
public:
HRESULT InitializeComponent(HWND hwndWinamp);
HRESULT GetWasabiHelper(ifc_wasabihelper **wasabiOut);
HRESULT GetSkinHelper(ifc_skinhelper **skinOut);
HRESULT RegisterWinampHook(ifc_winamphook *hook, UINT *cookieOut);
HRESULT UnregisterWinampHook(UINT cookie);
HRESULT GetWinampWnd(HWND *hwndWinamp);
HRESULT RegisterUnloadCallback(PLUGINUNLOADCALLBACK callback);
HRESULT GetBrowserClass(LPCWSTR pszName, ifc_ombrowserclass **instance);
HRESULT UnregisterBrowserClass(LPCWSTR pszName);
protected:
void ReleaseServices(void);
void UpdateColors(void);
void SetInternetFeautures(void);
BOOL SetUserAgent(void);
protected:
RECVS_MULTIPATCH;
private:
typedef std::vector<PLUGINUNLOADCALLBACK> UnloadCallbackList;
typedef std::vector<ifc_ombrowserclass*> BrowserClassList;
private:
WasabiHelper *wasabiHelper;
WinampHook *winampHook;
SkinHelper *skinHelper;
UINT hookCookie;
CRITICAL_SECTION lock;
UnloadCallbackList unloadCallbacks;
BrowserClassList browserClasses;
InternetFeatures *internetFeatures;
};
#endif //NULLSOFT_WINAMP_OMBROWSER_COMPONENT_HEADER
|