Back to index

lightning-sunbird  0.9+nobinonly
nsrootidl.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Dan Rosen <dr@netscape.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either of the GNU General Public License Version 2 or later (the "GPL"),
00027  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00044 %{C++
00045 
00046 #include "nscore.h"
00047 #include "prtime.h"
00048 
00049 /*
00050  * Forward declarations for new string types
00051  */
00052 class nsAString;
00053 class nsACString;
00054 
00055 /* 
00056  * Start commenting out the C++ versions of the below in the output header
00057  */
00058 #if 0
00059 %}
00060 
00061 typedef boolean             PRBool   ;
00062 typedef octet               PRUint8  ;
00063 typedef unsigned short      PRUint16 ;
00064 typedef unsigned short      PRUnichar;
00065 typedef unsigned long       PRUint32 ;
00066 typedef unsigned long long  PRUint64 ;
00067 typedef unsigned long long  PRTime   ;
00068 typedef short               PRInt16  ;
00069 typedef long                PRInt32  ;
00070 typedef long long           PRInt64  ;
00071 
00072 typedef unsigned long       nsrefcnt ;
00073 typedef unsigned long       nsresult ;
00074 
00075 // XXX need this built into xpidl compiler so that it's really size_t or PRSize
00076 // and it's scriptable:
00077 typedef unsigned long       size_t;
00078 
00079 [ptr]         native voidPtr(void);
00080 [ptr]         native charPtr(char);
00081 [ptr]         native unicharPtr(PRUnichar);
00082 
00083 [ref, nsid]   native nsIDRef(nsID);
00084 [ref, nsid]   native nsIIDRef(nsIID);
00085 [ref, nsid]   native nsCIDRef(nsCID);
00086 
00087 [ptr, nsid]   native nsIDPtr(nsID);
00088 [ptr, nsid]   native nsIIDPtr(nsIID);
00089 [ptr, nsid]   native nsCIDPtr(nsCID);
00090 
00091 // NOTE: Be careful in using the following 3 types. The *Ref and *Ptr variants 
00092 // are more commonly used (and better supported). Those variants require 
00093 // nsMemory alloc'd copies when used as 'out' params while these types do not. 
00094 // However, currently these types can not be used for 'in' params. And, methods 
00095 // that use them as 'out' params *must* be declared [notxpcom] (with an explicit 
00096 // return type of nsresult). This makes such methods implicitly not scriptable.
00097 // Use of these types in methods without a [notxpcom] declaration will cause
00098 // the xpidl compiler to raise an error.
00099 // See: http://bugzilla.mozilla.org/show_bug.cgi?id=93792
00100 
00101 [nsid]        native nsIID(nsIID);
00102 [nsid]        native nsID(nsID);
00103 [nsid]        native nsCID(nsCID);
00104 
00105 [ptr]         native nsQIResult(void);
00106 
00107 [ref, domstring] native DOMString(ignored);
00108 [ref, domstring] native DOMStringRef(ignored);
00109 [ptr, domstring] native DOMStringPtr(ignored);
00110 
00111 [ref, utf8string] native AUTF8String(ignored);
00112 [ref, utf8string] native AUTF8StringRef(ignored);
00113 [ptr, utf8string] native AUTF8StringPtr(ignored);
00114 
00115 [ref, cstring] native ACString(ignored);
00116 [ref, cstring] native ACStringRef(ignored);
00117 [ptr, cstring] native ACStringPtr(ignored);
00118 
00119 [ref, astring] native AString(ignored);
00120 [ref, astring] native AStringRef(ignored);
00121 [ptr, astring] native AStringPtr(ignored);
00122 
00123 %{C++
00124 /* 
00125  * End commenting out the C++ versions of the above in the output header
00126  */
00127 #endif
00128 %}