Changed StartTextInput to take an SDL_Window parameter.
authordewyatt
Thu, 08 Jul 2010 01:35:47 -0400
changeset 475022aa6a631d34
parent 4749 0fa503d49cb4
child 4751 f3908cd80b10
Changed StartTextInput to take an SDL_Window parameter.
include/SDL_keyboard.h
src/SDL_compat.c
src/events/SDL_keyboard.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/win32/SDL_win32keyboard.c
src/video/win32/SDL_win32keyboard.h
src/video/win32/SDL_win32video.c
     1.1 --- a/include/SDL_keyboard.h	Tue Jul 06 08:22:36 2010 -0700
     1.2 +++ b/include/SDL_keyboard.h	Thu Jul 08 01:35:47 2010 -0400
     1.3 @@ -140,7 +140,7 @@
     1.4   *  \sa SDL_StopTextInput()
     1.5   *  \sa SDL_SetTextInputRect()
     1.6   */
     1.7 -extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
     1.8 +extern DECLSPEC void SDLCALL SDL_StartTextInput(SDL_Window *window);
     1.9  
    1.10  /**
    1.11   *  \brief Stop receiving any text input events.
     2.1 --- a/src/SDL_compat.c	Tue Jul 06 08:22:36 2010 -0700
     2.2 +++ b/src/SDL_compat.c	Thu Jul 08 01:35:47 2010 -0400
     2.3 @@ -1740,7 +1740,7 @@
     2.4      switch (enable) {
     2.5      case 1:
     2.6          SDL_enabled_UNICODE = 1;
     2.7 -        SDL_StartTextInput();
     2.8 +        SDL_StartTextInput(SDL_VideoWindow);
     2.9          break;
    2.10      case 0:
    2.11          SDL_enabled_UNICODE = 0;
     3.1 --- a/src/events/SDL_keyboard.c	Tue Jul 06 08:22:36 2010 -0700
     3.2 +++ b/src/events/SDL_keyboard.c	Thu Jul 08 01:35:47 2010 -0400
     3.3 @@ -617,7 +617,7 @@
     3.4                              0, 0);
     3.5  
     3.6          if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
     3.7 -            SDL_StartTextInput();
     3.8 +            SDL_StartTextInput(window);
     3.9          }
    3.10      }
    3.11  }
     4.1 --- a/src/video/SDL_sysvideo.h	Tue Jul 06 08:22:36 2010 -0700
     4.2 +++ b/src/video/SDL_sysvideo.h	Thu Jul 08 01:35:47 2010 -0400
     4.3 @@ -299,7 +299,7 @@
     4.4      void (*SuspendScreenSaver) (_THIS);
     4.5  
     4.6      /* Text input */
     4.7 -    void (*StartTextInput) (_THIS);
     4.8 +    void (*StartTextInput) (_THIS, SDL_Window *window);
     4.9      void (*StopTextInput) (_THIS);
    4.10      void (*SetTextInputRect) (_THIS, SDL_Rect *rect);
    4.11  
     5.1 --- a/src/video/SDL_video.c	Tue Jul 06 08:22:36 2010 -0700
     5.2 +++ b/src/video/SDL_video.c	Thu Jul 08 01:35:47 2010 -0400
     5.3 @@ -3385,10 +3385,10 @@
     5.4  }
     5.5  
     5.6  void
     5.7 -SDL_StartTextInput(void)
     5.8 +SDL_StartTextInput(SDL_Window *window)
     5.9  {
    5.10      if (_this && _this->StartTextInput) {
    5.11 -        _this->StartTextInput(_this);
    5.12 +        _this->StartTextInput(_this, window);
    5.13      }
    5.14      SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE);
    5.15      SDL_EventState(SDL_TEXTEDITING, SDL_ENABLE);
     6.1 --- a/src/video/win32/SDL_win32keyboard.c	Tue Jul 06 08:22:36 2010 -0700
     6.2 +++ b/src/video/win32/SDL_win32keyboard.c	Thu Jul 08 01:35:47 2010 -0400
     6.3 @@ -123,9 +123,8 @@
     6.4  }
     6.5  
     6.6  void
     6.7 -WIN_StartTextInput(_THIS)
     6.8 +WIN_StartTextInput(_THIS, SDL_Window *window)
     6.9  {
    6.10 -	SDL_Window *window = SDL_GetKeyboardFocus();
    6.11  	HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    6.12  
    6.13  }
     7.1 --- a/src/video/win32/SDL_win32keyboard.h	Tue Jul 06 08:22:36 2010 -0700
     7.2 +++ b/src/video/win32/SDL_win32keyboard.h	Thu Jul 08 01:35:47 2010 -0400
     7.3 @@ -31,7 +31,7 @@
     7.4  extern void WIN_UpdateKeymap(void);
     7.5  extern void WIN_QuitKeyboard(_THIS);
     7.6  
     7.7 -extern void WIN_StartTextInput(_THIS);
     7.8 +extern void WIN_StartTextInput(_THIS, SDL_Window *window);
     7.9  extern void WIN_StopTextInput(_THIS);
    7.10  extern void WIN_SetTextInputRect(_THIS, SDL_Rect *rect);
    7.11  
     8.1 --- a/src/video/win32/SDL_win32video.c	Tue Jul 06 08:22:36 2010 -0700
     8.2 +++ b/src/video/win32/SDL_win32video.c	Thu Jul 08 01:35:47 2010 -0400
     8.3 @@ -163,7 +163,7 @@
     8.4      device->GL_DeleteContext = WIN_GL_DeleteContext;
     8.5  #endif
     8.6      device->StartTextInput = WIN_StartTextInput;
     8.7 -    device->StopTextInput = WIN_StartTextInput;
     8.8 +    device->StopTextInput = WIN_StopTextInput;
     8.9      device->SetTextInputRect = WIN_SetTextInputRect;
    8.10  
    8.11      device->free = WIN_DeleteDevice;