Mercurial > projects > dwt-mac
annotate dwt/internal/mozilla/nsISupports.d @ 154:535243e6d16a
Fixes to make dwt compile with ldc
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 13 Jun 2009 00:25:05 +0200 |
parents | 5583f8eeee6c |
children |
rev | line source |
---|---|
45 | 1 module dwt.internal.mozilla.nsISupports; |
2 | |
125 | 3 import dwt.internal.mozilla.Common; |
4 import dwt.internal.mozilla.nsID; | |
45 | 5 |
125 | 6 const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046"; |
45 | 7 |
125 | 8 const nsIID NS_ISUPPORTS_IID= |
9 { 0x00000000, 0x0000, 0x0000, | |
10 [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] }; | |
45 | 11 |
125 | 12 interface IUnknown |
13 { | |
14 static const char[] IID_STR = NS_ISUPPORTS_IID_STR; | |
154
535243e6d16a
Fixes to make dwt compile with ldc
Jacob Carlborg <doob@me.com>
parents:
125
diff
changeset
|
15 static /*const*/ nsIID IID = NS_ISUPPORTS_IID; // const causes bug in ldc TODO |
45 | 16 |
154
535243e6d16a
Fixes to make dwt compile with ldc
Jacob Carlborg <doob@me.com>
parents:
125
diff
changeset
|
17 extern(System): //causes assert in ldc TODO |
125 | 18 nsresult QueryInterface( nsIID* uuid, void **result); |
19 nsrefcnt AddRef(); | |
20 nsrefcnt Release(); | |
21 } | |
45 | 22 |
125 | 23 // WHY WE USE COM's IUnknown for XPCOM: |
24 // | |
25 // The IUnknown interface is special-cased in D and is specifically designed to be | |
26 // compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent | |
27 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR | |
45 | 28 |
125 | 29 alias IUnknown nsISupports; |