michael@0: /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, function, uuid(4e258af8-cffb-47bc-b16d-e8241243426e)] michael@0: interface nsIDOMMozWakeLockListener : nsISupports michael@0: { michael@0: /** michael@0: * The callback will be called when a lock topic changes its lock michael@0: * state. michael@0: * michael@0: * Possible states are: michael@0: * michael@0: * - "unlocked" - nobody holds the wake lock. michael@0: * michael@0: * - "locked-foreground" - at least one window holds the wake lock, michael@0: * and it is visible. michael@0: * michael@0: * - "locked-background" - at least one window holds the wake lock, michael@0: * but all of them are hidden. michael@0: * michael@0: * @param aTopic The resource name related to the wake lock. michael@0: * @param aState The wake lock state michael@0: */ michael@0: void callback(in DOMString aTopic, in DOMString aState); michael@0: };