widget/nsITaskbarProgress.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 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8 #include "nsIBaseWindow.idl"
michael@0 9
michael@0 10 typedef long nsTaskbarProgressState;
michael@0 11
michael@0 12 /**
michael@0 13 * Starting in Windows 7, applications can display a progress notification in
michael@0 14 * the taskbar. This class wraps around the native functionality to do this.
michael@0 15 */
michael@0 16 [scriptable, uuid(23ac257d-ef3c-4033-b424-be7fef91a86c)]
michael@0 17 interface nsITaskbarProgress : nsISupports
michael@0 18 {
michael@0 19 /**
michael@0 20 * Stop displaying progress on the taskbar button. This should be used when
michael@0 21 * the operation is complete or cancelled.
michael@0 22 */
michael@0 23 const nsTaskbarProgressState STATE_NO_PROGRESS = 0;
michael@0 24
michael@0 25 /**
michael@0 26 * Display a cycling, indeterminate progress bar.
michael@0 27 */
michael@0 28 const nsTaskbarProgressState STATE_INDETERMINATE = 1;
michael@0 29
michael@0 30 /**
michael@0 31 * Display a determinate, normal progress bar.
michael@0 32 */
michael@0 33 const nsTaskbarProgressState STATE_NORMAL = 2;
michael@0 34
michael@0 35 /**
michael@0 36 * Display a determinate, error progress bar.
michael@0 37 */
michael@0 38 const nsTaskbarProgressState STATE_ERROR = 3;
michael@0 39
michael@0 40 /**
michael@0 41 * Display a determinate progress bar indicating that the operation has
michael@0 42 * paused.
michael@0 43 */
michael@0 44 const nsTaskbarProgressState STATE_PAUSED = 4;
michael@0 45
michael@0 46 /**
michael@0 47 * Sets the taskbar progress state and value for this window. The currentValue
michael@0 48 * and maxValue parameters are optional and should be supplied when |state|
michael@0 49 * is one of STATE_NORMAL, STATE_ERROR or STATE_PAUSED.
michael@0 50 *
michael@0 51 * @throws NS_ERROR_INVALID_ARG if state is STATE_NO_PROGRESS or
michael@0 52 * STATE_INDETERMINATE, and either currentValue or maxValue is not 0.
michael@0 53 * @throws NS_ERROR_ILLEGAL_VALUE if currentValue is greater than maxValue.
michael@0 54 */
michael@0 55 void setProgressState(in nsTaskbarProgressState state,
michael@0 56 [optional] in unsigned long long currentValue,
michael@0 57 [optional] in unsigned long long maxValue);
michael@0 58 };

mercurial