Mercurial > projects > dwt-linux
annotate dwt/internal/mozilla/nsISupports.d @ 286:44258e0b6687
More fixes for xpcom
author | John Reimer<terminal.node@gmail.com> |
---|---|
date | Tue, 05 Aug 2008 10:11:58 -0700 |
parents | 93409d9838c5 |
children |
rev | line source |
---|---|
272
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
1 module dwt.internal.mozilla.nsISupports; |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
2 |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
3 import dwt.internal.mozilla.Common; |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
4 import dwt.internal.mozilla.nsID; |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
5 |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
6 const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
7 |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
8 const nsIID NS_ISUPPORTS_IID= |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
9 { 0x00000000, 0x0000, 0x0000, |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
10 [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
11 |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
12 extern(System) |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
13 |
278
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
14 interface IUnknown |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
15 { |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
16 static const char[] IID_STR = NS_ISUPPORTS_IID_STR; |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
17 static const nsIID IID = NS_ISUPPORTS_IID; |
272
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
18 |
286 | 19 nsresult QueryInterface(ref nsIID uuid, void **result); |
272
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
20 |
278
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
21 nsrefcnt AddRef(); |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
22 nsrefcnt Release(); |
272
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
23 } |
dd63eb078d7a
xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
24 |
278
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
25 // WHY WE USE COM's IUnknown for XPCOM: |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
26 // |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
27 // The IUnknown interface is special-cased in D and is specifically designed to be |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
28 // compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
29 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
30 |
93409d9838c5
Commit more browser/xpcom updates, including still uncoverted source.
John Reimer<terminal.node@gmail.com>
parents:
272
diff
changeset
|
31 alias IUnknown nsISupports; |