Bug 1690340 - Part 4: Insert the "Page Source" before the "Extensions for Developers...
[gecko.git] / xpcom / base / nsrootidl.idl
blob217c7f0ca5bf8b12ad40cb53d455a95ba5d9dad0
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7 * Root idl declarations to be used by all.
8 */
10 %{C++
12 #include "nscore.h"
13 typedef int64_t PRTime;
16 * Forward declarations for new string types
18 #include "nsStringFwd.h"
20 struct JSContext;
23 * Forward declaration of mozilla::dom::Promise
25 namespace mozilla {
26 namespace dom {
27 class Promise;
28 } // namespace dom
29 } // namespace mozilla
32 * Start commenting out the C++ versions of the below in the output header
34 #if 0
37 typedef boolean bool ;
38 typedef octet uint8_t ;
39 typedef unsigned short uint16_t ;
40 typedef unsigned short char16_t;
41 typedef unsigned long uint32_t ;
42 typedef unsigned long long uint64_t ;
43 typedef long long PRTime ;
44 typedef short int16_t ;
45 typedef long int32_t ;
46 typedef long long int64_t ;
48 typedef unsigned long nsrefcnt ;
49 typedef unsigned long nsresult ;
51 // XXX need this built into xpidl compiler so that it's really size_t or size_t
52 // and it's scriptable:
53 typedef unsigned long size_t;
55 [ptr] native voidPtr(void);
56 [ptr] native charPtr(char);
57 [ptr] native unicharPtr(char16_t);
59 [ref, nsid] native nsIDRef(nsID);
60 [ref, nsid] native nsIIDRef(nsIID);
61 [ref, nsid] native nsCIDRef(nsCID);
63 [ptr, nsid] native nsIDPtr(nsID);
64 [ptr, nsid] native nsIIDPtr(nsIID);
65 [ptr, nsid] native nsCIDPtr(nsCID);
67 // NOTE: Be careful in using the following 3 types. The *Ref and *Ptr variants
68 // are more commonly used (and better supported). Those variants require
69 // nsMemory alloc'd copies when used as 'out' params while these types do not.
70 // However, currently these types can not be used for 'in' params. And, methods
71 // that use them as 'out' params *must* be declared [notxpcom] (with an explicit
72 // return type of nsresult). This makes such methods implicitly not scriptable.
73 // Use of these types in methods without a [notxpcom] declaration will cause
74 // the xpidl compiler to raise an error.
75 // See: http://bugzilla.mozilla.org/show_bug.cgi?id=93792
77 [nsid] native nsIID(nsIID);
78 [nsid] native nsID(nsID);
79 [nsid] native nsCID(nsCID);
81 [ptr] native nsQIResult(void);
83 [ref, utf8string] native AUTF8String(ignored);
84 [ref, utf8string] native AUTF8StringRef(ignored);
85 [ptr, utf8string] native AUTF8StringPtr(ignored);
87 [ref, cstring] native ACString(ignored);
88 [ref, cstring] native ACStringRef(ignored);
89 [ptr, cstring] native ACStringPtr(ignored);
91 [ref, astring] native AString(ignored);
92 [ref, astring] native AStringRef(ignored);
93 [ptr, astring] native AStringPtr(ignored);
95 [ref, jsval] native jsval(jsval);
96 native jsid(jsid);
98 [ptr, promise] native Promise(ignored);
100 %{C++
102 * End commenting out the C++ versions of the above in the output header
104 #endif