diff --git a/source/detail/platform_spec_posix.cpp b/source/detail/platform_spec_posix.cpp index f7cbc9d6..cad5b82e 100644 --- a/source/detail/platform_spec_posix.cpp +++ b/source/detail/platform_spec_posix.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include "posix/msg_dispatcher.hpp" +#include "../gui/detail/basic_window.hpp" namespace nana { @@ -95,7 +95,7 @@ namespace detail return std::string(); } //end class conf - +#if 0 //class charset_conv charset_conv::charset_conv(const char* tocode, const char* fromcode) { @@ -140,6 +140,7 @@ namespace detail return rstr; } //end class charset_conv +#endif #endif //Caret implementation @@ -338,16 +339,21 @@ namespace detail string.tab_length = 4; string.tab_pixels = 0; string.whitespace_pixels = 0; + +#if 0 //deprecated #if defined(NANA_USE_XFT) conv_.handle = ::iconv_open("UTF-8", NANA_UNICODE); conv_.code = NANA_UNICODE; +#endif #endif } drawable_impl_type::~drawable_impl_type() { +#if 0 //deprecated #if defined(NANA_USE_XFT) ::iconv_close(conv_.handle); +#endif #endif } diff --git a/source/detail/posix/platform_spec.hpp b/source/detail/posix/platform_spec.hpp index 84c1c24e..9c21625c 100644 --- a/source/detail/posix/platform_spec.hpp +++ b/source/detail/posix/platform_spec.hpp @@ -42,7 +42,7 @@ #if defined(NANA_USE_XFT) #include - #include +// #include //deprecated #include #endif @@ -63,6 +63,7 @@ namespace detail std::ifstream ifs_; }; +#if 0 //deprecated class charset_conv { charset_conv(const charset_conv&) = delete; @@ -75,6 +76,7 @@ namespace detail private: iconv_t handle_; }; +#endif #endif struct drawable_impl_type @@ -118,12 +120,14 @@ namespace detail unsigned color_{ 0xFFFFFFFF }; unsigned text_color_{ 0xFFFFFFFF }; +#if 0 //deprecated #if defined(NANA_USE_XFT) struct conv_tag { iconv_t handle; std::string code; }conv_; +#endif #endif }; diff --git a/source/gui/detail/bedrock_posix.cpp b/source/gui/detail/bedrock_posix.cpp index 69c49efa..6ad96318 100644 --- a/source/gui/detail/bedrock_posix.cpp +++ b/source/gui/detail/bedrock_posix.cpp @@ -512,11 +512,16 @@ namespace detail auto const native_window = rruntime->window->root; - +#if 0 //deprecated nana::detail::charset_conv charset(NANA_UNICODE, "UTF-8"); const std::string& str = charset.charset(std::string(keybuf, keybuf + keybuf_len)); auto const charbuf = reinterpret_cast(str.c_str()); auto const len = str.size() / sizeof(wchar_t); +#else + auto wstr = nana::to_wstring(std::string{keybuf, keybuf + keybuf_len}); + auto const charbuf = wstr.c_str(); + auto const len = wstr.length(); +#endif for(std::size_t i = 0; i < len; ++i) { diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index b3f4d5d4..6628132a 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -20,9 +20,9 @@ #if defined(NANA_WINDOWS) # include #elif defined(NANA_X11) -# include "../detail/platform_spec_selector.hpp" # include -# include +# include "../detail/platform_spec_selector.hpp" +# include "../gui/detail/basic_window.hpp" #endif namespace nana{ namespace system{