michael@0: /* vim: se cin sw=2 ts=2 et : */ michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsITaskbarPreview.idl" michael@0: interface nsITaskbarPreviewButton; michael@0: michael@0: /* michael@0: * nsITaskbarWindowPreview michael@0: * michael@0: * This interface represents the preview for a window in the taskbar. By michael@0: * default, Windows implements much of the behavior for applications by michael@0: * default. The primary purpose of this interface is to allow Gecko michael@0: * applications to take control over parts of the preview. Some parts are not michael@0: * controlled through this interface: the title and icon of the preview match michael@0: * the title and icon of the window always. michael@0: * michael@0: * By default, Windows takes care of drawing the thumbnail and preview for the michael@0: * application however if enableCustomDrawing is set to true, then the michael@0: * controller will start to receive drawPreview and drawThumbnail calls as well michael@0: * as reads on the thumbnailAspectRatio, width and height properties. michael@0: * michael@0: * By default, nsITaskbarWindowPreviews are visible. When made invisible, the michael@0: * window disappears from the list of windows in the taskbar for the michael@0: * application. michael@0: * michael@0: * If the window has any visible nsITaskbarTabPreviews, then the michael@0: * nsITaskbarWindowPreview for the corresponding window is automatically michael@0: * hidden. This is not reflected in the visible property. Note that other parts michael@0: * of the system (such as alt-tab) may still request thumbnails and/or previews michael@0: * through the nsITaskbarWindowPreview's controller. michael@0: * michael@0: * nsITaskbarWindowPreview will never invoke the controller's onClose or michael@0: * onActivate methods since handling them may conflict with other internal michael@0: * Gecko state and there is existing infrastructure in place to allow clients michael@0: * to handle those events michael@0: * michael@0: * Window previews may have a toolbar with up to 7 buttons. See michael@0: * nsITaskbarPreviewButton for more information about button properties. michael@0: */ michael@0: [scriptable, uuid(EC67CC57-342D-4064-B4C6-74A375E07B10)] michael@0: interface nsITaskbarWindowPreview : nsITaskbarPreview michael@0: { michael@0: /** michael@0: * Max 7 buttons per preview per the Windows Taskbar API michael@0: */ michael@0: const long NUM_TOOLBAR_BUTTONS = 7; michael@0: michael@0: /** michael@0: * Gets the nth button for the preview image. By default, all of the buttons michael@0: * are invisible. michael@0: * michael@0: * @see nsITaskbarPreviewButton michael@0: * michael@0: * @param index The index into the button array. Must be >= 0 and < michael@0: * MAX_TOOLBAR_BUTTONS. michael@0: */ michael@0: nsITaskbarPreviewButton getButton(in unsigned long index); michael@0: michael@0: /** michael@0: * Enables/disables custom drawing of thumbnails and previews michael@0: * michael@0: * Default value: false michael@0: */ michael@0: attribute boolean enableCustomDrawing; michael@0: }; michael@0: