a standard experimental class any

This commit is contained in:
Jinhao
2016-01-25 23:56:05 +08:00
parent 7dbf0a5769
commit 5a960ed88c
16 changed files with 272 additions and 232 deletions

View File

@@ -1,7 +1,7 @@
/*
* A Bedrock Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -993,7 +993,7 @@ namespace detail
if(input_context)
{
nana::detail::platform_scope_guard psg;
#if defined(NANA_UNICODE)
#if 1 //Utf8
len = ::Xutf8LookupString(input_context, &xevent.xkey, keybuf, 32, &keysym, &status);
if(status == XBufferOverflow)
{
@@ -1088,14 +1088,12 @@ namespace detail
if (msgwnd->flags.enabled)
{
const wchar_t* charbuf;
#if defined(NANA_UNICODE)
nana::detail::charset_conv charset("UTF-32", "UTF-8");
const std::string& str = charset.charset(std::string(keybuf, keybuf + len));
charbuf = reinterpret_cast<const wchar_t*>(str.c_str()) + 1;
len = str.size() / sizeof(wchar_t) - 1;
#else
charbuf = keybuf;
#endif
for(int i = 0; i < len; ++i)
{
arg_keyboard arg;