view dwt/internal/mozilla/nsISupportsArray.d @ 341:942da4b6558a

Ongoing fixup for compile
author John Reimer <terminal.node@gmail.com>
date Sun, 26 Oct 2008 21:19:51 -0700
parents dd63eb078d7a
children 9a4d7706df52
line wrap: on
line source

module dwt.internal.mozilla.nsISupportsArray;

import dwt.internal.mozilla.Common;
import dwt.internal.mozilla.nsID;
import dwt.internal.mozilla.nsISupports;

import dwt.internal.mozilla.nsICollection;

typedef PRBool function(nsISupports, void*) nsISupportsArrayEnumFunc;

const char[] NS_ISUPPORTSARRAY_IID_STR = "791eafa0-b9e6-11d1-8031-006008159b5a";

const nsIID NS_ISUPPORTSARRAY_IID= 
  {0x791eafa0, 0xb9e6, 0x11d1, 
    [ 0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a ]};

//extern(System)

interface nsISupportsArray : nsICollection {

  static const char[] IID_STR = NS_ISUPPORTSARRAY_IID_STR;
  static const nsIID IID = NS_ISUPPORTSARRAY_IID;

  PRBool Equals(nsISupportsArray other);
  nsISupports  ElementAt(PRUint32 aIndex);
  PRInt32 IndexOf(nsISupports aPossibleElement);
  PRInt32 IndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex);
  PRInt32 LastIndexOf(nsISupports aPossibleElement);
  nsresult GetIndexOf(nsISupports aPossibleElement, PRInt32 *_retval);
  nsresult GetIndexOfStartingAt(nsISupports aPossibleElement, PRUint32 aStartIndex, PRInt32 *_retval);
  nsresult GetLastIndexOf(nsISupports aPossibleElement, PRInt32 *_retval);
  PRBool InsertElementAt(nsISupports aElement, PRUint32 aIndex);
  PRBool ReplaceElementAt(nsISupports aElement, PRUint32 aIndex);
  PRBool RemoveElementAt(PRUint32 aIndex);
  PRBool RemoveLastElement(nsISupports aElement);
  nsresult DeleteLastElement(nsISupports aElement);
  nsresult DeleteElementAt(PRUint32 aIndex);
  PRBool AppendElements(nsISupportsArray aElements);
  nsresult Compact();
  PRBool EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void * aData);
  PRBool EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void * aData);
  nsresult Clone(nsISupportsArray *_retval);
  PRBool MoveElement(PRInt32 aFrom, PRInt32 aTo);
  PRBool InsertElementsAt(nsISupportsArray aOther, PRUint32 aIndex);
  PRBool RemoveElementsAt(PRUint32 aIndex, PRUint32 aCount);
  PRBool SizeTo(PRInt32 aSize);

}