Source code

Revision control

Other Tools

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/. */
6
7
#include "nsISupports.idl"
8
#include "nsIBaseWindow.idl"
9
10
typedef long nsTaskbarProgressState;
11
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;
24
25
/**
26
* Display a cycling, indeterminate progress bar.
27
*/
28
const nsTaskbarProgressState STATE_INDETERMINATE = 1;
29
30
/**
31
* Display a determinate, normal progress bar.
32
*/
33
const nsTaskbarProgressState STATE_NORMAL = 2;
34
35
/**
36
* Display a determinate, error progress bar.
37
*/
38
const nsTaskbarProgressState STATE_ERROR = 3;
39
40
/**
41
* Display a determinate progress bar indicating that the operation has
42
* paused.
43
*/
44
const nsTaskbarProgressState STATE_PAUSED = 4;
45
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
};