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