nsresult TaskbarPreview::Disable() { WindowHook &hook = GetWindowHook(); (void) hook.RemoveMonitor(nsAppShell::GetTaskbarButtonCreatedMessage(), MainWindowHook, this); return NS_OK; }
void TaskbarTabPreview::DetachFromNSWindow() { (void) SetVisible(PR_FALSE); WindowHook &hook = GetWindowHook(); hook.RemoveMonitor(WM_WINDOWPOSCHANGED, MainWindowHook, this); TaskbarPreview::DetachFromNSWindow(); }
void TaskbarPreview::DetachFromNSWindow(PRBool windowIsAlive) { if (windowIsAlive) { WindowHook &hook = GetWindowHook(); hook.RemoveMonitor(WM_DESTROY, MainWindowHook, this); } mWnd = NULL; }
nsresult TaskbarPreview::Enable() { nsresult rv = NS_OK; if (CanMakeTaskbarCalls()) { rv = UpdateTaskbarProperties(); } else { WindowHook &hook = GetWindowHook(); hook.AddMonitor(nsAppShell::GetTaskbarButtonCreatedMessage(), MainWindowHook, this); } return rv; }
void TaskbarWindowPreview::DetachFromNSWindow() { // Remove the hooks we have for drawing SetEnableCustomDrawing(false); WindowHook &hook = GetWindowHook(); (void) hook.RemoveHook(WM_COMMAND, WindowHookProc, this); (void) hook.RemoveMonitor(nsAppShell::GetTaskbarButtonCreatedMessage(), TaskbarWindowHook, this); TaskbarPreview::DetachFromNSWindow(); }
TaskbarPreview::TaskbarPreview(ITaskbarList4 *aTaskbar, nsITaskbarPreviewController *aController, HWND aHWND, nsIDocShell *aShell) : mTaskbar(aTaskbar), mController(aController), mWnd(aHWND), mVisible(PR_FALSE), mDocShell(do_GetWeakReference(aShell)) { // TaskbarPreview may outlive the WinTaskbar that created it ::CoInitialize(NULL); WindowHook &hook = GetWindowHook(); hook.AddMonitor(WM_DESTROY, MainWindowHook, this); }
void TaskbarPreview::DetachFromNSWindow() { WindowHook &hook = GetWindowHook(); hook.RemoveMonitor(WM_DESTROY, MainWindowHook, this); mWnd = NULL; }