1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsITaskbarWindowPreview.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 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 "nsITaskbarPreview.idl" 1.12 +interface nsITaskbarPreviewButton; 1.13 + 1.14 +/* 1.15 + * nsITaskbarWindowPreview 1.16 + * 1.17 + * This interface represents the preview for a window in the taskbar. By 1.18 + * default, Windows implements much of the behavior for applications by 1.19 + * default. The primary purpose of this interface is to allow Gecko 1.20 + * applications to take control over parts of the preview. Some parts are not 1.21 + * controlled through this interface: the title and icon of the preview match 1.22 + * the title and icon of the window always. 1.23 + * 1.24 + * By default, Windows takes care of drawing the thumbnail and preview for the 1.25 + * application however if enableCustomDrawing is set to true, then the 1.26 + * controller will start to receive drawPreview and drawThumbnail calls as well 1.27 + * as reads on the thumbnailAspectRatio, width and height properties. 1.28 + * 1.29 + * By default, nsITaskbarWindowPreviews are visible. When made invisible, the 1.30 + * window disappears from the list of windows in the taskbar for the 1.31 + * application. 1.32 + * 1.33 + * If the window has any visible nsITaskbarTabPreviews, then the 1.34 + * nsITaskbarWindowPreview for the corresponding window is automatically 1.35 + * hidden. This is not reflected in the visible property. Note that other parts 1.36 + * of the system (such as alt-tab) may still request thumbnails and/or previews 1.37 + * through the nsITaskbarWindowPreview's controller. 1.38 + * 1.39 + * nsITaskbarWindowPreview will never invoke the controller's onClose or 1.40 + * onActivate methods since handling them may conflict with other internal 1.41 + * Gecko state and there is existing infrastructure in place to allow clients 1.42 + * to handle those events 1.43 + * 1.44 + * Window previews may have a toolbar with up to 7 buttons. See 1.45 + * nsITaskbarPreviewButton for more information about button properties. 1.46 + */ 1.47 +[scriptable, uuid(EC67CC57-342D-4064-B4C6-74A375E07B10)] 1.48 +interface nsITaskbarWindowPreview : nsITaskbarPreview 1.49 +{ 1.50 + /** 1.51 + * Max 7 buttons per preview per the Windows Taskbar API 1.52 + */ 1.53 + const long NUM_TOOLBAR_BUTTONS = 7; 1.54 + 1.55 + /** 1.56 + * Gets the nth button for the preview image. By default, all of the buttons 1.57 + * are invisible. 1.58 + * 1.59 + * @see nsITaskbarPreviewButton 1.60 + * 1.61 + * @param index The index into the button array. Must be >= 0 and < 1.62 + * MAX_TOOLBAR_BUTTONS. 1.63 + */ 1.64 + nsITaskbarPreviewButton getButton(in unsigned long index); 1.65 + 1.66 + /** 1.67 + * Enables/disables custom drawing of thumbnails and previews 1.68 + * 1.69 + * Default value: false 1.70 + */ 1.71 + attribute boolean enableCustomDrawing; 1.72 +}; 1.73 +