diff src/video/uikit/SDL_uikitview.m @ 2405:3d0b3a7d3bea gsoc2008_iphone

Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Tue, 29 Jul 2008 17:19:23 +0000
parents e9a1eed243c9
children ab89ff6e97af
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitview.m	Tue Jul 29 17:09:29 2008 +0000
+++ b/src/video/uikit/SDL_uikitview.m	Tue Jul 29 17:19:23 2008 +0000
@@ -19,11 +19,16 @@
  Sam Lantinga
  slouken@libsdl.org
  */
+
 #import "SDL_uikitview.h"
+#import "SDL_uikitkeyboard.h"
 
 @implementation SDL_uikitview
 
 - (void)dealloc {
+#if SDL_IPHONE_KEYBOARD
+	[textField release];
+#endif
 	[super dealloc];
 }
 
@@ -31,13 +36,17 @@
 
 	self = [super initWithFrame: frame];
 	
+#if SDL_IPHONE_KEYBOARD
+	[self initializeKeyboard];
+#endif	
+
 	int i;
 	for (i=0; i<MAX_SIMULTANEOUS_TOUCHES; i++) {
 		mice[i].driverdata = NULL;
 		SDL_AddMouse(&(mice[i]), i);
 	}
 	self.multipleTouchEnabled = YES;
-		
+			
 	return self;
 
 }
@@ -95,8 +104,8 @@
 - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
 	/*
 		this can happen if the user puts more than 5 touches on the screen
-		at once, or perhaps in other circumstances.  Usually all active
-		touches are canceled.
+		at once, or perhaps in other circumstances.  Usually (it seems)
+		all active touches are canceled.
 	*/
 	[self touchesEnded: touches withEvent: event];
 }
@@ -118,4 +127,6 @@
 	}
 }
 
+
+
 @end