Mercurial > sdl-ios-xcode
diff src/video/windows/SDL_windowskeyboard.c @ 5088:c2539ff054c8
Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 24 Jan 2011 15:46:11 -0800 |
parents | 25d4feb7c127 |
children | 327f181542f1 |
line wrap: on
line diff
--- a/src/video/windows/SDL_windowskeyboard.c Mon Jan 24 15:10:16 2011 -0800 +++ b/src/video/windows/SDL_windowskeyboard.c Mon Jan 24 15:46:11 2011 -0800 @@ -21,6 +21,10 @@ */ #include "SDL_config.h" +#ifdef _WIN32_WCE +#define SDL_DISABLE_WINDOWS_IME +#endif + #include "SDL_windowsvideo.h" #include "../../events/SDL_keyboard_c.h" @@ -29,10 +33,12 @@ #include <imm.h> #include <oleauto.h> +#ifndef SDL_DISABLE_WINDOWS_IME static void IME_Init(SDL_VideoData *videodata, HWND hwnd); static void IME_Enable(SDL_VideoData *videodata, HWND hwnd); static void IME_Disable(SDL_VideoData *videodata, HWND hwnd); static void IME_Quit(SDL_VideoData *videodata); +#endif /* !SDL_DISABLE_WINDOWS_IME */ #ifndef MAPVK_VK_TO_VSC #define MAPVK_VK_TO_VSC 0 @@ -172,12 +178,15 @@ void WIN_QuitKeyboard(_THIS) { +#ifndef SDL_DISABLE_WINDOWS_IME IME_Quit((SDL_VideoData *)_this->driverdata); +#endif } void WIN_StartTextInput(_THIS) { +#ifndef SDL_DISABLE_WINDOWS_IME SDL_Window *window = SDL_GetKeyboardFocus(); if (window) { HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; @@ -186,11 +195,13 @@ IME_Init(videodata, hwnd); IME_Enable(videodata, hwnd); } +#endif /* !SDL_DISABLE_WINDOWS_IME */ } void WIN_StopTextInput(_THIS) { +#ifndef SDL_DISABLE_WINDOWS_IME SDL_Window *window = SDL_GetKeyboardFocus(); if (window) { HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; @@ -198,6 +209,7 @@ IME_Init(videodata, hwnd); IME_Disable(videodata, hwnd); } +#endif /* !SDL_DISABLE_WINDOWS_IME */ } void @@ -207,6 +219,21 @@ videodata->ime_rect = *rect; } +#ifdef SDL_DISABLE_WINDOWS_IME + + +SDL_bool +IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata) +{ + return SDL_FALSE; +} + +void IME_Present(SDL_VideoData *videodata) +{ +} + +#else + #ifdef __GNUC__ #undef DEFINE_GUID #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} @@ -1552,4 +1579,6 @@ SDL_RenderCopy(videodata->ime_candtex, NULL, &videodata->ime_candlistrect); } +#endif /* SDL_DISABLE_WINDOWS_IME */ + /* vi: set ts=4 sw=4 expandtab: */