![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * F O X P r i v a t e I n c l u d e F i l e s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2002 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: xincs.h,v 1.34.4.1 2002/07/08 17:08:52 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef XINCS_H 00025 #define XINCS_H 00026 00027 00028 //////////////////// DO NOT INCLUDE THIS PRIVATE HEADER FILE ////////////////// 00029 00030 00031 /************************ Platform Dependent Headers ***********************/ 00032 00033 // Basic includes 00034 #include <stdio.h> 00035 #include <stdlib.h> 00036 #include <stdarg.h> 00037 #include <limits.h> 00038 #include <math.h> 00039 #include <float.h> 00040 #include <string.h> 00041 #include <errno.h> 00042 #include <signal.h> 00043 #include <time.h> 00044 #include <ctype.h> 00045 #include <locale.h> 00046 #include <sys/types.h> 00047 #include <sys/stat.h> 00048 00049 #ifndef WIN32 00050 00051 #include <grp.h> 00052 #include <pwd.h> 00053 #include <fcntl.h> 00054 00055 #else 00056 00057 #ifdef _MSC_VER /* Microsoft Visual C++ */ 00058 #include <direct.h> 00059 #include <io.h> /* for _access() */ 00060 #define stat _stat 00061 #define lstat _stat 00062 #define getcwd _getcwd 00063 #define mkdir _mkdir 00064 #define access _access 00065 #define vsnprintf _vsnprintf 00066 #define execl _execl 00067 #define execlp _execlp 00068 #define execle _execle 00069 #define execv _execv 00070 #define execve _execve 00071 #define execvp _execvp 00072 #define strdup _strdup 00073 #endif 00074 #ifdef __BORLANDC__ /* Borland C++ Builder */ 00075 #include <dir.h> 00076 #include <io.h> /* for _access() */ 00077 #if __BORLANDC__ <= 0x0530 /* C++ Builder 3.0 */ 00078 #define vsnprintf(a, b, c, d) vsprintf(a, c, d) 00079 #endif 00080 #endif 00081 #ifdef __MINGW32__ /* GCC MingW32 */ 00082 #include <direct.h> 00083 #define vsnprintf _vsnprintf 00084 #endif 00085 #ifdef __SC__ /* Digital Mars C++ Compiler */ 00086 #include <direct.h> 00087 #include <io.h> /* for _access() */ 00088 #define vsnprintf _vsnprintf 00089 #endif 00090 00091 #endif 00092 00093 #ifdef HAVE_UNISTD_H 00094 #include <unistd.h> 00095 #endif 00096 #ifdef HAVE_SYS_WAIT_H 00097 #include <sys/wait.h> 00098 #endif 00099 #ifdef TIME_WITH_SYS_TIME 00100 #include <sys/time.h> 00101 #include <time.h> 00102 #else 00103 #ifdef HAVE_SYS_TIME_H 00104 #include <sys/time.h> 00105 #else 00106 #include <time.h> 00107 #endif 00108 #endif 00109 #ifdef HAVE_SYS_PARAM_H 00110 #include <sys/param.h> 00111 #endif 00112 #ifdef HAVE_SYS_SELECT_H 00113 #if (!defined(__MINGW32__)) && (!defined(hpux)) 00114 #include <sys/select.h> 00115 #endif 00116 #endif 00117 #ifdef HAVE_DIRENT_H 00118 #include <dirent.h> 00119 #define NAMLEN(dirent) strlen((dirent)->d_name) 00120 #else 00121 #define dirent direct 00122 #define NAMLEN(dirent) (dirent)->d_namlen 00123 #ifdef HAVE_SYS_NDIR_H 00124 #include <sys/ndir.h> 00125 #endif 00126 #ifdef HAVE_SYS_DIR_H 00127 #include <sys/dir.h> 00128 #endif 00129 #ifdef HAVE_NDIR_H 00130 #include <ndir.h> 00131 #endif 00132 #endif 00133 #ifdef HAVE_XSHM 00134 #include <sys/ipc.h> 00135 #include <sys/shm.h> 00136 #endif 00137 00138 00139 // MS-Windows 00140 #ifdef WIN32 00141 #ifndef STRICT 00142 #define STRICT 00143 #endif 00144 #ifndef WIN32_LEAN_AND_MEAN 00145 #define WIN32_LEAN_AND_MEAN 00146 #endif 00147 #include <windows.h> 00148 #ifndef __CYGWIN__ 00149 #include <winsock2.h> 00150 #endif /* !__CYGWIN__ */ 00151 #include <commctrl.h> // For _TrackMouseEvent 00152 00153 // X windows includes 00154 #else 00155 #include <X11/X.h> 00156 #include <X11/Xlib.h> 00157 #include <X11/Xcms.h> 00158 #include <X11/Xutil.h> 00159 #include <X11/Xresource.h> 00160 #include <X11/Xatom.h> 00161 #include <X11/cursorfont.h> 00162 #ifdef HUMMINGBIRD 00163 #include <X11/XlibXtra.h> 00164 #endif 00165 #ifdef HAVE_XSHM 00166 #include <X11/extensions/XShm.h> 00167 #endif 00168 #ifndef XlibSpecificationRelease // not defined until X11R5 00169 #define NO_XIM 00170 #elif XlibSpecificationRelease < 6 // need at least Xlib X11R6 00171 #define NO_XIM 00172 #endif 00173 #endif 00174 00175 // OpenGL includes 00176 #ifdef HAVE_OPENGL 00177 #include <GL/gl.h> 00178 #include <GL/glu.h> 00179 #ifndef WIN32 00180 #include <GL/glx.h> 00181 #endif 00182 #endif 00183 00184 // Maximum path length 00185 #ifndef MAXPATHLEN 00186 #if defined(PATH_MAX) 00187 #define MAXPATHLEN PATH_MAX 00188 #elif defined(_MAX_PATH) 00189 #define MAXPATHLEN _MAX_PATH 00190 #elif defined(MAX_PATH) 00191 #define MAXPATHLEN MAX_PATH 00192 #else 00193 #define MAXPATHLEN 1024 00194 #endif 00195 #endif 00196 00197 // Modes for access(filename,mode) on Windows 00198 #ifdef WIN32 00199 #ifndef R_OK 00200 #define R_OK 4 00201 #endif 00202 #ifndef W_OK 00203 #define W_OK 2 00204 #endif 00205 #ifndef X_OK 00206 #define X_OK 1 00207 #endif 00208 #ifndef F_OK 00209 #define F_OK 0 00210 #endif 00211 #endif 00212 00213 // Printer stuff 00214 #ifdef WIN32 00215 #include <winspool.h> 00216 #endif 00217 00218 00219 // Shared library support 00220 #ifndef FXAPI 00221 #ifdef WIN32 00222 #ifdef FOXDLL 00223 #ifdef FOXDLL_EXPORTS 00224 #define FXAPI __declspec(dllexport) 00225 #else 00226 #define FXAPI __declspec(dllimport) 00227 #endif 00228 #endif 00229 #endif 00230 #endif 00231 00232 #ifndef FXAPI 00233 #define FXAPI 00234 #endif 00235 00236 /*********************** Platform Dependent Typedefs ***********************/ 00237 00238 00239 /*********************** Platform Dependent Globals ************************/ 00240 00241 00242 // Wheel support (OS >= W98, OS>=NT4.0) 00243 #ifdef WIN32 00244 #ifndef SPI_GETWHEELSCROLLLINES 00245 #define SPI_GETWHEELSCROLLLINES 104 00246 #endif 00247 #ifndef WM_MOUSEWHEEL 00248 #define WM_MOUSEWHEEL 0x020A 00249 #endif 00250 #endif 00251 00252 00253 // IBM VisualAge for C++ 3.5 00254 #if defined(__IBMCPP__) && defined(WIN32) 00255 #include <direct.h> 00256 #include <io.h> /* for _access() */ 00257 #define _mkdir(x) mkdir((char *)(x)) 00258 #define _vsnprintf(a, b, c, d) vsprintf(a, c, d) 00259 #define ICON_SMALL 0 00260 #define ICON_BIG 1 00261 #define bool int 00262 00263 // This declarations come from Microsoft SDK 00264 #define TME_HOVER 0x00000001 00265 #define TME_LEAVE 0x00000002 00266 #define TME_QUERY 0x40000000 00267 #define TME_CANCEL 0x80000000 00268 #define HOVER_DEFAULT 0xFFFFFFFF 00269 #define WM_MOUSEHOVER 0x02A1 00270 #define WM_MOUSELEAVE 0x02A3 00271 00272 typedef struct tagTRACKMOUSEEVENT { 00273 DWORD cbSize; 00274 DWORD dwFlags; 00275 HWND hwndTrack; 00276 DWORD dwHoverTime; 00277 } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT; 00278 00279 WINUSERAPI 00280 BOOL 00281 WINAPI 00282 TrackMouseEvent( 00283 IN OUT LPTRACKMOUSEEVENT lpEventTrack); 00284 00285 #ifdef __GL_H__ 00286 #define GL_COLOR_LOGIC_OP 0x0BF2 00287 #define GL_POLYGON_OFFSET_POINT 0x2A01 00288 #define GL_POLYGON_OFFSET_LINE 0x2A02 00289 WINGDIAPI void APIENTRY glPolygonOffset (GLfloat factor,GLfloat units); 00290 #endif 00291 00292 #endif 00293 00294 #endif