xpcom/ds/nsISupportsArray.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/ds/nsISupportsArray.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +
    1.10 +#include "nsICollection.idl"
    1.11 +
    1.12 +/*
    1.13 + * This entire interface is deprecated and should not be used.
    1.14 + * See nsIArray and nsIMutableArray for the new implementations.
    1.15 + *
    1.16 + * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3D779491.3050506%40netscape.com&rnum=2
    1.17 + * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=al8412%245ab2%40ripley.netscape.com&rnum=8
    1.18 + */
    1.19 +
    1.20 +%{C++
    1.21 +
    1.22 +class nsIBidirectionalEnumerator;
    1.23 +class nsISupportsArray;
    1.24 + 
    1.25 +#define NS_SUPPORTSARRAY_CID                         \
    1.26 +{ /* bda17d50-0d6b-11d3-9331-00104ba0fd40 */         \
    1.27 +    0xbda17d50,                                      \
    1.28 +    0x0d6b,                                          \
    1.29 +    0x11d3,                                          \
    1.30 +    {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
    1.31 +}
    1.32 +#define NS_SUPPORTSARRAY_CONTRACTID "@mozilla.org/supports-array;1"
    1.33 + 
    1.34 +%}
    1.35 +
    1.36 +[scriptable, uuid(241addc8-3608-4e73-8083-2fd6fa09eba2)]
    1.37 +interface nsISupportsArray : nsICollection {
    1.38 +
    1.39 +  [notxpcom] boolean Equals([const] in nsISupportsArray other);
    1.40 +  
    1.41 +  [notxpcom] long IndexOf([const] in nsISupports aPossibleElement);
    1.42 +  [notxpcom] long IndexOfStartingAt([const] in nsISupports aPossibleElement,
    1.43 +                                    in unsigned long aStartIndex);
    1.44 +  [notxpcom] long LastIndexOf([const] in nsISupports aPossibleElement);
    1.45 +  
    1.46 +  // xpcom-compatible versions
    1.47 +  long GetIndexOf(in nsISupports aPossibleElement);
    1.48 +  long GetIndexOfStartingAt(in nsISupports aPossibleElement,
    1.49 +                            in unsigned long aStartIndex);
    1.50 +  long GetLastIndexOf(in nsISupports aPossibleElement);  
    1.51 +  
    1.52 +  [notxpcom] boolean InsertElementAt(in nsISupports aElement,
    1.53 +                                     in unsigned long aIndex);
    1.54 +  [notxpcom] boolean ReplaceElementAt(in nsISupports aElement,
    1.55 +                                      in unsigned long aIndex);
    1.56 +
    1.57 +  [notxpcom] boolean RemoveElementAt(in unsigned long aIndex);
    1.58 +  [notxpcom] boolean RemoveLastElement([const] in nsISupports aElement);
    1.59 +  
    1.60 +  // xpcom-compatible versions
    1.61 +  void DeleteLastElement(in nsISupports aElement);
    1.62 +  void DeleteElementAt(in unsigned long aIndex);
    1.63 +  
    1.64 +  [notxpcom] boolean AppendElements(in nsISupportsArray aElements);
    1.65 +  
    1.66 +  void Compact();
    1.67 +  
    1.68 +
    1.69 +  nsISupportsArray clone();
    1.70 +
    1.71 +  [notxpcom] boolean MoveElement(in long aFrom,
    1.72 +                                 in long aTo);
    1.73 +
    1.74 +  [notxpcom] boolean InsertElementsAt(in nsISupportsArray aOther,
    1.75 +                                      in unsigned long aIndex);
    1.76 +
    1.77 +  [notxpcom] boolean RemoveElementsAt(in unsigned long aIndex,
    1.78 +                                      in unsigned long aCount);
    1.79 +
    1.80 +  [notxpcom] boolean SizeTo(in long aSize);
    1.81 +  
    1.82 +};
    1.83 +
    1.84 +%{C++
    1.85 +
    1.86 +// Construct and return a default implementation of nsISupportsArray:
    1.87 +extern nsresult
    1.88 +NS_NewISupportsArray(nsISupportsArray** aInstancePtrResult);
    1.89 +
    1.90 +%}

mercurial