diff --git a/include/nana/config.hpp b/include/nana/config.hpp index d1dfef77..0cc5aa4f 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -37,7 +37,6 @@ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) //Windows: #define NANA_WINDOWS 1 - #define PLATFORM_SPEC_HPP //Test if it is MINGW #if defined(__MINGW32__) || defined(__MINGW64__) @@ -52,7 +51,6 @@ //Linux: #define NANA_LINUX 1 #define NANA_X11 1 - #define PLATFORM_SPEC_HPP #define STD_CODECVT_NOT_SUPPORTED #else # static_assert(false, "Only Windows and Unix are supported now"); diff --git a/include/nana/detail/platform_spec_selector.hpp b/include/nana/detail/platform_spec_selector.hpp new file mode 100644 index 00000000..4531bde5 --- /dev/null +++ b/include/nana/detail/platform_spec_selector.hpp @@ -0,0 +1,21 @@ +/* + * Selector of Platform Specification + * Nana C++ Library(http://www.nanapro.org) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * @file: nana/detail/platform_spec_selector.hpp + * + * Selects the proper platform_spec header file for the current platform + */ + +#include + +#if defined(NANA_WINDOWS) +#include +#else +#include +#endif \ No newline at end of file diff --git a/include/nana/detail/win32/platform_spec.hpp b/include/nana/detail/win32/platform_spec.hpp index 3afea077..b0b90fad 100644 --- a/include/nana/detail/win32/platform_spec.hpp +++ b/include/nana/detail/win32/platform_spec.hpp @@ -1,7 +1,7 @@ /* * Platform Specification Implementation * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/deploy.cpp b/source/deploy.cpp index c4d4d3f8..fac8728f 100644 --- a/source/deploy.cpp +++ b/source/deploy.cpp @@ -20,7 +20,7 @@ #include #elif defined(NANA_LINUX) #include - #include PLATFORM_SPEC_HPP + #include #endif //Implement workarounds for GCC/MinGW which version is below 4.8.2 diff --git a/source/detail/linux_X11/platform_spec.cpp b/source/detail/linux_X11/platform_spec.cpp index bdab0cf0..29a9411e 100644 --- a/source/detail/linux_X11/platform_spec.cpp +++ b/source/detail/linux_X11/platform_spec.cpp @@ -13,9 +13,7 @@ * * http://standards.freedesktop.org/clipboards-spec/clipboards-0.1.txt */ -#include - -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/detail/win32/platform_spec.cpp b/source/detail/win32/platform_spec.cpp index 767b843f..ffc6dc28 100644 --- a/source/detail/win32/platform_spec.cpp +++ b/source/detail/win32/platform_spec.cpp @@ -11,9 +11,7 @@ * * This file provides basis class and data structrue that required by nana */ -#include - -#include PLATFORM_SPEC_HPP +#include #include #include diff --git a/source/gui/detail/bedrock_pi.cpp b/source/gui/detail/bedrock_pi.cpp index 4ca34572..830887ea 100644 --- a/source/gui/detail/bedrock_pi.cpp +++ b/source/gui/detail/bedrock_pi.cpp @@ -10,8 +10,7 @@ * @file: nana/gui/detail/bedrock_pi.cpp */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/gui/detail/linux_X11/bedrock.cpp b/source/gui/detail/linux_X11/bedrock.cpp index a66a205e..fa51348b 100644 --- a/source/gui/detail/linux_X11/bedrock.cpp +++ b/source/gui/detail/linux_X11/bedrock.cpp @@ -10,8 +10,7 @@ * @file: nana/gui/detail/linux_X11/bedrock.cpp */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/gui/detail/native_window_interface.cpp b/source/gui/detail/native_window_interface.cpp index 8605f6f1..fa3c2558 100644 --- a/source/gui/detail/native_window_interface.cpp +++ b/source/gui/detail/native_window_interface.cpp @@ -10,8 +10,7 @@ * @file: nana/gui/detail/native_window_interface.cpp */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #if defined(NANA_WINDOWS) diff --git a/source/gui/detail/win32/bedrock.cpp b/source/gui/detail/win32/bedrock.cpp index a6c13feb..2a68f95a 100644 --- a/source/gui/detail/win32/bedrock.cpp +++ b/source/gui/detail/win32/bedrock.cpp @@ -11,9 +11,7 @@ * @contributors: Ariel Vina-Rodriguez */ -#include - -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/gui/notifier.cpp b/source/gui/notifier.cpp index 742a78b9..de3fc65f 100644 --- a/source/gui/notifier.cpp +++ b/source/gui/notifier.cpp @@ -24,10 +24,9 @@ #include #endif -#if defined(NANA_WINDOWS) -#include -#elif defined(NANA_LINUX) -#include PLATFORM_SPEC_HPP +#include + +#if defined(NANA_LINUX) #include #include #endif diff --git a/source/gui/timer.cpp b/source/gui/timer.cpp index 75181a7f..70713897 100644 --- a/source/gui/timer.cpp +++ b/source/gui/timer.cpp @@ -27,7 +27,7 @@ #if defined(NANA_WINDOWS) #include #elif defined(NANA_LINUX) -#include PLATFORM_SPEC_HPP +#include #include #endif diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index fe68dcec..4c94a7a5 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -9,6 +9,7 @@ * * @file: nana/gui/widgets/listbox.cpp * @contributors: Hiroshi Seki, Ariel Vina-Rodriguez + * leobackes(pr #86) */ #include diff --git a/source/paint/detail/native_paint_interface.cpp b/source/paint/detail/native_paint_interface.cpp index 0222269f..77dd3c7c 100644 --- a/source/paint/detail/native_paint_interface.cpp +++ b/source/paint/detail/native_paint_interface.cpp @@ -11,8 +11,7 @@ * @contributors: dareg */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index 5b489cdf..2e0000cd 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -10,8 +10,7 @@ * @file: nana/paint/graphics.cpp */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/paint/image.cpp b/source/paint/image.cpp index ddbf317b..8d75a555 100644 --- a/source/paint/image.cpp +++ b/source/paint/image.cpp @@ -10,8 +10,7 @@ * @file: nana/paint/image.cpp */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/paint/pixel_buffer.cpp b/source/paint/pixel_buffer.cpp index a438412d..c3330c8d 100644 --- a/source/paint/pixel_buffer.cpp +++ b/source/paint/pixel_buffer.cpp @@ -11,8 +11,7 @@ * @note: The format of Xorg 16bits depth is 565 */ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/paint/text_renderer.cpp b/source/paint/text_renderer.cpp index 10d3cd6d..affefba7 100644 --- a/source/paint/text_renderer.cpp +++ b/source/paint/text_renderer.cpp @@ -1,6 +1,5 @@ -#include -#include PLATFORM_SPEC_HPP +#include #include #include #include diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index 8929b240..b3b54686 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -1,6 +1,6 @@ /* * Data Exchanger Implementation - * Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -19,7 +19,7 @@ #if defined(NANA_WINDOWS) #include #elif defined(NANA_X11) - #include PLATFORM_SPEC_HPP + #include #include #include #endif diff --git a/source/system/platform.cpp b/source/system/platform.cpp index 2985e831..7c2fb59a 100644 --- a/source/system/platform.cpp +++ b/source/system/platform.cpp @@ -1,6 +1,6 @@ /* * A platform API implementation - * Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -14,7 +14,7 @@ #if defined(NANA_WINDOWS) #include - #include PLATFORM_SPEC_HPP + #include #elif defined(NANA_LINUX) #include #include