osincludes.h

Go to the documentation of this file.
00001 
00002 /*  $Id: osincludes.h 1328 2006-04-24 20:02:59Z sethdill $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 /*
00029     2004-10-23 aradke: From now on, add all system includes to this file.
00030         It is included from frontier.h, which is included in all source files.
00031 */
00032 
00033 #ifndef __osincludes_h__
00034 #define __osincludes_h__
00035 
00036 
00037 #ifdef WIN95VERSION
00038 
00039     #define WIN32_LEAN_AND_MEAN 1
00040     #define _WIN32_DCOM 1
00041     #define CINTERFACE 1
00042 
00043     #include <windows.h>
00044 
00045     #include <commdlg.h>
00046     #include <commctrl.h>
00047     #include <windowsx.h>
00048     #include <objbase.h>
00049     #include <shlobj.h>
00050     #include <exdisp.h>
00051     #include <Shlwapi.h>
00052     #include <Shellapi.h>
00053     #include <tlhelp32.h>
00054     #include <malloc.h>
00055     #include <crtdbg.h>
00056     #include <mmsystem.h>
00057     #include <winsock2.h>
00058     #include <mswsock.h>
00059 
00060     #undef __cplusplus
00061     #include <objbase.h>
00062     #include <mlang.h>
00063 
00064 #endif /* WIN95VERSION */
00065 
00066 
00067 #ifdef MACVERSION
00068 
00069     #define OTDEBUG 1   /* must define before including OpenTransport headers */
00070 
00071     #if TARGET_API_MAC_CARBON
00072 
00073         #ifdef FRONTIER_FRAMEWORK_INCLUDES /* building for Mach-O with framework-style includes */
00074 
00075             #ifdef FRONTIER_FLAT_HEADERS /* building for Mach-O with flat header-style includes */
00076 
00077                 #include <Carbon.h>
00078                 #include <ApplicationServices.h>
00079                 #include <Movies.h>
00080 
00081             #else
00082             
00083             #include <Carbon/Carbon.h>
00084             #include <ApplicationServices/ApplicationServices.h>
00085             #include <QuickTime/Movies.h>
00086 
00087             #endif
00088 
00089             #define ELASTERRNO  ELAST
00090 
00091             /* cribbed from pre-OSX StandardFile.h */
00092             struct StandardFileReply {
00093               Boolean             sfGood;
00094               Boolean             sfReplacing;
00095               OSType              sfType;
00096               FSSpec              sfFile;
00097               ScriptCode          sfScript;
00098               short               sfFlags;
00099               Boolean             sfIsFolder;
00100               Boolean             sfIsVolume;
00101               long                sfReserved1;
00102               short               sfReserved2;
00103             };
00104             typedef struct StandardFileReply        StandardFileReply;
00105 
00106         #else /*CFM*/
00107 
00108             #define ACCESSOR_CALLS_ARE_FUNCTIONS    1
00109             #define OPAQUE_TOOLBOX_STRUCTS          1
00110     
00111             #define OTUNIXERRORS    1
00112     
00113             #define OLDROUTINENAMES     0
00114             #define OLDROUTINELOCATIONS 0
00115             #define CGLUESUPPORTED      0
00116     
00117             #define PtoCstr     p2cstr
00118             #define CtoPstr     c2pstr
00119             #define PtoCString  p2cstr
00120             #define CtoPString  c2pstr
00121     
00122             #define TRUE        true
00123             #define FALSE       false
00124     
00125             #include <Carbon.h>
00126             #include <CFBundle.h>
00127             #include <MacHelp.h>
00128             #include <Movies.h>
00129     
00130         #endif
00131     
00132         /* cribbed from pre-OSX AppleTalk.h -- for TargetID */
00133         struct EntityName {
00134           Str32Field          objStr;
00135           Str32Field          typeStr;
00136           Str32Field          zoneStr;
00137         };
00138         typedef struct EntityName               EntityName;
00139     
00140         /* cribbed from pre-OSX PPCToolbox.h -- for TargetID */
00141         typedef SInt16 PPCLocationKind;
00142         typedef SInt16 PPCPortKinds;
00143         enum {
00144           ppcByCreatorAndType           = 1,    /* Port type is specified as colloquial Mac creator and type */
00145           ppcByString                   = 2     /* Port type is in pascal string format */
00146         };
00147         typedef SInt16 PPCXTIAddressType;
00148         struct PPCXTIAddress {
00149           PPCXTIAddressType   fAddressType;           /* A constant specifying what kind of network address this is */
00150           UInt8               fAddress[96];           /* The contents of the network address (variable length, NULL terminated). */
00151         };
00152         typedef struct PPCXTIAddress            PPCXTIAddress;
00153         typedef PPCXTIAddress *                 PPCXTIAddressPtr;
00154         struct PPCAddrRec {
00155           UInt8               Reserved[3];            /* reserved - must be initialize to 0          */
00156           UInt8               xtiAddrLen;             /* size of the xtiAddr field             */
00157           PPCXTIAddress       xtiAddr;                /* the transport-independent network address   */
00158         };
00159         typedef struct PPCAddrRec               PPCAddrRec;
00160         typedef PPCAddrRec *                    PPCAddrRecPtr;
00161         struct LocationNameRec {
00162           PPCLocationKind     locationKindSelector;   /* which variant */
00163           union {
00164             EntityName          nbpEntity;            /* NBP name entity                   */
00165             Str32               nbpType;              /* just the NBP type string, for PPCOpen  */
00166             PPCAddrRec          xtiType;              /* an XTI-type network address record     */
00167           }                       u;
00168         };
00169         typedef struct LocationNameRec          LocationNameRec;
00170         typedef LocationNameRec *               LocationNamePtr;
00171         struct PPCPortRec {
00172           ScriptCode          nameScript;             /* script of name */
00173           Str32Field          name;                   /* name of port as seen in browser */
00174           PPCPortKinds        portKindSelector;       /* which variant */
00175           union {
00176             Str32               portTypeStr;          /* pascal type string */
00177             struct {
00178               OSType              portCreator;
00179               OSType              portType;
00180             }                       port;
00181           }                       u;
00182         };
00183         typedef struct PPCPortRec               PPCPortRec;
00184         typedef PPCPortRec *                    PPCPortPtr;
00185         struct PortInfoRec {
00186           SInt8               filler1;
00187           Boolean             authRequired;
00188           PPCPortRec          name;
00189         };
00190         typedef struct PortInfoRec              PortInfoRec;
00191         typedef PortInfoRec *                   PortInfoPtr;
00192     
00193         /* cribbed from pre-OSX EPPC.h -- for TargetID */
00194         struct TargetID {
00195           long                sessionID;
00196           PPCPortRec          name;
00197           LocationNameRec     location;
00198           PPCPortRec          recvrName;
00199         };
00200         typedef struct TargetID                 TargetID;
00201         typedef TargetID *                      TargetIDPtr;
00202         typedef TargetIDPtr *                   TargetIDHandle;
00203         typedef TargetIDHandle                  TargetIDHdl;
00204         typedef TargetID                        SenderID;
00205         typedef SenderID *                      SenderIDPtr;
00206     
00207     #endif /*TARGET_API_MAC_CARBON*/
00208     
00209     #if TARGET_API_MAC_OS8
00210     
00211         #define ACCESSOR_CALLS_ARE_FUNCTIONS    0
00212         #define OPAQUE_TOOLBOX_STRUCTS          0
00213 
00214         #define OTUNIXERRORS    1
00215     
00216         #define OLDROUTINENAMES     0
00217         #define OLDROUTINELOCATIONS 0
00218         #define CGLUESUPPORTED      0
00219     
00220         #define PtoCstr     p2cstr
00221         #define CtoPstr     c2pstr
00222         #define PtoCString  p2cstr
00223         #define CtoPString  c2pstr
00224     
00225         #define TRUE        true
00226         #define FALSE       false
00227     
00228         #include <AEObjects.h>
00229         #include <AEPackObject.h>
00230         #include <AERegistry.h>
00231         #include <AEUserTermTypes.h>
00232         #include <Aliases.h>
00233         #include <AppleEvents.h>
00234         #include <AppleScript.h>
00235         #include <ASRegistry.h>
00236         #include <Balloons.h>
00237         #include <CodeFragments.h>
00238         #include <ColorPicker.h>
00239         #include <Components.h>
00240         #include <ConditionalMacros.h>
00241         #include <Controls.h>
00242         //Code change by Timothy Paustian Saturday, April 29, 2000 9:29:50 PM
00243         //Changed to allow Use of Universal Headers 3.3.1
00244         #include <ControlDefinitions.h>
00245         #include <Devices.h>
00246         #include <Dialogs.h>
00247         #include <DiskInit.h>
00248         #include <EPPC.h>
00249         #include <Events.h>
00250         #include <Files.h>
00251         #include <FileTypesAndCreators.h>
00252         #include <FixMath.h>
00253         #include <Folders.h>
00254         #include <Fonts.h>
00255         #include <fp.h>
00256         #include <Gestalt.h>
00257         #include <Icons.h>
00258         #include <Lists.h>
00259         #include <LowMem.h>
00260         #include <MacErrors.h>
00261         #include <MacTypes.h>
00262         #include <MacWindows.h>
00263         #include <Math64.h>
00264         #include <Memory.h>
00265         #include <Menus.h>
00266         #include <MixedMode.h>
00267         #include <Movies.h>
00268         #include <Navigation.h>
00269         #include <Notification.h>
00270         #include <OpenTransport.h>
00271         #include <OpenTptInternet.h>
00272         #include <OSA.h>
00273         #include <OSAComp.h>
00274         #include <OSUtils.h>
00275         #include <Packages.h>
00276         #include <Palettes.h>
00277         #include <PLStringFuncs.h>
00278         #include <PPCToolbox.h>
00279         #include <Printing.h>
00280         #include <Processes.h>
00281         #include <QDOffscreen.h>
00282         #include <Quickdraw.h>
00283         #include <Resources.h>
00284         #include <Scrap.h>
00285         //Code change by Timothy Paustian Sunday, May 7, 2000 8:37:27 PM
00286         //Needed for compilation with UH 3.4
00287         #include <Script.h>
00288         #include <SegLoad.h>
00289         #include <Sound.h> 
00290         #include <StandardFile.h>
00291         #include <Strings.h>
00292         #include <TextEdit.h>
00293         #include <TextEncodingConverter.h>
00294         #include <TextUtils.h>
00295         #include <Threads.h>
00296         #include <ToolUtils.h>
00297         #include <Traps.h>
00298         #include <UnicodeConverter.h>
00299 
00300     #endif /*TARGET_API_MAC_OS8*/
00301 
00302     #define topLeft(r)  (((Point *) &(r))[0])
00303     #define botRight(r) (((Point *) &(r))[1])
00304 
00305 #endif /*MACVERSION*/
00306 
00307 /* common standard C headers */
00308 
00309 #include <ctype.h>
00310 #include <math.h>
00311 #include <stdlib.h>
00312 #include <stdio.h>
00313 #include <string.h>
00314 #include <assert.h>
00315 
00316 
00317 #endif /* __osincludes_h__ */

Generated on Wed May 31 18:19:58 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6