widget/nsITaskbarPreview.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     8 #include "nsISupports.idl"
     9 #include "nsIBaseWindow.idl"
    11 interface nsITaskbarPreviewController;
    13 /**
    14  * nsITaskbarPreview
    15  *
    16  * Common interface for both window and tab taskbar previews. This interface
    17  * cannot be instantiated directly.
    18  *
    19  */
    20 [scriptable, uuid(CBFDF766-D002-403B-A3D9-B091C9AD465B)]
    21 interface nsITaskbarPreview : nsISupports
    22 {
    23   /**
    24    * The controller for this preview. A controller is required to provide
    25    * the behavior and appearance of the taskbar previews. It is responsible for
    26    * determining the size and contents of the preview, which buttons are
    27    * displayed and how the application responds to user actions on the preview.
    28    *
    29    * Neither preview makes full use of the controller. See the documentation
    30    * for nsITaskbarWindowPreview and nsITaskbarTabPreview for details on which
    31    * controller methods are used.
    32    *
    33    * The controller is not allowed to be null.
    34    *
    35    * @see nsITaskbarPreviewController
    36    */
    37   attribute nsITaskbarPreviewController controller;
    39   /**
    40    * The tooltip displayed above the preview when the user hovers over it
    41    *
    42    * Default: an empty string
    43    */
    44   attribute DOMString tooltip;
    46   /**
    47    * Whether or not the preview is visible.
    48    *
    49    * Changing this option is expensive for tab previews since toggling this
    50    * option will destroy/create the proxy window and its registration with the
    51    * taskbar. If any step of that fails, an exception will be thrown.
    52    *
    53    * For window previews, this operation is very cheap.
    54    *
    55    * Default: false
    56    */
    57   attribute boolean visible;
    59   /**
    60    * Gets/sets whether or not the preview is marked active (selected) in the
    61    * taskbar.
    62    */
    63   attribute boolean active;
    65   /**
    66    * Invalidates the taskbar's cached image of this preview, forcing a redraw
    67    * if necessary
    68    */
    69   void invalidate();
    70 };

mercurial