Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / toolkit / xre / nsNativeAppSupportOS2.h
blobe896cc4d8a9c9ae3f3ce09daf5998bdbed1cc14c
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is Mozilla Communicator client code.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Bill Law law@netscape.com
25 * IBM Corp.
26 * Achim Hasenmueller <achimha@innotek.de>
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 // Splash screen dialog ID.
43 #define IDD_SPLASH 100
45 // Splash screen bitmap ID.
46 #define IDB_SPLASH 101
48 // DDE application name
49 #define ID_DDE_APPLICATION_NAME 102
51 /*
52 * OS/2 DDEML library headers
53 * For more information, please refer to the Windows documentation
56 #ifndef _H_DDEML
57 #define _H_DDEML
59 /* all structures must be byte aligned */
60 #pragma pack(1)
62 /* custom type definitions */
63 typedef LHANDLE HCONV;
64 typedef LHANDLE HCONVLIST;
65 typedef LHANDLE HDATA;
66 typedef LHANDLE HDDEINST;
67 typedef LHANDLE HSZ;
68 typedef HCONV *PHCONV;
69 typedef HCONVLIST *PHCONVLIST;
70 typedef HDATA *PHDATA;
71 typedef HDDEINST *PHDDEINST;
72 typedef HSZ *PHSZ;
73 typedef HDATA (APIENTRY FNDDECB)(ULONG, USHORT, USHORT, HCONV, HSZ, HSZ, HDATA, ULONG, ULONG);
74 typedef FNDDECB *PFNDDECB;
76 /* constant definitions */
77 #define XCLASS_BOOL 0x1000
78 #define XCLASS_DATA 0x2000
79 #define XCLASS_FLAGS 0x4000
80 #define XCLASS_NOTIFICATION 0x8000
81 #define XTYPF_NOBLOCK 0x0002
82 #define XTYPF_NODATA 0x0004
83 #define XTYPF_ACKREQ 0x0008
84 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
85 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
86 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
87 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
88 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
89 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
90 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
91 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
92 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION)
93 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
94 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
95 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA)
96 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
97 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
98 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
99 #define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
100 #define ST_CONNECTED ((USHORT)0x0001)
101 #define ST_ADVISE ((USHORT)0x0002)
102 #define ST_ISLOCAL ((USHORT)0x0004)
103 #define ST_BLOCKED ((USHORT)0x0008)
104 #define ST_CLIENT ((USHORT)0x0010)
105 #define ST_TERMINATED ((USHORT)0x0020)
106 #define ST_INLIST ((USHORT)0x0040)
107 #define ST_BLOCKNEXT ((USHORT)0x0080)
108 #define ST_ISSELF ((USHORT)0x0100)
109 #define XST_NULL 0
110 #define XST_INCOMPLETE 1
111 #define XST_CONNECTED 2
112 #define XST_INITSENT 3
113 #define XST_INITACKRCVD 4
114 #define XST_REQSENT 5
115 #define XST_DATARCVD 6
116 #define XST_POKESENT 7
117 #define XST_POKEACKRCVD 8
118 #define XST_EXECSENT 9
119 #define XST_EXECACKRCVD 10
120 #define XST_ADVSENT 11
121 #define XST_UNADVSENT 12
122 #define XST_ADVACKRCVD 13
123 #define XST_UNADVACKRCVD 14
124 #define XST_ADVDATASENT 15
125 #define XST_ADVDATAACKRCVD 16
126 #define MF_HSZ ((ULONG)0x01000000L)
127 #define MF_SENDMSGS ((ULONG)0x02000000L)
128 #define MF_POSTMSGS ((ULONG)0x04000000L)
129 #define MF_CALLBACKS ((ULONG)0x08000000L)
130 #define MF_ERRORS ((ULONG)0x10000000L)
131 #define MF_LINKS ((ULONG)0x20000000L)
132 #define MF_CONV ((ULONG)0x40000000L)
133 #define CBF_FAIL_SELFCONNECTIONS ((ULONG)0x00001000L)
134 #define CBF_FAIL_CONNECTIONS ((ULONG)0x00002000L)
135 #define CBF_FAIL_ADVISES ((ULONG)0x00004000L)
136 #define CBF_FAIL_EXECUTES ((ULONG)0x00008000L)
137 #define CBF_FAIL_POKES ((ULONG)0x00010000L)
138 #define CBF_FAIL_REQUESTS ((ULONG)0x00020000L)
139 #define CBF_FAIL_ALLSVRXACTIONS ((ULONG)0x0003f000L)
140 #define CBF_SKIP_CONNECT_CONFIRMS ((ULONG)0x00040000L)
141 #define CBF_SKIP_REGISTRATIONS ((ULONG)0x00080000L)
142 #define CBF_SKIP_UNREGISTRATIONS ((ULONG)0x00100000L)
143 #define CBF_SKIP_DISCONNECTS ((ULONG)0x00200000L)
144 #define CBF_SKIP_ALLNOTIFICATIONS ((ULONG)0x003c0000L)
145 #define CBF_MASK ((ULONG)0x00FFF000L)
146 #define APPF_CLIENTONLY ((ULONG)0x00000010L)
147 #define APPF_FILTERINITS ((ULONG)0x00000020L)
148 #define APPF_MASK ((ULONG)0x00000FF0L)
149 #define APPCLASS_STANDARD ((ULONG)0x00000000L)
150 #define APPCLASS_MONITOR ((ULONG)0x00000001L)
151 #define APPCLASS_MASK ((ULONG)0x0000000FL)
152 #define CBR_BLOCK ((ULONG)-1L)
153 #define QID_SYNC ((ULONG)-1L)
154 #define TIMEOUT_ASYNC ((ULONG)-1L)
155 #define CADV_LATEACK 0xFFFF
156 #define MH_CREATE ((USHORT)0x0001)
157 #define MH_KEEP ((USHORT)0x0002)
158 #define MH_DELETE ((USHORT)0x0003)
159 #define MH_CLEANUP ((USHORT)0x0004)
160 #define MH_SYS_CREATE ((USHORT)0x0005)
161 #define MH_SYS_KEEP ((USHORT)0x0006)
162 #define MH_SYS_DELETE ((USHORT)0x0007)
163 #define DDEERR_NO_ERROR 0
164 #define DDEERR_FIRST 0x7000
165 #define DDEERR_BUSY 0x7001
166 #define DDEERR_INVALID_USAGE 0x7002
167 #define DDEERR_INVALID_PARAMETER 0x7003
168 #define DDEERR_MEMORY_ERROR 0x7004
169 #define DDEERR_NO_CONV_ESTABLISHED 0x7005
170 #define DDEERR_NO_MEMORY 0x7006
171 #define DDEERR_NO_MSG_QUEUE 0x7007
172 #define DDEERR_NOT_INITIALIZED 0x7008
173 #define DDEERR_NOT_PROCESSED 0x7009
174 #define DDEERR_POSTMSG_FAILED 0x700a
175 #define DDEERR_REENTRANCY 0x700b
176 #define DDEERR_SERVER_DIED 0x700c
177 #define DDEERR_SYSTEM_ERROR 0x700d
178 #define DDEERR_TIMEOUT_ADVACK 0x700e
179 #define DDEERR_TIMEOUT_EXECACK 0x700f
180 #define DDEERR_TIMEOUT_POKEACK 0x7010
181 #define DDEERR_TIMEOUT_DATAACK 0x7011
182 #define DDEERR_TIMEOUT_UNADVACK 0x7012
183 #define DDEERR_UNKNOWN_QUEUE_ID 0x7013
184 #define DDEERR_LAST 0x70FF
185 #define CSH_CASESENSITIVE ((ULONG)0x00000001L)
186 #define CSH_ERROR 0L
187 #define CSH_EQ 1L
188 #define CSH_LT 2L
189 #define CSH_GT 3L
190 #define HDATA_APPOWNED ((ULONG)DDEPM_NOFREE)
191 #define EC_ENABLEALL ((USHORT) 0x0000)
192 #define EC_ENABLEONE ST_BLOCKNEXT
193 #define EC_DISABLE ST_BLOCKED
194 #define EC_QUERYWAITING ((USHORT)0x0002)
195 #define DNS_REGISTER ((ULONG)0x00000001L)
196 #define DNS_UNREGISTER ((ULONG)0x00000002L)
197 #define DNS_FILTERON ((ULONG)0x00000004L)
198 #define DNS_FILTEROFF ((ULONG)0x00000008L)
200 /* structure definitions */
201 typedef struct
203 ULONG cb;
204 ULONG hUser;
205 HCONV hConvPartner;
206 HSZ hszServicePartner;
207 HSZ hszServiceRequest;
208 HSZ hszTopic;
209 HSZ hszItem;
210 USHORT usFormat;
211 USHORT fsType;
212 USHORT fsStatus;
213 USHORT usState;
214 ULONG ulLastError;
215 HCONVLIST hConvList;
216 CONVCONTEXT ConvCtxt;
217 HWND hwnd;
218 HWND hwndPartner;
219 } CONVINFO, *PCONVINFO;
221 typedef struct
223 HSZ hszService;
224 HSZ hszTopic;
225 } HSZPAIR, *PHSZPAIR;
227 typedef struct
229 ULONG cb;
230 ULONG ulTime;
231 ULONG hTask;
232 ULONG ulRet;
233 USHORT fsType;
234 USHORT usFormat;
235 HCONV hConv;
236 HSZ hsz1;
237 HSZ hsz2;
238 HDATA hData;
239 ULONG ulData1;
240 ULONG ulData2;
241 CONVCONTEXT ConvCtxt;
242 ULONG cbData;
243 BYTE abData[32];
244 } MONCBSTRUCT, *PMONCBSTRUCT;
246 typedef struct
248 ULONG cb;
249 BOOL fConnect;
250 ULONG ulTime;
251 ULONG hTaskPartner;
252 HSZ hszService;
253 HSZ hszTopic;
254 HCONV hConvClient;
255 HCONV hConvServer;
256 } MONCONVSTRUCT, *PMONCONVSTRUCT;
258 typedef struct
260 ULONG cb;
261 ULONG ulLastError;
262 ULONG ulTime;
263 ULONG hTask;
264 } MONERRSTRUCT, *PMONERRSTRUCT;
266 typedef struct
268 ULONG cb;
269 USHORT fsAction;
270 ULONG ulTime;
271 HSZ hsz;
272 ULONG hTask;
273 ULONG ulReserved;
274 CHAR szString[1];
275 } MONHSZSTRUCT, *PMONHSZSTRUCT;
277 typedef struct
279 ULONG cb;
280 ULONG ulTime;
281 ULONG hTask;
282 HSZ hszService;
283 HSZ hszTopic;
284 HSZ hszItem;
285 HCONV hConvServer;
286 HCONV hConvClient;
287 BOOL fServer;
288 BOOL fEstablished;
289 USHORT fsStatus;
290 USHORT usFormat;
291 } MONLINKSTRUCT, *PMONLINKSTRUCT;
293 typedef struct
295 ULONG cb;
296 HWND hwndTo;
297 ULONG ulTime;
298 ULONG hTask;
299 ULONG idMsg;
300 MPARAM mp1;
301 MPARAM mp2;
302 USHORT fsStatus;
303 USHORT usFormat;
304 USHORT offszString1;
305 USHORT offszString2;
306 ULONG cbData;
307 BYTE abData[32];
308 } MONMSGSTRUCT, *PMONMSGSTRUCT;
311 /* API definitions */
312 BOOL (* APIENTRY WinDdeAbandonTransaction)(HDDEINST, HCONV, ULONG);
313 PVOID (* APIENTRY WinDdeAccessData)(HDATA, PULONG);
314 HDATA (* APIENTRY WinDdeAddData)(HDATA, PVOID, ULONG, ULONG);
315 ULONG (* APIENTRY WinDdeCompareStringHandles)(HSZ, HSZ, ULONG);
316 HCONV (* APIENTRY WinDdeConnect)(HDDEINST, HSZ, HSZ, PCONVCONTEXT);
317 HCONVLIST (* APIENTRY WinDdeConnectList)(HDDEINST, HSZ, HSZ, HCONVLIST, PCONVCONTEXT);
318 HDATA (* APIENTRY WinDdeCreateDataHandle)(PVOID, ULONG, ULONG, HSZ, USHORT, ULONG);
319 HSZ (* APIENTRY WinDdeCreateStringHandle)(PSZ, ULONG);
320 BOOL (* APIENTRY WinDdeDisconnect)(HCONV);
321 BOOL (* APIENTRY WinDdeDisconnectList)(HCONVLIST);
322 BOOL (* APIENTRY WinDdeEnableCallback)(HDDEINST, HCONV, ULONG);
323 BOOL (* APIENTRY WinDdeFreeDataHandle)(HDATA);
324 BOOL (* APIENTRY WinDdeFreeStringHandle)(HSZ);
325 ULONG (* APIENTRY WinDdeGetData)(HDATA, PVOID, ULONG, ULONG);
326 ULONG (* APIENTRY WinDdeInitialize)(PHDDEINST, PFNDDECB, ULONG, ULONG);
327 BOOL (* APIENTRY WinDdeKeepStringHandle)(HSZ);
328 HDATA (* APIENTRY WinDdeNameService)(HDDEINST, HSZ, HSZ, ULONG);
329 BOOL (* APIENTRY WinDdePostAdvise)(HDDEINST, HSZ, HSZ);
330 ULONG (* APIENTRY WinDdeQueryConvInfo)(HCONV, ULONG, PCONVINFO);
331 HCONV (* APIENTRY WinDdeQueryNextServer)(HCONVLIST, HCONV);
332 ULONG (* APIENTRY WinDdeQueryString)(HSZ, PSZ, ULONG, ULONG);
333 HCONV (* APIENTRY WinDdeReconnect)(HCONV);
334 BOOL (* APIENTRY WinDdeSetUserHandle)(HCONV, ULONG, ULONG);
335 HDATA (* APIENTRY WinDdeSubmitTransaction)(PVOID, ULONG, HCONV, HSZ, USHORT, USHORT, ULONG, PULONG);
336 BOOL (* APIENTRY WinDdeUninitialize)(HDDEINST);
338 /* restore structure packing */
339 #pragma pack()
341 #endif /* _H_DDEML */
343 typedef ULONG DWORD;
344 typedef PBYTE LPBYTE;
345 typedef HDATA HDDEDATA;
347 #define CP_WINANSI 0 // When 0 is specified for codepage on these
348 // dde functions, it will use the codepage
349 // that is associated with the current thread.
350 // CP_WINANSI in win32 means that the non
351 // unicode version of DdeCreateStringHandle
352 // was used.