Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsIDOMXULElement.idl" |
michael@0 | 7 | interface nsIDOMXULContainerElement; |
michael@0 | 8 | |
michael@0 | 9 | [scriptable, uuid(800a68c7-b854-4597-a436-3055ce5c5c96)] |
michael@0 | 10 | interface nsIDOMXULContainerItemElement : nsISupports |
michael@0 | 11 | { |
michael@0 | 12 | /** |
michael@0 | 13 | * Returns the parent container if any. |
michael@0 | 14 | */ |
michael@0 | 15 | readonly attribute nsIDOMXULContainerElement parentContainer; |
michael@0 | 16 | }; |
michael@0 | 17 | |
michael@0 | 18 | [scriptable, uuid(b2bc96b8-31fc-42f4-937a-bd27291af40b)] |
michael@0 | 19 | interface nsIDOMXULContainerElement : nsIDOMXULContainerItemElement |
michael@0 | 20 | { |
michael@0 | 21 | /** |
michael@0 | 22 | * Creates an item for the given label and value and appends it to the |
michael@0 | 23 | * container. |
michael@0 | 24 | * |
michael@0 | 25 | * @param aLabel - the label for the new item |
michael@0 | 26 | * @param aValue - the value of the new item |
michael@0 | 27 | */ |
michael@0 | 28 | nsIDOMXULElement appendItem(in DOMString aLabel, in DOMString aValue); |
michael@0 | 29 | |
michael@0 | 30 | /** |
michael@0 | 31 | * Creates an item for the given label and value and inserts it into the |
michael@0 | 32 | * container at the specified position. |
michael@0 | 33 | * |
michael@0 | 34 | * @param aIndex - the index where the new item will be inserted |
michael@0 | 35 | * @param aLabel - the label for the new item |
michael@0 | 36 | * @param aValue - the value of the new item |
michael@0 | 37 | */ |
michael@0 | 38 | nsIDOMXULElement insertItemAt(in long aIndex, in DOMString aLabel, |
michael@0 | 39 | in DOMString aValue); |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * Removes an item from the container. |
michael@0 | 43 | * |
michael@0 | 44 | * @param aIndex - index of the item to remove |
michael@0 | 45 | */ |
michael@0 | 46 | nsIDOMXULElement removeItemAt(in long aIndex); |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * Returns a count of items in the container. |
michael@0 | 50 | */ |
michael@0 | 51 | readonly attribute unsigned long itemCount; |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * Returns the index of an item or -1 if the item is not in the container. |
michael@0 | 55 | * |
michael@0 | 56 | * @param aItem - the item to determine the index of |
michael@0 | 57 | */ |
michael@0 | 58 | long getIndexOfItem(in nsIDOMXULElement aItem); |
michael@0 | 59 | |
michael@0 | 60 | /** |
michael@0 | 61 | * Returns the item at a given index or null if the item is not is the |
michael@0 | 62 | * container. |
michael@0 | 63 | * |
michael@0 | 64 | * @param aIndex - the index of the item to return |
michael@0 | 65 | */ |
michael@0 | 66 | nsIDOMXULElement getItemAtIndex(in long aIndex); |
michael@0 | 67 | }; |
michael@0 | 68 |