2012-04-19 14:35:52 +08:00
|
|
|
/****************************************************************************
|
2014-01-07 11:25:07 +08:00
|
|
|
Copyright (c) 2010 cocos2d-x.org
|
2018-01-29 16:25:32 +08:00
|
|
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
2021-12-25 10:04:45 +08:00
|
|
|
|
2022-10-01 16:24:52 +08:00
|
|
|
https://axmolengine.github.io/
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "base/CCIMEDispatcher.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
NS_AX_BEGIN
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2013-06-20 14:13:12 +08:00
|
|
|
// add/remove delegate in IMEDelegate Cons/Destructor
|
2012-04-19 14:35:52 +08:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDelegate::IMEDelegate()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDispatcher::sharedDispatcher()->addDelegate(this);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDelegate::~IMEDelegate()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDispatcher::sharedDispatcher()->removeDelegate(this);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
bool IMEDelegate::attachWithIME()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
return IMEDispatcher::sharedDispatcher()->attachDelegateWithIME(this);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
bool IMEDelegate::detachWithIME()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
return IMEDispatcher::sharedDispatcher()->detachDelegateWithIME(this);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
typedef std::list<IMEDelegate*> DelegateList;
|
|
|
|
typedef std::list<IMEDelegate*>::iterator DelegateIter;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// Delegate List manage class
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
class IMEDispatcher::Impl
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
2021-12-25 10:04:45 +08:00
|
|
|
Impl() {}
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
~Impl() {}
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
void init() { _delegateWithIme = 0; }
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-18 17:47:20 +08:00
|
|
|
DelegateIter findDelegate(IMEDelegate* delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
DelegateIter end = _delegateList.end();
|
|
|
|
for (DelegateIter iter = _delegateList.begin(); iter != end; ++iter)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
if (delegate == *iter)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
return iter;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return end;
|
|
|
|
}
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
DelegateList _delegateList;
|
|
|
|
IMEDelegate* _delegateWithIme;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// Cons/Destructor
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDispatcher::IMEDispatcher() : _impl(new IMEDispatcher::Impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
_impl->init();
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDispatcher::~IMEDispatcher()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_SAFE_DELETE(_impl);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2013-06-20 14:13:12 +08:00
|
|
|
// Add/Attach/Remove IMEDelegate
|
2012-04-19 14:35:52 +08:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-12-18 17:47:20 +08:00
|
|
|
void IMEDispatcher::addDelegate(IMEDelegate* delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
if (!delegate || !_impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2013-12-18 17:47:20 +08:00
|
|
|
if (_impl->_delegateList.end() != _impl->findDelegate(delegate))
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
// pDelegate already in list
|
|
|
|
return;
|
|
|
|
}
|
2013-12-18 17:47:20 +08:00
|
|
|
_impl->_delegateList.push_front(delegate);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
bool IMEDispatcher::attachDelegateWithIME(IMEDelegate* delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
bool ret = false;
|
2012-04-19 14:35:52 +08:00
|
|
|
do
|
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl || !delegate);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
DelegateIter end = _impl->_delegateList.end();
|
2013-12-18 17:47:20 +08:00
|
|
|
DelegateIter iter = _impl->findDelegate(delegate);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
// if pDelegate is not in delegate list, return
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(end == iter);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl->_delegateWithIme)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2016-03-07 19:22:03 +08:00
|
|
|
if (_impl->_delegateWithIme != delegate)
|
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
// if old delegate canDetachWithIME return false
|
2016-03-07 19:22:03 +08:00
|
|
|
// or pDelegate canAttachWithIME return false,
|
|
|
|
// do nothing.
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl->_delegateWithIme->canDetachWithIME() || !delegate->canAttachWithIME());
|
2016-03-07 19:22:03 +08:00
|
|
|
|
|
|
|
// detach first
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDelegate* oldDelegate = _impl->_delegateWithIme;
|
|
|
|
_impl->_delegateWithIme = 0;
|
2016-03-07 19:22:03 +08:00
|
|
|
oldDelegate->didDetachWithIME();
|
|
|
|
|
|
|
|
_impl->_delegateWithIme = *iter;
|
|
|
|
delegate->didAttachWithIME();
|
|
|
|
}
|
2013-12-18 17:47:20 +08:00
|
|
|
ret = true;
|
2012-04-19 14:35:52 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-09-17 15:02:24 +08:00
|
|
|
// delegate hasn't attached to IME yet
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!delegate->canAttachWithIME());
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_impl->_delegateWithIme = *iter;
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->didAttachWithIME();
|
|
|
|
ret = true;
|
2012-04-19 14:35:52 +08:00
|
|
|
} while (0);
|
2013-12-18 17:47:20 +08:00
|
|
|
return ret;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
bool IMEDispatcher::detachDelegateWithIME(IMEDelegate* delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
bool ret = false;
|
2012-04-19 14:35:52 +08:00
|
|
|
do
|
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl || !delegate);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-09-17 15:02:24 +08:00
|
|
|
// if pDelegate is not the current delegate attached to IME, return
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(_impl->_delegateWithIme != delegate);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!delegate->canDetachWithIME());
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_impl->_delegateWithIme = 0;
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->didDetachWithIME();
|
|
|
|
ret = true;
|
2012-04-19 14:35:52 +08:00
|
|
|
} while (0);
|
2013-12-18 17:47:20 +08:00
|
|
|
return ret;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
2013-12-18 17:47:20 +08:00
|
|
|
void IMEDispatcher::removeDelegate(IMEDelegate* delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
do
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!delegate || !_impl);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-18 17:47:20 +08:00
|
|
|
DelegateIter iter = _impl->findDelegate(delegate);
|
2013-06-15 14:03:30 +08:00
|
|
|
DelegateIter end = _impl->_delegateList.end();
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(end == iter);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl->_delegateWithIme)
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
if (*iter == _impl->_delegateWithIme)
|
|
|
|
{
|
|
|
|
_impl->_delegateWithIme = 0;
|
|
|
|
}
|
2013-06-15 14:03:30 +08:00
|
|
|
_impl->_delegateList.erase(iter);
|
2012-04-19 14:35:52 +08:00
|
|
|
} while (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// dispatch text message
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-12-25 10:04:45 +08:00
|
|
|
void IMEDispatcher::dispatchInsertText(const char* text, size_t len)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
do
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl || !text || len <= 0);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-09-17 15:02:24 +08:00
|
|
|
// there is no delegate attached to IME
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl->_delegateWithIme);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-12-18 17:47:20 +08:00
|
|
|
_impl->_delegateWithIme->insertText(text, len);
|
2012-04-19 14:35:52 +08:00
|
|
|
} while (0);
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void IMEDispatcher::dispatchDeleteBackward()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
do
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-09-17 15:02:24 +08:00
|
|
|
// there is no delegate attached to IME
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl->_delegateWithIme);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
_impl->_delegateWithIme->deleteBackward();
|
2012-04-19 14:35:52 +08:00
|
|
|
} while (0);
|
|
|
|
}
|
|
|
|
|
2016-03-07 19:22:03 +08:00
|
|
|
void IMEDispatcher::dispatchControlKey(EventKeyboard::KeyCode keyCode)
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl);
|
2016-03-07 19:22:03 +08:00
|
|
|
|
|
|
|
// there is no delegate attached to IME
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_BREAK_IF(!_impl->_delegateWithIme);
|
2016-03-07 19:22:03 +08:00
|
|
|
|
|
|
|
_impl->_delegateWithIme->controlKey(keyCode);
|
|
|
|
} while (0);
|
|
|
|
}
|
|
|
|
|
2021-12-26 23:26:34 +08:00
|
|
|
std::string_view IMEDispatcher::getContentText()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl && _impl->_delegateWithIme)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-24 15:49:58 +08:00
|
|
|
return _impl->_delegateWithIme->getContentText();
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
2013-12-24 15:49:58 +08:00
|
|
|
return STD_STRING_EMPTY;
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// dispatch keyboard message
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void IMEDispatcher::dispatchKeyboardWillShow(IMEKeyboardNotificationInfo& info)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDelegate* delegate = nullptr;
|
|
|
|
DelegateIter last = _impl->_delegateList.end();
|
2013-06-15 14:03:30 +08:00
|
|
|
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate = *(first);
|
|
|
|
if (delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->keyboardWillShow(info);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void IMEDispatcher::dispatchKeyboardDidShow(IMEKeyboardNotificationInfo& info)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDelegate* delegate = nullptr;
|
|
|
|
DelegateIter last = _impl->_delegateList.end();
|
2013-06-15 14:03:30 +08:00
|
|
|
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate = *(first);
|
|
|
|
if (delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->keyboardDidShow(info);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void IMEDispatcher::dispatchKeyboardWillHide(IMEKeyboardNotificationInfo& info)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDelegate* delegate = nullptr;
|
|
|
|
DelegateIter last = _impl->_delegateList.end();
|
2013-06-15 14:03:30 +08:00
|
|
|
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate = *(first);
|
|
|
|
if (delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->keyboardWillHide(info);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
void IMEDispatcher::dispatchKeyboardDidHide(IMEKeyboardNotificationInfo& info)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
if (_impl)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2021-12-25 10:04:45 +08:00
|
|
|
IMEDelegate* delegate = nullptr;
|
|
|
|
DelegateIter last = _impl->_delegateList.end();
|
2013-06-15 14:03:30 +08:00
|
|
|
for (DelegateIter first = _impl->_delegateList.begin(); first != last; ++first)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate = *(first);
|
|
|
|
if (delegate)
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-12-18 17:47:20 +08:00
|
|
|
delegate->keyboardDidHide(info);
|
2012-04-19 14:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// protected member function
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// static member function
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
IMEDispatcher* IMEDispatcher::sharedDispatcher()
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
2013-06-20 14:13:12 +08:00
|
|
|
static IMEDispatcher s_instance;
|
2012-04-19 14:35:52 +08:00
|
|
|
return &s_instance;
|
|
|
|
}
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
NS_AX_END
|