widget/nsITaskbarWindowPreview.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

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 "nsITaskbarPreview.idl"
michael@0 9 interface nsITaskbarPreviewButton;
michael@0 10
michael@0 11 /*
michael@0 12 * nsITaskbarWindowPreview
michael@0 13 *
michael@0 14 * This interface represents the preview for a window in the taskbar. By
michael@0 15 * default, Windows implements much of the behavior for applications by
michael@0 16 * default. The primary purpose of this interface is to allow Gecko
michael@0 17 * applications to take control over parts of the preview. Some parts are not
michael@0 18 * controlled through this interface: the title and icon of the preview match
michael@0 19 * the title and icon of the window always.
michael@0 20 *
michael@0 21 * By default, Windows takes care of drawing the thumbnail and preview for the
michael@0 22 * application however if enableCustomDrawing is set to true, then the
michael@0 23 * controller will start to receive drawPreview and drawThumbnail calls as well
michael@0 24 * as reads on the thumbnailAspectRatio, width and height properties.
michael@0 25 *
michael@0 26 * By default, nsITaskbarWindowPreviews are visible. When made invisible, the
michael@0 27 * window disappears from the list of windows in the taskbar for the
michael@0 28 * application.
michael@0 29 *
michael@0 30 * If the window has any visible nsITaskbarTabPreviews, then the
michael@0 31 * nsITaskbarWindowPreview for the corresponding window is automatically
michael@0 32 * hidden. This is not reflected in the visible property. Note that other parts
michael@0 33 * of the system (such as alt-tab) may still request thumbnails and/or previews
michael@0 34 * through the nsITaskbarWindowPreview's controller.
michael@0 35 *
michael@0 36 * nsITaskbarWindowPreview will never invoke the controller's onClose or
michael@0 37 * onActivate methods since handling them may conflict with other internal
michael@0 38 * Gecko state and there is existing infrastructure in place to allow clients
michael@0 39 * to handle those events
michael@0 40 *
michael@0 41 * Window previews may have a toolbar with up to 7 buttons. See
michael@0 42 * nsITaskbarPreviewButton for more information about button properties.
michael@0 43 */
michael@0 44 [scriptable, uuid(EC67CC57-342D-4064-B4C6-74A375E07B10)]
michael@0 45 interface nsITaskbarWindowPreview : nsITaskbarPreview
michael@0 46 {
michael@0 47 /**
michael@0 48 * Max 7 buttons per preview per the Windows Taskbar API
michael@0 49 */
michael@0 50 const long NUM_TOOLBAR_BUTTONS = 7;
michael@0 51
michael@0 52 /**
michael@0 53 * Gets the nth button for the preview image. By default, all of the buttons
michael@0 54 * are invisible.
michael@0 55 *
michael@0 56 * @see nsITaskbarPreviewButton
michael@0 57 *
michael@0 58 * @param index The index into the button array. Must be >= 0 and <
michael@0 59 * MAX_TOOLBAR_BUTTONS.
michael@0 60 */
michael@0 61 nsITaskbarPreviewButton getButton(in unsigned long index);
michael@0 62
michael@0 63 /**
michael@0 64 * Enables/disables custom drawing of thumbnails and previews
michael@0 65 *
michael@0 66 * Default value: false
michael@0 67 */
michael@0 68 attribute boolean enableCustomDrawing;
michael@0 69 };
michael@0 70

mercurial