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