25
|
1 module org.eclipse.swt.internal.mozilla.nsISupports;
|
|
2
|
|
3 import java.lang.all;
|
|
4
|
|
5 import org.eclipse.swt.internal.mozilla.Common;
|
|
6 import org.eclipse.swt.internal.mozilla.nsID;
|
|
7
|
|
8 const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046";
|
|
9
|
|
10 const nsIID NS_ISUPPORTS_IID=
|
|
11 { 0x00000000, 0x0000, 0x0000,
|
|
12 [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] };
|
|
13
|
53
|
14 version(D_Version2){
|
|
15 mixin("alias const(nsIID) cnsIID;");
|
|
16 mixin("alias const(nsID) cnsID;");
|
|
17 } else { // D1
|
|
18 alias nsIID cnsIID;
|
|
19 alias nsID cnsID;
|
|
20 }
|
25
|
21 interface IUnknown
|
|
22 {
|
|
23 static const char[] IID_STR = NS_ISUPPORTS_IID_STR;
|
|
24 static const nsIID IID = NS_ISUPPORTS_IID;
|
|
25
|
|
26 extern(System):
|
53
|
27 nsresult QueryInterface( cnsIID* uuid, void **result);
|
25
|
28
|
|
29 nsrefcnt AddRef();
|
|
30 nsrefcnt Release();
|
|
31 }
|
|
32
|
|
33 // WHY WE USE COM's IUnknown for XPCOM:
|
|
34 //
|
|
35 // The IUnknown interface is special-cased in D and is specifically designed to be
|
|
36 // compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent
|
|
37 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR
|
|
38
|
|
39 alias IUnknown nsISupports;
|