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

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

mercurial