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
|
|
14 interface IUnknown
|
|
15 {
|
|
16 static const char[] IID_STR = NS_ISUPPORTS_IID_STR;
|
|
17 static const nsIID IID = NS_ISUPPORTS_IID;
|
|
18
|
|
19 extern(System):
|
54
|
20 nsresult QueryInterface( in nsIID* uuid, void **result);
|
25
|
21
|
|
22 nsrefcnt AddRef();
|
|
23 nsrefcnt Release();
|
|
24 }
|
|
25
|
|
26 // WHY WE USE COM's IUnknown for XPCOM:
|
|
27 //
|
|
28 // The IUnknown interface is special-cased in D and is specifically designed to be
|
|
29 // compatible with MS COM. XPCOM's nsISupports interface is the exact equivalent
|
|
30 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR
|
|
31
|
|
32 alias IUnknown nsISupports;
|