diff dwt/internal/mozilla/nsISupportsArray.d @ 125:5583f8eeee6c

Synced mozilla with dwt-linux
author Jacob Carlborg <doob@me.com>
date Fri, 16 Jan 2009 12:49:08 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsISupportsArray.d	Fri Jan 16 12:49:08 2009 +0100
@@ -0,0 +1,48 @@
+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 ]};
+
+interface nsISupportsArray : nsICollection {
+
+  static const char[] IID_STR = NS_ISUPPORTSARRAY_IID_STR;
+  static const nsIID IID = NS_ISUPPORTSARRAY_IID;
+
+extern(System):
+  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);
+
+}
+