2006-12-23 16:37:33 +01: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-29 07:43:02 +02:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
2006-12-23 16:37:33 +01:00
|
|
|
|
2009-09-10 06:14:28 +02:00
|
|
|
/// @file agi_pre.h
|
2009-07-29 07:43:02 +02: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 16:37:33 +01:00
|
|
|
|
2014-06-05 15:55:10 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2009-09-10 06:14:28 +02:00
|
|
|
// Block msvc from complaining about not using msvc-specific versions for
|
|
|
|
// insecure C functions.
|
2009-09-10 04:52:34 +02:00
|
|
|
#ifdef _CRT_SECURE_NO_WARNINGS
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS_DEFINED
|
|
|
|
#else
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
#endif
|
2006-12-23 16:37:33 +01:00
|
|
|
|
2019-09-02 19:32:36 +02:00
|
|
|
#if !defined(_WIN32) && !defined(CMAKE_BUILD)
|
|
|
|
#include "../acconf.h"
|
|
|
|
#endif
|
|
|
|
|
2014-05-26 16:15:45 +02:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2011-07-27 00:25:10 +02:00
|
|
|
|
2014-05-26 16:15:45 +02: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 16:29:52 +02:00
|
|
|
#include <array>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <functional>
|
|
|
|
#include <iterator>
|
2012-12-02 00:26:00 +01:00
|
|
|
#include <limits>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <list>
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
2014-03-21 22:37:21 +01:00
|
|
|
#include <set>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <string>
|
2013-04-25 04:45:21 +02:00
|
|
|
#include <type_traits>
|
2014-05-29 17:28:37 +02:00
|
|
|
#include <type_traits>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <typeinfo>
|
|
|
|
#include <unordered_map>
|
2014-05-29 17:28:37 +02:00
|
|
|
#include <utility>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(pop)
|
|
|
|
#endif
|
2009-09-10 06:29:04 +02:00
|
|
|
|
2009-09-10 16:39:39 +02:00
|
|
|
#ifdef _WIN32
|
2009-09-11 01:08:38 +02:00
|
|
|
#include <objbase.h>
|
2009-09-10 16:39:39 +02:00
|
|
|
#include <mmsystem.h>
|
2009-09-10 15:06:40 +02:00
|
|
|
#else
|
2009-09-10 16:39:39 +02:00
|
|
|
#include <sys/param.h>
|
2009-09-10 06:29:04 +02:00
|
|
|
#endif
|
2008-01-20 07:14:40 +01:00
|
|
|
|
2014-05-26 16:15:45 +02:00
|
|
|
// Boost
|
2014-05-25 18:02:44 +02:00
|
|
|
#include <boost/container/list.hpp>
|
2012-12-04 23:35:59 +01:00
|
|
|
#include <boost/flyweight.hpp>
|
2014-05-29 17:28:37 +02:00
|
|
|
#include <boost/io/ios_state.hpp>
|
2012-12-02 00:26:00 +01:00
|
|
|
#include <boost/range/adaptor/filtered.hpp>
|
2014-05-26 16:15:45 +02: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 17:28:37 +02:00
|
|
|
#include <boost/interprocess/streams/vectorstream.hpp>
|
2012-10-12 19:16:39 +02:00
|
|
|
|
2006-12-23 16:37:33 +01:00
|
|
|
// wxWidgets headers
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/defs.h> // Leave this first.
|
2009-09-10 04:27:25 +02:00
|
|
|
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/accel.h>
|
|
|
|
#include <wx/app.h>
|
|
|
|
#include <wx/arrstr.h>
|
|
|
|
#include <wx/bitmap.h>
|
|
|
|
#include <wx/bmpbuttn.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/brush.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/checklst.h>
|
|
|
|
#include <wx/choicdlg.h>
|
|
|
|
#include <wx/choice.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/clipbrd.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/colour.h>
|
|
|
|
#include <wx/combobox.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/containr.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/control.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/ctrlsub.h>
|
|
|
|
#include <wx/cursor.h>
|
2009-09-10 12:26:50 +02:00
|
|
|
#include <wx/dataobj.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/dc.h>
|
2010-12-08 04:36:10 +01:00
|
|
|
#include <wx/dcbuffer.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/dcclient.h>
|
|
|
|
#include <wx/dcmemory.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/dcprint.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/dirdlg.h>
|
|
|
|
#include <wx/dnd.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/dynarray.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/event.h>
|
2006-12-23 16:37:33 +01:00
|
|
|
#include <wx/file.h>
|
|
|
|
#include <wx/filedlg.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/filefn.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/filename.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/font.h>
|
|
|
|
#include <wx/frame.h>
|
|
|
|
#include <wx/gdicmn.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/gdiobj.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/glcanvas.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/hash.h>
|
|
|
|
#include <wx/hashmap.h>
|
2009-09-10 12:26:50 +02:00
|
|
|
#include <wx/icon.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/image.h>
|
|
|
|
#include <wx/intl.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/layout.h>
|
|
|
|
#include <wx/list.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/listbox.h>
|
|
|
|
#include <wx/listctrl.h>
|
|
|
|
#include <wx/log.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/math.h>
|
|
|
|
#include <wx/memory.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/menu.h>
|
|
|
|
#include <wx/menuitem.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/module.h>
|
2006-12-23 16:37:33 +01:00
|
|
|
#include <wx/msgdlg.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/object.h>
|
|
|
|
#include <wx/palette.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/panel.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/pen.h>
|
2010-12-08 04:36:10 +01:00
|
|
|
#include <wx/power.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/radiobox.h>
|
|
|
|
#include <wx/radiobut.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/region.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/sashwin.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/scrolwin.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/settings.h>
|
|
|
|
#include <wx/sizer.h>
|
2006-12-23 16:37:33 +01:00
|
|
|
#include <wx/spinctrl.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/statbox.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
#include <wx/statline.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/stattext.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/statusbr.h>
|
2007-04-22 01:16:38 +02:00
|
|
|
#include <wx/stc/stc.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/stopwatch.h>
|
|
|
|
#include <wx/strconv.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/stream.h>
|
2006-12-24 05:54:35 +01:00
|
|
|
#include <wx/string.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/thread.h>
|
|
|
|
#include <wx/timer.h>
|
|
|
|
#include <wx/toolbar.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/toplevel.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/utils.h>
|
2012-03-29 21:05:26 +02:00
|
|
|
#include <wx/valgen.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/validate.h>
|
2009-09-10 04:32:55 +02:00
|
|
|
#include <wx/valtext.h>
|
|
|
|
#include <wx/window.h>
|
2014-05-26 16:15:45 +02:00
|
|
|
#include <wx/wxcrt.h>
|
|
|
|
#include <wx/wxcrtvararg.h>
|
2009-09-10 04:27:25 +02:00
|
|
|
|
2012-02-23 20:28:08 +01:00
|
|
|
#ifdef HAVE_OPENGL_GL_H
|
2011-01-11 18:52:17 +01:00
|
|
|
#include <OpenGL/gl.h>
|
2007-04-22 04:24:27 +02:00
|
|
|
#else
|
2007-01-27 07:15:25 +01:00
|
|
|
#include <GL/gl.h>
|
2007-04-22 04:24:27 +02:00
|
|
|
#endif
|
2006-12-23 16:37:33 +01:00
|
|
|
|
2011-07-27 00:24:48 +02:00
|
|
|
#ifndef _CRT_SECURE_NO_WARNINGS_DEFINED
|
2009-09-10 04:52:34 +02:00
|
|
|
#undef _CRT_SECURE_NO_WARNINGS
|
|
|
|
#endif
|
2014-06-05 15:55:10 +02:00
|
|
|
|
|
|
|
#endif
|