1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsITaskbarProgress.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 +#include "nsIBaseWindow.idl" 1.12 + 1.13 +typedef long nsTaskbarProgressState; 1.14 + 1.15 +/** 1.16 + * Starting in Windows 7, applications can display a progress notification in 1.17 + * the taskbar. This class wraps around the native functionality to do this. 1.18 + */ 1.19 +[scriptable, uuid(23ac257d-ef3c-4033-b424-be7fef91a86c)] 1.20 +interface nsITaskbarProgress : nsISupports 1.21 +{ 1.22 + /** 1.23 + * Stop displaying progress on the taskbar button. This should be used when 1.24 + * the operation is complete or cancelled. 1.25 + */ 1.26 + const nsTaskbarProgressState STATE_NO_PROGRESS = 0; 1.27 + 1.28 + /** 1.29 + * Display a cycling, indeterminate progress bar. 1.30 + */ 1.31 + const nsTaskbarProgressState STATE_INDETERMINATE = 1; 1.32 + 1.33 + /** 1.34 + * Display a determinate, normal progress bar. 1.35 + */ 1.36 + const nsTaskbarProgressState STATE_NORMAL = 2; 1.37 + 1.38 + /** 1.39 + * Display a determinate, error progress bar. 1.40 + */ 1.41 + const nsTaskbarProgressState STATE_ERROR = 3; 1.42 + 1.43 + /** 1.44 + * Display a determinate progress bar indicating that the operation has 1.45 + * paused. 1.46 + */ 1.47 + const nsTaskbarProgressState STATE_PAUSED = 4; 1.48 + 1.49 + /** 1.50 + * Sets the taskbar progress state and value for this window. The currentValue 1.51 + * and maxValue parameters are optional and should be supplied when |state| 1.52 + * is one of STATE_NORMAL, STATE_ERROR or STATE_PAUSED. 1.53 + * 1.54 + * @throws NS_ERROR_INVALID_ARG if state is STATE_NO_PROGRESS or 1.55 + * STATE_INDETERMINATE, and either currentValue or maxValue is not 0. 1.56 + * @throws NS_ERROR_ILLEGAL_VALUE if currentValue is greater than maxValue. 1.57 + */ 1.58 + void setProgressState(in nsTaskbarProgressState state, 1.59 + [optional] in unsigned long long currentValue, 1.60 + [optional] in unsigned long long maxValue); 1.61 +};