Mercurial > projects > dwt-linux
annotate dwt/internal/mozilla/nsISupports.d @ 348:9a4d7706df52
Test Update to fix linux XPCOM interface issues
author | John Reimer <terminal.node@gmail.com> |
---|---|
date | Fri, 31 Oct 2008 21:46:44 -0700 |
parents | 942da4b6558a |
children |
rev | line source |
---|---|
291
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
1 module dwt.internal.mozilla.nsISupports; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
2 |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
3 import dwt.internal.mozilla.Common; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
4 import dwt.internal.mozilla.nsID; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
5 |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
6 const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
7 |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
8 const nsIID NS_ISUPPORTS_IID= |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
9 { 0x00000000, 0x0000, 0x0000, |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
10 [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
11 |
348
9a4d7706df52
Test Update to fix linux XPCOM interface issues
John Reimer <terminal.node@gmail.com>
parents:
341
diff
changeset
|
12 interface IUnknown |
291
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
13 { |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
14 static const char[] IID_STR = NS_ISUPPORTS_IID_STR; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
15 static const nsIID IID = NS_ISUPPORTS_IID; |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
16 |
348
9a4d7706df52
Test Update to fix linux XPCOM interface issues
John Reimer <terminal.node@gmail.com>
parents:
341
diff
changeset
|
17 extern(System): |
341
942da4b6558a
Ongoing fixup for compile
John Reimer <terminal.node@gmail.com>
parents:
293
diff
changeset
|
18 nsresult QueryInterface( nsIID* uuid, void **result); |
291
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
19 |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
20 nsrefcnt AddRef(); |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
21 nsrefcnt Release(); |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
22 } |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
23 |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
24 // WHY WE USE COM's IUnknown for XPCOM: |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
25 // |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
26 // The IUnknown interface is special-cased in D and is specifically designed to be |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
27 // compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
28 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR |
b0bd1789106b
fix: added wrong directory :(
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
29 |
348
9a4d7706df52
Test Update to fix linux XPCOM interface issues
John Reimer <terminal.node@gmail.com>
parents:
341
diff
changeset
|
30 alias IUnknown nsISupports; |