Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Changed StartTextInput to take an SDL_Window parameter.
  • Loading branch information
dewyatt committed Jul 8, 2010
1 parent 91645b5 commit cbd5b5b32e14bf84ea55f5b47ba60a7045480a44
@@ -140,7 +140,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
* \sa SDL_StopTextInput()
* \sa SDL_SetTextInputRect()
*/
extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
extern DECLSPEC void SDLCALL SDL_StartTextInput(SDL_Window *window);

/**
* \brief Stop receiving any text input events.
@@ -1740,7 +1740,7 @@ SDL_EnableUNICODE(int enable)
switch (enable) {
case 1:
SDL_enabled_UNICODE = 1;
SDL_StartTextInput();
SDL_StartTextInput(SDL_VideoWindow);
break;
case 0:
SDL_enabled_UNICODE = 0;
@@ -617,7 +617,7 @@ SDL_SetKeyboardFocus(SDL_Window * window)
0, 0);

if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
SDL_StartTextInput();
SDL_StartTextInput(window);
}
}
}
@@ -299,7 +299,7 @@ struct SDL_VideoDevice
void (*SuspendScreenSaver) (_THIS);

/* Text input */
void (*StartTextInput) (_THIS);
void (*StartTextInput) (_THIS, SDL_Window *window);
void (*StopTextInput) (_THIS);
void (*SetTextInputRect) (_THIS, SDL_Rect *rect);

@@ -3385,10 +3385,10 @@ SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
}

void
SDL_StartTextInput(void)
SDL_StartTextInput(SDL_Window *window)
{
if (_this && _this->StartTextInput) {
_this->StartTextInput(_this);
_this->StartTextInput(_this, window);
}
SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE);
SDL_EventState(SDL_TEXTEDITING, SDL_ENABLE);
@@ -123,9 +123,8 @@ WIN_QuitKeyboard(_THIS)
}

void
WIN_StartTextInput(_THIS)
WIN_StartTextInput(_THIS, SDL_Window *window)
{
SDL_Window *window = SDL_GetKeyboardFocus();
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;

}
@@ -31,7 +31,7 @@ extern void WIN_InitKeyboard(_THIS);
extern void WIN_UpdateKeymap(void);
extern void WIN_QuitKeyboard(_THIS);

extern void WIN_StartTextInput(_THIS);
extern void WIN_StartTextInput(_THIS, SDL_Window *window);
extern void WIN_StopTextInput(_THIS);
extern void WIN_SetTextInputRect(_THIS, SDL_Rect *rect);

@@ -163,7 +163,7 @@ WIN_CreateDevice(int devindex)
device->GL_DeleteContext = WIN_GL_DeleteContext;
#endif
device->StartTextInput = WIN_StartTextInput;
device->StopTextInput = WIN_StartTextInput;
device->StopTextInput = WIN_StopTextInput;
device->SetTextInputRect = WIN_SetTextInputRect;

device->free = WIN_DeleteDevice;

0 comments on commit cbd5b5b

Please sign in to comment.