зеркало из https://github.com/mozilla/gecko-dev.git
Bug 891316 part.5 Use widget::MSGResult in widget::IMEHandler r=jimm
This commit is contained in:
Родитель
8eb3277b0d
Коммит
d5144e0a9b
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "WinIMEHandler.h"
|
||||
#include "nsIMM32Handler.h"
|
||||
#include "nsWindowDefs.h"
|
||||
|
||||
#ifdef NS_ENABLE_TSF
|
||||
#include "nsTextStore.h"
|
||||
|
@ -99,13 +100,13 @@ IMEHandler::ProcessRawKeyMessage(const MSG& aMsg)
|
|||
bool
|
||||
IMEHandler::ProcessMessage(nsWindow* aWindow, UINT aMessage,
|
||||
WPARAM& aWParam, LPARAM& aLParam,
|
||||
LRESULT* aRetValue, bool& aEatMessage)
|
||||
MSGResult& aResult)
|
||||
{
|
||||
#ifdef NS_ENABLE_TSF
|
||||
if (IsTSFAvailable()) {
|
||||
if (aMessage == WM_USER_TSF_TEXTCHANGE) {
|
||||
nsTextStore::OnTextChangeMsg();
|
||||
aEatMessage = true;
|
||||
aResult.mConsumed = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -113,7 +114,7 @@ IMEHandler::ProcessMessage(nsWindow* aWindow, UINT aMessage,
|
|||
#endif // #ifdef NS_ENABLE_TSF
|
||||
|
||||
return nsIMM32Handler::ProcessMessage(aWindow, aMessage, aWParam, aLParam,
|
||||
aRetValue, aEatMessage);
|
||||
&aResult.mResult, aResult.mConsumed);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -20,6 +20,8 @@ class nsWindow;
|
|||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
struct MSGResult;
|
||||
|
||||
/**
|
||||
* IMEHandler class is a mediator class. On Windows, there are two IME API
|
||||
* sets: One is IMM which is legacy API set. The other is TSF which is modern
|
||||
|
@ -47,12 +49,10 @@ public:
|
|||
/**
|
||||
* When the message is not needed to handle anymore by the caller, this
|
||||
* returns true. Otherwise, false.
|
||||
* Additionally, if aEatMessage is true, the caller shouldn't call next
|
||||
* wndproc anymore.
|
||||
*/
|
||||
static bool ProcessMessage(nsWindow* aWindow, UINT aMessage,
|
||||
WPARAM& aWParam, LPARAM& aLParam,
|
||||
LRESULT* aRetValue, bool& aEatMessage);
|
||||
MSGResult& aResult);
|
||||
|
||||
/**
|
||||
* When there is a composition, returns true. Otherwise, false.
|
||||
|
|
|
@ -4433,8 +4433,7 @@ nsWindow::ExternalHandlerProcessMessage(UINT aMessage,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (IMEHandler::ProcessMessage(this, aMessage, aWParam, aLParam,
|
||||
&aResult.mResult, aResult.mConsumed)) {
|
||||
if (IMEHandler::ProcessMessage(this, aMessage, aWParam, aLParam, aResult)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче