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