remove iconv code
This commit is contained in:
parent
975993ff33
commit
065e6f3081
@ -27,7 +27,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <nana/paint/graphics.hpp>
|
#include <nana/paint/graphics.hpp>
|
||||||
#include <nana/gui/detail/bedrock.hpp>
|
#include <nana/gui/detail/bedrock.hpp>
|
||||||
#include <nana/gui/detail/basic_window.hpp>
|
|
||||||
#include <nana/gui/detail/window_manager.hpp>
|
#include <nana/gui/detail/window_manager.hpp>
|
||||||
#include <nana/system/platform.hpp>
|
#include <nana/system/platform.hpp>
|
||||||
#include <nana/paint/pixel_buffer.hpp>
|
#include <nana/paint/pixel_buffer.hpp>
|
||||||
@ -35,6 +34,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "posix/msg_dispatcher.hpp"
|
#include "posix/msg_dispatcher.hpp"
|
||||||
|
#include "../gui/detail/basic_window.hpp"
|
||||||
|
|
||||||
namespace nana
|
namespace nana
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ namespace detail
|
|||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
//end class conf
|
//end class conf
|
||||||
|
#if 0
|
||||||
//class charset_conv
|
//class charset_conv
|
||||||
charset_conv::charset_conv(const char* tocode, const char* fromcode)
|
charset_conv::charset_conv(const char* tocode, const char* fromcode)
|
||||||
{
|
{
|
||||||
@ -140,6 +140,7 @@ namespace detail
|
|||||||
return rstr;
|
return rstr;
|
||||||
}
|
}
|
||||||
//end class charset_conv
|
//end class charset_conv
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Caret implementation
|
//Caret implementation
|
||||||
@ -338,16 +339,21 @@ namespace detail
|
|||||||
string.tab_length = 4;
|
string.tab_length = 4;
|
||||||
string.tab_pixels = 0;
|
string.tab_pixels = 0;
|
||||||
string.whitespace_pixels = 0;
|
string.whitespace_pixels = 0;
|
||||||
|
|
||||||
|
#if 0 //deprecated
|
||||||
#if defined(NANA_USE_XFT)
|
#if defined(NANA_USE_XFT)
|
||||||
conv_.handle = ::iconv_open("UTF-8", NANA_UNICODE);
|
conv_.handle = ::iconv_open("UTF-8", NANA_UNICODE);
|
||||||
conv_.code = NANA_UNICODE;
|
conv_.code = NANA_UNICODE;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
drawable_impl_type::~drawable_impl_type()
|
drawable_impl_type::~drawable_impl_type()
|
||||||
{
|
{
|
||||||
|
#if 0 //deprecated
|
||||||
#if defined(NANA_USE_XFT)
|
#if defined(NANA_USE_XFT)
|
||||||
::iconv_close(conv_.handle);
|
::iconv_close(conv_.handle);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#if defined(NANA_USE_XFT)
|
#if defined(NANA_USE_XFT)
|
||||||
#include <X11/Xft/Xft.h>
|
#include <X11/Xft/Xft.h>
|
||||||
#include <iconv.h>
|
// #include <iconv.h> //deprecated
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -63,6 +63,7 @@ namespace detail
|
|||||||
std::ifstream ifs_;
|
std::ifstream ifs_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0 //deprecated
|
||||||
class charset_conv
|
class charset_conv
|
||||||
{
|
{
|
||||||
charset_conv(const charset_conv&) = delete;
|
charset_conv(const charset_conv&) = delete;
|
||||||
@ -75,6 +76,7 @@ namespace detail
|
|||||||
private:
|
private:
|
||||||
iconv_t handle_;
|
iconv_t handle_;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct drawable_impl_type
|
struct drawable_impl_type
|
||||||
@ -118,12 +120,14 @@ namespace detail
|
|||||||
unsigned color_{ 0xFFFFFFFF };
|
unsigned color_{ 0xFFFFFFFF };
|
||||||
unsigned text_color_{ 0xFFFFFFFF };
|
unsigned text_color_{ 0xFFFFFFFF };
|
||||||
|
|
||||||
|
#if 0 //deprecated
|
||||||
#if defined(NANA_USE_XFT)
|
#if defined(NANA_USE_XFT)
|
||||||
struct conv_tag
|
struct conv_tag
|
||||||
{
|
{
|
||||||
iconv_t handle;
|
iconv_t handle;
|
||||||
std::string code;
|
std::string code;
|
||||||
}conv_;
|
}conv_;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -512,11 +512,16 @@ namespace detail
|
|||||||
|
|
||||||
auto const native_window = rruntime->window->root;
|
auto const native_window = rruntime->window->root;
|
||||||
|
|
||||||
|
#if 0 //deprecated
|
||||||
nana::detail::charset_conv charset(NANA_UNICODE, "UTF-8");
|
nana::detail::charset_conv charset(NANA_UNICODE, "UTF-8");
|
||||||
const std::string& str = charset.charset(std::string(keybuf, keybuf + keybuf_len));
|
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 charbuf = reinterpret_cast<const wchar_t*>(str.c_str());
|
||||||
auto const len = str.size() / sizeof(wchar_t);
|
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)
|
for(std::size_t i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
#if defined(NANA_WINDOWS)
|
#if defined(NANA_WINDOWS)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#elif defined(NANA_X11)
|
#elif defined(NANA_X11)
|
||||||
# include "../detail/platform_spec_selector.hpp"
|
|
||||||
# include <nana/gui/detail/bedrock.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
|
#endif
|
||||||
|
|
||||||
namespace nana{ namespace system{
|
namespace nana{ namespace system{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user