summaryrefslogtreecommitdiff
path: root/plugins/W7UI/srmmproxywindow.h
blob: f1c447d4e8c504b18d5c3a3db5ce8b25a969aa0d (plain)
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
#ifndef srmmproxywindow_h__
#define srmmproxywindow_h__

class CSrmmProxyWindow: public CDwmWindow
{
public:
	CSrmmProxyWindow(HANDLE hContact, HWND hwndWindow, HWND hwndParent);
	~CSrmmProxyWindow();

	void OnTabActive();
	void OnTabInactive();

private:
	HANDLE m_hContact;
	HWND m_hwndWindow, m_hwndParent;
	HBITMAP m_hbmpPreview;
	bool m_refreshPreview;
	bool m_bActive, m_bUnread, m_bTyping;

	void Refresh();

	int __cdecl OnDbEventAdded(WPARAM wParam, LPARAM lParam);
	int __cdecl OnDbSettingChanged(WPARAM wParam, LPARAM lParam);
	int __cdecl OnAvatarChanged(WPARAM wParam, LPARAM lParam);
	int __cdecl OnContactTyping(WPARAM wParam, LPARAM lParam);

	HANDLE SetEventHook(char *evt, int (__cdecl CSrmmProxyWindow::*fn)(WPARAM, LPARAM));

	void UpdateIcon();

	bool IsActive();

protected:
	void OnActivate(HWND hwndFrom);
	void OnToolbar(int id, INT_PTR data);
	void OnRenderThumbnail(int width, int height);
	void OnRenderPreview();
	void OnTimer(int);
	void OnClose();
};

#endif // srmmproxywindow_h__