src/video/uikit/SDL_uikitviewcontroller.h
branchiOS-improvements
changeset 9532 318042c16b76
parent 9501 574db299498f
child 9619 b94b6d0bff0f
     1.1 --- a/src/video/uikit/SDL_uikitviewcontroller.h	Tue Dec 02 02:52:45 2014 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitviewcontroller.h	Thu Jan 15 01:06:14 2015 -0400
     1.3 @@ -23,11 +23,27 @@
     1.4  
     1.5  #include "../SDL_sysvideo.h"
     1.6  
     1.7 +#include "SDL_touch.h"
     1.8 +
     1.9 +#if SDL_IPHONE_KEYBOARD
    1.10 +@interface SDL_uikitviewcontroller : UIViewController <UITextFieldDelegate>
    1.11 +#else
    1.12  @interface SDL_uikitviewcontroller : UIViewController
    1.13 +#endif
    1.14  
    1.15  @property (nonatomic, assign) SDL_Window *window;
    1.16  
    1.17 -- (id)initWithSDLWindow:(SDL_Window *)_window;
    1.18 +- (instancetype)initWithSDLWindow:(SDL_Window *)_window;
    1.19 +
    1.20 +- (void)setAnimationCallback:(int)interval
    1.21 +                    callback:(void (*)(void*))callback
    1.22 +               callbackParam:(void*)callbackParam;
    1.23 +
    1.24 +- (void)startAnimation;
    1.25 +- (void)stopAnimation;
    1.26 +
    1.27 +- (void)doLoop:(CADisplayLink*)sender;
    1.28 +
    1.29  - (void)loadView;
    1.30  - (void)viewDidLayoutSubviews;
    1.31  - (NSUInteger)supportedInterfaceOrientations;
    1.32 @@ -35,4 +51,28 @@
    1.33  - (BOOL)prefersStatusBarHidden;
    1.34  - (UIStatusBarStyle)preferredStatusBarStyle;
    1.35  
    1.36 +#if SDL_IPHONE_KEYBOARD
    1.37 +- (void)showKeyboard;
    1.38 +- (void)hideKeyboard;
    1.39 +- (void)initKeyboard;
    1.40 +- (void)deinitKeyboard;
    1.41 +
    1.42 +- (void)keyboardWillShow:(NSNotification *)notification;
    1.43 +- (void)keyboardWillHide:(NSNotification *)notification;
    1.44 +
    1.45 +- (void)updateKeyboard;
    1.46 +
    1.47 +@property (nonatomic, assign, getter=isKeyboardVisible) BOOL keyboardVisible;
    1.48 +@property (nonatomic, assign) SDL_Rect textInputRect;
    1.49 +@property (nonatomic, assign) int keyboardHeight;
    1.50 +#endif
    1.51 +
    1.52  @end
    1.53 +
    1.54 +#if SDL_IPHONE_KEYBOARD
    1.55 +SDL_bool UIKit_HasScreenKeyboardSupport(_THIS);
    1.56 +void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window);
    1.57 +void UIKit_HideScreenKeyboard(_THIS, SDL_Window *window);
    1.58 +SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window);
    1.59 +void UIKit_SetTextInputRect(_THIS, SDL_Rect *rect);
    1.60 +#endif