nsresult
TaskbarPreview::Disable() {
  WindowHook &hook = GetWindowHook();
  (void) hook.RemoveMonitor(nsAppShell::GetTaskbarButtonCreatedMessage(), MainWindowHook, this);

  return NS_OK;
}
Exemplo n.º 2
0
void
TaskbarTabPreview::DetachFromNSWindow() {
  (void) SetVisible(PR_FALSE);
  WindowHook &hook = GetWindowHook();
  hook.RemoveMonitor(WM_WINDOWPOSCHANGED, MainWindowHook, this);

  TaskbarPreview::DetachFromNSWindow();
}
Exemplo n.º 3
0
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;
}
Exemplo n.º 5
0
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();
}
Exemplo n.º 6
0
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;
}