File: stdwx.h

package info (click to toggle)
boinc 7.14.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,132 kB
  • sloc: cpp: 163,589; php: 113,173; ansic: 49,284; pascal: 35,620; xml: 17,864; java: 13,521; python: 6,551; sh: 4,082; perl: 1,843; makefile: 1,796; objc: 1,543; sql: 959; csh: 126; lisp: 47
file content (272 lines) | stat: -rw-r--r-- 8,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC 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 3 of the License, or (at your option) any later version.
//
// BOINC 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.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.

#ifndef BOINC_STDWX_H
#define BOINC_STDWX_H


#ifdef _WIN32

// Target Windows 2000 or better with Internet Explorer 5.01 or better
#ifndef WINVER
#define WINVER 0x0501
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0501
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0501
#endif

#endif

#ifdef __APPLE__
#include <Carbon/Carbon.h>

// Use localtime_r and fmtime_r in wxWidgets and eliminate compiler warnings
#define HAVE_LOCALTIME_R 1
#define HAVE_GMTIME_R 1
#endif


#include <wx/wx.h>
#include <wx/config.h>          // configuration support
#include <wx/debug.h>           // diagnostics support
#include <wx/debugrpt.h>
#include <wx/log.h>             // logging support
#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
#include <wx/filename.h>        // filesystem support
#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
#include <wx/statbmp.h>         // static bitmap support
#include <wx/stattext.h>        // static text support
#include <wx/clipbrd.h>         // clipboard support
#include <wx/datetime.h>        // date/time support
#include <wx/taskbar.h>         // taskbar support
#include <wx/image.h>
#include <wx/url.h>
#include <wx/textdlg.h>
#include <wx/mimetype.h>
#include <wx/event.h>
#include <wx/list.h>
#include <wx/icon.h>
#include <wx/utils.h>
#include <wx/process.h>
#include <wx/dynlib.h>
#include <wx/dialup.h>
#include <wx/cshelp.h>
#include <wx/sizer.h>
#include <wx/wizard.h>
#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>
#include <wx/tokenzr.h>
#include <wx/dir.h>
#include <wx/filename.h>
#include <wx/sysopt.h>
#include <wx/cshelp.h>
#include <wx/grid.h>
#include <wx/thread.h>
#include <wx/imaglist.h>
#include <wx/html/htmlwin.h>
#include <wx/html/htmlproc.h>
#include <wx/fs_inet.h>
#include <wx/fs_mem.h>
#include <wx/dnd.h>
#include <wx/htmllbox.h>
#include <wx/hyperlink.h>
#include <wx/mstream.h>
#include <wx/hash.h>
#include <wx/selstore.h>
#if wxUSE_WEBVIEW
#include <wx/webview.h>
#include <wx/webviewfshandler.h>
#endif
#include <wx/snglinst.h>
#include <wx/bmpcbox.h>
#include <wx/evtloop.h>
#include <wx/display.h>


#ifdef _WIN32
// 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

// Windows Headers
//
#include <windows.h>
#include <winternl.h>
#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
#include <crtdbg.h>
#endif
#include <dbghelp.h>
#include <tlhelp32.h>
#include <share.h>
#include <ole2.h>
#include <oleauto.h>
#include <shlobj.h>
#include <userenv.h>
#include <wtsapi32.h>

#if wxUSE_ACCESSIBILITY
    #include <oleacc.h>
#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("")
#endif // wxUSE_ACCESSIBILITY

#include "wx/msw/ole/oleutils.h"
#include "wx/msw/winundef.h"

#ifndef OBJID_CLIENT
    #define OBJID_CLIENT 0xFFFFFFFC
#endif

#endif

// Standard Libraries
//

// C headers
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cmath>
#include <csetjmp>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <locale>
#include <cfloat>


// C++ headers
#if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
#include <xdebug>
#endif
#include <algorithm>
#include <stdexcept>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <stack>
#include <list>
#include <set>


#ifdef _WIN32

#define vsnprintf               _vsnprintf
#define snprintf                _snprintf
#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

#endif

#ifndef __GNUC__
#define __attribute__(x)
#endif

// 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__)

// 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))

#else //_DEBUG

#define DEBUG_NEW                             new

#define SET_CRT_DEBUG_FIELD(a)                ((void) 0)
#define CLEAR_CRT_DEBUG_FIELD(a)              ((void) 0)

#endif //_DEBUG

#define new DEBUG_NEW

#endif //__WIN32__ && __VISUALC && !__AFX_H__

#endif