1 /* ncbiwin.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * Although all reasonable efforts have been taken to ensure the accuracy 15 * and reliability of the software and data, the NLM and the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * =========================================================================== 25 * 26 * File Name: ncbiwin.h 27 * 28 * Author: Gish, Kans, Ostell, Schuler 29 * 30 * Version Creation Date: 1/1/91 31 * 32 * $Revision: 6.13 $ 33 * 34 * File Description: 35 * underlying window toolbox import 36 * 37 * Modifications: 38 * -------------------------------------------------------------------------- 39 * $Log: ncbiwin.h,v $ 40 * Revision 6.13 2010/06/30 15:54:38 ucko 41 * Handle 64-bit Darwin builds, which require disabling WIN_MAC because 42 * Carbon is 32-bit-only. 43 * 44 * Revision 6.12 2006/11/24 20:05:36 kans 45 * include Carbon/Carbon.h if not MWERKS - attempting to simplify Xcode search paths 46 * 47 * Revision 6.11 2006/09/14 19:51:37 ivanov 48 * Added defines for missed *LongPtr on MSVC6 49 * 50 * Revision 6.10 2006/09/14 19:12:36 ivanov 51 * MSWIN: Define GCLP_HBRBACKGROUND and GWLP_WNDPROC for MSVC6 52 * 53 * Revision 6.9 2003/11/07 15:54:44 rsmith 54 * Remove obsolete and uneeded Macintosh headers Types.h and Windows.h 55 * 56 * Revision 6.8 2003/05/05 12:00:10 rsmith 57 * Change definitions before including windows.h when compiling with Codewarrior for Windows. 58 * 59 * Revision 6.7 2002/12/17 23:00:48 kans 60 * support for OS_UNIX_DARWIN for Mach-O executables (RGS) 61 * 62 * Revision 6.6 2002/06/13 16:14:07 kans 63 * fix includes for OS_UNIX_DARWIN with WIN_MAC (EN) 64 * 65 * Revision 6.5 2002/02/15 20:19:50 beloslyu 66 * bug fixed 67 * 68 * Revision 6.4 2002/02/15 19:53:28 beloslyu 69 * fix for HP-UX 70 * 71 * Revision 6.3 1999/12/21 17:34:56 kans 72 * Added ControlDefinitions.h to the Mac client portion to support universal headers version 3.3 (in preparation for Carbon compatibility) - churchill 73 * 74 * Revision 6.2 1999/02/12 16:01:41 vakatov 75 * Added a draft version of Nlm_GetEnvParamEx() 76 * Got rid of the old "PROTO" and "LIBCALL" prototype junk, etc. 77 * 78 * Revision 6.1 1997/12/12 20:32:55 kans 79 * several new MacOS includes 80 * 81 * Revision 5.6 1997/07/22 19:11:41 vakatov 82 * Separated Main() from GetArg[svc]() functions; [WIN_MSWIN] converged 83 * console and GUI libraries; [for WIN32-DLL] encapsulated global variables 84 * 85 * Revision 5.5 1997/01/28 21:19:12 kans 86 * <Desk.h>, <OSEvents.h> and <GestaltEqu.h> are obsolete in CodeWarrior 87 * 88 * Revision 5.4 1996/12/30 15:13:32 vakatov 89 * [WIN_MSWIN] Added argument "lpszCmdLine" to Nlm_SetupArguments() 90 * 91 * Revision 5.3 1996/12/03 21:48:33 vakatov 92 * Adopted for 32-bit MS-Windows DLLs 93 * 94 * Revision 5.2 1996/08/21 20:48:55 vakatov 95 * OS_NT --> WIN32 96 * 97 * Revision 5.1 1996/08/19 18:46:25 vakatov 98 * [WIN32] Made modifications to let one create console applications 99 * 100 * Revision 4.2 1996/02/17 17:19:44 ostell 101 * added OS_NT to include direct.h 102 * 103 * Revision 4.1 1996/02/15 22:00:49 kans 104 * changed platform symbol back to OS_NT 105 * 106 * 06-14-94 Schuler Add LIBCALL to SetupArguments 107 * ========================================================================== 108 */ 109 110 #ifndef _NCBIWIN_ 111 #define _NCBIWIN_ 112 113 #undef VoidPtr 114 #undef Pointer 115 #undef Handle 116 #undef Char 117 #undef CharPtr 118 #undef Uchar 119 #undef UcharPtr 120 #undef Boolean 121 #undef BoolPtr 122 #undef Byte 123 #undef BytePtr 124 #undef Int1 125 #undef Int1Ptr 126 #undef Uint1 127 #undef Uint1Ptr 128 #undef Int2 129 #undef Int2Ptr 130 #undef Uint2 131 #undef Uint2Ptr 132 #undef Int4 133 #undef Int4Ptr 134 #undef Uint4 135 #undef Uint4Ptr 136 #undef FloatLo 137 #undef FloatLoPtr 138 #undef FloatHi 139 #undef FloatHiPtr 140 141 #ifdef WIN_MAC 142 #ifndef __MWERKS__ 143 #include <Carbon/Carbon.h> 144 #endif 145 #ifdef __MWERKS__ 146 #include <Controls.h> 147 #if UNIVERSAL_INTERFACES_VERSION > 0x0320 148 #include <ControlDefinitions.h> /* pjc added 11/20/99 */ 149 #endif 150 #ifndef OS_UNIX_DARWIN 151 #include <DiskInit.h> 152 #include <Packages.h> 153 #include <SegLoad.h> 154 #include <StandardFile.h> /* dgg added 12dec93 */ 155 #endif 156 #include <Devices.h> 157 #include <Dialogs.h> 158 #include <Events.h> 159 #include <Files.h> 160 #include <Fonts.h> 161 #include <Lists.h> 162 #include <Memory.h> 163 #include <Menus.h> 164 #include <OSUtils.h> 165 #include <Quickdraw.h> 166 #include <TextEdit.h> 167 #include <ToolUtils.h> 168 /* 169 #include <Types.h> 170 #include <Windows.h> 171 */ 172 #include <Sound.h> 173 #include <Folders.h> 174 #endif 175 #elif defined(OS_UNIX_DARWIN) 176 #include <CoreServices/CoreServices.h> 177 #endif 178 179 /* used in ncbifile.c *****/ 180 #ifdef OS_MAC 181 #ifdef __MWERKS__ 182 #include <Errors.h> 183 #include <Gestalt.h> 184 #include <MacMemory.h> 185 #include <Processes.h> 186 #endif 187 #endif 188 189 #ifdef OS_UNIX_SUN 190 #include <sys/file.h> 191 #include <sun/dkio.h> 192 #include <sys/buf.h> 193 #include <scsi/targets/srdef.h> 194 #endif 195 196 #ifdef OS_MSWIN 197 #ifndef WIN16 198 #include <fcntl.h> /* for setmode() */ 199 #include <io.h> 200 #endif 201 #ifdef COMP_MSC 202 #include <direct.h> 203 #endif 204 #ifdef COMP_BOR 205 #include <dir.h> 206 #endif 207 #endif 208 209 #ifdef OS_VMS 210 #include <stat.h> /* fstat function and buffer definition */ 211 #include <fab.h> /* RFM (Record Format) definitions */ 212 #endif 213 214 /* end of ncbifile section */ 215 216 #ifdef OS_MSWIN 217 # ifndef WIN16 218 # undef Beep 219 # endif 220 # ifndef COMP_METRO 221 # undef TRUE 222 # undef FALSE 223 # undef NULL 224 # undef FAR 225 # undef NEAR 226 # undef PASCAL 227 # undef CDECL 228 # define STRICT 229 # endif 230 # define NOKANJI 231 # define NODBCS 232 # define NOCOMM 233 # define NOSOUND 234 # define NOPROFILER 235 # define NOKEYBOARDINFO 236 # include <windows.h> 237 # include <windowsx.h> 238 /* MSVC 6.0 or less */ 239 # if defined(COMP_MSC) && (_MSC_VER < 1300) 240 # ifndef GCLP_HBRBACKGROUND 241 # define GCLP_HBRBACKGROUND GCL_HBRBACKGROUND 242 # endif 243 # ifndef GWLP_WNDPROC 244 # define GWLP_WNDPROC GWL_WNDPROC 245 # endif 246 # ifndef GetWindowLongPtr 247 # define GetWindowLongPtr GetWindowLong 248 # endif 249 # ifndef SetWindowLongPtr 250 # define SetWindowLongPtr SetWindowLong 251 # endif 252 # ifndef GetClassLongPtr 253 # define GetClassLongPtr GetClassLong 254 # endif 255 # endif 256 #endif /* OS_MSWIN */ 257 258 #ifdef WIN_MOTIF 259 #ifndef WIN_X 260 #define WIN_X 261 #endif 262 #endif 263 264 #if defined(WIN_X) 265 #if !defined(OS_UNIX_HPUX) 266 #include <X11/Xlib.h> 267 #include <X11/Xutil.h> 268 #include <X11/Xos.h> 269 #include <X11/Xresource.h> 270 #include <X11/Intrinsic.h> 271 #include <X11/StringDefs.h> 272 #endif 273 #include <X11/cursorfont.h> 274 #endif 275 276 #ifdef WIN_MOTIF 277 #include <Xm/Xm.h> 278 #include <Xm/AtomMgr.h> 279 #include <Xm/BulletinB.h> 280 #include <Xm/CascadeB.h> 281 #include <Xm/DrawingA.h> 282 #include <Xm/Form.h> 283 #include <Xm/Label.h> 284 #include <Xm/List.h> 285 #include <Xm/MainW.h> 286 #include <Xm/MenuShell.h> 287 #include <Xm/PanedW.h> 288 #include <Xm/Protocols.h> 289 #include <Xm/PushB.h> 290 #include <Xm/RowColumn.h> 291 #include <Xm/ScrollBar.h> 292 #include <Xm/ScrolledW.h> 293 #include <Xm/Separator.h> 294 #include <Xm/Text.h> 295 #include <Xm/TextF.h> 296 #include <Xm/ToggleB.h> 297 #endif 298 299 #include <time.h> 300 301 302 #undef NLM_EXTERN 303 #ifdef NLM_IMPORT 304 #define NLM_EXTERN NLM_IMPORT 305 #else 306 #define NLM_EXTERN extern 307 #endif 308 309 310 #ifdef __cplusplus 311 extern "C" { 312 #endif 313 314 NLM_EXTERN void Nlm_SetupArguments(int argc, char *argv[]); 315 316 #ifdef __cplusplus 317 } 318 #endif 319 320 #undef NLM_EXTERN 321 #ifdef NLM_EXPORT 322 #define NLM_EXTERN NLM_EXPORT 323 #else 324 #define NLM_EXTERN 325 #endif 326 327 #endif /* _NCBIWIN_ */ 328