root/dwt/internal/mozilla/nsISupports.d

Revision 327:b0d7eb5bd76c, 0.9 kB (checked in by John Reimer <terminal.node@gmail.com>, 3 years ago)

Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win

Line 
1 module dwt.internal.mozilla.nsISupports;
2
3 import dwt.internal.mozilla.Common;
4 import dwt.internal.mozilla.nsID;
5
6 const char[] NS_ISUPPORTS_IID_STR = "00000000-0000-0000-c000-000000000046";
7
8 const nsIID NS_ISUPPORTS_IID=
9         { 0x00000000, 0x0000, 0x0000,
10           [ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ] };
11
12 interface IUnknown
13 {
14     static const char[] IID_STR = NS_ISUPPORTS_IID_STR;
15     static const nsIID IID = NS_ISUPPORTS_IID;
16
17 extern(System):
18     nsresult QueryInterface( nsIID* uuid, void **result);
19
20     nsrefcnt AddRef();
21     nsrefcnt Release();
22 }
23
24 // WHY WE USE COM's IUnknown for XPCOM:
25 //
26 // The IUnknown interface is special-cased in D and is specifically designed to be
27 // compatible with MS COM.  XPCOM's nsISupports interface is the exact equivalent
28 // of IUnknown so we alias it here to take advantage of D's COM support. -JJR
29
30 alias IUnknown nsISupports;
Note: See TracBrowser for help on using the browser.