remove iconv code
This commit is contained in:
parent
975993ff33
commit
065e6f3081
@ -27,7 +27,6 @@
|
||||
#include <algorithm>
|
||||
#include <nana/paint/graphics.hpp>
|
||||
#include <nana/gui/detail/bedrock.hpp>
|
||||
#include <nana/gui/detail/basic_window.hpp>
|
||||
#include <nana/gui/detail/window_manager.hpp>
|
||||
#include <nana/system/platform.hpp>
|
||||
#include <nana/paint/pixel_buffer.hpp>
|
||||
@ -35,6 +34,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#if defined(NANA_USE_XFT)
|
||||
#include <X11/Xft/Xft.h>
|
||||
#include <iconv.h>
|
||||
// #include <iconv.h> //deprecated
|
||||
#include <fstream>
|
||||
#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
|
||||
};
|
||||
|
||||
|
@ -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<const wchar_t*>(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)
|
||||
{
|
||||
|
@ -20,9 +20,9 @@
|
||||
#if defined(NANA_WINDOWS)
|
||||
# include <windows.h>
|
||||
#elif defined(NANA_X11)
|
||||
# include "../detail/platform_spec_selector.hpp"
|
||||
# include <nana/gui/detail/bedrock.hpp>
|
||||
# include <nana/gui/detail/basic_window.hpp>
|
||||
# include "../detail/platform_spec_selector.hpp"
|
||||
# include "../gui/detail/basic_window.hpp"
|
||||
#endif
|
||||
|
||||
namespace nana{ namespace system{
|
||||
|
Loading…
x
Reference in New Issue
Block a user