nsITaskbarPreview.idl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* vim: se cin sw=2 ts=2 et : */
  2. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  3. *
  4. * This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  7. #include "nsISupports.idl"
  8. #include "nsIBaseWindow.idl"
  9. interface nsITaskbarPreviewController;
  10. /**
  11. * nsITaskbarPreview
  12. *
  13. * Common interface for both window and tab taskbar previews. This interface
  14. * cannot be instantiated directly.
  15. *
  16. */
  17. [scriptable, uuid(CBFDF766-D002-403B-A3D9-B091C9AD465B)]
  18. interface nsITaskbarPreview : nsISupports
  19. {
  20. /**
  21. * The controller for this preview. A controller is required to provide
  22. * the behavior and appearance of the taskbar previews. It is responsible for
  23. * determining the size and contents of the preview, which buttons are
  24. * displayed and how the application responds to user actions on the preview.
  25. *
  26. * Neither preview makes full use of the controller. See the documentation
  27. * for nsITaskbarWindowPreview and nsITaskbarTabPreview for details on which
  28. * controller methods are used.
  29. *
  30. * The controller is not allowed to be null.
  31. *
  32. * @see nsITaskbarPreviewController
  33. */
  34. attribute nsITaskbarPreviewController controller;
  35. /**
  36. * The tooltip displayed above the preview when the user hovers over it
  37. *
  38. * Default: an empty string
  39. */
  40. attribute DOMString tooltip;
  41. /**
  42. * Whether or not the preview is visible.
  43. *
  44. * Changing this option is expensive for tab previews since toggling this
  45. * option will destroy/create the proxy window and its registration with the
  46. * taskbar. If any step of that fails, an exception will be thrown.
  47. *
  48. * For window previews, this operation is very cheap.
  49. *
  50. * Default: false
  51. */
  52. attribute boolean visible;
  53. /**
  54. * Gets/sets whether or not the preview is marked active (selected) in the
  55. * taskbar.
  56. */
  57. attribute boolean active;
  58. /**
  59. * Invalidates the taskbar's cached image of this preview, forcing a redraw
  60. * if necessary
  61. */
  62. void invalidate();
  63. };