Back to index

lightning-sunbird  0.9+nobinonly
nsNativeAppSupportOS2.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Mozilla Communicator client code.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Bill Law       law@netscape.com
00025  *   IBM Corp.
00026  *   Achim Hasenmueller <achimha@innotek.de>
00027  *
00028  * Alternatively, the contents of this file may be used under the terms of
00029  * either of the GNU General Public License Version 2 or later (the "GPL"),
00030  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00031  * in which case the provisions of the GPL or the LGPL are applicable instead
00032  * of those above. If you wish to allow use of your version of this file only
00033  * under the terms of either the GPL or the LGPL, and not to allow others to
00034  * use your version of this file under the terms of the MPL, indicate your
00035  * decision by deleting the provisions above and replace them with the notice
00036  * and other provisions required by the GPL or the LGPL. If you do not delete
00037  * the provisions above, a recipient may use your version of this file under
00038  * the terms of any one of the MPL, the GPL or the LGPL.
00039  *
00040  * ***** END LICENSE BLOCK ***** */
00041 
00042 // Splash screen dialog ID.
00043 #define IDD_SPLASH  100
00044 
00045 // Splash screen bitmap ID.
00046 #define IDB_SPLASH  101
00047 
00048 // DDE application name
00049 #define ID_DDE_APPLICATION_NAME 102
00050 
00051 /* 
00052  * OS/2 DDEML library headers
00053  * For more information, please refer to the Windows documentation
00054  */
00055 
00056 #ifndef _H_DDEML
00057 #define _H_DDEML
00058 
00059 /* all structures must be byte aligned */
00060 #pragma pack(1)
00061 
00062 /* custom type definitions */
00063 typedef LHANDLE HCONV;
00064 typedef LHANDLE HCONVLIST;
00065 typedef LHANDLE HDATA;
00066 typedef LHANDLE HDDEINST;
00067 typedef LHANDLE HSZ;
00068 typedef HCONV *PHCONV;
00069 typedef HCONVLIST *PHCONVLIST;
00070 typedef HDATA *PHDATA;
00071 typedef HDDEINST *PHDDEINST;
00072 typedef HSZ *PHSZ;
00073 typedef HDATA (APIENTRY FNDDECB)(ULONG, USHORT, USHORT, HCONV, HSZ, HSZ, HDATA, ULONG, ULONG);
00074 typedef FNDDECB *PFNDDECB;
00075 
00076 /* constant definitions */
00077 #define XCLASS_BOOL 0x1000
00078 #define XCLASS_DATA 0x2000
00079 #define XCLASS_FLAGS 0x4000
00080 #define XCLASS_NOTIFICATION 0x8000
00081 #define XTYPF_NOBLOCK 0x0002
00082 #define XTYPF_NODATA 0x0004
00083 #define XTYPF_ACKREQ 0x0008
00084 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00085 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
00086 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
00087 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
00088 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
00089 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
00090 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
00091 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00092 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION)
00093 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
00094 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00095 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA)
00096 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00097 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00098 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
00099 #define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
00100 #define ST_CONNECTED ((USHORT)0x0001)
00101 #define ST_ADVISE ((USHORT)0x0002)
00102 #define ST_ISLOCAL ((USHORT)0x0004)
00103 #define ST_BLOCKED ((USHORT)0x0008)
00104 #define ST_CLIENT ((USHORT)0x0010)
00105 #define ST_TERMINATED ((USHORT)0x0020)
00106 #define ST_INLIST ((USHORT)0x0040)
00107 #define ST_BLOCKNEXT ((USHORT)0x0080)
00108 #define ST_ISSELF ((USHORT)0x0100)
00109 #define XST_NULL 0
00110 #define XST_INCOMPLETE 1
00111 #define XST_CONNECTED 2
00112 #define XST_INITSENT 3
00113 #define XST_INITACKRCVD 4
00114 #define XST_REQSENT 5
00115 #define XST_DATARCVD 6
00116 #define XST_POKESENT 7
00117 #define XST_POKEACKRCVD 8
00118 #define XST_EXECSENT 9
00119 #define XST_EXECACKRCVD 10
00120 #define XST_ADVSENT 11
00121 #define XST_UNADVSENT 12
00122 #define XST_ADVACKRCVD 13
00123 #define XST_UNADVACKRCVD 14
00124 #define XST_ADVDATASENT 15
00125 #define XST_ADVDATAACKRCVD 16
00126 #define MF_HSZ ((ULONG)0x01000000L)
00127 #define MF_SENDMSGS ((ULONG)0x02000000L)
00128 #define MF_POSTMSGS ((ULONG)0x04000000L)
00129 #define MF_CALLBACKS ((ULONG)0x08000000L)
00130 #define MF_ERRORS ((ULONG)0x10000000L)
00131 #define MF_LINKS ((ULONG)0x20000000L)
00132 #define MF_CONV ((ULONG)0x40000000L)
00133 #define CBF_FAIL_SELFCONNECTIONS ((ULONG)0x00001000L)
00134 #define CBF_FAIL_CONNECTIONS ((ULONG)0x00002000L)
00135 #define CBF_FAIL_ADVISES ((ULONG)0x00004000L)
00136 #define CBF_FAIL_EXECUTES ((ULONG)0x00008000L)
00137 #define CBF_FAIL_POKES ((ULONG)0x00010000L)
00138 #define CBF_FAIL_REQUESTS ((ULONG)0x00020000L)
00139 #define CBF_FAIL_ALLSVRXACTIONS ((ULONG)0x0003f000L)
00140 #define CBF_SKIP_CONNECT_CONFIRMS ((ULONG)0x00040000L)
00141 #define CBF_SKIP_REGISTRATIONS ((ULONG)0x00080000L)
00142 #define CBF_SKIP_UNREGISTRATIONS ((ULONG)0x00100000L)
00143 #define CBF_SKIP_DISCONNECTS ((ULONG)0x00200000L)
00144 #define CBF_SKIP_ALLNOTIFICATIONS ((ULONG)0x003c0000L)
00145 #define CBF_MASK ((ULONG)0x00FFF000L)
00146 #define APPF_CLIENTONLY ((ULONG)0x00000010L)
00147 #define APPF_FILTERINITS ((ULONG)0x00000020L)
00148 #define APPF_MASK ((ULONG)0x00000FF0L)
00149 #define APPCLASS_STANDARD ((ULONG)0x00000000L)
00150 #define APPCLASS_MONITOR ((ULONG)0x00000001L)
00151 #define APPCLASS_MASK ((ULONG)0x0000000FL)
00152 #define CBR_BLOCK ((ULONG)-1L)
00153 #define QID_SYNC ((ULONG)-1L)
00154 #define TIMEOUT_ASYNC ((ULONG)-1L)
00155 #define CADV_LATEACK 0xFFFF
00156 #define MH_CREATE ((USHORT)0x0001)
00157 #define MH_KEEP ((USHORT)0x0002)
00158 #define MH_DELETE ((USHORT)0x0003)
00159 #define MH_CLEANUP ((USHORT)0x0004)
00160 #define MH_SYS_CREATE ((USHORT)0x0005)
00161 #define MH_SYS_KEEP ((USHORT)0x0006)
00162 #define MH_SYS_DELETE ((USHORT)0x0007)
00163 #define DDEERR_NO_ERROR 0
00164 #define DDEERR_FIRST 0x7000
00165 #define DDEERR_BUSY 0x7001
00166 #define DDEERR_INVALID_USAGE 0x7002
00167 #define DDEERR_INVALID_PARAMETER 0x7003
00168 #define DDEERR_MEMORY_ERROR 0x7004
00169 #define DDEERR_NO_CONV_ESTABLISHED 0x7005
00170 #define DDEERR_NO_MEMORY 0x7006
00171 #define DDEERR_NO_MSG_QUEUE 0x7007
00172 #define DDEERR_NOT_INITIALIZED 0x7008
00173 #define DDEERR_NOT_PROCESSED 0x7009
00174 #define DDEERR_POSTMSG_FAILED 0x700a
00175 #define DDEERR_REENTRANCY 0x700b
00176 #define DDEERR_SERVER_DIED 0x700c
00177 #define DDEERR_SYSTEM_ERROR 0x700d
00178 #define DDEERR_TIMEOUT_ADVACK 0x700e
00179 #define DDEERR_TIMEOUT_EXECACK 0x700f
00180 #define DDEERR_TIMEOUT_POKEACK 0x7010
00181 #define DDEERR_TIMEOUT_DATAACK 0x7011
00182 #define DDEERR_TIMEOUT_UNADVACK 0x7012
00183 #define DDEERR_UNKNOWN_QUEUE_ID 0x7013
00184 #define DDEERR_LAST 0x70FF
00185 #define CSH_CASESENSITIVE ((ULONG)0x00000001L)
00186 #define CSH_ERROR 0L
00187 #define CSH_EQ 1L
00188 #define CSH_LT 2L
00189 #define CSH_GT 3L
00190 #define HDATA_APPOWNED ((ULONG)DDEPM_NOFREE)
00191 #define EC_ENABLEALL ((USHORT) 0x0000)
00192 #define EC_ENABLEONE ST_BLOCKNEXT
00193 #define EC_DISABLE ST_BLOCKED
00194 #define EC_QUERYWAITING ((USHORT)0x0002)
00195 #define DNS_REGISTER ((ULONG)0x00000001L)
00196 #define DNS_UNREGISTER ((ULONG)0x00000002L)
00197 #define DNS_FILTERON ((ULONG)0x00000004L)
00198 #define DNS_FILTEROFF ((ULONG)0x00000008L)
00199 
00200 /* structure definitions */
00201 typedef struct
00202 {
00203    ULONG       cb;
00204    ULONG       hUser;
00205    HCONV       hConvPartner;
00206    HSZ         hszServicePartner;
00207    HSZ         hszServiceRequest;
00208    HSZ         hszTopic;
00209    HSZ         hszItem;
00210    USHORT      usFormat;
00211    USHORT      fsType;
00212    USHORT      fsStatus;
00213    USHORT      usState;
00214    ULONG       ulLastError;
00215    HCONVLIST   hConvList;
00216    CONVCONTEXT ConvCtxt;
00217    HWND        hwnd;
00218    HWND        hwndPartner;
00219 } CONVINFO, *PCONVINFO;
00220 
00221 typedef struct
00222 {
00223    HSZ hszService;
00224    HSZ hszTopic;
00225 } HSZPAIR, *PHSZPAIR;
00226 
00227 typedef struct
00228 {
00229    ULONG       cb;
00230    ULONG       ulTime;
00231    ULONG       hTask;
00232    ULONG       ulRet;
00233    USHORT      fsType;
00234    USHORT      usFormat;
00235    HCONV       hConv;
00236    HSZ         hsz1;
00237    HSZ         hsz2;
00238    HDATA       hData;
00239    ULONG       ulData1;
00240    ULONG       ulData2;
00241    CONVCONTEXT ConvCtxt;
00242    ULONG       cbData;
00243    BYTE        abData[32];
00244 } MONCBSTRUCT, *PMONCBSTRUCT;
00245 
00246 typedef struct
00247 {
00248    ULONG cb;
00249    BOOL  fConnect;
00250    ULONG ulTime;
00251    ULONG hTaskPartner;
00252    HSZ   hszService;
00253    HSZ   hszTopic;
00254    HCONV hConvClient;
00255    HCONV hConvServer;
00256 } MONCONVSTRUCT, *PMONCONVSTRUCT;
00257 
00258 typedef struct
00259 {
00260    ULONG cb;
00261    ULONG ulLastError;
00262    ULONG ulTime;
00263    ULONG hTask;
00264 } MONERRSTRUCT, *PMONERRSTRUCT;
00265 
00266 typedef struct
00267 {
00268    ULONG  cb;
00269    USHORT fsAction;
00270    ULONG  ulTime;
00271    HSZ    hsz;
00272    ULONG  hTask;
00273    ULONG  ulReserved;
00274    CHAR    szString[1];
00275 } MONHSZSTRUCT, *PMONHSZSTRUCT;
00276 
00277 typedef struct
00278 {
00279    ULONG  cb;
00280    ULONG  ulTime;
00281    ULONG  hTask;
00282    HSZ    hszService;
00283    HSZ    hszTopic;
00284    HSZ    hszItem;
00285    HCONV  hConvServer;
00286    HCONV  hConvClient;
00287    BOOL   fServer;
00288    BOOL   fEstablished;
00289    USHORT fsStatus;
00290    USHORT usFormat;
00291 } MONLINKSTRUCT, *PMONLINKSTRUCT;
00292 
00293 typedef struct
00294 {
00295    ULONG  cb;
00296    HWND   hwndTo;
00297    ULONG  ulTime;
00298    ULONG  hTask;
00299    ULONG  idMsg;
00300    MPARAM mp1;
00301    MPARAM mp2;
00302    USHORT fsStatus;
00303    USHORT usFormat;
00304    USHORT offszString1;
00305    USHORT offszString2;
00306    ULONG  cbData;
00307    BYTE   abData[32];
00308 } MONMSGSTRUCT, *PMONMSGSTRUCT;
00309 
00310 
00311 /* API definitions */
00312 BOOL (* APIENTRY WinDdeAbandonTransaction)(HDDEINST, HCONV, ULONG);
00313 PVOID (* APIENTRY WinDdeAccessData)(HDATA, PULONG);
00314 HDATA (* APIENTRY WinDdeAddData)(HDATA, PVOID, ULONG, ULONG);
00315 ULONG (* APIENTRY WinDdeCompareStringHandles)(HSZ, HSZ, ULONG);
00316 HCONV (* APIENTRY WinDdeConnect)(HDDEINST, HSZ, HSZ, PCONVCONTEXT);
00317 HCONVLIST (* APIENTRY WinDdeConnectList)(HDDEINST, HSZ, HSZ, HCONVLIST, PCONVCONTEXT);
00318 HDATA (* APIENTRY WinDdeCreateDataHandle)(PVOID, ULONG, ULONG, HSZ, USHORT, ULONG);
00319 HSZ (* APIENTRY WinDdeCreateStringHandle)(PSZ, ULONG);
00320 BOOL (* APIENTRY WinDdeDisconnect)(HCONV);
00321 BOOL (* APIENTRY WinDdeDisconnectList)(HCONVLIST);
00322 BOOL (* APIENTRY  WinDdeEnableCallback)(HDDEINST, HCONV, ULONG);
00323 BOOL (* APIENTRY WinDdeFreeDataHandle)(HDATA);
00324 BOOL (* APIENTRY WinDdeFreeStringHandle)(HSZ);
00325 ULONG (* APIENTRY WinDdeGetData)(HDATA, PVOID, ULONG, ULONG);
00326 ULONG (* APIENTRY WinDdeInitialize)(PHDDEINST, PFNDDECB, ULONG, ULONG);
00327 BOOL (* APIENTRY WinDdeKeepStringHandle)(HSZ);
00328 HDATA (* APIENTRY WinDdeNameService)(HDDEINST, HSZ, HSZ, ULONG);
00329 BOOL (* APIENTRY WinDdePostAdvise)(HDDEINST, HSZ, HSZ);
00330 ULONG (* APIENTRY WinDdeQueryConvInfo)(HCONV, ULONG, PCONVINFO);
00331 HCONV (* APIENTRY WinDdeQueryNextServer)(HCONVLIST, HCONV);
00332 ULONG (* APIENTRY WinDdeQueryString)(HSZ, PSZ, ULONG, ULONG);
00333 HCONV (* APIENTRY WinDdeReconnect)(HCONV);
00334 BOOL (* APIENTRY WinDdeSetUserHandle)(HCONV, ULONG, ULONG);
00335 HDATA (* APIENTRY WinDdeSubmitTransaction)(PVOID, ULONG, HCONV, HSZ, USHORT, USHORT, ULONG, PULONG);
00336 BOOL (* APIENTRY WinDdeUninitialize)(HDDEINST);
00337 
00338 /* restore structure packing */
00339 #pragma pack()
00340 
00341 #endif /* _H_DDEML */
00342 
00343 typedef ULONG DWORD;
00344 typedef PBYTE LPBYTE;
00345 typedef HDATA HDDEDATA;
00346 
00347 #define CP_WINANSI    0  //  When 0 is specified for codepage on these
00348                          //  dde functions, it will use the codepage
00349                          //  that is associated with the current thread.
00350                          //  CP_WINANSI in win32 means that the non
00351                          //  unicode version of DdeCreateStringHandle
00352                          //  was used.