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
Родитель 09f43015f4
Коммит ea3a25b0aa
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

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