michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIBaseWindow.idl" michael@0: michael@0: typedef long nsTaskbarProgressState; michael@0: michael@0: /** michael@0: * Starting in Windows 7, applications can display a progress notification in michael@0: * the taskbar. This class wraps around the native functionality to do this. michael@0: */ michael@0: [scriptable, uuid(23ac257d-ef3c-4033-b424-be7fef91a86c)] michael@0: interface nsITaskbarProgress : nsISupports michael@0: { michael@0: /** michael@0: * Stop displaying progress on the taskbar button. This should be used when michael@0: * the operation is complete or cancelled. michael@0: */ michael@0: const nsTaskbarProgressState STATE_NO_PROGRESS = 0; michael@0: michael@0: /** michael@0: * Display a cycling, indeterminate progress bar. michael@0: */ michael@0: const nsTaskbarProgressState STATE_INDETERMINATE = 1; michael@0: michael@0: /** michael@0: * Display a determinate, normal progress bar. michael@0: */ michael@0: const nsTaskbarProgressState STATE_NORMAL = 2; michael@0: michael@0: /** michael@0: * Display a determinate, error progress bar. michael@0: */ michael@0: const nsTaskbarProgressState STATE_ERROR = 3; michael@0: michael@0: /** michael@0: * Display a determinate progress bar indicating that the operation has michael@0: * paused. michael@0: */ michael@0: const nsTaskbarProgressState STATE_PAUSED = 4; michael@0: michael@0: /** michael@0: * Sets the taskbar progress state and value for this window. The currentValue michael@0: * and maxValue parameters are optional and should be supplied when |state| michael@0: * is one of STATE_NORMAL, STATE_ERROR or STATE_PAUSED. michael@0: * michael@0: * @throws NS_ERROR_INVALID_ARG if state is STATE_NO_PROGRESS or michael@0: * STATE_INDETERMINATE, and either currentValue or maxValue is not 0. michael@0: * @throws NS_ERROR_ILLEGAL_VALUE if currentValue is greater than maxValue. michael@0: */ michael@0: void setProgressState(in nsTaskbarProgressState state, michael@0: [optional] in unsigned long long currentValue, michael@0: [optional] in unsigned long long maxValue); michael@0: };