2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
2004-04-10 09:11:03 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
2007-10-09 11:35:47 +00:00
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
#ifndef __STDWX_H__
|
|
|
|
#define __STDWX_H__
|
|
|
|
|
2004-11-01 21:00:17 +00:00
|
|
|
|
2004-11-02 10:14:41 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
2004-10-23 07:13:18 +00:00
|
|
|
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
|
|
|
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
|
|
|
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
|
|
|
|
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
|
|
|
|
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
|
|
|
#define _WIN32_WINDOWS 0x0400 // Change this to the appropriate value to target Windows Me or later.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WIN32_IE // Allow use of features specific to IE 5.01 or later.
|
|
|
|
#define _WIN32_IE 0x0501 // Change this to the appropriate value to target IE 6.0 or later.
|
|
|
|
#endif
|
|
|
|
|
2004-11-02 10:14:41 +00:00
|
|
|
#endif
|
2004-11-01 21:00:17 +00:00
|
|
|
|
2005-07-19 13:11:29 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
#include <Carbon/Carbon.h>
|
|
|
|
#endif
|
|
|
|
|
2005-07-09 05:23:40 +00:00
|
|
|
#include <wx/wx.h>
|
2004-12-11 06:33:47 +00:00
|
|
|
#include <wx/config.h> // configuration support
|
2004-09-21 01:30:29 +00:00
|
|
|
#include <wx/debug.h> // diagnostics support
|
2004-12-03 22:47:51 +00:00
|
|
|
#include <wx/log.h> // logging support
|
2004-09-21 01:30:29 +00:00
|
|
|
#include <wx/accel.h> // accelerator support
|
|
|
|
#include <wx/regex.h> // regular expression support
|
|
|
|
#include <wx/cmdline.h> // command line support
|
|
|
|
#include <wx/settings.h> // system settings support
|
|
|
|
#include <wx/intl.h> // internationalization support
|
|
|
|
#include <wx/timer.h> // timer support
|
2005-06-22 10:51:34 +00:00
|
|
|
#include <wx/filename.h> // filesystem support
|
2004-09-21 01:30:29 +00:00
|
|
|
#include <wx/bitmap.h> // bitmap modification support
|
|
|
|
#include <wx/toolbar.h> // toolbars support
|
|
|
|
#include <wx/listctrl.h> // list control support
|
|
|
|
#include <wx/msgdlg.h> // messagebox dialog support
|
|
|
|
#include <wx/panel.h> // panel support
|
|
|
|
#include <wx/notebook.h> // notebook support
|
|
|
|
#include <wx/statline.h> // static line support
|
2004-10-28 07:03:06 +00:00
|
|
|
#include <wx/statbmp.h> // static bitmap support
|
2005-01-07 10:37:11 +00:00
|
|
|
#include <wx/stattext.h> // static text support
|
2004-10-27 21:10:22 +00:00
|
|
|
#include <wx/clipbrd.h> // clipboard support
|
2004-09-21 01:30:29 +00:00
|
|
|
#include <wx/datetime.h> // date/time support
|
2005-08-02 21:47:05 +00:00
|
|
|
#include <wx/taskbar.h> // taskbar support
|
2005-07-09 05:23:40 +00:00
|
|
|
#include <wx/image.h>
|
|
|
|
#include <wx/url.h>
|
2004-10-28 07:03:06 +00:00
|
|
|
#include <wx/textdlg.h>
|
2004-10-09 03:05:01 +00:00
|
|
|
#include <wx/mimetype.h>
|
|
|
|
#include <wx/event.h>
|
2004-12-02 07:43:47 +00:00
|
|
|
#include <wx/list.h>
|
|
|
|
#include <wx/icon.h>
|
2004-09-24 02:01:53 +00:00
|
|
|
#include <wx/utils.h>
|
2004-11-23 07:45:11 +00:00
|
|
|
#include <wx/process.h>
|
2005-07-08 06:30:25 +00:00
|
|
|
#include <wx/dynlib.h>
|
2005-06-22 10:51:34 +00:00
|
|
|
#include <wx/dialup.h>
|
2005-07-21 09:43:40 +00:00
|
|
|
#include <wx/cshelp.h>
|
2005-09-26 11:29:28 +00:00
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/wizard.h>
|
2006-06-23 08:20:08 +00:00
|
|
|
#include <wx/tooltip.h>
|
|
|
|
#include <wx/tipwin.h>
|
|
|
|
#include <wx/dc.h>
|
|
|
|
#include <wx/dcmemory.h>
|
|
|
|
#include <wx/dcclient.h>
|
|
|
|
#include <wx/dcbuffer.h>
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/gdicmn.h>
|
|
|
|
#include <wx/list.h>
|
|
|
|
#include <wx/timer.h>
|
|
|
|
#include <wx/colour.h>
|
|
|
|
#include <wx/control.h>
|
|
|
|
#include <wx/wfstream.h>
|
|
|
|
#include <wx/gifdecod.h>
|
|
|
|
#include <wx/xml/xml.h>
|
2006-10-09 18:08:31 +00:00
|
|
|
#include <wx/tokenzr.h>
|
2006-10-23 06:48:48 +00:00
|
|
|
#include <wx/dir.h>
|
2006-10-25 14:09:47 +00:00
|
|
|
#include <wx/filename.h>
|
2006-10-27 10:26:56 +00:00
|
|
|
#include <wx/sysopt.h>
|
2006-12-22 04:25:36 +00:00
|
|
|
#include <wx/cshelp.h>
|
2006-12-27 18:33:44 +00:00
|
|
|
#include <wx/grid.h>
|
2004-10-09 03:05:01 +00:00
|
|
|
|
2007-01-19 14:30:18 +00:00
|
|
|
#if wxCHECK_VERSION(2,8,0)
|
|
|
|
#include <wx/imaglist.h>
|
|
|
|
#endif
|
|
|
|
|
2005-07-09 05:23:40 +00:00
|
|
|
#ifdef _WIN32
|
2004-12-02 08:15:49 +00:00
|
|
|
|
2006-08-05 01:17:11 +00:00
|
|
|
// Visual Studio 2005 has extended the C Run-Time Library by including "secure"
|
|
|
|
// runtime functions and deprecating the previous function prototypes. Since
|
|
|
|
// we need to use the previous prototypes to maintain compatibility with other
|
|
|
|
// platforms we are going to disable the deprecation warnings if we are compiling
|
|
|
|
// on Visual Studio 2005
|
|
|
|
#if _MSC_VER >= 1400
|
|
|
|
#ifndef _CRT_SECURE_NO_DEPRECATE
|
|
|
|
#define _CRT_SECURE_NO_DEPRECATE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2004-12-02 08:15:49 +00:00
|
|
|
// Windows Headers
|
|
|
|
//
|
2005-07-21 09:43:40 +00:00
|
|
|
#include <windows.h>
|
2005-12-16 03:45:01 +00:00
|
|
|
#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
|
2004-12-02 08:15:49 +00:00
|
|
|
#include <crtdbg.h>
|
2005-12-16 03:45:01 +00:00
|
|
|
#endif
|
2006-05-01 21:36:38 +00:00
|
|
|
#include <dbghelp.h>
|
|
|
|
#include <tlhelp32.h>
|
2006-04-13 01:20:53 +00:00
|
|
|
#include <share.h>
|
2005-07-21 09:43:40 +00:00
|
|
|
#include <ole2.h>
|
|
|
|
#include <oleauto.h>
|
2007-03-27 17:42:45 +00:00
|
|
|
#include <wininet.h>
|
2007-04-03 13:14:30 +00:00
|
|
|
#include <shlobj.h>
|
2005-07-21 09:43:40 +00:00
|
|
|
|
|
|
|
#if wxUSE_ACCESSIBILITY
|
|
|
|
#include <oleacc.h>
|
2006-04-18 04:26:56 +00:00
|
|
|
#else
|
|
|
|
#pragma message("")
|
|
|
|
#pragma message("wxUSE_ACCESSIBILITY is not defined in setup.h for the wxWidgets library.")
|
|
|
|
#pragma message("***** Accessibility features are disabled *****")
|
|
|
|
#pragma message("")
|
2005-07-21 09:43:40 +00:00
|
|
|
#endif // wxUSE_ACCESSIBILITY
|
|
|
|
|
|
|
|
#include "wx/msw/ole/oleutils.h"
|
|
|
|
#include "wx/msw/winundef.h"
|
|
|
|
|
|
|
|
#ifndef OBJID_CLIENT
|
|
|
|
#define OBJID_CLIENT 0xFFFFFFFC
|
|
|
|
#endif
|
2004-12-02 08:15:49 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2004-09-10 23:17:08 +00:00
|
|
|
// Standard Libraries
|
|
|
|
//
|
2006-05-17 08:33:36 +00:00
|
|
|
#ifndef __APPLE__
|
2006-05-16 20:03:30 +00:00
|
|
|
#include <malloc.h>
|
2006-05-17 08:33:36 +00:00
|
|
|
#endif
|
2004-09-10 23:17:08 +00:00
|
|
|
|
|
|
|
// C headers
|
|
|
|
#include <cassert>
|
|
|
|
#include <cctype>
|
|
|
|
#include <cerrno>
|
|
|
|
#include <cmath>
|
|
|
|
#include <csetjmp>
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
#include <ctime>
|
2005-07-09 05:23:40 +00:00
|
|
|
#include <locale>
|
|
|
|
#include <cfloat>
|
2004-09-10 23:17:08 +00:00
|
|
|
|
2004-12-03 21:35:25 +00:00
|
|
|
|
2004-09-10 23:17:08 +00:00
|
|
|
// C++ headers
|
2005-12-16 03:45:01 +00:00
|
|
|
#if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
|
2005-02-01 00:54:06 +00:00
|
|
|
#include <xdebug>
|
|
|
|
#endif
|
2004-09-10 23:17:08 +00:00
|
|
|
#include <algorithm>
|
2004-11-05 19:38:11 +00:00
|
|
|
#include <stdexcept>
|
2004-09-10 23:17:08 +00:00
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <sstream>
|
|
|
|
#include <vector>
|
2005-07-29 07:07:27 +00:00
|
|
|
#include <stack>
|
2004-09-10 23:17:08 +00:00
|
|
|
#include <list>
|
2007-01-09 20:43:21 +00:00
|
|
|
#include <set>
|
2004-09-10 23:17:08 +00:00
|
|
|
|
|
|
|
|
2005-07-09 05:23:40 +00:00
|
|
|
#ifdef _WIN32
|
2007-03-20 01:42:36 +00:00
|
|
|
|
2004-09-10 23:17:08 +00:00
|
|
|
#define vsnprintf _vsnprintf
|
|
|
|
#define snprintf _snprintf
|
2007-03-20 01:42:36 +00:00
|
|
|
#define stprintf _stprintf
|
|
|
|
#define stricmp _stricmp
|
|
|
|
#define strdup _strdup
|
|
|
|
#define fdopen _fdopen
|
|
|
|
#define dup _dup
|
|
|
|
#define unlink _unlink
|
|
|
|
#define read _read
|
|
|
|
#define stat _stat
|
|
|
|
#define chdir _chdir
|
|
|
|
#define finite _finite
|
|
|
|
#define strdate _strdate
|
|
|
|
#define strtime _strtime
|
|
|
|
#define getcwd _getcwd
|
|
|
|
|
2005-02-17 23:44:35 +00:00
|
|
|
#endif
|
2004-09-10 23:17:08 +00:00
|
|
|
|
2007-03-20 01:42:36 +00:00
|
|
|
#ifndef __GNUC__
|
|
|
|
#define __attribute__(x)
|
|
|
|
#endif
|
2004-09-10 23:17:08 +00:00
|
|
|
|
2004-05-17 22:15:10 +00:00
|
|
|
// On the Win32 platform include file and line number information for each
|
|
|
|
// memory allocation/deallocation
|
|
|
|
#if (defined(__WIN32__) && defined(__VISUALC__) && !defined(__AFX_H__))
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
|
|
|
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
|
|
|
|
#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK)
|
|
|
|
#define _aligned_malloc(s, a) _aligned_malloc_dbg(s, a, __FILE__, __LINE__)
|
|
|
|
#define _aligned_realloc(p, s, a) _aligned_realloc_dbg(p, s, a, __FILE__, __LINE__)
|
|
|
|
#define _aligned_offset_malloc(s, a, o) _aligned_offset_malloc_dbg(s, a, o, __FILE__, __LINE__)
|
|
|
|
#define _aligned_offset_realloc(p, s, a, o) _aligned_offset_realloc_dbg(p, s, a, o, __FILE__, __LINE__)
|
|
|
|
#define _aligned_free(p) _aligned_free_dbg(p)
|
|
|
|
|
|
|
|
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
|
2006-12-27 18:33:44 +00:00
|
|
|
// The following macros set and clear, respectively, given bits
|
|
|
|
// of the C runtime library debug flag, as specified by a bitmask.
|
|
|
|
#define SET_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag((a) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
|
|
|
|
#define CLEAR_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
|
2004-05-17 22:15:10 +00:00
|
|
|
|
|
|
|
#else //_DEBUG
|
|
|
|
|
|
|
|
#define DEBUG_NEW new
|
|
|
|
|
2006-12-27 18:33:44 +00:00
|
|
|
#define SET_CRT_DEBUG_FIELD(a) ((void) 0)
|
|
|
|
#define CLEAR_CRT_DEBUG_FIELD(a) ((void) 0)
|
2004-05-17 22:15:10 +00:00
|
|
|
|
|
|
|
#endif //_DEBUG
|
|
|
|
|
2004-12-02 07:43:47 +00:00
|
|
|
#define new DEBUG_NEW
|
|
|
|
|
2004-05-17 22:15:10 +00:00
|
|
|
#endif //__WIN32__ && __VISUALC && !__AFX_H__
|
|
|
|
|
|
|
|
#endif //__STDWX_H__
|
2004-04-11 05:09:18 +00:00
|
|
|
|