|
Revision 327:b0d7eb5bd76c, 1.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.Common; |
|---|
| 2 |
|
|---|
| 3 |
version(Windows) { |
|---|
| 4 |
const NS_WIN32 = 1; |
|---|
| 5 |
} |
|---|
| 6 |
version(linux) { |
|---|
| 7 |
const NS_UNIX = 1; |
|---|
| 8 |
} |
|---|
| 9 |
|
|---|
| 10 |
alias uint nsresult; |
|---|
| 11 |
alias uint nsrefcnt; |
|---|
| 12 |
|
|---|
| 13 |
const nsnull = 0; |
|---|
| 14 |
|
|---|
| 15 |
/****************************************************************************** |
|---|
| 16 |
|
|---|
| 17 |
prtypes |
|---|
| 18 |
|
|---|
| 19 |
******************************************************************************/ |
|---|
| 20 |
|
|---|
| 21 |
extern (System): |
|---|
| 22 |
|
|---|
| 23 |
alias ubyte PRUint8; |
|---|
| 24 |
alias byte PRInt8; |
|---|
| 25 |
|
|---|
| 26 |
const PR_INT8_MAX = 127; |
|---|
| 27 |
const PR_UINT8_MAX = 255U; |
|---|
| 28 |
|
|---|
| 29 |
alias ushort PRUint16; |
|---|
| 30 |
alias short PRInt16; |
|---|
| 31 |
|
|---|
| 32 |
const PR_INT16_MAX = 32767; |
|---|
| 33 |
const PR_UINT16_MAX = 65535U; |
|---|
| 34 |
|
|---|
| 35 |
alias uint PRUint32; |
|---|
| 36 |
alias int PRInt32; |
|---|
| 37 |
|
|---|
| 38 |
alias long PRInt64; |
|---|
| 39 |
alias ulong PRUint64; |
|---|
| 40 |
|
|---|
| 41 |
alias int PRIntn; |
|---|
| 42 |
alias uint PRUintn; |
|---|
| 43 |
|
|---|
| 44 |
alias double PRFloat64; |
|---|
| 45 |
alias size_t PRSize; |
|---|
| 46 |
|
|---|
| 47 |
alias PRInt32 PROffset32; |
|---|
| 48 |
alias PRInt64 PROffset64; |
|---|
| 49 |
|
|---|
| 50 |
alias ptrdiff_t PRPtrdiff; |
|---|
| 51 |
alias uint PRUptrdiff; |
|---|
| 52 |
|
|---|
| 53 |
alias PRIntn PRBool; |
|---|
| 54 |
|
|---|
| 55 |
const PR_TRUE = 1; |
|---|
| 56 |
const PR_FALSE = 0; |
|---|
| 57 |
|
|---|
| 58 |
alias PRUint8 PRPackedBool; |
|---|
| 59 |
|
|---|
| 60 |
enum |
|---|
| 61 |
{ |
|---|
| 62 |
PR_FAILURE = -1, |
|---|
| 63 |
PR_SUCCESS, |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
alias int PRStatus; |
|---|
| 67 |
|
|---|
| 68 |
alias wchar PRUnichar; |
|---|
| 69 |
|
|---|
| 70 |
alias int PRWord; |
|---|
| 71 |
alias uint PRUword; |
|---|
| 72 |
|
|---|
| 73 |
/****************************************************************************** |
|---|
| 74 |
|
|---|
| 75 |
nscommon |
|---|
| 76 |
|
|---|
| 77 |
******************************************************************************/ |
|---|
| 78 |
|
|---|
| 79 |
alias void* nsIWidget; |
|---|
| 80 |
alias void* nsILayoutHistoryState; |
|---|
| 81 |
alias void* nsIDeviceContext; |
|---|
| 82 |
alias void* nsPresContext; |
|---|
| 83 |
alias void* nsEvent; |
|---|
| 84 |
alias void* nsEventStatus; |
|---|
| 85 |
alias void* nsIPresShell; |
|---|
| 86 |
alias void* JSContext; |
|---|
| 87 |
|
|---|
| 88 |
alias void* PRThread; |
|---|
| 89 |
alias void* PLEvent; |
|---|
| 90 |
alias void* PLEventQueue; |
|---|
| 91 |
alias void* PLHandleEventProc; |
|---|
| 92 |
alias void* PLDestroyEventProc; |
|---|
| 93 |
|
|---|
| 94 |
/****************************************************************************** |
|---|
| 95 |
|
|---|
| 96 |
gfxtypes |
|---|
| 97 |
|
|---|
| 98 |
******************************************************************************/ |
|---|
| 99 |
|
|---|
| 100 |
alias PRUint32 gfx_color; |
|---|
| 101 |
alias PRUint16 gfx_depth; |
|---|
| 102 |
alias PRInt32 gfx_format; |
|---|
| 103 |
|
|---|
| 104 |
alias void* nsIntRect; |
|---|
| 105 |
alias void* nsRect; |
|---|