2006-12-23 07:37:33 -08:00
|
|
|
// Copyright (c) 2006, Rodrigo Braz Monteiro
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are met:
|
|
|
|
//
|
|
|
|
// * Redistributions of source code must retain the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer.
|
|
|
|
// * Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer in the documentation
|
|
|
|
// and/or other materials provided with the distribution.
|
|
|
|
// * Neither the name of the Aegisub Group nor the names of its contributors
|
|
|
|
// may be used to endorse or promote products derived from this software
|
|
|
|
// without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
2009-07-28 22:43:02 -07:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
2006-12-23 07:37:33 -08:00
|
|
|
|
2009-09-09 21:14:28 -07:00
|
|
|
/// @file agi_pre.h
|
2009-07-28 22:43:02 -07:00
|
|
|
/// @brief Precompiled headers include file, including all headers that should be precompiled
|
|
|
|
/// @ingroup main
|
|
|
|
///
|
|
|
|
/// In order to use it, set the project to use this header as precompiled and
|
|
|
|
/// insert it in every source file (under C/C++ -> Advanced -> Force Includes),
|
|
|
|
/// then set stdwx.cpp to generate the precompiled header
|
|
|
|
///
|
|
|
|
/// @note Make sure that you disable use of precompiled headers on md5.c and
|
|
|
|
/// MatroskaParser.c, as well as any possible future .c files.
|
2006-12-23 07:37:33 -08:00
|
|
|
|
2014-06-05 06:55:10 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2009-09-09 21:14:28 -07:00
|
|
|
// Block msvc from complaining about not using msvc-specific versions for
|
|
|
|
// insecure C functions.
|
2009-09-09 19:52:34 -07:00
|
|
|
#ifdef _CRT_SECURE_NO_WARNINGS
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS_DEFINED
|
|
|
|
#else
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
#endif
|
2006-12-23 07:37:33 -08:00
|
|
|
|
2014-05-26 07:15:45 -07:00
|
|
|
#ifndef _WIN32
|
|
|
|
#include "../acconf.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2011-07-26 15:25:10 -07:00
|
|
|
|
2014-05-26 07:15:45 -07:00
|
|
|
// Common C
|
|
|
|
#include <cassert>
|
|
|
|
#include <cerrno>
|
|
|
|
#include <cfloat>
|
|
|
|
#include <climits>
|
|
|
|
#include <cmath>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <ctime>
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable:4996)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Common C++
|
|
|
|
#include <algorithm>
|
2012-10-26 07:29:52 -07:00
|
|
|
#include <array>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <functional>
|
|
|
|
#include <iterator>
|
2012-12-01 15:26:00 -08:00
|
|
|
#include <limits>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <list>
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
2014-03-21 14:37:21 -07:00
|
|
|
#include <set>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <string>
|
2013-04-24 19:45:21 -07:00
|
|
|
#include <type_traits>
|
2014-05-29 08:28:37 -07:00
|
|
|
#include <type_traits>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <typeinfo>
|
|
|
|
#include <unordered_map>
|
2014-05-29 08:28:37 -07:00
|
|
|
#include <utility>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(pop)
|
|
|
|
#endif
|
2009-09-09 21:29:04 -07:00
|
|
|
|
2009-09-10 07:39:39 -07:00
|
|
|
#ifdef _WIN32
|
2009-09-10 16:08:38 -07:00
|
|
|
#include <objbase.h>
|
2009-09-10 07:39:39 -07:00
|
|
|
#include <mmsystem.h>
|
2009-09-10 06:06:40 -07:00
|
|
|
#else
|
2009-09-10 07:39:39 -07:00
|
|
|
#include <sys/param.h>
|
2009-09-09 21:29:04 -07:00
|
|
|
#endif
|
2008-01-19 22:14:40 -08:00
|
|
|
|
2014-05-26 07:15:45 -07:00
|
|
|
// Boost
|
2014-05-25 09:02:44 -07:00
|
|
|
#include <boost/container/list.hpp>
|
2012-12-04 14:35:59 -08:00
|
|
|
#include <boost/flyweight.hpp>
|
2014-05-29 08:28:37 -07:00
|
|
|
#include <boost/io/ios_state.hpp>
|
2012-12-01 15:26:00 -08:00
|
|
|
#include <boost/range/adaptor/filtered.hpp>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <boost/range/adaptor/transformed.hpp>
|
|
|
|
#include <boost/range/algorithm.hpp>
|
|
|
|
#include <boost/range/irange.hpp>
|
|
|
|
#include <boost/regex.hpp>
|
|
|
|
#define BOOST_NO_SCOPED_ENUMS
|
|
|
|
#include <boost/filesystem/path.hpp>
|
|
|
|
#undef BOOST_NO_SCOPED_ENUMS
|
|
|
|
#include <boost/interprocess/streams/bufferstream.hpp>
|
2014-05-29 08:28:37 -07:00
|
|
|
#include <boost/interprocess/streams/vectorstream.hpp>
|
2012-10-12 10:16:39 -07:00
|
|
|
|
2006-12-23 07:37:33 -08:00
|
|
|
// wxWidgets headers
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/defs.h> // Leave this first.
|
2009-09-09 19:27:25 -07:00
|
|
|
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/accel.h>
|
|
|
|
#include <wx/app.h>
|
|
|
|
#include <wx/arrstr.h>
|
|
|
|
#include <wx/bitmap.h>
|
|
|
|
#include <wx/bmpbuttn.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/brush.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/checklst.h>
|
|
|
|
#include <wx/choicdlg.h>
|
|
|
|
#include <wx/choice.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/clipbrd.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/colour.h>
|
|
|
|
#include <wx/combobox.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/containr.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/control.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/ctrlsub.h>
|
|
|
|
#include <wx/cursor.h>
|
2009-09-10 03:26:50 -07:00
|
|
|
#include <wx/dataobj.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/dc.h>
|
2010-12-07 19:36:10 -08:00
|
|
|
#include <wx/dcbuffer.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/dcclient.h>
|
|
|
|
#include <wx/dcmemory.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/dcprint.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/dirdlg.h>
|
|
|
|
#include <wx/dnd.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/dynarray.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/event.h>
|
2006-12-23 07:37:33 -08:00
|
|
|
#include <wx/file.h>
|
|
|
|
#include <wx/filedlg.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/filefn.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/filename.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/font.h>
|
|
|
|
#include <wx/frame.h>
|
|
|
|
#include <wx/gdicmn.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/gdiobj.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/glcanvas.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/hash.h>
|
|
|
|
#include <wx/hashmap.h>
|
2009-09-10 03:26:50 -07:00
|
|
|
#include <wx/icon.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/image.h>
|
|
|
|
#include <wx/intl.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/layout.h>
|
|
|
|
#include <wx/list.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/listbox.h>
|
|
|
|
#include <wx/listctrl.h>
|
|
|
|
#include <wx/log.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/math.h>
|
|
|
|
#include <wx/memory.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/menu.h>
|
|
|
|
#include <wx/menuitem.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/module.h>
|
2006-12-23 07:37:33 -08:00
|
|
|
#include <wx/msgdlg.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/object.h>
|
|
|
|
#include <wx/palette.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/panel.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/pen.h>
|
2010-12-07 19:36:10 -08:00
|
|
|
#include <wx/power.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/radiobox.h>
|
|
|
|
#include <wx/radiobut.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/region.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/sashwin.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/scrolwin.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/settings.h>
|
|
|
|
#include <wx/sizer.h>
|
2006-12-23 07:37:33 -08:00
|
|
|
#include <wx/spinctrl.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/statbox.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
#include <wx/statline.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/stattext.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/statusbr.h>
|
2007-04-21 16:16:38 -07:00
|
|
|
#include <wx/stc/stc.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/stopwatch.h>
|
|
|
|
#include <wx/strconv.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/stream.h>
|
2006-12-23 20:54:35 -08:00
|
|
|
#include <wx/string.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/thread.h>
|
|
|
|
#include <wx/timer.h>
|
|
|
|
#include <wx/toolbar.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/toplevel.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/utils.h>
|
2012-03-29 12:05:26 -07:00
|
|
|
#include <wx/valgen.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/validate.h>
|
2009-09-09 19:32:55 -07:00
|
|
|
#include <wx/valtext.h>
|
|
|
|
#include <wx/window.h>
|
2014-05-26 07:15:45 -07:00
|
|
|
#include <wx/wxcrt.h>
|
|
|
|
#include <wx/wxcrtvararg.h>
|
2009-09-09 19:27:25 -07:00
|
|
|
|
2012-02-23 11:28:08 -08:00
|
|
|
#ifdef HAVE_OPENGL_GL_H
|
2011-01-11 09:52:17 -08:00
|
|
|
#include <OpenGL/gl.h>
|
2007-04-21 19:24:27 -07:00
|
|
|
#else
|
2007-01-26 22:15:25 -08:00
|
|
|
#include <GL/gl.h>
|
2007-04-21 19:24:27 -07:00
|
|
|
#endif
|
2006-12-23 07:37:33 -08:00
|
|
|
|
2011-07-26 15:24:48 -07:00
|
|
|
#ifndef _CRT_SECURE_NO_WARNINGS_DEFINED
|
2009-09-09 19:52:34 -07:00
|
|
|
#undef _CRT_SECURE_NO_WARNINGS
|
|
|
|
#endif
|
2014-06-05 06:55:10 -07:00
|
|
|
|
|
|
|
#endif
|