src/video/uikit/SDL_uikitview.h
author Holmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 15 Aug 2008 00:42:14 +0000
branchgsoc2008_iphone
changeset 2425 491958a6c881
parent 2419 ab89ff6e97af
child 2450 96124abbcede
permissions -rw-r--r--
Removed log messages (printf and NSLog)
hfutrell@2409
     1
/*
hfutrell@2409
     2
 SDL - Simple DirectMedia Layer
hfutrell@2409
     3
 Copyright (C) 1997-2006 Sam Lantinga
hfutrell@2409
     4
 
hfutrell@2409
     5
 This library is free software; you can redistribute it and/or
hfutrell@2409
     6
 modify it under the terms of the GNU Lesser General Public
hfutrell@2409
     7
 License as published by the Free Software Foundation; either
hfutrell@2409
     8
 version 2.1 of the License, or (at your option) any later version.
hfutrell@2409
     9
 
hfutrell@2409
    10
 This library is distributed in the hope that it will be useful,
hfutrell@2409
    11
 but WITHOUT ANY WARRANTY; without even the implied warranty of
hfutrell@2409
    12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
hfutrell@2409
    13
 Lesser General Public License for more details.
hfutrell@2409
    14
 
hfutrell@2409
    15
 You should have received a copy of the GNU Lesser General Public
hfutrell@2409
    16
 License along with this library; if not, write to the Free Software
hfutrell@2409
    17
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
hfutrell@2409
    18
 
hfutrell@2409
    19
 Sam Lantinga
hfutrell@2409
    20
 slouken@libsdl.org
hfutrell@2409
    21
 */
hfutrell@2409
    22
hfutrell@2409
    23
#import <UIKit/UIKit.h>
hfutrell@2409
    24
#include "SDL_stdinc.h"
hfutrell@2409
    25
#include "SDL_mouse.h"
hfutrell@2409
    26
#include "SDL_mouse_c.h"
hfutrell@2409
    27
#include "SDL_events.h"
hfutrell@2409
    28
hfutrell@2425
    29
#if SDL_IPHONE_MULTIPLE_MICE
hfutrell@2425
    30
	#define MAX_SIMULTANEOUS_TOUCHES 5
hfutrell@2425
    31
#else
hfutrell@2425
    32
	#define MAX_SIMULTANEOUS_TOUCHES 1
hfutrell@2425
    33
#endif
hfutrell@2409
    34
hfutrell@2409
    35
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
hfutrell@2409
    36
		
hfutrell@2409
    37
	SDL_Mouse mice[MAX_SIMULTANEOUS_TOUCHES];
hfutrell@2409
    38
hfutrell@2409
    39
#if SDL_IPHONE_KEYBOARD
hfutrell@2409
    40
	UITextField *textField;
hfutrell@2409
    41
	BOOL keyboardVisible;
hfutrell@2409
    42
#endif	
hfutrell@2409
    43
	
hfutrell@2409
    44
}
hfutrell@2409
    45
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
hfutrell@2409
    46
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
hfutrell@2409
    47
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
hfutrell@2409
    48
hfutrell@2419
    49
#if SDL_IPHONE_KEYBOARD
hfutrell@2419
    50
- (void)showKeyboard;
hfutrell@2419
    51
- (void)hideKeyboard;
hfutrell@2419
    52
- (void)initializeKeyboard;
hfutrell@2419
    53
@property (readonly) BOOL keyboardVisible;
hfutrell@2419
    54
#endif 
hfutrell@2419
    55
hfutrell@2409
    56
@end
hfutrell@2419
    57
hfutrell@2419
    58
#if SDL_IPHONE_KEYBOARD
hfutrell@2419
    59
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_WindowID windowID);
hfutrell@2419
    60
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardHide(SDL_WindowID windowID);
hfutrell@2419
    61
extern DECLSPEC SDL_bool SDLCALL SDL_iPhoneKeyboardIsShown(SDL_WindowID windowID);
hfutrell@2419
    62
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardToggle(SDL_WindowID windowID);
hfutrell@2419
    63
#endif