1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsITaskbarPreview.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,71 @@ 1.4 +/* vim: se cin sw=2 ts=2 et : */ 1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.6 + * 1.7 + * This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#include "nsISupports.idl" 1.12 +#include "nsIBaseWindow.idl" 1.13 + 1.14 +interface nsITaskbarPreviewController; 1.15 + 1.16 +/** 1.17 + * nsITaskbarPreview 1.18 + * 1.19 + * Common interface for both window and tab taskbar previews. This interface 1.20 + * cannot be instantiated directly. 1.21 + * 1.22 + */ 1.23 +[scriptable, uuid(CBFDF766-D002-403B-A3D9-B091C9AD465B)] 1.24 +interface nsITaskbarPreview : nsISupports 1.25 +{ 1.26 + /** 1.27 + * The controller for this preview. A controller is required to provide 1.28 + * the behavior and appearance of the taskbar previews. It is responsible for 1.29 + * determining the size and contents of the preview, which buttons are 1.30 + * displayed and how the application responds to user actions on the preview. 1.31 + * 1.32 + * Neither preview makes full use of the controller. See the documentation 1.33 + * for nsITaskbarWindowPreview and nsITaskbarTabPreview for details on which 1.34 + * controller methods are used. 1.35 + * 1.36 + * The controller is not allowed to be null. 1.37 + * 1.38 + * @see nsITaskbarPreviewController 1.39 + */ 1.40 + attribute nsITaskbarPreviewController controller; 1.41 + 1.42 + /** 1.43 + * The tooltip displayed above the preview when the user hovers over it 1.44 + * 1.45 + * Default: an empty string 1.46 + */ 1.47 + attribute DOMString tooltip; 1.48 + 1.49 + /** 1.50 + * Whether or not the preview is visible. 1.51 + * 1.52 + * Changing this option is expensive for tab previews since toggling this 1.53 + * option will destroy/create the proxy window and its registration with the 1.54 + * taskbar. If any step of that fails, an exception will be thrown. 1.55 + * 1.56 + * For window previews, this operation is very cheap. 1.57 + * 1.58 + * Default: false 1.59 + */ 1.60 + attribute boolean visible; 1.61 + 1.62 + /** 1.63 + * Gets/sets whether or not the preview is marked active (selected) in the 1.64 + * taskbar. 1.65 + */ 1.66 + attribute boolean active; 1.67 + 1.68 + /** 1.69 + * Invalidates the taskbar's cached image of this preview, forcing a redraw 1.70 + * if necessary 1.71 + */ 1.72 + void invalidate(); 1.73 +}; 1.74 +