2018-10-03 22:02:46 +08:00
|
|
|
// Copyright (c) 2016-2018 Easy2D - Nomango
|
|
|
|
|
//
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
|
//
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
|
//
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
// THE SOFTWARE.
|
|
|
|
|
|
2018-11-08 21:39:26 +08:00
|
|
|
#pragma once
|
2017-10-12 02:44:44 +08:00
|
|
|
|
2018-11-11 16:32:12 +08:00
|
|
|
#ifndef __cplusplus
|
|
|
|
|
# error Easy2D only supports C++
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef _MSC_VER
|
|
|
|
|
# error Easy2D only supports MSVC compiler
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef VS_VER
|
|
|
|
|
# define VS_VER _MSC_VER
|
|
|
|
|
# define VS_2013 1800
|
|
|
|
|
# define VS_2015 1900
|
|
|
|
|
# define VS_2017 1900
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if VS_VER < VS_2013
|
|
|
|
|
# error Easy2D only supports Visual Studio 2013 and above
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-04-23 00:05:57 +08:00
|
|
|
#ifndef WINVER
|
2018-09-11 15:12:25 +08:00
|
|
|
# define WINVER 0x0700 // Allow use of features specific to Windows 7 or later
|
2017-10-13 11:42:36 +08:00
|
|
|
#endif
|
|
|
|
|
|
2018-04-23 00:05:57 +08:00
|
|
|
#ifndef _WIN32_WINNT
|
2018-05-25 00:33:46 +08:00
|
|
|
# define _WIN32_WINNT 0x0700 // Allow use of features specific to Windows 7 or later
|
2017-10-13 11:42:36 +08:00
|
|
|
#endif
|
|
|
|
|
|
2017-10-19 12:48:58 +08:00
|
|
|
#ifndef NTDDI_VERSION
|
2018-05-25 00:33:46 +08:00
|
|
|
# define NTDDI_VERSION NTDDI_WIN7
|
2017-10-19 12:48:58 +08:00
|
|
|
#endif
|
|
|
|
|
|
2017-10-13 11:42:36 +08:00
|
|
|
#ifndef UNICODE
|
2018-05-25 00:33:46 +08:00
|
|
|
# define UNICODE
|
2017-10-13 11:42:36 +08:00
|
|
|
#endif
|
|
|
|
|
|
2018-04-23 00:05:57 +08:00
|
|
|
// Exclude rarely-used items from Windows headers
|
2017-10-19 12:48:58 +08:00
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
2018-05-25 00:33:46 +08:00
|
|
|
# define WIN32_LEAN_AND_MEAN
|
2017-10-19 12:48:58 +08:00
|
|
|
#endif
|
2017-10-13 11:42:36 +08:00
|
|
|
|
2018-10-28 20:23:47 +08:00
|
|
|
#ifndef NOMINMAX
|
|
|
|
|
# define NOMINMAX
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-10-11 20:00:21 +08:00
|
|
|
#ifndef INITGUID
|
|
|
|
|
# define INITGUID
|
|
|
|
|
#endif
|
2018-04-01 23:08:11 +08:00
|
|
|
|
2018-11-15 23:40:13 +08:00
|
|
|
#if defined(DEBUG) || defined(_DEBUG)
|
|
|
|
|
# ifndef E2D_DEBUG
|
|
|
|
|
# define E2D_DEBUG
|
|
|
|
|
# endif
|
|
|
|
|
#else
|
|
|
|
|
# undef E2D_DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-04-23 00:05:57 +08:00
|
|
|
|
2018-02-02 10:06:29 +08:00
|
|
|
// Windows Header Files
|
2017-10-13 11:42:36 +08:00
|
|
|
#include <windows.h>
|
2018-02-01 22:07:44 +08:00
|
|
|
#include <wincodec.h>
|
|
|
|
|
|
2018-05-15 23:59:58 +08:00
|
|
|
// C++ RunTime Header Files
|
2018-11-08 21:39:26 +08:00
|
|
|
#include <string>
|
2018-07-03 20:19:00 +08:00
|
|
|
#include <map>
|
2018-05-15 23:59:58 +08:00
|
|
|
#include <set>
|
2018-07-04 12:49:05 +08:00
|
|
|
#include <list>
|
2018-05-15 23:59:58 +08:00
|
|
|
#include <vector>
|
2018-07-16 22:43:56 +08:00
|
|
|
#include <algorithm>
|
2018-04-01 23:08:11 +08:00
|
|
|
|
2017-10-13 11:42:36 +08:00
|
|
|
|
2018-11-11 16:32:12 +08:00
|
|
|
#if VS_VER >= VS_2015
|
2018-07-06 12:59:32 +08:00
|
|
|
# define E2D_NOEXCEPT noexcept
|
2018-11-15 01:02:05 +08:00
|
|
|
# define E2D_CONSTEXPR constexpr
|
2018-07-06 12:59:32 +08:00
|
|
|
#else
|
|
|
|
|
# define E2D_NOEXCEPT throw()
|
2018-11-15 01:02:05 +08:00
|
|
|
# define E2D_CONSTEXPR const
|
2018-07-06 12:59:32 +08:00
|
|
|
#endif
|