src/video/uikit/SDL_uikitview.m
changeset 6654 2ecfb25be1e2
parent 6597 d359909f8121
child 6885 700f1b25f77f
child 8340 e470405f3ae9
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Sun Nov 04 20:20:53 2012 -0800
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Sun Nov 04 21:53:28 2012 -0800
     1.3 @@ -313,7 +313,7 @@
     1.4  {
     1.5      SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
     1.6      SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RETURN);
     1.7 -    [self hideKeyboard];
     1.8 +    SDL_StopTextInput();
     1.9      return YES;
    1.10  }
    1.11  
    1.12 @@ -341,36 +341,25 @@
    1.13      return view;
    1.14  }
    1.15  
    1.16 -SDL_bool UIKit_HasScreenKeyboardSupport(_THIS, SDL_Window *window)
    1.17 +SDL_bool UIKit_HasScreenKeyboardSupport(_THIS)
    1.18  {
    1.19 -    SDL_uikitview *view = getWindowView(window);
    1.20 -    if (view == nil) {
    1.21 -        return SDL_FALSE;
    1.22 -    }
    1.23 -
    1.24      return SDL_TRUE;
    1.25  }
    1.26  
    1.27 -int UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
    1.28 +void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
    1.29  {
    1.30      SDL_uikitview *view = getWindowView(window);
    1.31 -    if (view == nil) {
    1.32 -        return -1;
    1.33 +    if (view != nil) {
    1.34 +        [view showKeyboard];
    1.35      }
    1.36 -
    1.37 -    [view showKeyboard];
    1.38 -    return 0;
    1.39  }
    1.40  
    1.41 -int UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
    1.42 +void UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
    1.43  {
    1.44      SDL_uikitview *view = getWindowView(window);
    1.45 -    if (view == nil) {
    1.46 -        return -1;
    1.47 +    if (view != nil) {
    1.48 +        [view hideKeyboard];
    1.49      }
    1.50 -
    1.51 -    [view hideKeyboard];
    1.52 -    return 0;
    1.53  }
    1.54  
    1.55  SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
    1.56 @@ -383,22 +372,6 @@
    1.57      return view.keyboardVisible;
    1.58  }
    1.59  
    1.60 -int UIKit_ToggleScreenKeyboard(_THIS, SDL_Window *window)
    1.61 -{
    1.62 -    SDL_uikitview *view = getWindowView(window);
    1.63 -    if (view == nil) {
    1.64 -        return -1;
    1.65 -    }
    1.66 -
    1.67 -    if (UIKit_IsScreenKeyboardShown(_this, window)) {
    1.68 -        UIKit_HideScreenKeyboard(_this, window);
    1.69 -    }
    1.70 -    else {
    1.71 -        UIKit_ShowScreenKeyboard(_this, window);
    1.72 -    }
    1.73 -    return 0;
    1.74 -}
    1.75 -
    1.76  #endif /* SDL_IPHONE_KEYBOARD */
    1.77  
    1.78  #endif /* SDL_VIDEO_DRIVER_UIKIT */