00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #define _PACK_OFF pack(push,1)
00011 #define _PACK_ON pack(pop)
00012
00013
00014 #define SEEK_SET 0
00015 #define SEEK_CUR 1
00016 #define SEEK_END 2
00017
00018 typedef void * PTR;
00019 typedef unsigned long int iPTR;
00020
00021
00022
00023
00024
00025 #define BOOL signed char //Boolean (FALSE,TRUE,NA)
00026
00027
00028
00029 typedef unsigned char char8;
00030 typedef unsigned short int char16;
00031 typedef unsigned int char32;
00032 typedef unsigned long int char32l;
00033 typedef unsigned char uint8;
00034 typedef unsigned short int uint16;
00035 typedef unsigned int uint32;
00036 typedef unsigned long int uint32l;
00037 typedef signed char sint8;
00038 typedef signed short int sint16;
00039 typedef signed int sint32;
00040 typedef signed long int sint32l;
00041 typedef signed char int8;
00042 typedef signed short int int16;
00043 typedef signed int int32;
00044 typedef signed long int int32l;
00045 typedef float float32;
00046 typedef double float64;
00047 typedef long double float80;
00048
00049
00050 #ifndef DF_NO_INT64
00051 #ifdef longlong
00052 typedef unsigned longlong uint64;
00053 typedef signed longlong sint64;
00054 typedef signed longlong int64;
00055 #endif
00056 #endif
00057
00058 typedef unsigned int uint;
00059 typedef int sint;
00060
00061 #define FALSE 0
00062 #define TRUE 1
00063 #define ERROR (-1)
00064 #define NA (-2) //not applicable
00065
00066 #define RETRY 0 //DFInstaller requires RETRY to be == FALSE!
00067
00068 #define IGNORE 1
00069 #define ABORT 2
00070 #define CANCEL 3
00071
00072
00073
00074
00075 #ifndef FA_RDONLY
00076 #define FA_RDONLY 0x0001
00077 #define FA_HIDDEN 0x0002
00078 #define FA_SYSTEM 0x0004
00079 #define FA_LABEL 0x0008
00080 #define FA_DIREC 0x0010
00081 #define FA_ARCH 0x0020
00082 #define FA_DEVICE 0x0040
00083 #define FA_NORMAL 0x0080
00084 #define FA_TEMP 0x0100
00085 #define FA_SPARSE 0x0200
00086 #define FA_REPARSEPOINT 0x0400
00087 #define FA_COMPRESSED 0x0800
00088 #define FA_OFFLINE 0x1000
00089 #define FA_INDEXED 0x2000
00090 #define FA_ENCRYPTED 0x4000
00091 #define FA_RESERVED 0x8000
00092 #endif
00093 #define FA_DIR FA_DIREC // some systems use this instead
00094 #define FA_EXEC 0x100 // unique to DF (linux only) same as S_IXUSR
00095
00096
00097 #ifndef SH_DENYNO
00098 #define SH_COMPAT 0x0000
00099 #define SH_DENYRW 0x0010
00100 #define SH_DENYWR 0x0020
00101 #define SH_DENYRD 0x0030
00102 #define SH_DENYNONE 0x0040
00103 #define SH_DENYNO SH_DENYNONE
00104 #endif
00105
00106
00107 #define FO_RDONLY 0
00108 #define FO_WRONLY 1
00109 #define FO_RDWR 2
00110 #define FO_APPEND 8
00111 #define FO_CREAT 0x0100
00112 #define FO_CREATE FO_CREAT
00113 #define FO_TRUNC 0x0200
00114 #define FO_EXCL 0x0400
00115
00116 #ifndef NULL
00117 #define NULL (0)
00118 #endif
00119
00120 #define WARNING (-2) //for EventLog()
00121 #define INFO (-3) //for EventLog()
00122
00123 #define SUCCESS (1)
00124 #define ENABLE (1)
00125 #define DISABLE (0)
00126 #define START (1)
00127 #define STOP (0)
00128 #define COMPLETE (1)
00129 #define INCOMPLETE (0)
00130 #define INPROGRESS (2)
00131 #define DONE COMPLETE
00132
00133
00134 #define NORTH 0x01
00135 #define EAST 0x02
00136 #define SOUTH 0x04
00137 #define WEST 0x08
00138
00139 #define LEFT WEST
00140 #define RIGHT EAST
00141 #define TOP NORTH
00142 #define UP NORTH
00143 #define BOTTOM SOUTH
00144 #define DOWN SOUTH
00145
00146 #define CENTER 0x10
00147 #define VERTICAL 0x20
00148 #define HORIZONTAL 0x40
00149
00150 #define OPAQUE (FALSE)
00151 #define TRANSPARENT (TRUE)
00152
00153 #define HOLLOW (FALSE)
00154 #define FILLED (TRUE)
00155
00156
00157 #ifdef DEBUG
00158 #define ChkValid(x) if (!(x)) SystemCode::RaiseException(ERR_ASSERT);
00159 #else
00160 #define ChkValid(x)
00161 #endif
00162
00163 #define Max(a,b) (((a) > (b)) ? (a) : (b))
00164 #define Min(a,b) (((a) < (b)) ? (a) : (b))
00165 #define Abs(a) ( ((a)<0) ? (-(a)) : (a))
00166
00167
00168 #define MEM_LOCKED 0x0000
00169 #define MEM_UNLOCKED 0x0001
00170 #define MEM_SHARE 0x0002
00171
00172
00173
00174 #define WND_NORMAL 0x0000 //default window
00175 #define WND_FULLSCREEN 0x0001 //full screen window
00176 #define WND_BORDER 0x0002 //thin 2 line border
00177 #define WND_TITLEBAR 0x0004 //titlebar on top
00178 #define WND_MAXIMIZEBOX 0x0008 //has Maximize button
00179 #define WND_MINIMIZEBOX 0x0010 //has Minimize button
00180 #define WND_SYSMENU 0x0020 //top-left icon menu
00181 #define WND_MAXIMIZE 0x0040 //maximized window
00182 #define WND_MINIMIZE 0x0080 //minimized window
00183 #define WND_SIZEABLE 0x0100 //sizeable window (think border)
00184 #define WND_HOLLOW 0x0200 //Special border for dialog boxes, etc.
00185 #define WND_POPUP 0x0400 //Popup Window (ie: MessageBox())
00186 #define WND_NODRAW 0x0800 //Do not draw Window (DF/4.3.0)
00187 #define WND_OPENGL WND_NODRAW //init for OpenGL use (DF/4.0)
00188 #define WND_DROPFILES 0x1000 //allow files to be dropped on window
00189 #define WND_GDI 0x20000000 //Use GDI only (win32 only)
00190 #define WND_DX 0x40000000 //Use DirectX only (win32 only)
00191
00192 #define WND_ENABLED 0x00010000 //an enabled window
00193 #define WND_VISIBLE 0x00020000 //visible window
00194 #define WND_CLIPCHILDREN 0x00040000 //children are clipped to parent
00195 #define WND_TABSTOP 0x00080000 //TAB will cycle thru these (Parents automatically get this)
00196 #define WND_POSITION 0x00100000 //do not pass Position changes to children
00197 #define WND_NOCLIP 0x00200000 //object is not clipped by parent (overrides WND_CLIPCHILDREN)
00198
00199
00200 #define WND_MENU 0x01000000 //size of menu bar
00201 #define WND_DESKTOP 0x02000000 //max size of a full window to fit around taskbar
00202
00203
00204 #define WND_MASK_ELEMENT (0x00ff0000)
00205
00206 #define MAX_COMPUTERNAME_LENGTH 31
00207
00208
00209 extern void _df_dialoginit_message();
00210 extern void _df_dialoginit_getfilename();
00211
00212
00213 #define MAXINT8 0x7f
00214 #define MAXUINT8 0xff
00215 #define MAXINT16 0x7fff
00216 #define MAXUINT16 0xffff
00217 #define MAXINT32 0x7fffffff
00218 #define MAXUINT32 0xffffffff
00219
00220 #ifndef MAX_PATH
00221 #define MAX_PATH 260 //16bitApps = 255
00222 #endif
00223