Bug 455378 - WinCE missing APIs and Windows Messages (plus compiler warning), patch by wolfe, r=me, sr=pavlov

This commit is contained in:
Doug Turner 2008-09-23 16:16:11 -07:00
parent 22a48322d2
commit 02dc2b2a4c

View File

@ -3532,6 +3532,7 @@ nsWindow::SynthesizeNativeKeyEvent(PRInt32 aNativeKeyboardLayout,
const nsAString& aCharacters,
const nsAString& aUnmodifiedCharacters)
{
#ifndef WINCE //Win CE doesn't support many of the calls used in this method, perhaps theres another way
nsPrintfCString layoutName("%08x", aNativeKeyboardLayout);
HKL loadedLayout = LoadKeyboardLayoutA(layoutName.get(), KLF_NOTELLSHELL);
if (loadedLayout == NULL)
@ -3593,6 +3594,9 @@ nsWindow::SynthesizeNativeKeyEvent(PRInt32 aNativeKeyboardLayout,
UnloadKeyboardLayout(loadedLayout);
return NS_OK;
#else //XXX: is there another way to do this?
return NS_ERROR_NOT_IMPLEMENTED;
#endif
}
void nsWindow::ConstrainZLevel(HWND *aAfter)
@ -4142,6 +4146,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
}
break;
#ifndef WINCE
// WM_QUERYENDSESSION must be handled by all windows.
// Otherwise Windows thinks the window can just be killed at will.
case WM_QUERYENDSESSION:
@ -4186,8 +4191,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
sCanQuit = TRI_UNKNOWN;
result = PR_TRUE;
break;
#ifndef WINCE
case WM_DISPLAYCHANGE:
DispatchStandardEvent(NS_DISPLAYCHANGED);
break;
@ -4739,6 +4743,8 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
}
break;
#ifndef WINCE
case WM_MOUSEACTIVATE:
if (mWindowType == eWindowType_popup) {
// a popup with a parent owner should not be activated when clicked
@ -4753,7 +4759,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
}
break;
#ifndef WINCE
case WM_WINDOWPOSCHANGING:
{
LPWINDOWPOS info = (LPWINDOWPOS) lParam;
@ -6925,7 +6930,7 @@ BOOL nsWindow::OnIMEComposition(LPARAM aGCS)
//--------------------------------------------------------
sIMECursorPosition = ::ImmGetCompositionStringW(hIMEContext, GCS_CURSORPOS, NULL, 0);
NS_ASSERTION(sIMECursorPosition <= sIMECompUnicode->Length(), "illegal pos");
NS_ASSERTION(sIMECursorPosition <= (long)sIMECompUnicode->Length(), "illegal pos");
#ifdef DEBUG_IME
printf("sIMECursorPosition(Unicode): %d\n", sIMECursorPosition);